aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-15 21:33:41 +0300
committerarcadia-devtools <arcadia-devtools@yandex-team.ru>2022-03-15 21:33:41 +0300
commit3dd665b514943f69657b593eb51af90b99b1206b (patch)
tree0eb633e628bb1fe6c639574b1184d43def7c0a73
parenta68afc731202027f105bc5723ee11788017c29e2 (diff)
downloadydb-3dd665b514943f69657b593eb51af90b99b1206b.tar.gz
intermediate changes
ref:953ca886ec160075b38c0f3614de029b423f0a9e
-rw-r--r--CMakeLists.darwin.txt37
-rw-r--r--CMakeLists.linux.txt37
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource6
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource6
-rw-r--r--build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource6
-rw-r--r--contrib/libs/grpc/.yandex_meta/devtools.copyrights.report160
-rw-r--r--contrib/libs/grpc/.yandex_meta/devtools.licenses.report156
-rw-r--r--contrib/libs/grpc/.yandex_meta/licenses.list.txt12
-rw-r--r--contrib/libs/grpc/BUILD.gn332
-rw-r--r--contrib/libs/grpc/BUILDING.md29
-rw-r--r--contrib/libs/grpc/SECURITY.md3
-rw-r--r--contrib/libs/grpc/grpc++/CMakeLists.txt4
-rw-r--r--contrib/libs/grpc/grpc/CMakeLists.txt151
-rw-r--r--contrib/libs/grpc/include/grpc++/README.md7
-rw-r--r--contrib/libs/grpc/include/grpc/compression.h2
-rw-r--r--contrib/libs/grpc/include/grpc/grpc.h31
-rw-r--r--contrib/libs/grpc/include/grpc/grpc_security.h390
-rw-r--r--contrib/libs/grpc/include/grpc/impl/codegen/atm_windows.h4
-rw-r--r--contrib/libs/grpc/include/grpc/impl/codegen/byte_buffer.h2
-rw-r--r--contrib/libs/grpc/include/grpc/impl/codegen/grpc_types.h13
-rw-r--r--contrib/libs/grpc/include/grpc/impl/codegen/log.h2
-rw-r--r--contrib/libs/grpc/include/grpc/impl/codegen/port_platform.h79
-rw-r--r--contrib/libs/grpc/include/grpc/impl/codegen/sync_windows.h4
-rw-r--r--contrib/libs/grpc/include/grpc/slice_buffer.h6
-rw-r--r--contrib/libs/grpc/include/grpc/support/sync.h6
-rw-r--r--contrib/libs/grpc/include/grpc/support/time.h14
-rw-r--r--contrib/libs/grpc/include/grpcpp/alarm.h10
-rw-r--r--contrib/libs/grpc/include/grpcpp/channel.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/create_channel_posix.h4
-rw-r--r--contrib/libs/grpc/include/grpcpp/ext/admin_services.h33
-rw-r--r--contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin.h13
-rw-r--r--contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin_impl.h41
-rw-r--r--contrib/libs/grpc/include/grpcpp/generic/generic_stub.h4
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/async_unary_call.h211
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/byte_buffer.h13
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/call_op_set.h79
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/callback_common.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/channel_interface.h6
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/client_callback.h207
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/client_context.h4
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/client_unary_call.h18
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/completion_queue.h43
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/config.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/config_protobuf.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/core_codegen.h9
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/delegating_channel.h9
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/grpc_library.h3
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/intercepted_channel.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/interceptor_common.h29
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler.h80
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler_impl.h (renamed from contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.h)12
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_reader.h6
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_writer.h10
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/proto_utils.h4
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/rpc_method.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/security/auth_context.h4
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback.h91
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback_handlers.h197
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/server_context.h60
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h14
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/service_type.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/slice.h3
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/string_ref.h3
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/sync.h91
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/codegen/time.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/impl/server_initializer.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/resource_quota.h2
-rw-r--r--contrib/libs/grpc/include/grpcpp/security/credentials.h30
-rw-r--r--contrib/libs/grpc/include/grpcpp/security/server_credentials.h35
-rw-r--r--contrib/libs/grpc/include/grpcpp/security/tls_certificate_provider.h130
-rw-r--r--contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h278
-rw-r--r--contrib/libs/grpc/include/grpcpp/server.h40
-rw-r--r--contrib/libs/grpc/include/grpcpp/server_builder.h14
-rw-r--r--contrib/libs/grpc/include/grpcpp/support/channel_arguments.h10
-rw-r--r--contrib/libs/grpc/include/grpcpp/support/error_details.h48
-rw-r--r--contrib/libs/grpc/include/grpcpp/xds_server_builder.h75
-rw-r--r--contrib/libs/grpc/src/compiler/config.h2
-rw-r--r--contrib/libs/grpc/src/compiler/config_protobuf.h10
-rw-r--r--contrib/libs/grpc/src/compiler/cpp_generator.cc31
-rw-r--r--contrib/libs/grpc/src/compiler/csharp_generator.cc215
-rw-r--r--contrib/libs/grpc/src/compiler/csharp_generator.h2
-rw-r--r--contrib/libs/grpc/src/compiler/python_generator_helpers.h19
-rw-r--r--contrib/libs/grpc/src/compiler/ruby_generator.cc2
-rw-r--r--contrib/libs/grpc/src/core/README.md8
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/backend_metric.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.cc4059
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.h6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_factory.h3
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_plugin.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/config_selector.h19
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.cc191
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.h99
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.cc166
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.h25
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.cc17
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.h8
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc15
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/http_proxy.cc41
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.cc11
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.h11
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc221
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc3
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h3
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc3
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc4
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc78
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc23
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h27
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc4
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h13
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc479
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc1152
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds.h76
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h29
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc (renamed from contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc)440
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc49
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc1384
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.cc94
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h19
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.cc12
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.h18
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc100
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc485
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h33
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc10
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc4
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc466
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h5
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc68
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc45
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc39
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc377
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc67
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc475
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_factory.h12
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.cc79
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.h4
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc62
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.h16
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.cc355
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.h138
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.cc8
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.h6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.cc9
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.cc4
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.h2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/service_config_call_data.h20
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.cc324
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.h188
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_interface.h22
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.cc18
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.h26
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.cc166
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.h18
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.cc500
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.h39
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.cc189
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.h85
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/http/client/http_client_filter.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/http/client_authority_filter.cc12
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/http/http_filters_plugin.cc9
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/http/server/http_server_filter.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/max_age/max_age_filter.cc69
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/message_size/message_size_filter.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_utils.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/client/authority.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.cc4
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.h2
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create.cc33
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc31
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc45
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc840
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.h13
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc12
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc17
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc80
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/bin_decoder.cc14
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc89
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.h13
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/flow_control.h6
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_data.cc6
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_goaway.cc3
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_settings.h3
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_window_update.cc12
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_encoder.cc2
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_parser.cc20
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/internal.h2
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/parsing.cc3
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/chttp2/transport/writing.cc5
-rw-r--r--contrib/libs/grpc/src/core/ext/transport/inproc/inproc_transport.cc50
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c406
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h1459
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h1
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c55
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h179
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c350
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h1348
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c26
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h61
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c243
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h734
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h18
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c47
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h83
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c42
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h127
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c8
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h21
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c114
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h353
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c38
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h123
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c14
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h38
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c60
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h185
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c82
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h261
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c8
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h26
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c100
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h266
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c3
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c4
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h11
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c16
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c27
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h95
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c32
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h90
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c52
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h167
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c4
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h14
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c66
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h212
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c62
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h192
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c5
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h13
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c144
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h488
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c141
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h452
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c32
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h116
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c28
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h107
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c473
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h1490
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c10
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h32
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h20
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c29
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h67
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c79
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h268
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c78
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h281
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c41
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h113
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c194
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h604
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c1
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h1
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c53
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h177
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c21
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h53
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c65
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h185
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c95
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h308
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c5
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c5
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c15
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h47
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c4
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c93
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h323
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c10
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h36
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c36
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h90
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c12
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h37
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c5
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h19
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c46
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h124
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h19
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c14
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h49
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c16
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h49
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/http.upb.h1
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h17
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.h19
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/annotations.upb.h1
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c68
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h221
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c91
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h230
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.h31
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c180
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h747
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.c8
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.h25
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c18
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.h13
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c8
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h14
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c82
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h225
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c10
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h27
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c4
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h13
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c34
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h107
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h19
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h1
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.c4
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.h11
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c2
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.h53
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c52
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h129
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c42
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h77
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c36
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.h85
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c54
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h160
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c36
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h84
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c6
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h7
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c33
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h77
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.c128
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.h453
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.c (renamed from contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.c)12
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.h60
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c52
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h143
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c42
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h84
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.c36
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.h94
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c54
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h166
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c36
-rw-r--r--contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h85
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c354
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h140
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c38
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h30
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c41
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c251
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h105
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c383
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h115
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c100
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c543
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h145
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c53
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c136
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c127
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h65
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c56
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c272
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h135
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c143
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c56
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c66
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c263
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h100
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c233
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h70
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c56
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c231
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h85
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c43
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c59
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c68
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c107
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h50
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c113
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h50
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c146
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c50
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c195
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c193
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h65
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c59
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c141
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h70
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c141
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h70
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c101
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c944
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h290
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c71
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c61
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c51
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c102
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c120
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c76
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c505
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h115
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c44
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h30
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c170
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c97
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c246
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h60
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c72
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c60
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c142
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h65
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c73
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c72
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c80
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c80
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c74
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c130
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h50
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c64
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c56
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c54
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c53
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c73
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c69
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c63
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c81
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c92
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h65
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c95
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h55
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c34
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h30
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c59
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c54
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c47
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h30
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c61
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c39
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c386
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h165
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c37
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c65
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h50
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c66
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h75
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c42
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c70
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c56
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c33
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h30
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c49
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c43
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c44
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c310
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h145
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c42
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c62
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c45
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c49
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c67
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h40
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c50
-rw-r--r--contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h35
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/certificate_provider_factory.h12
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.cc87
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.h112
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.cc144
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.h69
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc377
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h102
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_api.cc3559
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_api.h472
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.cc318
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.h53
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.cc405
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.h151
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_client.cc546
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_client.h59
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_client_stats.cc48
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_client_stats.h8
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.cc226
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.h63
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_http_filters.cc114
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_http_filters.h130
-rw-r--r--contrib/libs/grpc/src/core/ext/xds/xds_server_config_fetcher.cc532
-rw-r--r--contrib/libs/grpc/src/core/lib/.yandex_meta/licenses.list.txt8
-rw-r--r--contrib/libs/grpc/src/core/lib/CMakeLists.txt5
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channel_args.cc17
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channel_stack.cc12
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channel_stack.h7
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channel_trace.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channel_trace.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channelz.cc123
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channelz.h36
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channelz_registry.cc14
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/channelz_registry.h1
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/handshaker.cc50
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/handshaker.h23
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/status_util.cc14
-rw-r--r--contrib/libs/grpc/src/core/lib/channel/status_util.h5
-rw-r--r--contrib/libs/grpc/src/core/lib/compression/compression.cc12
-rw-r--r--contrib/libs/grpc/src/core/lib/compression/compression_args.cc5
-rw-r--r--contrib/libs/grpc/src/core/lib/compression/compression_internal.cc15
-rw-r--r--contrib/libs/grpc/src/core/lib/compression/compression_internal.h3
-rw-r--r--contrib/libs/grpc/src/core/lib/compression/stream_compression_identity.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/debug/stats.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/debug/stats_data.cc1
-rw-r--r--contrib/libs/grpc/src/core/lib/debug/stats_data.h26
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/alloc.cc5
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/cpu_iphone.cc12
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/log.cc76
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/log_linux.cc22
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/log_posix.cc16
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/log_windows.cc22
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/murmur_hash.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/spinlock.h12
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/string.cc45
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/string.h11
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/sync.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/sync_abseil.cc9
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/sync_windows.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/time.cc24
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/time_precise.cc5
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/tls.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/tls_msvc.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/tls_stdcpp.h48
-rw-r--r--contrib/libs/grpc/src/core/lib/gpr/useful.h9
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/README.md4
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/arena.h5
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/atomic.h6
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/dual_ref_counted.h97
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/examine_stack.cc43
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/examine_stack.h46
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/fork.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/manual_constructor.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/map.h53
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/mpscq.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/orphanable.h12
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/ref_counted.h90
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/ref_counted_ptr.h32
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/stat.h (renamed from contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/statusor.h)38
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/stat_posix.cc49
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/stat_windows.cc48
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/sync.h169
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/thd.h6
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/thd_posix.cc61
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/thd_windows.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/time_util.cc77
-rw-r--r--contrib/libs/grpc/src/core/lib/gprpp/time_util.h42
-rw-r--r--contrib/libs/grpc/src/core/lib/http/httpcli.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/http/httpcli.h5
-rw-r--r--contrib/libs/grpc/src/core/lib/http/httpcli_security_connector.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/http/parser.cc74
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/buffer_list.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/call_combiner.cc13
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/cfstream_handle.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/combiner.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/endpoint.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/error.cc29
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/error.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/error_internal.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/ev_apple.cc19
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/ev_epoll1_linux.cc39
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/ev_epollex_linux.cc50
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/ev_poll_posix.cc16
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/ev_posix.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.cc10
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.h10
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/executor.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/executor.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/executor/mpmcqueue.h10
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/executor/threadpool.h8
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/iomgr.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.cc1
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix_cfstream.cc1
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/load_file.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.cc33
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/parse_address.cc170
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/parse_address.h40
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/pollset_set_custom.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/python_util.h8
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/resolve_address.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/resolve_address_posix.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/resource_quota.cc10
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.cc142
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.h27
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/socket_factory_posix.cc5
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/socket_mutator.cc5
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc1
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_client.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_client_custom.cc13
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_custom.cc39
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_posix.cc33
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_server_custom.cc50
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/tcp_uv.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/timer_custom.cc10
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/timer_generic.cc10
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/timer_manager.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/udp_server.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/udp_server.h3
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.cc53
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.h5
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix_noop.cc7
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_nospecial.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_pipe.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/json/json.h14
-rw-r--r--contrib/libs/grpc/src/core/lib/json/json_reader.cc12
-rw-r--r--contrib/libs/grpc/src/core/lib/json/json_util.h167
-rw-r--r--contrib/libs/grpc/src/core/lib/json/json_writer.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/matchers/matchers.cc339
-rw-r--r--contrib/libs/grpc/src/core/lib/matchers/matchers.h160
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/authorization_engine.cc177
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.cc153
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.h13
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/activation.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expression.h9
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_value.h20
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/evaluator_core.h12
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h19
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/rbac_policy.h163
-rw-r--r--contrib/libs/grpc/src/core/lib/security/authorization/rbac_translator.h39
-rw-r--r--contrib/libs/grpc/src/core/lib/security/certificate_provider.h60
-rw-r--r--contrib/libs/grpc/src/core/lib/security/context/security_context.cc7
-rw-r--r--contrib/libs/grpc/src/core/lib/security/context/security_context.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/alts/check_gcp_environment.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/credentials.cc14
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/credentials.h9
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.cc413
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.h80
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.cc213
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.h72
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.cc497
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.h120
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.cc135
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.h48
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.cc213
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.h58
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/fake/fake_credentials.cc5
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc43
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/insecure/insecure_credentials.cc64
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/jwt/json_token.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h7
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc9
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc85
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.h9
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/plugin/plugin_credentials.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.cc13
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc35
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h27
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc399
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h138
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc228
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h244
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc31
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.h6
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc91
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.h38
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc219
-rw-r--r--contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.h36
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc121
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.h87
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc6
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.cc7
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.h6
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc17
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.h37
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.cc639
-rw-r--r--contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.h166
-rw-r--r--contrib/libs/grpc/src/core/lib/security/transport/secure_endpoint.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/security/transport/security_handshaker.cc44
-rw-r--r--contrib/libs/grpc/src/core/lib/security/transport/server_auth_filter.cc10
-rw-r--r--contrib/libs/grpc/src/core/lib/security/util/json_util.h1
-rw-r--r--contrib/libs/grpc/src/core/lib/slice/slice.cc11
-rw-r--r--contrib/libs/grpc/src/core/lib/slice/slice_buffer.cc3
-rw-r--r--contrib/libs/grpc/src/core/lib/slice/slice_intern.cc24
-rw-r--r--contrib/libs/grpc/src/core/lib/slice/slice_internal.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/slice/slice_traits.h31
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/call.cc73
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/call_details.cc16
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/channel.cc26
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/channel.h11
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/channel_init.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/completion_queue.cc56
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/completion_queue.h32
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/init.cc39
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/init_unsecure.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/lame_client.cc101
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/lame_client.h5
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/server.cc159
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/server.h134
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/validate_metadata.h3
-rw-r--r--contrib/libs/grpc/src/core/lib/surface/version.cc4
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/authority_override.cc10
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/authority_override.h9
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/bdp_estimator.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/byte_stream.h6
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/connectivity_state.h16
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/error_utils.h2
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/metadata.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/metadata.h4
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/metadata_batch.cc27
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/metadata_batch.h22
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/static_metadata.cc2
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/status_metadata.cc7
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/timeout_encoding.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/transport.cc8
-rw-r--r--contrib/libs/grpc/src/core/lib/transport/transport.h16
-rw-r--r--contrib/libs/grpc/src/core/lib/uri/uri_parser.cc380
-rw-r--r--contrib/libs/grpc/src/core/lib/uri/uri_parser.h78
-rw-r--r--contrib/libs/grpc/src/core/plugin_registry/grpc_plugin_registry.cc34
-rw-r--r--contrib/libs/grpc/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc6
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/crypt/gsec.cc9
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/frame_protector/frame_handler.cc14
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_handshaker_client.cc44
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc90
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h2
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.cc4
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc14
-rw-r--r--contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc8
-rw-r--r--contrib/libs/grpc/src/core/tsi/fake_transport_security.cc22
-rw-r--r--contrib/libs/grpc/src/core/tsi/local_transport_security.cc6
-rw-r--r--contrib/libs/grpc/src/core/tsi/local_transport_security.h13
-rw-r--r--contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc2
-rw-r--r--contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.cc2
-rw-r--r--contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.h5
-rw-r--r--contrib/libs/grpc/src/core/tsi/ssl_transport_security.cc129
-rw-r--r--contrib/libs/grpc/src/core/tsi/ssl_transport_security.h12
-rw-r--r--contrib/libs/grpc/src/core/tsi/test_creds/README38
-rw-r--r--contrib/libs/grpc/src/core/tsi/test_creds/client1.key28
-rw-r--r--contrib/libs/grpc/src/core/tsi/test_creds/client1.pem20
-rw-r--r--contrib/libs/grpc/src/core/tsi/test_creds/client2.key28
-rw-r--r--contrib/libs/grpc/src/core/tsi/test_creds/client2.pem20
-rw-r--r--contrib/libs/grpc/src/core/tsi/transport_security.cc18
-rw-r--r--contrib/libs/grpc/src/core/tsi/transport_security_interface.h2
-rwxr-xr-xcontrib/libs/grpc/src/cpp/README.md4
-rw-r--r--contrib/libs/grpc/src/cpp/client/channel_cc.cc31
-rw-r--r--contrib/libs/grpc/src/cpp/client/client_callback.cc16
-rw-r--r--contrib/libs/grpc/src/cpp/client/client_context.cc1
-rw-r--r--contrib/libs/grpc/src/cpp/client/insecure_credentials.cc3
-rw-r--r--contrib/libs/grpc/src/cpp/client/secure_credentials.cc35
-rw-r--r--contrib/libs/grpc/src/cpp/client/secure_credentials.h12
-rw-r--r--contrib/libs/grpc/src/cpp/client/xds_credentials.cc41
-rw-r--r--contrib/libs/grpc/src/cpp/common/.yandex_meta/licenses.list.txt18
-rw-r--r--contrib/libs/grpc/src/cpp/common/alarm.cc30
-rw-r--r--contrib/libs/grpc/src/cpp/common/auth_property_iterator.cc2
-rw-r--r--contrib/libs/grpc/src/cpp/common/channel_filter.cc2
-rw-r--r--contrib/libs/grpc/src/cpp/common/channel_filter.h2
-rw-r--r--contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc110
-rw-r--r--contrib/libs/grpc/src/cpp/common/secure_auth_context.h2
-rw-r--r--contrib/libs/grpc/src/cpp/common/tls_certificate_provider.cc59
-rw-r--r--contrib/libs/grpc/src/cpp/common/tls_credentials_options.cc275
-rw-r--r--contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.cc75
-rw-r--r--contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.h16
-rw-r--r--contrib/libs/grpc/src/cpp/common/version_cc.cc2
-rw-r--r--contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc5
-rw-r--r--contrib/libs/grpc/src/cpp/server/channel_argument_option.cc8
-rw-r--r--contrib/libs/grpc/src/cpp/server/channelz/channelz_service_plugin.cc9
-rw-r--r--contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.cc15
-rw-r--r--contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.h4
-rw-r--r--contrib/libs/grpc/src/cpp/server/health/default_health_check_service.cc14
-rw-r--r--contrib/libs/grpc/src/cpp/server/health/default_health_check_service.h2
-rw-r--r--contrib/libs/grpc/src/cpp/server/insecure_server_credentials.cc3
-rw-r--r--contrib/libs/grpc/src/cpp/server/load_reporter/constants.h2
-rw-r--r--contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc2
-rw-r--r--contrib/libs/grpc/src/cpp/server/secure_server_credentials.cc9
-rw-r--r--contrib/libs/grpc/src/cpp/server/secure_server_credentials.h6
-rw-r--r--contrib/libs/grpc/src/cpp/server/server_builder.cc23
-rw-r--r--contrib/libs/grpc/src/cpp/server/server_callback.cc34
-rw-r--r--contrib/libs/grpc/src/cpp/server/server_cc.cc522
-rw-r--r--contrib/libs/grpc/src/cpp/server/server_context.cc54
-rw-r--r--contrib/libs/grpc/src/cpp/server/server_credentials.cc5
-rw-r--r--contrib/libs/grpc/src/cpp/server/xds_server_credentials.cc41
-rw-r--r--contrib/libs/grpc/src/cpp/thread_manager/thread_manager.cc10
-rw-r--r--contrib/libs/grpc/src/cpp/thread_manager/thread_manager.h2
-rw-r--r--contrib/libs/grpc/src/cpp/util/error_details.cc31
-rw-r--r--contrib/libs/grpc/src/proto/grpc/auth/v1/authz_policy.proto122
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/messages.proto56
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/test.proto10
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/.yandex_meta/licenses.list.txt4
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/cds_for_test.proto12
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/address.proto12
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/ads.proto2
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/aggregate_cluster.proto28
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/base.proto17
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/cluster.proto22
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/config_dump.proto284
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/csds.proto89
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault.proto91
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault_common.proto49
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/http_connection_manager.proto28
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/listener.proto149
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/protocol.proto27
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/route.proto55
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/router.proto28
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/string.proto64
-rw-r--r--contrib/libs/grpc/src/proto/grpc/testing/xds/v3/tls.proto114
-rw-r--r--contrib/libs/grpc/src/python/grpcio/commands.py34
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/__init__.py99
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_channel.py57
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi4
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pxd.pxi8
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi62
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi7
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi40
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi28
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pyx.pxi6
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi10
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_grpcio_metadata.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_runtime_protos.py90
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_server.py8
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/_simple_stubs.py129
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_channel.py108
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_server.py16
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/aio/_call.py5
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/aio/_channel.py128
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/aio/_interceptor.py87
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc/experimental/__init__.py10
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc_core_dependencies.py356
-rw-r--r--contrib/libs/grpc/src/python/grpcio/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_channelz/grpc_channelz/v1/_async.py45
-rw-r--r--contrib/libs/grpc/src/python/grpcio_channelz/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_health_checking/grpc_health/v1/_async.py12
-rw-r--r--contrib/libs/grpc/src/python/grpcio_health_checking/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py4
-rw-r--r--contrib/libs/grpc/src/python/grpcio_reflection/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_status/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_testing/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/.yandex_meta/licenses.list.txt8
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/grpc_version.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/_runner.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py10
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/fork/_fork_interop_test.py45
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/fork/methods.py3
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/qps/benchmark_client.py42
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/qps/client_runner.py11
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/qps/qps_worker.py26
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/qps/worker_server.py19
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_api_test.py3
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py10
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_common.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_server_test.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py32
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py48
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_exit_test.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py8
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_server_shutdown_test.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_signal_client.py4
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_xds_credentials_test.py103
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests/unit/framework/common/test_control.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/benchmark_client.py31
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py22
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/interop/methods.py20
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_common.py19
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_test_server.py22
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/abort_test.py2
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/call_test.py31
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/compatibility_test.py51
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/init_test.py4
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py46
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_test.py28
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_time_remaining_test.py70
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/wait_for_connection_test.py12
-rw-r--r--contrib/libs/grpc/src/python/grpcio_tests/tests_py3_only/interop/xds_interop_client.py201
-rw-r--r--contrib/libs/grpc/test/core/util/cmdline.cc2
-rw-r--r--contrib/libs/grpc/test/core/util/cmdline_test.cc49
-rw-r--r--contrib/libs/grpc/test/core/util/debugger_macros.cc57
-rw-r--r--contrib/libs/grpc/test/core/util/debugger_macros.h27
-rw-r--r--contrib/libs/grpc/test/core/util/eval_args_mock_endpoint.cc25
-rw-r--r--contrib/libs/grpc/test/core/util/fuzzer_corpus_test.cc46
-rw-r--r--contrib/libs/grpc/test/core/util/histogram.cc33
-rw-r--r--contrib/libs/grpc/test/core/util/mock_endpoint.cc3
-rw-r--r--contrib/libs/grpc/test/core/util/mock_endpoint.h3
-rw-r--r--contrib/libs/grpc/test/core/util/passthru_endpoint.cc6
-rw-r--r--contrib/libs/grpc/test/core/util/port.cc2
-rw-r--r--contrib/libs/grpc/test/core/util/reconnect_server.cc2
-rw-r--r--contrib/libs/grpc/test/core/util/resolve_localhost_ip46.cc58
-rw-r--r--contrib/libs/grpc/test/core/util/resolve_localhost_ip46.h29
-rw-r--r--contrib/libs/grpc/test/core/util/stack_tracer.cc (renamed from contrib/libs/grpc/test/core/util/examine_stack.cc)16
-rw-r--r--contrib/libs/grpc/test/core/util/stack_tracer.h (renamed from contrib/libs/grpc/test/core/util/examine_stack.h)20
-rw-r--r--contrib/libs/grpc/test/core/util/stack_tracer_test.cc44
-rw-r--r--contrib/libs/grpc/test/core/util/test_config.cc234
-rw-r--r--contrib/libs/grpc/test/core/util/test_lb_policies.cc6
-rw-r--r--contrib/libs/grpc/test/core/util/test_tcp_server.h2
-rw-r--r--contrib/libs/grpc/test/core/util/tls_utils.cc76
-rw-r--r--contrib/libs/grpc/test/core/util/tls_utils.h48
-rw-r--r--contrib/libs/grpc/test/core/util/tracer_util.cc2
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/.yandex_meta/licenses.list.txt22
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/admin_services_end2end_test.cc107
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/async_end2end_test.cc28
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/cfstream_test.cc37
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/channelz_service_test.cc230
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/client_callback_end2end_test.cc123
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/client_crash_test.cc5
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/client_crash_test_server.cc25
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/client_interceptors_end2end_test.cc335
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/client_lb_end2end_test.cc78
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/context_allocator_end2end_test.cc334
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/delegating_channel_test.cc5
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/end2end_test.cc155
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/exception_test.cc2
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/filter_end2end_test.cc17
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/flaky_network_test.cc26
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/generic_end2end_test.cc19
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/grpclb_end2end_test.cc213
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/hybrid_end2end_test.cc6
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/interceptors_util.cc16
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/interceptors_util.h24
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/message_allocator_end2end_test.cc34
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/mock_test.cc10
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/nonblocking_test.cc11
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/proto_server_reflection_test.cc8
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/raw_end2end_test.cc6
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/server_builder_plugin_test.cc8
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/server_crash_test.cc6
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/server_crash_test_client.cc27
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/server_early_return_test.cc2
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/server_interceptors_end2end_test.cc119
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/server_load_reporting_end2end_test.cc2
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/service_config_end2end_test.cc27
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/shutdown_test.cc2
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/streaming_throughput_test.cc1
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/test_service_impl.h2
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/thread_stress_test.cc14
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/time_change_test.cc10
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/xds_credentials_end2end_test.cc127
-rw-r--r--contrib/libs/grpc/test/cpp/end2end/xds_end2end_test.cc7767
-rw-r--r--contrib/libs/grpc/test/cpp/util/byte_buffer_proto_helper.cc4
-rw-r--r--contrib/libs/grpc/test/cpp/util/channelz_sampler.cc36
-rw-r--r--contrib/libs/grpc/test/cpp/util/channelz_sampler_test.cc10
-rw-r--r--contrib/libs/grpc/test/cpp/util/cli_call.cc2
-rw-r--r--contrib/libs/grpc/test/cpp/util/cli_credentials.cc157
-rw-r--r--contrib/libs/grpc/test/cpp/util/cli_credentials.h4
-rw-r--r--contrib/libs/grpc/test/cpp/util/create_test_channel.cc27
-rw-r--r--contrib/libs/grpc/test/cpp/util/grpc_cli.cc18
-rw-r--r--contrib/libs/grpc/test/cpp/util/grpc_tool.cc273
-rw-r--r--contrib/libs/grpc/test/cpp/util/grpc_tool.h2
-rw-r--r--contrib/libs/grpc/test/cpp/util/grpc_tool_test.cc217
-rw-r--r--contrib/libs/grpc/test/cpp/util/proto_file_parser.cc34
-rw-r--r--contrib/libs/grpc/test/cpp/util/proto_file_parser.h6
-rw-r--r--contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.cc4
-rw-r--r--contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.h6
-rw-r--r--contrib/libs/grpc/test/cpp/util/slice_test.cc15
-rw-r--r--contrib/libs/grpc/test/cpp/util/subprocess.h2
-rw-r--r--contrib/libs/grpc/test/cpp/util/test_config_cc.cc19
-rw-r--r--contrib/libs/grpc/test/cpp/util/test_credentials_provider.cc25
-rw-r--r--contrib/libs/grpc/test/cpp/util/time_test.cc1
-rw-r--r--contrib/libs/grpc/third_party/ABSEIL_MANUAL.md32
-rw-r--r--contrib/libs/grpc/third_party/README.md8
-rw-r--r--contrib/libs/grpc/third_party/address_sorting/include/address_sorting/address_sorting.h2
-rw-r--r--contrib/libs/grpc/third_party/upb/.yandex_meta/licenses.list.txt337
-rw-r--r--contrib/libs/grpc/third_party/upb/CMakeLists.txt9
-rw-r--r--contrib/libs/grpc/third_party/upb/third_party/wyhash/LICENSE25
-rw-r--r--contrib/libs/grpc/third_party/upb/third_party/wyhash/wyhash.h145
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/decode.c415
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/decode.h21
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/decode.int.h163
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/decode_fast.c1040
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/decode_fast.h126
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/def.c2178
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/def.h315
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/def.hpp439
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/encode.c396
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/encode.h29
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/msg.c255
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/msg.h208
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/port.c26
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/port_def.inc135
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/port_undef.inc10
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/reflection.c408
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/reflection.h168
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/table.c231
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/table.int.h19
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/text_encode.c421
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/text_encode.h38
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/upb.c59
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/upb.h43
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/upb.hpp8
-rw-r--r--contrib/libs/grpc/third_party/upb/upb/upb.int.h29
-rw-r--r--contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor/CMakeLists.txt51
1123 files changed, 75111 insertions, 22081 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt
index 8db1ee0546f..e1098a9b4bf 100644
--- a/CMakeLists.darwin.txt
+++ b/CMakeLists.darwin.txt
@@ -345,40 +345,41 @@ add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/meta)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/numeric)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_strings_internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/synchronization)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/status)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/debugging)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/debugging/stacktrace)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/debugging/symbolize)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/demangle)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/numeric)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_strings_internal)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/profiling/internal/exponential_biased)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/cord)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_cord_internal)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_functions)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_handle)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/synchronization)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/synchronization/internal)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/time)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/time/time_zone)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_info)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/bad_optional_access)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/algorithm)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/functional)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/utility)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format)
add_subdirectory(contrib/libs/grpc/third_party/address_sorting)
add_subdirectory(contrib/libs/grpc/third_party/upb)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/hash)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/city)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/hash/internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/bad_optional_access)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/bad_variant_access)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/status)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/profiling/internal/exponential_biased)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/cord)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_cord_internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_functions)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_handle)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_info)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/algorithm)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/functional)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/utility)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor)
add_subdirectory(contrib/libs/grpc/grpc++)
add_subdirectory(library/cpp/grpc/server)
add_subdirectory(library/cpp/monlib/dynamic_counters/percentile)
diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt
index d956b9e31e9..caa60b94065 100644
--- a/CMakeLists.linux.txt
+++ b/CMakeLists.linux.txt
@@ -426,40 +426,41 @@ add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/meta)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/numeric)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_strings_internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/synchronization)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/status)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/low_level_alloc)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/debugging)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/debugging/stacktrace)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/debugging/symbolize)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/demangle)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/numeric)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_strings_internal)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/profiling/internal/exponential_biased)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/cord)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_cord_internal)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_functions)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_handle)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/synchronization)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/synchronization/internal)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/time)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/time/civil_time)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/time/time_zone)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_info)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/bad_optional_access)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/algorithm)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/functional)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/utility)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format)
add_subdirectory(contrib/libs/grpc/third_party/address_sorting)
add_subdirectory(contrib/libs/grpc/third_party/upb)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/hash)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/city)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/hash/internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/bad_optional_access)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/bad_variant_access)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types)
add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/types/internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/status)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/profiling/internal/exponential_biased)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/cord)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_cord_internal)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_functions)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_handle)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/cordz_info)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/algorithm)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/functional)
-add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/utility)
+add_subdirectory(contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor)
add_subdirectory(contrib/libs/grpc/grpc++)
add_subdirectory(library/cpp/grpc/server)
add_subdirectory(library/cpp/monlib/dynamic_counters/percentile)
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource
index abdf7a9a1ac..38cc1af0744 100644
--- a/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_cpp/ya.make.resource
@@ -1,9 +1,9 @@
IF (OS_DARWIN AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584304489)
+ SET(SANDBOX_RESOURCE_ID 2849944076)
ELSEIF (OS_LINUX AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584305537)
+ SET(SANDBOX_RESOURCE_ID 2849945306)
ELSEIF (OS_WINDOWS AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584303873)
+ SET(SANDBOX_RESOURCE_ID 2849942782)
ELSE()
SET(SANDBOX_RESOURCE_ID)
ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource
index ae75538a60d..dd4955b4b04 100644
--- a/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_java/ya.make.resource
@@ -1,9 +1,9 @@
IF (OS_DARWIN AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584508133)
+ SET(SANDBOX_RESOURCE_ID 2849955612)
ELSEIF (OS_LINUX AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584508870)
+ SET(SANDBOX_RESOURCE_ID 2849956043)
ELSEIF (OS_WINDOWS AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584507401)
+ SET(SANDBOX_RESOURCE_ID 2849955104)
ELSE()
SET(SANDBOX_RESOURCE_ID)
ENDIF()
diff --git a/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource
index c8b0b04166e..dabbfa6bac7 100644
--- a/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource
+++ b/build/prebuilt/contrib/tools/protoc/plugins/grpc_python/ya.make.resource
@@ -1,9 +1,9 @@
IF (OS_DARWIN AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584497118)
+ SET(SANDBOX_RESOURCE_ID 2849853251)
ELSEIF (OS_LINUX AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584497759)
+ SET(SANDBOX_RESOURCE_ID 2849854102)
ELSEIF (OS_WINDOWS AND ARCH_X86_64)
- SET(SANDBOX_RESOURCE_ID 2584496517)
+ SET(SANDBOX_RESOURCE_ID 2849851866)
ELSE()
SET(SANDBOX_RESOURCE_ID)
ENDIF()
diff --git a/contrib/libs/grpc/.yandex_meta/devtools.copyrights.report b/contrib/libs/grpc/.yandex_meta/devtools.copyrights.report
index 908d523d6b9..b4648543440 100644
--- a/contrib/libs/grpc/.yandex_meta/devtools.copyrights.report
+++ b/contrib/libs/grpc/.yandex_meta/devtools.copyrights.report
@@ -40,6 +40,31 @@ BELONGS src/proto/grpc/status/ya.make
Files with this license:
src/proto/grpc/status/status.proto [1:1]
+KEEP COPYRIGHT_SERVICE_LABEL 06745079442081a41390888905fc6bdb
+BELONGS src/core/lib/ya.make test/cpp/end2end/ya.make ya.make
+ License text:
+ // Copyright 2021 gRPC authors.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ include/grpcpp/ext/admin_services.h [3:3]
+ src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc [2:2]
+ src/core/ext/filters/fault_injection/fault_injection_filter.cc [2:2]
+ src/core/ext/filters/fault_injection/fault_injection_filter.h [2:2]
+ src/core/ext/filters/fault_injection/service_config_parser.cc [2:2]
+ src/core/ext/filters/fault_injection/service_config_parser.h [2:2]
+ src/core/ext/xds/xds_http_fault_filter.cc [2:2]
+ src/core/ext/xds/xds_http_fault_filter.h [2:2]
+ src/core/ext/xds/xds_http_filters.cc [2:2]
+ src/core/ext/xds/xds_http_filters.h [2:2]
+ src/core/lib/matchers/matchers.cc [1:1]
+ src/core/lib/matchers/matchers.h [1:1]
+ src/core/lib/security/authorization/rbac_policy.h [1:1]
+ src/core/lib/security/authorization/rbac_translator.h [1:1]
+ test/cpp/end2end/admin_services_end2end_test.cc [3:3]
+
KEEP COPYRIGHT_SERVICE_LABEL 0f2ee97b72f8652f2f1b888d86348121
BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/duplicate/ya.make src/proto/grpc/testing/ya.make src/python/grpcio/ya.make src/python/grpcio_health_checking/ya.make src/python/grpcio_tests/ya.make test/core/util/ya.make test/cpp/end2end/ya.make test/cpp/util/ya.make ya.make
License text:
@@ -172,7 +197,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/dupli
src/compiler/schema_interface.h [3:3]
src/core/ext/filters/census/grpc_context.cc [3:3]
src/core/ext/filters/client_channel/channel_connectivity.cc [3:3]
- src/core/ext/filters/client_channel/client_channel.cc [3:3]
+ src/core/ext/filters/client_channel/client_channel.cc [2:2]
src/core/ext/filters/client_channel/client_channel.h [3:3]
src/core/ext/filters/client_channel/client_channel_factory.cc [3:3]
src/core/ext/filters/client_channel/client_channel_factory.h [3:3]
@@ -193,7 +218,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/dupli
src/core/ext/filters/client_channel/resolver_factory.h [3:3]
src/core/ext/filters/client_channel/resolver_registry.cc [3:3]
src/core/ext/filters/client_channel/resolver_registry.h [3:3]
- src/core/ext/filters/client_channel/resolving_lb_policy.cc [3:3]
src/core/ext/filters/client_channel/service_config.cc [2:2]
src/core/ext/filters/client_channel/service_config_parser.cc [2:2]
src/core/ext/filters/client_channel/subchannel.cc [3:3]
@@ -339,7 +363,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/dupli
src/core/lib/iomgr/iomgr.h [3:3]
src/core/lib/iomgr/iomgr_internal.h [3:3]
src/core/lib/iomgr/iomgr_posix.cc [3:3]
- src/core/lib/iomgr/iomgr_posix.h [3:3]
src/core/lib/iomgr/iomgr_posix_cfstream.cc [3:3]
src/core/lib/iomgr/iomgr_windows.cc [3:3]
src/core/lib/iomgr/is_epollexclusive_available.h [3:3]
@@ -763,7 +786,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/ya.ma
include/grpc++/test/server_context_test_spouse.h [3:3]
include/grpc/support/thd_id.h [3:3]
include/grpcpp/ext/channelz_service_plugin.h [3:3]
- include/grpcpp/ext/channelz_service_plugin_impl.h [3:3]
include/grpcpp/ext/server_load_reporting.h [3:3]
include/grpcpp/generic/async_generic_service.h [3:3]
include/grpcpp/impl/codegen/call.h [3:3]
@@ -774,6 +796,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/ya.ma
include/grpcpp/impl/codegen/intercepted_channel.h [3:3]
include/grpcpp/impl/codegen/interceptor.h [3:3]
include/grpcpp/impl/codegen/interceptor_common.h [3:3]
+ include/grpcpp/impl/codegen/method_handler_impl.h [3:3]
include/grpcpp/impl/codegen/proto_buffer_writer.h [3:3]
include/grpcpp/impl/codegen/server_interceptor.h [3:3]
include/grpcpp/support/client_callback.h [3:3]
@@ -790,16 +813,17 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/testing/ya.ma
src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h [2:2]
src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h [3:3]
src/core/ext/filters/client_channel/lb_policy/priority/priority.cc [2:2]
+ src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc [2:2]
+ src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h [2:2]
src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc [2:2]
- src/core/ext/filters/client_channel/lb_policy/xds/eds.cc [2:2]
- src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc [2:2]
- src/core/ext/filters/client_channel/lb_policy/xds/xds.h [3:3]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds.h [2:2]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc [2:2]
src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc [2:2]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc [2:2]
src/core/ext/filters/client_channel/local_subchannel_pool.cc [3:3]
src/core/ext/filters/client_channel/local_subchannel_pool.h [3:3]
src/core/ext/filters/client_channel/resolver_result_parsing.cc [3:3]
src/core/ext/filters/client_channel/resolver_result_parsing.h [3:3]
- src/core/ext/filters/client_channel/resolving_lb_policy.h [3:3]
src/core/ext/filters/client_channel/server_address.cc [3:3]
src/core/ext/filters/client_channel/server_address.h [3:3]
src/core/ext/filters/client_channel/subchannel_pool_interface.cc [3:3]
@@ -1111,7 +1135,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/python/grpcio/ya.make sr
test/cpp/end2end/time_change_test.cc [3:3]
KEEP COPYRIGHT_SERVICE_LABEL 249314deafd9b3e055b23b29bdbf09f3
-BELONGS src/core/lib/ya.make src/python/grpcio/ya.make src/python/grpcio_reflection/ya.make src/python/grpcio_tests/ya.make test/core/util/ya.make ya.make
+BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/python/grpcio/ya.make src/python/grpcio_reflection/ya.make src/python/grpcio_tests/ya.make test/core/util/ya.make test/cpp/end2end/ya.make ya.make
License text:
* Copyright 2020 gRPC authors.
Scancode info:
@@ -1121,29 +1145,43 @@ BELONGS src/core/lib/ya.make src/python/grpcio/ya.make src/python/grpcio_reflect
Files with this license:
include/grpc/impl/codegen/sync_abseil.h [3:3]
include/grpc/support/sync_abseil.h [3:3]
+ include/grpcpp/security/tls_certificate_provider.h [2:2]
include/grpcpp/test/channel_test_peer.h [3:3]
+ include/grpcpp/xds_server_builder.h [3:3]
src/core/ext/filters/client_channel/config_selector.cc [2:2]
src/core/ext/filters/client_channel/config_selector.h [2:2]
+ src/core/ext/filters/client_channel/dynamic_filters.cc [2:2]
+ src/core/ext/filters/client_channel/dynamic_filters.h [2:2]
src/core/ext/filters/client_channel/lb_policy/address_filtering.cc [2:2]
src/core/ext/filters/client_channel/lb_policy/address_filtering.h [2:2]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h [2:2]
src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc [2:2]
src/core/ext/filters/http/message_compress/message_decompress_filter.cc [3:3]
src/core/ext/filters/http/message_compress/message_decompress_filter.h [3:3]
src/core/ext/xds/certificate_provider_factory.h [3:3]
src/core/ext/xds/certificate_provider_registry.cc [3:3]
src/core/ext/xds/certificate_provider_registry.h [3:3]
- src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc [3:3]
- src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h [3:3]
+ src/core/ext/xds/certificate_provider_store.cc [3:3]
+ src/core/ext/xds/certificate_provider_store.h [3:3]
+ src/core/ext/xds/file_watcher_certificate_provider_factory.cc [3:3]
+ src/core/ext/xds/file_watcher_certificate_provider_factory.h [3:3]
+ src/core/ext/xds/xds_certificate_provider.cc [3:3]
+ src/core/ext/xds/xds_certificate_provider.h [3:3]
+ src/core/ext/xds/xds_server_config_fetcher.cc [3:3]
src/core/lib/gpr/sync_abseil.cc [3:3]
+ src/core/lib/gpr/tls_stdcpp.h [3:3]
src/core/lib/gprpp/dual_ref_counted.h [2:2]
+ src/core/lib/gprpp/examine_stack.cc [3:3]
+ src/core/lib/gprpp/examine_stack.h [3:3]
+ src/core/lib/gprpp/stat.h [2:2]
+ src/core/lib/gprpp/stat_posix.cc [2:2]
+ src/core/lib/gprpp/stat_windows.cc [2:2]
src/core/lib/iomgr/dualstack_socket_posix.cc [3:3]
src/core/lib/iomgr/ev_apple.cc [3:3]
src/core/lib/iomgr/ev_apple.h [3:3]
src/core/lib/json/json_util.cc [3:3]
src/core/lib/json/json_util.h [3:3]
- src/core/lib/security/authorization/authorization_engine.cc [1:1]
src/core/lib/security/authorization/authorization_engine.h [2:2]
- src/core/lib/security/authorization/evaluate_args.cc [3:3]
src/core/lib/security/authorization/evaluate_args.h [3:3]
src/core/lib/security/authorization/mock_cel/activation.h [1:1]
src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h [1:1]
@@ -1151,20 +1189,44 @@ BELONGS src/core/lib/ya.make src/python/grpcio/ya.make src/python/grpcio_reflect
src/core/lib/security/authorization/mock_cel/cel_value.h [1:1]
src/core/lib/security/authorization/mock_cel/evaluator_core.h [1:1]
src/core/lib/security/authorization/mock_cel/flat_expr_builder.h [1:1]
- src/core/lib/security/authorization/mock_cel/statusor.h [1:1]
- src/core/lib/security/certificate_provider.h [3:3]
+ src/core/lib/security/credentials/external/aws_external_account_credentials.cc [2:2]
+ src/core/lib/security/credentials/external/aws_external_account_credentials.h [2:2]
+ src/core/lib/security/credentials/external/aws_request_signer.cc [2:2]
+ src/core/lib/security/credentials/external/aws_request_signer.h [2:2]
+ src/core/lib/security/credentials/external/external_account_credentials.cc [2:2]
+ src/core/lib/security/credentials/external/external_account_credentials.h [2:2]
+ src/core/lib/security/credentials/external/file_external_account_credentials.cc [2:2]
+ src/core/lib/security/credentials/external/file_external_account_credentials.h [2:2]
+ src/core/lib/security/credentials/external/url_external_account_credentials.cc [2:2]
+ src/core/lib/security/credentials/external/url_external_account_credentials.h [2:2]
+ src/core/lib/security/credentials/insecure/insecure_credentials.cc [3:3]
src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc [2:2]
src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h [2:2]
+ src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc [2:2]
+ src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h [2:2]
+ src/core/lib/security/credentials/tls/tls_utils.cc [3:3]
+ src/core/lib/security/credentials/tls/tls_utils.h [3:3]
src/core/lib/security/credentials/xds/xds_credentials.cc [3:3]
src/core/lib/security/credentials/xds/xds_credentials.h [3:3]
+ src/core/lib/security/security_connector/insecure/insecure_security_connector.cc [3:3]
+ src/core/lib/security/security_connector/insecure/insecure_security_connector.h [3:3]
src/core/lib/transport/authority_override.cc [2:2]
src/core/lib/transport/authority_override.h [2:2]
+ src/cpp/client/xds_credentials.cc [3:3]
+ src/cpp/common/tls_certificate_provider.cc [2:2]
+ src/cpp/server/xds_server_credentials.cc [3:3]
src/python/grpcio/grpc/aio/_metadata.py [1:1]
src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py [1:1]
src/python/grpcio_reflection/grpc_reflection/v1alpha/_base.py [1:1]
src/python/grpcio_tests/tests_aio/unit/_metadata_test.py [1:1]
test/core/util/eval_args_mock_endpoint.cc [1:1]
test/core/util/eval_args_mock_endpoint.h [1:1]
+ test/core/util/resolve_localhost_ip46.cc [3:3]
+ test/core/util/resolve_localhost_ip46.h [3:3]
+ test/core/util/tls_utils.cc [2:2]
+ test/core/util/tls_utils.h [2:2]
+ test/cpp/end2end/context_allocator_end2end_test.cc [3:3]
+ test/cpp/end2end/xds_credentials_end2end_test.cc [3:3]
KEEP COPYRIGHT_SERVICE_LABEL 2738b84693d58ad3ff70e7cfefe0c3de
BELONGS src/python/grpcio_tests/ya.make
@@ -1186,6 +1248,33 @@ BELONGS src/python/grpcio_tests/ya.make
src/python/grpcio_tests/tests_aio/unit/server_test.py [1:1]
src/python/grpcio_tests/tests_py3_only/unit/__init__.py [1:1]
+KEEP COPYRIGHT_SERVICE_LABEL 3b3b16ffa1ced0a3528ed514cd0e24f4
+BELONGS src/core/lib/ya.make
+ License text:
+ // Copyright 2021 the gRPC authors.
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ src/core/lib/gprpp/time_util.cc [2:2]
+ src/core/lib/gprpp/time_util.h [2:2]
+
+KEEP COPYRIGHT_SERVICE_LABEL 3f8e6ecc96f8543539ce4b548cdc9afb
+BELONGS src/proto/grpc/testing/xds/ya.make src/python/grpcio_tests/ya.make ya.make
+ License text:
+ // Copyright 2021 The gRPC Authors
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ src/proto/grpc/auth/v1/authz_policy.proto [1:1]
+ src/proto/grpc/testing/xds/v3/config_dump.proto [1:1]
+ src/proto/grpc/testing/xds/v3/csds.proto [1:1]
+ src/proto/grpc/testing/xds/v3/router.proto [1:1]
+ src/python/grpcio_tests/tests_aio/unit/server_time_remaining_test.py [1:1]
+
KEEP COPYRIGHT_SERVICE_LABEL 47856a1da8680a4ba503954f87b9eb2c
BELONGS test/core/util/ya.make
License text:
@@ -1195,8 +1284,9 @@ BELONGS test/core/util/ya.make
Score : 100.00
Match type : COPYRIGHT
Files with this license:
- test/core/util/examine_stack.cc [3:3]
- test/core/util/examine_stack.h [3:3]
+ test/core/util/stack_tracer.cc [3:3]
+ test/core/util/stack_tracer.h [3:3]
+ test/core/util/stack_tracer_test.cc [3:3]
KEEP COPYRIGHT_SERVICE_LABEL 57712bcea01f379c970232b100dc2326
BELONGS src/python/grpcio/ya.make src/python/grpcio_tests/ya.make
@@ -1303,20 +1393,26 @@ BELONGS src/proto/grpc/testing/xds/ya.make src/python/grpcio/ya.make src/python/
Files with this license:
src/proto/grpc/testing/xds/v3/address.proto [1:1]
src/proto/grpc/testing/xds/v3/ads.proto [1:1]
+ src/proto/grpc/testing/xds/v3/aggregate_cluster.proto [1:1]
src/proto/grpc/testing/xds/v3/base.proto [1:1]
src/proto/grpc/testing/xds/v3/cluster.proto [1:1]
src/proto/grpc/testing/xds/v3/config_source.proto [1:1]
src/proto/grpc/testing/xds/v3/discovery.proto [1:1]
src/proto/grpc/testing/xds/v3/endpoint.proto [1:1]
+ src/proto/grpc/testing/xds/v3/fault.proto [1:1]
+ src/proto/grpc/testing/xds/v3/fault_common.proto [1:1]
src/proto/grpc/testing/xds/v3/http_connection_manager.proto [1:1]
src/proto/grpc/testing/xds/v3/listener.proto [1:1]
src/proto/grpc/testing/xds/v3/load_report.proto [1:1]
src/proto/grpc/testing/xds/v3/lrs.proto [1:1]
src/proto/grpc/testing/xds/v3/orca_load_report.proto [1:1]
src/proto/grpc/testing/xds/v3/percent.proto [1:1]
+ src/proto/grpc/testing/xds/v3/protocol.proto [1:1]
src/proto/grpc/testing/xds/v3/range.proto [1:1]
src/proto/grpc/testing/xds/v3/regex.proto [1:1]
src/proto/grpc/testing/xds/v3/route.proto [1:1]
+ src/proto/grpc/testing/xds/v3/string.proto [1:1]
+ src/proto/grpc/testing/xds/v3/tls.proto [1:1]
src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pxd.pxi [1:1]
src/python/grpcio/grpc/_cython/_cygrpc/aio/completion_queue.pyx.pxi [1:1]
src/python/grpcio/grpc/aio/_base_channel.py [1:1]
@@ -1394,6 +1490,23 @@ BELONGS src/proto/grpc/testing/xds/ya.make src/python/grpcio/ya.make src/python/
src/python/grpcio_tests/tests_aio/unit/channel_argument_test.py [1:1]
test/cpp/end2end/cfstream_test.cc [3:3]
+KEEP COPYRIGHT_SERVICE_LABEL 915a58fad04e1b9efec32a9b5cde7ce6
+BELONGS third_party/upb/ya.make
+FILE_INCLUDE LICENSE found in files: third_party/upb/third_party/wyhash/wyhash.h at line 3
+FILE_INCLUDE third_party/address_sorting/LICENSE found in files: third_party/upb/third_party/wyhash/wyhash.h at line 3
+FILE_INCLUDE third_party/upb/LICENSE found in files: third_party/upb/third_party/wyhash/wyhash.h at line 3
+FILE_INCLUDE third_party/upb/third_party/wyhash/LICENSE found in files: third_party/upb/third_party/wyhash/wyhash.h at line 3
+ License text:
+ /* Copyright 2020 王一 Wang Yi <godspeed_china@yeah.net>
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+ See github.com/wangyi-fudan/wyhash/ LICENSE
+ Scancode info:
+ Original SPDX id: COPYRIGHT_SERVICE_LABEL
+ Score : 100.00
+ Match type : COPYRIGHT
+ Files with this license:
+ third_party/upb/third_party/wyhash/wyhash.h [1:3]
+
KEEP COPYRIGHT_SERVICE_LABEL b2cd4508342480479b8c05479802ed26
BELONGS third_party/upb/ya.make
License text:
@@ -1523,7 +1636,6 @@ BELONGS src/core/lib/ya.make src/proto/grpc/core/ya.make src/proto/grpc/testing/
src/core/lib/gprpp/debug_location.h [3:3]
src/core/lib/gprpp/fork.cc [3:3]
src/core/lib/gprpp/fork.h [3:3]
- src/core/lib/gprpp/map.h [3:3]
src/core/lib/gprpp/memory.h [3:3]
src/core/lib/gprpp/orphanable.h [3:3]
src/core/lib/gprpp/ref_counted.h [3:3]
@@ -1634,16 +1746,16 @@ BELONGS src/python/grpcio_tests/ya.make
Files with this license:
src/python/grpcio_tests/tests/unit/_server_test.py [1:1]
-KEEP COPYRIGHT_SERVICE_LABEL e6b23c2370f0de1528bdb013438a7c03
-BELONGS ya.make
+KEEP COPYRIGHT_SERVICE_LABEL e4754455d390a3393237498e20414796
+BELONGS src/python/grpcio_tests/ya.make
License text:
- * Copyright 2016-2017 gRPC authors.
+ \# Copyright 2021 The gRPC authors.
Scancode info:
Original SPDX id: COPYRIGHT_SERVICE_LABEL
Score : 100.00
Match type : COPYRIGHT
Files with this license:
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc [3:3]
+ src/python/grpcio_tests/tests/unit/_xds_credentials_test.py [1:1]
KEEP COPYRIGHT_SERVICE_LABEL f053023fe408f1896a456d1d28958df9
BELONGS src/proto/grpc/health/v1/ya.make ya.make
@@ -1703,7 +1815,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/reflection/v1
src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc [3:3]
src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc [3:3]
src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h [3:3]
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc [3:3]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h [3:3]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc [3:3]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc [3:3]
@@ -1784,7 +1895,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/reflection/v1
src/core/lib/slice/percent_encoding.h [3:3]
src/core/lib/slice/slice_intern.cc [3:3]
src/core/lib/slice/slice_internal.h [3:3]
- src/core/lib/slice/slice_traits.h [3:3]
src/core/lib/surface/channel_init.cc [3:3]
src/core/lib/surface/channel_init.h [3:3]
src/core/lib/surface/channel_stack_type.cc [3:3]
@@ -1877,8 +1987,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/reflection/v1
src/python/grpcio_tests/tests/unit/thread_pool.py [1:1]
src/python/grpcio_tests/tests_aio/reflection/__init__.py [1:1]
src/python/grpcio_tests/tests_aio/reflection/reflection_servicer_test.py [1:1]
- test/core/util/debugger_macros.cc [3:3]
- test/core/util/debugger_macros.h [3:3]
test/core/util/fuzzer_corpus_test.cc [3:3]
test/core/util/grpc_fuzzer.bzl [1:1]
test/core/util/memory_counters.cc [3:3]
diff --git a/contrib/libs/grpc/.yandex_meta/devtools.licenses.report b/contrib/libs/grpc/.yandex_meta/devtools.licenses.report
index cb982c1bbcf..3d36b8a602c 100644
--- a/contrib/libs/grpc/.yandex_meta/devtools.licenses.report
+++ b/contrib/libs/grpc/.yandex_meta/devtools.licenses.report
@@ -56,6 +56,18 @@ BELONGS src/python/grpcio/ya.make
Files with this license:
src/python/grpcio/grpc/__init__.py [13:14]
+KEEP Unlicense 157675c2c94799a0422fc7f5a9c9f9dd
+BELONGS third_party/upb/ya.make
+ License text:
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+ Scancode info:
+ Original SPDX id: Unlicense
+ Score : 100.00
+ Match type : NOTICE
+ Links : http://unlicense.org/, https://spdx.org/licenses/Unlicense, https://unlicense.org/
+ Files with this license:
+ third_party/upb/third_party/wyhash/wyhash.h [2:2]
+
SKIP Apache-2.0 16b70eae00287deabdea5ef1821711a0
BELONGS ya.make
License text:
@@ -73,6 +85,7 @@ BELONGS src/python/grpcio_tests/ya.make
FILE_INCLUDE LICENSE found in files: src/python/grpcio_tests/setup.py at line 34
FILE_INCLUDE third_party/address_sorting/LICENSE found in files: src/python/grpcio_tests/setup.py at line 34
FILE_INCLUDE third_party/upb/LICENSE found in files: src/python/grpcio_tests/setup.py at line 34
+FILE_INCLUDE third_party/upb/third_party/wyhash/LICENSE found in files: src/python/grpcio_tests/setup.py at line 34
License text:
LICENSE = 'Apache License 2.0'
Scancode info:
@@ -83,6 +96,18 @@ FILE_INCLUDE third_party/upb/LICENSE found in files: src/python/grpcio_tests/set
Files with this license:
src/python/grpcio_tests/setup.py [34:34]
+KEEP Unlicense 1d267ceb3a8d8f75f1be3011ee4cbf53
+BELONGS third_party/upb/ya.make
+FILE_INCLUDE AUTHORS found in files: third_party/upb/third_party/wyhash/LICENSE at line 19
+ Note: matched license text is too long. Read it in the source files.
+ Scancode info:
+ Original SPDX id: Unlicense
+ Score : 100.00
+ Match type : TEXT
+ Links : http://unlicense.org/, https://spdx.org/licenses/Unlicense, https://unlicense.org/
+ Files with this license:
+ third_party/upb/third_party/wyhash/LICENSE [1:24]
+
KEEP BSD-3-Clause 26c9318cf95923719e6a1cbb87990e08
BELONGS third_party/address_sorting/ya.make
Note: matched license text is too long. Read it in the source files.
@@ -273,7 +298,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
include/grpcpp/create_channel.h [5:15]
include/grpcpp/create_channel_posix.h [5:15]
include/grpcpp/ext/channelz_service_plugin.h [5:15]
- include/grpcpp/ext/channelz_service_plugin_impl.h [5:15]
include/grpcpp/ext/health_check_service_server_builder_option.h [5:15]
include/grpcpp/ext/proto_server_reflection_plugin.h [5:15]
include/grpcpp/ext/server_load_reporting.h [5:15]
@@ -313,6 +337,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
include/grpcpp/impl/codegen/message_allocator.h [5:15]
include/grpcpp/impl/codegen/metadata_map.h [5:15]
include/grpcpp/impl/codegen/method_handler.h [5:15]
+ include/grpcpp/impl/codegen/method_handler_impl.h [5:15]
include/grpcpp/impl/codegen/proto_buffer_reader.h [5:15]
include/grpcpp/impl/codegen/proto_buffer_writer.h [5:15]
include/grpcpp/impl/codegen/proto_utils.h [5:15]
@@ -419,7 +444,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/ext/filters/client_channel/backup_poller.cc [5:15]
src/core/ext/filters/client_channel/backup_poller.h [5:15]
src/core/ext/filters/client_channel/channel_connectivity.cc [5:15]
- src/core/ext/filters/client_channel/client_channel.cc [5:15]
src/core/ext/filters/client_channel/client_channel.h [5:15]
src/core/ext/filters/client_channel/client_channel_channelz.cc [5:15]
src/core/ext/filters/client_channel/client_channel_channelz.h [5:15]
@@ -450,7 +474,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc [5:15]
src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc [5:15]
src/core/ext/filters/client_channel/lb_policy/subchannel_list.h [5:15]
- src/core/ext/filters/client_channel/lb_policy/xds/xds.h [5:15]
src/core/ext/filters/client_channel/lb_policy_factory.h [5:15]
src/core/ext/filters/client_channel/lb_policy_registry.cc [5:15]
src/core/ext/filters/client_channel/lb_policy_registry.h [5:15]
@@ -461,14 +484,12 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/ext/filters/client_channel/resolver.cc [5:15]
src/core/ext/filters/client_channel/resolver.h [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc [5:15]
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h [5:15]
- src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc [5:15]
@@ -481,8 +502,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/ext/filters/client_channel/resolver_registry.h [5:15]
src/core/ext/filters/client_channel/resolver_result_parsing.cc [5:15]
src/core/ext/filters/client_channel/resolver_result_parsing.h [5:15]
- src/core/ext/filters/client_channel/resolving_lb_policy.cc [5:15]
- src/core/ext/filters/client_channel/resolving_lb_policy.h [5:15]
src/core/ext/filters/client_channel/retry_throttle.cc [5:15]
src/core/ext/filters/client_channel/retry_throttle.h [5:15]
src/core/ext/filters/client_channel/server_address.cc [5:15]
@@ -653,6 +672,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/lib/gpr/tls_msvc.h [5:15]
src/core/lib/gpr/tls_pthread.cc [5:15]
src/core/lib/gpr/tls_pthread.h [5:15]
+ src/core/lib/gpr/tls_stdcpp.h [5:15]
src/core/lib/gpr/tmpfile.h [5:15]
src/core/lib/gpr/tmpfile_msys.cc [5:15]
src/core/lib/gpr/tmpfile_posix.cc [5:15]
@@ -663,6 +683,8 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/lib/gprpp/arena.h [5:15]
src/core/lib/gprpp/atomic.h [5:15]
src/core/lib/gprpp/debug_location.h [5:15]
+ src/core/lib/gprpp/examine_stack.cc [5:15]
+ src/core/lib/gprpp/examine_stack.h [5:15]
src/core/lib/gprpp/fork.cc [5:15]
src/core/lib/gprpp/fork.h [5:15]
src/core/lib/gprpp/global_config.h [5:15]
@@ -673,7 +695,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/lib/gprpp/host_port.cc [5:15]
src/core/lib/gprpp/host_port.h [5:15]
src/core/lib/gprpp/manual_constructor.h [5:15]
- src/core/lib/gprpp/map.h [5:15]
src/core/lib/gprpp/memory.h [5:15]
src/core/lib/gprpp/mpscq.cc [5:15]
src/core/lib/gprpp/mpscq.h [5:15]
@@ -755,7 +776,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/lib/iomgr/iomgr_internal.cc [5:15]
src/core/lib/iomgr/iomgr_internal.h [5:15]
src/core/lib/iomgr/iomgr_posix.cc [5:15]
- src/core/lib/iomgr/iomgr_posix.h [5:15]
src/core/lib/iomgr/iomgr_posix_cfstream.cc [5:15]
src/core/lib/iomgr/iomgr_uv.cc [5:15]
src/core/lib/iomgr/iomgr_windows.cc [5:15]
@@ -956,7 +976,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
src/core/lib/slice/slice_internal.h [5:15]
src/core/lib/slice/slice_string_helpers.cc [5:15]
src/core/lib/slice/slice_string_helpers.h [5:15]
- src/core/lib/slice/slice_traits.h [5:15]
src/core/lib/slice/slice_utils.h [5:15]
src/core/lib/surface/api_trace.cc [5:15]
src/core/lib/surface/api_trace.h [5:15]
@@ -1155,10 +1174,6 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
test/core/util/cmdline.cc [5:15]
test/core/util/cmdline.h [5:15]
test/core/util/cmdline_test.cc [5:15]
- test/core/util/debugger_macros.cc [5:15]
- test/core/util/debugger_macros.h [5:15]
- test/core/util/examine_stack.cc [5:15]
- test/core/util/examine_stack.h [5:15]
test/core/util/fuzzer_corpus_test.cc [5:15]
test/core/util/fuzzer_util.cc [5:15]
test/core/util/fuzzer_util.h [5:15]
@@ -1185,6 +1200,9 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
test/core/util/reconnect_server.h [5:15]
test/core/util/slice_splitter.cc [5:15]
test/core/util/slice_splitter.h [5:15]
+ test/core/util/stack_tracer.cc [5:15]
+ test/core/util/stack_tracer.h [5:15]
+ test/core/util/stack_tracer_test.cc [5:15]
test/core/util/subprocess.h [5:15]
test/core/util/subprocess_posix.cc [5:15]
test/core/util/subprocess_windows.cc [5:15]
@@ -1206,6 +1224,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
test/cpp/end2end/client_crash_test_server.cc [5:15]
test/cpp/end2end/client_interceptors_end2end_test.cc [5:15]
test/cpp/end2end/client_lb_end2end_test.cc [5:15]
+ test/cpp/end2end/context_allocator_end2end_test.cc [5:15]
test/cpp/end2end/delegating_channel_test.cc [5:15]
test/cpp/end2end/end2end_test.cc [5:15]
test/cpp/end2end/exception_test.cc [5:15]
@@ -1283,7 +1302,7 @@ BELONGS src/core/lib/ya.make src/cpp/common/ya.make test/core/util/ya.make test/
tools/codegen/core/gen_percent_encoding_tables.cc [5:15]
KEEP Apache-2.0 4248d6c827c367ff9f1b5e59ca41408e
-BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core/ya.make src/proto/grpc/health/v1/ya.make src/proto/grpc/reflection/v1alpha/ya.make src/proto/grpc/status/ya.make src/proto/grpc/testing/duplicate/ya.make src/proto/grpc/testing/xds/ya.make src/proto/grpc/testing/ya.make test/core/util/ya.make ya.make
+BELONGS src/core/lib/ya.make src/cpp/common/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core/ya.make src/proto/grpc/health/v1/ya.make src/proto/grpc/reflection/v1alpha/ya.make src/proto/grpc/status/ya.make src/proto/grpc/testing/duplicate/ya.make src/proto/grpc/testing/xds/ya.make src/proto/grpc/testing/ya.make test/core/util/ya.make test/cpp/end2end/ya.make ya.make
Note: matched license text is too long. Read it in the source files.
Scancode info:
Original SPDX id: Apache-2.0
@@ -1291,10 +1310,16 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
Match type : NOTICE
Links : http://www.apache.org/licenses/, http://www.apache.org/licenses/LICENSE-2.0, https://spdx.org/licenses/Apache-2.0
Files with this license:
+ include/grpcpp/ext/admin_services.h [5:15]
+ include/grpcpp/security/tls_certificate_provider.h [4:14]
+ include/grpcpp/xds_server_builder.h [5:15]
src/core/ext/filters/client_channel/backend_metric.cc [4:14]
src/core/ext/filters/client_channel/backend_metric.h [4:14]
+ src/core/ext/filters/client_channel/client_channel.cc [4:14]
src/core/ext/filters/client_channel/config_selector.cc [4:14]
src/core/ext/filters/client_channel/config_selector.h [4:14]
+ src/core/ext/filters/client_channel/dynamic_filters.cc [4:14]
+ src/core/ext/filters/client_channel/dynamic_filters.h [4:14]
src/core/ext/filters/client_channel/global_subchannel_pool.cc [5:15]
src/core/ext/filters/client_channel/lb_policy/address_filtering.cc [4:14]
src/core/ext/filters/client_channel/lb_policy/address_filtering.h [4:14]
@@ -1303,15 +1328,20 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc [4:14]
src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h [4:14]
src/core/ext/filters/client_channel/lb_policy/priority/priority.cc [4:14]
+ src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc [4:14]
+ src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h [4:14]
src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc [4:14]
src/core/ext/filters/client_channel/lb_policy/xds/cds.cc [4:14]
- src/core/ext/filters/client_channel/lb_policy/xds/eds.cc [4:14]
- src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc [4:14]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds.h [4:14]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h [4:14]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc [4:14]
src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc [4:14]
+ src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc [4:14]
src/core/ext/filters/client_channel/local_subchannel_pool.cc [5:15]
src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc [4:14]
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc [4:14]
src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h [4:14]
+ src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc [4:14]
src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h [4:14]
src/core/ext/filters/client_channel/service_config.cc [4:14]
src/core/ext/filters/client_channel/service_config.h [4:14]
@@ -1322,6 +1352,10 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
src/core/ext/filters/client_channel/subchannel_pool_interface.cc [5:15]
src/core/ext/filters/deadline/deadline_filter.cc [4:14]
src/core/ext/filters/deadline/deadline_filter.h [4:14]
+ src/core/ext/filters/fault_injection/fault_injection_filter.cc [4:14]
+ src/core/ext/filters/fault_injection/fault_injection_filter.h [4:14]
+ src/core/ext/filters/fault_injection/service_config_parser.cc [4:14]
+ src/core/ext/filters/fault_injection/service_config_parser.h [4:14]
src/core/ext/filters/http/message_compress/message_decompress_filter.cc [5:15]
src/core/ext/filters/http/message_compress/message_decompress_filter.h [5:15]
src/core/ext/filters/max_age/max_age_filter.h [4:14]
@@ -1335,18 +1369,32 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
src/core/ext/xds/certificate_provider_factory.h [5:15]
src/core/ext/xds/certificate_provider_registry.cc [5:15]
src/core/ext/xds/certificate_provider_registry.h [5:15]
- src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc [5:15]
- src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h [5:15]
+ src/core/ext/xds/certificate_provider_store.cc [5:15]
+ src/core/ext/xds/certificate_provider_store.h [5:15]
+ src/core/ext/xds/file_watcher_certificate_provider_factory.cc [5:15]
+ src/core/ext/xds/file_watcher_certificate_provider_factory.h [5:15]
src/core/ext/xds/xds_bootstrap.cc [4:14]
src/core/ext/xds/xds_bootstrap.h [4:14]
+ src/core/ext/xds/xds_certificate_provider.cc [5:15]
+ src/core/ext/xds/xds_certificate_provider.h [5:15]
src/core/ext/xds/xds_channel_args.h [4:14]
src/core/ext/xds/xds_client.h [4:14]
+ src/core/ext/xds/xds_http_fault_filter.cc [4:14]
+ src/core/ext/xds/xds_http_fault_filter.h [4:14]
+ src/core/ext/xds/xds_http_filters.cc [4:14]
+ src/core/ext/xds/xds_http_filters.h [4:14]
+ src/core/ext/xds/xds_server_config_fetcher.cc [5:15]
src/core/lib/gprpp/dual_ref_counted.h [4:14]
+ src/core/lib/gprpp/stat.h [4:14]
+ src/core/lib/gprpp/stat_posix.cc [4:14]
+ src/core/lib/gprpp/stat_windows.cc [4:14]
+ src/core/lib/gprpp/time_util.cc [4:14]
+ src/core/lib/gprpp/time_util.h [4:14]
src/core/lib/json/json_util.cc [5:15]
src/core/lib/json/json_util.h [5:15]
- src/core/lib/security/authorization/authorization_engine.cc [3:13]
+ src/core/lib/matchers/matchers.cc [3:13]
+ src/core/lib/matchers/matchers.h [3:13]
src/core/lib/security/authorization/authorization_engine.h [4:14]
- src/core/lib/security/authorization/evaluate_args.cc [5:15]
src/core/lib/security/authorization/evaluate_args.h [5:15]
src/core/lib/security/authorization/mock_cel/activation.h [3:13]
src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h [3:13]
@@ -1354,12 +1402,29 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
src/core/lib/security/authorization/mock_cel/cel_value.h [3:13]
src/core/lib/security/authorization/mock_cel/evaluator_core.h [3:13]
src/core/lib/security/authorization/mock_cel/flat_expr_builder.h [3:13]
- src/core/lib/security/authorization/mock_cel/statusor.h [3:13]
- src/core/lib/security/certificate_provider.h [5:15]
+ src/core/lib/security/authorization/rbac_policy.h [3:13]
+ src/core/lib/security/authorization/rbac_translator.h [3:13]
+ src/core/lib/security/credentials/external/aws_external_account_credentials.cc [4:14]
+ src/core/lib/security/credentials/external/aws_external_account_credentials.h [4:14]
+ src/core/lib/security/credentials/external/aws_request_signer.cc [4:14]
+ src/core/lib/security/credentials/external/aws_request_signer.h [4:14]
+ src/core/lib/security/credentials/external/external_account_credentials.cc [4:14]
+ src/core/lib/security/credentials/external/external_account_credentials.h [4:14]
+ src/core/lib/security/credentials/external/file_external_account_credentials.cc [4:14]
+ src/core/lib/security/credentials/external/file_external_account_credentials.h [4:14]
+ src/core/lib/security/credentials/external/url_external_account_credentials.cc [4:14]
+ src/core/lib/security/credentials/external/url_external_account_credentials.h [4:14]
+ src/core/lib/security/credentials/insecure/insecure_credentials.cc [5:15]
src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc [4:14]
src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h [4:14]
+ src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc [4:14]
+ src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h [4:14]
+ src/core/lib/security/credentials/tls/tls_utils.cc [5:15]
+ src/core/lib/security/credentials/tls/tls_utils.h [5:15]
src/core/lib/security/credentials/xds/xds_credentials.cc [5:15]
src/core/lib/security/credentials/xds/xds_credentials.h [5:15]
+ src/core/lib/security/security_connector/insecure/insecure_security_connector.cc [5:15]
+ src/core/lib/security/security_connector/insecure/insecure_security_connector.h [5:15]
src/core/lib/surface/server.cc [4:14]
src/core/lib/surface/server.h [4:14]
src/core/lib/transport/authority_override.cc [4:14]
@@ -1367,6 +1432,10 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
src/core/tsi/alts/handshaker/proto/altscontext.proto [3:13]
src/core/tsi/alts/handshaker/proto/handshaker.proto [3:13]
src/core/tsi/alts/handshaker/proto/transport_security_common.proto [3:13]
+ src/cpp/client/xds_credentials.cc [5:15]
+ src/cpp/common/tls_certificate_provider.cc [4:14]
+ src/cpp/server/xds_server_credentials.cc [5:15]
+ src/proto/grpc/auth/v1/authz_policy.proto [3:13]
src/proto/grpc/binary_log/v1alpha/log.proto [3:13]
src/proto/grpc/channelz/channelz.proto [3:13]
src/proto/grpc/core/stats.proto [3:13]
@@ -1406,23 +1475,38 @@ BELONGS src/core/lib/ya.make src/proto/grpc/channelz/ya.make src/proto/grpc/core
src/proto/grpc/testing/xds/orca_load_report_for_test.proto [3:13]
src/proto/grpc/testing/xds/v3/address.proto [3:13]
src/proto/grpc/testing/xds/v3/ads.proto [3:13]
+ src/proto/grpc/testing/xds/v3/aggregate_cluster.proto [3:13]
src/proto/grpc/testing/xds/v3/base.proto [3:13]
src/proto/grpc/testing/xds/v3/cluster.proto [3:13]
+ src/proto/grpc/testing/xds/v3/config_dump.proto [3:13]
src/proto/grpc/testing/xds/v3/config_source.proto [3:13]
+ src/proto/grpc/testing/xds/v3/csds.proto [3:13]
src/proto/grpc/testing/xds/v3/discovery.proto [3:13]
src/proto/grpc/testing/xds/v3/endpoint.proto [3:13]
+ src/proto/grpc/testing/xds/v3/fault.proto [3:13]
+ src/proto/grpc/testing/xds/v3/fault_common.proto [3:13]
src/proto/grpc/testing/xds/v3/http_connection_manager.proto [3:13]
src/proto/grpc/testing/xds/v3/listener.proto [3:13]
src/proto/grpc/testing/xds/v3/load_report.proto [3:13]
src/proto/grpc/testing/xds/v3/lrs.proto [3:13]
src/proto/grpc/testing/xds/v3/orca_load_report.proto [3:13]
src/proto/grpc/testing/xds/v3/percent.proto [3:13]
+ src/proto/grpc/testing/xds/v3/protocol.proto [3:13]
src/proto/grpc/testing/xds/v3/range.proto [3:13]
src/proto/grpc/testing/xds/v3/regex.proto [3:13]
src/proto/grpc/testing/xds/v3/route.proto [3:13]
+ src/proto/grpc/testing/xds/v3/router.proto [3:13]
+ src/proto/grpc/testing/xds/v3/string.proto [3:13]
+ src/proto/grpc/testing/xds/v3/tls.proto [3:13]
src/proto/math/math.proto [4:14]
test/core/util/eval_args_mock_endpoint.cc [3:13]
test/core/util/eval_args_mock_endpoint.h [3:13]
+ test/core/util/resolve_localhost_ip46.cc [5:15]
+ test/core/util/resolve_localhost_ip46.h [5:15]
+ test/core/util/tls_utils.cc [4:14]
+ test/core/util/tls_utils.h [4:14]
+ test/cpp/end2end/admin_services_end2end_test.cc [5:15]
+ test/cpp/end2end/xds_credentials_end2end_test.cc [5:15]
KEEP BSD-3-Clause 54930dd58069144c1215a9b35218104a
BELONGS third_party/upb/ya.make
@@ -1448,6 +1532,18 @@ BELONGS src/python/grpcio/ya.make
Files with this license:
src/python/grpcio/grpc/experimental/gevent.py [13:14]
+KEEP Public-Domain 5768fb73f20365b980a417d7c63f5c72
+BELONGS third_party/upb/ya.make
+ License text:
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+ Scancode info:
+ Original SPDX id: LicenseRef-scancode-public-domain
+ Score : 100.00
+ Match type : TEXT
+ Links : http://www.linfo.org/publicdomain.html, https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/public-domain.LICENSE
+ Files with this license:
+ third_party/upb/third_party/wyhash/wyhash.h [2:2]
+
SKIP LicenseRef-scancode-generic-cla 60c79976a6f1daa58457b943cb911512
BELONGS ya.make
License text:
@@ -1779,6 +1875,7 @@ BELONGS src/python/grpcio/ya.make src/python/grpcio_channelz/ya.make src/python/
src/python/grpcio_tests/tests/unit/_signal_handling_test.py [3:13]
src/python/grpcio_tests/tests/unit/_tcp_proxy.py [3:13]
src/python/grpcio_tests/tests/unit/_version_test.py [3:13]
+ src/python/grpcio_tests/tests/unit/_xds_credentials_test.py [3:13]
src/python/grpcio_tests/tests/unit/beta/__init__.py [3:13]
src/python/grpcio_tests/tests/unit/beta/_beta_features_test.py [3:13]
src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py [3:13]
@@ -1847,6 +1944,7 @@ BELONGS src/python/grpcio/ya.make src/python/grpcio_channelz/ya.make src/python/
src/python/grpcio_tests/tests_aio/unit/secure_call_test.py [3:13]
src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py [3:13]
src/python/grpcio_tests/tests_aio/unit/server_test.py [3:13]
+ src/python/grpcio_tests/tests_aio/unit/server_time_remaining_test.py [3:13]
src/python/grpcio_tests/tests_aio/unit/timeout_test.py [3:13]
src/python/grpcio_tests/tests_aio/unit/wait_for_connection_test.py [3:13]
src/python/grpcio_tests/tests_aio/unit/wait_for_ready_test.py [3:13]
@@ -1900,15 +1998,3 @@ BELONGS src/python/grpcio_channelz/ya.make src/python/grpcio_health_checking/ya.
src/python/grpcio_health_checking/setup.py [58:58]
src/python/grpcio_reflection/setup.py [59:59]
src/python/grpcio_status/setup.py [58:58]
-
-KEEP Public-Domain dfcb84bada1ef68350fcc8778aad2095
-BELONGS third_party/upb/ya.make
- License text:
- * MurmurHash2, by Austin Appleby (released as public domain).
- Scancode info:
- Original SPDX id: LicenseRef-scancode-public-domain
- Score : 70.00
- Match type : REFERENCE
- Links : http://www.linfo.org/publicdomain.html, https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/public-domain.LICENSE
- Files with this license:
- third_party/upb/upb/table.c [705:705]
diff --git a/contrib/libs/grpc/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/.yandex_meta/licenses.list.txt
index 69d7aca7a3d..30d6bd22e33 100644
--- a/contrib/libs/grpc/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/.yandex_meta/licenses.list.txt
@@ -273,10 +273,6 @@ limitations under the License.
====================COPYRIGHT====================
- * Copyright 2016-2017 gRPC authors.
-
-
-====================COPYRIGHT====================
* Copyright 2017 gRPC authors.
@@ -305,4 +301,12 @@ limitations under the License.
====================COPYRIGHT====================
+// Copyright 2021 The gRPC Authors
+
+
+====================COPYRIGHT====================
+// Copyright 2021 gRPC authors.
+
+
+====================COPYRIGHT====================
Copyright 2014 gRPC authors.
diff --git a/contrib/libs/grpc/BUILD.gn b/contrib/libs/grpc/BUILD.gn
index 4d69b1d3365..802ac1db346 100644
--- a/contrib/libs/grpc/BUILD.gn
+++ b/contrib/libs/grpc/BUILD.gn
@@ -137,6 +137,7 @@ config("grpc_config") {
"src/core/lib/gpr/tls_msvc.h",
"src/core/lib/gpr/tls_pthread.cc",
"src/core/lib/gpr/tls_pthread.h",
+ "src/core/lib/gpr/tls_stdcpp.h",
"src/core/lib/gpr/tmpfile.h",
"src/core/lib/gpr/tmpfile_msys.cc",
"src/core/lib/gpr/tmpfile_posix.cc",
@@ -146,6 +147,8 @@ config("grpc_config") {
"src/core/lib/gprpp/arena.cc",
"src/core/lib/gprpp/arena.h",
"src/core/lib/gprpp/atomic.h",
+ "src/core/lib/gprpp/examine_stack.cc",
+ "src/core/lib/gprpp/examine_stack.h",
"src/core/lib/gprpp/fork.cc",
"src/core/lib/gprpp/fork.h",
"src/core/lib/gprpp/global_config.h",
@@ -156,25 +159,31 @@ config("grpc_config") {
"src/core/lib/gprpp/host_port.cc",
"src/core/lib/gprpp/host_port.h",
"src/core/lib/gprpp/manual_constructor.h",
- "src/core/lib/gprpp/map.h",
"src/core/lib/gprpp/memory.h",
"src/core/lib/gprpp/mpscq.cc",
"src/core/lib/gprpp/mpscq.h",
+ "src/core/lib/gprpp/stat.h",
+ "src/core/lib/gprpp/stat_posix.cc",
+ "src/core/lib/gprpp/stat_windows.cc",
"src/core/lib/gprpp/sync.h",
"src/core/lib/gprpp/thd.h",
"src/core/lib/gprpp/thd_posix.cc",
"src/core/lib/gprpp/thd_windows.cc",
+ "src/core/lib/gprpp/time_util.cc",
+ "src/core/lib/gprpp/time_util.h",
"src/core/lib/profiling/basic_timers.cc",
"src/core/lib/profiling/stap_timers.cc",
"src/core/lib/profiling/timers.h",
]
deps = [
- ":y_absl/time:time",
- ":y_absl/synchronization:synchronization",
- ":y_absl/strings:strings",
- ":y_absl/strings:str_format",
- ":y_absl/memory:memory",
":y_absl/base:base",
+ ":y_absl/memory:memory",
+ ":y_absl/status:status",
+ ":y_absl/strings:str_format",
+ ":y_absl/strings:strings",
+ ":y_absl/synchronization:synchronization",
+ ":y_absl/time:time",
+ ":y_absl/types:optional",
]
public_configs = [
@@ -216,6 +225,8 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/config_selector.cc",
"src/core/ext/filters/client_channel/config_selector.h",
"src/core/ext/filters/client_channel/connector.h",
+ "src/core/ext/filters/client_channel/dynamic_filters.cc",
+ "src/core/ext/filters/client_channel/dynamic_filters.h",
"src/core/ext/filters/client_channel/global_subchannel_pool.cc",
"src/core/ext/filters/client_channel/global_subchannel_pool.h",
"src/core/ext/filters/client_channel/health/health_check_client.cc",
@@ -244,14 +255,17 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h",
"src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc",
"src/core/ext/filters/client_channel/lb_policy/priority/priority.cc",
+ "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc",
+ "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h",
"src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc",
"src/core/ext/filters/client_channel/lb_policy/subchannel_list.h",
"src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/cds.cc",
- "src/core/ext/filters/client_channel/lb_policy/xds/eds.cc",
- "src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds.h",
+ "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h",
+ "src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc",
"src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc",
+ "src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc",
"src/core/ext/filters/client_channel/lb_policy_factory.h",
"src/core/ext/filters/client_channel/lb_policy_registry.cc",
"src/core/ext/filters/client_channel/lb_policy_registry.h",
@@ -263,14 +277,12 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/resolver.cc",
"src/core/ext/filters/client_channel/resolver.h",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h",
- "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc",
"src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc",
@@ -279,6 +291,7 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc",
"src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc",
"src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h",
+ "src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc",
"src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc",
"src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc",
"src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h",
@@ -287,8 +300,6 @@ config("grpc_config") {
"src/core/ext/filters/client_channel/resolver_registry.h",
"src/core/ext/filters/client_channel/resolver_result_parsing.cc",
"src/core/ext/filters/client_channel/resolver_result_parsing.h",
- "src/core/ext/filters/client_channel/resolving_lb_policy.cc",
- "src/core/ext/filters/client_channel/resolving_lb_policy.h",
"src/core/ext/filters/client_channel/retry_throttle.cc",
"src/core/ext/filters/client_channel/retry_throttle.h",
"src/core/ext/filters/client_channel/server_address.cc",
@@ -307,6 +318,10 @@ config("grpc_config") {
"src/core/ext/filters/client_idle/client_idle_filter.cc",
"src/core/ext/filters/deadline/deadline_filter.cc",
"src/core/ext/filters/deadline/deadline_filter.h",
+ "src/core/ext/filters/fault_injection/fault_injection_filter.cc",
+ "src/core/ext/filters/fault_injection/fault_injection_filter.h",
+ "src/core/ext/filters/fault_injection/service_config_parser.cc",
+ "src/core/ext/filters/fault_injection/service_config_parser.h",
"src/core/ext/filters/http/client/http_client_filter.cc",
"src/core/ext/filters/http/client/http_client_filter.h",
"src/core/ext/filters/http/client_authority_filter.cc",
@@ -387,12 +402,16 @@ config("grpc_config") {
"src/core/ext/transport/inproc/inproc_plugin.cc",
"src/core/ext/transport/inproc/inproc_transport.cc",
"src/core/ext/transport/inproc/inproc_transport.h",
+ "src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c",
+ "src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h",
"src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c",
"src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h",
"src/core/ext/upb-generated/envoy/annotations/resource.upb.c",
"src/core/ext/upb-generated/envoy/annotations/resource.upb.h",
"src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c",
"src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h",
+ "src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c",
+ "src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h",
"src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c",
"src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h",
"src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c",
@@ -441,6 +460,10 @@ config("grpc_config") {
"src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h",
"src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c",
"src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h",
+ "src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c",
+ "src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h",
+ "src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c",
+ "src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h",
"src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c",
"src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h",
"src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c",
@@ -451,6 +474,14 @@ config("grpc_config") {
"src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h",
"src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c",
"src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h",
+ "src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c",
+ "src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h",
+ "src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c",
+ "src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h",
+ "src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c",
+ "src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h",
+ "src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c",
+ "src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h",
"src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c",
"src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h",
"src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c",
@@ -477,8 +508,12 @@ config("grpc_config") {
"src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h",
"src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c",
"src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h",
+ "src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c",
+ "src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h",
+ "src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c",
+ "src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c",
@@ -487,6 +522,8 @@ config("grpc_config") {
"src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h",
+ "src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c",
+ "src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h",
"src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c",
"src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h",
"src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c",
@@ -511,8 +548,6 @@ config("grpc_config") {
"src/core/ext/upb-generated/google/api/http.upb.h",
"src/core/ext/upb-generated/google/protobuf/any.upb.c",
"src/core/ext/upb-generated/google/protobuf/any.upb.h",
- "src/core/ext/upb-generated/google/protobuf/descriptor.upb.c",
- "src/core/ext/upb-generated/google/protobuf/descriptor.upb.h",
"src/core/ext/upb-generated/google/protobuf/duration.upb.c",
"src/core/ext/upb-generated/google/protobuf/duration.upb.h",
"src/core/ext/upb-generated/google/protobuf/empty.upb.c",
@@ -545,37 +580,225 @@ config("grpc_config") {
"src/core/ext/upb-generated/udpa/annotations/status.upb.h",
"src/core/ext/upb-generated/udpa/annotations/versioning.upb.c",
"src/core/ext/upb-generated/udpa/annotations/versioning.upb.h",
- "src/core/ext/upb-generated/udpa/core/v1/authority.upb.c",
- "src/core/ext/upb-generated/udpa/core/v1/authority.upb.h",
- "src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c",
- "src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h",
- "src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c",
- "src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h",
- "src/core/ext/upb-generated/udpa/core/v1/resource.upb.c",
- "src/core/ext/upb-generated/udpa/core/v1/resource.upb.h",
- "src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c",
- "src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h",
- "src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c",
- "src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h",
"src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c",
"src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h",
+ "src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c",
+ "src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h",
"src/core/ext/upb-generated/validate/validate.upb.c",
"src/core/ext/upb-generated/validate/validate.upb.h",
+ "src/core/ext/upb-generated/xds/core/v3/authority.upb.c",
+ "src/core/ext/upb-generated/xds/core/v3/authority.upb.h",
+ "src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c",
+ "src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h",
+ "src/core/ext/upb-generated/xds/core/v3/context_params.upb.c",
+ "src/core/ext/upb-generated/xds/core/v3/context_params.upb.h",
+ "src/core/ext/upb-generated/xds/core/v3/resource.upb.c",
+ "src/core/ext/upb-generated/xds/core/v3/resource.upb.h",
+ "src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c",
+ "src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h",
+ "src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c",
+ "src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h",
+ "src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c",
+ "src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/api/http.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/api/http.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h",
+ "src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c",
+ "src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h",
+ "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/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",
+ "src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h",
+ "src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c",
+ "src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h",
+ "src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c",
+ "src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h",
+ "src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c",
+ "src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h",
+ "src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c",
+ "src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h",
+ "src/core/ext/upbdefs-generated/validate/validate.upbdefs.c",
+ "src/core/ext/upbdefs-generated/validate/validate.upbdefs.h",
+ "src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c",
+ "src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h",
+ "src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c",
+ "src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h",
+ "src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c",
+ "src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h",
+ "src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c",
+ "src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h",
+ "src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c",
+ "src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h",
+ "src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c",
+ "src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h",
"src/core/ext/xds/certificate_provider_factory.h",
"src/core/ext/xds/certificate_provider_registry.cc",
"src/core/ext/xds/certificate_provider_registry.h",
+ "src/core/ext/xds/certificate_provider_store.cc",
"src/core/ext/xds/certificate_provider_store.h",
- "src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc",
- "src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h",
+ "src/core/ext/xds/file_watcher_certificate_provider_factory.cc",
+ "src/core/ext/xds/file_watcher_certificate_provider_factory.h",
"src/core/ext/xds/xds_api.cc",
"src/core/ext/xds/xds_api.h",
"src/core/ext/xds/xds_bootstrap.cc",
"src/core/ext/xds/xds_bootstrap.h",
+ "src/core/ext/xds/xds_certificate_provider.cc",
+ "src/core/ext/xds/xds_certificate_provider.h",
"src/core/ext/xds/xds_channel_args.h",
"src/core/ext/xds/xds_client.cc",
"src/core/ext/xds/xds_client.h",
"src/core/ext/xds/xds_client_stats.cc",
"src/core/ext/xds/xds_client_stats.h",
+ "src/core/ext/xds/xds_http_fault_filter.cc",
+ "src/core/ext/xds/xds_http_fault_filter.h",
+ "src/core/ext/xds/xds_http_filters.cc",
+ "src/core/ext/xds/xds_http_filters.h",
+ "src/core/ext/xds/xds_server_config_fetcher.cc",
"src/core/lib/avl/avl.cc",
"src/core/lib/avl/avl.h",
"src/core/lib/backoff/backoff.cc",
@@ -699,7 +922,6 @@ config("grpc_config") {
"src/core/lib/iomgr/iomgr_internal.cc",
"src/core/lib/iomgr/iomgr_internal.h",
"src/core/lib/iomgr/iomgr_posix.cc",
- "src/core/lib/iomgr/iomgr_posix.h",
"src/core/lib/iomgr/iomgr_posix_cfstream.cc",
"src/core/lib/iomgr/iomgr_uv.cc",
"src/core/lib/iomgr/iomgr_windows.cc",
@@ -814,18 +1036,8 @@ config("grpc_config") {
"src/core/lib/json/json_util.cc",
"src/core/lib/json/json_util.h",
"src/core/lib/json/json_writer.cc",
- "src/core/lib/security/authorization/authorization_engine.cc",
- "src/core/lib/security/authorization/authorization_engine.h",
- "src/core/lib/security/authorization/evaluate_args.cc",
- "src/core/lib/security/authorization/evaluate_args.h",
- "src/core/lib/security/authorization/mock_cel/activation.h",
- "src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h",
- "src/core/lib/security/authorization/mock_cel/cel_expression.h",
- "src/core/lib/security/authorization/mock_cel/cel_value.h",
- "src/core/lib/security/authorization/mock_cel/evaluator_core.h",
- "src/core/lib/security/authorization/mock_cel/flat_expr_builder.h",
- "src/core/lib/security/authorization/mock_cel/statusor.h",
- "src/core/lib/security/certificate_provider.h",
+ "src/core/lib/matchers/matchers.cc",
+ "src/core/lib/matchers/matchers.h",
"src/core/lib/security/context/security_context.cc",
"src/core/lib/security/context/security_context.h",
"src/core/lib/security/credentials/alts/alts_credentials.cc",
@@ -844,6 +1056,16 @@ config("grpc_config") {
"src/core/lib/security/credentials/credentials.cc",
"src/core/lib/security/credentials/credentials.h",
"src/core/lib/security/credentials/credentials_metadata.cc",
+ "src/core/lib/security/credentials/external/aws_external_account_credentials.cc",
+ "src/core/lib/security/credentials/external/aws_external_account_credentials.h",
+ "src/core/lib/security/credentials/external/aws_request_signer.cc",
+ "src/core/lib/security/credentials/external/aws_request_signer.h",
+ "src/core/lib/security/credentials/external/external_account_credentials.cc",
+ "src/core/lib/security/credentials/external/external_account_credentials.h",
+ "src/core/lib/security/credentials/external/file_external_account_credentials.cc",
+ "src/core/lib/security/credentials/external/file_external_account_credentials.h",
+ "src/core/lib/security/credentials/external/url_external_account_credentials.cc",
+ "src/core/lib/security/credentials/external/url_external_account_credentials.h",
"src/core/lib/security/credentials/fake/fake_credentials.cc",
"src/core/lib/security/credentials/fake/fake_credentials.h",
"src/core/lib/security/credentials/google_default/credentials_generic.cc",
@@ -851,6 +1073,7 @@ config("grpc_config") {
"src/core/lib/security/credentials/google_default/google_default_credentials.h",
"src/core/lib/security/credentials/iam/iam_credentials.cc",
"src/core/lib/security/credentials/iam/iam_credentials.h",
+ "src/core/lib/security/credentials/insecure/insecure_credentials.cc",
"src/core/lib/security/credentials/jwt/json_token.cc",
"src/core/lib/security/credentials/jwt/json_token.h",
"src/core/lib/security/credentials/jwt/jwt_credentials.cc",
@@ -867,16 +1090,22 @@ config("grpc_config") {
"src/core/lib/security/credentials/ssl/ssl_credentials.h",
"src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc",
"src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h",
+ "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc",
+ "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h",
"src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc",
"src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h",
"src/core/lib/security/credentials/tls/tls_credentials.cc",
"src/core/lib/security/credentials/tls/tls_credentials.h",
+ "src/core/lib/security/credentials/tls/tls_utils.cc",
+ "src/core/lib/security/credentials/tls/tls_utils.h",
"src/core/lib/security/credentials/xds/xds_credentials.cc",
"src/core/lib/security/credentials/xds/xds_credentials.h",
"src/core/lib/security/security_connector/alts/alts_security_connector.cc",
"src/core/lib/security/security_connector/alts/alts_security_connector.h",
"src/core/lib/security/security_connector/fake/fake_security_connector.cc",
"src/core/lib/security/security_connector/fake/fake_security_connector.h",
+ "src/core/lib/security/security_connector/insecure/insecure_security_connector.cc",
+ "src/core/lib/security/security_connector/insecure/insecure_security_connector.h",
"src/core/lib/security/security_connector/load_system_roots.h",
"src/core/lib/security/security_connector/load_system_roots_fallback.cc",
"src/core/lib/security/security_connector/load_system_roots_linux.cc",
@@ -1034,18 +1263,18 @@ config("grpc_config") {
"src/core/tsi/transport_security_grpc.cc",
"src/core/tsi/transport_security_grpc.h",
"src/core/tsi/transport_security_interface.h",
+ "third_party/xxhash/xxhash.h",
]
deps = [
- "//third_party/boringssl",
"//third_party/zlib",
+ ":y_absl/container:flat_hash_map",
+ ":y_absl/container:inlined_vector",
+ ":y_absl/functional:bind_front",
+ ":y_absl/status:statusor",
":gpr",
+ "//third_party/boringssl",
":address_sorting",
":upb",
- ":y_absl/types:optional",
- ":y_absl/strings:strings",
- ":y_absl/status:status",
- ":y_absl/container:inlined_vector",
- ":y_absl/container:flat_hash_set",
"//third_party/cares",
":address_sorting",
]
@@ -1183,6 +1412,7 @@ config("grpc_config") {
"include/grpcpp/impl/codegen/message_allocator.h",
"include/grpcpp/impl/codegen/metadata_map.h",
"include/grpcpp/impl/codegen/method_handler.h",
+ "include/grpcpp/impl/codegen/method_handler_impl.h",
"include/grpcpp/impl/codegen/proto_buffer_reader.h",
"include/grpcpp/impl/codegen/proto_buffer_writer.h",
"include/grpcpp/impl/codegen/proto_utils.h",
@@ -1218,6 +1448,7 @@ config("grpc_config") {
"include/grpcpp/security/auth_metadata_processor.h",
"include/grpcpp/security/credentials.h",
"include/grpcpp/security/server_credentials.h",
+ "include/grpcpp/security/tls_certificate_provider.h",
"include/grpcpp/security/tls_credentials_options.h",
"include/grpcpp/server.h",
"include/grpcpp/server_builder.h",
@@ -1245,6 +1476,7 @@ config("grpc_config") {
"include/grpcpp/support/sync_stream.h",
"include/grpcpp/support/time.h",
"include/grpcpp/support/validate_service_config.h",
+ "include/grpcpp/xds_server_builder.h",
"src/cpp/client/channel_cc.cc",
"src/cpp/client/client_callback.cc",
"src/cpp/client/client_context.cc",
@@ -1257,6 +1489,7 @@ config("grpc_config") {
"src/cpp/client/insecure_credentials.cc",
"src/cpp/client/secure_credentials.cc",
"src/cpp/client/secure_credentials.h",
+ "src/cpp/client/xds_credentials.cc",
"src/cpp/codegen/codegen_init.cc",
"src/cpp/common/alarm.cc",
"src/cpp/common/auth_property_iterator.cc",
@@ -1271,6 +1504,7 @@ config("grpc_config") {
"src/cpp/common/secure_auth_context.h",
"src/cpp/common/secure_channel_arguments.cc",
"src/cpp/common/secure_create_auth_context.cc",
+ "src/cpp/common/tls_certificate_provider.cc",
"src/cpp/common/tls_credentials_options.cc",
"src/cpp/common/tls_credentials_options_util.cc",
"src/cpp/common/tls_credentials_options_util.h",
@@ -1297,6 +1531,7 @@ config("grpc_config") {
"src/cpp/server/server_credentials.cc",
"src/cpp/server/server_posix.cc",
"src/cpp/server/thread_pool_interface.h",
+ "src/cpp/server/xds_server_credentials.cc",
"src/cpp/thread_manager/thread_manager.cc",
"src/cpp/thread_manager/thread_manager.h",
"src/cpp/util/byte_buffer_cc.cc",
@@ -1307,9 +1542,6 @@ config("grpc_config") {
deps = [
"//third_party/protobuf:protobuf_lite",
":grpc",
- ":gpr",
- ":address_sorting",
- ":upb",
]
public_configs = [
diff --git a/contrib/libs/grpc/BUILDING.md b/contrib/libs/grpc/BUILDING.md
index e9f0823c4da..4a69c3b779f 100644
--- a/contrib/libs/grpc/BUILDING.md
+++ b/contrib/libs/grpc/BUILDING.md
@@ -19,8 +19,6 @@ If you plan to build using CMake
If you are a contributor and plan to build and run tests, install the following as well:
```sh
- $ # libgflags-dev is only required if building with make (deprecated)
- $ [sudo] apt-get install libgflags-dev
$ # clang and LLVM C++ lib is only required for sanitizer builds
$ [sudo] apt-get install clang-5.0 libc++-dev
```
@@ -45,12 +43,6 @@ packages from [Homebrew](https://brew.sh):
If you plan to build using CMake, follow the instructions from https://cmake.org/download/
-If you are a contributor and plan to build and run tests, install the following as well:
-```sh
- $ # gflags is only required if building with make (deprecated)
- $ brew install gflags
-```
-
*Tip*: when building,
you *may* want to explicitly set the `LIBTOOL` and `LIBTOOLIZE`
environment variables when running `make` to ensure the version
@@ -152,7 +144,7 @@ you will be able to browse and build the code.
> cmake --build . --config Release
```
-If you want to build DLLs, run `cmake` with `-DBUILD_SHARED_LIBS=ON`.
+Using gRPC C++ as a DLL is not recommended, but you can still enable it by running `cmake` with `-DBUILD_SHARED_LIBS=ON`.
### Windows, Using Ninja (faster build).
@@ -168,7 +160,16 @@ installed to be able to compile the C/C++ sources.
> cmake --build .
```
-If you want to build DLLs, run `cmake` with `-DBUILD_SHARED_LIBS=ON`.
+Using gRPC C++ as a DLL is not recommended, but you can still enable it by running `cmake` with `-DBUILD_SHARED_LIBS=ON`.
+
+### Windows: A note on building shared libs (DLLs)
+
+Windows DLL build is supported at a "best effort" basis and we don't recommend using gRPC C++ as a DLL as there are some known drawbacks around how C++ DLLs work on Windows. For example, there is no stable C++ ABI and you can't safely allocate memory in one DLL, and free it in another etc.
+
+That said, we don't actively prohibit building DLLs on windows (it can be enabled in cmake with `-DBUILD_SHARED_LIBS=ON`), and are free to use the DLL builds
+at your own risk.
+- you've been warned that there are some important drawbacks and some things might not work at all or will be broken in interesting ways.
+- we don't have extensive testing for DLL builds in place (to avoid maintenance costs, increased test duration etc.) so regressions / build breakages might occur
### Dependency management
@@ -242,7 +243,13 @@ $ cmake ../.. -DCMAKE_TOOLCHAIN_FILE=path/to/file
$ make
```
-[Cross-compile example](test/distrib/cpp/run_distrib_test_raspberry_pi.sh)
+[Cross-compile example](test/distrib/cpp/run_distrib_test_cmake_aarch64_cross.sh)
+
+### A note on SONAME and its ABI compatibility implications in the cmake build
+
+Best efforts are made to bump the SONAME revision during ABI breaches. While a
+change in the SONAME clearly indicates an ABI incompatibility, no hard guarantees
+can be made about any sort of ABI stability across the same SONAME version.
## Building with make on UNIX systems (deprecated)
diff --git a/contrib/libs/grpc/SECURITY.md b/contrib/libs/grpc/SECURITY.md
new file mode 100644
index 00000000000..be6e108705c
--- /dev/null
+++ b/contrib/libs/grpc/SECURITY.md
@@ -0,0 +1,3 @@
+# Security Policy
+
+For information on gRPC Security Policy and reporting potentional security issues, please see [gRPC CVE Process](https://github.com/grpc/proposal/blob/master/P4-grpc-cve-process.md).
diff --git a/contrib/libs/grpc/grpc++/CMakeLists.txt b/contrib/libs/grpc/grpc++/CMakeLists.txt
index 1ee1011f38a..018a0ab3f4b 100644
--- a/contrib/libs/grpc/grpc++/CMakeLists.txt
+++ b/contrib/libs/grpc/grpc++/CMakeLists.txt
@@ -31,6 +31,7 @@ target_link_libraries(libs-grpc-grpc++ PUBLIC
grpc-third_party-upb
OpenSSL::OpenSSL
yabseil-cpp-tstring-y_absl-strings
+ yabseil-cpp-tstring-y_absl-synchronization
)
target_sources(libs-grpc-grpc++ PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/client/channel_cc.cc
@@ -43,6 +44,7 @@ target_sources(libs-grpc-grpc++ PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/client/credentials_cc.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/client/insecure_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/client/secure_credentials.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/client/xds_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/codegen/codegen_init.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/alarm.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/auth_property_iterator.cc
@@ -55,6 +57,7 @@ target_sources(libs-grpc-grpc++ PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/secure_auth_context.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/secure_channel_arguments.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/secure_create_auth_context.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/tls_certificate_provider.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/tls_credentials_options.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/common/validate_service_config.cc
@@ -81,6 +84,7 @@ target_sources(libs-grpc-grpc++ PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/server/server_context.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/server/server_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/server/server_posix.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/server/xds_server_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/util/byte_buffer_cc.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/cpp/util/status.cc
diff --git a/contrib/libs/grpc/grpc/CMakeLists.txt b/contrib/libs/grpc/grpc/CMakeLists.txt
index bd1bbacc877..bfbec612738 100644
--- a/contrib/libs/grpc/grpc/CMakeLists.txt
+++ b/contrib/libs/grpc/grpc/CMakeLists.txt
@@ -23,9 +23,11 @@ target_include_directories(libs-grpc-grpc PRIVATE
${CMAKE_BINARY_DIR}/contrib/libs/grpc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/address_sorting/include
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb
${CMAKE_SOURCE_DIR}/contrib/libs/re2
+ ${CMAKE_SOURCE_DIR}/contrib/libs/xxhash
)
target_link_libraries(libs-grpc-grpc PUBLIC
contrib-libs-cxxsupp
@@ -37,14 +39,18 @@ target_link_libraries(libs-grpc-grpc PUBLIC
grpc-third_party-upb
OpenSSL::OpenSSL
contrib-libs-re2
+ contrib-libs-xxhash
ZLIB::ZLIB
yabseil-cpp-tstring-y_absl-hash
abseil-cpp-tstring-y_absl-meta
yabseil-cpp-tstring-y_absl-status
+ yabsl-status-statusor
yabseil-cpp-tstring-y_absl-strings
yabsl-strings-cord
ystrings-internal-str_format
+ yabseil-cpp-tstring-y_absl-synchronization
yabseil-cpp-tstring-y_absl-time
+ yabsl-time-time_zone
library-cpp-resource
)
target_sources(libs-grpc-grpc PRIVATE
@@ -57,6 +63,7 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_factory.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_plugin.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/config_selector.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc
@@ -72,34 +79,33 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy_registry.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/proxy_mapper_registry.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.cc
@@ -109,6 +115,8 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/http/client/http_client_filter.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/http/client_authority_filter.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/filters/http/http_filters_plugin.cc
@@ -154,9 +162,11 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/writing.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/transport/inproc/inproc_plugin.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/transport/inproc/inproc_transport.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c
@@ -181,11 +191,17 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c
@@ -199,11 +215,14 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c
@@ -216,7 +235,6 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.c
@@ -233,20 +251,115 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/certificate_provider_registry.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_api.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_client.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/xds/xds_server_config_fetcher.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/avl/avl.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/backoff/backoff.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/channel/channel_args.cc
@@ -372,8 +485,7 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/json/json_reader.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/json/json_util.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/json/json_writer.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/authorization/authorization_engine.cc
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/matchers/matchers.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/context/security_context.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/alts/check_gcp_environment.cc
@@ -386,10 +498,16 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/composite/composite_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/credentials_metadata.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/fake/fake_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/google_default/credentials_generic.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/iam/iam_credentials.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/insecure/insecure_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/jwt/json_token.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc
@@ -398,11 +516,14 @@ target_sources(libs-grpc-grpc PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/plugin/plugin_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_arcadia_root_certs.cpp
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_fallback.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.cc
diff --git a/contrib/libs/grpc/include/grpc++/README.md b/contrib/libs/grpc/include/grpc++/README.md
new file mode 100644
index 00000000000..5842eb3a10d
--- /dev/null
+++ b/contrib/libs/grpc/include/grpc++/README.md
@@ -0,0 +1,7 @@
+# include/grpc++
+
+This was the original directory name for all C++ header files but it
+conflicted with the naming scheme required for some build systems. It
+is superseded by `include/grpcpp` but the old directory structure is
+still present to avoid breaking code that used the old include files.
+All new include files are only in `include/grpcpp`.
diff --git a/contrib/libs/grpc/include/grpc/compression.h b/contrib/libs/grpc/include/grpc/compression.h
index a4f6a8faf2b..176956642ad 100644
--- a/contrib/libs/grpc/include/grpc/compression.h
+++ b/contrib/libs/grpc/include/grpc/compression.h
@@ -41,7 +41,7 @@ GRPCAPI int grpc_compression_algorithm_is_stream(
/** Parses the \a slice as a grpc_compression_algorithm instance and updating \a
* algorithm. Returns 1 upon success, 0 otherwise. */
GRPCAPI int grpc_compression_algorithm_parse(
- grpc_slice value, grpc_compression_algorithm* algorithm);
+ grpc_slice name, grpc_compression_algorithm* algorithm);
/** Updates \a name with the encoding name corresponding to a valid \a
* algorithm. Note that \a name is statically allocated and must *not* be freed.
diff --git a/contrib/libs/grpc/include/grpc/grpc.h b/contrib/libs/grpc/include/grpc/grpc.h
index 6001117521f..5a518cdbc43 100644
--- a/contrib/libs/grpc/include/grpc/grpc.h
+++ b/contrib/libs/grpc/include/grpc/grpc.h
@@ -89,8 +89,7 @@ GRPCAPI void grpc_shutdown(void);
https://github.com/grpc/grpc/issues/15334 */
GRPCAPI int grpc_is_initialized(void);
-/** EXPERIMENTAL. Blocking shut down grpc library.
- This is only for wrapped language to use now. */
+/** DEPRECATED. Recommend to use grpc_shutdown only */
GRPCAPI void grpc_shutdown_blocking(void);
/** Return a string representing the current version of grpc */
@@ -415,6 +414,30 @@ GRPCAPI void grpc_server_register_completion_queue(grpc_server* server,
grpc_completion_queue* cq,
void* reserved);
+// There might be more methods added later, so users should take care to memset
+// this to 0 before using it.
+typedef struct {
+ void (*on_serving_status_change)(void* user_data, const char* uri,
+ grpc_status_code code,
+ const char* error_message);
+ void* user_data;
+} grpc_server_xds_status_notifier;
+
+typedef struct grpc_server_config_fetcher grpc_server_config_fetcher;
+
+/** EXPERIMENTAL. Creates an xDS config fetcher. */
+GRPCAPI grpc_server_config_fetcher* grpc_server_config_fetcher_xds_create(
+ grpc_server_xds_status_notifier notifier);
+
+/** EXPERIMENTAL. Destroys a config fetcher. */
+GRPCAPI void grpc_server_config_fetcher_destroy(
+ grpc_server_config_fetcher* config_fetcher);
+
+/** EXPERIMENTAL. Sets the server's config fetcher. Takes ownership.
+ Must be called before adding ports */
+GRPCAPI void grpc_server_set_config_fetcher(
+ grpc_server* server, grpc_server_config_fetcher* config_fetcher);
+
/** Add a HTTP2 over plaintext over tcp listener.
Returns bound port number on success, 0 on failure.
REQUIRES: server not started */
@@ -485,6 +508,10 @@ GRPCAPI void grpc_resource_quota_resize(grpc_resource_quota* resource_quota,
GRPCAPI void grpc_resource_quota_set_max_threads(
grpc_resource_quota* resource_quota, int new_max_threads);
+/** EXPERIMENTAL. Dumps xDS configs as a serialized ClientConfig proto.
+ The full name of the proto is envoy.service.status.v3.ClientConfig. */
+GRPCAPI grpc_slice grpc_dump_xds_configs();
+
/** Fetch a vtable for a grpc_channel_arg that points to a grpc_resource_quota
*/
GRPCAPI const grpc_arg_pointer_vtable* grpc_resource_quota_arg_vtable(void);
diff --git a/contrib/libs/grpc/include/grpc/grpc_security.h b/contrib/libs/grpc/include/grpc/grpc_security.h
index 1810681b767..b5dafe1bae6 100644
--- a/contrib/libs/grpc/include/grpc/grpc_security.h
+++ b/contrib/libs/grpc/include/grpc/grpc_security.h
@@ -330,6 +330,14 @@ grpc_service_account_jwt_access_credentials_create(const char* json_key,
gpr_timespec token_lifetime,
void* reserved);
+/** Builds External Account credentials.
+ - json_string is the JSON string containing the credentials options.
+ - scopes_string contains the scopes to be binded with the credentials.
+ This API is used for experimental purposes for now and may change in the
+ future. */
+GRPCAPI grpc_call_credentials* grpc_external_account_credentials_create(
+ const char* json_string, const char* scopes_string);
+
/** Creates an Oauth2 Refresh Token credentials object for connecting to Google.
May return NULL if the input is invalid.
WARNING: Do NOT use this credentials to connect to a non-google service as
@@ -743,183 +751,186 @@ GRPCAPI grpc_server_credentials* grpc_local_server_credentials_create(
* experimental purpose for now and subject to change. */
typedef struct grpc_tls_error_details grpc_tls_error_details;
-/** Config for TLS key materials. It is used for
- * experimental purpose for now and subject to change. */
-typedef struct grpc_tls_key_materials_config grpc_tls_key_materials_config;
-
-/** Config for TLS credential reload. It is used for
- * experimental purpose for now and subject to change. */
-typedef struct grpc_tls_credential_reload_config
- grpc_tls_credential_reload_config;
-
/** Config for TLS server authorization check. It is used for
* experimental purpose for now and subject to change. */
typedef struct grpc_tls_server_authorization_check_config
grpc_tls_server_authorization_check_config;
-/** TLS credentials options. It is used for
- * experimental purpose for now and subject to change. */
+/**
+ * A struct that can be specified by callers to configure underlying TLS
+ * behaviors. It is used for experimental purpose for now and subject to change.
+ */
typedef struct grpc_tls_credentials_options grpc_tls_credentials_options;
-/** Create an empty TLS credentials options. It is used for
- * experimental purpose for now and subject to change. */
+/**
+ * A struct provides ways to gain credential data that will be used in the TLS
+ * handshake. It is used for experimental purpose for now and subject to change.
+ */
+typedef struct grpc_tls_certificate_provider grpc_tls_certificate_provider;
+
+/**
+ * A struct that stores the credential data presented to the peer in handshake
+ * to show local identity. It is used for experimental purpose for now and
+ * subject to change.
+ */
+typedef struct grpc_tls_identity_pairs grpc_tls_identity_pairs;
+
+/**
+ * Creates a grpc_tls_identity_pairs that stores a list of identity credential
+ * data, including identity private key and identity certificate chain. It is
+ * used for experimental purpose for now and subject to change.
+ */
+GRPCAPI grpc_tls_identity_pairs* grpc_tls_identity_pairs_create();
+
+/**
+ * Adds a identity private key and a identity certificate chain to
+ * grpc_tls_identity_pairs. This function will make an internal copy of
+ * |private_key| and |cert_chain|. It is used for experimental purpose for now
+ * and subject to change.
+ */
+GRPCAPI void grpc_tls_identity_pairs_add_pair(grpc_tls_identity_pairs* pairs,
+ const char* private_key,
+ const char* cert_chain);
+
+/**
+ * Destroys a grpc_tls_identity_pairs object. If this object is passed to a
+ * provider initiation function, the ownership is transferred so this function
+ * doesn't need to be called. Otherwise the creator of the
+ * grpc_tls_identity_pairs object is responsible for its destruction. It is
+ * used for experimental purpose for now and subject to change.
+ */
+GRPCAPI void grpc_tls_identity_pairs_destroy(grpc_tls_identity_pairs* pairs);
+
+/**
+ * Creates a grpc_tls_certificate_provider that will load credential data from
+ * static string during initialization. This provider will always return the
+ * same cert data for all cert names.
+ * root_certificate and pem_key_cert_pairs can be nullptr, indicating the
+ * corresponding credential data is not needed.
+ * This function will make a copy of |root_certificate|.
+ * The ownership of |pem_key_cert_pairs| is transferred.
+ * It is used for experimental purpose for now and subject to change.
+ */
+GRPCAPI grpc_tls_certificate_provider*
+grpc_tls_certificate_provider_static_data_create(
+ const char* root_certificate, grpc_tls_identity_pairs* pem_key_cert_pairs);
+
+/**
+ * Creates a grpc_tls_certificate_provider that will watch the credential
+ * changes on the file system. This provider will always return the up-to-date
+ * cert data for all the cert names callers set through
+ * |grpc_tls_credentials_options|. Note that this API only supports one key-cert
+ * file and hence one set of identity key-cert pair, so SNI(Server Name
+ * Indication) is not supported.
+ * - private_key_path is the file path of the private key. This must be set if
+ * |identity_certificate_path| is set. Otherwise, it could be null if no
+ * identity credentials are needed.
+ * - identity_certificate_path is the file path of the identity certificate
+ * chain. This must be set if |private_key_path| is set. Otherwise, it could
+ * be null if no identity credentials are needed.
+ * - root_cert_path is the file path to the root certificate bundle. This
+ * may be null if no root certs are needed.
+ * - refresh_interval_sec is the refreshing interval that we will check the
+ * files for updates.
+ * It does not take ownership of parameters.
+ * It is used for experimental purpose for now and subject to change.
+ */
+GRPCAPI grpc_tls_certificate_provider*
+grpc_tls_certificate_provider_file_watcher_create(
+ const char* private_key_path, const char* identity_certificate_path,
+ const char* root_cert_path, unsigned int refresh_interval_sec);
+
+/**
+ * Releases a grpc_tls_certificate_provider object. The creator of the
+ * grpc_tls_certificate_provider object is responsible for its release. It is
+ * used for experimental purpose for now and subject to change.
+ */
+GRPCAPI void grpc_tls_certificate_provider_release(
+ grpc_tls_certificate_provider* provider);
+
+/**
+ * Creates an grpc_tls_credentials_options.
+ * It is used for experimental purpose for now and subject to change.
+ */
GRPCAPI grpc_tls_credentials_options* grpc_tls_credentials_options_create(void);
-/** Set grpc_ssl_client_certificate_request_type field in credentials options
- with the provided type. options should not be NULL.
- It returns 1 on success and 0 on failure. It is used for
- experimental purpose for now and subject to change. */
-GRPCAPI int grpc_tls_credentials_options_set_cert_request_type(
+/**
+ * Sets the options of whether to request and verify client certs. This should
+ * be called only on the server side. It is used for experimental purpose for
+ * now and subject to change.
+ */
+GRPCAPI void grpc_tls_credentials_options_set_cert_request_type(
grpc_tls_credentials_options* options,
grpc_ssl_client_certificate_request_type type);
-/** Set grpc_tls_server_verification_option field in credentials options
- with the provided server_verification_option. options should not be NULL.
- This should be called only on the client side.
- If grpc_tls_server_verification_option is not
- GRPC_TLS_SERVER_VERIFICATION, use of a customer server
- authorization check (grpc_tls_server_authorization_check_config)
- will be mandatory.
- It returns 1 on success and 0 on failure. It is used for
- experimental purpose for now and subject to change. */
-GRPCAPI int grpc_tls_credentials_options_set_server_verification_option(
+/**
+ * Sets the options of whether to choose certain checks, e.g. certificate check,
+ * hostname check, etc. This should be called only on the client side. If
+ * |server_verification_option| is not GRPC_TLS_SERVER_VERIFICATION, use of a
+ * custom authorization check (grpc_tls_server_authorization_check_config) is
+ * mandatory. It is used for experimental purpose for now and subject to change.
+ */
+GRPCAPI void grpc_tls_credentials_options_set_server_verification_option(
grpc_tls_credentials_options* options,
grpc_tls_server_verification_option server_verification_option);
-/** Set grpc_tls_key_materials_config field in credentials options
- with the provided config struct whose ownership is transferred.
- Both parameters should not be NULL.
- It returns 1 on success and 0 on failure. It is used for
- experimental purpose for now and subject to change. */
-GRPCAPI int grpc_tls_credentials_options_set_key_materials_config(
- grpc_tls_credentials_options* options,
- grpc_tls_key_materials_config* config);
-
-/** Set grpc_tls_credential_reload_config field in credentials options
- with the provided config struct whose ownership is transferred.
- Both parameters should not be NULL.
- It returns 1 on success and 0 on failure. It is used for
- experimental purpose for now and subject to change. */
-GRPCAPI int grpc_tls_credentials_options_set_credential_reload_config(
- grpc_tls_credentials_options* options,
- grpc_tls_credential_reload_config* config);
-
-/** Set grpc_tls_server_authorization_check_config field in credentials options
- with the provided config struct whose ownership is transferred.
- Both parameters should not be NULL.
- It returns 1 on success and 0 on failure. It is used for
- experimental purpose for now and subject to change. */
-GRPCAPI int grpc_tls_credentials_options_set_server_authorization_check_config(
+/**
+ * Sets the credential provider in the options.
+ * The |options| will implicitly take a new ref to the |provider|.
+ * It is used for experimental purpose for now and subject to change.
+ */
+GRPCAPI void grpc_tls_credentials_options_set_certificate_provider(
grpc_tls_credentials_options* options,
- grpc_tls_server_authorization_check_config* config);
+ grpc_tls_certificate_provider* provider);
-/** --- TLS key materials config. ---
- It is used for experimental purpose for now and subject to change. */
+/**
+ * If set, gRPC stack will keep watching the root certificates with
+ * name |root_cert_name|.
+ * If this is not set on the client side, we will use the root certificates
+ * stored in the default system location, since client side must provide root
+ * certificates in TLS.
+ * If this is not set on the server side, we will not watch any root certificate
+ * updates, and assume no root certificates needed for the server(single-side
+ * TLS). Default root certs on the server side is not supported.
+ * It is used for experimental purpose for now and subject to change.
+ */
+GRPCAPI void grpc_tls_credentials_options_watch_root_certs(
+ grpc_tls_credentials_options* options);
-/** Create an empty grpc_tls_key_materials_config instance.
- * It is used for experimental purpose for now and subject to change. */
-GRPCAPI grpc_tls_key_materials_config* grpc_tls_key_materials_config_create(
- void);
-
-/** Set grpc_tls_key_materials_config instance with provided a TLS certificate.
- It's valid for the caller to provide nullptr pem_root_certs, in which case
- the gRPC-provided root cert will be used. pem_key_cert_pairs should not be
- NULL.
- The ownerships of |pem_root_certs| and |pem_key_cert_pairs| remain with the
- caller.
- It returns 1 on success and 0 on failure. It is used for experimental
- purpose for now and subject to change.
+/**
+ * Sets the name of the root certificates being watched.
+ * If not set, We will use a default empty string as the root certificate name.
+ * It is used for experimental purpose for now and subject to change.
*/
-GRPCAPI int grpc_tls_key_materials_config_set_key_materials(
- grpc_tls_key_materials_config* config, const char* pem_root_certs,
- const grpc_ssl_pem_key_cert_pair** pem_key_cert_pairs,
- size_t num_key_cert_pairs);
+GRPCAPI void grpc_tls_credentials_options_set_root_cert_name(
+ grpc_tls_credentials_options* options, const char* root_cert_name);
-/** Set grpc_tls_key_materials_config instance with a provided version number,
- which is used to keep track of the version of key materials.
- It returns 1 on success and 0 on failure. It is used for
- experimental purpose for now and subject to change.
+/**
+ * If set, gRPC stack will keep watching the identity key-cert pairs
+ * with name |identity_cert_name|.
+ * This is required on the server side, and optional on the client side.
+ * It is used for experimental purpose for now and subject to change.
*/
-GRPCAPI int grpc_tls_key_materials_config_set_version(
- grpc_tls_key_materials_config* config, int version);
+GRPCAPI void grpc_tls_credentials_options_watch_identity_key_cert_pairs(
+ grpc_tls_credentials_options* options);
-/** Get the version number of a grpc_tls_key_materials_config instance.
- It returns the version number on success and -1 on failure.
- It is used for experimental purpose for now and subject to change.
+/**
+ * Sets the name of the identity certificates being watched.
+ * If not set, We will use a default empty string as the identity certificate
+ * name. It is used for experimental purpose for now and subject to change.
*/
-GRPCAPI int grpc_tls_key_materials_config_get_version(
- grpc_tls_key_materials_config* config);
-
-/** --- TLS credential reload config. ---
- It is used for experimental purpose for now and subject to change.*/
-
-typedef struct grpc_tls_credential_reload_arg grpc_tls_credential_reload_arg;
-
-/** A callback function provided by gRPC to handle the result of credential
- reload. It is used when schedule API is implemented asynchronously and
- serves to bring the control back to grpc C core. It is used for
- experimental purpose for now and subject to change. */
-typedef void (*grpc_tls_on_credential_reload_done_cb)(
- grpc_tls_credential_reload_arg* arg);
-
-/** A struct containing all information necessary to schedule/cancel a
- credential reload request.
- - cb and cb_user_data represent a gRPC-provided
- callback and an argument passed to it.
- - key_materials_config is an in/output parameter containing currently
- used/newly reloaded credentials. If credential reload does not result in
- a new credential, key_materials_config should not be modified. The same
- key_materials_config object can be updated if new key materials is
- available.
- - status and error_details are used to hold information about
- errors occurred when a credential reload request is scheduled/cancelled.
- - config is a pointer to the unique grpc_tls_credential_reload_config
- instance that this argument corresponds to.
- - context is a pointer to a wrapped language implementation of this
- grpc_tls_credential_reload_arg instance.
- - destroy_context is a pointer to a caller-provided method that cleans
- up any data associated with the context pointer.
- It is used for experimental purposes for now and subject to change.
-*/
-struct grpc_tls_credential_reload_arg {
- grpc_tls_on_credential_reload_done_cb cb;
- void* cb_user_data;
- grpc_tls_key_materials_config* key_materials_config;
- grpc_ssl_certificate_config_reload_status status;
- grpc_tls_error_details* error_details;
- grpc_tls_credential_reload_config* config;
- void* context;
- void (*destroy_context)(void* ctx);
-};
+GRPCAPI void grpc_tls_credentials_options_set_identity_cert_name(
+ grpc_tls_credentials_options* options, const char* identity_cert_name);
-/** Create a grpc_tls_credential_reload_config instance.
- - config_user_data is config-specific, read-only user data
- that works for all channels created with a credential using the config.
- - schedule is a pointer to an application-provided callback used to invoke
- credential reload API. The implementation of this method has to be
- non-blocking, but can be performed synchronously or asynchronously.
- 1) If processing occurs synchronously, it populates
- arg->key_materials_config, arg->status, and arg->error_details
- and returns zero.
- 2) If processing occurs asynchronously, it returns a non-zero value.
- The application then invokes arg->cb when processing is completed. Note
- that arg->cb cannot be invoked before schedule API returns.
- - cancel is a pointer to an application-provided callback used to cancel
- a credential reload request scheduled via an asynchronous schedule API.
- arg is used to pinpoint an exact reloading request to be cancelled.
- The operation may not have any effect if the request has already been
- processed.
- - destruct is a pointer to an application-provided callback used to clean up
- any data associated with the config.
- It is used for experimental purpose for now and subject to change.
-*/
-GRPCAPI grpc_tls_credential_reload_config*
-grpc_tls_credential_reload_config_create(
- const void* config_user_data,
- int (*schedule)(void* config_user_data,
- grpc_tls_credential_reload_arg* arg),
- void (*cancel)(void* config_user_data, grpc_tls_credential_reload_arg* arg),
- void (*destruct)(void* config_user_data));
+/**
+ * Sets the configuration for a custom authorization check performed at the end
+ * of the handshake. The |options| will implicitly take a new ref to the
+ * |config|.
+ * It is used for experimental purpose for now and subject to change.
+ */
+GRPCAPI void grpc_tls_credentials_options_set_server_authorization_check_config(
+ grpc_tls_credentials_options* options,
+ grpc_tls_server_authorization_check_config* config);
/** --- TLS server authorization check config. ---
* It is used for experimental purpose for now and subject to change. */
@@ -944,6 +955,8 @@ typedef void (*grpc_tls_on_server_authorization_check_done_cb)(
- target_name is the name of an endpoint the channel is connecting to.
- peer_cert represents a complete certificate chain including both
signing and leaf certificates.
+ - \a subject_alternative_names is an array of size
+ \a subject_alternative_names_size consisting of pointers to strings.
- status and error_details contain information
about errors occurred when a server authorization check request is
scheduled/cancelled.
@@ -963,6 +976,8 @@ struct grpc_tls_server_authorization_check_arg {
const char* target_name;
const char* peer_cert;
const char* peer_cert_full_chain;
+ char** subject_alternative_names;
+ size_t subject_alternative_names_size;
grpc_status_code status;
grpc_tls_error_details* error_details;
grpc_tls_server_authorization_check_config* config;
@@ -1000,31 +1015,28 @@ grpc_tls_server_authorization_check_config_create(
void (*destruct)(void* config_user_data));
/**
- * This method creates a TLS channel credential object.
- * It takes ownership of the options parameter. The security level
- * of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY.
- *
- * - options: grpc TLS credentials options instance.
- *
- * It returns the created credential object.
- *
- * It is used for experimental purpose for now and subject
- * to change.
+ * Releases a grpc_tls_server_authorization_check_config object. The creator of
+ * the grpc_tls_server_authorization_check_config object is responsible for its
+ * release. It is used for experimental purpose for now and subject to change.
*/
+GRPCAPI void grpc_tls_server_authorization_check_config_release(
+ grpc_tls_server_authorization_check_config* config);
+/**
+ * Creates a TLS channel credential object based on the
+ * grpc_tls_credentials_options specified by callers. The
+ * grpc_channel_credentials will take the ownership of the |options|. The
+ * security level of the resulting connection is GRPC_PRIVACY_AND_INTEGRITY. It
+ * is used for experimental purpose for now and subject to change.
+ */
grpc_channel_credentials* grpc_tls_credentials_create(
grpc_tls_credentials_options* options);
/**
- * This method creates a TLS server credential object.
- * It takes ownership of the options parameter.
- *
- * - options: grpc TLS credentials options instance.
- *
- * It returns the created credential object.
- *
- * It is used for experimental purpose for now and subject
- * to change.
+ * Creates a TLS server credential object based on the
+ * grpc_tls_credentials_options specified by callers. The
+ * grpc_server_credentials will take the ownership of the |options|. It
+ * is used for experimental purpose for now and subject to change.
*/
grpc_server_credentials* grpc_tls_server_credentials_create(
grpc_tls_credentials_options* options);
@@ -1032,10 +1044,24 @@ grpc_server_credentials* grpc_tls_server_credentials_create(
/**
* EXPERIMENTAL API - Subject to change
*
- * This method creates an XDS channel credentials object.
+ * This method creates an insecure channel credentials object.
+ */
+grpc_channel_credentials* grpc_insecure_credentials_create();
+
+/**
+ * EXPERIMENTAL API - Subject to change
+ *
+ * This method creates an insecure server credentials object.
+ */
+grpc_server_credentials* grpc_insecure_server_credentials_create();
+
+/**
+ * EXPERIMENTAL API - Subject to change
+ *
+ * This method creates an xDS channel credentials object.
*
- * Creating a channel with credentials of this type indicates that an xDS
- * channel should get credentials configuration from the xDS control plane.
+ * Creating a channel with credentials of this type indicates that the channel
+ * should get credentials configuration from the xDS control plane.
*
* \a fallback_credentials are used if the channel target does not have the
* 'xds:///' scheme or if the xDS control plane does not provide information on
@@ -1045,6 +1071,20 @@ grpc_server_credentials* grpc_tls_server_credentials_create(
GRPCAPI grpc_channel_credentials* grpc_xds_credentials_create(
grpc_channel_credentials* fallback_credentials);
+/**
+ * EXPERIMENTAL API - Subject to change
+ *
+ * This method creates an xDS server credentials object.
+ *
+ * \a fallback_credentials are used if the xDS control plane does not provide
+ * information on how to fetch credentials dynamically.
+ *
+ * Does NOT take ownership of the \a fallback_credentials. (Internally takes
+ * a ref to the object.)
+ */
+GRPCAPI grpc_server_credentials* grpc_xds_server_credentials_create(
+ grpc_server_credentials* fallback_credentials);
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/libs/grpc/include/grpc/impl/codegen/atm_windows.h b/contrib/libs/grpc/include/grpc/impl/codegen/atm_windows.h
index c016b90095f..36c76ab6721 100644
--- a/contrib/libs/grpc/include/grpc/impl/codegen/atm_windows.h
+++ b/contrib/libs/grpc/include/grpc/impl/codegen/atm_windows.h
@@ -22,6 +22,8 @@
/** Win32 variant of atm_platform.h */
#include <grpc/impl/codegen/port_platform.h>
+#ifdef GPR_WINDOWS
+
typedef intptr_t gpr_atm;
#define GPR_ATM_MAX INTPTR_MAX
#define GPR_ATM_MIN INTPTR_MIN
@@ -125,4 +127,6 @@ static __inline gpr_atm gpr_atm_full_xchg(gpr_atm* p, gpr_atm n) {
return (gpr_atm)InterlockedExchangePointer((PVOID*)p, (PVOID)n);
}
+#endif /* GPR_WINDOWS */
+
#endif /* GRPC_IMPL_CODEGEN_ATM_WINDOWS_H */
diff --git a/contrib/libs/grpc/include/grpc/impl/codegen/byte_buffer.h b/contrib/libs/grpc/include/grpc/impl/codegen/byte_buffer.h
index 12479068155..04137292ff6 100644
--- a/contrib/libs/grpc/include/grpc/impl/codegen/byte_buffer.h
+++ b/contrib/libs/grpc/include/grpc/impl/codegen/byte_buffer.h
@@ -53,7 +53,7 @@ GRPCAPI grpc_byte_buffer* grpc_byte_buffer_copy(grpc_byte_buffer* bb);
GRPCAPI size_t grpc_byte_buffer_length(grpc_byte_buffer* bb);
/** Destroys \a byte_buffer deallocating all its memory. */
-GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer* byte_buffer);
+GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer* bb);
/** Reader for byte buffers. Iterates over slices in the byte buffer */
struct grpc_byte_buffer_reader;
diff --git a/contrib/libs/grpc/include/grpc/impl/codegen/grpc_types.h b/contrib/libs/grpc/include/grpc/impl/codegen/grpc_types.h
index 07066f0e1df..d67a9e97458 100644
--- a/contrib/libs/grpc/include/grpc/impl/codegen/grpc_types.h
+++ b/contrib/libs/grpc/include/grpc/impl/codegen/grpc_types.h
@@ -202,8 +202,15 @@ typedef struct {
#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
/** Should BDP probing be performed? */
#define GRPC_ARG_HTTP2_BDP_PROBE "grpc.http2.bdp_probe"
-/** Minimum time between sending successive ping frames without receiving any
- data/header frame, Int valued, milliseconds. */
+/** (DEPRECATED) Does not have any effect.
+ Earlier, this arg configured the minimum time between successive ping frames
+ without receiving any data/header frame, Int valued, milliseconds. This put
+ unnecessary constraints on the configuration of keepalive pings,
+ requiring users to set this channel arg along with
+ GRPC_ARG_KEEPALIVE_TIME_MS. This arg also limited the activity of the other
+ source of pings in gRPC Core - BDP pings, but BDP pings are only sent when
+ there is receive-side data activity, making this arg unuseful for BDP pings
+ too. */
#define GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS \
"grpc.http2.min_time_between_pings_ms"
/** Minimum allowed time between a server receiving successive ping frames
@@ -455,7 +462,7 @@ typedef enum grpc_call_error {
/** Default send/receive message size limits in bytes. -1 for unlimited. */
/** TODO(roth) Make this match the default receive limit after next release */
-#define GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH -1
+#define GRPC_DEFAULT_MAX_SEND_MESSAGE_LENGTH (-1)
#define GRPC_DEFAULT_MAX_RECV_MESSAGE_LENGTH (4 * 1024 * 1024)
/** Write Flags: */
diff --git a/contrib/libs/grpc/include/grpc/impl/codegen/log.h b/contrib/libs/grpc/include/grpc/impl/codegen/log.h
index ad7f0241582..9dd3a518347 100644
--- a/contrib/libs/grpc/include/grpc/impl/codegen/log.h
+++ b/contrib/libs/grpc/include/grpc/impl/codegen/log.h
@@ -46,8 +46,6 @@ typedef enum gpr_log_severity {
GPR_LOG_SEVERITY_ERROR
} gpr_log_severity;
-#define GPR_LOG_VERBOSITY_UNSET -1
-
/** Returns a string representation of the log severity */
GPRAPI const char* gpr_log_severity_string(gpr_log_severity severity);
diff --git a/contrib/libs/grpc/include/grpc/impl/codegen/port_platform.h b/contrib/libs/grpc/include/grpc/impl/codegen/port_platform.h
index 35419f017b5..ce8c896508b 100644
--- a/contrib/libs/grpc/include/grpc/impl/codegen/port_platform.h
+++ b/contrib/libs/grpc/include/grpc/impl/codegen/port_platform.h
@@ -100,16 +100,16 @@
#define GPR_WINDOWS_TMPFILE
#define GPR_WINDOWS_LOG
#define GPR_WINDOWS_CRASH_HANDLER 1
+#define GPR_WINDOWS_STAT
#define GPR_WINDOWS_STRING
#define GPR_WINDOWS_TIME
#endif
#ifdef __GNUC__
#define GPR_GCC_ATOMIC 1
-#define GPR_GCC_TLS 1
#else
#define GPR_WINDOWS_ATOMIC 1
-#define GPR_MSVC_TLS 1
#endif
+#define GPR_STDCPP_TLS 1
#elif defined(ANDROID) || defined(__ANDROID__)
#define GPR_PLATFORM_STRING "android"
#define GPR_ANDROID 1
@@ -124,9 +124,10 @@
#endif /* _LP64 */
#define GPR_CPU_POSIX 1
#define GPR_GCC_SYNC 1
-#define GPR_GCC_TLS 1
+#define GPR_STDCPP_TLS 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_ANDROID_LOG 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
@@ -149,12 +150,13 @@
#include <features.h>
#define GPR_CPU_LINUX 1
#define GPR_GCC_ATOMIC 1
-#define GPR_GCC_TLS 1
+#define GPR_STDCPP_TLS 1
#define GPR_LINUX 1
#define GPR_LINUX_LOG
#define GPR_SUPPORT_CHANNELS_FROM_FD 1
#define GPR_LINUX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -202,45 +204,28 @@
#if TARGET_OS_IPHONE
#define GPR_PLATFORM_STRING "ios"
#define GPR_CPU_IPHONE 1
-#define GPR_PTHREAD_TLS 1
#define GRPC_CFSTREAM 1
/* the c-ares resolver isn't safe to enable on iOS */
#define GRPC_ARES 0
#else /* TARGET_OS_IPHONE */
#define GPR_PLATFORM_STRING "osx"
-#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED
-#if __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7
-#define GPR_CPU_IPHONE 1
-#define GPR_PTHREAD_TLS 1
-#else /* __MAC_OS_X_VERSION_MIN_REQUIRED < __MAC_10_7 */
#define GPR_CPU_POSIX 1
-/* TODO(vjpai): there is a reported issue in bazel build for Mac where __thread
- in a header is currently not working (bazelbuild/bazel#4341). Remove
- the following conditional and use GPR_GCC_TLS when that is fixed */
-#ifndef GRPC_BAZEL_BUILD
-#define GPR_GCC_TLS 1
-#else /* GRPC_BAZEL_BUILD */
-#define GPR_PTHREAD_TLS 1
-#endif /* GRPC_BAZEL_BUILD */
-#define GPR_APPLE_PTHREAD_NAME 1
+#define GPR_POSIX_CRASH_HANDLER 1
#endif
-#else /* __MAC_OS_X_VERSION_MIN_REQUIRED */
-#define GPR_CPU_POSIX 1
-/* TODO(vjpai): Remove the following conditional and use only GPR_GCC_TLS
- when bazelbuild/bazel#4341 is fixed */
-#ifndef GRPC_BAZEL_BUILD
-#define GPR_GCC_TLS 1
-#else /* GRPC_BAZEL_BUILD */
-#define GPR_PTHREAD_TLS 1
-#endif /* GRPC_BAZEL_BUILD */
+#ifdef __has_feature
+#if __has_feature(cxx_thread_local)
+#define GPR_STDCPP_TLS 1
#endif
-#define GPR_POSIX_CRASH_HANDLER 1
+#endif
+#ifndef GPR_STDCPP_TLS
+#define GPR_PTHREAD_TLS 1
#endif
#define GPR_APPLE 1
#define GPR_GCC_ATOMIC 1
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -267,6 +252,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -291,6 +277,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -312,6 +299,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -335,6 +323,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -364,6 +353,7 @@
#define GPR_POSIX_LOG 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
@@ -376,6 +366,7 @@
#define GPR_ARCH_32 1
#endif /* _LP64 */
#elif defined(__Fuchsia__)
+#define GRPC_ARES 0
#define GPR_FUCHSIA 1
#define GPR_ARCH_64 1
#define GPR_PLATFORM_STRING "fuchsia"
@@ -390,12 +381,14 @@
#define GPR_POSIX_SYNC 1
#define GPR_POSIX_ENV 1
#define GPR_POSIX_TMPFILE 1
+#define GPR_POSIX_STAT 1
#define GPR_POSIX_SUBPROCESS 1
#define GPR_POSIX_SYNC 1
#define GPR_POSIX_STRING 1
#define GPR_POSIX_TIME 1
#define GPR_HAS_PTHREAD_H 1
#define GPR_GETPID_IN_UNISTD_H 1
+#define GRPC_ROOT_PEM_PATH "/config/ssl/cert.pem"
#else
#error "Could not auto-detect platform"
#endif
@@ -413,30 +406,6 @@
#endif
#endif
-/*
- * There are platforms for which TLS should not be used even though the
- * compiler makes it seem like it's supported (Android NDK < r12b for example).
- * This is primarily because of linker problems and toolchain misconfiguration:
- * TLS isn't supported until NDK r12b per
- * https://developer.android.com/ndk/downloads/revision_history.html
- * TLS also does not work with Android NDK if GCC is being used as the compiler
- * instead of Clang.
- * Since NDK r16, `__NDK_MAJOR__` and `__NDK_MINOR__` are defined in
- * <android/ndk-version.h>. For NDK < r16, users should define these macros,
- * e.g. `-D__NDK_MAJOR__=11 -D__NKD_MINOR__=0` for NDK r11. */
-#if defined(__ANDROID__) && defined(GPR_GCC_TLS)
-#if __has_include(<android/ndk-version.h>)
-#include <android/ndk-version.h>
-#endif /* __has_include(<android/ndk-version.h>) */
-#if (defined(__clang__) && defined(__NDK_MAJOR__) && defined(__NDK_MINOR__) && \
- ((__NDK_MAJOR__ < 12) || \
- ((__NDK_MAJOR__ == 12) && (__NDK_MINOR__ < 1)))) || \
- (defined(__GNUC__) && !defined(__clang__))
-#undef GPR_GCC_TLS
-#define GPR_PTHREAD_TLS 1
-#endif
-#endif /*defined(__ANDROID__) && defined(GPR_GCC_TLS) */
-
#if defined(__has_include)
#if __has_include(<atomic>)
#define GRPC_HAS_CXX11_ATOMIC
@@ -525,9 +494,9 @@ typedef unsigned __int64 uint64_t;
#endif
#if defined(GPR_MSVC_TLS) + defined(GPR_GCC_TLS) + defined(GPR_PTHREAD_TLS) + \
- defined(GPR_CUSTOM_TLS) != \
+ defined(GPR_STDCPP_TLS) + defined(GPR_CUSTOM_TLS) != \
1
-#error Must define exactly one of GPR_MSVC_TLS, GPR_GCC_TLS, GPR_PTHREAD_TLS, GPR_CUSTOM_TLS
+#error Must define exactly one of GPR_MSVC_TLS, GPR_GCC_TLS, GPR_PTHREAD_TLS, GPR_STDCPP_TLS, GPR_CUSTOM_TLS
#endif
/* maximum alignment needed for any type on this platform, rounded up to a
diff --git a/contrib/libs/grpc/include/grpc/impl/codegen/sync_windows.h b/contrib/libs/grpc/include/grpc/impl/codegen/sync_windows.h
index ba5d5aede0f..f2ff83b303d 100644
--- a/contrib/libs/grpc/include/grpc/impl/codegen/sync_windows.h
+++ b/contrib/libs/grpc/include/grpc/impl/codegen/sync_windows.h
@@ -21,6 +21,8 @@
#include <grpc/impl/codegen/port_platform.h>
+#ifdef GPR_WINDOWS
+
#include <grpc/impl/codegen/sync_generic.h>
typedef struct {
@@ -33,4 +35,6 @@ typedef CONDITION_VARIABLE gpr_cv;
typedef INIT_ONCE gpr_once;
#define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT
+#endif /* GPR_WINDOWS */
+
#endif /* GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H */
diff --git a/contrib/libs/grpc/include/grpc/slice_buffer.h b/contrib/libs/grpc/include/grpc/slice_buffer.h
index 3260019ca79..d8c6b918186 100644
--- a/contrib/libs/grpc/include/grpc/slice_buffer.h
+++ b/contrib/libs/grpc/include/grpc/slice_buffer.h
@@ -59,7 +59,7 @@ GPRAPI void grpc_slice_buffer_swap(grpc_slice_buffer* a, grpc_slice_buffer* b);
GPRAPI void grpc_slice_buffer_move_into(grpc_slice_buffer* src,
grpc_slice_buffer* dst);
/** remove n bytes from the end of a slice buffer */
-GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer* src, size_t n,
+GPRAPI void grpc_slice_buffer_trim_end(grpc_slice_buffer* sb, size_t n,
grpc_slice_buffer* garbage);
/** move the first n bytes of src into dst */
GPRAPI void grpc_slice_buffer_move_first(grpc_slice_buffer* src, size_t n,
@@ -72,9 +72,9 @@ GPRAPI void grpc_slice_buffer_move_first_no_ref(grpc_slice_buffer* src,
GPRAPI void grpc_slice_buffer_move_first_into_buffer(grpc_slice_buffer* src,
size_t n, void* dst);
/** take the first slice in the slice buffer */
-GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer* src);
+GPRAPI grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer* sb);
/** undo the above with (a possibly different) \a slice */
-GPRAPI void grpc_slice_buffer_undo_take_first(grpc_slice_buffer* src,
+GPRAPI void grpc_slice_buffer_undo_take_first(grpc_slice_buffer* sb,
grpc_slice slice);
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/include/grpc/support/sync.h b/contrib/libs/grpc/include/grpc/support/sync.h
index da820dece5e..f617322f00c 100644
--- a/contrib/libs/grpc/include/grpc/support/sync.h
+++ b/contrib/libs/grpc/include/grpc/support/sync.h
@@ -94,12 +94,12 @@ GPRAPI void gpr_cv_broadcast(gpr_cv* cv);
GPR_ONCE_INIT. e.g.,
static gpr_once once_var = GPR_ONCE_INIT; */
-/** Ensure that (*init_routine)() has been called exactly once (for the
+/** Ensure that (*init_function)() has been called exactly once (for the
specified gpr_once instance) and then return.
If multiple threads call gpr_once() on the same gpr_once instance, one of
- them will call (*init_routine)(), and the others will block until that call
+ them will call (*init_function)(), and the others will block until that call
finishes.*/
-GPRAPI void gpr_once_init(gpr_once* once, void (*init_routine)(void));
+GPRAPI void gpr_once_init(gpr_once* once, void (*init_function)(void));
/** --- One-time event notification ---
diff --git a/contrib/libs/grpc/include/grpc/support/time.h b/contrib/libs/grpc/include/grpc/support/time.h
index 550ffc2c209..44aead5eea3 100644
--- a/contrib/libs/grpc/include/grpc/support/time.h
+++ b/contrib/libs/grpc/include/grpc/support/time.h
@@ -51,7 +51,7 @@ GPRAPI gpr_timespec gpr_now(gpr_clock_type clock);
/** Convert a timespec from one clock to another */
GPRAPI gpr_timespec gpr_convert_clock_type(gpr_timespec t,
- gpr_clock_type target_clock);
+ gpr_clock_type clock_type);
/** Return -ve, 0, or +ve according to whether a < b, a == b, or a > b
respectively. */
@@ -66,12 +66,12 @@ GPRAPI gpr_timespec gpr_time_sub(gpr_timespec a, gpr_timespec b);
/** Return a timespec representing a given number of time units. INT64_MIN is
interpreted as gpr_inf_past, and INT64_MAX as gpr_inf_future. */
-GPRAPI gpr_timespec gpr_time_from_micros(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_nanos(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_millis(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_seconds(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_minutes(int64_t x, gpr_clock_type clock_type);
-GPRAPI gpr_timespec gpr_time_from_hours(int64_t x, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_nanos(int64_t ns, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_millis(int64_t ms, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_minutes(int64_t m, gpr_clock_type clock_type);
+GPRAPI gpr_timespec gpr_time_from_hours(int64_t h, gpr_clock_type clock_type);
GPRAPI int32_t gpr_time_to_millis(gpr_timespec timespec);
diff --git a/contrib/libs/grpc/include/grpcpp/alarm.h b/contrib/libs/grpc/include/grpcpp/alarm.h
index 96add23e324..6723e136c4f 100644
--- a/contrib/libs/grpc/include/grpcpp/alarm.h
+++ b/contrib/libs/grpc/include/grpcpp/alarm.h
@@ -38,7 +38,7 @@ class Alarm : private ::grpc::GrpcLibraryCodegen {
Alarm();
/// Destroy the given completion queue alarm, cancelling it in the process.
- ~Alarm();
+ ~Alarm() override;
/// DEPRECATED: Create and set a completion queue alarm instance associated to
/// \a cq.
@@ -56,6 +56,10 @@ class Alarm : private ::grpc::GrpcLibraryCodegen {
/// Once the alarm expires (at \a deadline) or it's cancelled (see \a Cancel),
/// an event with tag \a tag will be added to \a cq. If the alarm expired, the
/// event's success bit will be true, false otherwise (ie, upon cancellation).
+ //
+ // USAGE NOTE: This is frequently used to inject arbitrary tags into \a cq by
+ // setting an immediate deadline. Such usage allows synchronizing an external
+ // event with an application's \a grpc::CompletionQueue::Next loop.
template <typename T>
void Set(::grpc::CompletionQueue* cq, const T& deadline, void* tag) {
SetInternal(cq, ::grpc::TimePoint<T>(deadline).raw_time(), tag);
@@ -66,8 +70,8 @@ class Alarm : private ::grpc::GrpcLibraryCodegen {
Alarm& operator=(const Alarm&) = delete;
/// Alarms are movable.
- Alarm(Alarm&& rhs) : alarm_(rhs.alarm_) { rhs.alarm_ = nullptr; }
- Alarm& operator=(Alarm&& rhs) {
+ Alarm(Alarm&& rhs) noexcept : alarm_(rhs.alarm_) { rhs.alarm_ = nullptr; }
+ Alarm& operator=(Alarm&& rhs) noexcept {
alarm_ = rhs.alarm_;
rhs.alarm_ = nullptr;
return *this;
diff --git a/contrib/libs/grpc/include/grpcpp/channel.h b/contrib/libs/grpc/include/grpcpp/channel.h
index 6a31ff7aa9c..6383698a31d 100644
--- a/contrib/libs/grpc/include/grpcpp/channel.h
+++ b/contrib/libs/grpc/include/grpcpp/channel.h
@@ -56,7 +56,7 @@ class Channel final : public ::grpc::ChannelInterface,
public std::enable_shared_from_this<Channel>,
private ::grpc::GrpcLibraryCodegen {
public:
- ~Channel();
+ ~Channel() override;
/// Get the current channel state. If the channel is in IDLE and
/// \a try_to_connect is set to true, try to connect.
diff --git a/contrib/libs/grpc/include/grpcpp/create_channel_posix.h b/contrib/libs/grpc/include/grpcpp/create_channel_posix.h
index c6755b0aa62..899d8e66587 100644
--- a/contrib/libs/grpc/include/grpcpp/create_channel_posix.h
+++ b/contrib/libs/grpc/include/grpcpp/create_channel_posix.h
@@ -57,8 +57,8 @@ namespace experimental {
std::shared_ptr<grpc::Channel>
CreateCustomInsecureChannelWithInterceptorsFromFd(
const TString& target, int fd, const grpc::ChannelArguments& args,
- std::unique_ptr<std::vector<
- std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>>
+ std::vector<
+ std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
} // namespace experimental
diff --git a/contrib/libs/grpc/include/grpcpp/ext/admin_services.h b/contrib/libs/grpc/include/grpcpp/ext/admin_services.h
new file mode 100644
index 00000000000..898a87e5f0a
--- /dev/null
+++ b/contrib/libs/grpc/include/grpcpp/ext/admin_services.h
@@ -0,0 +1,33 @@
+//
+//
+// Copyright 2021 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 GRPCPP_EXT_ADMIN_SERVICES_H
+#define GRPCPP_EXT_ADMIN_SERVICES_H
+
+#include <grpcpp/server_builder.h>
+
+namespace grpc {
+
+// Registers admin services to the given ServerBuilder. This function will add
+// admin services based on build time dependencies, for example, it only adds
+// CSDS service if xDS is enabled in this binary.
+void AddAdminServices(grpc::ServerBuilder* builder);
+
+} // namespace grpc
+
+#endif // GRPCPP_EXT_ADMIN_SERVICES_H
diff --git a/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin.h b/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin.h
index 95cb93e3216..af3192d4513 100644
--- a/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin.h
+++ b/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin.h
@@ -19,15 +19,20 @@
#ifndef GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_H
#define GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_H
-#include <grpcpp/ext/channelz_service_plugin_impl.h>
+#include <grpc/support/port_platform.h>
+
+#include <grpcpp/impl/server_builder_plugin.h>
+#include <grpcpp/impl/server_initializer.h>
+#include <grpcpp/support/config.h>
namespace grpc {
namespace channelz {
namespace experimental {
-static inline void InitChannelzService() {
- ::grpc_impl::channelz::experimental::InitChannelzService();
-}
+/// Add channelz server plugin to \a ServerBuilder. This function should
+/// be called at static initialization time. This service is experimental
+/// for now. Track progress in https://github.com/grpc/grpc/issues/15988.
+void InitChannelzService();
} // namespace experimental
} // namespace channelz
diff --git a/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin_impl.h b/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin_impl.h
deleted file mode 100644
index 3a5f3c4b99e..00000000000
--- a/contrib/libs/grpc/include/grpcpp/ext/channelz_service_plugin_impl.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- *
- * Copyright 2018 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 GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_IMPL_H
-#define GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_IMPL_H
-
-#include <grpc/support/port_platform.h>
-
-#include <grpcpp/impl/server_builder_plugin.h>
-#include <grpcpp/impl/server_initializer.h>
-#include <grpcpp/support/config.h>
-
-namespace grpc_impl {
-namespace channelz {
-namespace experimental {
-
-/// Add channelz server plugin to \a ServerBuilder. This function should
-/// be called at static initialization time. This service is experimental
-/// for now. Track progress in https://github.com/grpc/grpc/issues/15988.
-void InitChannelzService();
-
-} // namespace experimental
-} // namespace channelz
-} // namespace grpc_impl
-
-#endif // GRPCPP_EXT_CHANNELZ_SERVICE_PLUGIN_IMPL_H
diff --git a/contrib/libs/grpc/include/grpcpp/generic/generic_stub.h b/contrib/libs/grpc/include/grpcpp/generic/generic_stub.h
index 102d2591c92..6789cefb9cd 100644
--- a/contrib/libs/grpc/include/grpcpp/generic/generic_stub.h
+++ b/contrib/libs/grpc/include/grpcpp/generic/generic_stub.h
@@ -64,11 +64,11 @@ class TemplatedGenericStub final {
ClientContext* context, const TString& method,
const RequestType& request, ::grpc::CompletionQueue* cq) {
return std::unique_ptr<ClientAsyncResponseReader<ResponseType>>(
- internal::ClientAsyncResponseReaderFactory<ResponseType>::Create(
+ internal::ClientAsyncResponseReaderHelper::Create<ResponseType>(
channel_.get(), cq,
grpc::internal::RpcMethod(method.c_str(),
grpc::internal::RpcMethod::NORMAL_RPC),
- context, request, false));
+ context, request));
}
/// DEPRECATED for multi-threaded use
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/async_unary_call.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/async_unary_call.h
index 3deeda8c7fc..7cb7cc6f16e 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/async_unary_call.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/async_unary_call.h
@@ -20,6 +20,8 @@
#define GRPCPP_IMPL_CODEGEN_ASYNC_UNARY_CALL_H
#include <grpcpp/impl/codegen/call.h>
+#include <grpcpp/impl/codegen/call_op_set.h>
+#include <grpcpp/impl/codegen/call_op_set_interface.h>
#include <grpcpp/impl/codegen/channel_interface.h>
#include <grpcpp/impl/codegen/client_context.h>
#include <grpcpp/impl/codegen/server_context.h>
@@ -28,6 +30,10 @@
namespace grpc {
+// Forward declaration for use in Helper class
+template <class R>
+class ClientAsyncResponseReader;
+
/// An interface relevant for async client side unary RPCs (which send
/// one request message to a server and receive one response message).
template <class R>
@@ -66,8 +72,8 @@ class ClientAsyncResponseReaderInterface {
};
namespace internal {
-template <class R>
-class ClientAsyncResponseReaderFactory {
+
+class ClientAsyncResponseReaderHelper {
public:
/// Start a call and write the request out if \a start is set.
/// \a tag will be notified on \a cq when the call has been started (i.e.
@@ -75,17 +81,136 @@ class ClientAsyncResponseReaderFactory {
/// If \a start is not set, the actual call must be initiated by StartCall
/// Note that \a context will be used to fill in custom initial metadata
/// used to send to the server when starting the call.
+ ///
+ /// Optionally pass in a base class for request and response types so that the
+ /// internal functions and structs can be templated based on that, allowing
+ /// reuse across RPCs (e.g., MessageLite for protobuf). Since constructors
+ /// can't have an explicit template parameter, the last argument is an
+ /// extraneous parameter just to provide the needed type information.
+ template <class R, class W, class BaseR = R, class BaseW = W>
+ static ClientAsyncResponseReader<R>* Create(
+ ::grpc::ChannelInterface* channel, ::grpc::CompletionQueue* cq,
+ const ::grpc::internal::RpcMethod& method, ::grpc::ClientContext* context,
+ const W& request) /* __attribute__((noinline)) */ {
+ ::grpc::internal::Call call = channel->CreateCall(method, context, cq);
+ ClientAsyncResponseReader<R>* result =
+ new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
+ call.call(), sizeof(ClientAsyncResponseReader<R>)))
+ ClientAsyncResponseReader<R>(call, context);
+ SetupRequest<BaseR, BaseW>(
+ call.call(), &result->single_buf_, &result->read_initial_metadata_,
+ &result->finish_, static_cast<const BaseW&>(request));
+
+ return result;
+ }
+
+ // Various helper functions to reduce templating use
+
+ template <class R, class W>
+ static void SetupRequest(
+ grpc_call* call,
+ ::grpc::internal::CallOpSendInitialMetadata** single_buf_ptr,
+ std::function<void(ClientContext*, internal::Call*,
+ internal::CallOpSendInitialMetadata*, void*)>*
+ read_initial_metadata,
+ std::function<
+ void(ClientContext*, internal::Call*, bool initial_metadata_read,
+ internal::CallOpSendInitialMetadata*,
+ internal::CallOpSetInterface**, void*, Status*, void*)>* finish,
+ const W& request) {
+ using SingleBufType =
+ ::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
+ ::grpc::internal::CallOpSendMessage,
+ ::grpc::internal::CallOpClientSendClose,
+ ::grpc::internal::CallOpRecvInitialMetadata,
+ ::grpc::internal::CallOpRecvMessage<R>,
+ ::grpc::internal::CallOpClientRecvStatus>;
+ SingleBufType* single_buf =
+ new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
+ call, sizeof(SingleBufType))) SingleBufType;
+ *single_buf_ptr = single_buf;
+ // TODO(ctiller): don't assert
+ GPR_CODEGEN_ASSERT(single_buf->SendMessage(request).ok());
+ single_buf->ClientSendClose();
+
+ // The purpose of the following functions is to type-erase the actual
+ // templated type of the CallOpSet being used by hiding that type inside the
+ // function definition rather than specifying it as an argument of the
+ // function or a member of the class. The type-erased CallOpSet will get
+ // static_cast'ed back to the real type so that it can be used properly.
+ *read_initial_metadata =
+ [](ClientContext* context, internal::Call* call,
+ internal::CallOpSendInitialMetadata* single_buf_view, void* tag) {
+ auto* single_buf = static_cast<SingleBufType*>(single_buf_view);
+ single_buf->set_output_tag(tag);
+ single_buf->RecvInitialMetadata(context);
+ call->PerformOps(single_buf);
+ };
+
+ // Note that this function goes one step further than the previous one
+ // because it type-erases the message being written down to a void*. This
+ // will be static-cast'ed back to the class specified here by hiding that
+ // class information inside the function definition. Note that this feature
+ // expects the class being specified here for R to be a base-class of the
+ // "real" R without any multiple-inheritance (as applies in protbuf wrt
+ // MessageLite)
+ *finish = [](ClientContext* context, internal::Call* call,
+ bool initial_metadata_read,
+ internal::CallOpSendInitialMetadata* single_buf_view,
+ internal::CallOpSetInterface** finish_buf_ptr, void* msg,
+ Status* status, void* tag) {
+ if (initial_metadata_read) {
+ using FinishBufType = ::grpc::internal::CallOpSet<
+ ::grpc::internal::CallOpRecvMessage<R>,
+ ::grpc::internal::CallOpClientRecvStatus>;
+ FinishBufType* finish_buf =
+ new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
+ call->call(), sizeof(FinishBufType))) FinishBufType;
+ *finish_buf_ptr = finish_buf;
+ finish_buf->set_output_tag(tag);
+ finish_buf->RecvMessage(static_cast<R*>(msg));
+ finish_buf->AllowNoMessage();
+ finish_buf->ClientRecvStatus(context, status);
+ call->PerformOps(finish_buf);
+ } else {
+ auto* single_buf = static_cast<SingleBufType*>(single_buf_view);
+ single_buf->set_output_tag(tag);
+ single_buf->RecvInitialMetadata(context);
+ single_buf->RecvMessage(static_cast<R*>(msg));
+ single_buf->AllowNoMessage();
+ single_buf->ClientRecvStatus(context, status);
+ call->PerformOps(single_buf);
+ }
+ };
+ }
+
+ static void StartCall(
+ ::grpc::ClientContext* context,
+ ::grpc::internal::CallOpSendInitialMetadata* single_buf) {
+ single_buf->SendInitialMetadata(&context->send_initial_metadata_,
+ context->initial_metadata_flags());
+ }
+};
+
+// TODO(vjpai): This templated factory is deprecated and will be replaced by
+//. the non-templated helper as soon as possible.
+template <class R>
+class ClientAsyncResponseReaderFactory {
+ public:
template <class W>
static ClientAsyncResponseReader<R>* Create(
::grpc::ChannelInterface* channel, ::grpc::CompletionQueue* cq,
const ::grpc::internal::RpcMethod& method, ::grpc::ClientContext* context,
const W& request, bool start) {
- ::grpc::internal::Call call = channel->CreateCall(method, context, cq);
- return new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
- call.call(), sizeof(ClientAsyncResponseReader<R>)))
- ClientAsyncResponseReader<R>(call, context, request, start);
+ auto* result = ClientAsyncResponseReaderHelper::Create<R>(
+ channel, cq, method, context, request);
+ if (start) {
+ result->StartCall();
+ }
+ return result;
}
};
+
} // namespace internal
/// Async API for client-side unary RPCs, where the message response
@@ -107,9 +232,9 @@ class ClientAsyncResponseReader final
static void operator delete(void*, void*) { GPR_CODEGEN_ASSERT(false); }
void StartCall() override {
- GPR_CODEGEN_ASSERT(!started_);
+ GPR_CODEGEN_DEBUG_ASSERT(!started_);
started_ = true;
- StartCallInternal();
+ internal::ClientAsyncResponseReaderHelper::StartCall(context_, single_buf_);
}
/// See \a ClientAsyncResponseReaderInterface::ReadInitialMetadata for
@@ -119,76 +244,48 @@ class ClientAsyncResponseReader final
/// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata sent from the server.
void ReadInitialMetadata(void* tag) override {
- GPR_CODEGEN_ASSERT(started_);
- GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_);
-
- single_buf.set_output_tag(tag);
- single_buf.RecvInitialMetadata(context_);
- call_.PerformOps(&single_buf);
+ GPR_CODEGEN_DEBUG_ASSERT(started_);
+ GPR_CODEGEN_DEBUG_ASSERT(!context_->initial_metadata_received_);
+ read_initial_metadata_(context_, &call_, single_buf_, tag);
initial_metadata_read_ = true;
}
- /// See \a ClientAysncResponseReaderInterface::Finish for semantics.
+ /// See \a ClientAsyncResponseReaderInterface::Finish for semantics.
///
/// Side effect:
/// - the \a ClientContext associated with this call is updated with
/// possible initial and trailing metadata sent from the server.
void Finish(R* msg, ::grpc::Status* status, void* tag) override {
- GPR_CODEGEN_ASSERT(started_);
- if (initial_metadata_read_) {
- finish_buf.set_output_tag(tag);
- finish_buf.RecvMessage(msg);
- finish_buf.AllowNoMessage();
- finish_buf.ClientRecvStatus(context_, status);
- call_.PerformOps(&finish_buf);
- } else {
- single_buf.set_output_tag(tag);
- single_buf.RecvInitialMetadata(context_);
- single_buf.RecvMessage(msg);
- single_buf.AllowNoMessage();
- single_buf.ClientRecvStatus(context_, status);
- call_.PerformOps(&single_buf);
- }
+ GPR_CODEGEN_DEBUG_ASSERT(started_);
+ finish_(context_, &call_, initial_metadata_read_, single_buf_, &finish_buf_,
+ static_cast<void*>(msg), status, tag);
}
private:
- friend class internal::ClientAsyncResponseReaderFactory<R>;
+ friend class internal::ClientAsyncResponseReaderHelper;
::grpc::ClientContext* const context_;
::grpc::internal::Call call_;
- bool started_;
+ bool started_ = false;
bool initial_metadata_read_ = false;
- template <class W>
ClientAsyncResponseReader(::grpc::internal::Call call,
- ::grpc::ClientContext* context, const W& request,
- bool start)
- : context_(context), call_(call), started_(start) {
- // Bind the metadata at time of StartCallInternal but set up the rest here
- // TODO(ctiller): don't assert
- GPR_CODEGEN_ASSERT(single_buf.SendMessage(request).ok());
- single_buf.ClientSendClose();
- if (start) StartCallInternal();
- }
-
- void StartCallInternal() {
- single_buf.SendInitialMetadata(&context_->send_initial_metadata_,
- context_->initial_metadata_flags());
- }
+ ::grpc::ClientContext* context)
+ : context_(context), call_(call) {}
// disable operator new
static void* operator new(std::size_t size);
static void* operator new(std::size_t /*size*/, void* p) { return p; }
- ::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
- ::grpc::internal::CallOpSendMessage,
- ::grpc::internal::CallOpClientSendClose,
- ::grpc::internal::CallOpRecvInitialMetadata,
- ::grpc::internal::CallOpRecvMessage<R>,
- ::grpc::internal::CallOpClientRecvStatus>
- single_buf;
- ::grpc::internal::CallOpSet<::grpc::internal::CallOpRecvMessage<R>,
- ::grpc::internal::CallOpClientRecvStatus>
- finish_buf;
+ internal::CallOpSendInitialMetadata* single_buf_;
+ internal::CallOpSetInterface* finish_buf_ = nullptr;
+ std::function<void(ClientContext*, internal::Call*,
+ internal::CallOpSendInitialMetadata*, void*)>
+ read_initial_metadata_;
+ std::function<void(ClientContext*, internal::Call*,
+ bool initial_metadata_read,
+ internal::CallOpSendInitialMetadata*,
+ internal::CallOpSetInterface**, void*, Status*, void*)>
+ finish_;
};
/// Async server-side API for handling unary calls, where the single
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/byte_buffer.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/byte_buffer.h
index 6e64ec9981e..2c015f2266f 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/byte_buffer.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/byte_buffer.h
@@ -40,8 +40,8 @@ template <class RequestType, class ResponseType>
class CallbackUnaryHandler;
template <class RequestType, class ResponseType>
class CallbackServerStreamingHandler;
-template <class ServiceType, class RequestType, class ResponseType>
-class RpcMethodHandler;
+template <class RequestType>
+void* UnaryDeserializeHelper(grpc_byte_buffer*, ::grpc::Status*, RequestType*);
template <class ServiceType, class RequestType, class ResponseType>
class ServerStreamingHandler;
template <::grpc::StatusCode code>
@@ -162,8 +162,9 @@ class ByteBuffer final {
template <class R>
friend class internal::CallOpRecvMessage;
friend class internal::CallOpGenericRecvMessage;
- template <class ServiceType, class RequestType, class ResponseType>
- friend class internal::RpcMethodHandler;
+ template <class RequestType>
+ friend void* internal::UnaryDeserializeHelper(grpc_byte_buffer*,
+ ::grpc::Status*, RequestType*);
template <class ServiceType, class RequestType, class ResponseType>
friend class internal::ServerStreamingHandler;
template <class RequestType, class ResponseType>
@@ -194,10 +195,14 @@ class ByteBuffer final {
class ByteBufferPointer {
public:
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
ByteBufferPointer(const ByteBuffer* b)
: bbuf_(const_cast<ByteBuffer*>(b)) {}
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
operator ByteBuffer*() { return bbuf_; }
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
operator grpc_byte_buffer*() { return bbuf_->buffer_; }
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
operator grpc_byte_buffer**() { return &bbuf_->buffer_; }
private:
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/call_op_set.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/call_op_set.h
index 379333164a6..6df16a1125c 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/call_op_set.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/call_op_set.h
@@ -62,7 +62,7 @@ inline grpc_metadata* FillMetadataArray(
return nullptr;
}
grpc_metadata* metadata_array =
- (grpc_metadata*)(g_core_codegen_interface->gpr_malloc(
+ static_cast<grpc_metadata*>(g_core_codegen_interface->gpr_malloc(
(*metadata_count) * sizeof(grpc_metadata)));
size_t i = 0;
for (auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) {
@@ -83,11 +83,6 @@ inline grpc_metadata* FillMetadataArray(
class WriteOptions {
public:
WriteOptions() : flags_(0), last_message_(false) {}
- WriteOptions(const WriteOptions& other)
- : flags_(other.flags_), last_message_(other.last_message_) {}
-
- /// Default assignment operator
- WriteOptions& operator=(const WriteOptions& other) = default;
/// Clear all flags.
inline void Clear() { flags_ = 0; }
@@ -243,7 +238,7 @@ class CallOpSendInitialMetadata {
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_SEND_INITIAL_METADATA;
op->flags = flags_;
- op->reserved = NULL;
+ op->reserved = nullptr;
initial_metadata_ =
FillMetadataArray(*metadata_map_, &initial_metadata_count_, "");
op->data.send_initial_metadata.count = initial_metadata_count_;
@@ -327,13 +322,14 @@ class CallOpSendMessage {
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_SEND_MESSAGE;
op->flags = write_options_.flags();
- op->reserved = NULL;
+ op->reserved = nullptr;
op->data.send_message.send_message = send_buf_.c_buffer();
// Flags are per-message: clear them after use.
write_options_.Clear();
}
void FinishOp(bool* status) {
if (msg_ == nullptr && !send_buf_.Valid()) return;
+ send_buf_.Clear();
if (hijacked_ && failed_send_) {
// Hijacking interceptor failed this Op
*status = false;
@@ -382,9 +378,33 @@ class CallOpSendMessage {
template <class M>
Status CallOpSendMessage::SendMessage(const M& message, WriteOptions options) {
write_options_ = options;
+ // Serialize immediately since we do not have access to the message pointer
+ bool own_buf;
+ // TODO(vjpai): Remove the void below when possible
+ // The void in the template parameter below should not be needed
+ // (since it should be implicit) but is needed due to an observed
+ // difference in behavior between clang and gcc for certain internal users
+ Status result = SerializationTraits<M, void>::Serialize(
+ message, send_buf_.bbuf_ptr(), &own_buf);
+ if (!own_buf) {
+ send_buf_.Duplicate();
+ }
+ return result;
+}
+
+template <class M>
+Status CallOpSendMessage::SendMessage(const M& message) {
+ return SendMessage(message, WriteOptions());
+}
+
+template <class M>
+Status CallOpSendMessage::SendMessagePtr(const M* message,
+ WriteOptions options) {
+ msg_ = message;
+ write_options_ = options;
+ // Store the serializer for later since we have access to the message
serializer_ = [this](const void* message) {
bool own_buf;
- send_buf_.Clear();
// TODO(vjpai): Remove the void below when possible
// The void in the template parameter below should not be needed
// (since it should be implicit) but is needed due to an observed
@@ -396,31 +416,12 @@ Status CallOpSendMessage::SendMessage(const M& message, WriteOptions options) {
}
return result;
};
- // Serialize immediately only if we do not have access to the message pointer
- if (msg_ == nullptr) {
- Status result = serializer_(&message);
- serializer_ = nullptr;
- return result;
- }
return Status();
}
template <class M>
-Status CallOpSendMessage::SendMessage(const M& message) {
- return SendMessage(message, WriteOptions());
-}
-
-template <class M>
-Status CallOpSendMessage::SendMessagePtr(const M* message,
- WriteOptions options) {
- msg_ = message;
- return SendMessage(*message, options);
-}
-
-template <class M>
Status CallOpSendMessage::SendMessagePtr(const M* message) {
- msg_ = message;
- return SendMessage(*message, WriteOptions());
+ return SendMessagePtr(message, WriteOptions());
}
template <class R>
@@ -439,7 +440,7 @@ class CallOpRecvMessage {
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_RECV_MESSAGE;
op->flags = 0;
- op->reserved = NULL;
+ op->reserved = nullptr;
op->data.recv_message.recv_message = recv_buf_.c_buffer_ptr();
}
@@ -515,7 +516,7 @@ class DeserializeFunc {
template <class R>
class DeserializeFuncType final : public DeserializeFunc {
public:
- DeserializeFuncType(R* message) : message_(message) {}
+ explicit DeserializeFuncType(R* message) : message_(message) {}
Status Deserialize(ByteBuffer* buf) override {
return SerializationTraits<R>::Deserialize(buf->bbuf_ptr(), message_);
}
@@ -548,7 +549,7 @@ class CallOpGenericRecvMessage {
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_RECV_MESSAGE;
op->flags = 0;
- op->reserved = NULL;
+ op->reserved = nullptr;
op->data.recv_message.recv_message = recv_buf_.c_buffer_ptr();
}
@@ -631,7 +632,7 @@ class CallOpClientSendClose {
grpc_op* op = &ops[(*nops)++];
op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT;
op->flags = 0;
- op->reserved = NULL;
+ op->reserved = nullptr;
}
void FinishOp(bool* /*status*/) { send_ = false; }
@@ -683,7 +684,7 @@ class CallOpServerSendStatus {
op->data.send_status_from_server.status_details =
send_error_message_.empty() ? nullptr : &error_message_slice_;
op->flags = 0;
- op->reserved = NULL;
+ op->reserved = nullptr;
}
void FinishOp(bool* /*status*/) {
@@ -737,7 +738,7 @@ class CallOpRecvInitialMetadata {
op->op = GRPC_OP_RECV_INITIAL_METADATA;
op->data.recv_initial_metadata.recv_initial_metadata = metadata_map_->arr();
op->flags = 0;
- op->reserved = NULL;
+ op->reserved = nullptr;
}
void FinishOp(bool* /*status*/) {
@@ -791,7 +792,7 @@ class CallOpClientRecvStatus {
op->data.recv_status_on_client.status_details = &error_message_;
op->data.recv_status_on_client.error_string = &debug_error_string_;
op->flags = 0;
- op->reserved = NULL;
+ op->reserved = nullptr;
}
void FinishOp(bool* /*status*/) {
@@ -809,7 +810,8 @@ class CallOpClientRecvStatus {
metadata_map_->GetBinaryErrorDetails());
if (debug_error_string_ != nullptr) {
client_context_->set_debug_error_string(debug_error_string_);
- g_core_codegen_interface->gpr_free((void*)debug_error_string_);
+ g_core_codegen_interface->gpr_free(
+ const_cast<char*>(debug_error_string_));
}
}
// TODO(soheil): Find callers that set debug string even for status OK,
@@ -880,6 +882,9 @@ class CallOpSet : public CallOpSetInterface,
interceptor_methods_(InterceptorBatchMethodsImpl()) {}
CallOpSet& operator=(const CallOpSet& other) {
+ if (&other == this) {
+ return *this;
+ }
core_cq_tag_ = this;
return_tag_ = this;
call_ = other.call_;
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/callback_common.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/callback_common.h
index 3c3bfd7e762..612b820066b 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/callback_common.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/callback_common.h
@@ -28,6 +28,7 @@
#include <grpc/impl/codegen/grpc_types.h>
#include <grpcpp/impl/codegen/call.h>
#include <grpcpp/impl/codegen/channel_interface.h>
+#include <grpcpp/impl/codegen/completion_queue_tag.h>
#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/status.h>
@@ -193,6 +194,7 @@ class CallbackWithSuccessTag
void force_run(bool ok) { Run(ok); }
/// check if this tag is currently set
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
operator bool() const { return call_ != nullptr; }
private:
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/channel_interface.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/channel_interface.h
index ea0752d90ee..7f03fb0345b 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/channel_interface.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/channel_interface.h
@@ -44,8 +44,7 @@ template <class W>
class ClientAsyncWriterFactory;
template <class W, class R>
class ClientAsyncReaderWriterFactory;
-template <class R>
-class ClientAsyncResponseReaderFactory;
+class ClientAsyncResponseReaderHelper;
template <class W, class R>
class ClientCallbackReaderWriterFactory;
template <class R>
@@ -120,8 +119,7 @@ class ChannelInterface {
friend class ::grpc::internal::ClientAsyncWriterFactory;
template <class W, class R>
friend class ::grpc::internal::ClientAsyncReaderWriterFactory;
- template <class R>
- friend class ::grpc::internal::ClientAsyncResponseReaderFactory;
+ friend class ::grpc::internal::ClientAsyncResponseReaderHelper;
template <class W, class R>
friend class ::grpc::internal::ClientCallbackReaderWriterFactory;
template <class R>
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/client_callback.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/client_callback.h
index 90c817ceaa7..a73d525003e 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/client_callback.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/client_callback.h
@@ -27,6 +27,7 @@
#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/status.h>
+#include <grpcpp/impl/codegen/sync.h>
namespace grpc {
class Channel;
@@ -35,15 +36,25 @@ class ClientContext;
namespace internal {
class RpcMethod;
-/// Perform a callback-based unary call
+/// Perform a callback-based unary call. May optionally specify the base
+/// class of the Request and Response so that the internal calls and structures
+/// below this may be based on those base classes and thus achieve code reuse
+/// across different RPCs (e.g., for protobuf, MessageLite would be a base
+/// class).
/// TODO(vjpai): Combine as much as possible with the blocking unary call code
-template <class InputMessage, class OutputMessage>
+template <class InputMessage, class OutputMessage,
+ class BaseInputMessage = InputMessage,
+ class BaseOutputMessage = OutputMessage>
void CallbackUnaryCall(::grpc::ChannelInterface* channel,
const ::grpc::internal::RpcMethod& method,
::grpc::ClientContext* context,
const InputMessage* request, OutputMessage* result,
std::function<void(::grpc::Status)> on_completion) {
- CallbackUnaryCallImpl<InputMessage, OutputMessage> x(
+ static_assert(std::is_base_of<BaseInputMessage, InputMessage>::value,
+ "Invalid input message specification");
+ static_assert(std::is_base_of<BaseOutputMessage, OutputMessage>::value,
+ "Invalid output message specification");
+ CallbackUnaryCallImpl<BaseInputMessage, BaseOutputMessage> x(
channel, method, context, request, result, on_completion);
}
@@ -100,6 +111,8 @@ class CallbackUnaryCallImpl {
// Base class for public API classes.
class ClientReactor {
public:
+ virtual ~ClientReactor() = default;
+
/// Called by the library when all operations associated with this RPC have
/// completed and all Holds have been removed. OnDone provides the RPC status
/// outcome for both successful and failed RPCs. If it is never called on an
@@ -201,16 +214,19 @@ class ClientCallbackUnary {
// activated by calling StartCall, possibly after initiating StartRead,
// StartWrite, or AddHold operations on the streaming object. Note that none of
// the classes are pure; all reactions have a default empty reaction so that the
-// user class only needs to override those classes that it cares about.
+// user class only needs to override those reactions that it cares about.
// The reactor must be passed to the stub invocation before any of the below
-// operations can be called.
+// operations can be called and its reactions will be invoked by the library in
+// response to the completion of various operations. Reactions must not include
+// blocking operations (such as blocking I/O, starting synchronous RPCs, or
+// waiting on condition variables). Reactions may be invoked concurrently,
+// except that OnDone is called after all others (assuming proper API usage).
+// The reactor may not be deleted until OnDone is called.
/// \a ClientBidiReactor is the interface for a bidirectional streaming RPC.
template <class Request, class Response>
class ClientBidiReactor : public internal::ClientReactor {
public:
- virtual ~ClientBidiReactor() {}
-
/// Activate the RPC and initiate any reads or writes that have been Start'ed
/// before this call. All streaming RPCs issued by the client MUST have
/// StartCall invoked on them (even if they are canceled) as this call is the
@@ -241,7 +257,7 @@ class ClientBidiReactor : public internal::ClientReactor {
/// not deleted or modified until OnWriteDone is called.
/// \param[in] options The WriteOptions to use for writing this message
void StartWrite(const Request* req, ::grpc::WriteOptions options) {
- stream_->Write(req, std::move(options));
+ stream_->Write(req, options);
}
/// Initiate/post a write operation with specified options and an indication
@@ -254,7 +270,7 @@ class ClientBidiReactor : public internal::ClientReactor {
/// not deleted or modified until OnWriteDone is called.
/// \param[in] options The WriteOptions to use for writing this message
void StartWriteLast(const Request* req, ::grpc::WriteOptions options) {
- StartWrite(req, std::move(options.set_last_message()));
+ StartWrite(req, options.set_last_message());
}
/// Indicate that the RPC will have no more write operations. This can only be
@@ -347,8 +363,6 @@ class ClientBidiReactor : public internal::ClientReactor {
template <class Response>
class ClientReadReactor : public internal::ClientReactor {
public:
- virtual ~ClientReadReactor() {}
-
void StartCall() { reader_->StartCall(); }
void StartRead(Response* resp) { reader_->Read(resp); }
@@ -374,17 +388,15 @@ class ClientReadReactor : public internal::ClientReactor {
template <class Request>
class ClientWriteReactor : public internal::ClientReactor {
public:
- virtual ~ClientWriteReactor() {}
-
void StartCall() { writer_->StartCall(); }
void StartWrite(const Request* req) {
StartWrite(req, ::grpc::WriteOptions());
}
void StartWrite(const Request* req, ::grpc::WriteOptions options) {
- writer_->Write(req, std::move(options));
+ writer_->Write(req, options);
}
void StartWriteLast(const Request* req, ::grpc::WriteOptions options) {
- StartWrite(req, std::move(options.set_last_message()));
+ StartWrite(req, options.set_last_message());
}
void StartWritesDone() { writer_->WritesDone(); }
@@ -420,8 +432,6 @@ class ClientWriteReactor : public internal::ClientReactor {
/// initiation API among all the reactor flavors.
class ClientUnaryReactor : public internal::ClientReactor {
public:
- virtual ~ClientUnaryReactor() {}
-
void StartCall() { call_->StartCall(); }
void OnDone(const ::grpc::Status& /*s*/) override {}
virtual void OnReadInitialMetadataDone(bool /*ok*/) {}
@@ -463,7 +473,7 @@ class ClientCallbackReaderWriterImpl
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_CODEGEN_ASSERT(false); }
- void StartCall() override {
+ void StartCall() Y_ABSL_LOCKS_EXCLUDED(start_mu_) override {
// This call initiates two batches, plus any backlog, each with a callback
// 1. Send initial metadata (unless corked) + recv initial metadata
// 2. Any read backlog
@@ -512,7 +522,8 @@ class ClientCallbackReaderWriterImpl
call_.PerformOps(&read_ops_);
}
- void Write(const Request* msg, ::grpc::WriteOptions options) override {
+ void Write(const Request* msg, ::grpc::WriteOptions options)
+ Y_ABSL_LOCKS_EXCLUDED(start_mu_) override {
if (options.is_last_message()) {
options.set_buffer_hint();
write_ops_.ClientSendClose();
@@ -535,14 +546,15 @@ class ClientCallbackReaderWriterImpl
}
call_.PerformOps(&write_ops_);
}
- void WritesDone() override {
+ void WritesDone() Y_ABSL_LOCKS_EXCLUDED(start_mu_) override {
writes_done_ops_.ClientSendClose();
- writes_done_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnWritesDoneDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &writes_done_ops_, /*can_inline=*/false);
+ writes_done_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnWritesDoneDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &writes_done_ops_, /*can_inline=*/false);
writes_done_ops_.set_core_cq_tag(&writes_done_tag_);
callbacks_outstanding_.fetch_add(1, std::memory_order_relaxed);
if (GPR_UNLIKELY(corked_write_needed_)) {
@@ -579,29 +591,32 @@ class ClientCallbackReaderWriterImpl
this->BindReactor(reactor);
// Set up the unchanging parts of the start, read, and write tags and ops.
- start_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnReadInitialMetadataDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &start_ops_, /*can_inline=*/false);
+ start_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnReadInitialMetadataDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &start_ops_, /*can_inline=*/false);
start_ops_.RecvInitialMetadata(context_);
start_ops_.set_core_cq_tag(&start_tag_);
- write_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnWriteDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &write_ops_, /*can_inline=*/false);
+ write_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnWriteDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &write_ops_, /*can_inline=*/false);
write_ops_.set_core_cq_tag(&write_tag_);
- read_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnReadDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &read_ops_, /*can_inline=*/false);
+ read_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnReadDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &read_ops_, /*can_inline=*/false);
read_ops_.set_core_cq_tag(&read_tag_);
// Also set up the Finish tag and op set.
@@ -672,7 +687,7 @@ class ClientCallbackReaderWriterImpl
bool writes_done_ops = false;
bool read_ops = false;
};
- StartCallBacklog backlog_ /* GUARDED_BY(start_mu_) */;
+ StartCallBacklog backlog_ Y_ABSL_GUARDED_BY(start_mu_);
// Minimum of 3 callbacks to pre-register for start ops, StartCall, and finish
std::atomic<intptr_t> callbacks_outstanding_{3};
@@ -719,12 +734,13 @@ class ClientCallbackReaderImpl : public ClientCallbackReader<Response> {
// 2. Any backlog
// 3. Recv trailing metadata
- start_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnReadInitialMetadataDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &start_ops_, /*can_inline=*/false);
+ start_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnReadInitialMetadataDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &start_ops_, /*can_inline=*/false);
start_ops_.SendInitialMetadata(&context_->send_initial_metadata_,
context_->initial_metadata_flags());
start_ops_.RecvInitialMetadata(context_);
@@ -732,12 +748,13 @@ class ClientCallbackReaderImpl : public ClientCallbackReader<Response> {
call_.PerformOps(&start_ops_);
// Also set up the read tag so it doesn't have to be set up each time
- read_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnReadDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &read_ops_, /*can_inline=*/false);
+ read_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnReadDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &read_ops_, /*can_inline=*/false);
read_ops_.set_core_cq_tag(&read_tag_);
{
@@ -828,7 +845,7 @@ class ClientCallbackReaderImpl : public ClientCallbackReader<Response> {
struct StartCallBacklog {
bool read_ops = false;
};
- StartCallBacklog backlog_ /* GUARDED_BY(start_mu_) */;
+ StartCallBacklog backlog_ Y_ABSL_GUARDED_BY(start_mu_);
// Minimum of 2 callbacks to pre-register for start and finish
std::atomic<intptr_t> callbacks_outstanding_{2};
@@ -869,7 +886,7 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
// there are no tests catching the compiler warning.
static void operator delete(void*, void*) { GPR_CODEGEN_ASSERT(false); }
- void StartCall() override {
+ void StartCall() Y_ABSL_LOCKS_EXCLUDED(start_mu_) override {
// This call initiates two batches, plus any backlog, each with a callback
// 1. Send initial metadata (unless corked) + recv initial metadata
// 2. Any backlog
@@ -901,7 +918,8 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
this->MaybeFinish(/*from_reaction=*/false);
}
- void Write(const Request* msg, ::grpc::WriteOptions options) override {
+ void Write(const Request* msg, ::grpc::WriteOptions options)
+ Y_ABSL_LOCKS_EXCLUDED(start_mu_) override {
if (GPR_UNLIKELY(options.is_last_message())) {
options.set_buffer_hint();
write_ops_.ClientSendClose();
@@ -926,14 +944,15 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
call_.PerformOps(&write_ops_);
}
- void WritesDone() override {
+ void WritesDone() Y_ABSL_LOCKS_EXCLUDED(start_mu_) override {
writes_done_ops_.ClientSendClose();
- writes_done_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnWritesDoneDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &writes_done_ops_, /*can_inline=*/false);
+ writes_done_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnWritesDoneDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &writes_done_ops_, /*can_inline=*/false);
writes_done_ops_.set_core_cq_tag(&writes_done_tag_);
callbacks_outstanding_.fetch_add(1, std::memory_order_relaxed);
@@ -973,21 +992,23 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
this->BindReactor(reactor);
// Set up the unchanging parts of the start and write tags and ops.
- start_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnReadInitialMetadataDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &start_ops_, /*can_inline=*/false);
+ start_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnReadInitialMetadataDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &start_ops_, /*can_inline=*/false);
start_ops_.RecvInitialMetadata(context_);
start_ops_.set_core_cq_tag(&start_tag_);
- write_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnWriteDone(ok);
- MaybeFinish(/*from_reaction=*/true);
- },
- &write_ops_, /*can_inline=*/false);
+ write_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnWriteDone(ok);
+ MaybeFinish(/*from_reaction=*/true);
+ },
+ &write_ops_, /*can_inline=*/false);
write_ops_.set_core_cq_tag(&write_tag_);
// Also set up the Finish tag and op set.
@@ -1052,7 +1073,7 @@ class ClientCallbackWriterImpl : public ClientCallbackWriter<Request> {
bool write_ops = false;
bool writes_done_ops = false;
};
- StartCallBacklog backlog_ /* GUARDED_BY(start_mu_) */;
+ StartCallBacklog backlog_ Y_ABSL_GUARDED_BY(start_mu_);
// Minimum of 3 callbacks to pre-register for start ops, StartCall, and finish
std::atomic<intptr_t> callbacks_outstanding_{3};
@@ -1097,21 +1118,22 @@ class ClientCallbackUnaryImpl final : public ClientCallbackUnary {
// 1. Send initial metadata + write + writes done + recv initial metadata
// 2. Read message, recv trailing metadata
- start_tag_.Set(call_.call(),
- [this](bool ok) {
- reactor_->OnReadInitialMetadataDone(ok);
- MaybeFinish();
- },
- &start_ops_, /*can_inline=*/false);
+ start_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ reactor_->OnReadInitialMetadataDone(ok);
+ MaybeFinish();
+ },
+ &start_ops_, /*can_inline=*/false);
start_ops_.SendInitialMetadata(&context_->send_initial_metadata_,
context_->initial_metadata_flags());
start_ops_.RecvInitialMetadata(context_);
start_ops_.set_core_cq_tag(&start_tag_);
call_.PerformOps(&start_ops_);
- finish_tag_.Set(call_.call(), [this](bool /*ok*/) { MaybeFinish(); },
- &finish_ops_,
- /*can_inline=*/false);
+ finish_tag_.Set(
+ call_.call(), [this](bool /*ok*/) { MaybeFinish(); }, &finish_ops_,
+ /*can_inline=*/false);
finish_ops_.ClientRecvStatus(context_, &finish_status_);
finish_ops_.set_core_cq_tag(&finish_tag_);
call_.PerformOps(&finish_ops_);
@@ -1171,7 +1193,8 @@ class ClientCallbackUnaryImpl final : public ClientCallbackUnary {
class ClientCallbackUnaryFactory {
public:
- template <class Request, class Response>
+ template <class Request, class Response, class BaseRequest = Request,
+ class BaseResponse = Response>
static void Create(::grpc::ChannelInterface* channel,
const ::grpc::internal::RpcMethod& method,
::grpc::ClientContext* context, const Request* request,
@@ -1183,7 +1206,9 @@ class ClientCallbackUnaryFactory {
new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
call.call(), sizeof(ClientCallbackUnaryImpl)))
- ClientCallbackUnaryImpl(call, context, request, response, reactor);
+ ClientCallbackUnaryImpl(call, context,
+ static_cast<const BaseRequest*>(request),
+ static_cast<BaseResponse*>(response), reactor);
}
};
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/client_context.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/client_context.h
index a4e58f34c5e..82b93587a87 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/client_context.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/client_context.h
@@ -72,6 +72,7 @@ template <class Request>
class ClientCallbackWriterImpl;
class ClientCallbackUnaryImpl;
class ClientContextAccessor;
+class ClientAsyncResponseReaderHelper;
} // namespace internal
template <class R>
@@ -310,7 +311,7 @@ class ClientContext {
///
/// \see grpc::AuthContext.
std::shared_ptr<const grpc::AuthContext> auth_context() const {
- if (auth_context_.get() == nullptr) {
+ if (auth_context_ == nullptr) {
auth_context_ = grpc::CreateAuthContext(call_);
}
return auth_context_;
@@ -439,6 +440,7 @@ class ClientContext {
friend class ::grpc::ClientAsyncReaderWriter;
template <class R>
friend class ::grpc::ClientAsyncResponseReader;
+ friend class ::grpc::internal::ClientAsyncResponseReaderHelper;
template <class InputMessage, class OutputMessage>
friend class ::grpc::internal::BlockingUnaryCallImpl;
template <class InputMessage, class OutputMessage>
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/client_unary_call.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/client_unary_call.h
index 098bb50ee2c..d41ea1ad2d4 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/client_unary_call.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/client_unary_call.h
@@ -20,6 +20,7 @@
#define GRPCPP_IMPL_CODEGEN_CLIENT_UNARY_CALL_H
#include <grpcpp/impl/codegen/call.h>
+#include <grpcpp/impl/codegen/call_op_set.h>
#include <grpcpp/impl/codegen/channel_interface.h>
#include <grpcpp/impl/codegen/config.h>
#include <grpcpp/impl/codegen/core_codegen_interface.h>
@@ -30,12 +31,23 @@ namespace grpc {
class ClientContext;
namespace internal {
class RpcMethod;
-/// Wrapper that performs a blocking unary call
-template <class InputMessage, class OutputMessage>
+
+/// Wrapper that performs a blocking unary call. May optionally specify the base
+/// class of the Request and Response so that the internal calls and structures
+/// below this may be based on those base classes and thus achieve code reuse
+/// across different RPCs (e.g., for protobuf, MessageLite would be a base
+/// class).
+template <class InputMessage, class OutputMessage,
+ class BaseInputMessage = InputMessage,
+ class BaseOutputMessage = OutputMessage>
Status BlockingUnaryCall(ChannelInterface* channel, const RpcMethod& method,
grpc::ClientContext* context,
const InputMessage& request, OutputMessage* result) {
- return BlockingUnaryCallImpl<InputMessage, OutputMessage>(
+ static_assert(std::is_base_of<BaseInputMessage, InputMessage>::value,
+ "Invalid input message specification");
+ static_assert(std::is_base_of<BaseOutputMessage, OutputMessage>::value,
+ "Invalid output message specification");
+ return BlockingUnaryCallImpl<BaseInputMessage, BaseOutputMessage>(
channel, method, context, request, result)
.status();
}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/completion_queue.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/completion_queue.h
index ca0c77276a8..d23e0e2bb3c 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/completion_queue.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/completion_queue.h
@@ -38,6 +38,7 @@
#include <grpcpp/impl/codegen/completion_queue_tag.h>
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/grpc_library.h>
+#include <grpcpp/impl/codegen/rpc_service_method.h>
#include <grpcpp/impl/codegen/status.h>
#include <grpcpp/impl/codegen/sync.h>
#include <grpcpp/impl/codegen/time.h>
@@ -59,7 +60,12 @@ namespace internal {
template <class W, class R>
class ServerReaderWriterBody;
-template <class ServiceType, class RequestType, class ResponseType>
+template <class ResponseType>
+void UnaryRunHandlerHelper(
+ const ::grpc::internal::MethodHandler::HandlerParameter&, ResponseType*,
+ ::grpc::Status&);
+template <class ServiceType, class RequestType, class ResponseType,
+ class BaseRequestType, class BaseResponseType>
class RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ClientStreamingHandler;
@@ -108,7 +114,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
explicit CompletionQueue(grpc_completion_queue* take);
/// Destructor. Destroys the owned wrapped completion queue / instance.
- ~CompletionQueue() {
+ ~CompletionQueue() override {
::grpc::g_core_codegen_interface->grpc_completion_queue_destroy(cq_);
}
@@ -123,8 +129,8 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
/// Read from the queue, blocking until an event is available or the queue is
/// shutting down.
///
- /// \param tag [out] Updated to point to the read event's tag.
- /// \param ok [out] true if read a successful event, false otherwise.
+ /// \param[out] tag Updated to point to the read event's tag.
+ /// \param[out] ok true if read a successful event, false otherwise.
///
/// Note that each tag sent to the completion queue (through RPC operations
/// or alarms) will be delivered out of the completion queue by a call to
@@ -179,10 +185,10 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
/// within the \a deadline). A \a tag points to an arbitrary location usually
/// employed to uniquely identify an event.
///
- /// \param tag [out] Upon success, updated to point to the event's tag.
- /// \param ok [out] Upon success, true if a successful event, false otherwise
+ /// \param[out] tag Upon success, updated to point to the event's tag.
+ /// \param[out] ok Upon success, true if a successful event, false otherwise
/// See documentation for CompletionQueue::Next for explanation of ok
- /// \param deadline [in] How long to block in wait for an event.
+ /// \param[in] deadline How long to block in wait for an event.
///
/// \return The type of event read.
template <typename T>
@@ -198,11 +204,11 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
/// within the \a deadline). A \a tag points to an arbitrary location usually
/// employed to uniquely identify an event.
///
- /// \param f [in] Function to execute before calling AsyncNext on this queue.
- /// \param tag [out] Upon success, updated to point to the event's tag.
- /// \param ok [out] Upon success, true if read a regular event, false
+ /// \param[in] f Function to execute before calling AsyncNext on this queue.
+ /// \param[out] tag Upon success, updated to point to the event's tag.
+ /// \param[out] ok Upon success, true if read a regular event, false
/// otherwise.
- /// \param deadline [in] How long to block in wait for an event.
+ /// \param[in] deadline How long to block in wait for an event.
///
/// \return The type of event read.
template <typename T, typename F>
@@ -237,11 +243,11 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
protected:
/// Private constructor of CompletionQueue only visible to friend classes
- CompletionQueue(const grpc_completion_queue_attributes& attributes) {
+ explicit CompletionQueue(const grpc_completion_queue_attributes& attributes) {
cq_ = ::grpc::g_core_codegen_interface->grpc_completion_queue_create(
::grpc::g_core_codegen_interface->grpc_completion_queue_factory_lookup(
&attributes),
- &attributes, NULL);
+ &attributes, nullptr);
InitialAvalanching(); // reserve this for the future shutdown
}
@@ -265,8 +271,10 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
friend class ::grpc::ServerWriter;
template <class W, class R>
friend class ::grpc::internal::ServerReaderWriterBody;
- template <class ServiceType, class RequestType, class ResponseType>
- friend class ::grpc::internal::RpcMethodHandler;
+ template <class ResponseType>
+ friend void ::grpc::internal::UnaryRunHandlerHelper(
+ const ::grpc::internal::MethodHandler::HandlerParameter&, ResponseType*,
+ ::grpc::Status&);
template <class ServiceType, class RequestType, class ResponseType>
friend class ::grpc::internal::ClientStreamingHandler;
template <class ServiceType, class RequestType, class ResponseType>
@@ -293,7 +301,7 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
/// initialized, it must be flushed on the same thread.
class CompletionQueueTLSCache {
public:
- CompletionQueueTLSCache(CompletionQueue* cq);
+ explicit CompletionQueueTLSCache(CompletionQueue* cq);
~CompletionQueueTLSCache();
bool Flush(void** tag, bool* ok);
@@ -401,6 +409,9 @@ class CompletionQueue : private ::grpc::GrpcLibraryCodegen {
return true;
}
+ static CompletionQueue* CallbackAlternativeCQ();
+ static void ReleaseCallbackAlternativeCQ(CompletionQueue* cq);
+
grpc_completion_queue* cq_; // owned
gpr_atm avalanches_in_flight_;
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/config.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/config.h
index 87f9914273d..d1776685516 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/config.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/config.h
@@ -36,7 +36,7 @@ namespace grpc {
// Using grpc::string and grpc::to_string is discouraged in favor of
// TString and ToString. This is only for legacy code using
// them explictly.
-typedef TString string; // deprecated
+typedef TString string;
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/config_protobuf.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/config_protobuf.h
index c4012fb00c9..49db4c5dc31 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/config_protobuf.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/config_protobuf.h
@@ -65,6 +65,7 @@
#ifndef GRPC_CUSTOM_JSONUTIL
#include <google/protobuf/util/json_util.h>
+#include <google/protobuf/util/type_resolver_util.h>
#define GRPC_CUSTOM_JSONUTIL ::google::protobuf::util
#define GRPC_CUSTOM_UTIL_STATUS ::google::protobuf::util::Status
#endif
@@ -90,6 +91,7 @@ namespace util {
typedef GRPC_CUSTOM_UTIL_STATUS Status;
} // namespace util
+// NOLINTNEXTLINE(misc-unused-alias-decls)
namespace json = GRPC_CUSTOM_JSONUTIL;
namespace io {
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/core_codegen.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/core_codegen.h
index 50c8da4ffe7..df2a03cd259 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/core_codegen.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/core_codegen.h
@@ -31,10 +31,9 @@ namespace grpc {
/// Implementation of the core codegen interface.
class CoreCodegen final : public CoreCodegenInterface {
private:
- virtual const grpc_completion_queue_factory*
- grpc_completion_queue_factory_lookup(
+ const grpc_completion_queue_factory* grpc_completion_queue_factory_lookup(
const grpc_completion_queue_attributes* attributes) override;
- virtual grpc_completion_queue* grpc_completion_queue_create(
+ grpc_completion_queue* grpc_completion_queue_create(
const grpc_completion_queue_factory* factory,
const grpc_completion_queue_attributes* attributes,
void* reserved) override;
@@ -115,8 +114,8 @@ class CoreCodegen final : public CoreCodegenInterface {
gpr_timespec gpr_inf_future(gpr_clock_type type) override;
gpr_timespec gpr_time_0(gpr_clock_type type) override;
- virtual const Status& ok() override;
- virtual const Status& cancelled() override;
+ const Status& ok() override;
+ const Status& cancelled() override;
void assert_fail(const char* failed_assertion, const char* file,
int line) override;
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/delegating_channel.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/delegating_channel.h
index 1a3bbd3349a..0479567b864 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/delegating_channel.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/delegating_channel.h
@@ -19,14 +19,19 @@
#ifndef GRPCPP_IMPL_CODEGEN_DELEGATING_CHANNEL_H
#define GRPCPP_IMPL_CODEGEN_DELEGATING_CHANNEL_H
+#include <memory>
+
+#include <grpcpp/impl/codegen/channel_interface.h>
+
namespace grpc {
namespace experimental {
class DelegatingChannel : public ::grpc::ChannelInterface {
public:
- virtual ~DelegatingChannel() {}
+ ~DelegatingChannel() override {}
- DelegatingChannel(std::shared_ptr<::grpc::ChannelInterface> delegate_channel)
+ explicit DelegatingChannel(
+ std::shared_ptr<::grpc::ChannelInterface> delegate_channel)
: delegate_channel_(delegate_channel) {}
grpc_connectivity_state GetState(bool try_to_connect) override {
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/grpc_library.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/grpc_library.h
index 17c904d71a1..660d6d0abdc 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/grpc_library.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/grpc_library.h
@@ -37,7 +37,8 @@ extern GrpcLibraryInterface* g_glip;
/// Classes that require gRPC to be initialized should inherit from this class.
class GrpcLibraryCodegen {
public:
- GrpcLibraryCodegen(bool call_grpc_init = true) : grpc_init_called_(false) {
+ explicit GrpcLibraryCodegen(bool call_grpc_init = true)
+ : grpc_init_called_(false) {
if (call_grpc_init) {
GPR_CODEGEN_ASSERT(g_glip &&
"gRPC library not initialized. See "
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/intercepted_channel.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/intercepted_channel.h
index c729970ca88..e3a4c8e7680 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/intercepted_channel.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/intercepted_channel.h
@@ -34,7 +34,7 @@ class InterceptorBatchMethodsImpl;
/// see the RPC.
class InterceptedChannel : public ChannelInterface {
public:
- virtual ~InterceptedChannel() { channel_ = nullptr; }
+ ~InterceptedChannel() override { channel_ = nullptr; }
/// Get the current channel state. If the channel is in IDLE and
/// \a try_to_connect is set to true, try to connect.
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/interceptor_common.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/interceptor_common.h
index 714351f5432..72d8009ded4 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/interceptor_common.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/interceptor_common.h
@@ -49,7 +49,7 @@ class InterceptorBatchMethodsImpl
}
}
- ~InterceptorBatchMethodsImpl() {}
+ ~InterceptorBatchMethodsImpl() override {}
bool QueryInterceptionHookPoint(
experimental::InterceptionHookPoints type) override {
@@ -227,19 +227,11 @@ class InterceptorBatchMethodsImpl
bool InterceptorsListEmpty() {
auto* client_rpc_info = call_->client_rpc_info();
if (client_rpc_info != nullptr) {
- if (client_rpc_info->interceptors_.size() == 0) {
- return true;
- } else {
- return false;
- }
+ return client_rpc_info->interceptors_.empty();
}
auto* server_rpc_info = call_->server_rpc_info();
- if (server_rpc_info == nullptr ||
- server_rpc_info->interceptors_.size() == 0) {
- return true;
- }
- return false;
+ return server_rpc_info == nullptr || server_rpc_info->interceptors_.empty();
}
// This should be used only by subclasses of CallOpSetInterface. SetCall and
@@ -251,7 +243,7 @@ class InterceptorBatchMethodsImpl
GPR_CODEGEN_ASSERT(ops_);
auto* client_rpc_info = call_->client_rpc_info();
if (client_rpc_info != nullptr) {
- if (client_rpc_info->interceptors_.size() == 0) {
+ if (client_rpc_info->interceptors_.empty()) {
return true;
} else {
RunClientInterceptors();
@@ -260,8 +252,7 @@ class InterceptorBatchMethodsImpl
}
auto* server_rpc_info = call_->server_rpc_info();
- if (server_rpc_info == nullptr ||
- server_rpc_info->interceptors_.size() == 0) {
+ if (server_rpc_info == nullptr || server_rpc_info->interceptors_.empty()) {
return true;
}
RunServerInterceptors();
@@ -277,8 +268,7 @@ class InterceptorBatchMethodsImpl
GPR_CODEGEN_ASSERT(reverse_ == true);
GPR_CODEGEN_ASSERT(call_->client_rpc_info() == nullptr);
auto* server_rpc_info = call_->server_rpc_info();
- if (server_rpc_info == nullptr ||
- server_rpc_info->interceptors_.size() == 0) {
+ if (server_rpc_info == nullptr || server_rpc_info->interceptors_.empty()) {
return true;
}
callback_ = std::move(f);
@@ -426,11 +416,7 @@ class CancelInterceptorBatchMethods
public:
bool QueryInterceptionHookPoint(
experimental::InterceptionHookPoints type) override {
- if (type == experimental::InterceptionHookPoints::PRE_SEND_CANCEL) {
- return true;
- } else {
- return false;
- }
+ return type == experimental::InterceptionHookPoints::PRE_SEND_CANCEL;
}
void Proceed() override {
@@ -493,7 +479,6 @@ class CancelInterceptorBatchMethods
GPR_CODEGEN_ASSERT(false &&
"It is illegal to call ModifySendStatus on a method "
"which has a Cancel notification");
- return;
}
std::multimap<TString, TString>* GetSendTrailingMetadata() override {
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler.h
index 0033936b04b..756f4aae751 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler.h
@@ -49,8 +49,52 @@ template <class Callable>
#endif // GRPC_ALLOW_EXCEPTIONS
}
+/// A helper function with reduced templating to do the common work needed to
+/// actually send the server response. Uses non-const parameter for Status since
+/// this should only ever be called from the end of the RunHandler method.
+
+template <class ResponseType>
+void UnaryRunHandlerHelper(const MethodHandler::HandlerParameter& param,
+ ResponseType* rsp, ::grpc::Status& status) {
+ GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_);
+ ::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
+ ::grpc::internal::CallOpSendMessage,
+ ::grpc::internal::CallOpServerSendStatus>
+ ops;
+ ops.SendInitialMetadata(&param.server_context->initial_metadata_,
+ param.server_context->initial_metadata_flags());
+ if (param.server_context->compression_level_set()) {
+ ops.set_compression_level(param.server_context->compression_level());
+ }
+ if (status.ok()) {
+ status = ops.SendMessagePtr(rsp);
+ }
+ ops.ServerSendStatus(&param.server_context->trailing_metadata_, status);
+ param.call->PerformOps(&ops);
+ param.call->cq()->Pluck(&ops);
+}
+
+/// A helper function with reduced templating to do deserializing.
+
+template <class RequestType>
+void* UnaryDeserializeHelper(grpc_byte_buffer* req, ::grpc::Status* status,
+ RequestType* request) {
+ ::grpc::ByteBuffer buf;
+ buf.set_buffer(req);
+ *status = ::grpc::SerializationTraits<RequestType>::Deserialize(
+ &buf, static_cast<RequestType*>(request));
+ buf.Release();
+ if (status->ok()) {
+ return request;
+ }
+ request->~RequestType();
+ return nullptr;
+}
+
/// A wrapper class of an application provided rpc method handler.
-template <class ServiceType, class RequestType, class ResponseType>
+template <class ServiceType, class RequestType, class ResponseType,
+ class BaseRequestType = RequestType,
+ class BaseResponseType = ResponseType>
class RpcMethodHandler : public ::grpc::internal::MethodHandler {
public:
RpcMethodHandler(
@@ -71,40 +115,16 @@ class RpcMethodHandler : public ::grpc::internal::MethodHandler {
});
static_cast<RequestType*>(param.request)->~RequestType();
}
-
- GPR_CODEGEN_ASSERT(!param.server_context->sent_initial_metadata_);
- ::grpc::internal::CallOpSet<::grpc::internal::CallOpSendInitialMetadata,
- ::grpc::internal::CallOpSendMessage,
- ::grpc::internal::CallOpServerSendStatus>
- ops;
- ops.SendInitialMetadata(&param.server_context->initial_metadata_,
- param.server_context->initial_metadata_flags());
- if (param.server_context->compression_level_set()) {
- ops.set_compression_level(param.server_context->compression_level());
- }
- if (status.ok()) {
- status = ops.SendMessagePtr(&rsp);
- }
- ops.ServerSendStatus(&param.server_context->trailing_metadata_, status);
- param.call->PerformOps(&ops);
- param.call->cq()->Pluck(&ops);
+ UnaryRunHandlerHelper(param, static_cast<BaseResponseType*>(&rsp), status);
}
void* Deserialize(grpc_call* call, grpc_byte_buffer* req,
::grpc::Status* status, void** /*handler_data*/) final {
- ::grpc::ByteBuffer buf;
- buf.set_buffer(req);
auto* request =
new (::grpc::g_core_codegen_interface->grpc_call_arena_alloc(
- call, sizeof(RequestType))) RequestType();
- *status =
- ::grpc::SerializationTraits<RequestType>::Deserialize(&buf, request);
- buf.Release();
- if (status->ok()) {
- return request;
- }
- request->~RequestType();
- return nullptr;
+ call, sizeof(RequestType))) RequestType;
+ return UnaryDeserializeHelper(req, status,
+ static_cast<BaseRequestType*>(request));
}
private:
@@ -241,7 +261,7 @@ class ServerStreamingHandler : public ::grpc::internal::MethodHandler {
template <class Streamer, bool WriteNeeded>
class TemplatedBidiStreamingHandler : public ::grpc::internal::MethodHandler {
public:
- TemplatedBidiStreamingHandler(
+ explicit TemplatedBidiStreamingHandler(
std::function<::grpc::Status(::grpc::ServerContext*, Streamer*)> func)
: func_(func), write_needed_(WriteNeeded) {}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler_impl.h
index 54ec46e1bb0..cc88a135ca2 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/method_handler_impl.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015 gRPC authors.
+ * Copyright 2018 gRPC authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,11 +16,7 @@
*
*/
-#ifndef GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H
-#define GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H
+#ifndef GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H
+#define GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/iomgr/iomgr_internal.h"
-
-#endif /* GRPC_CORE_LIB_IOMGR_IOMGR_POSIX_H */
+#endif // GRPCPP_IMPL_CODEGEN_METHOD_HANDLER_IMPL_H
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_reader.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_reader.h
index 487471290d9..d25b79a4027 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_reader.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_reader.h
@@ -59,7 +59,7 @@ class ProtoBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
}
}
- ~ProtoBufferReader() {
+ ~ProtoBufferReader() override {
if (status_.ok()) {
g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_);
}
@@ -76,7 +76,7 @@ class ProtoBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
*data = GRPC_SLICE_START_PTR(*slice_) + GRPC_SLICE_LENGTH(*slice_) -
backup_count_;
GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX);
- *size = (int)backup_count_;
+ *size = static_cast<int>(backup_count_);
backup_count_ = 0;
return true;
}
@@ -88,7 +88,7 @@ class ProtoBufferReader : public ::grpc::protobuf::io::ZeroCopyInputStream {
*data = GRPC_SLICE_START_PTR(*slice_);
// On win x64, int is only 32bit
GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(*slice_) <= INT_MAX);
- byte_count_ += * size = (int)GRPC_SLICE_LENGTH(*slice_);
+ byte_count_ += * size = static_cast<int>(GRPC_SLICE_LENGTH(*slice_));
return true;
}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_writer.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_writer.h
index 0af4616e508..cd9d70c5a56 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_writer.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_buffer_writer.h
@@ -65,12 +65,12 @@ class ProtoBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
GPR_CODEGEN_ASSERT(!byte_buffer->Valid());
/// Create an empty raw byte buffer and look at its underlying slice buffer
grpc_byte_buffer* bp =
- g_core_codegen_interface->grpc_raw_byte_buffer_create(NULL, 0);
+ g_core_codegen_interface->grpc_raw_byte_buffer_create(nullptr, 0);
byte_buffer->set_buffer(bp);
slice_buffer_ = &bp->data.raw.slice_buffer;
}
- ~ProtoBufferWriter() {
+ ~ProtoBufferWriter() override {
if (have_backup_) {
g_core_codegen_interface->grpc_slice_unref(backup_slice_);
}
@@ -107,7 +107,7 @@ class ProtoBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
*data = GRPC_SLICE_START_PTR(slice_);
// On win x64, int is only 32bit
GPR_CODEGEN_ASSERT(GRPC_SLICE_LENGTH(slice_) <= INT_MAX);
- byte_count_ += * size = (int)GRPC_SLICE_LENGTH(slice_);
+ byte_count_ += * size = static_cast<int>(GRPC_SLICE_LENGTH(slice_));
g_core_codegen_interface->grpc_slice_buffer_add(slice_buffer_, slice_);
return true;
}
@@ -122,7 +122,7 @@ class ProtoBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
/// 4. Mark that we still have the remaining part (for later use/unref)
GPR_CODEGEN_ASSERT(count <= static_cast<int>(GRPC_SLICE_LENGTH(slice_)));
g_core_codegen_interface->grpc_slice_buffer_pop(slice_buffer_);
- if ((size_t)count == GRPC_SLICE_LENGTH(slice_)) {
+ if (static_cast<size_t>(count) == GRPC_SLICE_LENGTH(slice_)) {
backup_slice_ = slice_;
} else {
backup_slice_ = g_core_codegen_interface->grpc_slice_split_tail(
@@ -133,7 +133,7 @@ class ProtoBufferWriter : public ::grpc::protobuf::io::ZeroCopyOutputStream {
// on a following Next() call, a reference will be returned to this slice
// via GRPC_SLICE_START_PTR, which will not be an address held by
// slice_buffer_.
- have_backup_ = backup_slice_.refcount != NULL;
+ have_backup_ = backup_slice_.refcount != nullptr;
byte_count_ -= count;
}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_utils.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_utils.h
index 2e102135a36..7f5c6e9a99d 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_utils.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/proto_utils.h
@@ -49,8 +49,8 @@ Status GenericSerialize(const grpc::protobuf::MessageLite& msg, ByteBuffer* bb,
"ProtoBufferWriter must be a subclass of "
"::protobuf::io::ZeroCopyOutputStream");
*own_buffer = true;
- int byte_size = msg.ByteSizeLong();
- if ((size_t)byte_size <= GRPC_SLICE_INLINED_SIZE) {
+ int byte_size = static_cast<int>(msg.ByteSizeLong());
+ if (static_cast<size_t>(byte_size) <= GRPC_SLICE_INLINED_SIZE) {
Slice slice(byte_size);
// We serialize directly into the allocated slices memory
GPR_CODEGEN_ASSERT(slice.end() == msg.SerializeWithCachedSizesToArray(
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/rpc_method.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/rpc_method.h
index 9dcde954f1d..394a29b8374 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/rpc_method.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/rpc_method.h
@@ -36,7 +36,7 @@ class RpcMethod {
};
RpcMethod(const char* name, RpcType type)
- : name_(name), method_type_(type), channel_tag_(NULL) {}
+ : name_(name), method_type_(type), channel_tag_(nullptr) {}
RpcMethod(const char* name, RpcType type,
const std::shared_ptr<ChannelInterface>& channel)
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/security/auth_context.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/security/auth_context.h
index 220b78f2ebf..e2b04356526 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/security/auth_context.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/security/auth_context.h
@@ -42,7 +42,7 @@ class AuthPropertyIterator
AuthPropertyIterator operator++(int);
bool operator==(const AuthPropertyIterator& rhs) const;
bool operator!=(const AuthPropertyIterator& rhs) const;
- const AuthProperty operator*();
+ AuthProperty operator*();
protected:
AuthPropertyIterator();
@@ -86,7 +86,7 @@ class AuthContext {
/// Mutation functions: should only be used by an AuthMetadataProcessor.
virtual void AddProperty(const TString& key, const string_ref& value) = 0;
- virtual bool SetPeerIdentityPropertyName(const string& name) = 0;
+ virtual bool SetPeerIdentityPropertyName(const TString& name) = 0;
};
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback.h
index 3794a9ffa79..701ef561a34 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback.h
@@ -29,6 +29,7 @@
#include <grpcpp/impl/codegen/core_codegen_interface.h>
#include <grpcpp/impl/codegen/message_allocator.h>
#include <grpcpp/impl/codegen/status.h>
+#include <grpcpp/impl/codegen/sync.h>
namespace grpc {
@@ -190,7 +191,7 @@ class ServerBidiReactor;
// the API.
class ServerCallbackUnary : public internal::ServerCallbackCall {
public:
- virtual ~ServerCallbackUnary() {}
+ ~ServerCallbackUnary() override {}
virtual void Finish(::grpc::Status s) = 0;
virtual void SendInitialMetadata() = 0;
@@ -206,7 +207,7 @@ class ServerCallbackUnary : public internal::ServerCallbackCall {
template <class Request>
class ServerCallbackReader : public internal::ServerCallbackCall {
public:
- virtual ~ServerCallbackReader() {}
+ ~ServerCallbackReader() override {}
virtual void Finish(::grpc::Status s) = 0;
virtual void SendInitialMetadata() = 0;
virtual void Read(Request* msg) = 0;
@@ -220,7 +221,7 @@ class ServerCallbackReader : public internal::ServerCallbackCall {
template <class Response>
class ServerCallbackWriter : public internal::ServerCallbackCall {
public:
- virtual ~ServerCallbackWriter() {}
+ ~ServerCallbackWriter() override {}
virtual void Finish(::grpc::Status s) = 0;
virtual void SendInitialMetadata() = 0;
@@ -237,7 +238,7 @@ class ServerCallbackWriter : public internal::ServerCallbackCall {
template <class Request, class Response>
class ServerCallbackReaderWriter : public internal::ServerCallbackCall {
public:
- virtual ~ServerCallbackReaderWriter() {}
+ ~ServerCallbackReaderWriter() override {}
virtual void Finish(::grpc::Status s) = 0;
virtual void SendInitialMetadata() = 0;
@@ -256,7 +257,12 @@ class ServerCallbackReaderWriter : public internal::ServerCallbackCall {
// by the user, returned as the output parameter of the method handler for a
// callback method. Note that none of the classes are pure; all reactions have a
// default empty reaction so that the user class only needs to override those
-// classes that it cares about.
+// reactions that it cares about. The reaction methods will be invoked by the
+// library in response to the completion of various operations. Reactions must
+// not include blocking operations (such as blocking I/O, starting synchronous
+// RPCs, or waiting on condition variables). Reactions may be invoked
+// concurrently, except that OnDone is called after all others (assuming proper
+// API usage). The reactor may not be deleted until OnDone is called.
/// \a ServerBidiReactor is the interface for a bidirectional streaming RPC.
template <class Request, class Response>
@@ -268,12 +274,12 @@ class ServerBidiReactor : public internal::ServerReactor {
// TODO(vjpai): Switch to default constructor and default initializer when
// gcc-4.x is no longer supported
ServerBidiReactor() : stream_(nullptr) {}
- ~ServerBidiReactor() = default;
+ ~ServerBidiReactor() override = default;
/// Send any initial metadata stored in the RPC context. If not invoked,
/// any initial metadata will be passed along with the first Write or the
/// Finish (if there are no writes).
- void StartSendInitialMetadata() {
+ void StartSendInitialMetadata() Y_ABSL_LOCKS_EXCLUDED(stream_mu_) {
ServerCallbackReaderWriter<Request, Response>* stream =
stream_.load(std::memory_order_acquire);
if (stream == nullptr) {
@@ -291,7 +297,7 @@ class ServerBidiReactor : public internal::ServerReactor {
///
/// \param[out] req Where to eventually store the read message. Valid when
/// the library calls OnReadDone
- void StartRead(Request* req) {
+ void StartRead(Request* req) Y_ABSL_LOCKS_EXCLUDED(stream_mu_) {
ServerCallbackReaderWriter<Request, Response>* stream =
stream_.load(std::memory_order_acquire);
if (stream == nullptr) {
@@ -320,7 +326,8 @@ class ServerBidiReactor : public internal::ServerReactor {
/// ownership but the caller must ensure that the message is
/// not deleted or modified until OnWriteDone is called.
/// \param[in] options The WriteOptions to use for writing this message
- void StartWrite(const Response* resp, ::grpc::WriteOptions options) {
+ void StartWrite(const Response* resp, ::grpc::WriteOptions options)
+ Y_ABSL_LOCKS_EXCLUDED(stream_mu_) {
ServerCallbackReaderWriter<Request, Response>* stream =
stream_.load(std::memory_order_acquire);
if (stream == nullptr) {
@@ -328,11 +335,11 @@ class ServerBidiReactor : public internal::ServerReactor {
stream = stream_.load(std::memory_order_relaxed);
if (stream == nullptr) {
backlog_.write_wanted = resp;
- backlog_.write_options_wanted = std::move(options);
+ backlog_.write_options_wanted = options;
return;
}
}
- stream->Write(resp, std::move(options));
+ stream->Write(resp, options);
}
/// Initiate a write operation with specified options and final RPC Status,
@@ -349,7 +356,7 @@ class ServerBidiReactor : public internal::ServerReactor {
/// \param[in] options The WriteOptions to use for writing this message
/// \param[in] s The status outcome of this RPC
void StartWriteAndFinish(const Response* resp, ::grpc::WriteOptions options,
- ::grpc::Status s) {
+ ::grpc::Status s) Y_ABSL_LOCKS_EXCLUDED(stream_mu_) {
ServerCallbackReaderWriter<Request, Response>* stream =
stream_.load(std::memory_order_acquire);
if (stream == nullptr) {
@@ -358,12 +365,12 @@ class ServerBidiReactor : public internal::ServerReactor {
if (stream == nullptr) {
backlog_.write_and_finish_wanted = true;
backlog_.write_wanted = resp;
- backlog_.write_options_wanted = std::move(options);
+ backlog_.write_options_wanted = options;
backlog_.status_wanted = std::move(s);
return;
}
}
- stream->WriteAndFinish(resp, std::move(options), std::move(s));
+ stream->WriteAndFinish(resp, options, std::move(s));
}
/// Inform system of a planned write operation with specified options, but
@@ -375,7 +382,7 @@ class ServerBidiReactor : public internal::ServerReactor {
/// not deleted or modified until OnWriteDone is called.
/// \param[in] options The WriteOptions to use for writing this message
void StartWriteLast(const Response* resp, ::grpc::WriteOptions options) {
- StartWrite(resp, std::move(options.set_last_message()));
+ StartWrite(resp, options.set_last_message());
}
/// Indicate that the stream is to be finished and the trailing metadata and
@@ -384,7 +391,7 @@ class ServerBidiReactor : public internal::ServerReactor {
/// cancelled.
///
/// \param[in] s The status outcome of this RPC
- void Finish(::grpc::Status s) {
+ void Finish(::grpc::Status s) Y_ABSL_LOCKS_EXCLUDED(stream_mu_) {
ServerCallbackReaderWriter<Request, Response>* stream =
stream_.load(std::memory_order_acquire);
if (stream == nullptr) {
@@ -476,7 +483,7 @@ class ServerBidiReactor : public internal::ServerReactor {
::grpc::WriteOptions write_options_wanted;
::grpc::Status status_wanted;
};
- PreBindBacklog backlog_ /* GUARDED_BY(stream_mu_) */;
+ PreBindBacklog backlog_ Y_ABSL_GUARDED_BY(stream_mu_);
};
/// \a ServerReadReactor is the interface for a client-streaming RPC.
@@ -484,10 +491,10 @@ template <class Request>
class ServerReadReactor : public internal::ServerReactor {
public:
ServerReadReactor() : reader_(nullptr) {}
- ~ServerReadReactor() = default;
+ ~ServerReadReactor() override = default;
/// The following operation initiations are exactly like ServerBidiReactor.
- void StartSendInitialMetadata() {
+ void StartSendInitialMetadata() Y_ABSL_LOCKS_EXCLUDED(reader_mu_) {
ServerCallbackReader<Request>* reader =
reader_.load(std::memory_order_acquire);
if (reader == nullptr) {
@@ -500,7 +507,7 @@ class ServerReadReactor : public internal::ServerReactor {
}
reader->SendInitialMetadata();
}
- void StartRead(Request* req) {
+ void StartRead(Request* req) Y_ABSL_LOCKS_EXCLUDED(reader_mu_) {
ServerCallbackReader<Request>* reader =
reader_.load(std::memory_order_acquire);
if (reader == nullptr) {
@@ -513,7 +520,7 @@ class ServerReadReactor : public internal::ServerReactor {
}
reader->Read(req);
}
- void Finish(::grpc::Status s) {
+ void Finish(::grpc::Status s) Y_ABSL_LOCKS_EXCLUDED(reader_mu_) {
ServerCallbackReader<Request>* reader =
reader_.load(std::memory_order_acquire);
if (reader == nullptr) {
@@ -539,7 +546,8 @@ class ServerReadReactor : public internal::ServerReactor {
// May be overridden by internal implementation details. This is not a public
// customization point.
- virtual void InternalBindReader(ServerCallbackReader<Request>* reader) {
+ virtual void InternalBindReader(ServerCallbackReader<Request>* reader)
+ Y_ABSL_LOCKS_EXCLUDED(reader_mu_) {
grpc::internal::MutexLock l(&reader_mu_);
if (GPR_UNLIKELY(backlog_.send_initial_metadata_wanted)) {
@@ -563,7 +571,7 @@ class ServerReadReactor : public internal::ServerReactor {
Request* read_wanted = nullptr;
::grpc::Status status_wanted;
};
- PreBindBacklog backlog_ /* GUARDED_BY(reader_mu_) */;
+ PreBindBacklog backlog_ Y_ABSL_GUARDED_BY(reader_mu_);
};
/// \a ServerWriteReactor is the interface for a server-streaming RPC.
@@ -571,10 +579,10 @@ template <class Response>
class ServerWriteReactor : public internal::ServerReactor {
public:
ServerWriteReactor() : writer_(nullptr) {}
- ~ServerWriteReactor() = default;
+ ~ServerWriteReactor() override = default;
/// The following operation initiations are exactly like ServerBidiReactor.
- void StartSendInitialMetadata() {
+ void StartSendInitialMetadata() Y_ABSL_LOCKS_EXCLUDED(writer_mu_) {
ServerCallbackWriter<Response>* writer =
writer_.load(std::memory_order_acquire);
if (writer == nullptr) {
@@ -590,7 +598,8 @@ class ServerWriteReactor : public internal::ServerReactor {
void StartWrite(const Response* resp) {
StartWrite(resp, ::grpc::WriteOptions());
}
- void StartWrite(const Response* resp, ::grpc::WriteOptions options) {
+ void StartWrite(const Response* resp, ::grpc::WriteOptions options)
+ Y_ABSL_LOCKS_EXCLUDED(writer_mu_) {
ServerCallbackWriter<Response>* writer =
writer_.load(std::memory_order_acquire);
if (writer == nullptr) {
@@ -598,14 +607,14 @@ class ServerWriteReactor : public internal::ServerReactor {
writer = writer_.load(std::memory_order_relaxed);
if (writer == nullptr) {
backlog_.write_wanted = resp;
- backlog_.write_options_wanted = std::move(options);
+ backlog_.write_options_wanted = options;
return;
}
}
- writer->Write(resp, std::move(options));
+ writer->Write(resp, options);
}
void StartWriteAndFinish(const Response* resp, ::grpc::WriteOptions options,
- ::grpc::Status s) {
+ ::grpc::Status s) Y_ABSL_LOCKS_EXCLUDED(writer_mu_) {
ServerCallbackWriter<Response>* writer =
writer_.load(std::memory_order_acquire);
if (writer == nullptr) {
@@ -614,17 +623,17 @@ class ServerWriteReactor : public internal::ServerReactor {
if (writer == nullptr) {
backlog_.write_and_finish_wanted = true;
backlog_.write_wanted = resp;
- backlog_.write_options_wanted = std::move(options);
+ backlog_.write_options_wanted = options;
backlog_.status_wanted = std::move(s);
return;
}
}
- writer->WriteAndFinish(resp, std::move(options), std::move(s));
+ writer->WriteAndFinish(resp, options, std::move(s));
}
void StartWriteLast(const Response* resp, ::grpc::WriteOptions options) {
- StartWrite(resp, std::move(options.set_last_message()));
+ StartWrite(resp, options.set_last_message());
}
- void Finish(::grpc::Status s) {
+ void Finish(::grpc::Status s) Y_ABSL_LOCKS_EXCLUDED(writer_mu_) {
ServerCallbackWriter<Response>* writer =
writer_.load(std::memory_order_acquire);
if (writer == nullptr) {
@@ -649,7 +658,8 @@ class ServerWriteReactor : public internal::ServerReactor {
friend class ServerCallbackWriter<Response>;
// May be overridden by internal implementation details. This is not a public
// customization point.
- virtual void InternalBindWriter(ServerCallbackWriter<Response>* writer) {
+ virtual void InternalBindWriter(ServerCallbackWriter<Response>* writer)
+ Y_ABSL_LOCKS_EXCLUDED(writer_mu_) {
grpc::internal::MutexLock l(&writer_mu_);
if (GPR_UNLIKELY(backlog_.send_initial_metadata_wanted)) {
@@ -682,16 +692,16 @@ class ServerWriteReactor : public internal::ServerReactor {
::grpc::WriteOptions write_options_wanted;
::grpc::Status status_wanted;
};
- PreBindBacklog backlog_ /* GUARDED_BY(writer_mu_) */;
+ PreBindBacklog backlog_ Y_ABSL_GUARDED_BY(writer_mu_);
};
class ServerUnaryReactor : public internal::ServerReactor {
public:
ServerUnaryReactor() : call_(nullptr) {}
- ~ServerUnaryReactor() = default;
+ ~ServerUnaryReactor() override = default;
/// StartSendInitialMetadata is exactly like ServerBidiReactor.
- void StartSendInitialMetadata() {
+ void StartSendInitialMetadata() Y_ABSL_LOCKS_EXCLUDED(call_mu_) {
ServerCallbackUnary* call = call_.load(std::memory_order_acquire);
if (call == nullptr) {
grpc::internal::MutexLock l(&call_mu_);
@@ -706,7 +716,7 @@ class ServerUnaryReactor : public internal::ServerReactor {
/// Finish is similar to ServerBidiReactor except for one detail.
/// If the status is non-OK, any message will not be sent. Instead,
/// the client will only receive the status and any trailing metadata.
- void Finish(::grpc::Status s) {
+ void Finish(::grpc::Status s) Y_ABSL_LOCKS_EXCLUDED(call_mu_) {
ServerCallbackUnary* call = call_.load(std::memory_order_acquire);
if (call == nullptr) {
grpc::internal::MutexLock l(&call_mu_);
@@ -729,7 +739,8 @@ class ServerUnaryReactor : public internal::ServerReactor {
friend class ServerCallbackUnary;
// May be overridden by internal implementation details. This is not a public
// customization point.
- virtual void InternalBindCall(ServerCallbackUnary* call) {
+ virtual void InternalBindCall(ServerCallbackUnary* call)
+ Y_ABSL_LOCKS_EXCLUDED(call_mu_) {
grpc::internal::MutexLock l(&call_mu_);
if (GPR_UNLIKELY(backlog_.send_initial_metadata_wanted)) {
@@ -749,7 +760,7 @@ class ServerUnaryReactor : public internal::ServerReactor {
bool finish_wanted = false;
::grpc::Status status_wanted;
};
- PreBindBacklog backlog_ /* GUARDED_BY(call_mu_) */;
+ PreBindBacklog backlog_ Y_ABSL_GUARDED_BY(call_mu_);
};
namespace internal {
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback_handlers.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback_handlers.h
index 8120fcaf851..76e655a9b3a 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback_handlers.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_callback_handlers.h
@@ -53,7 +53,7 @@ class CallbackUnaryHandler : public ::grpc::internal::MethodHandler {
param.call->call(), sizeof(ServerCallbackUnaryImpl)))
ServerCallbackUnaryImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
- param.call, allocator_state, std::move(param.call_requester));
+ param.call, allocator_state, param.call_requester);
param.server_context->BeginCompletionOp(
param.call, [call](bool) { call->MaybeDone(); }, call);
@@ -157,14 +157,15 @@ class CallbackUnaryHandler : public ::grpc::internal::MethodHandler {
// (OnSendInitialMetadataDone). Thus it must be dispatched to an executor
// thread. However, any OnDone needed after that can be inlined because it
// is already running on an executor thread.
- meta_tag_.Set(call_.call(),
- [this](bool ok) {
- ServerUnaryReactor* reactor =
- reactor_.load(std::memory_order_relaxed);
- reactor->OnSendInitialMetadataDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &meta_ops_, /*can_inline=*/false);
+ meta_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ ServerUnaryReactor* reactor =
+ reactor_.load(std::memory_order_relaxed);
+ reactor->OnSendInitialMetadataDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &meta_ops_, /*can_inline=*/false);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
if (ctx_->compression_level_set()) {
@@ -209,6 +210,9 @@ class CallbackUnaryHandler : public ::grpc::internal::MethodHandler {
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
allocator_state_->Release();
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackUnaryImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
@@ -265,7 +269,7 @@ class CallbackClientStreamingHandler : public ::grpc::internal::MethodHandler {
param.call->call(), sizeof(ServerCallbackReaderImpl)))
ServerCallbackReaderImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
- param.call, std::move(param.call_requester));
+ param.call, param.call_requester);
// Inlineable OnDone can be false in the CompletionOp callback because there
// is no read reactor that has an inlineable OnDone; this only applies to
// the DefaultReactor (which is unary).
@@ -305,14 +309,15 @@ class CallbackClientStreamingHandler : public ::grpc::internal::MethodHandler {
// A finish tag with only MaybeDone can have its callback inlined
// regardless even if OnDone is not inlineable because this callback just
// checks a ref and then decides whether or not to dispatch OnDone.
- finish_tag_.Set(call_.call(),
- [this](bool) {
- // Inlineable OnDone can be false here because there is
- // no read reactor that has an inlineable OnDone; this
- // only applies to the DefaultReactor (which is unary).
- this->MaybeDone(/*inlineable_ondone=*/false);
- },
- &finish_ops_, /*can_inline=*/true);
+ finish_tag_.Set(
+ call_.call(),
+ [this](bool) {
+ // Inlineable OnDone can be false here because there is
+ // no read reactor that has an inlineable OnDone; this
+ // only applies to the DefaultReactor (which is unary).
+ this->MaybeDone(/*inlineable_ondone=*/false);
+ },
+ &finish_ops_, /*can_inline=*/true);
if (!ctx_->sent_initial_metadata_) {
finish_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
@@ -338,14 +343,15 @@ class CallbackClientStreamingHandler : public ::grpc::internal::MethodHandler {
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
// the executor to which this callback is dispatched.
- meta_tag_.Set(call_.call(),
- [this](bool ok) {
- ServerReadReactor<RequestType>* reactor =
- reactor_.load(std::memory_order_relaxed);
- reactor->OnSendInitialMetadataDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &meta_ops_, /*can_inline=*/false);
+ meta_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ ServerReadReactor<RequestType>* reactor =
+ reactor_.load(std::memory_order_relaxed);
+ reactor->OnSendInitialMetadataDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &meta_ops_, /*can_inline=*/false);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
if (ctx_->compression_level_set()) {
@@ -375,12 +381,13 @@ class CallbackClientStreamingHandler : public ::grpc::internal::MethodHandler {
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
// the executor to which this callback is dispatched.
- read_tag_.Set(call_.call(),
- [this, reactor](bool ok) {
- reactor->OnReadDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &read_ops_, /*can_inline=*/false);
+ read_tag_.Set(
+ call_.call(),
+ [this, reactor](bool ok) {
+ reactor->OnReadDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &read_ops_, /*can_inline=*/false);
read_ops_.set_core_cq_tag(&read_tag_);
this->BindReactor(reactor);
this->MaybeCallOnCancel(reactor);
@@ -398,6 +405,9 @@ class CallbackClientStreamingHandler : public ::grpc::internal::MethodHandler {
reactor_.load(std::memory_order_relaxed)->OnDone();
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackReaderImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
@@ -449,7 +459,7 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler {
ServerCallbackWriterImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
param.call, static_cast<RequestType*>(param.request),
- std::move(param.call_requester));
+ param.call_requester);
// Inlineable OnDone can be false in the CompletionOp callback because there
// is no write reactor that has an inlineable OnDone; this only applies to
// the DefaultReactor (which is unary).
@@ -505,14 +515,15 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler {
// A finish tag with only MaybeDone can have its callback inlined
// regardless even if OnDone is not inlineable because this callback just
// checks a ref and then decides whether or not to dispatch OnDone.
- finish_tag_.Set(call_.call(),
- [this](bool) {
- // Inlineable OnDone can be false here because there is
- // no write reactor that has an inlineable OnDone; this
- // only applies to the DefaultReactor (which is unary).
- this->MaybeDone(/*inlineable_ondone=*/false);
- },
- &finish_ops_, /*can_inline=*/true);
+ finish_tag_.Set(
+ call_.call(),
+ [this](bool) {
+ // Inlineable OnDone can be false here because there is
+ // no write reactor that has an inlineable OnDone; this
+ // only applies to the DefaultReactor (which is unary).
+ this->MaybeDone(/*inlineable_ondone=*/false);
+ },
+ &finish_ops_, /*can_inline=*/true);
finish_ops_.set_core_cq_tag(&finish_tag_);
if (!ctx_->sent_initial_metadata_) {
@@ -533,14 +544,15 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler {
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
// the executor to which this callback is dispatched.
- meta_tag_.Set(call_.call(),
- [this](bool ok) {
- ServerWriteReactor<ResponseType>* reactor =
- reactor_.load(std::memory_order_relaxed);
- reactor->OnSendInitialMetadataDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &meta_ops_, /*can_inline=*/false);
+ meta_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ ServerWriteReactor<ResponseType>* reactor =
+ reactor_.load(std::memory_order_relaxed);
+ reactor->OnSendInitialMetadataDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &meta_ops_, /*can_inline=*/false);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
if (ctx_->compression_level_set()) {
@@ -595,12 +607,13 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler {
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
// the executor to which this callback is dispatched.
- write_tag_.Set(call_.call(),
- [this, reactor](bool ok) {
- reactor->OnWriteDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &write_ops_, /*can_inline=*/false);
+ write_tag_.Set(
+ call_.call(),
+ [this, reactor](bool ok) {
+ reactor->OnWriteDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &write_ops_, /*can_inline=*/false);
write_ops_.set_core_cq_tag(&write_tag_);
this->BindReactor(reactor);
this->MaybeCallOnCancel(reactor);
@@ -609,7 +622,11 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler {
// DefaultReactor (which is unary).
this->MaybeDone(/*inlineable_ondone=*/false);
}
- ~ServerCallbackWriterImpl() { req_->~RequestType(); }
+ ~ServerCallbackWriterImpl() {
+ if (req_ != nullptr) {
+ req_->~RequestType();
+ }
+ }
const RequestType* request() { return req_; }
@@ -617,6 +634,9 @@ class CallbackServerStreamingHandler : public ::grpc::internal::MethodHandler {
reactor_.load(std::memory_order_relaxed)->OnDone();
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackWriterImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
@@ -666,7 +686,7 @@ class CallbackBidiHandler : public ::grpc::internal::MethodHandler {
param.call->call(), sizeof(ServerCallbackReaderWriterImpl)))
ServerCallbackReaderWriterImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
- param.call, std::move(param.call_requester));
+ param.call, param.call_requester);
// Inlineable OnDone can be false in the CompletionOp callback because there
// is no bidi reactor that has an inlineable OnDone; this only applies to
// the DefaultReactor (which is unary).
@@ -707,14 +727,15 @@ class CallbackBidiHandler : public ::grpc::internal::MethodHandler {
// A finish tag with only MaybeDone can have its callback inlined
// regardless even if OnDone is not inlineable because this callback just
// checks a ref and then decides whether or not to dispatch OnDone.
- finish_tag_.Set(call_.call(),
- [this](bool) {
- // Inlineable OnDone can be false here because there is
- // no bidi reactor that has an inlineable OnDone; this
- // only applies to the DefaultReactor (which is unary).
- this->MaybeDone(/*inlineable_ondone=*/false);
- },
- &finish_ops_, /*can_inline=*/true);
+ finish_tag_.Set(
+ call_.call(),
+ [this](bool) {
+ // Inlineable OnDone can be false here because there is
+ // no bidi reactor that has an inlineable OnDone; this
+ // only applies to the DefaultReactor (which is unary).
+ this->MaybeDone(/*inlineable_ondone=*/false);
+ },
+ &finish_ops_, /*can_inline=*/true);
finish_ops_.set_core_cq_tag(&finish_tag_);
if (!ctx_->sent_initial_metadata_) {
@@ -735,14 +756,15 @@ class CallbackBidiHandler : public ::grpc::internal::MethodHandler {
// The callback for this function should not be inlined because it invokes
// a user-controlled reaction, but any resulting OnDone can be inlined in
// the executor to which this callback is dispatched.
- meta_tag_.Set(call_.call(),
- [this](bool ok) {
- ServerBidiReactor<RequestType, ResponseType>* reactor =
- reactor_.load(std::memory_order_relaxed);
- reactor->OnSendInitialMetadataDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &meta_ops_, /*can_inline=*/false);
+ meta_tag_.Set(
+ call_.call(),
+ [this](bool ok) {
+ ServerBidiReactor<RequestType, ResponseType>* reactor =
+ reactor_.load(std::memory_order_relaxed);
+ reactor->OnSendInitialMetadataDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &meta_ops_, /*can_inline=*/false);
meta_ops_.SendInitialMetadata(&ctx_->initial_metadata_,
ctx_->initial_metadata_flags());
if (ctx_->compression_level_set()) {
@@ -798,19 +820,21 @@ class CallbackBidiHandler : public ::grpc::internal::MethodHandler {
// The callbacks for these functions should not be inlined because they
// invoke user-controlled reactions, but any resulting OnDones can be
// inlined in the executor to which a callback is dispatched.
- write_tag_.Set(call_.call(),
- [this, reactor](bool ok) {
- reactor->OnWriteDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &write_ops_, /*can_inline=*/false);
+ write_tag_.Set(
+ call_.call(),
+ [this, reactor](bool ok) {
+ reactor->OnWriteDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &write_ops_, /*can_inline=*/false);
write_ops_.set_core_cq_tag(&write_tag_);
- read_tag_.Set(call_.call(),
- [this, reactor](bool ok) {
- reactor->OnReadDone(ok);
- this->MaybeDone(/*inlineable_ondone=*/true);
- },
- &read_ops_, /*can_inline=*/false);
+ read_tag_.Set(
+ call_.call(),
+ [this, reactor](bool ok) {
+ reactor->OnReadDone(ok);
+ this->MaybeDone(/*inlineable_ondone=*/true);
+ },
+ &read_ops_, /*can_inline=*/false);
read_ops_.set_core_cq_tag(&read_tag_);
this->BindReactor(reactor);
this->MaybeCallOnCancel(reactor);
@@ -824,6 +848,9 @@ class CallbackBidiHandler : public ::grpc::internal::MethodHandler {
reactor_.load(std::memory_order_relaxed)->OnDone();
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackReaderWriterImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_context.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_context.h
index 685f006cdaa..a73155e59fd 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_context.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_context.h
@@ -37,6 +37,7 @@
#include <grpcpp/impl/codegen/create_auth_context.h>
#include <grpcpp/impl/codegen/message_allocator.h>
#include <grpcpp/impl/codegen/metadata_map.h>
+#include <grpcpp/impl/codegen/rpc_service_method.h>
#include <grpcpp/impl/codegen/security/auth_context.h>
#include <grpcpp/impl/codegen/server_callback.h>
#include <grpcpp/impl/codegen/server_interceptor.h>
@@ -75,7 +76,11 @@ template <class RequestType, class ResponseType>
class CallbackBidiHandler;
template <class ServiceType, class RequestType, class ResponseType>
class ClientStreamingHandler;
-template <class ServiceType, class RequestType, class ResponseType>
+template <class ResponseType>
+void UnaryRunHandlerHelper(const MethodHandler::HandlerParameter&,
+ ResponseType*, Status&);
+template <class ServiceType, class RequestType, class ResponseType,
+ class BaseRequestType, class BaseResponseType>
class RpcMethodHandler;
template <class Base>
class FinishOnlyReactor;
@@ -95,6 +100,7 @@ class CompletionQueue;
class GenericServerContext;
class Server;
class ServerInterface;
+class ContextAllocator;
// TODO(vjpai): Remove namespace experimental when de-experimentalized fully.
namespace experimental {
@@ -260,7 +266,7 @@ class ServerContextBase {
///
/// \see grpc::AuthContext.
std::shared_ptr<const ::grpc::AuthContext> auth_context() const {
- if (auth_context_.get() == nullptr) {
+ if (auth_context_ == nullptr) {
auth_context_ = ::grpc::CreateAuthContext(call_.call);
}
return auth_context_;
@@ -335,6 +341,12 @@ class ServerContextBase {
ServerContextBase();
ServerContextBase(gpr_timespec deadline, grpc_metadata_array* arr);
+ void set_context_allocator(ContextAllocator* context_allocator) {
+ context_allocator_ = context_allocator;
+ }
+
+ ContextAllocator* context_allocator() const { return context_allocator_; }
+
private:
friend class ::grpc::testing::InteropServerContextInspector;
friend class ::grpc::testing::ServerContextTestSpouse;
@@ -355,7 +367,12 @@ class ServerContextBase {
friend class ::grpc::ServerWriter;
template <class W, class R>
friend class ::grpc::internal::ServerReaderWriterBody;
- template <class ServiceType, class RequestType, class ResponseType>
+ template <class ResponseType>
+ friend void ::grpc::internal::UnaryRunHandlerHelper(
+ const internal::MethodHandler::HandlerParameter& param, ResponseType* rsp,
+ Status& status);
+ template <class ServiceType, class RequestType, class ResponseType,
+ class BaseRequestType, class BaseResponseType>
friend class ::grpc::internal::RpcMethodHandler;
template <class ServiceType, class RequestType, class ResponseType>
friend class ::grpc::internal::ClientStreamingHandler;
@@ -405,7 +422,7 @@ class ServerContextBase {
const char* method, ::grpc::internal::RpcMethod::RpcType type,
const std::vector<std::unique_ptr<
::grpc::experimental::ServerInterceptorFactoryInterface>>& creators) {
- if (creators.size() != 0) {
+ if (!creators.empty()) {
rpc_info_ = new ::grpc::experimental::ServerRpcInfo(this, method, type);
rpc_info_->RegisterInterceptors(creators);
}
@@ -453,6 +470,7 @@ class ServerContextBase {
::grpc::experimental::ServerRpcInfo* rpc_info_ = nullptr;
::grpc::experimental::RpcAllocatorState* message_allocator_state_ = nullptr;
+ ContextAllocator* context_allocator_ = nullptr;
class Reactor : public ::grpc::ServerUnaryReactor {
public:
@@ -466,6 +484,7 @@ class ServerContextBase {
};
void SetupTestDefaultReactor(std::function<void(::grpc::Status)> func) {
+ // NOLINTNEXTLINE(modernize-make-unique)
test_unary_.reset(new TestServerCallbackUnary(this, std::move(func)));
}
bool test_status_set() const {
@@ -579,12 +598,14 @@ class CallbackServerContext : public ServerContextBase {
using ServerContextBase::compression_algorithm;
using ServerContextBase::compression_level;
using ServerContextBase::compression_level_set;
+ using ServerContextBase::context_allocator;
using ServerContextBase::deadline;
using ServerContextBase::IsCancelled;
using ServerContextBase::peer;
using ServerContextBase::raw_deadline;
using ServerContextBase::set_compression_algorithm;
using ServerContextBase::set_compression_level;
+ using ServerContextBase::set_context_allocator;
using ServerContextBase::SetLoadReportingCosts;
using ServerContextBase::TryCancel;
@@ -601,6 +622,37 @@ class CallbackServerContext : public ServerContextBase {
CallbackServerContext& operator=(const CallbackServerContext&) = delete;
};
+/// A CallbackServerContext allows users to use the contents of the
+/// CallbackServerContext or GenericCallbackServerContext structure for the
+/// callback API.
+/// The library will invoke the allocator any time a new call is initiated.
+/// and call the Release method after the server OnDone.
+class ContextAllocator {
+ public:
+ virtual ~ContextAllocator() {}
+
+ virtual CallbackServerContext* NewCallbackServerContext() { return nullptr; }
+
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+ virtual experimental::GenericCallbackServerContext*
+ NewGenericCallbackServerContext() {
+ return nullptr;
+ }
+#else
+ virtual GenericCallbackServerContext* NewGenericCallbackServerContext() {
+ return nullptr;
+ }
+#endif
+
+ virtual void Release(CallbackServerContext*) {}
+
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+ virtual void Release(experimental::GenericCallbackServerContext*) {}
+#else
+ virtual void Release(GenericCallbackServerContext*) {}
+#endif
+};
+
} // namespace grpc
static_assert(
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
index d97b7250251..7fb50388268 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/server_interface.h
@@ -64,7 +64,7 @@ class ServerInterceptorFactoryInterface;
class ServerInterface : public internal::CallHook {
public:
- virtual ~ServerInterface() {}
+ ~ServerInterface() override {}
/// \a Shutdown does the following things:
///
@@ -147,6 +147,8 @@ class ServerInterface : public internal::CallHook {
/// May not be abstract since this is a post-1.0 API addition
virtual void RegisterCallbackGenericService(
experimental::CallbackGenericService* /*service*/) {}
+ virtual void RegisterContextAllocator(
+ std::unique_ptr<ContextAllocator> /*context_allocator*/) {}
};
/// NOTE: The function experimental_registration() is not stable public API.
@@ -186,8 +188,8 @@ class ServerInterface : public internal::CallHook {
virtual grpc_server* server() = 0;
- virtual void PerformOpsOnCall(internal::CallOpSetInterface* ops,
- internal::Call* call) = 0;
+ void PerformOpsOnCall(internal::CallOpSetInterface* ops,
+ internal::Call* call) override = 0;
class BaseAsyncRequest : public internal::CompletionQueueTag {
public:
@@ -196,7 +198,7 @@ class ServerInterface : public internal::CallHook {
::grpc::CompletionQueue* call_cq,
::grpc::ServerCompletionQueue* notification_cq, void* tag,
bool delete_on_finalize);
- virtual ~BaseAsyncRequest();
+ ~BaseAsyncRequest() override;
bool FinalizeResult(void** tag, bool* status) override;
@@ -228,7 +230,7 @@ class ServerInterface : public internal::CallHook {
void* tag, const char* name,
internal::RpcMethod::RpcType type);
- virtual bool FinalizeResult(void** tag, bool* status) override {
+ bool FinalizeResult(void** tag, bool* status) override {
/* If we are done intercepting, then there is nothing more for us to do */
if (done_intercepting_) {
return BaseAsyncRequest::FinalizeResult(tag, status);
@@ -283,7 +285,7 @@ class ServerInterface : public internal::CallHook {
notification_cq);
}
- ~PayloadAsyncRequest() {
+ ~PayloadAsyncRequest() override {
payload_.Release(); // We do not own the payload_
}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/service_type.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/service_type.h
index 30be904a3c3..57ca9f09447 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/service_type.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/service_type.h
@@ -91,7 +91,7 @@ class Service {
bool has_generic_methods() const {
for (const auto& method : methods_) {
- if (method.get() == nullptr) {
+ if (method == nullptr) {
return true;
}
}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/slice.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/slice.h
index b1a24dcef8b..0b9752ccff8 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/slice.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/slice.h
@@ -49,7 +49,7 @@ class Slice final {
Slice(grpc_slice slice, StealRef) : slice_(slice) {}
/// Allocate a slice of specified size
- Slice(size_t len)
+ explicit Slice(size_t len)
: slice_(g_core_codegen_interface->grpc_slice_malloc(len)) {}
/// Construct a slice from a copied buffer
@@ -58,6 +58,7 @@ class Slice final {
reinterpret_cast<const char*>(buf), len)) {}
/// Construct a slice from a copied string
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
Slice(const TString& str)
: slice_(g_core_codegen_interface->grpc_slice_from_copied_buffer(
str.c_str(), str.length())) {}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/string_ref.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/string_ref.h
index c5dcd31c1de..a13533eca5a 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/string_ref.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/string_ref.h
@@ -53,14 +53,17 @@ class string_ref {
string_ref() : data_(nullptr), length_(0) {}
string_ref(const string_ref& other)
: data_(other.data_), length_(other.length_) {}
+ // NOLINTNEXTLINE(bugprone-unhandled-self-assignment)
string_ref& operator=(const string_ref& rhs) {
data_ = rhs.data_;
length_ = rhs.length_;
return *this;
}
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
string_ref(const char* s) : data_(s), length_(strlen(s)) {}
string_ref(const char* s, size_t l) : data_(s), length_(l) {}
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
string_ref(const TString& s) : data_(s.data()), length_(s.length()) {}
/// iterators
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/sync.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/sync.h
index 146f182e57b..bf89a0e39a2 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/sync.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/sync.h
@@ -32,6 +32,8 @@
#include <grpcpp/impl/codegen/core_codegen_interface.h>
+#include "y_absl/synchronization/mutex.h"
+
// The core library is not accessible in C++ codegen headers, and vice versa.
// Thus, we need to have duplicate headers with similar functionality.
// Make sure any change to this file is also reflected in
@@ -44,7 +46,16 @@
namespace grpc {
namespace internal {
-class Mutex {
+#ifdef GRPCPP_ABSEIL_SYNC
+
+using Mutex = y_absl::Mutex;
+using MutexLock = y_absl::MutexLock;
+using ReleasableMutexLock = y_absl::ReleasableMutexLock;
+using CondVar = y_absl::CondVar;
+
+#else
+
+class Y_ABSL_LOCKABLE Mutex {
public:
Mutex() { g_core_codegen_interface->gpr_mu_init(&mu_); }
~Mutex() { g_core_codegen_interface->gpr_mu_destroy(&mu_); }
@@ -52,8 +63,12 @@ class Mutex {
Mutex(const Mutex&) = delete;
Mutex& operator=(const Mutex&) = delete;
- gpr_mu* get() { return &mu_; }
- const gpr_mu* get() const { return &mu_; }
+ void Lock() Y_ABSL_EXCLUSIVE_LOCK_FUNCTION() {
+ g_core_codegen_interface->gpr_mu_lock(&mu_);
+ }
+ void Unlock() Y_ABSL_UNLOCK_FUNCTION() {
+ g_core_codegen_interface->gpr_mu_unlock(&mu_);
+ }
private:
union {
@@ -63,55 +78,45 @@ class Mutex {
pthread_mutex_t do_not_use_pth_;
#endif
};
+
+ friend class CondVar;
};
-// MutexLock is a std::
-class MutexLock {
+class Y_ABSL_SCOPED_LOCKABLE MutexLock {
public:
- explicit MutexLock(Mutex* mu) : mu_(mu->get()) {
- g_core_codegen_interface->gpr_mu_lock(mu_);
+ explicit MutexLock(Mutex* mu) Y_ABSL_EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
+ mu_->Lock();
}
- explicit MutexLock(gpr_mu* mu) : mu_(mu) {
- g_core_codegen_interface->gpr_mu_lock(mu_);
- }
- ~MutexLock() { g_core_codegen_interface->gpr_mu_unlock(mu_); }
+ ~MutexLock() Y_ABSL_UNLOCK_FUNCTION() { mu_->Unlock(); }
MutexLock(const MutexLock&) = delete;
MutexLock& operator=(const MutexLock&) = delete;
private:
- gpr_mu* const mu_;
+ Mutex* const mu_;
};
-class ReleasableMutexLock {
+class Y_ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
public:
- explicit ReleasableMutexLock(Mutex* mu) : mu_(mu->get()) {
- g_core_codegen_interface->gpr_mu_lock(mu_);
- }
- explicit ReleasableMutexLock(gpr_mu* mu) : mu_(mu) {
- g_core_codegen_interface->gpr_mu_lock(mu_);
+ explicit ReleasableMutexLock(Mutex* mu) Y_ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
+ : mu_(mu) {
+ mu_->Lock();
}
- ~ReleasableMutexLock() {
- if (!released_) g_core_codegen_interface->gpr_mu_unlock(mu_);
+ ~ReleasableMutexLock() Y_ABSL_UNLOCK_FUNCTION() {
+ if (!released_) mu_->Unlock();
}
ReleasableMutexLock(const ReleasableMutexLock&) = delete;
ReleasableMutexLock& operator=(const ReleasableMutexLock&) = delete;
- void Lock() {
- GPR_DEBUG_ASSERT(released_);
- g_core_codegen_interface->gpr_mu_lock(mu_);
- released_ = false;
- }
-
- void Unlock() {
+ void Release() Y_ABSL_UNLOCK_FUNCTION() {
GPR_DEBUG_ASSERT(!released_);
released_ = true;
- g_core_codegen_interface->gpr_mu_unlock(mu_);
+ mu_->Unlock();
}
private:
- gpr_mu* const mu_;
+ Mutex* const mu_;
bool released_ = false;
};
@@ -124,27 +129,27 @@ class CondVar {
CondVar& operator=(const CondVar&) = delete;
void Signal() { g_core_codegen_interface->gpr_cv_signal(&cv_); }
- void Broadcast() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); }
-
- int Wait(Mutex* mu) {
- return Wait(mu,
- g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
- }
- int Wait(Mutex* mu, const gpr_timespec& deadline) {
- return g_core_codegen_interface->gpr_cv_wait(&cv_, mu->get(), deadline);
- }
+ void SignalAll() { g_core_codegen_interface->gpr_cv_broadcast(&cv_); }
- template <typename Predicate>
- void WaitUntil(Mutex* mu, Predicate pred) {
- while (!pred()) {
- Wait(mu, g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
- }
+ void Wait(Mutex* mu) {
+ g_core_codegen_interface->gpr_cv_wait(
+ &cv_, &mu->mu_,
+ g_core_codegen_interface->gpr_inf_future(GPR_CLOCK_REALTIME));
}
private:
gpr_cv cv_;
};
+#endif // GRPCPP_ABSEIL_SYNC
+
+template <typename Predicate>
+static void WaitUntil(CondVar* cv, Mutex* mu, Predicate pred) {
+ while (!pred()) {
+ cv->Wait(mu);
+ }
+}
+
} // namespace internal
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/impl/codegen/time.h b/contrib/libs/grpc/include/grpcpp/impl/codegen/time.h
index 3a54db45bf1..88cf12fd829 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/codegen/time.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/codegen/time.h
@@ -54,6 +54,7 @@ class TimePoint {
template <>
class TimePoint<gpr_timespec> {
public:
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
TimePoint(const gpr_timespec& time) : time_(time) {}
gpr_timespec raw_time() { return time_; }
@@ -77,6 +78,7 @@ std::chrono::system_clock::time_point Timespec2Timepoint(gpr_timespec t);
template <>
class TimePoint<std::chrono::system_clock::time_point> {
public:
+ /* NOLINTNEXTLINE(google-explicit-constructor) */
TimePoint(const std::chrono::system_clock::time_point& time) {
Timepoint2Timespec(time, &time_);
}
diff --git a/contrib/libs/grpc/include/grpcpp/impl/server_initializer.h b/contrib/libs/grpc/include/grpcpp/impl/server_initializer.h
index 38b17edacdc..17928e9a4a0 100644
--- a/contrib/libs/grpc/include/grpcpp/impl/server_initializer.h
+++ b/contrib/libs/grpc/include/grpcpp/impl/server_initializer.h
@@ -30,7 +30,7 @@ class Service;
class ServerInitializer {
public:
- ServerInitializer(grpc::Server* server) : server_(server) {}
+ explicit ServerInitializer(grpc::Server* server) : server_(server) {}
bool RegisterService(std::shared_ptr<grpc::Service> service) {
if (!server_->RegisterService(nullptr, service.get())) {
diff --git a/contrib/libs/grpc/include/grpcpp/resource_quota.h b/contrib/libs/grpc/include/grpcpp/resource_quota.h
index eb2b7e73af3..01f7ed4dc6f 100644
--- a/contrib/libs/grpc/include/grpcpp/resource_quota.h
+++ b/contrib/libs/grpc/include/grpcpp/resource_quota.h
@@ -36,7 +36,7 @@ class ResourceQuota final : private ::grpc::GrpcLibraryCodegen {
/// \param name - a unique name for this ResourceQuota.
explicit ResourceQuota(const TString& name);
ResourceQuota();
- ~ResourceQuota();
+ ~ResourceQuota() override;
/// Resize this \a ResourceQuota to a new size. If \a new_size is smaller
/// than the current size of the pool, memory usage will be monotonically
diff --git a/contrib/libs/grpc/include/grpcpp/security/credentials.h b/contrib/libs/grpc/include/grpcpp/security/credentials.h
index 339e9d4c278..fded203821d 100644
--- a/contrib/libs/grpc/include/grpcpp/security/credentials.h
+++ b/contrib/libs/grpc/include/grpcpp/security/credentials.h
@@ -58,7 +58,11 @@ std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
std::vector<
std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
-}
+
+/// Builds XDS Credentials.
+std::shared_ptr<ChannelCredentials> XdsCredentials(
+ const std::shared_ptr<ChannelCredentials>& fallback_creds);
+} // namespace experimental
/// A channel credentials object encapsulates all the state needed by a client
/// to authenticate with a server for a given channel.
@@ -69,13 +73,20 @@ std::shared_ptr<grpc::Channel> CreateCustomChannelWithInterceptors(
class ChannelCredentials : private grpc::GrpcLibraryCodegen {
public:
ChannelCredentials();
- ~ChannelCredentials();
+ ~ChannelCredentials() override;
protected:
friend std::shared_ptr<ChannelCredentials> CompositeChannelCredentials(
const std::shared_ptr<ChannelCredentials>& channel_creds,
const std::shared_ptr<CallCredentials>& call_creds);
+ // TODO(yashykt): We need this friend declaration mainly for access to
+ // AsSecureCredentials(). Once we are able to remove insecure builds from gRPC
+ // (and also internal dependencies on the indirect method of creating a
+ // channel through credentials), we would be able to remove this.
+ friend std::shared_ptr<ChannelCredentials> grpc::experimental::XdsCredentials(
+ const std::shared_ptr<ChannelCredentials>& fallback_creds);
+
virtual SecureChannelCredentials* AsSecureCredentials() = 0;
private:
@@ -105,6 +116,11 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen {
/*interceptor_creators*/) {
return nullptr;
}
+
+ // TODO(yashkt): This is a hack that is needed since InsecureCredentials can
+ // not use grpc_channel_credentials internally and should be removed after
+ // insecure builds are removed from gRPC.
+ virtual bool IsInsecure() const { return false; }
};
/// A call credentials object encapsulates the state needed by a client to
@@ -114,7 +130,7 @@ class ChannelCredentials : private grpc::GrpcLibraryCodegen {
class CallCredentials : private grpc::GrpcLibraryCodegen {
public:
CallCredentials();
- ~CallCredentials();
+ ~CallCredentials() override;
/// Apply this instance's credentials to \a call.
virtual bool ApplyToCall(grpc_call* call) = 0;
@@ -265,6 +281,12 @@ class MetadataCredentialsPlugin {
std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
std::unique_ptr<MetadataCredentialsPlugin> plugin);
+/// Builds External Account credentials.
+/// json_string is the JSON string containing the credentials options.
+/// scopes contains the scopes to be binded with the credentials.
+std::shared_ptr<CallCredentials> ExternalAccountCredentials(
+ const grpc::string& json_string, const std::vector<grpc::string>& scopes);
+
namespace experimental {
/// Options for creating STS Oauth Token Exchange credentials following the IETF
@@ -317,7 +339,7 @@ std::shared_ptr<ChannelCredentials> LocalCredentials(
/// Builds TLS Credentials given TLS options.
std::shared_ptr<ChannelCredentials> TlsCredentials(
- const TlsCredentialsOptions& options);
+ const TlsChannelCredentialsOptions& options);
} // namespace experimental
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/security/server_credentials.h b/contrib/libs/grpc/include/grpcpp/security/server_credentials.h
index d0a532360a8..290b410c1ce 100644
--- a/contrib/libs/grpc/include/grpcpp/security/server_credentials.h
+++ b/contrib/libs/grpc/include/grpcpp/security/server_credentials.h
@@ -32,13 +32,15 @@ struct grpc_server;
namespace grpc {
class Server;
+class ServerCredentials;
+class SecureServerCredentials;
/// Options to create ServerCredentials with SSL
struct SslServerCredentialsOptions {
/// \warning Deprecated
SslServerCredentialsOptions()
: force_client_auth(false),
client_certificate_request(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE) {}
- SslServerCredentialsOptions(
+ explicit SslServerCredentialsOptions(
grpc_ssl_client_certificate_request_type request_type)
: force_client_auth(false), client_certificate_request(request_type) {}
@@ -58,10 +60,17 @@ struct SslServerCredentialsOptions {
grpc_ssl_client_certificate_request_type client_certificate_request;
};
+namespace experimental {
+/// Builds Xds ServerCredentials given fallback credentials
+std::shared_ptr<ServerCredentials> XdsServerCredentials(
+ const std::shared_ptr<ServerCredentials>& fallback_credentials);
+} // namespace experimental
+
/// Wrapper around \a grpc_server_credentials, a way to authenticate a server.
-class ServerCredentials {
+class ServerCredentials : private grpc::GrpcLibraryCodegen {
public:
- virtual ~ServerCredentials();
+ ServerCredentials();
+ ~ServerCredentials() override;
/// This method is not thread-safe and has to be called before the server is
/// started. The last call to this function wins.
@@ -71,12 +80,30 @@ class ServerCredentials {
private:
friend class Server;
+ // We need this friend declaration for access to Insecure() and
+ // AsSecureServerCredentials(). When these two functions are no longer
+ // necessary, this friend declaration can be removed too.
+ friend std::shared_ptr<ServerCredentials>
+ grpc::experimental::XdsServerCredentials(
+ const std::shared_ptr<ServerCredentials>& fallback_credentials);
+
/// Tries to bind \a server to the given \a addr (eg, localhost:1234,
/// 192.168.1.1:31416, [::1]:27182, etc.)
///
/// \return bound port number on success, 0 on failure.
// TODO(dgq): the "port" part seems to be a misnomer.
virtual int AddPortToServer(const TString& addr, grpc_server* server) = 0;
+
+ // TODO(yashykt): This is a hack since InsecureServerCredentials() cannot use
+ // grpc_insecure_server_credentials_create() and should be removed after
+ // insecure builds are removed from gRPC.
+ virtual bool IsInsecure() const { return false; }
+
+ // TODO(yashkt): This is a hack that should be removed once we remove insecure
+ // builds and the indirect method of adding ports to a server.
+ virtual SecureServerCredentials* AsSecureServerCredentials() {
+ return nullptr;
+ }
};
/// Builds SSL ServerCredentials given SSL specific options
@@ -105,7 +132,7 @@ std::shared_ptr<ServerCredentials> LocalServerCredentials(
/// Builds TLS ServerCredentials given TLS options.
std::shared_ptr<ServerCredentials> TlsServerCredentials(
- const experimental::TlsCredentialsOptions& options);
+ const experimental::TlsServerCredentialsOptions& options);
} // namespace experimental
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/security/tls_certificate_provider.h b/contrib/libs/grpc/include/grpcpp/security/tls_certificate_provider.h
new file mode 100644
index 00000000000..12c60452d22
--- /dev/null
+++ b/contrib/libs/grpc/include/grpcpp/security/tls_certificate_provider.h
@@ -0,0 +1,130 @@
+//
+// 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.
+//
+
+#ifndef GRPCPP_SECURITY_TLS_CERTIFICATE_PROVIDER_H
+#define GRPCPP_SECURITY_TLS_CERTIFICATE_PROVIDER_H
+
+#include <grpc/grpc_security_constants.h>
+#include <grpc/status.h>
+#include <grpc/support/log.h>
+#include <grpcpp/impl/codegen/grpc_library.h>
+#include <grpcpp/support/config.h>
+
+#include <memory>
+#include <vector>
+
+// TODO(yihuazhang): remove the forward declaration here and include
+// <grpc/grpc_security.h> directly once the insecure builds are cleaned up.
+typedef struct grpc_tls_certificate_provider grpc_tls_certificate_provider;
+
+namespace grpc {
+namespace experimental {
+
+// Interface for a class that handles the process to fetch credential data.
+// Implementations should be a wrapper class of an internal provider
+// implementation.
+class CertificateProviderInterface {
+ public:
+ virtual ~CertificateProviderInterface() = default;
+ virtual grpc_tls_certificate_provider* c_provider() = 0;
+};
+
+// A struct that stores the credential data presented to the peer in handshake
+// to show local identity. The private_key and certificate_chain should always
+// match.
+struct IdentityKeyCertPair {
+ TString private_key;
+ TString certificate_chain;
+};
+
+// A basic CertificateProviderInterface implementation that will load credential
+// data from static string during initialization. This provider will always
+// return the same cert data for all cert names, and reloading is not supported.
+class StaticDataCertificateProvider : public CertificateProviderInterface {
+ public:
+ StaticDataCertificateProvider(
+ const TString& root_certificate,
+ const std::vector<IdentityKeyCertPair>& identity_key_cert_pairs);
+
+ explicit StaticDataCertificateProvider(const TString& root_certificate)
+ : StaticDataCertificateProvider(root_certificate, {}) {}
+
+ explicit StaticDataCertificateProvider(
+ const std::vector<IdentityKeyCertPair>& identity_key_cert_pairs)
+ : StaticDataCertificateProvider("", identity_key_cert_pairs) {}
+
+ ~StaticDataCertificateProvider() override;
+
+ grpc_tls_certificate_provider* c_provider() override { return c_provider_; }
+
+ private:
+ grpc_tls_certificate_provider* c_provider_ = nullptr;
+};
+
+// A CertificateProviderInterface implementation that will watch the credential
+// changes on the file system. This provider will always return the up-to-date
+// cert data for all the cert names callers set through |TlsCredentialsOptions|.
+// Several things to note:
+// 1. This API only supports one key-cert file and hence one set of identity
+// key-cert pair, so SNI(Server Name Indication) is not supported.
+// 2. The private key and identity certificate should always match. This API
+// guarantees atomic read, and it is the callers' responsibility to do atomic
+// updates. There are many ways to atomically update the key and certs in the
+// file system. To name a few:
+// 1) creating a new directory, renaming the old directory to a new name, and
+// then renaming the new directory to the original name of the old directory.
+// 2) using a symlink for the directory. When need to change, put new
+// credential data in a new directory, and change symlink.
+class FileWatcherCertificateProvider final
+ : public CertificateProviderInterface {
+ public:
+ // Constructor to get credential updates from root and identity file paths.
+ //
+ // @param private_key_path is the file path of the private key.
+ // @param identity_certificate_path is the file path of the identity
+ // certificate chain.
+ // @param root_cert_path is the file path to the root certificate bundle.
+ // @param refresh_interval_sec is the refreshing interval that we will check
+ // the files for updates.
+ FileWatcherCertificateProvider(const TString& private_key_path,
+ const TString& identity_certificate_path,
+ const TString& root_cert_path,
+ unsigned int refresh_interval_sec);
+ // Constructor to get credential updates from identity file paths only.
+ FileWatcherCertificateProvider(const TString& private_key_path,
+ const TString& identity_certificate_path,
+ unsigned int refresh_interval_sec)
+ : FileWatcherCertificateProvider(private_key_path,
+ identity_certificate_path, "",
+ refresh_interval_sec) {}
+ // Constructor to get credential updates from root file path only.
+ FileWatcherCertificateProvider(const TString& root_cert_path,
+ unsigned int refresh_interval_sec)
+ : FileWatcherCertificateProvider("", "", root_cert_path,
+ refresh_interval_sec) {}
+
+ ~FileWatcherCertificateProvider() override;
+
+ grpc_tls_certificate_provider* c_provider() override { return c_provider_; }
+
+ private:
+ grpc_tls_certificate_provider* c_provider_ = nullptr;
+};
+
+} // namespace experimental
+} // namespace grpc
+
+#endif // GRPCPP_SECURITY_TLS_CERTIFICATE_PROVIDER_H
diff --git a/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h b/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
index f704cf61295..b849ec2e6bd 100644
--- a/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
+++ b/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
@@ -22,151 +22,24 @@
#include <grpc/grpc_security_constants.h>
#include <grpc/status.h>
#include <grpc/support/log.h>
+#include <grpcpp/security/tls_certificate_provider.h>
#include <grpcpp/support/config.h>
#include <memory>
#include <vector>
-typedef struct grpc_tls_credential_reload_arg grpc_tls_credential_reload_arg;
-typedef struct grpc_tls_credential_reload_config
- grpc_tls_credential_reload_config;
+// TODO(yihuazhang): remove the forward declaration here and include
+// <grpc/grpc_security.h> directly once the insecure builds are cleaned up.
typedef struct grpc_tls_server_authorization_check_arg
grpc_tls_server_authorization_check_arg;
typedef struct grpc_tls_server_authorization_check_config
grpc_tls_server_authorization_check_config;
typedef struct grpc_tls_credentials_options grpc_tls_credentials_options;
+typedef struct grpc_tls_certificate_provider grpc_tls_certificate_provider;
namespace grpc {
namespace experimental {
-/** TLS key materials config, wrapper for grpc_tls_key_materials_config. It is
- * used for experimental purposes for now and subject to change. **/
-class TlsKeyMaterialsConfig {
- public:
- struct PemKeyCertPair {
- TString private_key;
- TString cert_chain;
- };
-
- /** Getters for member fields. **/
- const TString pem_root_certs() const { return pem_root_certs_; }
- const std::vector<PemKeyCertPair>& pem_key_cert_pair_list() const {
- return pem_key_cert_pair_list_;
- }
- int version() const { return version_; }
-
- /** Setter for key materials that will be called by the user. Ownership of the
- * arguments will not be transferred. **/
- void set_pem_root_certs(const TString& pem_root_certs);
- void add_pem_key_cert_pair(const PemKeyCertPair& pem_key_cert_pair);
- void set_key_materials(
- const TString& pem_root_certs,
- const std::vector<PemKeyCertPair>& pem_key_cert_pair_list);
- void set_version(int version) { version_ = version; };
-
- private:
- int version_ = 0;
- std::vector<PemKeyCertPair> pem_key_cert_pair_list_;
- TString pem_root_certs_;
-};
-
-/** TLS credential reload arguments, wraps grpc_tls_credential_reload_arg. It is
- * used for experimental purposes for now and it is subject to change.
- *
- * The credential reload arg contains all the info necessary to schedule/cancel
- * a credential reload request. The callback function must be called after
- * finishing the schedule operation. See the description of the
- * grpc_tls_credential_reload_arg struct in grpc_security.h for more details.
- * **/
-class TlsCredentialReloadArg {
- public:
- /** TlsCredentialReloadArg does not take ownership of the C arg that is passed
- * to the constructor. One must remember to free any memory allocated to the
- * C arg after using the setter functions below. **/
- TlsCredentialReloadArg(grpc_tls_credential_reload_arg* arg);
- ~TlsCredentialReloadArg();
-
- /** Getters for member fields. **/
- void* cb_user_data() const;
- bool is_pem_key_cert_pair_list_empty() const;
- grpc_ssl_certificate_config_reload_status status() const;
- TString error_details() const;
-
- /** Setters for member fields. Ownership of the arguments will not be
- * transferred. **/
- void set_cb_user_data(void* cb_user_data);
- void set_pem_root_certs(const TString& pem_root_certs);
- void add_pem_key_cert_pair(
- const TlsKeyMaterialsConfig::PemKeyCertPair& pem_key_cert_pair);
- void set_key_materials(const TString& pem_root_certs,
- std::vector<TlsKeyMaterialsConfig::PemKeyCertPair>
- pem_key_cert_pair_list);
- void set_key_materials_config(
- const std::shared_ptr<TlsKeyMaterialsConfig>& key_materials_config);
- void set_status(grpc_ssl_certificate_config_reload_status status);
- void set_error_details(const TString& error_details);
-
- /** Calls the C arg's callback function. **/
- void OnCredentialReloadDoneCallback();
-
- private:
- grpc_tls_credential_reload_arg* c_arg_;
-};
-
-/** An interface that the application derives and uses to instantiate a
- * TlsCredentialReloadConfig instance. Refer to the definition of the
- * grpc_tls_credential_reload_config in grpc_tls_credentials_options.h for more
- * details on the expectations of the member functions of the interface. **/
-struct TlsCredentialReloadInterface {
- virtual ~TlsCredentialReloadInterface() = default;
- /** A callback that invokes the credential reload. **/
- virtual int Schedule(TlsCredentialReloadArg* arg) = 0;
- /** A callback that cancels a credential reload request. **/
- virtual void Cancel(TlsCredentialReloadArg* /* arg */) {}
-};
-
-/** TLS credential reloag config, wraps grpc_tls_credential_reload_config. It is
- * used for experimental purposes for now and it is subject to change. **/
-class TlsCredentialReloadConfig {
- public:
- TlsCredentialReloadConfig(std::shared_ptr<TlsCredentialReloadInterface>
- credential_reload_interface);
- ~TlsCredentialReloadConfig();
-
- int Schedule(TlsCredentialReloadArg* arg) const {
- if (credential_reload_interface_ == nullptr) {
- gpr_log(GPR_ERROR, "credential reload interface is nullptr");
- if (arg != nullptr) {
- arg->set_status(GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_FAIL);
- arg->set_error_details(
- "the interface of the credential reload config is nullptr");
- }
- return 1;
- }
- return credential_reload_interface_->Schedule(arg);
- }
-
- void Cancel(TlsCredentialReloadArg* arg) const {
- if (credential_reload_interface_ == nullptr) {
- gpr_log(GPR_ERROR, "credential reload interface is nullptr");
- if (arg != nullptr) {
- arg->set_status(GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_FAIL);
- arg->set_error_details(
- "the interface of the credential reload config is nullptr");
- }
- return;
- }
- credential_reload_interface_->Cancel(arg);
- }
-
- /** Returns a C struct for the credential reload config. **/
- grpc_tls_credential_reload_config* c_config() const { return c_config_; }
-
- private:
- grpc_tls_credential_reload_config* c_config_;
- std::shared_ptr<TlsCredentialReloadInterface> credential_reload_interface_;
-};
-
/** TLS server authorization check arguments, wraps
* grpc_tls_server_authorization_check_arg. It is used for experimental
* purposes for now and it is subject to change.
@@ -181,7 +54,8 @@ class TlsServerAuthorizationCheckArg {
/** TlsServerAuthorizationCheckArg does not take ownership of the C arg passed
* to the constructor. One must remember to free any memory allocated to the
* C arg after using the setter functions below. **/
- TlsServerAuthorizationCheckArg(grpc_tls_server_authorization_check_arg* arg);
+ explicit TlsServerAuthorizationCheckArg(
+ grpc_tls_server_authorization_check_arg* arg);
~TlsServerAuthorizationCheckArg();
/** Getters for member fields. **/
@@ -228,7 +102,7 @@ struct TlsServerAuthorizationCheckInterface {
* purposes for now and it is subject to change. **/
class TlsServerAuthorizationCheckConfig {
public:
- TlsServerAuthorizationCheckConfig(
+ explicit TlsServerAuthorizationCheckConfig(
std::shared_ptr<TlsServerAuthorizationCheckInterface>
server_authorization_check_interface);
~TlsServerAuthorizationCheckConfig();
@@ -272,71 +146,97 @@ class TlsServerAuthorizationCheckConfig {
server_authorization_check_interface_;
};
-/** TLS credentials options, wrapper for grpc_tls_credentials_options. It is
- * used for experimental purposes for now and it is subject to change. See the
- * description of the grpc_tls_credentials_options struct in grpc_security.h for
- * more details. **/
+// Base class of configurable options specified by users to configure their
+// certain security features supported in TLS. It is used for experimental
+// purposes for now and it is subject to change.
class TlsCredentialsOptions {
public:
- // Constructor for client.
- explicit TlsCredentialsOptions(
- grpc_tls_server_verification_option server_verification_option,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
- std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config);
+ // Constructor for base class TlsCredentialsOptions.
+ //
+ // @param certificate_provider the provider which fetches TLS credentials that
+ // will be used in the TLS handshake
+ TlsCredentialsOptions();
+ // ---- Setters for member fields ----
+ // Sets the certificate provider used to store root certs and identity certs.
+ void set_certificate_provider(
+ std::shared_ptr<CertificateProviderInterface> certificate_provider);
+ // Watches the updates of root certificates with name |root_cert_name|.
+ // If used in TLS credentials, setting this field is optional for both the
+ // client side and the server side.
+ // If this is not set on the client side, we will use the root certificates
+ // stored in the default system location, since client side must provide root
+ // certificates in TLS(no matter single-side TLS or mutual TLS).
+ // If this is not set on the server side, we will not watch any root
+ // certificate updates, and assume no root certificates needed for the server
+ // (in the one-side TLS scenario, the server is not required to provide root
+ // certs). We don't support default root certs on server side.
+ void watch_root_certs();
+ // Sets the name of root certificates being watched, if |watch_root_certs| is
+ // called. If not set, an empty string will be used as the name.
+ //
+ // @param root_cert_name the name of root certs being set.
+ void set_root_cert_name(const TString& root_cert_name);
+ // Watches the updates of identity key-cert pairs with name
+ // |identity_cert_name|. If used in TLS credentials, it is required to be set
+ // on the server side, and optional for the client side(in the one-side
+ // TLS scenario, the client is not required to provide identity certs).
+ void watch_identity_key_cert_pairs();
+ // Sets the name of identity key-cert pairs being watched, if
+ // |watch_identity_key_cert_pairs| is called. If not set, an empty string will
+ // be used as the name.
+ //
+ // @param identity_cert_name the name of identity key-cert pairs being set.
+ void set_identity_cert_name(const TString& identity_cert_name);
+
+ // ----- Getters for member fields ----
+ // Get the internal c options. This function shall be used only internally.
+ grpc_tls_credentials_options* c_credentials_options() const {
+ return c_credentials_options_;
+ }
- // Constructor for server.
- explicit TlsCredentialsOptions(
- grpc_ssl_client_certificate_request_type cert_request_type,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config);
+ private:
+ std::shared_ptr<CertificateProviderInterface> certificate_provider_;
+ grpc_tls_credentials_options* c_credentials_options_ = nullptr;
+};
- // This constructor will be deprecated.
- TlsCredentialsOptions(
- grpc_ssl_client_certificate_request_type cert_request_type,
- grpc_tls_server_verification_option server_verification_option,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
+// Contains configurable options on the client side.
+// Client side doesn't need to always use certificate provider. When the
+// certificate provider is not set, we will use the root certificates stored
+// in the system default locations, and assume client won't provide any
+// identity certificates(single side TLS).
+// It is used for experimental purposes for now and it is subject to change.
+class TlsChannelCredentialsOptions final : public TlsCredentialsOptions {
+ public:
+ // Sets the option to verify the server.
+ // The default is GRPC_TLS_SERVER_VERIFICATION.
+ void set_server_verification_option(
+ grpc_tls_server_verification_option server_verification_option);
+ // Sets the custom authorization config.
+ void set_server_authorization_check_config(
std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config);
- ~TlsCredentialsOptions();
+ authorization_check_config);
- /** Getters for member fields. **/
- grpc_ssl_client_certificate_request_type cert_request_type() const {
- return cert_request_type_;
- }
- grpc_tls_server_verification_option server_verification_option() const {
- return server_verification_option_;
- }
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config() const {
- return key_materials_config_;
- }
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config() const {
- return credential_reload_config_;
- }
- std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config() const {
- return server_authorization_check_config_;
- }
- grpc_tls_credentials_options* c_credentials_options() const {
- return c_credentials_options_;
+ private:
+};
+
+// Contains configurable options on the server side.
+// It is used for experimental purposes for now and it is subject to change.
+class TlsServerCredentialsOptions final : public TlsCredentialsOptions {
+ public:
+ // Server side is required to use a provider, because server always needs to
+ // use identity certs.
+ explicit TlsServerCredentialsOptions(
+ std::shared_ptr<CertificateProviderInterface> certificate_provider)
+ : TlsCredentialsOptions() {
+ set_certificate_provider(certificate_provider);
}
+ // Sets option to request the certificates from the client.
+ // The default is GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE.
+ void set_cert_request_type(
+ grpc_ssl_client_certificate_request_type cert_request_type);
+
private:
- /** The cert_request_type_ flag is only relevant when the
- * TlsCredentialsOptions are used to instantiate server credentials; the flag
- * goes unused when creating channel credentials, and the user can set it to
- * GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE. **/
- grpc_ssl_client_certificate_request_type cert_request_type_;
- /** The server_verification_option_ flag is only relevant when the
- * TlsCredentialsOptions are used to instantiate client credentials; **/
- grpc_tls_server_verification_option server_verification_option_;
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config_;
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config_;
- std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config_;
- grpc_tls_credentials_options* c_credentials_options_;
};
} // namespace experimental
diff --git a/contrib/libs/grpc/include/grpcpp/server.h b/contrib/libs/grpc/include/grpcpp/server.h
index ff047463475..06e6e80e5b6 100644
--- a/contrib/libs/grpc/include/grpcpp/server.h
+++ b/contrib/libs/grpc/include/grpcpp/server.h
@@ -62,13 +62,13 @@ class ExternalConnectionAcceptorImpl;
/// \a Server instances.
class Server : public ServerInterface, private GrpcLibraryCodegen {
public:
- ~Server();
+ ~Server() Y_ABSL_LOCKS_EXCLUDED(mu_) override;
/// Block until the server shuts down.
///
/// \warning The server must be either shutting down or some other thread must
/// call \a Shutdown for this function to ever return.
- void Wait() override;
+ void Wait() Y_ABSL_LOCKS_EXCLUDED(mu_) override;
/// Global callbacks are a set of hooks that are called when server
/// events occur. \a SetGlobalCallbacks method is used to register
@@ -137,7 +137,7 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
protected:
/// Register a service. This call does not take ownership of the service.
/// The service must exist for the lifetime of the Server instance.
- bool RegisterService(const TString* host, Service* service) override;
+ bool RegisterService(const TString* addr, Service* service) override;
/// Try binding the server to the given \a addr endpoint
/// (port, and optionally including IP address to bind to).
@@ -183,6 +183,7 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
int min_pollers, int max_pollers, int sync_cq_timeout_msec,
std::vector<std::shared_ptr<internal::ExternalConnectionAcceptorImpl>>
acceptors,
+ grpc_server_config_fetcher* server_config_fetcher = nullptr,
grpc_resource_quota* server_rq = nullptr,
std::vector<
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>
@@ -206,6 +207,8 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
health_check_service_ = std::move(service);
}
+ ContextAllocator* context_allocator() { return context_allocator_.get(); }
+
/// NOTE: This method is not part of the public API for this class.
bool health_check_service_disabled() const {
return health_check_service_disabled_;
@@ -243,6 +246,12 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
/// ownership of theservice. The service must exist for the lifetime of the
/// Server instance.
void RegisterCallbackGenericService(CallbackGenericService* service) override;
+
+ void RegisterContextAllocator(
+ std::unique_ptr<ContextAllocator> context_allocator) {
+ context_allocator_ = std::move(context_allocator);
+ }
+
#else
/// NOTE: class experimental_registration_type is not part of the public API
/// of this class
@@ -257,6 +266,11 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
server_->RegisterCallbackGenericService(service);
}
+ void RegisterContextAllocator(
+ std::unique_ptr<ContextAllocator> context_allocator) override {
+ server_->context_allocator_ = std::move(context_allocator);
+ }
+
private:
Server* server_;
};
@@ -276,13 +290,14 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
void PerformOpsOnCall(internal::CallOpSetInterface* ops,
internal::Call* call) override;
- void ShutdownInternal(gpr_timespec deadline) override;
+ void ShutdownInternal(gpr_timespec deadline)
+ Y_ABSL_LOCKS_EXCLUDED(mu_) override;
int max_receive_message_size() const override {
return max_receive_message_size_;
}
- CompletionQueue* CallbackCQ() override;
+ CompletionQueue* CallbackCQ() Y_ABSL_LOCKS_EXCLUDED(mu_) override;
ServerInitializer* initializer();
@@ -290,8 +305,8 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
// the ref count are the running state of the server (take a ref at start and
// drop it at shutdown) and each running callback RPC.
void Ref();
- void UnrefWithPossibleNotify() /* LOCKS_EXCLUDED(mu_) */;
- void UnrefAndWaitLocked() /* EXCLUSIVE_LOCKS_REQUIRED(mu_) */;
+ void UnrefWithPossibleNotify() Y_ABSL_LOCKS_EXCLUDED(mu_);
+ void UnrefAndWaitLocked() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
std::vector<std::shared_ptr<internal::ExternalConnectionAcceptorImpl>>
acceptors_;
@@ -325,10 +340,11 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
// Server status
internal::Mutex mu_;
bool started_;
- bool shutdown_;
- bool shutdown_notified_; // Was notify called on the shutdown_cv_
+ bool shutdown_ Y_ABSL_GUARDED_BY(mu_);
+ bool shutdown_notified_
+ Y_ABSL_GUARDED_BY(mu_); // Was notify called on the shutdown_cv_
internal::CondVar shutdown_done_cv_;
- bool shutdown_done_ = false;
+ bool shutdown_done_ Y_ABSL_GUARDED_BY(mu_) = false;
std::atomic_int shutdown_refs_outstanding_{1};
internal::CondVar shutdown_cv_;
@@ -345,6 +361,8 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
std::unique_ptr<ServerInitializer> server_initializer_;
+ std::unique_ptr<ContextAllocator> context_allocator_;
+
std::unique_ptr<HealthCheckServiceInterface> health_check_service_;
bool health_check_service_disabled_;
@@ -366,7 +384,7 @@ class Server : public ServerInterface, private GrpcLibraryCodegen {
// with this server (if any). It is set on the first call to CallbackCQ().
// It is _not owned_ by the server; ownership belongs with its internal
// shutdown callback tag (invoked when the CQ is fully shutdown).
- CompletionQueue* callback_cq_ /* GUARDED_BY(mu_) */ = nullptr;
+ CompletionQueue* callback_cq_ Y_ABSL_GUARDED_BY(mu_) = nullptr;
// List of CQs passed in by user that must be Shutdown only after Server is
// Shutdown. Even though this is only used with NDEBUG, instantiate it in all
diff --git a/contrib/libs/grpc/include/grpcpp/server_builder.h b/contrib/libs/grpc/include/grpcpp/server_builder.h
index de48b838071..109514facd3 100644
--- a/contrib/libs/grpc/include/grpcpp/server_builder.h
+++ b/contrib/libs/grpc/include/grpcpp/server_builder.h
@@ -124,7 +124,7 @@ class ServerBuilder {
/// connections. Valid values include dns:///localhost:1234, /
/// 192.168.1.1:31416, dns:///[::1]:27182, etc.).
/// \param creds The credentials associated with the server.
- /// \param selected_port[out] If not `nullptr`, gets populated with the port
+ /// \param[out] selected_port If not `nullptr`, gets populated with the port
/// number bound to the \a grpc::Server for the corresponding endpoint after
/// it is successfully bound by BuildAndStart(), 0 otherwise. AddListeningPort
/// does not modify this pointer.
@@ -269,6 +269,11 @@ class ServerBuilder {
builder_->interceptor_creators_ = std::move(interceptor_creators);
}
+ /// Set the allocator for creating and releasing callback server context.
+ /// Takes the owndership of the allocator.
+ ServerBuilder& SetContextAllocator(
+ std::unique_ptr<grpc::ContextAllocator> context_allocator);
+
#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
/// Register a generic service that uses the callback API.
/// Matches requests with any :authority
@@ -347,6 +352,11 @@ class ServerBuilder {
return option_refs;
}
+ /// Experimental API, subject to change.
+ void set_fetcher(grpc_server_config_fetcher* server_config_fetcher) {
+ server_config_fetcher_ = server_config_fetcher;
+ }
+
private:
friend class ::grpc::testing::ServerBuilderPluginTest;
@@ -384,6 +394,7 @@ class ServerBuilder {
std::vector<std::unique_ptr<grpc::ServerBuilderPlugin>> plugins_;
grpc_resource_quota* resource_quota_;
grpc::AsyncGenericService* generic_service_{nullptr};
+ std::unique_ptr<ContextAllocator> context_allocator_;
#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
grpc::CallbackGenericService* callback_generic_service_{nullptr};
#else
@@ -405,6 +416,7 @@ class ServerBuilder {
interceptor_creators_;
std::vector<std::shared_ptr<grpc::internal::ExternalConnectionAcceptorImpl>>
acceptors_;
+ grpc_server_config_fetcher* server_config_fetcher_ = nullptr;
};
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/support/channel_arguments.h b/contrib/libs/grpc/include/grpcpp/support/channel_arguments.h
index 85b6ee7dccc..0ddc463cebd 100644
--- a/contrib/libs/grpc/include/grpcpp/support/channel_arguments.h
+++ b/contrib/libs/grpc/include/grpcpp/support/channel_arguments.h
@@ -102,14 +102,18 @@ class ChannelArguments {
/// Primarily meant for use in unit tests.
void SetServiceConfigJSON(const TString& service_config_json);
- // Generic channel argument setters. Only for advanced use cases.
+ // Generic channel argument setter. Only for advanced use cases.
/// Set an integer argument \a value under \a key.
void SetInt(const TString& key, int value);
// Generic channel argument setter. Only for advanced use cases.
- /// Set a pointer argument \a value under \a key. Owership is not transferred.
+ /// Set a pointer argument \a value under \a key. Ownership is not
+ /// transferred.
void SetPointer(const TString& key, void* value);
+ /// Set a pointer argument \a value under \a key, transferring ownership of
+ /// \a value to the \a ChannelArguments object. The \a vtable::Delete function
+ /// is responsible for \a value cleanup/destruction when called.
void SetPointerWithVtable(const TString& key, void* value,
const grpc_arg_pointer_vtable* vtable);
@@ -121,7 +125,7 @@ class ChannelArguments {
grpc_channel_args c_channel_args() const {
grpc_channel_args out;
out.num_args = args_.size();
- out.args = args_.empty() ? NULL : const_cast<grpc_arg*>(&args_[0]);
+ out.args = args_.empty() ? nullptr : const_cast<grpc_arg*>(&args_[0]);
return out;
}
diff --git a/contrib/libs/grpc/include/grpcpp/support/error_details.h b/contrib/libs/grpc/include/grpcpp/support/error_details.h
index 15b917f6c5c..72305e8f3ab 100644
--- a/contrib/libs/grpc/include/grpcpp/support/error_details.h
+++ b/contrib/libs/grpc/include/grpcpp/support/error_details.h
@@ -21,12 +21,6 @@
#include <grpcpp/support/status.h>
-namespace google {
-namespace rpc {
-class Status;
-} // namespace rpc
-} // namespace google
-
namespace grpc {
/// Map a \a grpc::Status to a \a google::rpc::Status.
@@ -34,14 +28,48 @@ namespace grpc {
/// On success, returns status with OK.
/// Returns status with \a INVALID_ARGUMENT, if failed to deserialize.
/// Returns status with \a FAILED_PRECONDITION, if \a to is nullptr.
-grpc::Status ExtractErrorDetails(const grpc::Status& from,
- ::google::rpc::Status* to);
+///
+/// \note
+/// This function is a template to avoid a build dep on \a status.proto.
+/// However, this function still requires that \tparam T is of type
+/// \a google::rpc::Status, which is defined at
+/// https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
+template <typename T>
+grpc::Status ExtractErrorDetails(const grpc::Status& from, T* to) {
+ if (to == nullptr) {
+ return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
+ }
+ if (!to->ParseFromString(from.error_details())) {
+ return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "");
+ }
+ return grpc::Status::OK;
+}
+inline grpc::Status ExtractErrorDetails(const grpc::Status&, std::nullptr_t) {
+ return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
+}
/// Map \a google::rpc::Status to a \a grpc::Status.
/// Returns OK on success.
/// Returns status with \a FAILED_PRECONDITION if \a to is nullptr.
-grpc::Status SetErrorDetails(const ::google::rpc::Status& from,
- grpc::Status* to);
+///
+/// \note
+/// This function is a template to avoid a build dep on \a status.proto.
+/// However, this function still requires that \tparam T is of type
+/// \a google::rpc::Status, which is defined at
+/// https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto
+template <typename T>
+grpc::Status SetErrorDetails(const T& from, grpc::Status* to) {
+ if (to == nullptr) {
+ return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
+ }
+ grpc::StatusCode code = grpc::StatusCode::UNKNOWN;
+ if (from.code() >= grpc::StatusCode::OK &&
+ from.code() <= grpc::StatusCode::UNAUTHENTICATED) {
+ code = static_cast<grpc::StatusCode>(from.code());
+ }
+ *to = grpc::Status(code, from.message(), from.SerializeAsString());
+ return grpc::Status::OK;
+}
} // namespace grpc
diff --git a/contrib/libs/grpc/include/grpcpp/xds_server_builder.h b/contrib/libs/grpc/include/grpcpp/xds_server_builder.h
new file mode 100644
index 00000000000..c1549179baa
--- /dev/null
+++ b/contrib/libs/grpc/include/grpcpp/xds_server_builder.h
@@ -0,0 +1,75 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPCPP_XDS_SERVER_BUILDER_H
+#define GRPCPP_XDS_SERVER_BUILDER_H
+
+#include <grpc/impl/codegen/port_platform.h>
+
+#include <grpcpp/server_builder.h>
+
+namespace grpc {
+namespace experimental {
+
+class XdsServerServingStatusNotifierInterface {
+ public:
+ virtual ~XdsServerServingStatusNotifierInterface() = default;
+
+ // \a uri contains the listening target associated with the notification. Note
+ // that a single target provided to XdsServerBuilder can get resolved to
+ // multiple listening addresses. Status::OK signifies that the server is
+ // serving, while a non-OK status signifies that the server is not serving.
+ virtual void OnServingStatusChange(TString uri, grpc::Status status) = 0;
+};
+
+class XdsServerBuilder : public ::grpc::ServerBuilder {
+ public:
+ // It is the responsibility of the application to make sure that \a notifier
+ // outlasts the life of the server. Notifications will start being made
+ // asynchronously once `BuildAndStart()` has been called. Note that it is
+ // possible for notifications to be made before `BuildAndStart()` returns.
+ void set_status_notifier(XdsServerServingStatusNotifierInterface* notifier) {
+ notifier_ = notifier;
+ }
+
+ std::unique_ptr<Server> BuildAndStart() override {
+ grpc_server_config_fetcher* fetcher = grpc_server_config_fetcher_xds_create(
+ {OnServingStatusChange, notifier_});
+ if (fetcher == nullptr) return nullptr;
+ set_fetcher(fetcher);
+ return ServerBuilder::BuildAndStart();
+ }
+
+ private:
+ static void OnServingStatusChange(void* user_data, const char* uri,
+ grpc_status_code code,
+ const char* error_message) {
+ if (user_data == nullptr) return;
+ XdsServerServingStatusNotifierInterface* notifier =
+ static_cast<XdsServerServingStatusNotifierInterface*>(user_data);
+ notifier->OnServingStatusChange(
+ uri, grpc::Status(static_cast<StatusCode>(code), error_message));
+ }
+
+ XdsServerServingStatusNotifierInterface* notifier_ = nullptr;
+};
+
+} // namespace experimental
+} // namespace grpc
+
+#endif /* GRPCPP_XDS_SERVER_BUILDER_H */
diff --git a/contrib/libs/grpc/src/compiler/config.h b/contrib/libs/grpc/src/compiler/config.h
index 95213b0f045..6ccffea5f5e 100644
--- a/contrib/libs/grpc/src/compiler/config.h
+++ b/contrib/libs/grpc/src/compiler/config.h
@@ -32,7 +32,7 @@ namespace grpc {
// Using grpc::string and grpc::to_string is discouraged in favor of
// TString and ToString. This is only for legacy code using
// them explictly.
-typedef TString string; // deprecated
+typedef TString string;
namespace protobuf {
diff --git a/contrib/libs/grpc/src/compiler/config_protobuf.h b/contrib/libs/grpc/src/compiler/config_protobuf.h
index 06d5073f433..4b27c8e2b62 100644
--- a/contrib/libs/grpc/src/compiler/config_protobuf.h
+++ b/contrib/libs/grpc/src/compiler/config_protobuf.h
@@ -49,4 +49,14 @@
::google::protobuf::compiler::ParseGeneratorParameter
#endif
+#ifndef GRPC_CUSTOM_CSHARP_GETCLASSNAME
+#include <google/protobuf/compiler/csharp/csharp_names.h>
+#define GRPC_CUSTOM_CSHARP_GETCLASSNAME \
+ ::google::protobuf::compiler::csharp::GetClassName
+#define GRPC_CUSTOM_CSHARP_GETFILENAMESPACE \
+ ::google::protobuf::compiler::csharp::GetFileNamespace
+#define GRPC_CUSTOM_CSHARP_GETREFLECTIONCLASSNAME \
+ ::google::protobuf::compiler::csharp::GetReflectionClassName
+#endif
+
#endif // SRC_COMPILER_CONFIG_PROTOBUF_H
diff --git a/contrib/libs/grpc/src/compiler/cpp_generator.cc b/contrib/libs/grpc/src/compiler/cpp_generator.cc
index 57591774745..b63ee5c876c 100644
--- a/contrib/libs/grpc/src/compiler/cpp_generator.cc
+++ b/contrib/libs/grpc/src/compiler/cpp_generator.cc
@@ -639,12 +639,12 @@ void PrintHeaderClientMethodCallbackInterfaces(
printer->Print(*vars,
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n"
"virtual void $Method$(::grpc::ClientContext* context, "
- "$Request$* request, "
+ "const $Request$* request, "
"::grpc::ClientReadReactor< $Response$>* "
"reactor) = 0;\n"
"#else\n"
"virtual void $Method$(::grpc::ClientContext* context, "
- "$Request$* request, "
+ "const $Request$* request, "
"::grpc::experimental::ClientReadReactor< $Response$>* "
"reactor) = 0;\n"
"#endif\n");
@@ -736,12 +736,12 @@ void PrintHeaderClientMethodCallback(grpc_generator::Printer* printer,
printer->Print(*vars,
"#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL\n"
"void $Method$(::grpc::ClientContext* context, "
- "$Request$* request, "
+ "const $Request$* request, "
"::grpc::ClientReadReactor< $Response$>* "
"reactor) override;\n"
"#else\n"
"void $Method$(::grpc::ClientContext* context, "
- "$Request$* request, "
+ "const $Request$* request, "
"::grpc::experimental::ClientReadReactor< $Response$>* "
"reactor) override;\n"
"#endif\n");
@@ -768,7 +768,7 @@ void PrintHeaderClientMethodCallbackEnd(
printer->Indent();
printer->Print("friend class Stub;\n");
printer->Print("explicit experimental_async(Stub* stub): stub_(stub) { }\n");
- // include a function with a dummy use of stub_ to avoid an unused
+ // include a function with a phony use of stub_ to avoid an unused
// private member warning for service with no methods
printer->Print("Stub* stub() { return stub_; }\n");
printer->Print("Stub* stub_;\n");
@@ -1893,6 +1893,8 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer,
"const $Request$& request, $Response$* response) {\n");
printer->Print(*vars,
" return ::grpc::internal::BlockingUnaryCall"
+ "< $Request$, $Response$, ::grpc::protobuf::MessageLite, "
+ "::grpc::protobuf::MessageLite>"
"(channel_.get(), rpcmethod_$Method$_, "
"context, request, response);\n}\n\n");
@@ -1903,6 +1905,8 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer,
"std::function<void(::grpc::Status)> f) {\n");
printer->Print(*vars,
" ::grpc::internal::CallbackUnaryCall"
+ "< $Request$, $Response$, ::grpc::protobuf::MessageLite, "
+ "::grpc::protobuf::MessageLite>"
"(stub_->channel_.get(), stub_->rpcmethod_$Method$_, "
"context, request, response, std::move(f));\n}\n\n");
@@ -1913,6 +1917,8 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer,
"::grpc::experimental::ClientUnaryReactor* reactor) {\n");
printer->Print(*vars,
" ::grpc::internal::ClientCallbackUnaryFactory::Create"
+ "< ::grpc::protobuf::MessageLite, "
+ "::grpc::protobuf::MessageLite>"
"(stub_->channel_.get(), stub_->rpcmethod_$Method$_, "
"context, request, response, reactor);\n}\n\n");
@@ -1924,10 +1930,11 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer,
"::grpc::CompletionQueue* cq) {\n");
printer->Print(*vars,
" return "
- "::grpc::internal::ClientAsyncResponseReaderFactory"
- "< $Response$>::Create(channel_.get(), cq, "
- "rpcmethod_$Method$_, "
- "context, request, false);\n"
+ "::grpc::internal::ClientAsyncResponseReaderHelper::Create"
+ "< $Response$, $Request$, ::grpc::protobuf::MessageLite, "
+ "::grpc::protobuf::MessageLite>"
+ "(channel_.get(), cq, rpcmethod_$Method$_, "
+ "context, request);\n"
"}\n\n");
printer->Print(*vars,
"::grpc::ClientAsyncResponseReader< $Response$>* "
@@ -2004,7 +2011,7 @@ void PrintSourceClientMethod(grpc_generator::Printer* printer,
*vars,
"void $ns$$Service$::Stub::experimental_async::$Method$(::grpc::"
"ClientContext* context, "
- "$Request$* request, "
+ "const $Request$* request, "
"::grpc::experimental::ClientReadReactor< $Response$>* reactor) {\n");
printer->Print(*vars,
" ::grpc::internal::ClientCallbackReaderFactory< "
@@ -2216,8 +2223,8 @@ void PrintSourceService(grpc_generator::Printer* printer,
" $prefix$$Service$_method_names[$Idx$],\n"
" ::grpc::internal::RpcMethod::NORMAL_RPC,\n"
" new ::grpc::internal::RpcMethodHandler< $ns$$Service$::Service, "
- "$Request$, "
- "$Response$>(\n"
+ "$Request$, $Response$, ::grpc::protobuf::MessageLite, "
+ "::grpc::protobuf::MessageLite>(\n"
" []($ns$$Service$::Service* service,\n"
" ::grpc::ServerContext* ctx,\n"
" const $Request$* req,\n"
diff --git a/contrib/libs/grpc/src/compiler/csharp_generator.cc b/contrib/libs/grpc/src/compiler/csharp_generator.cc
index 3b7107c4c48..099f03aff08 100644
--- a/contrib/libs/grpc/src/compiler/csharp_generator.cc
+++ b/contrib/libs/grpc/src/compiler/csharp_generator.cc
@@ -25,23 +25,13 @@
#include "src/compiler/csharp_generator.h"
#include "src/compiler/csharp_generator_helpers.h"
-using google::protobuf::compiler::csharp::GetClassName;
-using google::protobuf::compiler::csharp::GetFileNamespace;
-using google::protobuf::compiler::csharp::GetReflectionClassName;
using grpc::protobuf::Descriptor;
using grpc::protobuf::FileDescriptor;
using grpc::protobuf::MethodDescriptor;
using grpc::protobuf::ServiceDescriptor;
using grpc::protobuf::io::Printer;
using grpc::protobuf::io::StringOutputStream;
-using grpc_generator::GetMethodType;
-using grpc_generator::MethodType;
-using grpc_generator::METHODTYPE_BIDI_STREAMING;
-using grpc_generator::METHODTYPE_CLIENT_STREAMING;
-using grpc_generator::METHODTYPE_NO_STREAMING;
-using grpc_generator::METHODTYPE_SERVER_STREAMING;
using grpc_generator::StringReplace;
-using std::map;
using std::vector;
namespace grpc_csharp_generator {
@@ -184,34 +174,36 @@ TString GetServerClassName(const ServiceDescriptor* service) {
return service->name() + "Base";
}
-TString GetCSharpMethodType(MethodType method_type) {
- switch (method_type) {
- case METHODTYPE_NO_STREAMING:
- return "grpc::MethodType.Unary";
- case METHODTYPE_CLIENT_STREAMING:
+TString GetCSharpMethodType(const MethodDescriptor* method) {
+ if (method->client_streaming()) {
+ if (method->server_streaming()) {
+ return "grpc::MethodType.DuplexStreaming";
+ } else {
return "grpc::MethodType.ClientStreaming";
- case METHODTYPE_SERVER_STREAMING:
+ }
+ } else {
+ if (method->server_streaming()) {
return "grpc::MethodType.ServerStreaming";
- case METHODTYPE_BIDI_STREAMING:
- return "grpc::MethodType.DuplexStreaming";
+ } else {
+ return "grpc::MethodType.Unary";
+ }
}
- GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
}
-TString GetCSharpServerMethodType(MethodType method_type) {
- switch (method_type) {
- case METHODTYPE_NO_STREAMING:
- return "grpc::UnaryServerMethod";
- case METHODTYPE_CLIENT_STREAMING:
+TString GetCSharpServerMethodType(const MethodDescriptor* method) {
+ if (method->client_streaming()) {
+ if (method->server_streaming()) {
+ return "grpc::DuplexStreamingServerMethod";
+ } else {
return "grpc::ClientStreamingServerMethod";
- case METHODTYPE_SERVER_STREAMING:
+ }
+ } else {
+ if (method->server_streaming()) {
return "grpc::ServerStreamingServerMethod";
- case METHODTYPE_BIDI_STREAMING:
- return "grpc::DuplexStreamingServerMethod";
+ } else {
+ return "grpc::UnaryServerMethod";
+ }
}
- GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
}
TString GetServiceNameFieldName() { return "__ServiceName"; }
@@ -233,7 +225,7 @@ TString GetMethodRequestParamMaybe(const MethodDescriptor* method,
if (invocation_param) {
return "request, ";
}
- return GetClassName(method->input_type()) + " request, ";
+ return GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()) + " request, ";
}
TString GetAccessLevel(bool internal_access) {
@@ -241,65 +233,50 @@ TString GetAccessLevel(bool internal_access) {
}
TString GetMethodReturnTypeClient(const MethodDescriptor* method) {
- switch (GetMethodType(method)) {
- case METHODTYPE_NO_STREAMING:
- return "grpc::AsyncUnaryCall<" + GetClassName(method->output_type()) +
- ">";
- case METHODTYPE_CLIENT_STREAMING:
+ if (method->client_streaming()) {
+ if (method->server_streaming()) {
+ return "grpc::AsyncDuplexStreamingCall<" +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()) + ", " +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()) + ">";
+ } else {
return "grpc::AsyncClientStreamingCall<" +
- GetClassName(method->input_type()) + ", " +
- GetClassName(method->output_type()) + ">";
- case METHODTYPE_SERVER_STREAMING:
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()) + ", " +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()) + ">";
+ }
+ } else {
+ if (method->server_streaming()) {
return "grpc::AsyncServerStreamingCall<" +
- GetClassName(method->output_type()) + ">";
- case METHODTYPE_BIDI_STREAMING:
- return "grpc::AsyncDuplexStreamingCall<" +
- GetClassName(method->input_type()) + ", " +
- GetClassName(method->output_type()) + ">";
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()) + ">";
+ } else {
+ return "grpc::AsyncUnaryCall<" +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()) + ">";
+ }
}
- GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
}
TString GetMethodRequestParamServer(const MethodDescriptor* method) {
- switch (GetMethodType(method)) {
- case METHODTYPE_NO_STREAMING:
- case METHODTYPE_SERVER_STREAMING:
- return GetClassName(method->input_type()) + " request";
- case METHODTYPE_CLIENT_STREAMING:
- case METHODTYPE_BIDI_STREAMING:
- return "grpc::IAsyncStreamReader<" + GetClassName(method->input_type()) +
- "> requestStream";
+ if (method->client_streaming()) {
+ return "grpc::IAsyncStreamReader<" +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()) +
+ "> requestStream";
}
- GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
+ return GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()) + " request";
}
TString GetMethodReturnTypeServer(const MethodDescriptor* method) {
- switch (GetMethodType(method)) {
- case METHODTYPE_NO_STREAMING:
- case METHODTYPE_CLIENT_STREAMING:
- return "global::System.Threading.Tasks.Task<" +
- GetClassName(method->output_type()) + ">";
- case METHODTYPE_SERVER_STREAMING:
- case METHODTYPE_BIDI_STREAMING:
- return "global::System.Threading.Tasks.Task";
+ if (method->server_streaming()) {
+ return "global::System.Threading.Tasks.Task";
}
- GOOGLE_LOG(FATAL) << "Can't get here.";
- return "";
+ return "global::System.Threading.Tasks.Task<" +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()) + ">";
}
TString GetMethodResponseStreamMaybe(const MethodDescriptor* method) {
- switch (GetMethodType(method)) {
- case METHODTYPE_NO_STREAMING:
- case METHODTYPE_CLIENT_STREAMING:
- return "";
- case METHODTYPE_SERVER_STREAMING:
- case METHODTYPE_BIDI_STREAMING:
- return ", grpc::IServerStreamWriter<" +
- GetClassName(method->output_type()) + "> responseStream";
+ if (method->server_streaming()) {
+ return ", grpc::IServerStreamWriter<" +
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()) +
+ "> responseStream";
}
- GOOGLE_LOG(FATAL) << "Can't get here.";
return "";
}
@@ -396,7 +373,7 @@ void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) {
"grpc::Marshallers.Create(__Helper_SerializeMessage, "
"context => __Helper_DeserializeMessage(context, $type$.Parser));\n",
"fieldname", GetMarshallerFieldName(message), "type",
- GetClassName(message));
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(message));
}
out->Print("\n");
}
@@ -406,12 +383,11 @@ void GenerateStaticMethodField(Printer* out, const MethodDescriptor* method) {
"static readonly grpc::Method<$request$, $response$> $fieldname$ = new "
"grpc::Method<$request$, $response$>(\n",
"fieldname", GetMethodFieldName(method), "request",
- GetClassName(method->input_type()), "response",
- GetClassName(method->output_type()));
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()), "response",
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()));
out->Indent();
out->Indent();
- out->Print("$methodtype$,\n", "methodtype",
- GetCSharpMethodType(GetMethodType(method)));
+ out->Print("$methodtype$,\n", "methodtype", GetCSharpMethodType(method));
out->Print("$servicenamefield$,\n", "servicenamefield",
GetServiceNameFieldName());
out->Print("\"$methodname$\",\n", "methodname", method->name());
@@ -434,8 +410,9 @@ void GenerateServiceDescriptorProperty(Printer* out,
"Descriptor\n");
out->Print("{\n");
out->Print(" get { return $umbrella$.Descriptor.Services[$index$]; }\n",
- "umbrella", GetReflectionClassName(service->file()), "index",
- index.str());
+ "umbrella",
+ GRPC_CUSTOM_CSHARP_GETREFLECTIONCLASSNAME(service->file()),
+ "index", index.str());
out->Print("}\n");
out->Print("\n");
}
@@ -526,9 +503,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {
for (int i = 0; i < service->method_count(); i++) {
const MethodDescriptor* method = service->method(i);
- MethodType method_type = GetMethodType(method);
-
- if (method_type == METHODTYPE_NO_STREAMING) {
+ if (!method->client_streaming() && !method->server_streaming()) {
// unary calls have an extra synchronous stub method
GenerateDocCommentClientMethod(out, method, true, false);
out->Print(
@@ -539,8 +514,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {
"cancellationToken = "
"default(global::System.Threading.CancellationToken))\n",
"methodname", method->name(), "request",
- GetClassName(method->input_type()), "response",
- GetClassName(method->output_type()));
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()), "response",
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()));
out->Print("{\n");
out->Indent();
out->Print(
@@ -557,8 +532,8 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {
"public virtual $response$ $methodname$($request$ request, "
"grpc::CallOptions options)\n",
"methodname", method->name(), "request",
- GetClassName(method->input_type()), "response",
- GetClassName(method->output_type()));
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()), "response",
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()));
out->Print("{\n");
out->Indent();
out->Print(
@@ -570,7 +545,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {
}
TString method_name = method->name();
- if (method_type == METHODTYPE_NO_STREAMING) {
+ if (!method->client_streaming() && !method->server_streaming()) {
method_name += "Async"; // prevent name clash with synchronous method.
}
GenerateDocCommentClientMethod(out, method, false, false);
@@ -607,33 +582,30 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor* service) {
GetMethodReturnTypeClient(method));
out->Print("{\n");
out->Indent();
- switch (GetMethodType(method)) {
- case METHODTYPE_NO_STREAMING:
- out->Print(
- "return CallInvoker.AsyncUnaryCall($methodfield$, null, options, "
- "request);\n",
- "methodfield", GetMethodFieldName(method));
- break;
- case METHODTYPE_CLIENT_STREAMING:
- out->Print(
- "return CallInvoker.AsyncClientStreamingCall($methodfield$, null, "
- "options);\n",
- "methodfield", GetMethodFieldName(method));
- break;
- case METHODTYPE_SERVER_STREAMING:
- out->Print(
- "return CallInvoker.AsyncServerStreamingCall($methodfield$, null, "
- "options, request);\n",
- "methodfield", GetMethodFieldName(method));
- break;
- case METHODTYPE_BIDI_STREAMING:
- out->Print(
- "return CallInvoker.AsyncDuplexStreamingCall($methodfield$, null, "
- "options);\n",
- "methodfield", GetMethodFieldName(method));
- break;
- default:
- GOOGLE_LOG(FATAL) << "Can't get here.";
+ if (!method->client_streaming() && !method->server_streaming()) {
+ // Non-Streaming
+ out->Print(
+ "return CallInvoker.AsyncUnaryCall($methodfield$, null, options, "
+ "request);\n",
+ "methodfield", GetMethodFieldName(method));
+ } else if (method->client_streaming() && !method->server_streaming()) {
+ // Client Streaming Only
+ out->Print(
+ "return CallInvoker.AsyncClientStreamingCall($methodfield$, null, "
+ "options);\n",
+ "methodfield", GetMethodFieldName(method));
+ } else if (!method->client_streaming() && method->server_streaming()) {
+ // Server Streaming Only
+ out->Print(
+ "return CallInvoker.AsyncServerStreamingCall($methodfield$, null, "
+ "options, request);\n",
+ "methodfield", GetMethodFieldName(method));
+ } else {
+ // Bi-Directional Streaming
+ out->Print(
+ "return CallInvoker.AsyncDuplexStreamingCall($methodfield$, null, "
+ "options);\n",
+ "methodfield", GetMethodFieldName(method));
}
out->Outdent();
out->Print("}\n");
@@ -722,9 +694,10 @@ void GenerateBindServiceWithBinderMethod(Printer* out,
"new $servermethodtype$<$inputtype$, $outputtype$>("
"serviceImpl.$methodname$));\n",
"methodfield", GetMethodFieldName(method), "servermethodtype",
- GetCSharpServerMethodType(GetMethodType(method)), "inputtype",
- GetClassName(method->input_type()), "outputtype",
- GetClassName(method->output_type()), "methodname", method->name());
+ GetCSharpServerMethodType(method), "inputtype",
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->input_type()), "outputtype",
+ GRPC_CUSTOM_CSHARP_GETCLASSNAME(method->output_type()), "methodname",
+ method->name());
}
out->Outdent();
@@ -805,7 +778,7 @@ TString GetServices(const FileDescriptor* file, bool generate_client,
out.Print("using grpc = global::Grpc.Core;\n");
out.Print("\n");
- TString file_namespace = GetFileNamespace(file);
+ TString file_namespace = GRPC_CUSTOM_CSHARP_GETFILENAMESPACE(file);
if (file_namespace != "") {
out.Print("namespace $namespace$ {\n", "namespace", file_namespace);
out.Indent();
diff --git a/contrib/libs/grpc/src/compiler/csharp_generator.h b/contrib/libs/grpc/src/compiler/csharp_generator.h
index c13da4657f3..323b90584da 100644
--- a/contrib/libs/grpc/src/compiler/csharp_generator.h
+++ b/contrib/libs/grpc/src/compiler/csharp_generator.h
@@ -21,8 +21,6 @@
#include "src/compiler/config.h"
-#include <google/protobuf/compiler/csharp/csharp_names.h>
-
namespace grpc_csharp_generator {
TString GetServices(const grpc::protobuf::FileDescriptor* file,
diff --git a/contrib/libs/grpc/src/compiler/python_generator_helpers.h b/contrib/libs/grpc/src/compiler/python_generator_helpers.h
index 78e7efd7e0d..b68ef915ef1 100644
--- a/contrib/libs/grpc/src/compiler/python_generator_helpers.h
+++ b/contrib/libs/grpc/src/compiler/python_generator_helpers.h
@@ -138,11 +138,20 @@ StringVector get_all_comments(const DescriptorType* descriptor) {
inline void Split(const TString& s, char delim,
std::vector<TString>* append_to) {
- auto current = s.begin();
- while (current <= s.end()) {
- auto next = std::find(current, s.end(), delim);
- append_to->emplace_back(current, next);
- current = next + 1;
+ if (s.empty()) {
+ // splitting an empty string logically produces a single-element list
+ append_to->emplace_back();
+ } else {
+ auto current = s.begin();
+ while (current < s.end()) {
+ const auto next = std::find(current, s.end(), delim);
+ append_to->emplace_back(current, next);
+ current = next;
+ if (current != s.end()) {
+ // it was the delimiter - need to be at the start of the next entry
+ ++current;
+ }
+ }
}
}
diff --git a/contrib/libs/grpc/src/compiler/ruby_generator.cc b/contrib/libs/grpc/src/compiler/ruby_generator.cc
index c82e78fd640..0fba63735c8 100644
--- a/contrib/libs/grpc/src/compiler/ruby_generator.cc
+++ b/contrib/libs/grpc/src/compiler/ruby_generator.cc
@@ -80,7 +80,7 @@ void PrintService(const ServiceDescriptor* service, Printer* out) {
// Write the indented class body.
out->Indent();
out->Print("\n");
- out->Print("include GRPC::GenericService\n");
+ out->Print("include ::GRPC::GenericService\n");
out->Print("\n");
out->Print("self.marshal_class_method = :encode\n");
out->Print("self.unmarshal_class_method = :decode\n");
diff --git a/contrib/libs/grpc/src/core/README.md b/contrib/libs/grpc/src/core/README.md
index 5dea45a6925..d0f77c53d6e 100644
--- a/contrib/libs/grpc/src/core/README.md
+++ b/contrib/libs/grpc/src/core/README.md
@@ -1,4 +1,6 @@
-# Overview
+# gRPC core library
+
+This shared library provides all of gRPC's core functionality through a low
+level API. gRPC libraries for the other languages supported in this repo, are
+built on top of this shared core library.
-This directory contains source code for C library (a.k.a the *gRPC C core*) that provides all gRPC's core functionality through a low level API. Libraries in other languages in this repository (C++, C#, Ruby,
-Python, PHP, NodeJS, Objective-C) are layered on top of this library.
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/backend_metric.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/backend_metric.cc
index 257663cf201..9743d98fb32 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/backend_metric.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/backend_metric.cc
@@ -23,20 +23,18 @@
#include "udpa/data/orca/v1/orca_load_report.upb.h"
#include "upb/upb.hpp"
-#include "src/core/lib/gprpp/map.h"
-
namespace grpc_core {
namespace {
template <typename EntryType>
-std::map<y_absl::string_view, double, StringLess> ParseMap(
+std::map<y_absl::string_view, double> ParseMap(
udpa_data_orca_v1_OrcaLoadReport* msg,
const EntryType* (*entry_func)(const udpa_data_orca_v1_OrcaLoadReport*,
size_t*),
upb_strview (*key_func)(const EntryType*),
double (*value_func)(const EntryType*), Arena* arena) {
- std::map<y_absl::string_view, double, StringLess> result;
+ std::map<y_absl::string_view, double> result;
size_t i = UPB_MAP_BEGIN;
while (true) {
const auto* entry = entry_func(msg, &i);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.cc
index 908a05248cb..415f87a183a 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.cc
@@ -1,20 +1,18 @@
-/*
- *
- * Copyright 2015 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.
- *
- */
+//
+// Copyright 2015 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
#include <grpc/support/port_platform.h>
@@ -30,6 +28,7 @@
#include "y_absl/strings/numbers.h"
#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_join.h"
#include "y_absl/strings/string_view.h"
#include <grpc/support/alloc.h>
@@ -43,14 +42,15 @@
#include "src/core/ext/filters/client_channel/backend_metric.h"
#include "src/core/ext/filters/client_channel/backup_poller.h"
#include "src/core/ext/filters/client_channel/config_selector.h"
+#include "src/core/ext/filters/client_channel/dynamic_filters.h"
#include "src/core/ext/filters/client_channel/global_subchannel_pool.h"
#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"
+#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/local_subchannel_pool.h"
#include "src/core/ext/filters/client_channel/proxy_mapper_registry.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/ext/filters/client_channel/resolver_result_parsing.h"
-#include "src/core/ext/filters/client_channel/resolving_lb_policy.h"
#include "src/core/ext/filters/client_channel/retry_throttle.h"
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/ext/filters/client_channel/service_config_call_data.h"
@@ -62,7 +62,6 @@
#include "src/core/lib/channel/status_util.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/manual_constructor.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/polling_entity.h"
@@ -78,9 +77,6 @@
#include "src/core/lib/transport/static_metadata.h"
#include "src/core/lib/transport/status_metadata.h"
-using grpc_core::internal::ClientChannelMethodParsedConfig;
-using grpc_core::internal::ServerRetryThrottleData;
-
//
// Client channel filter
//
@@ -103,8 +99,19 @@ using grpc_core::internal::ServerRetryThrottleData;
// send_trailing_metadata
#define MAX_PENDING_BATCHES 6
+// Channel arg containing a pointer to the ChannelData object.
+#define GRPC_ARG_CLIENT_CHANNEL_DATA "grpc.internal.client_channel_data"
+
+// Channel arg containing a pointer to the RetryThrottleData object.
+#define GRPC_ARG_RETRY_THROTTLE_DATA "grpc.internal.retry_throttle_data"
+
namespace grpc_core {
+using internal::ClientChannelGlobalParsedConfig;
+using internal::ClientChannelMethodParsedConfig;
+using internal::ClientChannelServiceConfigParser;
+using internal::ServerRetryThrottleData;
+
TraceFlag grpc_client_channel_call_trace(false, "client_channel_call");
TraceFlag grpc_client_channel_routing_trace(false, "client_channel_routing");
@@ -116,10 +123,9 @@ namespace {
class ChannelData {
public:
- struct QueuedPick {
- grpc_call_element* elem;
- QueuedPick* next = nullptr;
- };
+ class CallData;
+ class RetryingCall;
+ class LoadBalancedCall;
static grpc_error* Init(grpc_channel_element* elem,
grpc_channel_element_args* args);
@@ -129,44 +135,6 @@ class ChannelData {
static void GetChannelInfo(grpc_channel_element* elem,
const grpc_channel_info* info);
- bool deadline_checking_enabled() const { return deadline_checking_enabled_; }
- bool enable_retries() const { return enable_retries_; }
- size_t per_rpc_retry_buffer_size() const {
- return per_rpc_retry_buffer_size_;
- }
- grpc_channel_stack* owning_stack() const { return owning_stack_; }
-
- // Note: Does NOT return a new ref.
- grpc_error* disconnect_error() const {
- return disconnect_error_.Load(MemoryOrder::ACQUIRE);
- }
-
- Mutex* data_plane_mu() const { return &data_plane_mu_; }
-
- LoadBalancingPolicy::SubchannelPicker* picker() const {
- return picker_.get();
- }
- void AddQueuedPick(QueuedPick* pick, grpc_polling_entity* pollent);
- void RemoveQueuedPick(QueuedPick* to_remove, grpc_polling_entity* pollent);
-
- bool received_service_config_data() const {
- return received_service_config_data_;
- }
- grpc_error* resolver_transient_failure_error() const {
- return resolver_transient_failure_error_;
- }
- RefCountedPtr<ServerRetryThrottleData> retry_throttle_data() const {
- return retry_throttle_data_;
- }
- RefCountedPtr<ServiceConfig> service_config() const {
- return service_config_;
- }
- ConfigSelector* config_selector() const { return config_selector_.get(); }
- WorkSerializer* work_serializer() const { return work_serializer_.get(); }
-
- RefCountedPtr<ConnectedSubchannel> GetConnectedSubchannelInDataPlane(
- SubchannelInterface* subchannel) const;
-
grpc_connectivity_state CheckConnectivityState(bool try_to_connect);
void AddExternalConnectivityWatcher(grpc_polling_entity pollent,
@@ -195,6 +163,7 @@ class ChannelData {
AsyncConnectivityStateWatcherInterface* watcher);
private:
+ class DynamicTerminationFilterChannelData;
class SubchannelWrapper;
class ClientChannelControlHelper;
class ConnectivityWatcherAdder;
@@ -209,7 +178,7 @@ class ChannelData {
grpc_closure* on_complete,
grpc_closure* watcher_timer_init);
- ~ExternalConnectivityWatcher();
+ ~ExternalConnectivityWatcher() override;
// Removes the watcher from the external_watchers_ map.
static void RemoveWatcherFromExternalWatchersMap(ChannelData* chand,
@@ -236,30 +205,60 @@ class ChannelData {
Atomic<bool> done_{false};
};
- class ChannelConfigHelper
- : public ResolvingLoadBalancingPolicy::ChannelConfigHelper {
+ class ResolverResultHandler : public Resolver::ResultHandler {
public:
- explicit ChannelConfigHelper(ChannelData* chand) : chand_(chand) {}
+ explicit ResolverResultHandler(ChannelData* chand) : chand_(chand) {
+ GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "ResolverResultHandler");
+ }
- ChooseServiceConfigResult ChooseServiceConfig(
- const Resolver::Result& result) override;
+ ~ResolverResultHandler() override {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: resolver shutdown complete", chand_);
+ }
+ GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_, "ResolverResultHandler");
+ }
- void StartUsingServiceConfigForCalls() override;
+ void ReturnResult(Resolver::Result result) override {
+ chand_->OnResolverResultChangedLocked(std::move(result));
+ }
- void ResolverTransientFailure(grpc_error* error) override;
+ void ReturnError(grpc_error* error) override {
+ chand_->OnResolverErrorLocked(error);
+ }
private:
- static void ChooseLbPolicy(
- const Resolver::Result& resolver_result,
- const internal::ClientChannelGlobalParsedConfig* parsed_service_config,
- RefCountedPtr<LoadBalancingPolicy::Config>* lb_policy_config);
-
ChannelData* chand_;
};
+ struct ResolverQueuedCall {
+ grpc_call_element* elem;
+ ResolverQueuedCall* next = nullptr;
+ };
+ struct LbQueuedCall {
+ LoadBalancedCall* lb_call;
+ LbQueuedCall* next = nullptr;
+ };
+
ChannelData(grpc_channel_element_args* args, grpc_error** error);
~ChannelData();
+ // Note: Does NOT return a new ref.
+ grpc_error* disconnect_error() const {
+ return disconnect_error_.Load(MemoryOrder::ACQUIRE);
+ }
+
+ // Note: All methods with "Locked" suffix must be invoked from within
+ // work_serializer_.
+
+ void OnResolverResultChangedLocked(Resolver::Result result);
+ void OnResolverErrorLocked(grpc_error* error);
+
+ void CreateOrUpdateLbPolicyLocked(
+ RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config,
+ Resolver::Result result);
+ OrphanablePtr<LoadBalancingPolicy> CreateLbPolicyLocked(
+ const grpc_channel_args& args);
+
void UpdateStateAndPickerLocked(
grpc_connectivity_state state, const y_absl::Status& status,
const char* reason,
@@ -273,9 +272,8 @@ class ChannelData {
void UpdateServiceConfigInDataPlaneLocked();
- void CreateResolvingLoadBalancingPolicyLocked();
-
- void DestroyResolvingLoadBalancingPolicyLocked();
+ void CreateResolverLocked();
+ void DestroyResolverAndLbPolicyLocked();
grpc_error* DoPingLocked(grpc_transport_op* op);
@@ -283,6 +281,23 @@ class ChannelData {
void TryToConnectLocked();
+ // These methods all require holding resolution_mu_.
+ void AddResolverQueuedCall(ResolverQueuedCall* call,
+ grpc_polling_entity* pollent)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(resolution_mu_);
+ void RemoveResolverQueuedCall(ResolverQueuedCall* to_remove,
+ grpc_polling_entity* pollent)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(resolution_mu_);
+
+ // These methods all require holding data_plane_mu_.
+ void AddLbQueuedCall(LbQueuedCall* call, grpc_polling_entity* pollent)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(data_plane_mu_);
+ void RemoveLbQueuedCall(LbQueuedCall* to_remove, grpc_polling_entity* pollent)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(data_plane_mu_);
+ RefCountedPtr<ConnectedSubchannel> GetConnectedSubchannelInDataPlane(
+ SubchannelInterface* subchannel) const
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(data_plane_mu_);
+
//
// Fields set at construction and never modified.
//
@@ -293,35 +308,49 @@ class ChannelData {
ClientChannelFactory* client_channel_factory_;
const grpc_channel_args* channel_args_;
RefCountedPtr<ServiceConfig> default_service_config_;
- grpc_core::UniquePtr<char> server_name_;
- grpc_core::UniquePtr<char> target_uri_;
+ TString server_name_;
+ UniquePtr<char> target_uri_;
channelz::ChannelNode* channelz_node_;
- ChannelConfigHelper channel_config_helper_;
//
- // Fields used in the data plane. Guarded by data_plane_mu.
+ // Fields related to name resolution. Guarded by resolution_mu_.
//
- mutable Mutex data_plane_mu_;
- std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker_;
- QueuedPick* queued_picks_ = nullptr; // Linked list of queued picks.
+ mutable Mutex resolution_mu_;
+ // Linked list of calls queued waiting for resolver result.
+ ResolverQueuedCall* resolver_queued_calls_ Y_ABSL_GUARDED_BY(resolution_mu_) =
+ nullptr;
// Data from service config.
- grpc_error* resolver_transient_failure_error_ = GRPC_ERROR_NONE;
- bool received_service_config_data_ = false;
- RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_;
- RefCountedPtr<ServiceConfig> service_config_;
- RefCountedPtr<ConfigSelector> config_selector_;
+ grpc_error* resolver_transient_failure_error_
+ Y_ABSL_GUARDED_BY(resolution_mu_) = GRPC_ERROR_NONE;
+ bool received_service_config_data_ Y_ABSL_GUARDED_BY(resolution_mu_) = false;
+ RefCountedPtr<ServiceConfig> service_config_ Y_ABSL_GUARDED_BY(resolution_mu_);
+ RefCountedPtr<ConfigSelector> config_selector_
+ Y_ABSL_GUARDED_BY(resolution_mu_);
+ RefCountedPtr<DynamicFilters> dynamic_filters_
+ Y_ABSL_GUARDED_BY(resolution_mu_);
+
+ //
+ // Fields used in the data plane. Guarded by data_plane_mu_.
+ //
+ mutable Mutex data_plane_mu_;
+ std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker_
+ Y_ABSL_GUARDED_BY(data_plane_mu_);
+ // Linked list of calls queued waiting for LB pick.
+ LbQueuedCall* lb_queued_calls_ Y_ABSL_GUARDED_BY(data_plane_mu_) = nullptr;
//
// Fields used in the control plane. Guarded by work_serializer.
//
std::shared_ptr<WorkSerializer> work_serializer_;
grpc_pollset_set* interested_parties_;
- RefCountedPtr<SubchannelPoolInterface> subchannel_pool_;
- OrphanablePtr<ResolvingLoadBalancingPolicy> resolving_lb_policy_;
ConnectivityStateTracker state_tracker_;
- grpc_core::UniquePtr<char> health_check_service_name_;
+ OrphanablePtr<Resolver> resolver_;
+ bool previous_resolution_contained_addresses_ = false;
RefCountedPtr<ServiceConfig> saved_service_config_;
RefCountedPtr<ConfigSelector> saved_config_selector_;
+ y_absl::optional<TString> health_check_service_name_;
+ OrphanablePtr<LoadBalancingPolicy> lb_policy_;
+ RefCountedPtr<SubchannelPoolInterface> subchannel_pool_;
// The number of SubchannelWrapper instances referencing a given Subchannel.
std::map<Subchannel*, int> subchannel_refcount_map_;
// The set of SubchannelWrappers that currently exist.
@@ -345,9 +374,9 @@ class ChannelData {
// Fields guarded by a mutex, since they need to be accessed
// synchronously via get_channel_info().
//
- gpr_mu info_mu_;
- grpc_core::UniquePtr<char> info_lb_policy_name_;
- grpc_core::UniquePtr<char> info_service_config_json_;
+ Mutex info_mu_;
+ UniquePtr<char> info_lb_policy_name_ Y_ABSL_GUARDED_BY(info_mu_);
+ UniquePtr<char> info_service_config_json_ Y_ABSL_GUARDED_BY(info_mu_);
//
// Fields guarded by a mutex, since they need to be accessed
@@ -355,14 +384,14 @@ class ChannelData {
//
mutable Mutex external_watchers_mu_;
std::map<grpc_closure*, RefCountedPtr<ExternalConnectivityWatcher>>
- external_watchers_;
+ external_watchers_ Y_ABSL_GUARDED_BY(external_watchers_mu_);
};
//
-// CallData definition
+// ChannelData::CallData definition
//
-class CallData {
+class ChannelData::CallData {
public:
static grpc_error* Init(grpc_call_element* elem,
const grpc_call_element_args* args);
@@ -373,114 +402,144 @@ class CallData {
grpc_call_element* elem, grpc_transport_stream_op_batch* batch);
static void SetPollent(grpc_call_element* elem, grpc_polling_entity* pollent);
- RefCountedPtr<SubchannelCall> subchannel_call() { return subchannel_call_; }
+ // Invoked by channel for queued calls when name resolution is completed.
+ static void CheckResolution(void* arg, grpc_error* error);
+ // Helper function for applying the service config to a call while
+ // holding ChannelData::resolution_mu_.
+ // Returns true if the service config has been applied to the call, in which
+ // case the caller must invoke ResolutionDone() or AsyncResolutionDone()
+ // with the returned error.
+ bool CheckResolutionLocked(grpc_call_element* elem, grpc_error** error)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::resolution_mu_);
+ // Schedules a callback to continue processing the call once
+ // resolution is complete. The callback will not run until after this
+ // method returns.
+ void AsyncResolutionDone(grpc_call_element* elem, grpc_error* error);
- // Invoked by channel for queued picks when the picker is updated.
- static void PickSubchannel(void* arg, grpc_error* error);
+ private:
+ class ResolverQueuedCallCanceller;
- // Helper function for performing a pick while holding the data plane
- // mutex. Returns true if the pick is complete, in which case the caller
- // must invoke PickDone() or AsyncPickDone() with the returned error.
- bool PickSubchannelLocked(grpc_call_element* elem, grpc_error** error);
+ CallData(grpc_call_element* elem, const ChannelData& chand,
+ const grpc_call_element_args& args);
+ ~CallData();
- // Schedules a callback to process the completed pick. The callback
- // will not run until after this method returns.
- void AsyncPickDone(grpc_call_element* elem, grpc_error* error);
+ // Returns the index into pending_batches_ to be used for batch.
+ static size_t GetBatchIndex(grpc_transport_stream_op_batch* batch);
+ void PendingBatchesAdd(grpc_call_element* elem,
+ grpc_transport_stream_op_batch* batch);
+ static void FailPendingBatchInCallCombiner(void* arg, grpc_error* error);
+ // A predicate type and some useful implementations for PendingBatchesFail().
+ typedef bool (*YieldCallCombinerPredicate)(
+ const CallCombinerClosureList& closures);
+ static bool YieldCallCombiner(const CallCombinerClosureList& /*closures*/) {
+ return true;
+ }
+ static bool NoYieldCallCombiner(const CallCombinerClosureList& /*closures*/) {
+ return false;
+ }
+ static bool YieldCallCombinerIfPendingBatchesFound(
+ const CallCombinerClosureList& closures) {
+ return closures.size() > 0;
+ }
+ // Fails all pending batches.
+ // If yield_call_combiner_predicate returns true, assumes responsibility for
+ // yielding the call combiner.
+ void PendingBatchesFail(
+ grpc_call_element* elem, grpc_error* error,
+ YieldCallCombinerPredicate yield_call_combiner_predicate);
+ static void ResumePendingBatchInCallCombiner(void* arg, grpc_error* ignored);
+ // Resumes all pending batches on lb_call_.
+ void PendingBatchesResume(grpc_call_element* elem);
- private:
- class QueuedPickCanceller;
+ // Applies service config to the call. Must be invoked once we know
+ // that the resolver has returned results to the channel.
+ // If an error is returned, the error indicates the status with which
+ // the call should be failed.
+ grpc_error* ApplyServiceConfigToCallLocked(
+ grpc_call_element* elem, grpc_metadata_batch* initial_metadata)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::resolution_mu_);
+ // Invoked when the resolver result is applied to the caller, on both
+ // success or failure.
+ static void ResolutionDone(void* arg, grpc_error* error);
+ // Removes the call (if present) from the channel's list of calls queued
+ // for name resolution.
+ void MaybeRemoveCallFromResolverQueuedCallsLocked(grpc_call_element* elem)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::resolution_mu_);
+ // Adds the call (if not already present) to the channel's list of
+ // calls queued for name resolution.
+ void MaybeAddCallToResolverQueuedCallsLocked(grpc_call_element* elem)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::resolution_mu_);
+
+ static void RecvInitialMetadataReadyForConfigSelectorCommitCallback(
+ void* arg, grpc_error* error);
+ void InjectRecvInitialMetadataReadyForConfigSelectorCommitCallback(
+ grpc_transport_stream_op_batch* batch);
- class Metadata : public LoadBalancingPolicy::MetadataInterface {
- public:
- Metadata(CallData* calld, grpc_metadata_batch* batch)
- : calld_(calld), batch_(batch) {}
-
- void Add(y_absl::string_view key, y_absl::string_view value) override {
- grpc_linked_mdelem* linked_mdelem = static_cast<grpc_linked_mdelem*>(
- calld_->arena_->Alloc(sizeof(grpc_linked_mdelem)));
- linked_mdelem->md = grpc_mdelem_from_slices(
- grpc_core::ExternallyManagedSlice(key.data(), key.size()),
- grpc_core::ExternallyManagedSlice(value.data(), value.size()));
- GPR_ASSERT(grpc_metadata_batch_link_tail(batch_, linked_mdelem) ==
- GRPC_ERROR_NONE);
- }
+ void CreateDynamicCall(grpc_call_element* elem);
- iterator begin() const override {
- static_assert(sizeof(grpc_linked_mdelem*) <= sizeof(intptr_t),
- "iterator size too large");
- return iterator(
- this, reinterpret_cast<intptr_t>(MaybeSkipEntry(batch_->list.head)));
- }
- iterator end() const override {
- static_assert(sizeof(grpc_linked_mdelem*) <= sizeof(intptr_t),
- "iterator size too large");
- return iterator(this, 0);
- }
+ // State for handling deadlines.
+ // The code in deadline_filter.c requires this to be the first field.
+ // TODO(roth): This is slightly sub-optimal in that grpc_deadline_state
+ // and this struct both independently store pointers to the call stack
+ // and call combiner. If/when we have time, find a way to avoid this
+ // without breaking the grpc_deadline_state abstraction.
+ grpc_deadline_state deadline_state_;
- iterator erase(iterator it) override {
- grpc_linked_mdelem* linked_mdelem =
- reinterpret_cast<grpc_linked_mdelem*>(GetIteratorHandle(it));
- intptr_t handle = reinterpret_cast<intptr_t>(linked_mdelem->next);
- grpc_metadata_batch_remove(batch_, linked_mdelem);
- return iterator(this, handle);
- }
+ grpc_slice path_; // Request path.
+ gpr_cycle_counter call_start_time_;
+ grpc_millis deadline_;
+ Arena* arena_;
+ grpc_call_stack* owning_call_;
+ CallCombiner* call_combiner_;
+ grpc_call_context_element* call_context_;
- private:
- grpc_linked_mdelem* MaybeSkipEntry(grpc_linked_mdelem* entry) const {
- if (entry != nullptr && batch_->idx.named.path == entry) {
- return entry->next;
- }
- return entry;
- }
+ grpc_polling_entity* pollent_ = nullptr;
- intptr_t IteratorHandleNext(intptr_t handle) const override {
- grpc_linked_mdelem* linked_mdelem =
- reinterpret_cast<grpc_linked_mdelem*>(handle);
- return reinterpret_cast<intptr_t>(MaybeSkipEntry(linked_mdelem->next));
- }
+ grpc_closure pick_closure_;
- std::pair<y_absl::string_view, y_absl::string_view> IteratorHandleGet(
- intptr_t handle) const override {
- grpc_linked_mdelem* linked_mdelem =
- reinterpret_cast<grpc_linked_mdelem*>(handle);
- return std::make_pair(
- StringViewFromSlice(GRPC_MDKEY(linked_mdelem->md)),
- StringViewFromSlice(GRPC_MDVALUE(linked_mdelem->md)));
- }
+ // Accessed while holding ChannelData::resolution_mu_.
+ bool service_config_applied_ = false;
+ bool queued_pending_resolver_result_ = false;
+ ChannelData::ResolverQueuedCall resolver_queued_call_;
+ ResolverQueuedCallCanceller* resolver_call_canceller_ = nullptr;
- CallData* calld_;
- grpc_metadata_batch* batch_;
- };
+ std::function<void()> on_call_committed_;
- class LbCallState : public LoadBalancingPolicy::CallState {
- public:
- explicit LbCallState(CallData* calld) : calld_(calld) {}
-
- void* Alloc(size_t size) override { return calld_->arena_->Alloc(size); }
-
- const LoadBalancingPolicy::BackendMetricData* GetBackendMetricData()
- override {
- if (calld_->backend_metric_data_ == nullptr) {
- grpc_linked_mdelem* md = calld_->recv_trailing_metadata_->idx.named
- .x_endpoint_load_metrics_bin;
- if (md != nullptr) {
- calld_->backend_metric_data_ =
- ParseBackendMetricData(GRPC_MDVALUE(md->md), calld_->arena_);
- }
- }
- return calld_->backend_metric_data_;
- }
+ grpc_closure* original_recv_initial_metadata_ready_ = nullptr;
+ grpc_closure recv_initial_metadata_ready_;
- y_absl::string_view ExperimentalGetCallAttribute(const char* key) override {
- auto it = calld_->call_attributes_.find(key);
- if (it == calld_->call_attributes_.end()) return y_absl::string_view();
- return it->second;
- }
+ RefCountedPtr<DynamicFilters> dynamic_filters_;
+ RefCountedPtr<DynamicFilters::Call> dynamic_call_;
- private:
- CallData* calld_;
- };
+ // Batches are added to this list when received from above.
+ // They are removed when we are done handling the batch (i.e., when
+ // either we have invoked all of the batch's callbacks or we have
+ // passed the batch down to the LB call and are not intercepting any of
+ // its callbacks).
+ grpc_transport_stream_op_batch* pending_batches_[MAX_PENDING_BATCHES] = {};
+
+ // Set when we get a cancel_stream op.
+ grpc_error* cancel_error_ = GRPC_ERROR_NONE;
+};
+
+//
+// ChannelData::RetryingCall definition
+//
+
+class ChannelData::RetryingCall {
+ public:
+ RetryingCall(
+ ChannelData* chand, const grpc_call_element_args& args,
+ grpc_polling_entity* pollent,
+ RefCountedPtr<ServerRetryThrottleData> retry_throttle_data,
+ const ClientChannelMethodParsedConfig::RetryPolicy* retry_policy);
+ ~RetryingCall();
+
+ void StartTransportStreamOpBatch(grpc_transport_stream_op_batch* batch);
+ RefCountedPtr<SubchannelCall> subchannel_call() const;
+
+ private:
// State used for starting a retryable batch on a subchannel call.
// This provides its own grpc_transport_stream_op_batch and other data
// structures needed to populate the ops in the batch.
@@ -491,15 +550,15 @@ class CallData {
// specified refcount. If set_on_complete is true, the batch's
// on_complete callback will be set to point to on_complete();
// otherwise, the batch's on_complete callback will be null.
- static SubchannelCallBatchData* Create(grpc_call_element* elem,
- int refcount, bool set_on_complete);
+ static SubchannelCallBatchData* Create(RetryingCall* call, int refcount,
+ bool set_on_complete);
void Unref() {
if (gpr_unref(&refs)) Destroy();
}
- SubchannelCallBatchData(grpc_call_element* elem, CallData* calld,
- int refcount, bool set_on_complete);
+ SubchannelCallBatchData(RetryingCall* call, int refcount,
+ bool set_on_complete);
// All dtor code must be added in `Destroy()`. This is because we may
// call closures in `SubchannelCallBatchData` after they are unrefed by
// `Unref()`, and msan would complain about accessing this class
@@ -510,7 +569,8 @@ class CallData {
gpr_refcount refs;
grpc_call_element* elem;
- RefCountedPtr<SubchannelCall> subchannel_call;
+ RetryingCall* call;
+ RefCountedPtr<ChannelData::LoadBalancedCall> lb_call;
// The batch to use in the subchannel call.
// Its payload field points to SubchannelCallRetryState::batch_payload.
grpc_transport_stream_op_batch batch;
@@ -590,43 +650,32 @@ class CallData {
// Pending batches stored in call data.
struct PendingBatch {
// The pending batch. If nullptr, this slot is empty.
- grpc_transport_stream_op_batch* batch;
+ grpc_transport_stream_op_batch* batch = nullptr;
// Indicates whether payload for send ops has been cached in CallData.
- bool send_ops_cached;
+ bool send_ops_cached = false;
};
- CallData(grpc_call_element* elem, const ChannelData& chand,
- const grpc_call_element_args& args);
- ~CallData();
-
// Caches data for send ops so that it can be retried later, if not
// already cached.
void MaybeCacheSendOpsForBatch(PendingBatch* pending);
- void FreeCachedSendInitialMetadata(ChannelData* chand);
+ void FreeCachedSendInitialMetadata();
// Frees cached send_message at index idx.
- void FreeCachedSendMessage(ChannelData* chand, size_t idx);
- void FreeCachedSendTrailingMetadata(ChannelData* chand);
+ void FreeCachedSendMessage(size_t idx);
+ void FreeCachedSendTrailingMetadata();
// Frees cached send ops that have already been completed after
// committing the call.
- void FreeCachedSendOpDataAfterCommit(grpc_call_element* elem,
- SubchannelCallRetryState* retry_state);
+ void FreeCachedSendOpDataAfterCommit(SubchannelCallRetryState* retry_state);
// Frees cached send ops that were completed by the completed batch in
// batch_data. Used when batches are completed after the call is committed.
void FreeCachedSendOpDataForCompletedBatch(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
+ SubchannelCallBatchData* batch_data,
SubchannelCallRetryState* retry_state);
- static void RecvTrailingMetadataReadyForLoadBalancingPolicy(
- void* arg, grpc_error* error);
- void MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(
- grpc_transport_stream_op_batch* batch);
-
// Returns the index into pending_batches_ to be used for batch.
static size_t GetBatchIndex(grpc_transport_stream_op_batch* batch);
- void PendingBatchesAdd(grpc_call_element* elem,
- grpc_transport_stream_op_batch* batch);
+ void PendingBatchesAdd(grpc_transport_stream_op_batch* batch);
void PendingBatchClear(PendingBatch* pending);
- void MaybeClearPendingBatch(grpc_call_element* elem, PendingBatch* pending);
+ void MaybeClearPendingBatch(PendingBatch* pending);
static void FailPendingBatchInCallCombiner(void* arg, grpc_error* error);
// A predicate type and some useful implementations for PendingBatchesFail().
typedef bool (*YieldCallCombinerPredicate)(
@@ -645,26 +694,24 @@ class CallData {
// If yield_call_combiner_predicate returns true, assumes responsibility for
// yielding the call combiner.
void PendingBatchesFail(
- grpc_call_element* elem, grpc_error* error,
+ grpc_error* error,
YieldCallCombinerPredicate yield_call_combiner_predicate);
static void ResumePendingBatchInCallCombiner(void* arg, grpc_error* ignored);
- // Resumes all pending batches on subchannel_call_.
- void PendingBatchesResume(grpc_call_element* elem);
+ // Resumes all pending batches on lb_call_.
+ void PendingBatchesResume();
// Returns a pointer to the first pending batch for which predicate(batch)
// returns true, or null if not found.
template <typename Predicate>
- PendingBatch* PendingBatchFind(grpc_call_element* elem,
- const char* log_message, Predicate predicate);
+ PendingBatch* PendingBatchFind(const char* log_message, Predicate predicate);
// Commits the call so that no further retry attempts will be performed.
- void RetryCommit(grpc_call_element* elem,
- SubchannelCallRetryState* retry_state);
+ void RetryCommit(SubchannelCallRetryState* retry_state);
// Starts a retry after appropriate back-off.
- void DoRetry(grpc_call_element* elem, SubchannelCallRetryState* retry_state,
+ void DoRetry(SubchannelCallRetryState* retry_state,
grpc_millis server_pushback_ms);
// Returns true if the call is being retried.
- bool MaybeRetry(grpc_call_element* elem, SubchannelCallBatchData* batch_data,
- grpc_status_code status, grpc_mdelem* server_pushback_md);
+ bool MaybeRetry(SubchannelCallBatchData* batch_data, grpc_status_code status,
+ grpc_mdelem* server_pushback_md);
// Invokes recv_initial_metadata_ready for a subchannel batch.
static void InvokeRecvInitialMetadataCallback(void* arg, grpc_error* error);
@@ -685,8 +732,8 @@ class CallData {
grpc_mdelem** server_pushback_md);
// Adds recv_trailing_metadata_ready closure to closures.
void AddClosureForRecvTrailingMetadataReady(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
- grpc_error* error, CallCombinerClosureList* closures);
+ SubchannelCallBatchData* batch_data, grpc_error* error,
+ CallCombinerClosureList* closures);
// Adds any necessary closures for deferred recv_initial_metadata and
// recv_message callbacks to closures.
static void AddClosuresForDeferredRecvCallbacks(
@@ -699,8 +746,8 @@ class CallData {
// For any pending batch containing an op that has not yet been started,
// adds the pending batch's completion closures to closures.
void AddClosuresToFailUnstartedPendingBatches(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state,
- grpc_error* error, CallCombinerClosureList* closures);
+ SubchannelCallRetryState* retry_state, grpc_error* error,
+ CallCombinerClosureList* closures);
// Runs necessary closures upon completion of a call attempt.
void RunClosuresForCompletedCall(SubchannelCallBatchData* batch_data,
grpc_error* error);
@@ -710,8 +757,7 @@ class CallData {
// Adds the on_complete closure for the pending batch completed in
// batch_data to closures.
- void AddClosuresForCompletedPendingBatch(grpc_call_element* elem,
- SubchannelCallBatchData* batch_data,
+ void AddClosuresForCompletedPendingBatch(SubchannelCallBatchData* batch_data,
grpc_error* error,
CallCombinerClosureList* closures);
@@ -719,7 +765,7 @@ class CallData {
// subchannel call, adds a closure to closures to invoke
// StartRetriableSubchannelBatches().
void AddClosuresForReplayOrPendingSendOps(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
+ SubchannelCallBatchData* batch_data,
SubchannelCallRetryState* retry_state, CallCombinerClosureList* closures);
// Callback used to intercept on_complete from subchannel calls.
@@ -728,15 +774,13 @@ class CallData {
static void StartBatchInCallCombiner(void* arg, grpc_error* ignored);
// Adds a closure to closures that will execute batch in the call combiner.
- void AddClosureForSubchannelBatch(grpc_call_element* elem,
- grpc_transport_stream_op_batch* batch,
+ void AddClosureForSubchannelBatch(grpc_transport_stream_op_batch* batch,
CallCombinerClosureList* closures);
// Adds retriable send_initial_metadata op to batch_data.
void AddRetriableSendInitialMetadataOp(SubchannelCallRetryState* retry_state,
SubchannelCallBatchData* batch_data);
// Adds retriable send_message op to batch_data.
- void AddRetriableSendMessageOp(grpc_call_element* elem,
- SubchannelCallRetryState* retry_state,
+ void AddRetriableSendMessageOp(SubchannelCallRetryState* retry_state,
SubchannelCallBatchData* batch_data);
// Adds retriable send_trailing_metadata op to batch_data.
void AddRetriableSendTrailingMetadataOp(SubchannelCallRetryState* retry_state,
@@ -754,42 +798,26 @@ class CallData {
// is used in the case where a recv_initial_metadata or recv_message
// op fails in a way that we know the call is over but when the application
// has not yet started its own recv_trailing_metadata op.
- void StartInternalRecvTrailingMetadata(grpc_call_element* elem);
+ void StartInternalRecvTrailingMetadata();
// If there are any cached send ops that need to be replayed on the
// current subchannel call, creates and returns a new subchannel batch
// to replay those ops. Otherwise, returns nullptr.
SubchannelCallBatchData* MaybeCreateSubchannelBatchForReplay(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state);
+ SubchannelCallRetryState* retry_state);
// Adds subchannel batches for pending batches to closures.
void AddSubchannelBatchesForPendingBatches(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state,
- CallCombinerClosureList* closures);
+ SubchannelCallRetryState* retry_state, CallCombinerClosureList* closures);
// Constructs and starts whatever subchannel batches are needed on the
// subchannel call.
static void StartRetriableSubchannelBatches(void* arg, grpc_error* ignored);
- void CreateSubchannelCall(grpc_call_element* elem);
- // Invoked when a pick is completed, on both success or failure.
- static void PickDone(void* arg, grpc_error* error);
- // Removes the call from the channel's list of queued picks if present.
- void MaybeRemoveCallFromQueuedPicksLocked(grpc_call_element* elem);
- // Adds the call to the channel's list of queued picks if not already present.
- void MaybeAddCallToQueuedPicksLocked(grpc_call_element* elem);
- // Applies service config to the call. Must be invoked once we know
- // that the resolver has returned results to the channel.
- // If an error is returned, the error indicates the status with which
- // the call should be failed.
- grpc_error* ApplyServiceConfigToCallLocked(
- grpc_call_element* elem, grpc_metadata_batch* initial_metadata);
- void MaybeInvokeConfigSelectorCommitCallback();
+ static void CreateLbCall(void* arg, grpc_error* error);
- // State for handling deadlines.
- // The code in deadline_filter.c requires this to be the first field.
- // TODO(roth): This is slightly sub-optimal in that grpc_deadline_state
- // and this struct both independently store pointers to the call stack
- // and call combiner. If/when we have time, find a way to avoid this
- // without breaking the grpc_deadline_state abstraction.
- grpc_deadline_state deadline_state_;
+ ChannelData* chand_;
+ grpc_polling_entity* pollent_;
+ RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_;
+ const ClientChannelMethodParsedConfig::RetryPolicy* retry_policy_ = nullptr;
+ BackOff retry_backoff_;
grpc_slice path_; // Request path.
gpr_cycle_counter call_start_time_;
@@ -799,53 +827,32 @@ class CallData {
CallCombiner* call_combiner_;
grpc_call_context_element* call_context_;
- RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_;
- const ClientChannelMethodParsedConfig* method_params_ = nullptr;
- std::map<const char*, y_absl::string_view> call_attributes_;
- std::function<void()> on_call_committed_;
-
- RefCountedPtr<SubchannelCall> subchannel_call_;
-
- // Set when we get a cancel_stream op.
- grpc_error* cancel_error_ = GRPC_ERROR_NONE;
-
- ChannelData::QueuedPick pick_;
- bool pick_queued_ = false;
- bool service_config_applied_ = false;
- QueuedPickCanceller* pick_canceller_ = nullptr;
- LbCallState lb_call_state_;
- const LoadBalancingPolicy::BackendMetricData* backend_metric_data_ = nullptr;
- RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
- std::function<void(grpc_error*, LoadBalancingPolicy::MetadataInterface*,
- LoadBalancingPolicy::CallState*)>
- lb_recv_trailing_metadata_ready_;
- grpc_closure pick_closure_;
-
- // For intercepting recv_trailing_metadata_ready for the LB policy.
- grpc_metadata_batch* recv_trailing_metadata_ = nullptr;
- grpc_closure recv_trailing_metadata_ready_;
- grpc_closure* original_recv_trailing_metadata_ready_ = nullptr;
+ grpc_closure retry_closure_;
- grpc_polling_entity* pollent_ = nullptr;
+ RefCountedPtr<ChannelData::LoadBalancedCall> lb_call_;
// Batches are added to this list when received from above.
// They are removed when we are done handling the batch (i.e., when
// either we have invoked all of the batch's callbacks or we have
- // passed the batch down to the subchannel call and are not
- // intercepting any of its callbacks).
- PendingBatch pending_batches_[MAX_PENDING_BATCHES] = {};
+ // passed the batch down to the LB call and are not intercepting any of
+ // its callbacks).
+ // TODO(roth): Now that the retry code is split out into its own call
+ // object, revamp this to work in a cleaner way, since we no longer need
+ // for batches to ever wait for name resolution or LB picks.
+ PendingBatch pending_batches_[MAX_PENDING_BATCHES];
bool pending_send_initial_metadata_ : 1;
bool pending_send_message_ : 1;
bool pending_send_trailing_metadata_ : 1;
+ // Set when we get a cancel_stream op.
+ grpc_error* cancel_error_ = GRPC_ERROR_NONE;
+
// Retry state.
bool enable_retries_ : 1;
bool retry_committed_ : 1;
bool last_attempt_got_server_pushback_ : 1;
int num_attempts_completed_ = 0;
size_t bytes_buffered_for_retry_ = 0;
- // TODO(roth): Restructure this to eliminate use of ManualConstructor.
- ManualConstructor<BackOff> retry_backoff_;
grpc_timer retry_timer_;
// The number of pending retriable subchannel batches containing send ops.
@@ -879,11 +886,362 @@ class CallData {
};
//
-// ChannelData::SubchannelWrapper
+// ChannelData::LoadBalancedCall definition
//
-using ServerAddressAttributeMap =
- std::map<const char*, std::unique_ptr<ServerAddress::AttributeInterface>>;
+// This object is ref-counted, but it cannot inherit from RefCounted<>,
+// because it is allocated on the arena and can't free its memory when
+// its refcount goes to zero. So instead, it manually implements the
+// same API as RefCounted<>, so that it can be used with RefCountedPtr<>.
+class ChannelData::LoadBalancedCall {
+ public:
+ static RefCountedPtr<LoadBalancedCall> Create(
+ ChannelData* chand, const grpc_call_element_args& args,
+ grpc_polling_entity* pollent, size_t parent_data_size);
+
+ LoadBalancedCall(ChannelData* chand, const grpc_call_element_args& args,
+ grpc_polling_entity* pollent);
+ ~LoadBalancedCall();
+
+ // Interface of RefCounted<>.
+ RefCountedPtr<LoadBalancedCall> Ref() GRPC_MUST_USE_RESULT;
+ RefCountedPtr<LoadBalancedCall> Ref(const DebugLocation& location,
+ const char* reason) GRPC_MUST_USE_RESULT;
+ // When refcount drops to 0, destroys itself and the associated call stack,
+ // but does NOT free the memory because it's in the call arena.
+ void Unref();
+ void Unref(const DebugLocation& location, const char* reason);
+
+ void* GetParentData();
+
+ void StartTransportStreamOpBatch(grpc_transport_stream_op_batch* batch);
+
+ // Invoked by channel for queued LB picks when the picker is updated.
+ static void PickSubchannel(void* arg, grpc_error* error);
+ // Helper function for performing an LB pick while holding the data plane
+ // mutex. Returns true if the pick is complete, in which case the caller
+ // must invoke PickDone() or AsyncPickDone() with the returned error.
+ bool PickSubchannelLocked(grpc_error** error)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::data_plane_mu_);
+ // Schedules a callback to process the completed pick. The callback
+ // will not run until after this method returns.
+ void AsyncPickDone(grpc_error* error);
+
+ RefCountedPtr<SubchannelCall> subchannel_call() const {
+ return subchannel_call_;
+ }
+
+ private:
+ // Allow RefCountedPtr<> to access IncrementRefCount().
+ template <typename T>
+ friend class ::grpc_core::RefCountedPtr;
+
+ class LbQueuedCallCanceller;
+ class Metadata;
+ class LbCallState;
+
+ // Interface of RefCounted<>.
+ void IncrementRefCount();
+ void IncrementRefCount(const DebugLocation& location, const char* reason);
+
+ // Returns the index into pending_batches_ to be used for batch.
+ static size_t GetBatchIndex(grpc_transport_stream_op_batch* batch);
+ void PendingBatchesAdd(grpc_transport_stream_op_batch* batch);
+ static void FailPendingBatchInCallCombiner(void* arg, grpc_error* error);
+ // A predicate type and some useful implementations for PendingBatchesFail().
+ typedef bool (*YieldCallCombinerPredicate)(
+ const CallCombinerClosureList& closures);
+ static bool YieldCallCombiner(const CallCombinerClosureList& /*closures*/) {
+ return true;
+ }
+ static bool NoYieldCallCombiner(const CallCombinerClosureList& /*closures*/) {
+ return false;
+ }
+ static bool YieldCallCombinerIfPendingBatchesFound(
+ const CallCombinerClosureList& closures) {
+ return closures.size() > 0;
+ }
+ // Fails all pending batches.
+ // If yield_call_combiner_predicate returns true, assumes responsibility for
+ // yielding the call combiner.
+ void PendingBatchesFail(
+ grpc_error* error,
+ YieldCallCombinerPredicate yield_call_combiner_predicate);
+ static void ResumePendingBatchInCallCombiner(void* arg, grpc_error* ignored);
+ // Resumes all pending batches on subchannel_call_.
+ void PendingBatchesResume();
+
+ static void RecvTrailingMetadataReadyForLoadBalancingPolicy(
+ void* arg, grpc_error* error);
+ void InjectRecvTrailingMetadataReadyForLoadBalancingPolicy(
+ grpc_transport_stream_op_batch* batch);
+
+ void CreateSubchannelCall();
+ // Invoked when a pick is completed, on both success or failure.
+ static void PickDone(void* arg, grpc_error* error);
+ // Removes the call from the channel's list of queued picks if present.
+ void MaybeRemoveCallFromLbQueuedCallsLocked()
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::data_plane_mu_);
+ // Adds the call to the channel's list of queued picks if not already present.
+ void MaybeAddCallToLbQueuedCallsLocked()
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&ChannelData::data_plane_mu_);
+
+ RefCount refs_;
+
+ ChannelData* chand_;
+
+ // TODO(roth): Instead of duplicating these fields in every filter
+ // that uses any one of them, we should store them in the call
+ // context. This will save per-call memory overhead.
+ grpc_slice path_; // Request path.
+ gpr_cycle_counter call_start_time_;
+ grpc_millis deadline_;
+ Arena* arena_;
+ grpc_call_stack* owning_call_;
+ CallCombiner* call_combiner_;
+ grpc_call_context_element* call_context_;
+
+ // Set when we get a cancel_stream op.
+ grpc_error* cancel_error_ = GRPC_ERROR_NONE;
+
+ grpc_polling_entity* pollent_ = nullptr;
+
+ grpc_closure pick_closure_;
+
+ // Accessed while holding ChannelData::data_plane_mu_.
+ ChannelData::LbQueuedCall queued_call_;
+ bool queued_pending_lb_pick_ = false;
+ const LoadBalancingPolicy::BackendMetricData* backend_metric_data_ = nullptr;
+ RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
+ std::function<void(grpc_error*, LoadBalancingPolicy::MetadataInterface*,
+ LoadBalancingPolicy::CallState*)>
+ lb_recv_trailing_metadata_ready_;
+ LbQueuedCallCanceller* lb_call_canceller_ = nullptr;
+
+ RefCountedPtr<SubchannelCall> subchannel_call_;
+
+ // For intercepting recv_trailing_metadata_ready for the LB policy.
+ grpc_metadata_batch* recv_trailing_metadata_ = nullptr;
+ grpc_closure recv_trailing_metadata_ready_;
+ grpc_closure* original_recv_trailing_metadata_ready_ = nullptr;
+
+ // Batches are added to this list when received from above.
+ // They are removed when we are done handling the batch (i.e., when
+ // either we have invoked all of the batch's callbacks or we have
+ // passed the batch down to the subchannel call and are not
+ // intercepting any of its callbacks).
+ grpc_transport_stream_op_batch* pending_batches_[MAX_PENDING_BATCHES] = {};
+};
+
+//
+// dynamic termination filter
+//
+
+// Channel arg pointer vtable for GRPC_ARG_CLIENT_CHANNEL_DATA.
+void* ChannelDataArgCopy(void* p) { return p; }
+void ChannelDataArgDestroy(void* /*p*/) {}
+int ChannelDataArgCmp(void* p, void* q) { return GPR_ICMP(p, q); }
+const grpc_arg_pointer_vtable kChannelDataArgPointerVtable = {
+ ChannelDataArgCopy, ChannelDataArgDestroy, ChannelDataArgCmp};
+
+// Channel arg pointer vtable for GRPC_ARG_RETRY_THROTTLE_DATA.
+void* RetryThrottleDataArgCopy(void* p) {
+ auto* retry_throttle_data = static_cast<ServerRetryThrottleData*>(p);
+ retry_throttle_data->Ref().release();
+ return p;
+}
+void RetryThrottleDataArgDestroy(void* p) {
+ auto* retry_throttle_data = static_cast<ServerRetryThrottleData*>(p);
+ retry_throttle_data->Unref();
+}
+int RetryThrottleDataArgCmp(void* p, void* q) { return GPR_ICMP(p, q); }
+const grpc_arg_pointer_vtable kRetryThrottleDataArgPointerVtable = {
+ RetryThrottleDataArgCopy, RetryThrottleDataArgDestroy,
+ RetryThrottleDataArgCmp};
+
+class ChannelData::DynamicTerminationFilterChannelData {
+ public:
+ class DynamicTerminationFilterCallData;
+
+ static const grpc_channel_filter kDynamicTerminationFilterVtable;
+
+ static grpc_error* Init(grpc_channel_element* elem,
+ grpc_channel_element_args* args) {
+ GPR_ASSERT(args->is_last);
+ GPR_ASSERT(elem->filter == &kDynamicTerminationFilterVtable);
+ new (elem->channel_data)
+ DynamicTerminationFilterChannelData(args->channel_args);
+ return GRPC_ERROR_NONE;
+ }
+
+ static void Destroy(grpc_channel_element* elem) {
+ auto* chand =
+ static_cast<DynamicTerminationFilterChannelData*>(elem->channel_data);
+ chand->~DynamicTerminationFilterChannelData();
+ }
+
+ // Will never be called.
+ static void StartTransportOp(grpc_channel_element* /*elem*/,
+ grpc_transport_op* /*op*/) {}
+ static void GetChannelInfo(grpc_channel_element* /*elem*/,
+ const grpc_channel_info* /*info*/) {}
+
+ private:
+ static RefCountedPtr<ServerRetryThrottleData> GetRetryThrottleDataFromArgs(
+ const grpc_channel_args* args) {
+ auto* retry_throttle_data =
+ grpc_channel_args_find_pointer<ServerRetryThrottleData>(
+ args, GRPC_ARG_RETRY_THROTTLE_DATA);
+ if (retry_throttle_data == nullptr) return nullptr;
+ return retry_throttle_data->Ref();
+ }
+
+ explicit DynamicTerminationFilterChannelData(const grpc_channel_args* args)
+ : chand_(grpc_channel_args_find_pointer<ChannelData>(
+ args, GRPC_ARG_CLIENT_CHANNEL_DATA)),
+ retry_throttle_data_(GetRetryThrottleDataFromArgs(args)) {}
+
+ ChannelData* chand_;
+ RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_;
+};
+
+class ChannelData::DynamicTerminationFilterChannelData::
+ DynamicTerminationFilterCallData {
+ public:
+ static grpc_error* Init(grpc_call_element* elem,
+ const grpc_call_element_args* args) {
+ new (elem->call_data) DynamicTerminationFilterCallData(*args);
+ return GRPC_ERROR_NONE;
+ }
+
+ static void Destroy(grpc_call_element* elem,
+ const grpc_call_final_info* /*final_info*/,
+ grpc_closure* then_schedule_closure) {
+ auto* calld =
+ static_cast<DynamicTerminationFilterCallData*>(elem->call_data);
+ auto* chand =
+ static_cast<DynamicTerminationFilterChannelData*>(elem->channel_data);
+ RefCountedPtr<SubchannelCall> subchannel_call;
+ if (chand->chand_->enable_retries_) {
+ if (GPR_LIKELY(calld->retrying_call_ != nullptr)) {
+ subchannel_call = calld->retrying_call_->subchannel_call();
+ calld->retrying_call_->~RetryingCall();
+ }
+ } else {
+ if (GPR_LIKELY(calld->lb_call_ != nullptr)) {
+ subchannel_call = calld->lb_call_->subchannel_call();
+ }
+ }
+ calld->~DynamicTerminationFilterCallData();
+ if (GPR_LIKELY(subchannel_call != nullptr)) {
+ subchannel_call->SetAfterCallStackDestroy(then_schedule_closure);
+ } else {
+ // TODO(yashkt) : This can potentially be a Closure::Run
+ ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
+ }
+ }
+
+ static void StartTransportStreamOpBatch(
+ grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
+ auto* calld =
+ static_cast<DynamicTerminationFilterCallData*>(elem->call_data);
+ auto* chand =
+ static_cast<DynamicTerminationFilterChannelData*>(elem->channel_data);
+ if (chand->chand_->enable_retries_) {
+ calld->retrying_call_->StartTransportStreamOpBatch(batch);
+ } else {
+ calld->lb_call_->StartTransportStreamOpBatch(batch);
+ }
+ }
+
+ static void SetPollent(grpc_call_element* elem,
+ grpc_polling_entity* pollent) {
+ auto* calld =
+ static_cast<DynamicTerminationFilterCallData*>(elem->call_data);
+ auto* chand =
+ static_cast<DynamicTerminationFilterChannelData*>(elem->channel_data);
+ ChannelData* client_channel = chand->chand_;
+ grpc_call_element_args args = {
+ calld->owning_call_, nullptr,
+ calld->call_context_, calld->path_,
+ calld->call_start_time_, calld->deadline_,
+ calld->arena_, calld->call_combiner_};
+ if (client_channel->enable_retries_) {
+ // Get retry settings from service config.
+ auto* svc_cfg_call_data = static_cast<ServiceConfigCallData*>(
+ calld->call_context_[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value);
+ GPR_ASSERT(svc_cfg_call_data != nullptr);
+ auto* method_config = static_cast<const ClientChannelMethodParsedConfig*>(
+ svc_cfg_call_data->GetMethodParsedConfig(
+ ClientChannelServiceConfigParser::ParserIndex()));
+ // Create retrying call.
+ calld->retrying_call_ = calld->arena_->New<ChannelData::RetryingCall>(
+ client_channel, args, pollent, chand->retry_throttle_data_,
+ method_config == nullptr ? nullptr : method_config->retry_policy());
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(
+ GPR_INFO,
+ "chand=%p dymamic_termination_calld=%p: create retrying_call=%p",
+ client_channel, calld, calld->retrying_call_);
+ }
+ } else {
+ calld->lb_call_ = ChannelData::LoadBalancedCall::Create(client_channel,
+ args, pollent, 0);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p dynamic_termination_calld=%p: create lb_call=%p",
+ chand, client_channel, calld->lb_call_.get());
+ }
+ }
+ }
+
+ private:
+ explicit DynamicTerminationFilterCallData(const grpc_call_element_args& args)
+ : path_(grpc_slice_ref_internal(args.path)),
+ call_start_time_(args.start_time),
+ deadline_(args.deadline),
+ arena_(args.arena),
+ owning_call_(args.call_stack),
+ call_combiner_(args.call_combiner),
+ call_context_(args.context) {}
+
+ ~DynamicTerminationFilterCallData() { grpc_slice_unref_internal(path_); }
+
+ grpc_slice path_; // Request path.
+ gpr_cycle_counter call_start_time_;
+ grpc_millis deadline_;
+ Arena* arena_;
+ grpc_call_stack* owning_call_;
+ CallCombiner* call_combiner_;
+ grpc_call_context_element* call_context_;
+
+ ChannelData::RetryingCall* retrying_call_ = nullptr;
+ RefCountedPtr<LoadBalancedCall> lb_call_;
+};
+
+const grpc_channel_filter ChannelData::DynamicTerminationFilterChannelData::
+ kDynamicTerminationFilterVtable = {
+ ChannelData::DynamicTerminationFilterChannelData::
+ DynamicTerminationFilterCallData::StartTransportStreamOpBatch,
+ ChannelData::DynamicTerminationFilterChannelData::StartTransportOp,
+ sizeof(ChannelData::DynamicTerminationFilterChannelData::
+ DynamicTerminationFilterCallData),
+ ChannelData::DynamicTerminationFilterChannelData::
+ DynamicTerminationFilterCallData::Init,
+ ChannelData::DynamicTerminationFilterChannelData::
+ DynamicTerminationFilterCallData::SetPollent,
+ ChannelData::DynamicTerminationFilterChannelData::
+ DynamicTerminationFilterCallData::Destroy,
+ sizeof(ChannelData::DynamicTerminationFilterChannelData),
+ ChannelData::DynamicTerminationFilterChannelData::Init,
+ ChannelData::DynamicTerminationFilterChannelData::Destroy,
+ ChannelData::DynamicTerminationFilterChannelData::GetChannelInfo,
+ "dynamic_filter_termination",
+};
+
+//
+// ChannelData::SubchannelWrapper
+//
// This class is a wrapper for Subchannel that hides details of the
// channel's implementation (such as the health check service name and
@@ -895,42 +1253,44 @@ using ServerAddressAttributeMap =
// control plane work_serializer.
class ChannelData::SubchannelWrapper : public SubchannelInterface {
public:
- SubchannelWrapper(ChannelData* chand, Subchannel* subchannel,
- grpc_core::UniquePtr<char> health_check_service_name,
- ServerAddressAttributeMap attributes)
- : SubchannelInterface(&grpc_client_channel_routing_trace),
+ SubchannelWrapper(ChannelData* chand, RefCountedPtr<Subchannel> subchannel,
+ y_absl::optional<TString> health_check_service_name)
+ : SubchannelInterface(
+ GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)
+ ? "SubchannelWrapper"
+ : nullptr),
chand_(chand),
- subchannel_(subchannel),
- health_check_service_name_(std::move(health_check_service_name)),
- attributes_(std::move(attributes)) {
+ subchannel_(std::move(subchannel)),
+ health_check_service_name_(std::move(health_check_service_name)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p: creating subchannel wrapper %p for subchannel %p",
- chand, this, subchannel_);
+ chand, this, subchannel_.get());
}
GRPC_CHANNEL_STACK_REF(chand_->owning_stack_, "SubchannelWrapper");
auto* subchannel_node = subchannel_->channelz_node();
if (subchannel_node != nullptr) {
- auto it = chand_->subchannel_refcount_map_.find(subchannel_);
+ auto it = chand_->subchannel_refcount_map_.find(subchannel_.get());
if (it == chand_->subchannel_refcount_map_.end()) {
chand_->channelz_node_->AddChildSubchannel(subchannel_node->uuid());
- it = chand_->subchannel_refcount_map_.emplace(subchannel_, 0).first;
+ it = chand_->subchannel_refcount_map_.emplace(subchannel_.get(), 0)
+ .first;
}
++it->second;
}
chand_->subchannel_wrappers_.insert(this);
}
- ~SubchannelWrapper() {
+ ~SubchannelWrapper() override {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p: destroying subchannel wrapper %p for subchannel %p",
- chand_, this, subchannel_);
+ chand_, this, subchannel_.get());
}
chand_->subchannel_wrappers_.erase(this);
auto* subchannel_node = subchannel_->channelz_node();
if (subchannel_node != nullptr) {
- auto it = chand_->subchannel_refcount_map_.find(subchannel_);
+ auto it = chand_->subchannel_refcount_map_.find(subchannel_.get());
GPR_ASSERT(it != chand_->subchannel_refcount_map_.end());
--it->second;
if (it->second == 0) {
@@ -938,14 +1298,13 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
chand_->subchannel_refcount_map_.erase(it);
}
}
- GRPC_SUBCHANNEL_UNREF(subchannel_, "unref from LB");
GRPC_CHANNEL_STACK_UNREF(chand_->owning_stack_, "SubchannelWrapper");
}
grpc_connectivity_state CheckConnectivityState() override {
RefCountedPtr<ConnectedSubchannel> connected_subchannel;
grpc_connectivity_state connectivity_state =
- subchannel_->CheckConnectivityState(health_check_service_name_.get(),
+ subchannel_->CheckConnectivityState(health_check_service_name_,
&connected_subchannel);
MaybeUpdateConnectedSubchannel(std::move(connected_subchannel));
return connectivity_state;
@@ -960,9 +1319,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
Ref(DEBUG_LOCATION, "WatcherWrapper"),
initial_state);
subchannel_->WatchConnectivityState(
- initial_state,
- grpc_core::UniquePtr<char>(
- gpr_strdup(health_check_service_name_.get())),
+ initial_state, health_check_service_name_,
RefCountedPtr<Subchannel::ConnectivityStateWatcherInterface>(
watcher_wrapper));
}
@@ -971,7 +1328,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
ConnectivityStateWatcherInterface* watcher) override {
auto it = watcher_map_.find(watcher);
GPR_ASSERT(it != watcher_map_.end());
- subchannel_->CancelConnectivityStateWatch(health_check_service_name_.get(),
+ subchannel_->CancelConnectivityStateWatch(health_check_service_name_,
it->second);
watcher_map_.erase(it);
}
@@ -984,25 +1341,18 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
return subchannel_->channel_args();
}
- const ServerAddress::AttributeInterface* GetAttribute(
- const char* key) const override {
- auto it = attributes_.find(key);
- if (it == attributes_.end()) return nullptr;
- return it->second.get();
- }
-
void ThrottleKeepaliveTime(int new_keepalive_time) {
subchannel_->ThrottleKeepaliveTime(new_keepalive_time);
}
void UpdateHealthCheckServiceName(
- grpc_core::UniquePtr<char> health_check_service_name) {
+ y_absl::optional<TString> health_check_service_name) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
"chand=%p: subchannel wrapper %p: updating health check service "
"name from \"%s\" to \"%s\"",
- chand_, this, health_check_service_name_.get(),
- health_check_service_name.get());
+ chand_, this, health_check_service_name_->c_str(),
+ health_check_service_name->c_str());
}
for (auto& p : watcher_map_) {
WatcherWrapper*& watcher_wrapper = p.second;
@@ -1017,13 +1367,11 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
// problem, we may be able to handle it by waiting for the new
// watcher to report READY before we use it to replace the old one.
WatcherWrapper* replacement = watcher_wrapper->MakeReplacement();
- subchannel_->CancelConnectivityStateWatch(
- health_check_service_name_.get(), watcher_wrapper);
+ subchannel_->CancelConnectivityStateWatch(health_check_service_name_,
+ watcher_wrapper);
watcher_wrapper = replacement;
subchannel_->WatchConnectivityState(
- replacement->last_seen_state(),
- grpc_core::UniquePtr<char>(
- gpr_strdup(health_check_service_name.get())),
+ replacement->last_seen_state(), health_check_service_name,
RefCountedPtr<Subchannel::ConnectivityStateWatcherInterface>(
replacement));
}
@@ -1071,7 +1419,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
parent_(std::move(parent)),
last_seen_state_(initial_state) {}
- ~WatcherWrapper() {
+ ~WatcherWrapper() override {
auto* parent = parent_.release(); // ref owned by lambda
parent->chand_->work_serializer_->Run(
[parent]() { parent->Unref(DEBUG_LOCATION, "WatcherWrapper"); },
@@ -1083,7 +1431,7 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
gpr_log(GPR_INFO,
"chand=%p: connectivity change for subchannel wrapper %p "
"subchannel %p; hopping into work_serializer",
- parent_->chand_, parent_.get(), parent_->subchannel_);
+ parent_->chand_, parent_.get(), parent_->subchannel_.get());
}
Ref().release(); // ref owned by lambda
parent_->chand_->work_serializer_->Run(
@@ -1117,12 +1465,12 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
"chand=%p: processing connectivity change in work serializer "
"for subchannel wrapper %p subchannel %p "
"watcher=%p",
- parent_->chand_, parent_.get(), parent_->subchannel_,
+ parent_->chand_, parent_.get(), parent_->subchannel_.get(),
watcher_.get());
}
ConnectivityStateChange state_change = PopConnectivityStateChange();
y_absl::optional<y_absl::Cord> keepalive_throttling =
- state_change.status.GetPayload(grpc_core::kKeepaliveThrottlingKey);
+ state_change.status.GetPayload(kKeepaliveThrottlingKey);
if (keepalive_throttling.has_value()) {
int new_keepalive_time = -1;
if (y_absl::SimpleAtoi(TString(keepalive_throttling.value()),
@@ -1186,9 +1534,8 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
}
ChannelData* chand_;
- Subchannel* subchannel_;
- grpc_core::UniquePtr<char> health_check_service_name_;
- ServerAddressAttributeMap attributes_;
+ RefCountedPtr<Subchannel> subchannel_;
+ y_absl::optional<TString> health_check_service_name_;
// Maps from the address of the watcher passed to us by the LB policy
// to the address of the WrapperWatcher that we passed to the underlying
// subchannel. This is needed so that when the LB policy calls
@@ -1363,18 +1710,6 @@ class ChannelData::ConnectivityWatcherRemover {
// ChannelData::ClientChannelControlHelper
//
-} // namespace
-
-// Allows accessing the attributes from a ServerAddress.
-class ChannelServerAddressPeer {
- public:
- static ServerAddressAttributeMap GetAttributes(ServerAddress* address) {
- return std::move(address->attributes_);
- }
-};
-
-namespace {
-
class ChannelData::ClientChannelControlHelper
: public LoadBalancingPolicy::ChannelControlHelper {
public:
@@ -1389,13 +1724,13 @@ class ChannelData::ClientChannelControlHelper
RefCountedPtr<SubchannelInterface> CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) override {
+ if (chand_->resolver_ == nullptr) return nullptr; // Shutting down.
// Determine health check service name.
bool inhibit_health_checking = grpc_channel_arg_get_bool(
grpc_channel_args_find(&args, GRPC_ARG_INHIBIT_HEALTH_CHECKING), false);
- grpc_core::UniquePtr<char> health_check_service_name;
+ y_absl::optional<TString> health_check_service_name;
if (!inhibit_health_checking) {
- health_check_service_name.reset(
- gpr_strdup(chand_->health_check_service_name_.get()));
+ health_check_service_name = chand_->health_check_service_name_;
}
// Remove channel args that should not affect subchannel uniqueness.
static const char* args_to_remove[] = {
@@ -1418,7 +1753,7 @@ class ChannelData::ClientChannelControlHelper
args_to_add.data(), args_to_add.size());
gpr_free(args_to_add[0].value.string);
// Create subchannel.
- Subchannel* subchannel =
+ RefCountedPtr<Subchannel> subchannel =
chand_->client_channel_factory_->CreateSubchannel(new_args);
grpc_channel_args_destroy(new_args);
if (subchannel == nullptr) return nullptr;
@@ -1426,13 +1761,13 @@ class ChannelData::ClientChannelControlHelper
subchannel->ThrottleKeepaliveTime(chand_->keepalive_time_);
// Create and return wrapper for the subchannel.
return MakeRefCounted<SubchannelWrapper>(
- chand_, subchannel, std::move(health_check_service_name),
- ChannelServerAddressPeer::GetAttributes(&address));
+ chand_, std::move(subchannel), std::move(health_check_service_name));
}
void UpdateState(
grpc_connectivity_state state, const y_absl::Status& status,
std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) override {
+ if (chand_->resolver_ == nullptr) return; // Shutting down.
grpc_error* disconnect_error = chand_->disconnect_error();
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
const char* extra = disconnect_error == GRPC_ERROR_NONE
@@ -1449,11 +1784,17 @@ class ChannelData::ClientChannelControlHelper
}
}
- // No-op -- we should never get this from ResolvingLoadBalancingPolicy.
- void RequestReresolution() override {}
+ void RequestReresolution() override {
+ if (chand_->resolver_ == nullptr) return; // Shutting down.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: started name re-resolving", chand_);
+ }
+ chand_->resolver_->RequestReresolutionLocked();
+ }
void AddTraceEvent(TraceSeverity severity,
y_absl::string_view message) override {
+ if (chand_->resolver_ == nullptr) return; // Shutting down.
if (chand_->channelz_node_ != nullptr) {
chand_->channelz_node_->AddTraceEvent(
ConvertSeverityEnum(severity),
@@ -1473,139 +1814,6 @@ class ChannelData::ClientChannelControlHelper
};
//
-// ChannelData::ChannelConfigHelper
-//
-
-ChannelData::ChannelConfigHelper::ChooseServiceConfigResult
-ChannelData::ChannelConfigHelper::ChooseServiceConfig(
- const Resolver::Result& result) {
- ChooseServiceConfigResult service_config_result;
- RefCountedPtr<ServiceConfig> service_config;
- RefCountedPtr<ConfigSelector> config_selector;
- if (result.service_config_error != GRPC_ERROR_NONE) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO, "chand=%p: resolver returned service config error: %s",
- chand_, grpc_error_string(result.service_config_error));
- }
- // If the service config was invalid, then fallback to the
- // previously returned service config.
- if (chand_->saved_service_config_ != nullptr) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p: resolver returned invalid service config. "
- "Continuing to use previous service config.",
- chand_);
- }
- service_config = chand_->saved_service_config_;
- config_selector = chand_->saved_config_selector_;
- } else {
- // No previously returned config, so put the channel into
- // TRANSIENT_FAILURE.
- service_config_result.no_valid_service_config = true;
- return service_config_result;
- }
- } else if (result.service_config == nullptr) {
- // Resolver did not return any service config.
- if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p: resolver returned no service config. Using default "
- "service config for channel.",
- chand_);
- }
- service_config = chand_->default_service_config_;
- } else {
- // Use ServiceConfig and ConfigSelector returned by resolver.
- service_config = result.service_config;
- config_selector = ConfigSelector::GetFromChannelArgs(*result.args);
- }
- GPR_ASSERT(service_config != nullptr);
- // Extract global config for client channel.
- const internal::ClientChannelGlobalParsedConfig* parsed_service_config =
- static_cast<const internal::ClientChannelGlobalParsedConfig*>(
- service_config->GetGlobalParsedConfig(
- internal::ClientChannelServiceConfigParser::ParserIndex()));
- // Find LB policy config.
- ChooseLbPolicy(result, parsed_service_config,
- &service_config_result.lb_policy_config);
- // Check if the ServiceConfig has changed.
- const bool service_config_changed =
- chand_->saved_service_config_ == nullptr ||
- service_config->json_string() !=
- chand_->saved_service_config_->json_string();
- // Check if the ConfigSelector has changed.
- const bool config_selector_changed = !ConfigSelector::Equals(
- chand_->saved_config_selector_.get(), config_selector.get());
- // Indicate a change if either the ServiceConfig or ConfigSelector have
- // changed.
- service_config_result.service_config_changed =
- service_config_changed || config_selector_changed;
- // If it has, apply the global parameters now.
- if (service_config_result.service_config_changed) {
- chand_->UpdateServiceConfigInControlPlaneLocked(
- std::move(service_config), std::move(config_selector),
- parsed_service_config, service_config_result.lb_policy_config->name());
- }
- // Return results.
- return service_config_result;
-}
-
-void ChannelData::ChannelConfigHelper::StartUsingServiceConfigForCalls() {
- chand_->UpdateServiceConfigInDataPlaneLocked();
-}
-
-void ChannelData::ChannelConfigHelper::ResolverTransientFailure(
- grpc_error* error) {
- MutexLock lock(&chand_->data_plane_mu_);
- GRPC_ERROR_UNREF(chand_->resolver_transient_failure_error_);
- chand_->resolver_transient_failure_error_ = error;
-}
-
-void ChannelData::ChannelConfigHelper::ChooseLbPolicy(
- const Resolver::Result& resolver_result,
- const internal::ClientChannelGlobalParsedConfig* parsed_service_config,
- RefCountedPtr<LoadBalancingPolicy::Config>* lb_policy_config) {
- // Prefer the LB policy config found in the service config.
- if (parsed_service_config->parsed_lb_config() != nullptr) {
- *lb_policy_config = parsed_service_config->parsed_lb_config();
- return;
- }
- // Try the deprecated LB policy name from the service config.
- // If not, try the setting from channel args.
- const char* policy_name = nullptr;
- if (!parsed_service_config->parsed_deprecated_lb_policy().empty()) {
- policy_name = parsed_service_config->parsed_deprecated_lb_policy().c_str();
- } else {
- const grpc_arg* channel_arg =
- grpc_channel_args_find(resolver_result.args, GRPC_ARG_LB_POLICY_NAME);
- policy_name = grpc_channel_arg_get_string(channel_arg);
- }
- // Use pick_first if nothing was specified and we didn't select grpclb
- // above.
- if (policy_name == nullptr) policy_name = "pick_first";
- // Now that we have the policy name, construct an empty config for it.
- Json config_json = Json::Array{Json::Object{
- {policy_name, Json::Object{}},
- }};
- grpc_error* parse_error = GRPC_ERROR_NONE;
- *lb_policy_config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
- config_json, &parse_error);
- // The policy name came from one of three places:
- // - The deprecated loadBalancingPolicy field in the service config,
- // in which case the code in ClientChannelServiceConfigParser
- // already verified that the policy does not require a config.
- // - One of the hard-coded values here, all of which are known to not
- // require a config.
- // - A channel arg, in which case the application did something that
- // is a misuse of our API.
- // In the first two cases, these assertions will always be true. In
- // the last case, this is probably fine for now.
- // TODO(roth): If the last case becomes a problem, add better error
- // handling here.
- GPR_ASSERT(*lb_policy_config != nullptr);
- GPR_ASSERT(parse_error == GRPC_ERROR_NONE);
-}
-
-//
// ChannelData implementation
//
@@ -1663,18 +1871,15 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error)
client_channel_factory_(
ClientChannelFactory::GetFromChannelArgs(args->channel_args)),
channelz_node_(GetChannelzNode(args->channel_args)),
- channel_config_helper_(this),
work_serializer_(std::make_shared<WorkSerializer>()),
interested_parties_(grpc_pollset_set_create()),
- subchannel_pool_(GetSubchannelPool(args->channel_args)),
state_tracker_("client_channel", GRPC_CHANNEL_IDLE),
+ subchannel_pool_(GetSubchannelPool(args->channel_args)),
disconnect_error_(GRPC_ERROR_NONE) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO, "chand=%p: creating client_channel for channel stack %p",
this, owning_stack_);
}
- // Initialize data members.
- gpr_mu_init(&info_mu_);
// Start backup polling.
grpc_client_channel_start_backup_polling(interested_parties_);
// Check client channel factory.
@@ -1704,12 +1909,10 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error)
default_service_config_.reset();
return;
}
- grpc_uri* uri = grpc_uri_parse(server_uri, true);
- if (uri != nullptr && uri->path[0] != '\0') {
- server_name_.reset(
- gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path));
+ y_absl::StatusOr<URI> uri = URI::Parse(server_uri);
+ if (uri.ok() && !uri->path().empty()) {
+ server_name_ = TString(y_absl::StripPrefix(uri->path(), "/"));
}
- grpc_uri_destroy(uri);
char* proxy_name = nullptr;
grpc_channel_args* new_args = nullptr;
ProxyMapperRegistry::MapName(server_uri, args->channel_args, &proxy_name,
@@ -1738,90 +1941,289 @@ ChannelData::~ChannelData() {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO, "chand=%p: destroying channel", this);
}
- DestroyResolvingLoadBalancingPolicyLocked();
+ DestroyResolverAndLbPolicyLocked();
grpc_channel_args_destroy(channel_args_);
GRPC_ERROR_UNREF(resolver_transient_failure_error_);
// Stop backup polling.
grpc_client_channel_stop_backup_polling(interested_parties_);
grpc_pollset_set_destroy(interested_parties_);
GRPC_ERROR_UNREF(disconnect_error_.Load(MemoryOrder::RELAXED));
- gpr_mu_destroy(&info_mu_);
}
-void ChannelData::UpdateStateAndPickerLocked(
- grpc_connectivity_state state, const y_absl::Status& status,
- const char* reason,
- std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) {
- // Clean the control plane when entering IDLE.
- if (picker == nullptr || state == GRPC_CHANNEL_SHUTDOWN) {
- health_check_service_name_.reset();
- saved_service_config_.reset();
- saved_config_selector_.reset();
+RefCountedPtr<LoadBalancingPolicy::Config> ChooseLbPolicy(
+ const Resolver::Result& resolver_result,
+ const internal::ClientChannelGlobalParsedConfig* parsed_service_config) {
+ // Prefer the LB policy config found in the service config.
+ if (parsed_service_config->parsed_lb_config() != nullptr) {
+ return parsed_service_config->parsed_lb_config();
}
- // Update connectivity state.
- state_tracker_.SetState(state, status, reason);
- if (channelz_node_ != nullptr) {
- channelz_node_->SetConnectivityState(state);
- channelz_node_->AddTraceEvent(
- channelz::ChannelTrace::Severity::Info,
- grpc_slice_from_static_string(
- channelz::ChannelNode::GetChannelConnectivityStateChangeString(
- state)));
+ // Try the deprecated LB policy name from the service config.
+ // If not, try the setting from channel args.
+ const char* policy_name = nullptr;
+ if (!parsed_service_config->parsed_deprecated_lb_policy().empty()) {
+ policy_name = parsed_service_config->parsed_deprecated_lb_policy().c_str();
+ } else {
+ const grpc_arg* channel_arg =
+ grpc_channel_args_find(resolver_result.args, GRPC_ARG_LB_POLICY_NAME);
+ policy_name = grpc_channel_arg_get_string(channel_arg);
}
- // Grab data plane lock to do subchannel updates and update the picker.
+ // Use pick_first if nothing was specified and we didn't select grpclb
+ // above.
+ if (policy_name == nullptr) policy_name = "pick_first";
+ // Now that we have the policy name, construct an empty config for it.
+ Json config_json = Json::Array{Json::Object{
+ {policy_name, Json::Object{}},
+ }};
+ grpc_error* parse_error = GRPC_ERROR_NONE;
+ auto lb_policy_config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
+ config_json, &parse_error);
+ // The policy name came from one of three places:
+ // - The deprecated loadBalancingPolicy field in the service config,
+ // in which case the code in ClientChannelServiceConfigParser
+ // already verified that the policy does not require a config.
+ // - One of the hard-coded values here, all of which are known to not
+ // require a config.
+ // - A channel arg, in which case the application did something that
+ // is a misuse of our API.
+ // In the first two cases, these assertions will always be true. In
+ // the last case, this is probably fine for now.
+ // TODO(roth): If the last case becomes a problem, add better error
+ // handling here.
+ GPR_ASSERT(lb_policy_config != nullptr);
+ GPR_ASSERT(parse_error == GRPC_ERROR_NONE);
+ return lb_policy_config;
+}
+
+void ChannelData::OnResolverResultChangedLocked(Resolver::Result result) {
+ // Handle race conditions.
+ if (resolver_ == nullptr) return;
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: got resolver result", this);
+ }
+ // We only want to trace the address resolution in the follow cases:
+ // (a) Address resolution resulted in service config change.
+ // (b) Address resolution that causes number of backends to go from
+ // zero to non-zero.
+ // (c) Address resolution that causes number of backends to go from
+ // non-zero to zero.
+ // (d) Address resolution that causes a new LB policy to be created.
//
- // Note that we want to minimize the work done while holding the data
- // plane lock, to keep the critical section small. So, for all of the
- // objects that we might wind up unreffing here, we actually hold onto
- // the refs until after we release the lock, and then unref them at
- // that point. This includes the following:
- // - refs to subchannel wrappers in the keys of pending_subchannel_updates_
- // - ref stored in retry_throttle_data_
- // - ref stored in service_config_
- // - ref stored in config_selector_
- // - ownership of the existing picker in picker_
- RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_to_unref;
- RefCountedPtr<ServiceConfig> service_config_to_unref;
- RefCountedPtr<ConfigSelector> config_selector_to_unref;
- {
- MutexLock lock(&data_plane_mu_);
- // Handle subchannel updates.
- for (auto& p : pending_subchannel_updates_) {
+ // We track a list of strings to eventually be concatenated and traced.
+ y_absl::InlinedVector<const char*, 3> trace_strings;
+ if (result.addresses.empty() && previous_resolution_contained_addresses_) {
+ trace_strings.push_back("Address list became empty");
+ } else if (!result.addresses.empty() &&
+ !previous_resolution_contained_addresses_) {
+ trace_strings.push_back("Address list became non-empty");
+ }
+ previous_resolution_contained_addresses_ = !result.addresses.empty();
+ // The result of grpc_error_string() is owned by the error itself.
+ // We're storing that string in trace_strings, so we need to make sure
+ // that the error lives until we're done with the string.
+ grpc_error* service_config_error =
+ GRPC_ERROR_REF(result.service_config_error);
+ if (service_config_error != GRPC_ERROR_NONE) {
+ trace_strings.push_back(grpc_error_string(service_config_error));
+ }
+ // Choose the service config.
+ RefCountedPtr<ServiceConfig> service_config;
+ RefCountedPtr<ConfigSelector> config_selector;
+ if (service_config_error != GRPC_ERROR_NONE) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: resolver returned service config error: %s",
+ this, grpc_error_string(service_config_error));
+ }
+ // If the service config was invalid, then fallback to the
+ // previously returned service config.
+ if (saved_service_config_ != nullptr) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
- "chand=%p: updating subchannel wrapper %p data plane "
- "connected_subchannel to %p",
- this, p.first.get(), p.second.get());
+ "chand=%p: resolver returned invalid service config. "
+ "Continuing to use previous service config.",
+ this);
}
- // Note: We do not remove the entry from pending_subchannel_updates_
- // here, since this would unref the subchannel wrapper; instead,
- // we wait until we've released the lock to clear the map.
- p.first->set_connected_subchannel_in_data_plane(std::move(p.second));
+ service_config = saved_service_config_;
+ config_selector = saved_config_selector_;
+ } else {
+ // We received an invalid service config and we don't have a
+ // previous service config to fall back to. Put the channel into
+ // TRANSIENT_FAILURE.
+ OnResolverErrorLocked(GRPC_ERROR_REF(service_config_error));
+ trace_strings.push_back("no valid service config");
}
- // Swap out the picker.
- // Note: Original value will be destroyed after the lock is released.
- picker_.swap(picker);
- // Clean the data plane if the updated picker is nullptr.
- if (picker_ == nullptr || state == GRPC_CHANNEL_SHUTDOWN) {
- received_service_config_data_ = false;
- // Note: We save the objects to unref until after the lock is released.
- retry_throttle_data_to_unref = std::move(retry_throttle_data_);
- service_config_to_unref = std::move(service_config_);
- config_selector_to_unref = std::move(config_selector_);
+ } else if (result.service_config == nullptr) {
+ // Resolver did not return any service config.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p: resolver returned no service config. Using default "
+ "service config for channel.",
+ this);
}
- // Re-process queued picks.
- for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) {
- grpc_call_element* elem = pick->elem;
- CallData* calld = static_cast<CallData*>(elem->call_data);
- grpc_error* error = GRPC_ERROR_NONE;
- if (calld->PickSubchannelLocked(elem, &error)) {
- calld->AsyncPickDone(elem, error);
+ service_config = default_service_config_;
+ } else {
+ // Use ServiceConfig and ConfigSelector returned by resolver.
+ service_config = result.service_config;
+ config_selector = ConfigSelector::GetFromChannelArgs(*result.args);
+ }
+ if (service_config != nullptr) {
+ // Extract global config for client channel.
+ const internal::ClientChannelGlobalParsedConfig* parsed_service_config =
+ static_cast<const internal::ClientChannelGlobalParsedConfig*>(
+ service_config->GetGlobalParsedConfig(
+ internal::ClientChannelServiceConfigParser::ParserIndex()));
+ // Choose LB policy config.
+ RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config =
+ ChooseLbPolicy(result, parsed_service_config);
+ // Check if the ServiceConfig has changed.
+ const bool service_config_changed =
+ saved_service_config_ == nullptr ||
+ service_config->json_string() != saved_service_config_->json_string();
+ // Check if the ConfigSelector has changed.
+ const bool config_selector_changed = !ConfigSelector::Equals(
+ saved_config_selector_.get(), config_selector.get());
+ // If either has changed, apply the global parameters now.
+ if (service_config_changed || config_selector_changed) {
+ // Update service config in control plane.
+ UpdateServiceConfigInControlPlaneLocked(
+ std::move(service_config), std::move(config_selector),
+ parsed_service_config, lb_policy_config->name());
+ } else if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: service config not changed", this);
+ }
+ // Create or update LB policy, as needed.
+ CreateOrUpdateLbPolicyLocked(std::move(lb_policy_config),
+ std::move(result));
+ if (service_config_changed || config_selector_changed) {
+ // Start using new service config for calls.
+ // This needs to happen after the LB policy has been updated, since
+ // the ConfigSelector may need the LB policy to know about new
+ // destinations before it can send RPCs to those destinations.
+ UpdateServiceConfigInDataPlaneLocked();
+ // TODO(ncteisen): might be worth somehow including a snippet of the
+ // config in the trace, at the risk of bloating the trace logs.
+ trace_strings.push_back("Service config changed");
+ }
+ }
+ // Add channel trace event.
+ if (!trace_strings.empty()) {
+ TString message =
+ y_absl::StrCat("Resolution event: ", y_absl::StrJoin(trace_strings, ", "));
+ if (channelz_node_ != nullptr) {
+ channelz_node_->AddTraceEvent(channelz::ChannelTrace::Severity::Info,
+ grpc_slice_from_cpp_string(message));
+ }
+ }
+ GRPC_ERROR_UNREF(service_config_error);
+}
+
+void ChannelData::OnResolverErrorLocked(grpc_error* error) {
+ if (resolver_ == nullptr) {
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: resolver transient failure: %s", this,
+ grpc_error_string(error));
+ }
+ // If we already have an LB policy from a previous resolution
+ // result, then we continue to let it set the connectivity state.
+ // Otherwise, we go into TRANSIENT_FAILURE.
+ if (lb_policy_ == nullptr) {
+ grpc_error* state_error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Resolver transient failure", &error, 1);
+ {
+ MutexLock lock(&resolution_mu_);
+ // Update resolver transient failure.
+ GRPC_ERROR_UNREF(resolver_transient_failure_error_);
+ resolver_transient_failure_error_ = GRPC_ERROR_REF(state_error);
+ // Process calls that were queued waiting for the resolver result.
+ for (ResolverQueuedCall* call = resolver_queued_calls_; call != nullptr;
+ call = call->next) {
+ grpc_call_element* elem = call->elem;
+ CallData* calld = static_cast<CallData*>(elem->call_data);
+ grpc_error* error = GRPC_ERROR_NONE;
+ if (calld->CheckResolutionLocked(elem, &error)) {
+ calld->AsyncResolutionDone(elem, error);
+ }
}
}
+ // Update connectivity state.
+ UpdateStateAndPickerLocked(
+ GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(state_error),
+ "resolver failure",
+ y_absl::make_unique<LoadBalancingPolicy::TransientFailurePicker>(
+ state_error));
+ }
+ GRPC_ERROR_UNREF(error);
+}
+
+void ChannelData::CreateOrUpdateLbPolicyLocked(
+ RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config,
+ Resolver::Result result) {
+ // Construct update.
+ LoadBalancingPolicy::UpdateArgs update_args;
+ update_args.addresses = std::move(result.addresses);
+ update_args.config = std::move(lb_policy_config);
+ // Remove the config selector from channel args so that we're not holding
+ // unnecessary refs that cause it to be destroyed somewhere other than in the
+ // WorkSerializer.
+ const char* arg_name = GRPC_ARG_CONFIG_SELECTOR;
+ update_args.args =
+ grpc_channel_args_copy_and_remove(result.args, &arg_name, 1);
+ // Create policy if needed.
+ if (lb_policy_ == nullptr) {
+ lb_policy_ = CreateLbPolicyLocked(*update_args.args);
+ }
+ // Update the policy.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: Updating child policy %p", this,
+ lb_policy_.get());
+ }
+ lb_policy_->UpdateLocked(std::move(update_args));
+}
+
+// Creates a new LB policy.
+OrphanablePtr<LoadBalancingPolicy> ChannelData::CreateLbPolicyLocked(
+ const grpc_channel_args& args) {
+ LoadBalancingPolicy::Args lb_policy_args;
+ lb_policy_args.work_serializer = work_serializer_;
+ lb_policy_args.channel_control_helper =
+ y_absl::make_unique<ClientChannelControlHelper>(this);
+ lb_policy_args.args = &args;
+ OrphanablePtr<LoadBalancingPolicy> lb_policy =
+ MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
+ &grpc_client_channel_routing_trace);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: created new LB policy %p", this,
+ lb_policy.get());
+ }
+ grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
+ interested_parties_);
+ return lb_policy;
+}
+
+void ChannelData::AddResolverQueuedCall(ResolverQueuedCall* call,
+ grpc_polling_entity* pollent) {
+ // Add call to queued calls list.
+ call->next = resolver_queued_calls_;
+ resolver_queued_calls_ = call;
+ // Add call's pollent to channel's interested_parties, so that I/O
+ // can be done under the call's CQ.
+ grpc_polling_entity_add_to_pollset_set(pollent, interested_parties_);
+}
+
+void ChannelData::RemoveResolverQueuedCall(ResolverQueuedCall* to_remove,
+ grpc_polling_entity* pollent) {
+ // Remove call's pollent from channel's interested_parties.
+ grpc_polling_entity_del_from_pollset_set(pollent, interested_parties_);
+ // Remove from queued calls list.
+ for (ResolverQueuedCall** call = &resolver_queued_calls_; *call != nullptr;
+ call = &(*call)->next) {
+ if (*call == to_remove) {
+ *call = to_remove->next;
+ return;
+ }
}
- // Clear the pending update map after releasing the lock, to keep the
- // critical section small.
- pending_subchannel_updates_.clear();
}
void ChannelData::UpdateServiceConfigInControlPlaneLocked(
@@ -1829,7 +2231,7 @@ void ChannelData::UpdateServiceConfigInControlPlaneLocked(
RefCountedPtr<ConfigSelector> config_selector,
const internal::ClientChannelGlobalParsedConfig* parsed_service_config,
const char* lb_policy_name) {
- grpc_core::UniquePtr<char> service_config_json(
+ UniquePtr<char> service_config_json(
gpr_strdup(service_config->json_string().c_str()));
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
gpr_log(GPR_INFO,
@@ -1839,22 +2241,18 @@ void ChannelData::UpdateServiceConfigInControlPlaneLocked(
// Save service config.
saved_service_config_ = std::move(service_config);
// Update health check service name if needed.
- if (((health_check_service_name_ == nullptr) !=
- (parsed_service_config->health_check_service_name() == nullptr)) ||
- (health_check_service_name_ != nullptr &&
- strcmp(health_check_service_name_.get(),
- parsed_service_config->health_check_service_name()) != 0)) {
- health_check_service_name_.reset(
- gpr_strdup(parsed_service_config->health_check_service_name()));
+ if (health_check_service_name_ !=
+ parsed_service_config->health_check_service_name()) {
+ health_check_service_name_ =
+ parsed_service_config->health_check_service_name();
// Update health check service name used by existing subchannel wrappers.
for (auto* subchannel_wrapper : subchannel_wrappers_) {
subchannel_wrapper->UpdateHealthCheckServiceName(
- grpc_core::UniquePtr<char>(
- gpr_strdup(health_check_service_name_.get())));
+ health_check_service_name_);
}
}
// Swap out the data used by GetChannelInfo().
- grpc_core::UniquePtr<char> lb_policy_name_owned(gpr_strdup(lb_policy_name));
+ UniquePtr<char> lb_policy_name_owned(gpr_strdup(lb_policy_name));
{
MutexLock lock(&info_mu_);
info_lb_policy_name_ = std::move(lb_policy_name_owned);
@@ -1869,19 +2267,6 @@ void ChannelData::UpdateServiceConfigInControlPlaneLocked(
}
void ChannelData::UpdateServiceConfigInDataPlaneLocked() {
- // Get retry throttle data from service config.
- const internal::ClientChannelGlobalParsedConfig* parsed_service_config =
- static_cast<const internal::ClientChannelGlobalParsedConfig*>(
- saved_service_config_->GetGlobalParsedConfig(
- internal::ClientChannelServiceConfigParser::ParserIndex()));
- y_absl::optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
- retry_throttle_config = parsed_service_config->retry_throttling();
- RefCountedPtr<ServerRetryThrottleData> retry_throttle_data;
- if (retry_throttle_config.has_value()) {
- retry_throttle_data = internal::ServerRetryThrottleMap::GetDataForServer(
- server_name_.get(), retry_throttle_config.value().max_milli_tokens,
- retry_throttle_config.value().milli_token_ratio);
- }
// Grab ref to service config.
RefCountedPtr<ServiceConfig> service_config = saved_service_config_;
// Grab ref to config selector. Use default if resolver didn't supply one.
@@ -1894,27 +2279,63 @@ void ChannelData::UpdateServiceConfigInDataPlaneLocked() {
config_selector =
MakeRefCounted<DefaultConfigSelector>(saved_service_config_);
}
+ // Get retry throttle data from service config.
+ const internal::ClientChannelGlobalParsedConfig* parsed_service_config =
+ static_cast<const internal::ClientChannelGlobalParsedConfig*>(
+ saved_service_config_->GetGlobalParsedConfig(
+ internal::ClientChannelServiceConfigParser::ParserIndex()));
+ y_absl::optional<internal::ClientChannelGlobalParsedConfig::RetryThrottling>
+ retry_throttle_config = parsed_service_config->retry_throttling();
+ RefCountedPtr<ServerRetryThrottleData> retry_throttle_data;
+ if (retry_throttle_config.has_value()) {
+ retry_throttle_data = internal::ServerRetryThrottleMap::GetDataForServer(
+ server_name_, retry_throttle_config.value().max_milli_tokens,
+ retry_throttle_config.value().milli_token_ratio);
+ }
+ // Construct dynamic filter stack.
+ std::vector<const grpc_channel_filter*> filters =
+ config_selector->GetFilters();
+ filters.push_back(
+ &DynamicTerminationFilterChannelData::kDynamicTerminationFilterVtable);
+ y_absl::InlinedVector<grpc_arg, 2> args_to_add;
+ args_to_add.push_back(grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_CLIENT_CHANNEL_DATA), this,
+ &kChannelDataArgPointerVtable));
+ if (retry_throttle_data != nullptr) {
+ args_to_add.push_back(grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_RETRY_THROTTLE_DATA),
+ retry_throttle_data.get(), &kRetryThrottleDataArgPointerVtable));
+ }
+ grpc_channel_args* new_args = grpc_channel_args_copy_and_add(
+ channel_args_, args_to_add.data(), args_to_add.size());
+ new_args = config_selector->ModifyChannelArgs(new_args);
+ RefCountedPtr<DynamicFilters> dynamic_filters =
+ DynamicFilters::Create(new_args, std::move(filters));
+ GPR_ASSERT(dynamic_filters != nullptr);
+ grpc_channel_args_destroy(new_args);
// Grab data plane lock to update service config.
//
// We defer unreffing the old values (and deallocating memory) until
// after releasing the lock to keep the critical section small.
+ std::set<grpc_call_element*> calls_pending_resolver_result;
{
- MutexLock lock(&data_plane_mu_);
+ MutexLock lock(&resolution_mu_);
GRPC_ERROR_UNREF(resolver_transient_failure_error_);
resolver_transient_failure_error_ = GRPC_ERROR_NONE;
// Update service config.
received_service_config_data_ = true;
// Old values will be unreffed after lock is released.
- retry_throttle_data_.swap(retry_throttle_data);
service_config_.swap(service_config);
config_selector_.swap(config_selector);
- // Re-process queued picks.
- for (QueuedPick* pick = queued_picks_; pick != nullptr; pick = pick->next) {
- grpc_call_element* elem = pick->elem;
+ dynamic_filters_.swap(dynamic_filters);
+ // Process calls that were queued waiting for the resolver result.
+ for (ResolverQueuedCall* call = resolver_queued_calls_; call != nullptr;
+ call = call->next) {
+ grpc_call_element* elem = call->elem;
CallData* calld = static_cast<CallData*>(elem->call_data);
grpc_error* error = GRPC_ERROR_NONE;
- if (calld->PickSubchannelLocked(elem, &error)) {
- calld->AsyncPickDone(elem, error);
+ if (calld->CheckResolutionLocked(elem, &error)) {
+ calld->AsyncResolutionDone(elem, error);
}
}
}
@@ -1922,39 +2343,126 @@ void ChannelData::UpdateServiceConfigInDataPlaneLocked() {
// of scope.
}
-void ChannelData::CreateResolvingLoadBalancingPolicyLocked() {
- // Instantiate resolving LB policy.
- LoadBalancingPolicy::Args lb_args;
- lb_args.work_serializer = work_serializer_;
- lb_args.channel_control_helper =
- y_absl::make_unique<ClientChannelControlHelper>(this);
- lb_args.args = channel_args_;
- grpc_core::UniquePtr<char> target_uri(gpr_strdup(target_uri_.get()));
- resolving_lb_policy_.reset(new ResolvingLoadBalancingPolicy(
- std::move(lb_args), &grpc_client_channel_routing_trace,
- std::move(target_uri), &channel_config_helper_));
- grpc_pollset_set_add_pollset_set(resolving_lb_policy_->interested_parties(),
- interested_parties_);
+void ChannelData::CreateResolverLocked() {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO, "chand=%p: created resolving_lb_policy=%p", this,
- resolving_lb_policy_.get());
+ gpr_log(GPR_INFO, "chand=%p: starting name resolution", this);
+ }
+ resolver_ = ResolverRegistry::CreateResolver(
+ target_uri_.get(), channel_args_, interested_parties_, work_serializer_,
+ y_absl::make_unique<ResolverResultHandler>(this));
+ // Since the validity of the args was checked when the channel was created,
+ // CreateResolver() must return a non-null result.
+ GPR_ASSERT(resolver_ != nullptr);
+ UpdateStateAndPickerLocked(
+ GRPC_CHANNEL_CONNECTING, y_absl::Status(), "started resolving",
+ y_absl::make_unique<LoadBalancingPolicy::QueuePicker>(nullptr));
+ resolver_->StartLocked();
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: created resolver=%p", this, resolver_.get());
+ }
+}
+
+void ChannelData::DestroyResolverAndLbPolicyLocked() {
+ if (resolver_ != nullptr) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: shutting down resolver=%p", this,
+ resolver_.get());
+ }
+ resolver_.reset();
+ if (lb_policy_ != nullptr) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p: shutting down lb_policy=%p", this,
+ lb_policy_.get());
+ }
+ grpc_pollset_set_del_pollset_set(lb_policy_->interested_parties(),
+ interested_parties_);
+ lb_policy_.reset();
+ }
}
}
-void ChannelData::DestroyResolvingLoadBalancingPolicyLocked() {
- if (resolving_lb_policy_ != nullptr) {
- grpc_pollset_set_del_pollset_set(resolving_lb_policy_->interested_parties(),
- interested_parties_);
- resolving_lb_policy_.reset();
+void ChannelData::UpdateStateAndPickerLocked(
+ grpc_connectivity_state state, const y_absl::Status& status,
+ const char* reason,
+ std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) {
+ // Special case for IDLE and SHUTDOWN states.
+ if (picker == nullptr || state == GRPC_CHANNEL_SHUTDOWN) {
+ saved_service_config_.reset();
+ saved_config_selector_.reset();
+ // Acquire resolution lock to update config selector and associated state.
+ // To minimize lock contention, we wait to unref these objects until
+ // after we release the lock.
+ RefCountedPtr<ServiceConfig> service_config_to_unref;
+ RefCountedPtr<ConfigSelector> config_selector_to_unref;
+ RefCountedPtr<DynamicFilters> dynamic_filters_to_unref;
+ {
+ MutexLock lock(&resolution_mu_);
+ received_service_config_data_ = false;
+ service_config_to_unref = std::move(service_config_);
+ config_selector_to_unref = std::move(config_selector_);
+ dynamic_filters_to_unref = std::move(dynamic_filters_);
+ }
+ }
+ // Update connectivity state.
+ state_tracker_.SetState(state, status, reason);
+ if (channelz_node_ != nullptr) {
+ channelz_node_->SetConnectivityState(state);
+ channelz_node_->AddTraceEvent(
+ channelz::ChannelTrace::Severity::Info,
+ grpc_slice_from_static_string(
+ channelz::ChannelNode::GetChannelConnectivityStateChangeString(
+ state)));
}
+ // Grab data plane lock to do subchannel updates and update the picker.
+ //
+ // Note that we want to minimize the work done while holding the data
+ // plane lock, to keep the critical section small. So, for all of the
+ // objects that we might wind up unreffing here, we actually hold onto
+ // the refs until after we release the lock, and then unref them at
+ // that point. This includes the following:
+ // - refs to subchannel wrappers in the keys of pending_subchannel_updates_
+ // - ownership of the existing picker in picker_
+ {
+ MutexLock lock(&data_plane_mu_);
+ // Handle subchannel updates.
+ for (auto& p : pending_subchannel_updates_) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p: updating subchannel wrapper %p data plane "
+ "connected_subchannel to %p",
+ this, p.first.get(), p.second.get());
+ }
+ // Note: We do not remove the entry from pending_subchannel_updates_
+ // here, since this would unref the subchannel wrapper; instead,
+ // we wait until we've released the lock to clear the map.
+ p.first->set_connected_subchannel_in_data_plane(std::move(p.second));
+ }
+ // Swap out the picker.
+ // Note: Original value will be destroyed after the lock is released.
+ picker_.swap(picker);
+ // Re-process queued picks.
+ for (LbQueuedCall* call = lb_queued_calls_; call != nullptr;
+ call = call->next) {
+ grpc_error* error = GRPC_ERROR_NONE;
+ if (call->lb_call->PickSubchannelLocked(&error)) {
+ call->lb_call->AsyncPickDone(error);
+ }
+ }
+ }
+ // Clear the pending update map after releasing the lock, to keep the
+ // critical section small.
+ pending_subchannel_updates_.clear();
}
grpc_error* ChannelData::DoPingLocked(grpc_transport_op* op) {
if (state_tracker_.state() != GRPC_CHANNEL_READY) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("channel not connected");
}
- LoadBalancingPolicy::PickResult result =
- picker_->Pick(LoadBalancingPolicy::PickArgs());
+ LoadBalancingPolicy::PickResult result;
+ {
+ MutexLock lock(&data_plane_mu_);
+ result = picker_->Pick(LoadBalancingPolicy::PickArgs());
+ }
ConnectedSubchannel* connected_subchannel = nullptr;
if (result.subchannel != nullptr) {
SubchannelWrapper* subchannel =
@@ -1995,8 +2503,8 @@ void ChannelData::StartTransportOpLocked(grpc_transport_op* op) {
}
// Reset backoff.
if (op->reset_connect_backoff) {
- if (resolving_lb_policy_ != nullptr) {
- resolving_lb_policy_->ResetBackoffLocked();
+ if (lb_policy_ != nullptr) {
+ lb_policy_->ResetBackoffLocked();
}
}
// Disconnect or enter IDLE.
@@ -2005,7 +2513,7 @@ void ChannelData::StartTransportOpLocked(grpc_transport_op* op) {
gpr_log(GPR_INFO, "chand=%p: disconnect_with_error: %s", this,
grpc_error_string(op->disconnect_with_error));
}
- DestroyResolvingLoadBalancingPolicyLocked();
+ DestroyResolverAndLbPolicyLocked();
intptr_t value;
if (grpc_error_get_int(op->disconnect_with_error,
GRPC_ERROR_INT_CHANNEL_CONNECTIVITY_STATE, &value) &&
@@ -2058,25 +2566,25 @@ void ChannelData::GetChannelInfo(grpc_channel_element* elem,
}
}
-void ChannelData::AddQueuedPick(QueuedPick* pick,
- grpc_polling_entity* pollent) {
+void ChannelData::AddLbQueuedCall(LbQueuedCall* call,
+ grpc_polling_entity* pollent) {
// Add call to queued picks list.
- pick->next = queued_picks_;
- queued_picks_ = pick;
+ call->next = lb_queued_calls_;
+ lb_queued_calls_ = call;
// Add call's pollent to channel's interested_parties, so that I/O
// can be done under the call's CQ.
grpc_polling_entity_add_to_pollset_set(pollent, interested_parties_);
}
-void ChannelData::RemoveQueuedPick(QueuedPick* to_remove,
- grpc_polling_entity* pollent) {
+void ChannelData::RemoveLbQueuedCall(LbQueuedCall* to_remove,
+ grpc_polling_entity* pollent) {
// Remove call's pollent from channel's interested_parties.
grpc_polling_entity_del_from_pollset_set(pollent, interested_parties_);
// Remove from queued picks list.
- for (QueuedPick** pick = &queued_picks_; *pick != nullptr;
- pick = &(*pick)->next) {
- if (*pick == to_remove) {
- *pick = to_remove->next;
+ for (LbQueuedCall** call = &lb_queued_calls_; *call != nullptr;
+ call = &(*call)->next) {
+ if (*call == to_remove) {
+ *call = to_remove->next;
return;
}
}
@@ -2094,10 +2602,10 @@ ChannelData::GetConnectedSubchannelInDataPlane(
}
void ChannelData::TryToConnectLocked() {
- if (resolving_lb_policy_ != nullptr) {
- resolving_lb_policy_->ExitIdleLocked();
- } else {
- CreateResolvingLoadBalancingPolicyLocked();
+ if (lb_policy_ != nullptr) {
+ lb_policy_->ExitIdleLocked();
+ } else if (resolver_ == nullptr) {
+ CreateResolverLocked();
}
GRPC_CHANNEL_STACK_UNREF(owning_stack_, "TryToConnect");
}
@@ -2127,45 +2635,11 @@ void ChannelData::RemoveConnectivityWatcher(
// CallData implementation
//
-// Retry support:
-//
-// In order to support retries, we act as a proxy for stream op batches.
-// When we get a batch from the surface, we add it to our list of pending
-// batches, and we then use those batches to construct separate "child"
-// batches to be started on the subchannel call. When the child batches
-// return, we then decide which pending batches have been completed and
-// schedule their callbacks accordingly. If a subchannel call fails and
-// we want to retry it, we do a new pick and start again, constructing
-// new "child" batches for the new subchannel call.
-//
-// Note that retries are committed when receiving data from the server
-// (except for Trailers-Only responses). However, there may be many
-// send ops started before receiving any data, so we may have already
-// completed some number of send ops (and returned the completions up to
-// the surface) by the time we realize that we need to retry. To deal
-// with this, we cache data for send ops, so that we can replay them on a
-// different subchannel call even after we have completed the original
-// batches.
-//
-// There are two sets of data to maintain:
-// - In call_data (in the parent channel), we maintain a list of pending
-// ops and cached data for send ops.
-// - In the subchannel call, we maintain state to indicate what ops have
-// already been sent down to that call.
-//
-// When constructing the "child" batches, we compare those two sets of
-// data to see which batches need to be sent to the subchannel call.
-
-// TODO(roth): In subsequent PRs:
-// - add support for transparent retries (including initial metadata)
-// - figure out how to record stats in census for retries
-// (census filter is on top of this one)
-// - add census stats for retries
-
-CallData::CallData(grpc_call_element* elem, const ChannelData& chand,
- const grpc_call_element_args& args)
- : deadline_state_(elem, args.call_stack, args.call_combiner,
- GPR_LIKELY(chand.deadline_checking_enabled())
+ChannelData::CallData::CallData(grpc_call_element* elem,
+ const ChannelData& chand,
+ const grpc_call_element_args& args)
+ : deadline_state_(elem, args,
+ GPR_LIKELY(chand.deadline_checking_enabled_)
? args.deadline
: GRPC_MILLIS_INF_FUTURE),
path_(grpc_slice_ref_internal(args.path)),
@@ -2174,57 +2648,55 @@ CallData::CallData(grpc_call_element* elem, const ChannelData& chand,
arena_(args.arena),
owning_call_(args.call_stack),
call_combiner_(args.call_combiner),
- call_context_(args.context),
- lb_call_state_(this),
- pending_send_initial_metadata_(false),
- pending_send_message_(false),
- pending_send_trailing_metadata_(false),
- enable_retries_(chand.enable_retries()),
- retry_committed_(false),
- last_attempt_got_server_pushback_(false) {}
+ call_context_(args.context) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO, "chand=%p calld=%p: created call", &chand, this);
+ }
+}
-CallData::~CallData() {
+ChannelData::CallData::~CallData() {
grpc_slice_unref_internal(path_);
GRPC_ERROR_UNREF(cancel_error_);
- if (backend_metric_data_ != nullptr) {
- backend_metric_data_
- ->LoadBalancingPolicy::BackendMetricData::~BackendMetricData();
- }
// Make sure there are no remaining pending batches.
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
- GPR_ASSERT(pending_batches_[i].batch == nullptr);
+ GPR_ASSERT(pending_batches_[i] == nullptr);
}
}
-grpc_error* CallData::Init(grpc_call_element* elem,
- const grpc_call_element_args* args) {
+grpc_error* ChannelData::CallData::Init(grpc_call_element* elem,
+ const grpc_call_element_args* args) {
ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
new (elem->call_data) CallData(elem, *chand, *args);
return GRPC_ERROR_NONE;
}
-void CallData::Destroy(grpc_call_element* elem,
- const grpc_call_final_info* /*final_info*/,
- grpc_closure* then_schedule_closure) {
+void ChannelData::CallData::Destroy(grpc_call_element* elem,
+ const grpc_call_final_info* /*final_info*/,
+ grpc_closure* then_schedule_closure) {
CallData* calld = static_cast<CallData*>(elem->call_data);
- RefCountedPtr<SubchannelCall> subchannel_call = calld->subchannel_call_;
+ RefCountedPtr<DynamicFilters::Call> dynamic_call =
+ std::move(calld->dynamic_call_);
calld->~CallData();
- if (GPR_LIKELY(subchannel_call != nullptr)) {
- subchannel_call->SetAfterCallStackDestroy(then_schedule_closure);
+ if (GPR_LIKELY(dynamic_call != nullptr)) {
+ dynamic_call->SetAfterCallStackDestroy(then_schedule_closure);
} else {
// TODO(yashkt) : This can potentially be a Closure::Run
ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
}
}
-void CallData::StartTransportStreamOpBatch(
+void ChannelData::CallData::StartTransportStreamOpBatch(
grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
GPR_TIMER_SCOPE("cc_start_transport_stream_op_batch", 0);
CallData* calld = static_cast<CallData*>(elem->call_data);
ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- if (GPR_LIKELY(chand->deadline_checking_enabled())) {
+ if (GPR_LIKELY(chand->deadline_checking_enabled_)) {
grpc_deadline_state_client_start_transport_stream_op_batch(elem, batch);
}
+ // Intercept recv_initial_metadata for config selector on-committed callback.
+ if (batch->recv_initial_metadata) {
+ calld->InjectRecvInitialMetadataReadyForConfigSelectorCommitCallback(batch);
+ }
// If we've previously been cancelled, immediately fail any new batches.
if (GPR_UNLIKELY(calld->cancel_error_ != GRPC_ERROR_NONE)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
@@ -2250,12 +2722,10 @@ void CallData::StartTransportStreamOpBatch(
gpr_log(GPR_INFO, "chand=%p calld=%p: recording cancel_error=%s", chand,
calld, grpc_error_string(calld->cancel_error_));
}
- // If we do not have a subchannel call (i.e., a pick has not yet
- // been started), fail all pending batches. Otherwise, send the
- // cancellation down to the subchannel call.
- if (calld->subchannel_call_ == nullptr) {
- // TODO(roth): If there is a pending retry callback, do we need to
- // cancel it here?
+ // If we do not have a dynamic call (i.e., name resolution has not
+ // yet completed), fail all pending batches. Otherwise, send the
+ // cancellation down to the dynamic call.
+ if (calld->dynamic_call_ == nullptr) {
calld->PendingBatchesFail(elem, GRPC_ERROR_REF(calld->cancel_error_),
NoYieldCallCombiner);
// Note: This will release the call combiner.
@@ -2263,35 +2733,35 @@ void CallData::StartTransportStreamOpBatch(
batch, GRPC_ERROR_REF(calld->cancel_error_), calld->call_combiner_);
} else {
// Note: This will release the call combiner.
- calld->subchannel_call_->StartTransportStreamOpBatch(batch);
+ calld->dynamic_call_->StartTransportStreamOpBatch(batch);
}
return;
}
// Add the batch to the pending list.
calld->PendingBatchesAdd(elem, batch);
- // Check if we've already gotten a subchannel call.
- // Note that once we have picked a subchannel, we do not need to acquire
- // the channel's data plane mutex, which is more efficient (especially for
- // streaming calls).
- if (calld->subchannel_call_ != nullptr) {
+ // Check if we've already created a dynamic call.
+ // Note that once we have done so, we do not need to acquire the channel's
+ // resolution mutex, which is more efficient (especially for streaming calls).
+ if (calld->dynamic_call_ != nullptr) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: starting batch on subchannel_call=%p", chand,
- calld, calld->subchannel_call_.get());
+ gpr_log(GPR_INFO, "chand=%p calld=%p: starting batch on dynamic_call=%p",
+ chand, calld, calld->dynamic_call_.get());
}
calld->PendingBatchesResume(elem);
return;
}
- // We do not yet have a subchannel call.
+ // We do not yet have a dynamic call.
// For batches containing a send_initial_metadata op, acquire the
- // channel's data plane mutex to pick a subchannel.
+ // channel's resolution mutex to apply the service config to the call,
+ // after which we will create a dynamic call.
if (GPR_LIKELY(batch->send_initial_metadata)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: grabbing data plane mutex to perform pick",
+ "chand=%p calld=%p: grabbing resolution mutex to apply service "
+ "config",
chand, calld);
}
- PickSubchannel(elem, GRPC_ERROR_NONE);
+ CheckResolution(elem, GRPC_ERROR_NONE);
} else {
// For all other batches, release the call combiner.
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
@@ -2304,17 +2774,582 @@ void CallData::StartTransportStreamOpBatch(
}
}
-void CallData::SetPollent(grpc_call_element* elem,
- grpc_polling_entity* pollent) {
+void ChannelData::CallData::SetPollent(grpc_call_element* elem,
+ grpc_polling_entity* pollent) {
CallData* calld = static_cast<CallData*>(elem->call_data);
calld->pollent_ = pollent;
}
//
+// pending_batches management
+//
+
+size_t ChannelData::CallData::GetBatchIndex(
+ grpc_transport_stream_op_batch* batch) {
+ // Note: It is important the send_initial_metadata be the first entry
+ // here, since the code in pick_subchannel_locked() assumes it will be.
+ if (batch->send_initial_metadata) return 0;
+ if (batch->send_message) return 1;
+ if (batch->send_trailing_metadata) return 2;
+ if (batch->recv_initial_metadata) return 3;
+ if (batch->recv_message) return 4;
+ if (batch->recv_trailing_metadata) return 5;
+ GPR_UNREACHABLE_CODE(return (size_t)-1);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::CallData::PendingBatchesAdd(
+ grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ const size_t idx = GetBatchIndex(batch);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: adding pending batch at index %" PRIuPTR, chand,
+ this, idx);
+ }
+ grpc_transport_stream_op_batch*& pending = pending_batches_[idx];
+ GPR_ASSERT(pending == nullptr);
+ pending = batch;
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::CallData::FailPendingBatchInCallCombiner(void* arg,
+ grpc_error* error) {
+ grpc_transport_stream_op_batch* batch =
+ static_cast<grpc_transport_stream_op_batch*>(arg);
+ CallData* calld = static_cast<CallData*>(batch->handler_private.extra_arg);
+ // Note: This will release the call combiner.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(error), calld->call_combiner_);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::CallData::PendingBatchesFail(
+ grpc_call_element* elem, grpc_error* error,
+ YieldCallCombinerPredicate yield_call_combiner_predicate) {
+ GPR_ASSERT(error != GRPC_ERROR_NONE);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ size_t num_batches = 0;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ if (pending_batches_[i] != nullptr) ++num_batches;
+ }
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: failing %" PRIuPTR " pending batches: %s",
+ elem->channel_data, this, num_batches, grpc_error_string(error));
+ }
+ CallCombinerClosureList closures;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ grpc_transport_stream_op_batch*& batch = pending_batches_[i];
+ if (batch != nullptr) {
+ batch->handler_private.extra_arg = this;
+ GRPC_CLOSURE_INIT(&batch->handler_private.closure,
+ FailPendingBatchInCallCombiner, batch,
+ grpc_schedule_on_exec_ctx);
+ closures.Add(&batch->handler_private.closure, GRPC_ERROR_REF(error),
+ "PendingBatchesFail");
+ batch = nullptr;
+ }
+ }
+ if (yield_call_combiner_predicate(closures)) {
+ closures.RunClosures(call_combiner_);
+ } else {
+ closures.RunClosuresWithoutYielding(call_combiner_);
+ }
+ GRPC_ERROR_UNREF(error);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::CallData::ResumePendingBatchInCallCombiner(
+ void* arg, grpc_error* /*ignored*/) {
+ grpc_transport_stream_op_batch* batch =
+ static_cast<grpc_transport_stream_op_batch*>(arg);
+ auto* elem =
+ static_cast<grpc_call_element*>(batch->handler_private.extra_arg);
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ // Note: This will release the call combiner.
+ calld->dynamic_call_->StartTransportStreamOpBatch(batch);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::CallData::PendingBatchesResume(grpc_call_element* elem) {
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ // Retries not enabled; send down batches as-is.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ size_t num_batches = 0;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ if (pending_batches_[i] != nullptr) ++num_batches;
+ }
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: starting %" PRIuPTR
+ " pending batches on dynamic_call=%p",
+ chand, this, num_batches, dynamic_call_.get());
+ }
+ CallCombinerClosureList closures;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ grpc_transport_stream_op_batch*& batch = pending_batches_[i];
+ if (batch != nullptr) {
+ batch->handler_private.extra_arg = elem;
+ GRPC_CLOSURE_INIT(&batch->handler_private.closure,
+ ResumePendingBatchInCallCombiner, batch, nullptr);
+ closures.Add(&batch->handler_private.closure, GRPC_ERROR_NONE,
+ "PendingBatchesResume");
+ batch = nullptr;
+ }
+ }
+ // Note: This will release the call combiner.
+ closures.RunClosures(call_combiner_);
+}
+
+//
+// name resolution
+//
+
+// A class to handle the call combiner cancellation callback for a
+// queued pick.
+class ChannelData::CallData::ResolverQueuedCallCanceller {
+ public:
+ explicit ResolverQueuedCallCanceller(grpc_call_element* elem) : elem_(elem) {
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ GRPC_CALL_STACK_REF(calld->owning_call_, "ResolverQueuedCallCanceller");
+ GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this,
+ grpc_schedule_on_exec_ctx);
+ calld->call_combiner_->SetNotifyOnCancel(&closure_);
+ }
+
+ private:
+ static void CancelLocked(void* arg, grpc_error* error) {
+ auto* self = static_cast<ResolverQueuedCallCanceller*>(arg);
+ auto* chand = static_cast<ChannelData*>(self->elem_->channel_data);
+ auto* calld = static_cast<CallData*>(self->elem_->call_data);
+ {
+ MutexLock lock(&chand->resolution_mu_);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: cancelling resolver queued pick: "
+ "error=%s self=%p calld->resolver_pick_canceller=%p",
+ chand, calld, grpc_error_string(error), self,
+ calld->resolver_call_canceller_);
+ }
+ if (calld->resolver_call_canceller_ == self && error != GRPC_ERROR_NONE) {
+ // Remove pick from list of queued picks.
+ calld->MaybeRemoveCallFromResolverQueuedCallsLocked(self->elem_);
+ // Fail pending batches on the call.
+ calld->PendingBatchesFail(self->elem_, GRPC_ERROR_REF(error),
+ YieldCallCombinerIfPendingBatchesFound);
+ }
+ }
+ GRPC_CALL_STACK_UNREF(calld->owning_call_, "ResolvingQueuedCallCanceller");
+ delete self;
+ }
+
+ grpc_call_element* elem_;
+ grpc_closure closure_;
+};
+
+void ChannelData::CallData::MaybeRemoveCallFromResolverQueuedCallsLocked(
+ grpc_call_element* elem) {
+ if (!queued_pending_resolver_result_) return;
+ auto* chand = static_cast<ChannelData*>(elem->channel_data);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: removing from resolver queued picks list",
+ chand, this);
+ }
+ chand->RemoveResolverQueuedCall(&resolver_queued_call_, pollent_);
+ queued_pending_resolver_result_ = false;
+ // Lame the call combiner canceller.
+ resolver_call_canceller_ = nullptr;
+}
+
+void ChannelData::CallData::MaybeAddCallToResolverQueuedCallsLocked(
+ grpc_call_element* elem) {
+ if (queued_pending_resolver_result_) return;
+ auto* chand = static_cast<ChannelData*>(elem->channel_data);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p calld=%p: adding to resolver queued picks list",
+ chand, this);
+ }
+ queued_pending_resolver_result_ = true;
+ resolver_queued_call_.elem = elem;
+ chand->AddResolverQueuedCall(&resolver_queued_call_, pollent_);
+ // Register call combiner cancellation callback.
+ resolver_call_canceller_ = new ResolverQueuedCallCanceller(elem);
+}
+
+grpc_error* ChannelData::CallData::ApplyServiceConfigToCallLocked(
+ grpc_call_element* elem, grpc_metadata_batch* initial_metadata) {
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p calld=%p: applying service config to call",
+ chand, this);
+ }
+ ConfigSelector* config_selector = chand->config_selector_.get();
+ if (config_selector != nullptr) {
+ // Use the ConfigSelector to determine the config for the call.
+ ConfigSelector::CallConfig call_config =
+ config_selector->GetCallConfig({&path_, initial_metadata, arena_});
+ if (call_config.error != GRPC_ERROR_NONE) return call_config.error;
+ on_call_committed_ = std::move(call_config.on_call_committed);
+ // Create a ServiceConfigCallData for the call. This stores a ref to the
+ // ServiceConfig and caches the right set of parsed configs to use for
+ // the call. The MethodConfig will store itself in the call context,
+ // so that it can be accessed by filters in the subchannel, and it
+ // will be cleaned up when the call ends.
+ auto* service_config_call_data = arena_->New<ServiceConfigCallData>(
+ std::move(call_config.service_config), call_config.method_configs,
+ std::move(call_config.call_attributes), call_context_);
+ // Apply our own method params to the call.
+ auto* method_params = static_cast<ClientChannelMethodParsedConfig*>(
+ service_config_call_data->GetMethodParsedConfig(
+ internal::ClientChannelServiceConfigParser::ParserIndex()));
+ if (method_params != nullptr) {
+ // If the deadline from the service config is shorter than the one
+ // from the client API, reset the deadline timer.
+ if (chand->deadline_checking_enabled_ && method_params->timeout() != 0) {
+ const grpc_millis per_method_deadline =
+ grpc_cycle_counter_to_millis_round_up(call_start_time_) +
+ method_params->timeout();
+ if (per_method_deadline < deadline_) {
+ deadline_ = per_method_deadline;
+ grpc_deadline_state_reset(elem, deadline_);
+ }
+ }
+ // If the service config set wait_for_ready and the application
+ // did not explicitly set it, use the value from the service config.
+ uint32_t* send_initial_metadata_flags =
+ &pending_batches_[0]
+ ->payload->send_initial_metadata.send_initial_metadata_flags;
+ if (method_params->wait_for_ready().has_value() &&
+ !(*send_initial_metadata_flags &
+ GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET)) {
+ if (method_params->wait_for_ready().value()) {
+ *send_initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY;
+ } else {
+ *send_initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY;
+ }
+ }
+ }
+ // Set the dynamic filter stack.
+ dynamic_filters_ = chand->dynamic_filters_;
+ }
+ return GRPC_ERROR_NONE;
+}
+
+void ChannelData::CallData::
+ RecvInitialMetadataReadyForConfigSelectorCommitCallback(void* arg,
+ grpc_error* error) {
+ auto* self = static_cast<CallData*>(arg);
+ if (self->on_call_committed_ != nullptr) {
+ self->on_call_committed_();
+ self->on_call_committed_ = nullptr;
+ }
+ // Chain to original callback.
+ Closure::Run(DEBUG_LOCATION, self->original_recv_initial_metadata_ready_,
+ GRPC_ERROR_REF(error));
+}
+
+// TODO(roth): Consider not intercepting this callback unless we
+// actually need to, if this causes a performance problem.
+void ChannelData::CallData::
+ InjectRecvInitialMetadataReadyForConfigSelectorCommitCallback(
+ grpc_transport_stream_op_batch* batch) {
+ original_recv_initial_metadata_ready_ =
+ batch->payload->recv_initial_metadata.recv_initial_metadata_ready;
+ GRPC_CLOSURE_INIT(&recv_initial_metadata_ready_,
+ RecvInitialMetadataReadyForConfigSelectorCommitCallback,
+ this, nullptr);
+ batch->payload->recv_initial_metadata.recv_initial_metadata_ready =
+ &recv_initial_metadata_ready_;
+}
+
+void ChannelData::CallData::AsyncResolutionDone(grpc_call_element* elem,
+ grpc_error* error) {
+ GRPC_CLOSURE_INIT(&pick_closure_, ResolutionDone, elem, nullptr);
+ ExecCtx::Run(DEBUG_LOCATION, &pick_closure_, error);
+}
+
+void ChannelData::CallData::ResolutionDone(void* arg, grpc_error* error) {
+ grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ CallData* calld = static_cast<CallData*>(elem->call_data);
+ if (error != GRPC_ERROR_NONE) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: error applying config to call: error=%s",
+ chand, calld, grpc_error_string(error));
+ }
+ calld->PendingBatchesFail(elem, GRPC_ERROR_REF(error), YieldCallCombiner);
+ return;
+ }
+ calld->CreateDynamicCall(elem);
+}
+
+void ChannelData::CallData::CheckResolution(void* arg, grpc_error* error) {
+ grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
+ CallData* calld = static_cast<CallData*>(elem->call_data);
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ bool resolution_complete;
+ {
+ MutexLock lock(&chand->resolution_mu_);
+ resolution_complete = calld->CheckResolutionLocked(elem, &error);
+ }
+ if (resolution_complete) {
+ ResolutionDone(elem, error);
+ GRPC_ERROR_UNREF(error);
+ }
+}
+
+bool ChannelData::CallData::CheckResolutionLocked(grpc_call_element* elem,
+ grpc_error** error) {
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ // If we're still in IDLE, we need to start resolving.
+ if (GPR_UNLIKELY(chand->CheckConnectivityState(false) == GRPC_CHANNEL_IDLE)) {
+ // Bounce into the control plane work serializer to start resolving,
+ // in case we are still in IDLE state. Since we are holding on to the
+ // resolution mutex here, we offload it on the ExecCtx so that we don't
+ // deadlock with ourselves.
+ GRPC_CHANNEL_STACK_REF(chand->owning_stack_, "CheckResolutionLocked");
+ ExecCtx::Run(
+ DEBUG_LOCATION,
+ GRPC_CLOSURE_CREATE(
+ [](void* arg, grpc_error* /*error*/) {
+ auto* chand = static_cast<ChannelData*>(arg);
+ chand->work_serializer_->Run(
+ [chand]() {
+ chand->CheckConnectivityState(/*try_to_connect=*/true);
+ GRPC_CHANNEL_STACK_UNREF(chand->owning_stack_,
+ "CheckResolutionLocked");
+ },
+ DEBUG_LOCATION);
+ },
+ chand, nullptr),
+ GRPC_ERROR_NONE);
+ }
+ // Get send_initial_metadata batch and flags.
+ auto& send_initial_metadata =
+ pending_batches_[0]->payload->send_initial_metadata;
+ grpc_metadata_batch* initial_metadata_batch =
+ send_initial_metadata.send_initial_metadata;
+ const uint32_t send_initial_metadata_flags =
+ send_initial_metadata.send_initial_metadata_flags;
+ // If we don't yet have a resolver result, we need to queue the call
+ // until we get one.
+ if (GPR_UNLIKELY(!chand->received_service_config_data_)) {
+ // If the resolver returned transient failure before returning the
+ // first service config, fail any non-wait_for_ready calls.
+ grpc_error* resolver_error = chand->resolver_transient_failure_error_;
+ if (resolver_error != GRPC_ERROR_NONE &&
+ (send_initial_metadata_flags & GRPC_INITIAL_METADATA_WAIT_FOR_READY) ==
+ 0) {
+ MaybeRemoveCallFromResolverQueuedCallsLocked(elem);
+ *error = GRPC_ERROR_REF(resolver_error);
+ return true;
+ }
+ // Either the resolver has not yet returned a result, or it has
+ // returned transient failure but the call is wait_for_ready. In
+ // either case, queue the call.
+ MaybeAddCallToResolverQueuedCallsLocked(elem);
+ return false;
+ }
+ // Apply service config to call if not yet applied.
+ if (GPR_LIKELY(!service_config_applied_)) {
+ service_config_applied_ = true;
+ *error = ApplyServiceConfigToCallLocked(elem, initial_metadata_batch);
+ }
+ MaybeRemoveCallFromResolverQueuedCallsLocked(elem);
+ return true;
+}
+
+void ChannelData::CallData::CreateDynamicCall(grpc_call_element* elem) {
+ auto* chand = static_cast<ChannelData*>(elem->channel_data);
+ DynamicFilters::Call::Args args = {std::move(dynamic_filters_),
+ pollent_,
+ path_,
+ call_start_time_,
+ deadline_,
+ arena_,
+ call_context_,
+ call_combiner_};
+ grpc_error* error = GRPC_ERROR_NONE;
+ DynamicFilters* channel_stack = args.channel_stack.get();
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(
+ GPR_INFO,
+ "chand=%p calld=%p: creating dynamic call stack on channel_stack=%p",
+ chand, this, channel_stack);
+ }
+ dynamic_call_ = channel_stack->CreateCall(std::move(args), &error);
+ if (error != GRPC_ERROR_NONE) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: failed to create dynamic call: error=%s",
+ chand, this, grpc_error_string(error));
+ }
+ PendingBatchesFail(elem, error, YieldCallCombiner);
+ return;
+ }
+ PendingBatchesResume(elem);
+}
+
+//
+// RetryingCall implementation
+//
+
+// Retry support:
+//
+// In order to support retries, we act as a proxy for stream op batches.
+// When we get a batch from the surface, we add it to our list of pending
+// batches, and we then use those batches to construct separate "child"
+// batches to be started on the subchannel call. When the child batches
+// return, we then decide which pending batches have been completed and
+// schedule their callbacks accordingly. If a subchannel call fails and
+// we want to retry it, we do a new pick and start again, constructing
+// new "child" batches for the new subchannel call.
+//
+// Note that retries are committed when receiving data from the server
+// (except for Trailers-Only responses). However, there may be many
+// send ops started before receiving any data, so we may have already
+// completed some number of send ops (and returned the completions up to
+// the surface) by the time we realize that we need to retry. To deal
+// with this, we cache data for send ops, so that we can replay them on a
+// different subchannel call even after we have completed the original
+// batches.
+//
+// There are two sets of data to maintain:
+// - In call_data (in the parent channel), we maintain a list of pending
+// ops and cached data for send ops.
+// - In the subchannel call, we maintain state to indicate what ops have
+// already been sent down to that call.
+//
+// When constructing the "child" batches, we compare those two sets of
+// data to see which batches need to be sent to the subchannel call.
+
+// TODO(roth): In subsequent PRs:
+// - add support for transparent retries (including initial metadata)
+// - figure out how to record stats in census for retries
+// (census filter is on top of this one)
+// - add census stats for retries
+
+ChannelData::RetryingCall::RetryingCall(
+ ChannelData* chand, const grpc_call_element_args& args,
+ grpc_polling_entity* pollent,
+ RefCountedPtr<ServerRetryThrottleData> retry_throttle_data,
+ const ClientChannelMethodParsedConfig::RetryPolicy* retry_policy)
+ : chand_(chand),
+ pollent_(pollent),
+ retry_throttle_data_(std::move(retry_throttle_data)),
+ retry_policy_(retry_policy),
+ retry_backoff_(
+ BackOff::Options()
+ .set_initial_backoff(
+ retry_policy_ == nullptr ? 0 : retry_policy_->initial_backoff)
+ .set_multiplier(retry_policy_ == nullptr
+ ? 0
+ : retry_policy_->backoff_multiplier)
+ .set_jitter(RETRY_BACKOFF_JITTER)
+ .set_max_backoff(
+ retry_policy_ == nullptr ? 0 : retry_policy_->max_backoff)),
+ path_(grpc_slice_ref_internal(args.path)),
+ call_start_time_(args.start_time),
+ deadline_(args.deadline),
+ arena_(args.arena),
+ owning_call_(args.call_stack),
+ call_combiner_(args.call_combiner),
+ call_context_(args.context),
+ pending_send_initial_metadata_(false),
+ pending_send_message_(false),
+ pending_send_trailing_metadata_(false),
+ enable_retries_(true),
+ retry_committed_(false),
+ last_attempt_got_server_pushback_(false) {}
+
+ChannelData::RetryingCall::~RetryingCall() {
+ grpc_slice_unref_internal(path_);
+ GRPC_ERROR_UNREF(cancel_error_);
+ // Make sure there are no remaining pending batches.
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ GPR_ASSERT(pending_batches_[i].batch == nullptr);
+ }
+}
+
+void ChannelData::RetryingCall::StartTransportStreamOpBatch(
+ grpc_transport_stream_op_batch* batch) {
+ // If we've previously been cancelled, immediately fail any new batches.
+ if (GPR_UNLIKELY(cancel_error_ != GRPC_ERROR_NONE)) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p retrying_call=%p: failing batch with error: %s", chand_,
+ this, grpc_error_string(cancel_error_));
+ }
+ // Note: This will release the call combiner.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(cancel_error_), call_combiner_);
+ return;
+ }
+ // Handle cancellation.
+ if (GPR_UNLIKELY(batch->cancel_stream)) {
+ // Stash a copy of cancel_error in our call data, so that we can use
+ // it for subsequent operations. This ensures that if the call is
+ // cancelled before any batches are passed down (e.g., if the deadline
+ // is in the past when the call starts), we can return the right
+ // error to the caller when the first batch does get passed down.
+ GRPC_ERROR_UNREF(cancel_error_);
+ cancel_error_ = GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: recording cancel_error=%s",
+ chand_, this, grpc_error_string(cancel_error_));
+ }
+ // If we do not have an LB call (i.e., a pick has not yet been started),
+ // fail all pending batches. Otherwise, send the cancellation down to the
+ // LB call.
+ if (lb_call_ == nullptr) {
+ // TODO(roth): If there is a pending retry callback, do we need to
+ // cancel it here?
+ PendingBatchesFail(GRPC_ERROR_REF(cancel_error_), NoYieldCallCombiner);
+ // Note: This will release the call combiner.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(cancel_error_), call_combiner_);
+ } else {
+ // Note: This will release the call combiner.
+ lb_call_->StartTransportStreamOpBatch(batch);
+ }
+ return;
+ }
+ // Add the batch to the pending list.
+ PendingBatchesAdd(batch);
+ // Create LB call if needed.
+ // TODO(roth): If we get a new batch from the surface after the
+ // initial retry attempt has failed, while the retry timer is pending,
+ // we should queue the batch and not try to send it immediately.
+ if (lb_call_ == nullptr) {
+ // We do not yet have an LB call, so create one.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: creating LB call", chand_,
+ this);
+ }
+ CreateLbCall(this, GRPC_ERROR_NONE);
+ return;
+ }
+ // Send batches to LB call.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: starting batch on lb_call=%p",
+ chand_, this, lb_call_.get());
+ }
+ PendingBatchesResume();
+}
+
+RefCountedPtr<SubchannelCall> ChannelData::RetryingCall::subchannel_call()
+ const {
+ if (lb_call_ == nullptr) return nullptr;
+ return lb_call_->subchannel_call();
+}
+
+//
// send op data caching
//
-void CallData::MaybeCacheSendOpsForBatch(PendingBatch* pending) {
+void ChannelData::RetryingCall::MaybeCacheSendOpsForBatch(
+ PendingBatch* pending) {
if (pending->send_ops_cached) return;
pending->send_ops_cached = true;
grpc_transport_stream_op_batch* batch = pending->batch;
@@ -2324,8 +3359,9 @@ void CallData::MaybeCacheSendOpsForBatch(PendingBatch* pending) {
GPR_ASSERT(send_initial_metadata_storage_ == nullptr);
grpc_metadata_batch* send_initial_metadata =
batch->payload->send_initial_metadata.send_initial_metadata;
- send_initial_metadata_storage_ = (grpc_linked_mdelem*)arena_->Alloc(
- sizeof(grpc_linked_mdelem) * send_initial_metadata->list.count);
+ send_initial_metadata_storage_ =
+ static_cast<grpc_linked_mdelem*>(arena_->Alloc(
+ sizeof(grpc_linked_mdelem) * send_initial_metadata->list.count));
grpc_metadata_batch_copy(send_initial_metadata, &send_initial_metadata_,
send_initial_metadata_storage_);
send_initial_metadata_flags_ =
@@ -2344,119 +3380,65 @@ void CallData::MaybeCacheSendOpsForBatch(PendingBatch* pending) {
GPR_ASSERT(send_trailing_metadata_storage_ == nullptr);
grpc_metadata_batch* send_trailing_metadata =
batch->payload->send_trailing_metadata.send_trailing_metadata;
- send_trailing_metadata_storage_ = (grpc_linked_mdelem*)arena_->Alloc(
- sizeof(grpc_linked_mdelem) * send_trailing_metadata->list.count);
+ send_trailing_metadata_storage_ =
+ static_cast<grpc_linked_mdelem*>(arena_->Alloc(
+ sizeof(grpc_linked_mdelem) * send_trailing_metadata->list.count));
grpc_metadata_batch_copy(send_trailing_metadata, &send_trailing_metadata_,
send_trailing_metadata_storage_);
}
}
-void CallData::FreeCachedSendInitialMetadata(ChannelData* chand) {
+void ChannelData::RetryingCall::FreeCachedSendInitialMetadata() {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: destroying calld->send_initial_metadata", chand,
- this);
+ "chand=%p retrying_call=%p: destroying send_initial_metadata",
+ chand_, this);
}
grpc_metadata_batch_destroy(&send_initial_metadata_);
}
-void CallData::FreeCachedSendMessage(ChannelData* chand, size_t idx) {
+void ChannelData::RetryingCall::FreeCachedSendMessage(size_t idx) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: destroying calld->send_messages[%" PRIuPTR "]",
- chand, this, idx);
+ "chand=%p retrying_call=%p: destroying send_messages[%" PRIuPTR "]",
+ chand_, this, idx);
}
send_messages_[idx]->Destroy();
}
-void CallData::FreeCachedSendTrailingMetadata(ChannelData* chand) {
+void ChannelData::RetryingCall::FreeCachedSendTrailingMetadata() {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: destroying calld->send_trailing_metadata",
- chand, this);
+ "chand_=%p retrying_call=%p: destroying send_trailing_metadata",
+ chand_, this);
}
grpc_metadata_batch_destroy(&send_trailing_metadata_);
}
-void CallData::FreeCachedSendOpDataAfterCommit(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::FreeCachedSendOpDataAfterCommit(
+ SubchannelCallRetryState* retry_state) {
if (retry_state->completed_send_initial_metadata) {
- FreeCachedSendInitialMetadata(chand);
+ FreeCachedSendInitialMetadata();
}
for (size_t i = 0; i < retry_state->completed_send_message_count; ++i) {
- FreeCachedSendMessage(chand, i);
+ FreeCachedSendMessage(i);
}
if (retry_state->completed_send_trailing_metadata) {
- FreeCachedSendTrailingMetadata(chand);
+ FreeCachedSendTrailingMetadata();
}
}
-void CallData::FreeCachedSendOpDataForCompletedBatch(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
+void ChannelData::RetryingCall::FreeCachedSendOpDataForCompletedBatch(
+ SubchannelCallBatchData* batch_data,
SubchannelCallRetryState* retry_state) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
if (batch_data->batch.send_initial_metadata) {
- FreeCachedSendInitialMetadata(chand);
+ FreeCachedSendInitialMetadata();
}
if (batch_data->batch.send_message) {
- FreeCachedSendMessage(chand, retry_state->completed_send_message_count - 1);
+ FreeCachedSendMessage(retry_state->completed_send_message_count - 1);
}
if (batch_data->batch.send_trailing_metadata) {
- FreeCachedSendTrailingMetadata(chand);
- }
-}
-
-//
-// LB recv_trailing_metadata_ready handling
-//
-
-void CallData::RecvTrailingMetadataReadyForLoadBalancingPolicy(
- void* arg, grpc_error* error) {
- CallData* calld = static_cast<CallData*>(arg);
- // Set error if call did not succeed.
- grpc_error* error_for_lb = GRPC_ERROR_NONE;
- if (error != GRPC_ERROR_NONE) {
- error_for_lb = error;
- } else {
- const auto& fields = calld->recv_trailing_metadata_->idx.named;
- GPR_ASSERT(fields.grpc_status != nullptr);
- grpc_status_code status =
- grpc_get_status_code_from_metadata(fields.grpc_status->md);
- TString msg;
- if (status != GRPC_STATUS_OK) {
- error_for_lb = grpc_error_set_int(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("call failed"),
- GRPC_ERROR_INT_GRPC_STATUS, status);
- if (fields.grpc_message != nullptr) {
- error_for_lb = grpc_error_set_str(
- error_for_lb, GRPC_ERROR_STR_GRPC_MESSAGE,
- grpc_slice_ref_internal(GRPC_MDVALUE(fields.grpc_message->md)));
- }
- }
- }
- // Invoke callback to LB policy.
- Metadata trailing_metadata(calld, calld->recv_trailing_metadata_);
- calld->lb_recv_trailing_metadata_ready_(error_for_lb, &trailing_metadata,
- &calld->lb_call_state_);
- if (error == GRPC_ERROR_NONE) GRPC_ERROR_UNREF(error_for_lb);
- // Chain to original callback.
- Closure::Run(DEBUG_LOCATION, calld->original_recv_trailing_metadata_ready_,
- GRPC_ERROR_REF(error));
-}
-
-void CallData::MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(
- grpc_transport_stream_op_batch* batch) {
- if (lb_recv_trailing_metadata_ready_ != nullptr) {
- recv_trailing_metadata_ =
- batch->payload->recv_trailing_metadata.recv_trailing_metadata;
- original_recv_trailing_metadata_ready_ =
- batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready;
- GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_,
- RecvTrailingMetadataReadyForLoadBalancingPolicy, this,
- grpc_schedule_on_exec_ctx);
- batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready =
- &recv_trailing_metadata_ready_;
+ FreeCachedSendTrailingMetadata();
}
}
@@ -2464,7 +3446,8 @@ void CallData::MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(
// pending_batches management
//
-size_t CallData::GetBatchIndex(grpc_transport_stream_op_batch* batch) {
+size_t ChannelData::RetryingCall::GetBatchIndex(
+ grpc_transport_stream_op_batch* batch) {
// Note: It is important the send_initial_metadata be the first entry
// here, since the code in pick_subchannel_locked() assumes it will be.
if (batch->send_initial_metadata) return 0;
@@ -2477,14 +3460,14 @@ size_t CallData::GetBatchIndex(grpc_transport_stream_op_batch* batch) {
}
// This is called via the call combiner, so access to calld is synchronized.
-void CallData::PendingBatchesAdd(grpc_call_element* elem,
- grpc_transport_stream_op_batch* batch) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::PendingBatchesAdd(
+ grpc_transport_stream_op_batch* batch) {
const size_t idx = GetBatchIndex(batch);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: adding pending batch at index %" PRIuPTR, chand,
- this, idx);
+ gpr_log(
+ GPR_INFO,
+ "chand_=%p retrying_call=%p: adding pending batch at index %" PRIuPTR,
+ chand_, this, idx);
}
PendingBatch* pending = &pending_batches_[idx];
GPR_ASSERT(pending->batch == nullptr);
@@ -2509,32 +3492,35 @@ void CallData::PendingBatchesAdd(grpc_call_element* elem,
pending_send_trailing_metadata_ = true;
}
if (GPR_UNLIKELY(bytes_buffered_for_retry_ >
- chand->per_rpc_retry_buffer_size())) {
+ chand_->per_rpc_retry_buffer_size_)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: exceeded retry buffer size, committing",
- chand, this);
+ "chand=%p retrying_call=%p: exceeded retry buffer size, "
+ "committing",
+ chand_, this);
}
SubchannelCallRetryState* retry_state =
- subchannel_call_ == nullptr ? nullptr
- : static_cast<SubchannelCallRetryState*>(
- subchannel_call_->GetParentData());
- RetryCommit(elem, retry_state);
+ lb_call_ == nullptr ? nullptr
+ : static_cast<SubchannelCallRetryState*>(
+ lb_call_->GetParentData());
+ RetryCommit(retry_state);
// If we are not going to retry and have not yet started, pretend
// retries are disabled so that we don't bother with retry overhead.
if (num_attempts_completed_ == 0) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: disabling retries before first attempt",
- chand, this);
+ "chand=%p retrying_call=%p: disabling retries before first "
+ "attempt",
+ chand_, this);
}
+ // TODO(roth): Treat this as a commit?
enable_retries_ = false;
}
}
}
}
-void CallData::PendingBatchClear(PendingBatch* pending) {
+void ChannelData::RetryingCall::PendingBatchClear(PendingBatch* pending) {
if (enable_retries_) {
if (pending->batch->send_initial_metadata) {
pending_send_initial_metadata_ = false;
@@ -2549,9 +3535,7 @@ void CallData::PendingBatchClear(PendingBatch* pending) {
pending->batch = nullptr;
}
-void CallData::MaybeClearPendingBatch(grpc_call_element* elem,
- PendingBatch* pending) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::MaybeClearPendingBatch(PendingBatch* pending) {
grpc_transport_stream_op_batch* batch = pending->batch;
// We clear the pending batch if all of its callbacks have been
// scheduled and reset to nullptr.
@@ -2565,26 +3549,28 @@ void CallData::MaybeClearPendingBatch(grpc_call_element* elem,
batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready ==
nullptr)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: clearing pending batch", chand,
- this);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: clearing pending batch",
+ chand_, this);
}
PendingBatchClear(pending);
}
}
// This is called via the call combiner, so access to calld is synchronized.
-void CallData::FailPendingBatchInCallCombiner(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::FailPendingBatchInCallCombiner(
+ void* arg, grpc_error* error) {
grpc_transport_stream_op_batch* batch =
static_cast<grpc_transport_stream_op_batch*>(arg);
- CallData* calld = static_cast<CallData*>(batch->handler_private.extra_arg);
+ RetryingCall* call =
+ static_cast<RetryingCall*>(batch->handler_private.extra_arg);
// Note: This will release the call combiner.
grpc_transport_stream_op_batch_finish_with_failure(
- batch, GRPC_ERROR_REF(error), calld->call_combiner_);
+ batch, GRPC_ERROR_REF(error), call->call_combiner_);
}
// This is called via the call combiner, so access to calld is synchronized.
-void CallData::PendingBatchesFail(
- grpc_call_element* elem, grpc_error* error,
+void ChannelData::RetryingCall::PendingBatchesFail(
+ grpc_error* error,
YieldCallCombinerPredicate yield_call_combiner_predicate) {
GPR_ASSERT(error != GRPC_ERROR_NONE);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
@@ -2593,17 +3579,15 @@ void CallData::PendingBatchesFail(
if (pending_batches_[i].batch != nullptr) ++num_batches;
}
gpr_log(GPR_INFO,
- "chand=%p calld=%p: failing %" PRIuPTR " pending batches: %s",
- elem->channel_data, this, num_batches, grpc_error_string(error));
+ "chand=%p retrying_call=%p: failing %" PRIuPTR
+ " pending batches: %s",
+ chand_, this, num_batches, grpc_error_string(error));
}
CallCombinerClosureList closures;
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
PendingBatch* pending = &pending_batches_[i];
grpc_transport_stream_op_batch* batch = pending->batch;
if (batch != nullptr) {
- if (batch->recv_trailing_metadata) {
- MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(batch);
- }
batch->handler_private.extra_arg = this;
GRPC_CLOSURE_INIT(&batch->handler_private.closure,
FailPendingBatchInCallCombiner, batch,
@@ -2622,21 +3606,20 @@ void CallData::PendingBatchesFail(
}
// This is called via the call combiner, so access to calld is synchronized.
-void CallData::ResumePendingBatchInCallCombiner(void* arg,
- grpc_error* /*ignored*/) {
+void ChannelData::RetryingCall::ResumePendingBatchInCallCombiner(
+ void* arg, grpc_error* /*ignored*/) {
grpc_transport_stream_op_batch* batch =
static_cast<grpc_transport_stream_op_batch*>(arg);
- SubchannelCall* subchannel_call =
- static_cast<SubchannelCall*>(batch->handler_private.extra_arg);
+ auto* lb_call = static_cast<ChannelData::LoadBalancedCall*>(
+ batch->handler_private.extra_arg);
// Note: This will release the call combiner.
- subchannel_call->StartTransportStreamOpBatch(batch);
+ lb_call->StartTransportStreamOpBatch(batch);
}
// This is called via the call combiner, so access to calld is synchronized.
-void CallData::PendingBatchesResume(grpc_call_element* elem) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::PendingBatchesResume() {
if (enable_retries_) {
- StartRetriableSubchannelBatches(elem, GRPC_ERROR_NONE);
+ StartRetriableSubchannelBatches(this, GRPC_ERROR_NONE);
return;
}
// Retries not enabled; send down batches as-is.
@@ -2646,22 +3629,18 @@ void CallData::PendingBatchesResume(grpc_call_element* elem) {
if (pending_batches_[i].batch != nullptr) ++num_batches;
}
gpr_log(GPR_INFO,
- "chand=%p calld=%p: starting %" PRIuPTR
- " pending batches on subchannel_call=%p",
- chand, this, num_batches, subchannel_call_.get());
+ "chand=%p retrying_call=%p: starting %" PRIuPTR
+ " pending batches on lb_call=%p",
+ chand_, this, num_batches, lb_call_.get());
}
CallCombinerClosureList closures;
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
PendingBatch* pending = &pending_batches_[i];
grpc_transport_stream_op_batch* batch = pending->batch;
if (batch != nullptr) {
- if (batch->recv_trailing_metadata) {
- MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(batch);
- }
- batch->handler_private.extra_arg = subchannel_call_.get();
+ batch->handler_private.extra_arg = lb_call_.get();
GRPC_CLOSURE_INIT(&batch->handler_private.closure,
- ResumePendingBatchInCallCombiner, batch,
- grpc_schedule_on_exec_ctx);
+ ResumePendingBatchInCallCombiner, batch, nullptr);
closures.Add(&batch->handler_private.closure, GRPC_ERROR_NONE,
"PendingBatchesResume");
PendingBatchClear(pending);
@@ -2672,18 +3651,18 @@ void CallData::PendingBatchesResume(grpc_call_element* elem) {
}
template <typename Predicate>
-CallData::PendingBatch* CallData::PendingBatchFind(grpc_call_element* elem,
- const char* log_message,
- Predicate predicate) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ChannelData::RetryingCall::PendingBatch*
+ChannelData::RetryingCall::PendingBatchFind(const char* log_message,
+ Predicate predicate) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
PendingBatch* pending = &pending_batches_[i];
grpc_transport_stream_op_batch* batch = pending->batch;
if (batch != nullptr && predicate(batch)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: %s pending batch at index %" PRIuPTR, chand,
- this, log_message, i);
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: %s pending batch at index %" PRIuPTR,
+ chand_, this, log_message, i);
}
return pending;
}
@@ -2695,28 +3674,24 @@ CallData::PendingBatch* CallData::PendingBatchFind(grpc_call_element* elem,
// retry code
//
-void CallData::RetryCommit(grpc_call_element* elem,
- SubchannelCallRetryState* retry_state) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::RetryCommit(
+ SubchannelCallRetryState* retry_state) {
if (retry_committed_) return;
retry_committed_ = true;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: committing retries", chand, this);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: committing retries", chand_,
+ this);
}
if (retry_state != nullptr) {
- FreeCachedSendOpDataAfterCommit(elem, retry_state);
+ FreeCachedSendOpDataAfterCommit(retry_state);
}
}
-void CallData::DoRetry(grpc_call_element* elem,
- SubchannelCallRetryState* retry_state,
- grpc_millis server_pushback_ms) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- GPR_ASSERT(method_params_ != nullptr);
- const auto* retry_policy = method_params_->retry_policy();
- GPR_ASSERT(retry_policy != nullptr);
- // Reset subchannel call.
- subchannel_call_.reset();
+void ChannelData::RetryingCall::DoRetry(SubchannelCallRetryState* retry_state,
+ grpc_millis server_pushback_ms) {
+ GPR_ASSERT(retry_policy_ != nullptr);
+ // Reset LB call.
+ lb_call_.reset();
// Compute backoff delay.
grpc_millis next_attempt_time;
if (server_pushback_ms >= 0) {
@@ -2724,49 +3699,38 @@ void CallData::DoRetry(grpc_call_element* elem,
last_attempt_got_server_pushback_ = true;
} else {
if (num_attempts_completed_ == 1 || last_attempt_got_server_pushback_) {
- retry_backoff_.Init(
- BackOff::Options()
- .set_initial_backoff(retry_policy->initial_backoff)
- .set_multiplier(retry_policy->backoff_multiplier)
- .set_jitter(RETRY_BACKOFF_JITTER)
- .set_max_backoff(retry_policy->max_backoff));
last_attempt_got_server_pushback_ = false;
}
- next_attempt_time = retry_backoff_->NextAttemptTime();
+ next_attempt_time = retry_backoff_.NextAttemptTime();
}
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: retrying failed call in %" PRId64 " ms", chand,
- this, next_attempt_time - ExecCtx::Get()->Now());
+ "chand=%p retrying_call=%p: retrying failed call in %" PRId64 " ms",
+ chand_, this, next_attempt_time - ExecCtx::Get()->Now());
}
// Schedule retry after computed delay.
- GRPC_CLOSURE_INIT(&pick_closure_, PickSubchannel, elem,
- grpc_schedule_on_exec_ctx);
- grpc_timer_init(&retry_timer_, next_attempt_time, &pick_closure_);
+ GRPC_CLOSURE_INIT(&retry_closure_, CreateLbCall, this, nullptr);
+ grpc_timer_init(&retry_timer_, next_attempt_time, &retry_closure_);
// Update bookkeeping.
if (retry_state != nullptr) retry_state->retry_dispatched = true;
}
-bool CallData::MaybeRetry(grpc_call_element* elem,
- SubchannelCallBatchData* batch_data,
- grpc_status_code status,
- grpc_mdelem* server_pushback_md) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+bool ChannelData::RetryingCall::MaybeRetry(SubchannelCallBatchData* batch_data,
+ grpc_status_code status,
+ grpc_mdelem* server_pushback_md) {
// Get retry policy.
- if (method_params_ == nullptr) return false;
- const auto* retry_policy = method_params_->retry_policy();
- if (retry_policy == nullptr) return false;
+ if (retry_policy_ == nullptr) return false;
// If we've already dispatched a retry from this call, return true.
// This catches the case where the batch has multiple callbacks
// (i.e., it includes either recv_message or recv_initial_metadata).
SubchannelCallRetryState* retry_state = nullptr;
if (batch_data != nullptr) {
retry_state = static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
if (retry_state->retry_dispatched) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: retry already dispatched", chand,
- this);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: retry already dispatched",
+ chand_, this);
}
return true;
}
@@ -2777,16 +3741,18 @@ bool CallData::MaybeRetry(grpc_call_element* elem,
retry_throttle_data_->RecordSuccess();
}
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: call succeeded", chand, this);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: call succeeded", chand_,
+ this);
}
return false;
}
// Status is not OK. Check whether the status is retryable.
- if (!retry_policy->retryable_status_codes.Contains(status)) {
+ if (!retry_policy_->retryable_status_codes.Contains(status)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: status %s not configured as retryable", chand,
- this, grpc_status_code_to_string(status));
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: status %s not configured as retryable",
+ chand_, this, grpc_status_code_to_string(status));
}
return false;
}
@@ -2800,24 +3766,25 @@ bool CallData::MaybeRetry(grpc_call_element* elem,
if (retry_throttle_data_ != nullptr &&
!retry_throttle_data_->RecordFailure()) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: retries throttled", chand, this);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: retries throttled", chand_,
+ this);
}
return false;
}
// Check whether the call is committed.
if (retry_committed_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: retries already committed", chand,
- this);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: retries already committed",
+ chand_, this);
}
return false;
}
// Check whether we have retries remaining.
++num_attempts_completed_;
- if (num_attempts_completed_ >= retry_policy->max_attempts) {
+ if (num_attempts_completed_ >= retry_policy_->max_attempts) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: exceeded %d retry attempts", chand,
- this, retry_policy->max_attempts);
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: exceeded %d retry attempts",
+ chand_, this, retry_policy_->max_attempts);
}
return false;
}
@@ -2825,8 +3792,9 @@ bool CallData::MaybeRetry(grpc_call_element* elem,
if (cancel_error_ != GRPC_ERROR_NONE) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: call cancelled from surface, not retrying",
- chand, this);
+ "chand=%p retrying_call=%p: call cancelled from surface, not "
+ "retrying",
+ chand_, this);
}
return false;
}
@@ -2837,54 +3805,54 @@ bool CallData::MaybeRetry(grpc_call_element* elem,
uint32_t ms;
if (!grpc_parse_slice_to_uint32(GRPC_MDVALUE(*server_pushback_md), &ms)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: not retrying due to server push-back",
- chand, this);
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: not retrying due to server push-back",
+ chand_, this);
}
return false;
} else {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: server push-back: retry in %u ms",
- chand, this, ms);
+ gpr_log(GPR_INFO,
+ "chand=%p retrying_call=%p: server push-back: retry in %u ms",
+ chand_, this, ms);
}
- server_pushback_ms = (grpc_millis)ms;
+ server_pushback_ms = static_cast<grpc_millis>(ms);
}
}
- DoRetry(elem, retry_state, server_pushback_ms);
+ DoRetry(retry_state, server_pushback_ms);
return true;
}
//
-// CallData::SubchannelCallBatchData
+// ChannelData::RetryingCall::SubchannelCallBatchData
//
-CallData::SubchannelCallBatchData* CallData::SubchannelCallBatchData::Create(
- grpc_call_element* elem, int refcount, bool set_on_complete) {
- CallData* calld = static_cast<CallData*>(elem->call_data);
- return calld->arena_->New<SubchannelCallBatchData>(elem, calld, refcount,
- set_on_complete);
+ChannelData::RetryingCall::SubchannelCallBatchData*
+ChannelData::RetryingCall::SubchannelCallBatchData::Create(
+ RetryingCall* call, int refcount, bool set_on_complete) {
+ return call->arena_->New<SubchannelCallBatchData>(call, refcount,
+ set_on_complete);
}
-CallData::SubchannelCallBatchData::SubchannelCallBatchData(
- grpc_call_element* elem, CallData* calld, int refcount,
- bool set_on_complete)
- : elem(elem), subchannel_call(calld->subchannel_call_) {
+ChannelData::RetryingCall::SubchannelCallBatchData::SubchannelCallBatchData(
+ RetryingCall* call, int refcount, bool set_on_complete)
+ : call(call), lb_call(call->lb_call_) {
SubchannelCallRetryState* retry_state =
- static_cast<SubchannelCallRetryState*>(
- calld->subchannel_call_->GetParentData());
+ static_cast<SubchannelCallRetryState*>(lb_call->GetParentData());
batch.payload = &retry_state->batch_payload;
gpr_ref_init(&refs, refcount);
if (set_on_complete) {
- GRPC_CLOSURE_INIT(&on_complete, CallData::OnComplete, this,
+ GRPC_CLOSURE_INIT(&on_complete, ChannelData::RetryingCall::OnComplete, this,
grpc_schedule_on_exec_ctx);
batch.on_complete = &on_complete;
}
- GRPC_CALL_STACK_REF(calld->owning_call_, "batch_data");
+ GRPC_CALL_STACK_REF(call->owning_call_, "batch_data");
}
-void CallData::SubchannelCallBatchData::Destroy() {
+void ChannelData::RetryingCall::SubchannelCallBatchData::Destroy() {
SubchannelCallRetryState* retry_state =
- static_cast<SubchannelCallRetryState*>(subchannel_call->GetParentData());
+ static_cast<SubchannelCallRetryState*>(lb_call->GetParentData());
if (batch.send_initial_metadata) {
grpc_metadata_batch_destroy(&retry_state->send_initial_metadata);
}
@@ -2897,22 +3865,21 @@ void CallData::SubchannelCallBatchData::Destroy() {
if (batch.recv_trailing_metadata) {
grpc_metadata_batch_destroy(&retry_state->recv_trailing_metadata);
}
- subchannel_call.reset();
- CallData* calld = static_cast<CallData*>(elem->call_data);
- GRPC_CALL_STACK_UNREF(calld->owning_call_, "batch_data");
+ lb_call.reset();
+ GRPC_CALL_STACK_UNREF(call->owning_call_, "batch_data");
}
//
// recv_initial_metadata callback handling
//
-void CallData::InvokeRecvInitialMetadataCallback(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::InvokeRecvInitialMetadataCallback(
+ void* arg, grpc_error* error) {
SubchannelCallBatchData* batch_data =
static_cast<SubchannelCallBatchData*>(arg);
- CallData* calld = static_cast<CallData*>(batch_data->elem->call_data);
// Find pending batch.
- PendingBatch* pending = calld->PendingBatchFind(
- batch_data->elem, "invoking recv_initial_metadata_ready for",
+ PendingBatch* pending = batch_data->call->PendingBatchFind(
+ "invoking recv_initial_metadata_ready for",
[](grpc_transport_stream_op_batch* batch) {
return batch->recv_initial_metadata &&
batch->payload->recv_initial_metadata
@@ -2922,7 +3889,7 @@ void CallData::InvokeRecvInitialMetadataCallback(void* arg, grpc_error* error) {
// Return metadata.
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
grpc_metadata_batch_move(
&retry_state->recv_initial_metadata,
pending->batch->payload->recv_initial_metadata.recv_initial_metadata);
@@ -2934,33 +3901,33 @@ void CallData::InvokeRecvInitialMetadataCallback(void* arg, grpc_error* error) {
.recv_initial_metadata_ready;
pending->batch->payload->recv_initial_metadata.recv_initial_metadata_ready =
nullptr;
- calld->MaybeClearPendingBatch(batch_data->elem, pending);
+ batch_data->call->MaybeClearPendingBatch(pending);
batch_data->Unref();
// Invoke callback.
Closure::Run(DEBUG_LOCATION, recv_initial_metadata_ready,
GRPC_ERROR_REF(error));
}
-void CallData::RecvInitialMetadataReady(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::RecvInitialMetadataReady(void* arg,
+ grpc_error* error) {
SubchannelCallBatchData* batch_data =
static_cast<SubchannelCallBatchData*>(arg);
- grpc_call_element* elem = batch_data->elem;
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- CallData* calld = static_cast<CallData*>(elem->call_data);
+ RetryingCall* call = batch_data->call;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: got recv_initial_metadata_ready, error=%s",
- chand, calld, grpc_error_string(error));
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: got recv_initial_metadata_ready, error=%s",
+ call->chand_, call, grpc_error_string(error));
}
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
retry_state->completed_recv_initial_metadata = true;
// If a retry was already dispatched, then we're not going to use the
// result of this recv_initial_metadata op, so do nothing.
if (retry_state->retry_dispatched) {
GRPC_CALL_COMBINER_STOP(
- calld->call_combiner_,
+ call->call_combiner_,
"recv_initial_metadata_ready after retry dispatched");
return;
}
@@ -2972,43 +3939,44 @@ void CallData::RecvInitialMetadataReady(void* arg, grpc_error* error) {
error != GRPC_ERROR_NONE) &&
!retry_state->completed_recv_trailing_metadata)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: deferring recv_initial_metadata_ready "
- "(Trailers-Only)",
- chand, calld);
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: deferring recv_initial_metadata_ready "
+ "(Trailers-Only)",
+ call->chand_, call);
}
retry_state->recv_initial_metadata_ready_deferred_batch = batch_data;
retry_state->recv_initial_metadata_error = GRPC_ERROR_REF(error);
if (!retry_state->started_recv_trailing_metadata) {
// recv_trailing_metadata not yet started by application; start it
// ourselves to get status.
- calld->StartInternalRecvTrailingMetadata(elem);
+ call->StartInternalRecvTrailingMetadata();
} else {
GRPC_CALL_COMBINER_STOP(
- calld->call_combiner_,
+ call->call_combiner_,
"recv_initial_metadata_ready trailers-only or error");
}
return;
}
// Received valid initial metadata, so commit the call.
- calld->RetryCommit(elem, retry_state);
- calld->MaybeInvokeConfigSelectorCommitCallback();
+ call->RetryCommit(retry_state);
// Invoke the callback to return the result to the surface.
// Manually invoking a callback function; it does not take ownership of error.
- calld->InvokeRecvInitialMetadataCallback(batch_data, error);
+ call->InvokeRecvInitialMetadataCallback(batch_data, error);
}
//
// recv_message callback handling
//
-void CallData::InvokeRecvMessageCallback(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::InvokeRecvMessageCallback(void* arg,
+ grpc_error* error) {
SubchannelCallBatchData* batch_data =
static_cast<SubchannelCallBatchData*>(arg);
- CallData* calld = static_cast<CallData*>(batch_data->elem->call_data);
+ RetryingCall* call = batch_data->call;
// Find pending op.
- PendingBatch* pending = calld->PendingBatchFind(
- batch_data->elem, "invoking recv_message_ready for",
+ PendingBatch* pending = call->PendingBatchFind(
+ "invoking recv_message_ready for",
[](grpc_transport_stream_op_batch* batch) {
return batch->recv_message &&
batch->payload->recv_message.recv_message_ready != nullptr;
@@ -3017,7 +3985,7 @@ void CallData::InvokeRecvMessageCallback(void* arg, grpc_error* error) {
// Return payload.
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
*pending->batch->payload->recv_message.recv_message =
std::move(retry_state->recv_message);
// Update bookkeeping.
@@ -3026,30 +3994,29 @@ void CallData::InvokeRecvMessageCallback(void* arg, grpc_error* error) {
grpc_closure* recv_message_ready =
pending->batch->payload->recv_message.recv_message_ready;
pending->batch->payload->recv_message.recv_message_ready = nullptr;
- calld->MaybeClearPendingBatch(batch_data->elem, pending);
+ call->MaybeClearPendingBatch(pending);
batch_data->Unref();
// Invoke callback.
Closure::Run(DEBUG_LOCATION, recv_message_ready, GRPC_ERROR_REF(error));
}
-void CallData::RecvMessageReady(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::RecvMessageReady(void* arg, grpc_error* error) {
SubchannelCallBatchData* batch_data =
static_cast<SubchannelCallBatchData*>(arg);
- grpc_call_element* elem = batch_data->elem;
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- CallData* calld = static_cast<CallData*>(elem->call_data);
+ RetryingCall* call = batch_data->call;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: got recv_message_ready, error=%s",
- chand, calld, grpc_error_string(error));
+ gpr_log(GPR_INFO,
+ "chand=%p retrying_call=%p: got recv_message_ready, error=%s",
+ call->chand_, call, grpc_error_string(error));
}
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
++retry_state->completed_recv_message_count;
// If a retry was already dispatched, then we're not going to use the
// result of this recv_message op, so do nothing.
if (retry_state->retry_dispatched) {
- GRPC_CALL_COMBINER_STOP(calld->call_combiner_,
+ GRPC_CALL_COMBINER_STOP(call->call_combiner_,
"recv_message_ready after retry dispatched");
return;
}
@@ -3061,37 +4028,37 @@ void CallData::RecvMessageReady(void* arg, grpc_error* error) {
(retry_state->recv_message == nullptr || error != GRPC_ERROR_NONE) &&
!retry_state->completed_recv_trailing_metadata)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: deferring recv_message_ready (nullptr "
- "message and recv_trailing_metadata pending)",
- chand, calld);
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: deferring recv_message_ready (nullptr "
+ "message and recv_trailing_metadata pending)",
+ call->chand_, call);
}
retry_state->recv_message_ready_deferred_batch = batch_data;
retry_state->recv_message_error = GRPC_ERROR_REF(error);
if (!retry_state->started_recv_trailing_metadata) {
// recv_trailing_metadata not yet started by application; start it
// ourselves to get status.
- calld->StartInternalRecvTrailingMetadata(elem);
+ call->StartInternalRecvTrailingMetadata();
} else {
- GRPC_CALL_COMBINER_STOP(calld->call_combiner_, "recv_message_ready null");
+ GRPC_CALL_COMBINER_STOP(call->call_combiner_, "recv_message_ready null");
}
return;
}
// Received a valid message, so commit the call.
- calld->RetryCommit(elem, retry_state);
- calld->MaybeInvokeConfigSelectorCommitCallback();
+ call->RetryCommit(retry_state);
// Invoke the callback to return the result to the surface.
// Manually invoking a callback function; it does not take ownership of error.
- calld->InvokeRecvMessageCallback(batch_data, error);
+ call->InvokeRecvMessageCallback(batch_data, error);
}
//
// recv_trailing_metadata handling
//
-void CallData::GetCallStatus(grpc_metadata_batch* md_batch, grpc_error* error,
- grpc_status_code* status,
- grpc_mdelem** server_pushback_md) {
+void ChannelData::RetryingCall::GetCallStatus(
+ grpc_metadata_batch* md_batch, grpc_error* error, grpc_status_code* status,
+ grpc_mdelem** server_pushback_md) {
if (error != GRPC_ERROR_NONE) {
grpc_error_get_status(error, deadline_, status, nullptr, nullptr, nullptr);
} else {
@@ -3106,12 +4073,12 @@ void CallData::GetCallStatus(grpc_metadata_batch* md_batch, grpc_error* error,
GRPC_ERROR_UNREF(error);
}
-void CallData::AddClosureForRecvTrailingMetadataReady(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
- grpc_error* error, CallCombinerClosureList* closures) {
+void ChannelData::RetryingCall::AddClosureForRecvTrailingMetadataReady(
+ SubchannelCallBatchData* batch_data, grpc_error* error,
+ CallCombinerClosureList* closures) {
// Find pending batch.
PendingBatch* pending = PendingBatchFind(
- elem, "invoking recv_trailing_metadata for",
+ "invoking recv_trailing_metadata for",
[](grpc_transport_stream_op_batch* batch) {
return batch->recv_trailing_metadata &&
batch->payload->recv_trailing_metadata
@@ -3126,7 +4093,7 @@ void CallData::AddClosureForRecvTrailingMetadataReady(
// Return metadata.
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
grpc_metadata_batch_move(
&retry_state->recv_trailing_metadata,
pending->batch->payload->recv_trailing_metadata.recv_trailing_metadata);
@@ -3137,10 +4104,10 @@ void CallData::AddClosureForRecvTrailingMetadataReady(
// Update bookkeeping.
pending->batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready =
nullptr;
- MaybeClearPendingBatch(elem, pending);
+ MaybeClearPendingBatch(pending);
}
-void CallData::AddClosuresForDeferredRecvCallbacks(
+void ChannelData::RetryingCall::AddClosuresForDeferredRecvCallbacks(
SubchannelCallBatchData* batch_data, SubchannelCallRetryState* retry_state,
CallCombinerClosureList* closures) {
if (batch_data->batch.recv_trailing_metadata) {
@@ -3171,8 +4138,8 @@ void CallData::AddClosuresForDeferredRecvCallbacks(
}
}
-bool CallData::PendingBatchIsUnstarted(PendingBatch* pending,
- SubchannelCallRetryState* retry_state) {
+bool ChannelData::RetryingCall::PendingBatchIsUnstarted(
+ PendingBatch* pending, SubchannelCallRetryState* retry_state) {
if (pending->batch == nullptr || pending->batch->on_complete == nullptr) {
return false;
}
@@ -3191,45 +4158,44 @@ bool CallData::PendingBatchIsUnstarted(PendingBatch* pending,
return false;
}
-void CallData::AddClosuresToFailUnstartedPendingBatches(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state,
- grpc_error* error, CallCombinerClosureList* closures) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::AddClosuresToFailUnstartedPendingBatches(
+ SubchannelCallRetryState* retry_state, grpc_error* error,
+ CallCombinerClosureList* closures) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
PendingBatch* pending = &pending_batches_[i];
if (PendingBatchIsUnstarted(pending, retry_state)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: failing unstarted pending batch at index "
+ "chand=%p retrying_call=%p: failing unstarted pending batch at "
+ "index "
"%" PRIuPTR,
- chand, this, i);
+ chand_, this, i);
}
closures->Add(pending->batch->on_complete, GRPC_ERROR_REF(error),
"failing on_complete for pending batch");
pending->batch->on_complete = nullptr;
- MaybeClearPendingBatch(elem, pending);
+ MaybeClearPendingBatch(pending);
}
}
GRPC_ERROR_UNREF(error);
}
-void CallData::RunClosuresForCompletedCall(SubchannelCallBatchData* batch_data,
- grpc_error* error) {
- grpc_call_element* elem = batch_data->elem;
+void ChannelData::RetryingCall::RunClosuresForCompletedCall(
+ SubchannelCallBatchData* batch_data, grpc_error* error) {
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
// Construct list of closures to execute.
CallCombinerClosureList closures;
// First, add closure for recv_trailing_metadata_ready.
- AddClosureForRecvTrailingMetadataReady(elem, batch_data,
- GRPC_ERROR_REF(error), &closures);
+ AddClosureForRecvTrailingMetadataReady(batch_data, GRPC_ERROR_REF(error),
+ &closures);
// If there are deferred recv_initial_metadata_ready or recv_message_ready
// callbacks, add them to closures.
AddClosuresForDeferredRecvCallbacks(batch_data, retry_state, &closures);
// Add closures to fail any pending batches that have not yet been started.
- AddClosuresToFailUnstartedPendingBatches(elem, retry_state,
- GRPC_ERROR_REF(error), &closures);
+ AddClosuresToFailUnstartedPendingBatches(retry_state, GRPC_ERROR_REF(error),
+ &closures);
// Don't need batch_data anymore.
batch_data->Unref();
// Schedule all of the closures identified above.
@@ -3238,34 +4204,34 @@ void CallData::RunClosuresForCompletedCall(SubchannelCallBatchData* batch_data,
GRPC_ERROR_UNREF(error);
}
-void CallData::RecvTrailingMetadataReady(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::RecvTrailingMetadataReady(void* arg,
+ grpc_error* error) {
SubchannelCallBatchData* batch_data =
static_cast<SubchannelCallBatchData*>(arg);
- grpc_call_element* elem = batch_data->elem;
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- CallData* calld = static_cast<CallData*>(elem->call_data);
+ RetryingCall* call = batch_data->call;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: got recv_trailing_metadata_ready, error=%s",
- chand, calld, grpc_error_string(error));
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: got recv_trailing_metadata_ready, error=%s",
+ call->chand_, call, grpc_error_string(error));
}
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
retry_state->completed_recv_trailing_metadata = true;
// Get the call's status and check for server pushback metadata.
grpc_status_code status = GRPC_STATUS_OK;
grpc_mdelem* server_pushback_md = nullptr;
grpc_metadata_batch* md_batch =
batch_data->batch.payload->recv_trailing_metadata.recv_trailing_metadata;
- calld->GetCallStatus(md_batch, GRPC_ERROR_REF(error), &status,
- &server_pushback_md);
+ call->GetCallStatus(md_batch, GRPC_ERROR_REF(error), &status,
+ &server_pushback_md);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: call finished, status=%s", chand,
- calld, grpc_status_code_to_string(status));
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: call finished, status=%s",
+ call->chand_, call, grpc_status_code_to_string(status));
}
// Check if we should retry.
- if (calld->MaybeRetry(elem, batch_data, status, server_pushback_md)) {
+ if (call->MaybeRetry(batch_data, status, server_pushback_md)) {
// Unref batch_data for deferred recv_initial_metadata_ready or
// recv_message_ready callbacks, if any.
if (retry_state->recv_initial_metadata_ready_deferred_batch != nullptr) {
@@ -3280,21 +4246,20 @@ void CallData::RecvTrailingMetadataReady(void* arg, grpc_error* error) {
return;
}
// Not retrying, so commit the call.
- calld->RetryCommit(elem, retry_state);
- calld->MaybeInvokeConfigSelectorCommitCallback();
+ call->RetryCommit(retry_state);
// Run any necessary closures.
- calld->RunClosuresForCompletedCall(batch_data, GRPC_ERROR_REF(error));
+ call->RunClosuresForCompletedCall(batch_data, GRPC_ERROR_REF(error));
}
//
// on_complete callback handling
//
-void CallData::AddClosuresForCompletedPendingBatch(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
- grpc_error* error, CallCombinerClosureList* closures) {
+void ChannelData::RetryingCall::AddClosuresForCompletedPendingBatch(
+ SubchannelCallBatchData* batch_data, grpc_error* error,
+ CallCombinerClosureList* closures) {
PendingBatch* pending = PendingBatchFind(
- elem, "completed", [batch_data](grpc_transport_stream_op_batch* batch) {
+ "completed", [batch_data](grpc_transport_stream_op_batch* batch) {
// Match the pending batch with the same set of send ops as the
// subchannel batch we've just completed.
return batch->on_complete != nullptr &&
@@ -3314,13 +4279,12 @@ void CallData::AddClosuresForCompletedPendingBatch(
closures->Add(pending->batch->on_complete, error,
"on_complete for pending batch");
pending->batch->on_complete = nullptr;
- MaybeClearPendingBatch(elem, pending);
+ MaybeClearPendingBatch(pending);
}
-void CallData::AddClosuresForReplayOrPendingSendOps(
- grpc_call_element* elem, SubchannelCallBatchData* batch_data,
- SubchannelCallRetryState* retry_state, CallCombinerClosureList* closures) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::AddClosuresForReplayOrPendingSendOps(
+ SubchannelCallBatchData* batch_data, SubchannelCallRetryState* retry_state,
+ CallCombinerClosureList* closures) {
bool have_pending_send_message_ops =
retry_state->started_send_message_count < send_messages_.size();
bool have_pending_send_trailing_metadata_op =
@@ -3341,31 +4305,31 @@ void CallData::AddClosuresForReplayOrPendingSendOps(
if (have_pending_send_message_ops || have_pending_send_trailing_metadata_op) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: starting next batch for pending send op(s)",
- chand, this);
+ "chand=%p retrying_call=%p: starting next batch for pending send "
+ "op(s)",
+ chand_, this);
}
GRPC_CLOSURE_INIT(&batch_data->batch.handler_private.closure,
- StartRetriableSubchannelBatches, elem,
+ StartRetriableSubchannelBatches, this,
grpc_schedule_on_exec_ctx);
closures->Add(&batch_data->batch.handler_private.closure, GRPC_ERROR_NONE,
"starting next batch for send_* op(s)");
}
}
-void CallData::OnComplete(void* arg, grpc_error* error) {
+void ChannelData::RetryingCall::OnComplete(void* arg, grpc_error* error) {
SubchannelCallBatchData* batch_data =
static_cast<SubchannelCallBatchData*>(arg);
- grpc_call_element* elem = batch_data->elem;
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- CallData* calld = static_cast<CallData*>(elem->call_data);
+ RetryingCall* call = batch_data->call;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: got on_complete, error=%s, batch=%s",
- chand, calld, grpc_error_string(error),
+ gpr_log(GPR_INFO,
+ "chand=%p retrying_call=%p: got on_complete, error=%s, batch=%s",
+ call->chand_, call, grpc_error_string(error),
grpc_transport_stream_op_batch_string(&batch_data->batch).c_str());
}
SubchannelCallRetryState* retry_state =
static_cast<SubchannelCallRetryState*>(
- batch_data->subchannel_call->GetParentData());
+ batch_data->lb_call->GetParentData());
// Update bookkeeping in retry_state.
if (batch_data->batch.send_initial_metadata) {
retry_state->completed_send_initial_metadata = true;
@@ -3378,8 +4342,8 @@ void CallData::OnComplete(void* arg, grpc_error* error) {
}
// If the call is committed, free cached data for send ops that we've just
// completed.
- if (calld->retry_committed_) {
- calld->FreeCachedSendOpDataForCompletedBatch(elem, batch_data, retry_state);
+ if (call->retry_committed_) {
+ call->FreeCachedSendOpDataForCompletedBatch(batch_data, retry_state);
}
// Construct list of closures to execute.
CallCombinerClosureList closures;
@@ -3388,28 +4352,28 @@ void CallData::OnComplete(void* arg, grpc_error* error) {
// Otherwise, invoke the callback to return the result to the surface.
if (!retry_state->retry_dispatched) {
// Add closure for the completed pending batch, if any.
- calld->AddClosuresForCompletedPendingBatch(
- elem, batch_data, GRPC_ERROR_REF(error), &closures);
+ call->AddClosuresForCompletedPendingBatch(batch_data, GRPC_ERROR_REF(error),
+ &closures);
// If needed, add a callback to start any replay or pending send ops on
// the subchannel call.
if (!retry_state->completed_recv_trailing_metadata) {
- calld->AddClosuresForReplayOrPendingSendOps(elem, batch_data, retry_state,
- &closures);
+ call->AddClosuresForReplayOrPendingSendOps(batch_data, retry_state,
+ &closures);
}
}
// Track number of pending subchannel send batches and determine if this
// was the last one.
- --calld->num_pending_retriable_subchannel_send_batches_;
+ --call->num_pending_retriable_subchannel_send_batches_;
const bool last_send_batch_complete =
- calld->num_pending_retriable_subchannel_send_batches_ == 0;
+ call->num_pending_retriable_subchannel_send_batches_ == 0;
// Don't need batch_data anymore.
batch_data->Unref();
// Schedule all of the closures identified above.
// Note: This yeilds the call combiner.
- closures.RunClosures(calld->call_combiner_);
+ closures.RunClosures(call->call_combiner_);
// If this was the last subchannel send batch, unref the call stack.
if (last_send_batch_complete) {
- GRPC_CALL_STACK_UNREF(calld->owning_call_, "subchannel_send_batches");
+ GRPC_CALL_STACK_UNREF(call->owning_call_, "subchannel_send_batches");
}
}
@@ -3417,31 +4381,31 @@ void CallData::OnComplete(void* arg, grpc_error* error) {
// subchannel batch construction
//
-void CallData::StartBatchInCallCombiner(void* arg, grpc_error* /*ignored*/) {
+void ChannelData::RetryingCall::StartBatchInCallCombiner(
+ void* arg, grpc_error* /*ignored*/) {
grpc_transport_stream_op_batch* batch =
static_cast<grpc_transport_stream_op_batch*>(arg);
- SubchannelCall* subchannel_call =
- static_cast<SubchannelCall*>(batch->handler_private.extra_arg);
+ auto* lb_call = static_cast<ChannelData::LoadBalancedCall*>(
+ batch->handler_private.extra_arg);
// Note: This will release the call combiner.
- subchannel_call->StartTransportStreamOpBatch(batch);
+ lb_call->StartTransportStreamOpBatch(batch);
}
-void CallData::AddClosureForSubchannelBatch(
- grpc_call_element* elem, grpc_transport_stream_op_batch* batch,
- CallCombinerClosureList* closures) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- batch->handler_private.extra_arg = subchannel_call_.get();
+void ChannelData::RetryingCall::AddClosureForSubchannelBatch(
+ grpc_transport_stream_op_batch* batch, CallCombinerClosureList* closures) {
+ batch->handler_private.extra_arg = lb_call_.get();
GRPC_CLOSURE_INIT(&batch->handler_private.closure, StartBatchInCallCombiner,
batch, grpc_schedule_on_exec_ctx);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: starting subchannel batch: %s", chand,
+ gpr_log(GPR_INFO,
+ "chand=%p retrying_call=%p: starting subchannel batch: %s", chand_,
this, grpc_transport_stream_op_batch_string(batch).c_str());
}
closures->Add(&batch->handler_private.closure, GRPC_ERROR_NONE,
"start_subchannel_batch");
}
-void CallData::AddRetriableSendInitialMetadataOp(
+void ChannelData::RetryingCall::AddRetriableSendInitialMetadataOp(
SubchannelCallRetryState* retry_state,
SubchannelCallBatchData* batch_data) {
// Maps the number of retries to the corresponding metadata value slice.
@@ -3489,14 +4453,14 @@ void CallData::AddRetriableSendInitialMetadataOp(
batch_data->batch.payload->send_initial_metadata.peer_string = peer_string_;
}
-void CallData::AddRetriableSendMessageOp(grpc_call_element* elem,
- SubchannelCallRetryState* retry_state,
- SubchannelCallBatchData* batch_data) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::AddRetriableSendMessageOp(
+ SubchannelCallRetryState* retry_state,
+ SubchannelCallBatchData* batch_data) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: starting calld->send_messages[%" PRIuPTR "]",
- chand, this, retry_state->started_send_message_count);
+ "chand=%p retrying_call=%p: starting calld->send_messages[%" PRIuPTR
+ "]",
+ chand_, this, retry_state->started_send_message_count);
}
ByteStreamCache* cache =
send_messages_[retry_state->started_send_message_count];
@@ -3507,7 +4471,7 @@ void CallData::AddRetriableSendMessageOp(grpc_call_element* elem,
retry_state->send_message.get());
}
-void CallData::AddRetriableSendTrailingMetadataOp(
+void ChannelData::RetryingCall::AddRetriableSendTrailingMetadataOp(
SubchannelCallRetryState* retry_state,
SubchannelCallBatchData* batch_data) {
// We need to make a copy of the metadata batch for each attempt, since
@@ -3525,7 +4489,7 @@ void CallData::AddRetriableSendTrailingMetadataOp(
&retry_state->send_trailing_metadata;
}
-void CallData::AddRetriableRecvInitialMetadataOp(
+void ChannelData::RetryingCall::AddRetriableRecvInitialMetadataOp(
SubchannelCallRetryState* retry_state,
SubchannelCallBatchData* batch_data) {
retry_state->started_recv_initial_metadata = true;
@@ -3542,8 +4506,9 @@ void CallData::AddRetriableRecvInitialMetadataOp(
&retry_state->recv_initial_metadata_ready;
}
-void CallData::AddRetriableRecvMessageOp(SubchannelCallRetryState* retry_state,
- SubchannelCallBatchData* batch_data) {
+void ChannelData::RetryingCall::AddRetriableRecvMessageOp(
+ SubchannelCallRetryState* retry_state,
+ SubchannelCallBatchData* batch_data) {
++retry_state->started_recv_message_count;
batch_data->batch.recv_message = true;
batch_data->batch.payload->recv_message.recv_message =
@@ -3554,7 +4519,7 @@ void CallData::AddRetriableRecvMessageOp(SubchannelCallRetryState* retry_state,
&retry_state->recv_message_ready;
}
-void CallData::AddRetriableRecvTrailingMetadataOp(
+void ChannelData::RetryingCall::AddRetriableRecvTrailingMetadataOp(
SubchannelCallRetryState* retry_state,
SubchannelCallBatchData* batch_data) {
retry_state->started_recv_trailing_metadata = true;
@@ -3570,39 +4535,36 @@ void CallData::AddRetriableRecvTrailingMetadataOp(
batch_data->batch.payload->recv_trailing_metadata
.recv_trailing_metadata_ready =
&retry_state->recv_trailing_metadata_ready;
- MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy(
- &batch_data->batch);
}
-void CallData::StartInternalRecvTrailingMetadata(grpc_call_element* elem) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::RetryingCall::StartInternalRecvTrailingMetadata() {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: call failed but recv_trailing_metadata not "
- "started; starting it internally",
- chand, this);
+ gpr_log(
+ GPR_INFO,
+ "chand=%p retrying_call=%p: call failed but recv_trailing_metadata not "
+ "started; starting it internally",
+ chand_, this);
}
SubchannelCallRetryState* retry_state =
- static_cast<SubchannelCallRetryState*>(subchannel_call_->GetParentData());
+ static_cast<SubchannelCallRetryState*>(lb_call_->GetParentData());
// Create batch_data with 2 refs, since this batch will be unreffed twice:
// once for the recv_trailing_metadata_ready callback when the subchannel
// batch returns, and again when we actually get a recv_trailing_metadata
// op from the surface.
SubchannelCallBatchData* batch_data =
- SubchannelCallBatchData::Create(elem, 2, false /* set_on_complete */);
+ SubchannelCallBatchData::Create(this, 2, false /* set_on_complete */);
AddRetriableRecvTrailingMetadataOp(retry_state, batch_data);
retry_state->recv_trailing_metadata_internal_batch = batch_data;
// Note: This will release the call combiner.
- subchannel_call_->StartTransportStreamOpBatch(&batch_data->batch);
+ lb_call_->StartTransportStreamOpBatch(&batch_data->batch);
}
// If there are any cached send ops that need to be replayed on the
// current subchannel call, creates and returns a new subchannel batch
// to replay those ops. Otherwise, returns nullptr.
-CallData::SubchannelCallBatchData*
-CallData::MaybeCreateSubchannelBatchForReplay(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+ChannelData::RetryingCall::SubchannelCallBatchData*
+ChannelData::RetryingCall::MaybeCreateSubchannelBatchForReplay(
+ SubchannelCallRetryState* retry_state) {
SubchannelCallBatchData* replay_batch_data = nullptr;
// send_initial_metadata.
if (seen_send_initial_metadata_ &&
@@ -3610,12 +4572,12 @@ CallData::MaybeCreateSubchannelBatchForReplay(
!pending_send_initial_metadata_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: replaying previously completed "
+ "chand=%p retrying_call=%p: replaying previously completed "
"send_initial_metadata op",
- chand, this);
+ chand_, this);
}
replay_batch_data =
- SubchannelCallBatchData::Create(elem, 1, true /* set_on_complete */);
+ SubchannelCallBatchData::Create(this, 1, true /* set_on_complete */);
AddRetriableSendInitialMetadataOp(retry_state, replay_batch_data);
}
// send_message.
@@ -3626,15 +4588,15 @@ CallData::MaybeCreateSubchannelBatchForReplay(
!pending_send_message_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: replaying previously completed "
+ "chand=%p retrying_call=%p: replaying previously completed "
"send_message op",
- chand, this);
+ chand_, this);
}
if (replay_batch_data == nullptr) {
replay_batch_data =
- SubchannelCallBatchData::Create(elem, 1, true /* set_on_complete */);
+ SubchannelCallBatchData::Create(this, 1, true /* set_on_complete */);
}
- AddRetriableSendMessageOp(elem, retry_state, replay_batch_data);
+ AddRetriableSendMessageOp(retry_state, replay_batch_data);
}
// send_trailing_metadata.
// Note that we only add this op if we have no more send_message ops
@@ -3646,22 +4608,21 @@ CallData::MaybeCreateSubchannelBatchForReplay(
!pending_send_trailing_metadata_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: replaying previously completed "
+ "chand=%p retrying_call=%p: replaying previously completed "
"send_trailing_metadata op",
- chand, this);
+ chand_, this);
}
if (replay_batch_data == nullptr) {
replay_batch_data =
- SubchannelCallBatchData::Create(elem, 1, true /* set_on_complete */);
+ SubchannelCallBatchData::Create(this, 1, true /* set_on_complete */);
}
AddRetriableSendTrailingMetadataOp(retry_state, replay_batch_data);
}
return replay_batch_data;
}
-void CallData::AddSubchannelBatchesForPendingBatches(
- grpc_call_element* elem, SubchannelCallRetryState* retry_state,
- CallCombinerClosureList* closures) {
+void ChannelData::RetryingCall::AddSubchannelBatchesForPendingBatches(
+ SubchannelCallRetryState* retry_state, CallCombinerClosureList* closures) {
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
PendingBatch* pending = &pending_batches_[i];
grpc_transport_stream_op_batch* batch = pending->batch;
@@ -3727,11 +4688,10 @@ void CallData::AddSubchannelBatchesForPendingBatches(
continue;
}
// If we're not retrying, just send the batch as-is.
- if (method_params_ == nullptr ||
- method_params_->retry_policy() == nullptr || retry_committed_) {
- // TODO(roth) : We should probably call
- // MaybeInjectRecvTrailingMetadataReadyForLoadBalancingPolicy here.
- AddClosureForSubchannelBatch(elem, batch, closures);
+ // TODO(roth): This condition doesn't seem exactly right -- maybe need a
+ // notion of "draining" once we've committed and are done replaying?
+ if (retry_policy_ == nullptr || retry_committed_) {
+ AddClosureForSubchannelBatch(batch, closures);
PendingBatchClear(pending);
continue;
}
@@ -3743,7 +4703,7 @@ void CallData::AddSubchannelBatchesForPendingBatches(
batch->recv_message +
batch->recv_trailing_metadata;
SubchannelCallBatchData* batch_data = SubchannelCallBatchData::Create(
- elem, num_callbacks, has_send_ops /* set_on_complete */);
+ this, num_callbacks, has_send_ops /* set_on_complete */);
// Cache send ops if needed.
MaybeCacheSendOpsForBatch(pending);
// send_initial_metadata.
@@ -3752,7 +4712,7 @@ void CallData::AddSubchannelBatchesForPendingBatches(
}
// send_message.
if (batch->send_message) {
- AddRetriableSendMessageOp(elem, retry_state, batch_data);
+ AddRetriableSendMessageOp(retry_state, batch_data);
}
// send_trailing_metadata.
if (batch->send_trailing_metadata) {
@@ -3772,7 +4732,7 @@ void CallData::AddSubchannelBatchesForPendingBatches(
if (batch->recv_trailing_metadata) {
AddRetriableRecvTrailingMetadataOp(retry_state, batch_data);
}
- AddClosureForSubchannelBatch(elem, &batch_data->batch, closures);
+ AddClosureForSubchannelBatch(&batch_data->batch, closures);
// Track number of pending subchannel send batches.
// If this is the first one, take a ref to the call stack.
if (batch->send_initial_metadata || batch->send_message ||
@@ -3785,238 +4745,608 @@ void CallData::AddSubchannelBatchesForPendingBatches(
}
}
-void CallData::StartRetriableSubchannelBatches(void* arg,
- grpc_error* /*ignored*/) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- CallData* calld = static_cast<CallData*>(elem->call_data);
+void ChannelData::RetryingCall::StartRetriableSubchannelBatches(
+ void* arg, grpc_error* /*ignored*/) {
+ RetryingCall* call = static_cast<RetryingCall*>(arg);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: constructing retriable batches",
- chand, calld);
+ gpr_log(GPR_INFO,
+ "chand=%p retrying_call=%p: constructing retriable batches",
+ call->chand_, call);
}
SubchannelCallRetryState* retry_state =
- static_cast<SubchannelCallRetryState*>(
- calld->subchannel_call_->GetParentData());
+ static_cast<SubchannelCallRetryState*>(call->lb_call_->GetParentData());
// Construct list of closures to execute, one for each pending batch.
CallCombinerClosureList closures;
// Replay previously-returned send_* ops if needed.
SubchannelCallBatchData* replay_batch_data =
- calld->MaybeCreateSubchannelBatchForReplay(elem, retry_state);
+ call->MaybeCreateSubchannelBatchForReplay(retry_state);
if (replay_batch_data != nullptr) {
- calld->AddClosureForSubchannelBatch(elem, &replay_batch_data->batch,
- &closures);
+ call->AddClosureForSubchannelBatch(&replay_batch_data->batch, &closures);
// Track number of pending subchannel send batches.
// If this is the first one, take a ref to the call stack.
- if (calld->num_pending_retriable_subchannel_send_batches_ == 0) {
- GRPC_CALL_STACK_REF(calld->owning_call_, "subchannel_send_batches");
+ if (call->num_pending_retriable_subchannel_send_batches_ == 0) {
+ GRPC_CALL_STACK_REF(call->owning_call_, "subchannel_send_batches");
}
- ++calld->num_pending_retriable_subchannel_send_batches_;
+ ++call->num_pending_retriable_subchannel_send_batches_;
}
// Now add pending batches.
- calld->AddSubchannelBatchesForPendingBatches(elem, retry_state, &closures);
+ call->AddSubchannelBatchesForPendingBatches(retry_state, &closures);
// Start batches on subchannel call.
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
gpr_log(GPR_INFO,
- "chand=%p calld=%p: starting %" PRIuPTR
- " retriable batches on subchannel_call=%p",
- chand, calld, closures.size(), calld->subchannel_call_.get());
+ "chand=%p retrying_call=%p: starting %" PRIuPTR
+ " retriable batches on lb_call=%p",
+ call->chand_, call, closures.size(), call->lb_call_.get());
}
// Note: This will yield the call combiner.
- closures.RunClosures(calld->call_combiner_);
+ closures.RunClosures(call->call_combiner_);
+}
+
+void ChannelData::RetryingCall::CreateLbCall(void* arg, grpc_error* /*error*/) {
+ auto* call = static_cast<RetryingCall*>(arg);
+ const size_t parent_data_size =
+ call->enable_retries_ ? sizeof(SubchannelCallRetryState) : 0;
+ grpc_call_element_args args = {call->owning_call_, nullptr,
+ call->call_context_, call->path_,
+ call->call_start_time_, call->deadline_,
+ call->arena_, call->call_combiner_};
+ call->lb_call_ = ChannelData::LoadBalancedCall::Create(
+ call->chand_, args, call->pollent_, parent_data_size);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO, "chand=%p retrying_call=%p: create lb_call=%p",
+ call->chand_, call, call->lb_call_.get());
+ }
+ if (parent_data_size > 0) {
+ new (call->lb_call_->GetParentData())
+ SubchannelCallRetryState(call->call_context_);
+ }
+ call->PendingBatchesResume();
}
//
-// LB pick
+// ChannelData::LoadBalancedCall::Metadata
//
-void CallData::CreateSubchannelCall(grpc_call_element* elem) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- const size_t parent_data_size =
- enable_retries_ ? sizeof(SubchannelCallRetryState) : 0;
+class ChannelData::LoadBalancedCall::Metadata
+ : public LoadBalancingPolicy::MetadataInterface {
+ public:
+ Metadata(LoadBalancedCall* lb_call, grpc_metadata_batch* batch)
+ : lb_call_(lb_call), batch_(batch) {}
+
+ void Add(y_absl::string_view key, y_absl::string_view value) override {
+ grpc_linked_mdelem* linked_mdelem = static_cast<grpc_linked_mdelem*>(
+ lb_call_->arena_->Alloc(sizeof(grpc_linked_mdelem)));
+ linked_mdelem->md = grpc_mdelem_from_slices(
+ ExternallyManagedSlice(key.data(), key.size()),
+ ExternallyManagedSlice(value.data(), value.size()));
+ GPR_ASSERT(grpc_metadata_batch_link_tail(batch_, linked_mdelem) ==
+ GRPC_ERROR_NONE);
+ }
+
+ iterator begin() const override {
+ static_assert(sizeof(grpc_linked_mdelem*) <= sizeof(intptr_t),
+ "iterator size too large");
+ return iterator(
+ this, reinterpret_cast<intptr_t>(MaybeSkipEntry(batch_->list.head)));
+ }
+ iterator end() const override {
+ static_assert(sizeof(grpc_linked_mdelem*) <= sizeof(intptr_t),
+ "iterator size too large");
+ return iterator(this, 0);
+ }
+
+ iterator erase(iterator it) override {
+ grpc_linked_mdelem* linked_mdelem =
+ reinterpret_cast<grpc_linked_mdelem*>(GetIteratorHandle(it));
+ intptr_t handle = reinterpret_cast<intptr_t>(linked_mdelem->next);
+ grpc_metadata_batch_remove(batch_, linked_mdelem);
+ return iterator(this, handle);
+ }
+
+ private:
+ grpc_linked_mdelem* MaybeSkipEntry(grpc_linked_mdelem* entry) const {
+ if (entry != nullptr && batch_->idx.named.path == entry) {
+ return entry->next;
+ }
+ return entry;
+ }
+
+ intptr_t IteratorHandleNext(intptr_t handle) const override {
+ grpc_linked_mdelem* linked_mdelem =
+ reinterpret_cast<grpc_linked_mdelem*>(handle);
+ return reinterpret_cast<intptr_t>(MaybeSkipEntry(linked_mdelem->next));
+ }
+
+ std::pair<y_absl::string_view, y_absl::string_view> IteratorHandleGet(
+ intptr_t handle) const override {
+ grpc_linked_mdelem* linked_mdelem =
+ reinterpret_cast<grpc_linked_mdelem*>(handle);
+ return std::make_pair(StringViewFromSlice(GRPC_MDKEY(linked_mdelem->md)),
+ StringViewFromSlice(GRPC_MDVALUE(linked_mdelem->md)));
+ }
+
+ LoadBalancedCall* lb_call_;
+ grpc_metadata_batch* batch_;
+};
+
+//
+// ChannelData::LoadBalancedCall::LbCallState
+//
+
+class ChannelData::LoadBalancedCall::LbCallState
+ : public LoadBalancingPolicy::CallState {
+ public:
+ explicit LbCallState(LoadBalancedCall* lb_call) : lb_call_(lb_call) {}
+
+ void* Alloc(size_t size) override { return lb_call_->arena_->Alloc(size); }
+
+ const LoadBalancingPolicy::BackendMetricData* GetBackendMetricData()
+ override {
+ if (lb_call_->backend_metric_data_ == nullptr) {
+ grpc_linked_mdelem* md = lb_call_->recv_trailing_metadata_->idx.named
+ .x_endpoint_load_metrics_bin;
+ if (md != nullptr) {
+ lb_call_->backend_metric_data_ =
+ ParseBackendMetricData(GRPC_MDVALUE(md->md), lb_call_->arena_);
+ }
+ }
+ return lb_call_->backend_metric_data_;
+ }
+
+ y_absl::string_view ExperimentalGetCallAttribute(const char* key) override {
+ auto* service_config_call_data = static_cast<ServiceConfigCallData*>(
+ lb_call_->call_context_[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value);
+ auto& call_attributes = service_config_call_data->call_attributes();
+ auto it = call_attributes.find(key);
+ if (it == call_attributes.end()) return y_absl::string_view();
+ return it->second;
+ }
+
+ private:
+ LoadBalancedCall* lb_call_;
+};
+
+//
+// LoadBalancedCall
+//
+
+RefCountedPtr<ChannelData::LoadBalancedCall>
+ChannelData::LoadBalancedCall::Create(ChannelData* chand,
+ const grpc_call_element_args& args,
+ grpc_polling_entity* pollent,
+ size_t parent_data_size) {
+ const size_t alloc_size =
+ parent_data_size > 0
+ ? (GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(LoadBalancedCall)) +
+ parent_data_size)
+ : sizeof(LoadBalancedCall);
+ auto* lb_call = static_cast<LoadBalancedCall*>(args.arena->Alloc(alloc_size));
+ new (lb_call) LoadBalancedCall(chand, args, pollent);
+ return lb_call;
+}
+
+ChannelData::LoadBalancedCall::LoadBalancedCall(
+ ChannelData* chand, const grpc_call_element_args& args,
+ grpc_polling_entity* pollent)
+ : refs_(1, GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)
+ ? "LoadBalancedCall"
+ : nullptr),
+ chand_(chand),
+ path_(grpc_slice_ref_internal(args.path)),
+ call_start_time_(args.start_time),
+ deadline_(args.deadline),
+ arena_(args.arena),
+ owning_call_(args.call_stack),
+ call_combiner_(args.call_combiner),
+ call_context_(args.context),
+ pollent_(pollent) {}
+
+ChannelData::LoadBalancedCall::~LoadBalancedCall() {
+ grpc_slice_unref_internal(path_);
+ GRPC_ERROR_UNREF(cancel_error_);
+ if (backend_metric_data_ != nullptr) {
+ backend_metric_data_
+ ->LoadBalancingPolicy::BackendMetricData::~BackendMetricData();
+ }
+ // Make sure there are no remaining pending batches.
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ GPR_ASSERT(pending_batches_[i] == nullptr);
+ }
+}
+
+RefCountedPtr<ChannelData::LoadBalancedCall>
+ChannelData::LoadBalancedCall::Ref() {
+ IncrementRefCount();
+ return RefCountedPtr<LoadBalancedCall>(this);
+}
+
+RefCountedPtr<ChannelData::LoadBalancedCall> ChannelData::LoadBalancedCall::Ref(
+ const DebugLocation& location, const char* reason) {
+ IncrementRefCount(location, reason);
+ return RefCountedPtr<LoadBalancedCall>(this);
+}
+
+void ChannelData::LoadBalancedCall::Unref() {
+ if (GPR_UNLIKELY(refs_.Unref())) {
+ this->~LoadBalancedCall();
+ }
+}
+
+void ChannelData::LoadBalancedCall::Unref(const DebugLocation& location,
+ const char* reason) {
+ if (GPR_UNLIKELY(refs_.Unref(location, reason))) {
+ this->~LoadBalancedCall();
+ }
+}
+
+void ChannelData::LoadBalancedCall::IncrementRefCount() { refs_.Ref(); }
+
+void ChannelData::LoadBalancedCall::IncrementRefCount(
+ const DebugLocation& location, const char* reason) {
+ refs_.Ref(location, reason);
+}
+
+void* ChannelData::LoadBalancedCall::GetParentData() {
+ return reinterpret_cast<char*>(this) +
+ GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(LoadBalancedCall));
+}
+
+size_t ChannelData::LoadBalancedCall::GetBatchIndex(
+ grpc_transport_stream_op_batch* batch) {
+ // Note: It is important the send_initial_metadata be the first entry
+ // here, since the code in pick_subchannel_locked() assumes it will be.
+ if (batch->send_initial_metadata) return 0;
+ if (batch->send_message) return 1;
+ if (batch->send_trailing_metadata) return 2;
+ if (batch->recv_initial_metadata) return 3;
+ if (batch->recv_message) return 4;
+ if (batch->recv_trailing_metadata) return 5;
+ GPR_UNREACHABLE_CODE(return (size_t)-1);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::LoadBalancedCall::PendingBatchesAdd(
+ grpc_transport_stream_op_batch* batch) {
+ const size_t idx = GetBatchIndex(batch);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: adding pending batch at index %" PRIuPTR,
+ chand_, this, idx);
+ }
+ GPR_ASSERT(pending_batches_[idx] == nullptr);
+ pending_batches_[idx] = batch;
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::LoadBalancedCall::FailPendingBatchInCallCombiner(
+ void* arg, grpc_error* error) {
+ grpc_transport_stream_op_batch* batch =
+ static_cast<grpc_transport_stream_op_batch*>(arg);
+ auto* self = static_cast<LoadBalancedCall*>(batch->handler_private.extra_arg);
+ // Note: This will release the call combiner.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(error), self->call_combiner_);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::LoadBalancedCall::PendingBatchesFail(
+ grpc_error* error,
+ YieldCallCombinerPredicate yield_call_combiner_predicate) {
+ GPR_ASSERT(error != GRPC_ERROR_NONE);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ size_t num_batches = 0;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ if (pending_batches_[i] != nullptr) ++num_batches;
+ }
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: failing %" PRIuPTR " pending batches: %s",
+ chand_, this, num_batches, grpc_error_string(error));
+ }
+ CallCombinerClosureList closures;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ grpc_transport_stream_op_batch*& batch = pending_batches_[i];
+ if (batch != nullptr) {
+ batch->handler_private.extra_arg = this;
+ GRPC_CLOSURE_INIT(&batch->handler_private.closure,
+ FailPendingBatchInCallCombiner, batch,
+ grpc_schedule_on_exec_ctx);
+ closures.Add(&batch->handler_private.closure, GRPC_ERROR_REF(error),
+ "PendingBatchesFail");
+ batch = nullptr;
+ }
+ }
+ if (yield_call_combiner_predicate(closures)) {
+ closures.RunClosures(call_combiner_);
+ } else {
+ closures.RunClosuresWithoutYielding(call_combiner_);
+ }
+ GRPC_ERROR_UNREF(error);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::LoadBalancedCall::ResumePendingBatchInCallCombiner(
+ void* arg, grpc_error* /*ignored*/) {
+ grpc_transport_stream_op_batch* batch =
+ static_cast<grpc_transport_stream_op_batch*>(arg);
+ SubchannelCall* subchannel_call =
+ static_cast<SubchannelCall*>(batch->handler_private.extra_arg);
+ // Note: This will release the call combiner.
+ subchannel_call->StartTransportStreamOpBatch(batch);
+}
+
+// This is called via the call combiner, so access to calld is synchronized.
+void ChannelData::LoadBalancedCall::PendingBatchesResume() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ size_t num_batches = 0;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ if (pending_batches_[i] != nullptr) ++num_batches;
+ }
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: starting %" PRIuPTR
+ " pending batches on subchannel_call=%p",
+ chand_, this, num_batches, subchannel_call_.get());
+ }
+ CallCombinerClosureList closures;
+ for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
+ grpc_transport_stream_op_batch*& batch = pending_batches_[i];
+ if (batch != nullptr) {
+ batch->handler_private.extra_arg = subchannel_call_.get();
+ GRPC_CLOSURE_INIT(&batch->handler_private.closure,
+ ResumePendingBatchInCallCombiner, batch,
+ grpc_schedule_on_exec_ctx);
+ closures.Add(&batch->handler_private.closure, GRPC_ERROR_NONE,
+ "PendingBatchesResume");
+ batch = nullptr;
+ }
+ }
+ // Note: This will release the call combiner.
+ closures.RunClosures(call_combiner_);
+}
+
+void ChannelData::LoadBalancedCall::StartTransportStreamOpBatch(
+ grpc_transport_stream_op_batch* batch) {
+ // Intercept recv_trailing_metadata_ready for LB callback.
+ if (batch->recv_trailing_metadata) {
+ InjectRecvTrailingMetadataReadyForLoadBalancingPolicy(batch);
+ }
+ // If we've previously been cancelled, immediately fail any new batches.
+ if (GPR_UNLIKELY(cancel_error_ != GRPC_ERROR_NONE)) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO, "chand=%p lb_call=%p: failing batch with error: %s",
+ chand_, this, grpc_error_string(cancel_error_));
+ }
+ // Note: This will release the call combiner.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(cancel_error_), call_combiner_);
+ return;
+ }
+ // Handle cancellation.
+ if (GPR_UNLIKELY(batch->cancel_stream)) {
+ // Stash a copy of cancel_error in our call data, so that we can use
+ // it for subsequent operations. This ensures that if the call is
+ // cancelled before any batches are passed down (e.g., if the deadline
+ // is in the past when the call starts), we can return the right
+ // error to the caller when the first batch does get passed down.
+ GRPC_ERROR_UNREF(cancel_error_);
+ cancel_error_ = GRPC_ERROR_REF(batch->payload->cancel_stream.cancel_error);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO, "chand=%p lb_call=%p: recording cancel_error=%s",
+ chand_, this, grpc_error_string(cancel_error_));
+ }
+ // If we do not have a subchannel call (i.e., a pick has not yet
+ // been started), fail all pending batches. Otherwise, send the
+ // cancellation down to the subchannel call.
+ if (subchannel_call_ == nullptr) {
+ PendingBatchesFail(GRPC_ERROR_REF(cancel_error_), NoYieldCallCombiner);
+ // Note: This will release the call combiner.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(cancel_error_), call_combiner_);
+ } else {
+ // Note: This will release the call combiner.
+ subchannel_call_->StartTransportStreamOpBatch(batch);
+ }
+ return;
+ }
+ // Add the batch to the pending list.
+ PendingBatchesAdd(batch);
+ // Check if we've already gotten a subchannel call.
+ // Note that once we have picked a subchannel, we do not need to acquire
+ // the channel's data plane mutex, which is more efficient (especially for
+ // streaming calls).
+ if (subchannel_call_ != nullptr) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: starting batch on subchannel_call=%p",
+ chand_, this, subchannel_call_.get());
+ }
+ PendingBatchesResume();
+ return;
+ }
+ // We do not yet have a subchannel call.
+ // For batches containing a send_initial_metadata op, acquire the
+ // channel's data plane mutex to pick a subchannel.
+ if (GPR_LIKELY(batch->send_initial_metadata)) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: grabbing data plane mutex to perform pick",
+ chand_, this);
+ }
+ PickSubchannel(this, GRPC_ERROR_NONE);
+ } else {
+ // For all other batches, release the call combiner.
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_call_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: saved batch, yielding call combiner",
+ chand_, this);
+ }
+ GRPC_CALL_COMBINER_STOP(call_combiner_,
+ "batch does not include send_initial_metadata");
+ }
+}
+
+void ChannelData::LoadBalancedCall::
+ RecvTrailingMetadataReadyForLoadBalancingPolicy(void* arg,
+ grpc_error* error) {
+ auto* self = static_cast<LoadBalancedCall*>(arg);
+ if (self->lb_recv_trailing_metadata_ready_ != nullptr) {
+ // Set error if call did not succeed.
+ grpc_error* error_for_lb = GRPC_ERROR_NONE;
+ if (error != GRPC_ERROR_NONE) {
+ error_for_lb = error;
+ } else {
+ const auto& fields = self->recv_trailing_metadata_->idx.named;
+ GPR_ASSERT(fields.grpc_status != nullptr);
+ grpc_status_code status =
+ grpc_get_status_code_from_metadata(fields.grpc_status->md);
+ TString msg;
+ if (status != GRPC_STATUS_OK) {
+ error_for_lb = grpc_error_set_int(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("call failed"),
+ GRPC_ERROR_INT_GRPC_STATUS, status);
+ if (fields.grpc_message != nullptr) {
+ error_for_lb = grpc_error_set_str(
+ error_for_lb, GRPC_ERROR_STR_GRPC_MESSAGE,
+ grpc_slice_ref_internal(GRPC_MDVALUE(fields.grpc_message->md)));
+ }
+ }
+ }
+ // Invoke callback to LB policy.
+ Metadata trailing_metadata(self, self->recv_trailing_metadata_);
+ LbCallState lb_call_state(self);
+ self->lb_recv_trailing_metadata_ready_(error_for_lb, &trailing_metadata,
+ &lb_call_state);
+ if (error == GRPC_ERROR_NONE) GRPC_ERROR_UNREF(error_for_lb);
+ }
+ // Chain to original callback.
+ Closure::Run(DEBUG_LOCATION, self->original_recv_trailing_metadata_ready_,
+ GRPC_ERROR_REF(error));
+}
+
+// TODO(roth): Consider not intercepting this callback unless we
+// actually need to, if this causes a performance problem.
+void ChannelData::LoadBalancedCall::
+ InjectRecvTrailingMetadataReadyForLoadBalancingPolicy(
+ grpc_transport_stream_op_batch* batch) {
+ recv_trailing_metadata_ =
+ batch->payload->recv_trailing_metadata.recv_trailing_metadata;
+ original_recv_trailing_metadata_ready_ =
+ batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready;
+ GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_,
+ RecvTrailingMetadataReadyForLoadBalancingPolicy, this,
+ grpc_schedule_on_exec_ctx);
+ batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready =
+ &recv_trailing_metadata_ready_;
+}
+
+void ChannelData::LoadBalancedCall::CreateSubchannelCall() {
SubchannelCall::Args call_args = {
std::move(connected_subchannel_), pollent_, path_, call_start_time_,
deadline_, arena_,
// TODO(roth): When we implement hedging support, we will probably
// need to use a separate call context for each subchannel call.
- call_context_, call_combiner_, parent_data_size};
+ call_context_, call_combiner_};
grpc_error* error = GRPC_ERROR_NONE;
subchannel_call_ = SubchannelCall::Create(std::move(call_args), &error);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: create subchannel_call=%p: error=%s",
- chand, this, subchannel_call_.get(), grpc_error_string(error));
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: create subchannel_call=%p: error=%s", chand_,
+ this, subchannel_call_.get(), grpc_error_string(error));
}
if (GPR_UNLIKELY(error != GRPC_ERROR_NONE)) {
- PendingBatchesFail(elem, error, YieldCallCombiner);
+ PendingBatchesFail(error, YieldCallCombiner);
} else {
- if (parent_data_size > 0) {
- new (subchannel_call_->GetParentData())
- SubchannelCallRetryState(call_context_);
- }
- PendingBatchesResume(elem);
- }
-}
-
-void CallData::AsyncPickDone(grpc_call_element* elem, grpc_error* error) {
- GRPC_CLOSURE_INIT(&pick_closure_, PickDone, elem, grpc_schedule_on_exec_ctx);
- ExecCtx::Run(DEBUG_LOCATION, &pick_closure_, error);
-}
-
-void CallData::PickDone(void* arg, grpc_error* error) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- CallData* calld = static_cast<CallData*>(elem->call_data);
- if (error != GRPC_ERROR_NONE) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: failed to pick subchannel: error=%s", chand,
- calld, grpc_error_string(error));
- }
- calld->PendingBatchesFail(elem, GRPC_ERROR_REF(error), YieldCallCombiner);
- return;
+ PendingBatchesResume();
}
- calld->CreateSubchannelCall(elem);
}
// A class to handle the call combiner cancellation callback for a
// queued pick.
-class CallData::QueuedPickCanceller {
+// TODO(roth): When we implement hedging support, we won't be able to
+// register a call combiner cancellation closure for each LB pick,
+// because there may be multiple LB picks happening in parallel.
+// Instead, we will probably need to maintain a list in the CallData
+// object of pending LB picks to be cancelled when the closure runs.
+class ChannelData::LoadBalancedCall::LbQueuedCallCanceller {
public:
- explicit QueuedPickCanceller(grpc_call_element* elem) : elem_(elem) {
- auto* calld = static_cast<CallData*>(elem->call_data);
- GRPC_CALL_STACK_REF(calld->owning_call_, "QueuedPickCanceller");
- GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this,
- grpc_schedule_on_exec_ctx);
- calld->call_combiner_->SetNotifyOnCancel(&closure_);
+ explicit LbQueuedCallCanceller(RefCountedPtr<LoadBalancedCall> lb_call)
+ : lb_call_(std::move(lb_call)) {
+ GRPC_CALL_STACK_REF(lb_call_->owning_call_, "LbQueuedCallCanceller");
+ GRPC_CLOSURE_INIT(&closure_, &CancelLocked, this, nullptr);
+ lb_call_->call_combiner_->SetNotifyOnCancel(&closure_);
}
private:
static void CancelLocked(void* arg, grpc_error* error) {
- auto* self = static_cast<QueuedPickCanceller*>(arg);
- auto* chand = static_cast<ChannelData*>(self->elem_->channel_data);
- auto* calld = static_cast<CallData*>(self->elem_->call_data);
- MutexLock lock(chand->data_plane_mu());
- if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: cancelling queued pick: "
- "error=%s self=%p calld->pick_canceller=%p",
- chand, calld, grpc_error_string(error), self,
- calld->pick_canceller_);
- }
- if (calld->pick_canceller_ == self && error != GRPC_ERROR_NONE) {
- // Remove pick from list of queued picks.
- calld->MaybeInvokeConfigSelectorCommitCallback();
- calld->MaybeRemoveCallFromQueuedPicksLocked(self->elem_);
- // Fail pending batches on the call.
- calld->PendingBatchesFail(self->elem_, GRPC_ERROR_REF(error),
- YieldCallCombinerIfPendingBatchesFound);
- }
- GRPC_CALL_STACK_UNREF(calld->owning_call_, "QueuedPickCanceller");
+ auto* self = static_cast<LbQueuedCallCanceller*>(arg);
+ auto* lb_call = self->lb_call_.get();
+ auto* chand = lb_call->chand_;
+ {
+ MutexLock lock(&chand->data_plane_mu_);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: cancelling queued pick: "
+ "error=%s self=%p calld->pick_canceller=%p",
+ chand, lb_call, grpc_error_string(error), self,
+ lb_call->lb_call_canceller_);
+ }
+ if (lb_call->lb_call_canceller_ == self && error != GRPC_ERROR_NONE) {
+ // Remove pick from list of queued picks.
+ lb_call->MaybeRemoveCallFromLbQueuedCallsLocked();
+ // Fail pending batches on the call.
+ lb_call->PendingBatchesFail(GRPC_ERROR_REF(error),
+ YieldCallCombinerIfPendingBatchesFound);
+ }
+ }
+ GRPC_CALL_STACK_UNREF(lb_call->owning_call_, "LbQueuedCallCanceller");
delete self;
}
- grpc_call_element* elem_;
+ RefCountedPtr<LoadBalancedCall> lb_call_;
grpc_closure closure_;
};
-void CallData::MaybeRemoveCallFromQueuedPicksLocked(grpc_call_element* elem) {
- if (!pick_queued_) return;
- auto* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::LoadBalancedCall::MaybeRemoveCallFromLbQueuedCallsLocked() {
+ if (!queued_pending_lb_pick_) return;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: removing from queued picks list",
- chand, this);
+ gpr_log(GPR_INFO, "chand=%p lb_call=%p: removing from queued picks list",
+ chand_, this);
}
- chand->RemoveQueuedPick(&pick_, pollent_);
- pick_queued_ = false;
+ chand_->RemoveLbQueuedCall(&queued_call_, pollent_);
+ queued_pending_lb_pick_ = false;
// Lame the call combiner canceller.
- pick_canceller_ = nullptr;
+ lb_call_canceller_ = nullptr;
}
-void CallData::MaybeAddCallToQueuedPicksLocked(grpc_call_element* elem) {
- if (pick_queued_) return;
- auto* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::LoadBalancedCall::MaybeAddCallToLbQueuedCallsLocked() {
+ if (queued_pending_lb_pick_) return;
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: adding to queued picks list", chand,
- this);
+ gpr_log(GPR_INFO, "chand=%p lb_call=%p: adding to queued picks list",
+ chand_, this);
}
- pick_queued_ = true;
- pick_.elem = elem;
- chand->AddQueuedPick(&pick_, pollent_);
+ queued_pending_lb_pick_ = true;
+ queued_call_.lb_call = this;
+ chand_->AddLbQueuedCall(&queued_call_, pollent_);
// Register call combiner cancellation callback.
- pick_canceller_ = new QueuedPickCanceller(elem);
+ lb_call_canceller_ = new LbQueuedCallCanceller(Ref());
}
-grpc_error* CallData::ApplyServiceConfigToCallLocked(
- grpc_call_element* elem, grpc_metadata_batch* initial_metadata) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO, "chand=%p calld=%p: applying service config to call",
- chand, this);
- }
- ConfigSelector* config_selector = chand->config_selector();
- if (config_selector != nullptr) {
- // Use the ConfigSelector to determine the config for the call.
- ConfigSelector::CallConfig call_config =
- config_selector->GetCallConfig({&path_, initial_metadata, arena_});
- if (call_config.error != GRPC_ERROR_NONE) return call_config.error;
- call_attributes_ = std::move(call_config.call_attributes);
- on_call_committed_ = std::move(call_config.on_call_committed);
- // Create a ServiceConfigCallData for the call. This stores a ref to the
- // ServiceConfig and caches the right set of parsed configs to use for
- // the call. The MethodConfig will store itself in the call context,
- // so that it can be accessed by filters in the subchannel, and it
- // will be cleaned up when the call ends.
- auto* service_config_call_data = arena_->New<ServiceConfigCallData>(
- std::move(call_config.service_config), call_config.method_configs,
- call_context_);
- // Apply our own method params to the call.
- method_params_ = static_cast<ClientChannelMethodParsedConfig*>(
- service_config_call_data->GetMethodParsedConfig(
- internal::ClientChannelServiceConfigParser::ParserIndex()));
- if (method_params_ != nullptr) {
- // If the deadline from the service config is shorter than the one
- // from the client API, reset the deadline timer.
- if (chand->deadline_checking_enabled() &&
- method_params_->timeout() != 0) {
- const grpc_millis per_method_deadline =
- grpc_cycle_counter_to_millis_round_up(call_start_time_) +
- method_params_->timeout();
- if (per_method_deadline < deadline_) {
- deadline_ = per_method_deadline;
- grpc_deadline_state_reset(elem, deadline_);
- }
- }
- // If the service config set wait_for_ready and the application
- // did not explicitly set it, use the value from the service config.
- uint32_t* send_initial_metadata_flags =
- &pending_batches_[0]
- .batch->payload->send_initial_metadata
- .send_initial_metadata_flags;
- if (method_params_->wait_for_ready().has_value() &&
- !(*send_initial_metadata_flags &
- GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET)) {
- if (method_params_->wait_for_ready().value()) {
- *send_initial_metadata_flags |= GRPC_INITIAL_METADATA_WAIT_FOR_READY;
- } else {
- *send_initial_metadata_flags &= ~GRPC_INITIAL_METADATA_WAIT_FOR_READY;
- }
- }
- }
- // Set retry throttle data for call.
- retry_throttle_data_ = chand->retry_throttle_data();
- }
- // If no retry policy, disable retries.
- // TODO(roth): Remove this when adding support for transparent retries.
- if (method_params_ == nullptr || method_params_->retry_policy() == nullptr) {
- enable_retries_ = false;
- }
- return GRPC_ERROR_NONE;
+void ChannelData::LoadBalancedCall::AsyncPickDone(grpc_error* error) {
+ GRPC_CLOSURE_INIT(&pick_closure_, PickDone, this, grpc_schedule_on_exec_ctx);
+ ExecCtx::Run(DEBUG_LOCATION, &pick_closure_, error);
}
-void CallData::MaybeInvokeConfigSelectorCommitCallback() {
- if (on_call_committed_ != nullptr) {
- on_call_committed_();
- on_call_committed_ = nullptr;
+void ChannelData::LoadBalancedCall::PickDone(void* arg, grpc_error* error) {
+ auto* self = static_cast<LoadBalancedCall*>(arg);
+ if (error != GRPC_ERROR_NONE) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p lb_call=%p: failed to pick subchannel: error=%s",
+ self->chand_, self, grpc_error_string(error));
+ }
+ self->PendingBatchesFail(GRPC_ERROR_REF(error), YieldCallCombiner);
+ return;
}
+ self->CreateSubchannelCall();
}
const char* PickResultTypeName(
@@ -4032,120 +5362,52 @@ const char* PickResultTypeName(
GPR_UNREACHABLE_CODE(return "UNKNOWN");
}
-void CallData::PickSubchannel(void* arg, grpc_error* error) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
- CallData* calld = static_cast<CallData*>(elem->call_data);
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+void ChannelData::LoadBalancedCall::PickSubchannel(void* arg,
+ grpc_error* error) {
+ auto* self = static_cast<LoadBalancedCall*>(arg);
bool pick_complete;
{
- MutexLock lock(chand->data_plane_mu());
- pick_complete = calld->PickSubchannelLocked(elem, &error);
+ MutexLock lock(&self->chand_->data_plane_mu_);
+ pick_complete = self->PickSubchannelLocked(&error);
}
if (pick_complete) {
- PickDone(elem, error);
+ PickDone(self, error);
GRPC_ERROR_UNREF(error);
}
}
-bool CallData::PickSubchannelLocked(grpc_call_element* elem,
- grpc_error** error) {
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
+bool ChannelData::LoadBalancedCall::PickSubchannelLocked(grpc_error** error) {
GPR_ASSERT(connected_subchannel_ == nullptr);
GPR_ASSERT(subchannel_call_ == nullptr);
- // The picker being null means that the channel is currently in IDLE state.
- // The incoming call will make the channel exit IDLE.
- if (chand->picker() == nullptr) {
- GRPC_CHANNEL_STACK_REF(chand->owning_stack(), "PickSubchannelLocked");
- // Bounce into the control plane work serializer to exit IDLE. Since we are
- // holding on to the data plane mutex here, we offload it on the ExecCtx so
- // that we don't deadlock with ourselves.
- ExecCtx::Run(
- DEBUG_LOCATION,
- GRPC_CLOSURE_CREATE(
- [](void* arg, grpc_error* /*error*/) {
- auto* chand = static_cast<ChannelData*>(arg);
- chand->work_serializer()->Run(
- [chand]() {
- chand->CheckConnectivityState(/*try_to_connect=*/true);
- GRPC_CHANNEL_STACK_UNREF(chand->owning_stack(),
- "PickSubchannelLocked");
- },
- DEBUG_LOCATION);
- },
- chand, nullptr),
- GRPC_ERROR_NONE);
- // Queue the pick, so that it will be attempted once the channel
- // becomes connected.
- MaybeAddCallToQueuedPicksLocked(elem);
- return false;
- }
+ // Grab initial metadata.
+ auto& send_initial_metadata =
+ pending_batches_[0]->payload->send_initial_metadata;
grpc_metadata_batch* initial_metadata_batch =
- seen_send_initial_metadata_
- ? &send_initial_metadata_
- : pending_batches_[0]
- .batch->payload->send_initial_metadata.send_initial_metadata;
- // Grab initial metadata flags so that we can check later if the call has
- // wait_for_ready enabled.
+ send_initial_metadata.send_initial_metadata;
const uint32_t send_initial_metadata_flags =
- seen_send_initial_metadata_ ? send_initial_metadata_flags_
- : pending_batches_[0]
- .batch->payload->send_initial_metadata
- .send_initial_metadata_flags;
- // Avoid picking if we haven't yet received service config data.
- if (GPR_UNLIKELY(!chand->received_service_config_data())) {
- // If the resolver returned transient failure before returning the
- // first service config, fail any non-wait_for_ready calls.
- grpc_error* resolver_error = chand->resolver_transient_failure_error();
- if (resolver_error != GRPC_ERROR_NONE &&
- (send_initial_metadata_flags & GRPC_INITIAL_METADATA_WAIT_FOR_READY) ==
- 0) {
- MaybeRemoveCallFromQueuedPicksLocked(elem);
- *error = GRPC_ERROR_REF(resolver_error);
- return true;
- }
- // Either the resolver has not yet returned a result, or it has
- // returned transient failure but the call is wait_for_ready. In
- // either case, queue the call.
- MaybeAddCallToQueuedPicksLocked(elem);
- return false;
- }
- // Apply service config to call if not yet applied.
- if (GPR_LIKELY(!service_config_applied_)) {
- service_config_applied_ = true;
- *error = ApplyServiceConfigToCallLocked(elem, initial_metadata_batch);
- if (*error != GRPC_ERROR_NONE) return true;
- }
- // If this is a retry, use the send_initial_metadata payload that
- // we've cached; otherwise, use the pending batch. The
- // send_initial_metadata batch will be the first pending batch in the
- // list, as set by GetBatchIndex() above.
- // TODO(roth): What if the LB policy needs to add something to the
- // call's initial metadata, and then there's a retry? We don't want
- // the new metadata to be added twice. We might need to somehow
- // allocate the subchannel batch earlier so that we can give the
- // subchannel's copy of the metadata batch (which is copied for each
- // attempt) to the LB policy instead the one from the parent channel.
+ send_initial_metadata.send_initial_metadata_flags;
+ // Perform LB pick.
LoadBalancingPolicy::PickArgs pick_args;
pick_args.path = StringViewFromSlice(path_);
- pick_args.call_state = &lb_call_state_;
+ LbCallState lb_call_state(this);
+ pick_args.call_state = &lb_call_state;
Metadata initial_metadata(this, initial_metadata_batch);
pick_args.initial_metadata = &initial_metadata;
- // Attempt pick.
- auto result = chand->picker()->Pick(pick_args);
+ auto result = chand_->picker_->Pick(pick_args);
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
- gpr_log(GPR_INFO,
- "chand=%p calld=%p: LB pick returned %s (subchannel=%p, error=%s)",
- chand, this, PickResultTypeName(result.type),
- result.subchannel.get(), grpc_error_string(result.error));
+ gpr_log(
+ GPR_INFO,
+ "chand=%p lb_call=%p: LB pick returned %s (subchannel=%p, error=%s)",
+ chand_, this, PickResultTypeName(result.type), result.subchannel.get(),
+ grpc_error_string(result.error));
}
switch (result.type) {
case LoadBalancingPolicy::PickResult::PICK_FAILED: {
// If we're shutting down, fail all RPCs.
- grpc_error* disconnect_error = chand->disconnect_error();
+ grpc_error* disconnect_error = chand_->disconnect_error();
if (disconnect_error != GRPC_ERROR_NONE) {
GRPC_ERROR_UNREF(result.error);
- MaybeRemoveCallFromQueuedPicksLocked(elem);
- MaybeInvokeConfigSelectorCommitCallback();
+ MaybeRemoveCallFromLbQueuedCallsLocked();
*error = GRPC_ERROR_REF(disconnect_error);
return true;
}
@@ -4153,23 +5415,13 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem,
// attempt's final status.
if ((send_initial_metadata_flags &
GRPC_INITIAL_METADATA_WAIT_FOR_READY) == 0) {
- // Retry if appropriate; otherwise, fail.
- grpc_status_code status = GRPC_STATUS_OK;
- grpc_error_get_status(result.error, deadline_, &status, nullptr,
- nullptr, nullptr);
- const bool retried = enable_retries_ &&
- MaybeRetry(elem, nullptr /* batch_data */, status,
- nullptr /* server_pushback_md */);
- if (!retried) {
- grpc_error* new_error =
- GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "Failed to pick subchannel", &result.error, 1);
- GRPC_ERROR_UNREF(result.error);
- *error = new_error;
- MaybeInvokeConfigSelectorCommitCallback();
- }
- MaybeRemoveCallFromQueuedPicksLocked(elem);
- return !retried;
+ grpc_error* new_error =
+ GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Failed to pick subchannel", &result.error, 1);
+ GRPC_ERROR_UNREF(result.error);
+ *error = new_error;
+ MaybeRemoveCallFromLbQueuedCallsLocked();
+ return true;
}
// If wait_for_ready is true, then queue to retry when we get a new
// picker.
@@ -4177,26 +5429,22 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem,
}
// Fallthrough
case LoadBalancingPolicy::PickResult::PICK_QUEUE:
- MaybeAddCallToQueuedPicksLocked(elem);
+ MaybeAddCallToLbQueuedCallsLocked();
return false;
default: // PICK_COMPLETE
- MaybeRemoveCallFromQueuedPicksLocked(elem);
+ MaybeRemoveCallFromLbQueuedCallsLocked();
// Handle drops.
if (GPR_UNLIKELY(result.subchannel == nullptr)) {
result.error = grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Call dropped by load balancing policy"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE);
- MaybeInvokeConfigSelectorCommitCallback();
} else {
// Grab a ref to the connected subchannel while we're still
// holding the data plane mutex.
connected_subchannel_ =
- chand->GetConnectedSubchannelInDataPlane(result.subchannel.get());
+ chand_->GetConnectedSubchannelInDataPlane(result.subchannel.get());
GPR_ASSERT(connected_subchannel_ != nullptr);
- if (!enable_retries_ || retry_committed_) {
- MaybeInvokeConfigSelectorCommitCallback();
- }
}
lb_recv_trailing_metadata_ready_ = result.recv_trailing_metadata_ready;
*error = result.error;
@@ -4211,16 +5459,15 @@ bool CallData::PickSubchannelLocked(grpc_call_element* elem,
* EXPORTED SYMBOLS
*/
-using grpc_core::CallData;
using grpc_core::ChannelData;
const grpc_channel_filter grpc_client_channel_filter = {
- CallData::StartTransportStreamOpBatch,
+ ChannelData::CallData::StartTransportStreamOpBatch,
ChannelData::StartTransportOp,
- sizeof(CallData),
- CallData::Init,
- CallData::SetPollent,
- CallData::Destroy,
+ sizeof(ChannelData::CallData),
+ ChannelData::CallData::Init,
+ ChannelData::CallData::SetPollent,
+ ChannelData::CallData::Destroy,
sizeof(ChannelData),
ChannelData::Init,
ChannelData::Destroy,
@@ -4242,17 +5489,17 @@ int grpc_client_channel_num_external_connectivity_watchers(
void grpc_client_channel_watch_connectivity_state(
grpc_channel_element* elem, grpc_polling_entity pollent,
- grpc_connectivity_state* state, grpc_closure* closure,
+ grpc_connectivity_state* state, grpc_closure* on_complete,
grpc_closure* watcher_timer_init) {
auto* chand = static_cast<ChannelData*>(elem->channel_data);
if (state == nullptr) {
// Handle cancellation.
GPR_ASSERT(watcher_timer_init == nullptr);
- chand->RemoveExternalConnectivityWatcher(closure, /*cancel=*/true);
+ chand->RemoveExternalConnectivityWatcher(on_complete, /*cancel=*/true);
return;
}
// Handle addition.
- return chand->AddExternalConnectivityWatcher(pollent, state, closure,
+ return chand->AddExternalConnectivityWatcher(pollent, state, on_complete,
watcher_timer_init);
}
@@ -4270,9 +5517,3 @@ void grpc_client_channel_stop_connectivity_watch(
auto* chand = static_cast<ChannelData*>(elem->channel_data);
chand->RemoveConnectivityWatcher(watcher);
}
-
-grpc_core::RefCountedPtr<grpc_core::SubchannelCall>
-grpc_client_channel_get_subchannel_call(grpc_call_element* elem) {
- auto* calld = static_cast<CallData*>(elem->call_data);
- return calld->subchannel_call();
-}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.h
index 35c2a2af6b2..af011cafcc7 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel.h
@@ -26,8 +26,6 @@
#include "src/core/ext/filters/client_channel/resolver.h"
#include "src/core/lib/channel/channel_stack.h"
-extern grpc_core::TraceFlag grpc_client_channel_trace;
-
// Channel arg key for server URI string.
#define GRPC_ARG_SERVER_URI "grpc.server_uri"
@@ -75,8 +73,4 @@ void grpc_client_channel_stop_connectivity_watch(
grpc_channel_element* elem,
grpc_core::AsyncConnectivityStateWatcherInterface* watcher);
-/* Debug helper: pull the subchannel call from a call stack element */
-grpc_core::RefCountedPtr<grpc_core::SubchannelCall>
-grpc_client_channel_get_subchannel_call(grpc_call_element* elem);
-
#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_factory.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_factory.h
index 79797bbc454..75d74d676b2 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_factory.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_factory.h
@@ -32,7 +32,8 @@ class ClientChannelFactory {
virtual ~ClientChannelFactory() = default;
// Creates a subchannel with the specified args.
- virtual Subchannel* CreateSubchannel(const grpc_channel_args* args) = 0;
+ virtual RefCountedPtr<Subchannel> CreateSubchannel(
+ const grpc_channel_args* args) = 0;
// Returns a channel arg containing the specified factory.
static grpc_arg CreateChannelArg(ClientChannelFactory* factory);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_plugin.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_plugin.cc
index 2358415fc2e..5690545cbb7 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_plugin.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/client_channel_plugin.cc
@@ -54,7 +54,7 @@ void grpc_client_channel_init(void) {
grpc_core::GlobalSubchannelPool::Init();
grpc_channel_init_register_stage(
GRPC_CLIENT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY, append_filter,
- (void*)&grpc_client_channel_filter);
+ const_cast<grpc_channel_filter*>(&grpc_client_channel_filter));
grpc_http_connect_register_handshaker_factory();
grpc_client_channel_global_init_backup_polling();
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/config_selector.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/config_selector.h
index 2022b175146..5aa373d942b 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/config_selector.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/config_selector.h
@@ -21,14 +21,15 @@
#include <functional>
#include <map>
+#include <vector>
#include "y_absl/strings/string_view.h"
-#include <grpc/impl/codegen/grpc_types.h>
-#include <grpc/impl/codegen/slice.h>
+#include <grpc/grpc.h>
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/ext/filters/client_channel/service_config_parser.h"
+#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/gprpp/arena.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -66,7 +67,7 @@ class ConfigSelector : public RefCounted<ConfigSelector> {
std::function<void()> on_call_committed;
};
- virtual ~ConfigSelector() = default;
+ ~ConfigSelector() override = default;
virtual const char* name() const = 0;
@@ -81,6 +82,16 @@ class ConfigSelector : public RefCounted<ConfigSelector> {
return cs1->Equals(cs2);
}
+ // The channel will call this when the resolver returns a new ConfigSelector
+ // to determine what set of dynamic filters will be configured.
+ virtual std::vector<const grpc_channel_filter*> GetFilters() { return {}; }
+
+ // Modifies channel args to be passed to the dynamic filter stack.
+ // Takes ownership of argument. Caller takes ownership of result.
+ virtual grpc_channel_args* ModifyChannelArgs(grpc_channel_args* args) {
+ return args;
+ }
+
virtual CallConfig GetCallConfig(GetCallConfigArgs args) = 0;
grpc_arg MakeChannelArg() const;
@@ -103,7 +114,7 @@ class DefaultConfigSelector : public ConfigSelector {
// Only comparing the ConfigSelector itself, not the underlying
// service config, so we always return true.
- bool Equals(const ConfigSelector* other) const override { return true; }
+ bool Equals(const ConfigSelector* /*other*/) const override { return true; }
CallConfig GetCallConfig(GetCallConfigArgs args) override {
CallConfig call_config;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.cc
new file mode 100644
index 00000000000..1286fcec42c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.cc
@@ -0,0 +1,191 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/ext/filters/client_channel/dynamic_filters.h"
+
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/surface/lame_client.h"
+
+// Conversion between call and call stack.
+#define CALL_TO_CALL_STACK(call) \
+ (grpc_call_stack*)((char*)(call) + GPR_ROUND_UP_TO_ALIGNMENT_SIZE( \
+ sizeof(DynamicFilters::Call)))
+#define CALL_STACK_TO_CALL(callstack) \
+ (DynamicFilters::Call*)(((char*)(call_stack)) - \
+ GPR_ROUND_UP_TO_ALIGNMENT_SIZE( \
+ sizeof(DynamicFilters::Call)))
+
+namespace grpc_core {
+
+//
+// DynamicFilters::Call
+//
+
+DynamicFilters::Call::Call(Args args, grpc_error** error)
+ : channel_stack_(std::move(args.channel_stack)) {
+ grpc_call_stack* call_stack = CALL_TO_CALL_STACK(this);
+ const grpc_call_element_args call_args = {
+ call_stack, /* call_stack */
+ nullptr, /* server_transport_data */
+ args.context, /* context */
+ args.path, /* path */
+ args.start_time, /* start_time */
+ args.deadline, /* deadline */
+ args.arena, /* arena */
+ args.call_combiner /* call_combiner */
+ };
+ *error = grpc_call_stack_init(channel_stack_->channel_stack_, 1, Destroy,
+ this, &call_args);
+ if (GPR_UNLIKELY(*error != GRPC_ERROR_NONE)) {
+ const char* error_string = grpc_error_string(*error);
+ gpr_log(GPR_ERROR, "error: %s", error_string);
+ return;
+ }
+ grpc_call_stack_set_pollset_or_pollset_set(call_stack, args.pollent);
+}
+
+void DynamicFilters::Call::StartTransportStreamOpBatch(
+ grpc_transport_stream_op_batch* batch) {
+ grpc_call_stack* call_stack = CALL_TO_CALL_STACK(this);
+ grpc_call_element* top_elem = grpc_call_stack_element(call_stack, 0);
+ GRPC_CALL_LOG_OP(GPR_INFO, top_elem, batch);
+ top_elem->filter->start_transport_stream_op_batch(top_elem, batch);
+}
+
+void DynamicFilters::Call::SetAfterCallStackDestroy(grpc_closure* closure) {
+ GPR_ASSERT(after_call_stack_destroy_ == nullptr);
+ GPR_ASSERT(closure != nullptr);
+ after_call_stack_destroy_ = closure;
+}
+
+RefCountedPtr<DynamicFilters::Call> DynamicFilters::Call::Ref() {
+ IncrementRefCount();
+ return RefCountedPtr<DynamicFilters::Call>(this);
+}
+
+RefCountedPtr<DynamicFilters::Call> DynamicFilters::Call::Ref(
+ const grpc_core::DebugLocation& location, const char* reason) {
+ IncrementRefCount(location, reason);
+ return RefCountedPtr<DynamicFilters::Call>(this);
+}
+
+void DynamicFilters::Call::Unref() {
+ GRPC_CALL_STACK_UNREF(CALL_TO_CALL_STACK(this), "");
+}
+
+void DynamicFilters::Call::Unref(const DebugLocation& /*location*/,
+ const char* reason) {
+ GRPC_CALL_STACK_UNREF(CALL_TO_CALL_STACK(this), reason);
+}
+
+void DynamicFilters::Call::Destroy(void* arg, grpc_error* /*error*/) {
+ DynamicFilters::Call* self = static_cast<DynamicFilters::Call*>(arg);
+ // Keep some members before destroying the subchannel call.
+ grpc_closure* after_call_stack_destroy = self->after_call_stack_destroy_;
+ RefCountedPtr<DynamicFilters> channel_stack = std::move(self->channel_stack_);
+ // Destroy the subchannel call.
+ self->~Call();
+ // Destroy the call stack. This should be after destroying the call, because
+ // call->after_call_stack_destroy(), if not null, will free the call arena.
+ grpc_call_stack_destroy(CALL_TO_CALL_STACK(self), nullptr,
+ after_call_stack_destroy);
+ // Automatically reset channel_stack. This should be after destroying the call
+ // stack, because destroying call stack needs access to the channel stack.
+}
+
+void DynamicFilters::Call::IncrementRefCount() {
+ GRPC_CALL_STACK_REF(CALL_TO_CALL_STACK(this), "");
+}
+
+void DynamicFilters::Call::IncrementRefCount(
+ const grpc_core::DebugLocation& /*location*/, const char* reason) {
+ GRPC_CALL_STACK_REF(CALL_TO_CALL_STACK(this), reason);
+}
+
+//
+// DynamicFilters
+//
+
+namespace {
+
+void DestroyChannelStack(void* arg, grpc_error* /*error*/) {
+ grpc_channel_stack* channel_stack = static_cast<grpc_channel_stack*>(arg);
+ grpc_channel_stack_destroy(channel_stack);
+ gpr_free(channel_stack);
+}
+
+std::pair<grpc_channel_stack*, grpc_error*> CreateChannelStack(
+ const grpc_channel_args* args,
+ std::vector<const grpc_channel_filter*> filters) {
+ // Allocate memory for channel stack.
+ const size_t channel_stack_size =
+ grpc_channel_stack_size(filters.data(), filters.size());
+ grpc_channel_stack* channel_stack =
+ reinterpret_cast<grpc_channel_stack*>(gpr_zalloc(channel_stack_size));
+ // Initialize stack.
+ grpc_error* error = grpc_channel_stack_init(
+ /*initial_refs=*/1, DestroyChannelStack, channel_stack, filters.data(),
+ filters.size(), args, /*optional_transport=*/nullptr, "DynamicFilters",
+ channel_stack);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "error initializing client internal stack: %s",
+ grpc_error_string(error));
+ grpc_channel_stack_destroy(channel_stack);
+ gpr_free(channel_stack);
+ return {nullptr, error};
+ }
+ return {channel_stack, GRPC_ERROR_NONE};
+}
+
+} // namespace
+
+RefCountedPtr<DynamicFilters> DynamicFilters::Create(
+ const grpc_channel_args* args,
+ std::vector<const grpc_channel_filter*> filters) {
+ // Attempt to create channel stack from requested filters.
+ auto p = CreateChannelStack(args, std::move(filters));
+ if (p.second != GRPC_ERROR_NONE) {
+ // Channel stack creation failed with requested filters.
+ // Create with lame filter instead.
+ grpc_error* error = p.second;
+ grpc_arg error_arg = MakeLameClientErrorArg(error);
+ grpc_channel_args* new_args =
+ grpc_channel_args_copy_and_add(args, &error_arg, 1);
+ GRPC_ERROR_UNREF(error);
+ p = CreateChannelStack(new_args, {&grpc_lame_filter});
+ GPR_ASSERT(p.second == GRPC_ERROR_NONE);
+ grpc_channel_args_destroy(new_args);
+ }
+ return MakeRefCounted<DynamicFilters>(p.first);
+}
+
+DynamicFilters::~DynamicFilters() {
+ GRPC_CHANNEL_STACK_UNREF(channel_stack_, "~DynamicFilters");
+}
+
+RefCountedPtr<DynamicFilters::Call> DynamicFilters::CreateCall(
+ DynamicFilters::Call::Args args, grpc_error** error) {
+ size_t allocation_size = GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(Call)) +
+ channel_stack_->call_stack_size;
+ Call* call = static_cast<Call*>(args.arena->Alloc(allocation_size));
+ new (call) Call(std::move(args), error);
+ return call;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.h
new file mode 100644
index 00000000000..bcdc6d3b61d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/dynamic_filters.h
@@ -0,0 +1,99 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_DYNAMIC_FILTERS_H
+#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_DYNAMIC_FILTERS_H
+
+#include <grpc/support/port_platform.h>
+
+#include <vector>
+
+#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/gpr/time_precise.h"
+#include "src/core/lib/gprpp/arena.h"
+#include "src/core/lib/gprpp/ref_counted.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/polling_entity.h"
+
+namespace grpc_core {
+
+class DynamicFilters : public RefCounted<DynamicFilters> {
+ public:
+ // Implements the interface of RefCounted<>.
+ class Call {
+ public:
+ struct Args {
+ RefCountedPtr<DynamicFilters> channel_stack;
+ grpc_polling_entity* pollent;
+ grpc_slice path;
+ gpr_cycle_counter start_time;
+ grpc_millis deadline;
+ Arena* arena;
+ grpc_call_context_element* context;
+ CallCombiner* call_combiner;
+ };
+
+ Call(Args args, grpc_error** error);
+
+ // Continues processing a transport stream op batch.
+ void StartTransportStreamOpBatch(grpc_transport_stream_op_batch* batch);
+
+ // Sets the 'then_schedule_closure' argument for call stack destruction.
+ // Must be called once per call.
+ void SetAfterCallStackDestroy(grpc_closure* closure);
+
+ // Interface of RefCounted<>.
+ RefCountedPtr<Call> Ref() GRPC_MUST_USE_RESULT;
+ RefCountedPtr<Call> Ref(const DebugLocation& location,
+ const char* reason) GRPC_MUST_USE_RESULT;
+ // When refcount drops to 0, destroys itself and the associated call stack,
+ // but does NOT free the memory because it's in the call arena.
+ void Unref();
+ void Unref(const DebugLocation& location, const char* reason);
+
+ private:
+ // Allow RefCountedPtr<> to access IncrementRefCount().
+ template <typename T>
+ friend class RefCountedPtr;
+
+ // Interface of RefCounted<>.
+ void IncrementRefCount();
+ void IncrementRefCount(const DebugLocation& location, const char* reason);
+
+ static void Destroy(void* arg, grpc_error* error);
+
+ RefCountedPtr<DynamicFilters> channel_stack_;
+ grpc_closure* after_call_stack_destroy_ = nullptr;
+ };
+
+ static RefCountedPtr<DynamicFilters> Create(
+ const grpc_channel_args* args,
+ std::vector<const grpc_channel_filter*> filters);
+
+ explicit DynamicFilters(grpc_channel_stack* channel_stack)
+ : channel_stack_(channel_stack) {}
+
+ ~DynamicFilters() override;
+
+ RefCountedPtr<Call> CreateCall(Call::Args args, grpc_error** error);
+
+ private:
+ grpc_channel_stack* channel_stack_;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_DYNAMIC_FILTERS_H
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.cc
index 546d1c44160..72593a6f4a2 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.cc
@@ -27,16 +27,6 @@ namespace grpc_core {
#define GRPC_REGISTER_SUBCHANNEL_CALM_DOWN_AFTER_ATTEMPTS 100
#define GRPC_REGISTER_SUBCHANNEL_CALM_DOWN_MICROS 10
-GlobalSubchannelPool::GlobalSubchannelPool() {
- subchannel_map_ = grpc_avl_create(&subchannel_avl_vtable_);
- gpr_mu_init(&mu_);
-}
-
-GlobalSubchannelPool::~GlobalSubchannelPool() {
- gpr_mu_destroy(&mu_);
- grpc_avl_unref(subchannel_map_, nullptr);
-}
-
void GlobalSubchannelPool::Init() {
instance_ = new RefCountedPtr<GlobalSubchannelPool>(
MakeRefCounted<GlobalSubchannelPool>());
@@ -57,145 +47,37 @@ RefCountedPtr<GlobalSubchannelPool> GlobalSubchannelPool::instance() {
return *instance_;
}
-Subchannel* GlobalSubchannelPool::RegisterSubchannel(SubchannelKey* key,
- Subchannel* constructed) {
- Subchannel* c = nullptr;
- // Compare and swap (CAS) loop:
- for (int attempt_count = 0; c == nullptr; attempt_count++) {
- // Ref the shared map to have a local copy.
- gpr_mu_lock(&mu_);
- grpc_avl old_map = grpc_avl_ref(subchannel_map_, nullptr);
- gpr_mu_unlock(&mu_);
- // Check to see if a subchannel already exists.
- c = static_cast<Subchannel*>(grpc_avl_get(old_map, key, nullptr));
- if (c != nullptr) {
- // The subchannel already exists. Try to reuse it.
- c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(c, "subchannel_register+reuse");
- if (c != nullptr) {
- GRPC_SUBCHANNEL_UNREF(constructed,
- "subchannel_register+found_existing");
- // Exit the CAS loop without modifying the shared map.
- } else {
- // Reuse of the subchannel failed, so retry CAS loop
- if (attempt_count >=
- GRPC_REGISTER_SUBCHANNEL_CALM_DOWN_AFTER_ATTEMPTS) {
- // GRPC_SUBCHANNEL_REF_FROM_WEAK_REF returning nullptr means that the
- // subchannel we got is no longer valid and it's going to be removed
- // from the AVL tree soon. Spinning here excesively here can actually
- // prevent another thread from removing the subchannel, basically
- // resulting in a live lock. See b/157516542 for more details.
- // TODO(jtattermusch): the entire ref-counting mechanism for
- // subchannels should be overhaulded, but the current workaround
- // is fine for short-term.
- // TODO(jtattermusch): gpr does not support thread yield operation,
- // so a very short wait is the best we can do.
- gpr_sleep_until(gpr_time_add(
- gpr_now(GPR_CLOCK_REALTIME),
- gpr_time_from_micros(GRPC_REGISTER_SUBCHANNEL_CALM_DOWN_MICROS,
- GPR_TIMESPAN)));
- }
- }
- } else {
- // There hasn't been such subchannel. Add one.
- // Note that we should ref the old map first because grpc_avl_add() will
- // unref it while we still need to access it later.
- grpc_avl new_map = grpc_avl_add(
- grpc_avl_ref(old_map, nullptr), new SubchannelKey(*key),
- GRPC_SUBCHANNEL_WEAK_REF(constructed, "subchannel_register+new"),
- nullptr);
- // Try to publish the change to the shared map. It may happen (but
- // unlikely) that some other thread has changed the shared map, so compare
- // to make sure it's unchanged before swapping. Retry if it's changed.
- gpr_mu_lock(&mu_);
- if (old_map.root == subchannel_map_.root) {
- GPR_SWAP(grpc_avl, new_map, subchannel_map_);
- c = constructed;
- }
- gpr_mu_unlock(&mu_);
- grpc_avl_unref(new_map, nullptr);
- }
- grpc_avl_unref(old_map, nullptr);
- }
- return c;
-}
-
-void GlobalSubchannelPool::UnregisterSubchannel(SubchannelKey* key) {
- bool done = false;
- // Compare and swap (CAS) loop:
- while (!done) {
- // Ref the shared map to have a local copy.
- gpr_mu_lock(&mu_);
- grpc_avl old_map = grpc_avl_ref(subchannel_map_, nullptr);
- gpr_mu_unlock(&mu_);
- // Remove the subchannel.
- // Note that we should ref the old map first because grpc_avl_remove() will
- // unref it while we still need to access it later.
- grpc_avl new_map =
- grpc_avl_remove(grpc_avl_ref(old_map, nullptr), key, nullptr);
- // Try to publish the change to the shared map. It may happen (but
- // unlikely) that some other thread has changed the shared map, so compare
- // to make sure it's unchanged before swapping. Retry if it's changed.
- gpr_mu_lock(&mu_);
- if (old_map.root == subchannel_map_.root) {
- GPR_SWAP(grpc_avl, new_map, subchannel_map_);
- done = true;
- }
- gpr_mu_unlock(&mu_);
- grpc_avl_unref(new_map, nullptr);
- grpc_avl_unref(old_map, nullptr);
+RefCountedPtr<Subchannel> GlobalSubchannelPool::RegisterSubchannel(
+ const SubchannelKey& key, RefCountedPtr<Subchannel> constructed) {
+ MutexLock lock(&mu_);
+ auto it = subchannel_map_.find(key);
+ if (it != subchannel_map_.end()) {
+ RefCountedPtr<Subchannel> existing = it->second->RefIfNonZero();
+ if (existing != nullptr) return existing;
}
-}
-
-Subchannel* GlobalSubchannelPool::FindSubchannel(SubchannelKey* key) {
- // Lock, and take a reference to the subchannel map.
- // We don't need to do the search under a lock as AVL's are immutable.
- gpr_mu_lock(&mu_);
- grpc_avl index = grpc_avl_ref(subchannel_map_, nullptr);
- gpr_mu_unlock(&mu_);
- Subchannel* c = static_cast<Subchannel*>(grpc_avl_get(index, key, nullptr));
- if (c != nullptr) c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(c, "found_from_pool");
- grpc_avl_unref(index, nullptr);
- return c;
+ subchannel_map_[key] = constructed.get();
+ return constructed;
}
RefCountedPtr<GlobalSubchannelPool>* GlobalSubchannelPool::instance_ = nullptr;
-namespace {
-
-void sck_avl_destroy(void* p, void* /*user_data*/) {
- SubchannelKey* key = static_cast<SubchannelKey*>(p);
- delete key;
-}
-
-void* sck_avl_copy(void* p, void* /*unused*/) {
- const SubchannelKey* key = static_cast<const SubchannelKey*>(p);
- auto* new_key = new SubchannelKey(*key);
- return static_cast<void*>(new_key);
-}
-
-long sck_avl_compare(void* a, void* b, void* /*unused*/) {
- const SubchannelKey* key_a = static_cast<const SubchannelKey*>(a);
- const SubchannelKey* key_b = static_cast<const SubchannelKey*>(b);
- return key_a->Cmp(*key_b);
-}
-
-void scv_avl_destroy(void* p, void* /*user_data*/) {
- GRPC_SUBCHANNEL_WEAK_UNREF((Subchannel*)p, "global_subchannel_pool");
+void GlobalSubchannelPool::UnregisterSubchannel(const SubchannelKey& key,
+ Subchannel* subchannel) {
+ MutexLock lock(&mu_);
+ auto it = subchannel_map_.find(key);
+ // delete only if key hasn't been re-registered to a different subchannel
+ // between strong-unreffing and unregistration of subchannel.
+ if (it != subchannel_map_.end() && it->second == subchannel) {
+ subchannel_map_.erase(it);
+ }
}
-void* scv_avl_copy(void* p, void* /*unused*/) {
- GRPC_SUBCHANNEL_WEAK_REF((Subchannel*)p, "global_subchannel_pool");
- return p;
+RefCountedPtr<Subchannel> GlobalSubchannelPool::FindSubchannel(
+ const SubchannelKey& key) {
+ MutexLock lock(&mu_);
+ auto it = subchannel_map_.find(key);
+ if (it == subchannel_map_.end()) return nullptr;
+ return it->second->RefIfNonZero();
}
-} // namespace
-
-const grpc_avl_vtable GlobalSubchannelPool::subchannel_avl_vtable_ = {
- sck_avl_destroy, // destroy_key
- sck_avl_copy, // copy_key
- sck_avl_compare, // compare_keys
- scv_avl_destroy, // destroy_value
- scv_avl_copy // copy_value
-};
-
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.h
index 96dc8d7b3a4..fac9c25744c 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/global_subchannel_pool.h
@@ -21,7 +21,10 @@
#include <grpc/support/port_platform.h>
+#include <map>
+
#include "src/core/ext/filters/client_channel/subchannel_pool_interface.h"
+#include "src/core/lib/gprpp/sync.h"
namespace grpc_core {
@@ -33,8 +36,8 @@ namespace grpc_core {
class GlobalSubchannelPool final : public SubchannelPoolInterface {
public:
// The ctor and dtor are not intended to use directly.
- GlobalSubchannelPool();
- ~GlobalSubchannelPool() override;
+ GlobalSubchannelPool() {}
+ ~GlobalSubchannelPool() override {}
// Should be called exactly once at filter initialization time.
static void Init();
@@ -45,22 +48,24 @@ class GlobalSubchannelPool final : public SubchannelPoolInterface {
static RefCountedPtr<GlobalSubchannelPool> instance();
// Implements interface methods.
- Subchannel* RegisterSubchannel(SubchannelKey* key,
- Subchannel* constructed) override;
- void UnregisterSubchannel(SubchannelKey* key) override;
- Subchannel* FindSubchannel(SubchannelKey* key) override;
+ RefCountedPtr<Subchannel> RegisterSubchannel(
+ const SubchannelKey& key, RefCountedPtr<Subchannel> constructed) override
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
+ void UnregisterSubchannel(const SubchannelKey& key,
+ Subchannel* subchannel) override
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
+ RefCountedPtr<Subchannel> FindSubchannel(const SubchannelKey& key) override
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
private:
// The singleton instance. (It's a pointer to RefCountedPtr so that this
// non-local static object can be trivially destructible.)
static RefCountedPtr<GlobalSubchannelPool>* instance_;
- // The vtable for subchannel operations in an AVL tree.
- static const grpc_avl_vtable subchannel_avl_vtable_;
// A map from subchannel key to subchannel.
- grpc_avl subchannel_map_;
+ std::map<SubchannelKey, Subchannel*> subchannel_map_ Y_ABSL_GUARDED_BY(mu_);
// To protect subchannel_map_.
- gpr_mu mu_;
+ Mutex mu_;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.cc
index 7995185c131..f234c230a89 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.cc
@@ -46,13 +46,16 @@ TraceFlag grpc_health_check_client_trace(false, "health_check_client");
//
HealthCheckClient::HealthCheckClient(
- const char* service_name,
+ TString service_name,
RefCountedPtr<ConnectedSubchannel> connected_subchannel,
grpc_pollset_set* interested_parties,
RefCountedPtr<channelz::SubchannelNode> channelz_node,
RefCountedPtr<ConnectivityStateWatcherInterface> watcher)
- : InternallyRefCounted<HealthCheckClient>(&grpc_health_check_client_trace),
- service_name_(service_name),
+ : InternallyRefCounted<HealthCheckClient>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_health_check_client_trace)
+ ? "HealthCheckClient"
+ : nullptr),
+ service_name_(std::move(service_name)),
connected_subchannel_(std::move(connected_subchannel)),
interested_parties_(interested_parties),
channelz_node_(std::move(channelz_node)),
@@ -177,13 +180,14 @@ void HealthCheckClient::OnRetryTimer(void* arg, grpc_error* error) {
namespace {
-void EncodeRequest(const char* service_name,
+void EncodeRequest(const TString& service_name,
ManualConstructor<SliceBufferByteStream>* send_message) {
upb::Arena arena;
grpc_health_v1_HealthCheckRequest* request_struct =
grpc_health_v1_HealthCheckRequest_new(arena.ptr());
grpc_health_v1_HealthCheckRequest_set_service(
- request_struct, upb_strview_makez(service_name));
+ request_struct,
+ upb_strview_make(service_name.data(), service_name.size()));
size_t buf_length;
char* buf = grpc_health_v1_HealthCheckRequest_serialize(
request_struct, arena.ptr(), &buf_length);
@@ -249,7 +253,7 @@ HealthCheckClient::CallState::CallState(
: health_check_client_(std::move(health_check_client)),
pollent_(grpc_polling_entity_create_from_pollset_set(interested_parties)),
arena_(Arena::Create(health_check_client_->connected_subchannel_
- ->GetInitialCallSizeEstimate(0))),
+ ->GetInitialCallSizeEstimate())),
payload_(context_) {}
HealthCheckClient::CallState::~CallState() {
@@ -288,7 +292,6 @@ void HealthCheckClient::CallState::StartCall() {
arena_,
context_,
&call_combiner_,
- 0, // parent_data_size
};
grpc_error* error = GRPC_ERROR_NONE;
call_ = SubchannelCall::Create(std::move(args), &error).release();
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.h
index e9555b5f955..f53e9828d33 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/health/health_check_client.h
@@ -44,13 +44,13 @@ namespace grpc_core {
class HealthCheckClient : public InternallyRefCounted<HealthCheckClient> {
public:
- HealthCheckClient(const char* service_name,
+ HealthCheckClient(TString service_name,
RefCountedPtr<ConnectedSubchannel> connected_subchannel,
grpc_pollset_set* interested_parties,
RefCountedPtr<channelz::SubchannelNode> channelz_node,
RefCountedPtr<ConnectivityStateWatcherInterface> watcher);
- ~HealthCheckClient();
+ ~HealthCheckClient() override;
void Orphan() override;
@@ -60,7 +60,7 @@ class HealthCheckClient : public InternallyRefCounted<HealthCheckClient> {
public:
CallState(RefCountedPtr<HealthCheckClient> health_check_client,
grpc_pollset_set* interested_parties_);
- ~CallState();
+ ~CallState() override;
void Orphan() override;
@@ -150,7 +150,7 @@ class HealthCheckClient : public InternallyRefCounted<HealthCheckClient> {
void SetHealthStatusLocked(grpc_connectivity_state state,
const char* reason); // Requires holding mu_.
- const char* service_name_; // Do not own.
+ TString service_name_;
RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
grpc_pollset_set* interested_parties_; // Do not own.
RefCountedPtr<channelz::SubchannelNode> channelz_node_;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc
index 190baabd0a3..79b4ccf2056 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/http_connect_handshaker.cc
@@ -54,7 +54,7 @@ class HttpConnectHandshaker : public Handshaker {
const char* name() const override { return "http_connect"; }
private:
- virtual ~HttpConnectHandshaker();
+ ~HttpConnectHandshaker() override;
void CleanupArgsForFailureLocked();
void HandshakeFailedLocked(grpc_error* error);
static void OnWriteDone(void* arg, grpc_error* error);
@@ -151,7 +151,7 @@ void HttpConnectHandshaker::OnWriteDone(void* arg, grpc_error* error) {
// If the write failed or we're shutting down, clean up and invoke the
// callback with the error.
handshaker->HandshakeFailedLocked(GRPC_ERROR_REF(error));
- lock.Unlock();
+ lock.Release();
handshaker->Unref();
} else {
// Otherwise, read the response.
@@ -256,7 +256,7 @@ done:
// Set shutdown to true so that subsequent calls to
// http_connect_handshaker_shutdown() do nothing.
handshaker->is_shutdown_ = true;
- lock.Unlock();
+ lock.Release();
handshaker->Unref();
}
@@ -332,7 +332,7 @@ void HttpConnectHandshaker::DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
grpc_httpcli_request request;
request.host = server_name;
request.ssl_host_override = nullptr;
- request.http.method = (char*)"CONNECT";
+ request.http.method = const_cast<char*>("CONNECT");
request.http.path = server_name;
request.http.version = GRPC_HTTP_HTTP10; // Set by OnReadDone
request.http.hdrs = headers;
@@ -382,8 +382,7 @@ class HttpConnectHandshakerFactory : public HandshakerFactory {
} // namespace grpc_core
void grpc_http_connect_register_handshaker_factory() {
- using namespace grpc_core;
- HandshakerRegistry::RegisterHandshakerFactory(
- true /* at_start */, HANDSHAKER_CLIENT,
- y_absl::make_unique<HttpConnectHandshakerFactory>());
+ grpc_core::HandshakerRegistry::RegisterHandshakerFactory(
+ true /* at_start */, grpc_core::HANDSHAKER_CLIENT,
+ y_absl::make_unique<grpc_core::HttpConnectHandshakerFactory>());
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/http_proxy.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/http_proxy.cc
index 2187682526c..8658b10b770 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/http_proxy.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/http_proxy.cc
@@ -24,6 +24,7 @@
#include <string.h>
#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/strip.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -47,9 +48,10 @@ namespace {
* credentials if present in the 'http_proxy' env var, otherwise leaves it
* unchanged. It is caller's responsibility to gpr_free user_cred.
*/
+// TODO(hork): change this to return TString
char* GetHttpProxyServer(const grpc_channel_args* args, char** user_cred) {
GPR_ASSERT(user_cred != nullptr);
- grpc_uri* uri = nullptr;
+ y_absl::StatusOr<URI> uri;
char* proxy_name = nullptr;
char** authority_strs = nullptr;
size_t authority_nstrs;
@@ -69,17 +71,20 @@ char* GetHttpProxyServer(const grpc_channel_args* args, char** user_cred) {
if (uri_str == nullptr) return nullptr;
// an emtpy value means "don't use proxy"
if (uri_str[0] == '\0') goto done;
- uri = grpc_uri_parse(uri_str, false /* suppress_errors */);
- if (uri == nullptr || uri->authority == nullptr) {
- gpr_log(GPR_ERROR, "cannot parse value of 'http_proxy' env var");
+ uri = URI::Parse(uri_str);
+ if (!uri.ok() || uri->authority().empty()) {
+ gpr_log(GPR_ERROR, "cannot parse value of 'http_proxy' env var. Error: %s",
+ uri.status().ToString().c_str());
goto done;
}
- if (strcmp(uri->scheme, "http") != 0) {
- gpr_log(GPR_ERROR, "'%s' scheme not supported in proxy URI", uri->scheme);
+ if (uri->scheme() != "http") {
+ gpr_log(GPR_ERROR, "'%s' scheme not supported in proxy URI",
+ uri->scheme().c_str());
goto done;
}
/* Split on '@' to separate user credentials from host */
- gpr_string_split(uri->authority, "@", &authority_strs, &authority_nstrs);
+ gpr_string_split(uri->authority().c_str(), "@", &authority_strs,
+ &authority_nstrs);
GPR_ASSERT(authority_nstrs != 0); /* should have at least 1 string */
if (authority_nstrs == 1) {
/* User cred not present in authority */
@@ -99,7 +104,6 @@ char* GetHttpProxyServer(const grpc_channel_args* args, char** user_cred) {
gpr_free(authority_strs);
done:
gpr_free(uri_str);
- grpc_uri_destroy(uri);
return proxy_name;
}
@@ -114,15 +118,15 @@ class HttpProxyMapper : public ProxyMapperInterface {
*name_to_resolve = GetHttpProxyServer(args, &user_cred);
if (*name_to_resolve == nullptr) return false;
char* no_proxy_str = nullptr;
- grpc_uri* uri = grpc_uri_parse(server_uri, false /* suppress_errors */);
- if (uri == nullptr || uri->path[0] == '\0') {
+ y_absl::StatusOr<URI> uri = URI::Parse(server_uri);
+ if (!uri.ok() || uri->path().empty()) {
gpr_log(GPR_ERROR,
"'http_proxy' environment variable set, but cannot "
- "parse server URI '%s' -- not using proxy",
- server_uri);
+ "parse server URI '%s' -- not using proxy. Error: %s",
+ server_uri, uri.status().ToString().c_str());
goto no_use_proxy;
}
- if (strcmp(uri->scheme, "unix") == 0) {
+ if (uri->scheme() == "unix") {
gpr_log(GPR_INFO, "not using proxy for Unix domain socket '%s'",
server_uri);
goto no_use_proxy;
@@ -135,9 +139,8 @@ class HttpProxyMapper : public ProxyMapperInterface {
bool use_proxy = true;
TString server_host;
TString server_port;
- if (!grpc_core::SplitHostPort(
- uri->path[0] == '/' ? uri->path + 1 : uri->path, &server_host,
- &server_port)) {
+ if (!SplitHostPort(y_absl::StripPrefix(uri->path(), "/"), &server_host,
+ &server_port)) {
gpr_log(GPR_INFO,
"unable to split host and port, not checking no_proxy list for "
"host '%s'",
@@ -172,8 +175,8 @@ class HttpProxyMapper : public ProxyMapperInterface {
}
grpc_arg args_to_add[2];
args_to_add[0] = grpc_channel_arg_string_create(
- (char*)GRPC_ARG_HTTP_CONNECT_SERVER,
- uri->path[0] == '/' ? uri->path + 1 : uri->path);
+ const_cast<char*>(GRPC_ARG_HTTP_CONNECT_SERVER),
+ const_cast<char*>(y_absl::StripPrefix(uri->path(), "/").data()));
if (user_cred != nullptr) {
/* Use base64 encoding for user credentials as stated in RFC 7617 */
char* encoded_user_cred =
@@ -188,11 +191,9 @@ class HttpProxyMapper : public ProxyMapperInterface {
} else {
*new_args = grpc_channel_args_copy_and_add(args, args_to_add, 1);
}
- grpc_uri_destroy(uri);
gpr_free(user_cred);
return true;
no_use_proxy:
- if (uri != nullptr) grpc_uri_destroy(uri);
gpr_free(*name_to_resolve);
*name_to_resolve = nullptr;
gpr_free(user_cred);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.cc
index 6c639ef86ce..5470df8e121 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.cc
@@ -32,7 +32,11 @@ DebugOnlyTraceFlag grpc_trace_lb_policy_refcount(false, "lb_policy_refcount");
//
LoadBalancingPolicy::LoadBalancingPolicy(Args args, intptr_t initial_refcount)
- : InternallyRefCounted(&grpc_trace_lb_policy_refcount, initial_refcount),
+ : InternallyRefCounted(
+ GRPC_TRACE_FLAG_ENABLED(grpc_trace_lb_policy_refcount)
+ ? "LoadBalancingPolicy"
+ : nullptr,
+ initial_refcount),
work_serializer_(std::move(args.work_serializer)),
interested_parties_(grpc_pollset_set_create()),
channel_control_helper_(std::move(args.channel_control_helper)) {}
@@ -66,6 +70,9 @@ LoadBalancingPolicy::UpdateArgs::UpdateArgs(UpdateArgs&& other) noexcept {
LoadBalancingPolicy::UpdateArgs& LoadBalancingPolicy::UpdateArgs::operator=(
const UpdateArgs& other) {
+ if (&other == this) {
+ return *this;
+ }
addresses = other.addresses;
config = other.config;
grpc_channel_args_destroy(args);
@@ -101,7 +108,7 @@ LoadBalancingPolicy::PickResult LoadBalancingPolicy::QueuePicker::Pick(
// 2. We are currently running in the data plane mutex, but we
// need to bounce into the control plane work_serializer to call
// ExitIdleLocked().
- if (!exit_idle_called_) {
+ if (!exit_idle_called_ && parent_ != nullptr) {
exit_idle_called_ = true;
auto* parent = parent_->Ref().release(); // ref held by lambda.
ExecCtx::Run(DEBUG_LOCATION,
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.h
index 1cbc074484b..10f964a2b49 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy.h
@@ -30,7 +30,6 @@
#include "src/core/ext/filters/client_channel/server_address.h"
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/ext/filters/client_channel/subchannel_interface.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/polling_entity.h"
@@ -95,11 +94,11 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
/// Application-specific requests cost metrics. Metric names are
/// determined by the application. Each value is an absolute cost
/// (e.g. 3487 bytes of storage) associated with the request.
- std::map<y_absl::string_view, double, StringLess> request_cost;
+ std::map<y_absl::string_view, double> request_cost;
/// Application-specific resource utilization metrics. Metric names
/// are determined by the application. Each value is expressed as a
/// fraction of total resources available.
- std::map<y_absl::string_view, double, StringLess> utilization;
+ std::map<y_absl::string_view, double> utilization;
};
/// Interface for accessing per-call state.
@@ -301,7 +300,7 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
/// return the parameters they need.
class Config : public RefCounted<Config> {
public:
- virtual ~Config() = default;
+ ~Config() override = default;
// Returns the load balancing policy name
virtual const char* name() const = 0;
@@ -341,7 +340,7 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
};
explicit LoadBalancingPolicy(Args args, intptr_t initial_refcount = 1);
- virtual ~LoadBalancingPolicy();
+ ~LoadBalancingPolicy() override;
// Not copyable nor movable.
LoadBalancingPolicy(const LoadBalancingPolicy&) = delete;
@@ -376,7 +375,7 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
explicit QueuePicker(RefCountedPtr<LoadBalancingPolicy> parent)
: parent_(std::move(parent)) {}
- ~QueuePicker() { parent_.reset(DEBUG_LOCATION, "QueuePicker"); }
+ ~QueuePicker() override { parent_.reset(DEBUG_LOCATION, "QueuePicker"); }
PickResult Pick(PickArgs args) override;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc
index b364ecf528a..2ffd3ecbc1d 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc
@@ -36,7 +36,7 @@ class ChildPolicyHandler::Helper
explicit Helper(RefCountedPtr<ChildPolicyHandler> parent)
: parent_(std::move(parent)) {}
- ~Helper() { parent_.reset(DEBUG_LOCATION, "Helper"); }
+ ~Helper() override { parent_.reset(DEBUG_LOCATION, "Helper"); }
RefCountedPtr<SubchannelInterface> CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) override {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h
index d67f3264a87..c902c0ec8d6 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h
@@ -36,7 +36,7 @@ class ChildPolicyHandler : public LoadBalancingPolicy {
ChildPolicyHandler(Args args, TraceFlag* tracer)
: LoadBalancingPolicy(std::move(args)), tracer_(tracer) {}
- virtual const char* name() const override { return "child_policy_handler"; }
+ const char* name() const override { return "child_policy_handler"; }
void UpdateLocked(UpdateArgs args) override;
void ExitIdleLocked() override;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
index ccfdb5f215a..dbb2b5af2d9 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc
@@ -68,6 +68,7 @@
#include "y_absl/strings/str_cat.h"
#include "y_absl/strings/str_format.h"
#include "y_absl/strings/str_join.h"
+#include "y_absl/strings/strip.h"
#include "upb/upb.hpp"
@@ -164,7 +165,7 @@ class GrpcLb : public LoadBalancingPolicy {
public:
explicit BalancerCallState(
RefCountedPtr<LoadBalancingPolicy> parent_grpclb_policy);
- ~BalancerCallState();
+ ~BalancerCallState() override;
// It's the caller's responsibility to ensure that Orphan() is called from
// inside the combiner.
@@ -235,6 +236,23 @@ class GrpcLb : public LoadBalancingPolicy {
grpc_closure client_load_report_closure_;
};
+ class SubchannelWrapper : public DelegatingSubchannel {
+ public:
+ SubchannelWrapper(RefCountedPtr<SubchannelInterface> subchannel,
+ TString lb_token,
+ RefCountedPtr<GrpcLbClientStats> client_stats)
+ : DelegatingSubchannel(std::move(subchannel)),
+ lb_token_(std::move(lb_token)),
+ client_stats_(std::move(client_stats)) {}
+
+ const TString& lb_token() const { return lb_token_; }
+ GrpcLbClientStats* client_stats() const { return client_stats_.get(); }
+
+ private:
+ TString lb_token_;
+ RefCountedPtr<GrpcLbClientStats> client_stats_;
+ };
+
class TokenAndClientStatsAttribute
: public ServerAddress::AttributeInterface {
public:
@@ -262,7 +280,9 @@ class GrpcLb : public LoadBalancingPolicy {
}
const TString& lb_token() const { return lb_token_; }
- GrpcLbClientStats* client_stats() const { return client_stats_.get(); }
+ RefCountedPtr<GrpcLbClientStats> client_stats() const {
+ return client_stats_;
+ }
private:
TString lb_token_;
@@ -310,21 +330,16 @@ class GrpcLb : public LoadBalancingPolicy {
class Picker : public SubchannelPicker {
public:
- Picker(GrpcLb* parent, RefCountedPtr<Serverlist> serverlist,
+ Picker(RefCountedPtr<Serverlist> serverlist,
std::unique_ptr<SubchannelPicker> child_picker,
RefCountedPtr<GrpcLbClientStats> client_stats)
- : parent_(parent),
- serverlist_(std::move(serverlist)),
+ : serverlist_(std::move(serverlist)),
child_picker_(std::move(child_picker)),
client_stats_(std::move(client_stats)) {}
PickResult Pick(PickArgs args) override;
private:
- // Storing the address for logging, but not holding a ref.
- // DO NOT DEFERENCE!
- GrpcLb* parent_;
-
// Serverlist to be used for determining drops.
RefCountedPtr<Serverlist> serverlist_;
@@ -355,7 +370,7 @@ class GrpcLb : public LoadBalancingPolicy {
: AsyncConnectivityStateWatcherInterface(parent->work_serializer()),
parent_(std::move(parent)) {}
- ~StateWatcher() { parent_.reset(DEBUG_LOCATION, "StateWatcher"); }
+ ~StateWatcher() override { parent_.reset(DEBUG_LOCATION, "StateWatcher"); }
private:
void OnConnectivityStateChange(grpc_connectivity_state new_state,
@@ -381,7 +396,7 @@ class GrpcLb : public LoadBalancingPolicy {
RefCountedPtr<GrpcLb> parent_;
};
- ~GrpcLb();
+ ~GrpcLb() override;
void ShutdownLocked() override;
@@ -412,7 +427,7 @@ class GrpcLb : public LoadBalancingPolicy {
void CreateOrUpdateChildPolicyLocked();
// Who the client is trying to communicate with.
- const char* server_name_ = nullptr;
+ TString server_name_;
// Configurations for the policy.
RefCountedPtr<GrpcLbConfig> config_;
@@ -477,7 +492,7 @@ bool GrpcLb::Serverlist::operator==(const Serverlist& other) const {
void ParseServer(const GrpcLbServer& server, grpc_resolved_address* addr) {
memset(addr, 0, sizeof(*addr));
if (server.drop) return;
- const uint16_t netorder_port = grpc_htons((uint16_t)server.port);
+ const uint16_t netorder_port = grpc_htons(static_cast<uint16_t>(server.port));
/* the addresses are given in binary format (a in(6)_addr struct) in
* server->ip_address.bytes. */
if (server.ip_size == 4) {
@@ -488,7 +503,8 @@ void ParseServer(const GrpcLbServer& server, grpc_resolved_address* addr) {
addr4->sin_port = netorder_port;
} else if (server.ip_size == 16) {
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
- grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)&addr->addr;
+ grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<grpc_sockaddr_in6*>(&addr->addr);
addr6->sin6_family = GRPC_AF_INET6;
memcpy(&addr6->sin6_addr, server.ip_addr, server.ip_size);
addr6->sin6_port = netorder_port;
@@ -518,17 +534,18 @@ bool IsServerValid(const GrpcLbServer& server, size_t idx, bool log) {
if (GPR_UNLIKELY(server.port >> 16 != 0)) {
if (log) {
gpr_log(GPR_ERROR,
- "Invalid port '%d' at index %lu of serverlist. Ignoring.",
- server.port, (unsigned long)idx);
+ "Invalid port '%d' at index %" PRIuPTR
+ " of serverlist. Ignoring.",
+ server.port, idx);
}
return false;
}
if (GPR_UNLIKELY(server.ip_size != 4 && server.ip_size != 16)) {
if (log) {
gpr_log(GPR_ERROR,
- "Expected IP to be 4 or 16 bytes, got %d at index %lu of "
- "serverlist. Ignoring",
- server.ip_size, (unsigned long)idx);
+ "Expected IP to be 4 or 16 bytes, got %d at index %" PRIuPTR
+ " of serverlist. Ignoring",
+ server.ip_size, idx);
}
return false;
}
@@ -591,7 +608,8 @@ const char* GrpcLb::Serverlist::ShouldDrop() {
GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
PickResult result;
// Check if we should drop the call.
- const char* drop_token = serverlist_->ShouldDrop();
+ const char* drop_token =
+ serverlist_ == nullptr ? nullptr : serverlist_->ShouldDrop();
if (drop_token != nullptr) {
// Update client load reporting stats to indicate the number of
// dropped calls. Note that we have to do this here instead of in
@@ -609,17 +627,11 @@ GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
// If pick succeeded, add LB token to initial metadata.
if (result.type == PickResult::PICK_COMPLETE &&
result.subchannel != nullptr) {
- const TokenAndClientStatsAttribute* attribute =
- static_cast<const TokenAndClientStatsAttribute*>(
- result.subchannel->GetAttribute(kGrpcLbAddressAttributeKey));
- if (attribute == nullptr) {
- gpr_log(GPR_ERROR, "[grpclb %p picker %p] No LB token for subchannel %p",
- parent_, this, result.subchannel.get());
- abort();
- }
+ const SubchannelWrapper* subchannel_wrapper =
+ static_cast<SubchannelWrapper*>(result.subchannel.get());
// Encode client stats object into metadata for use by
// client_load_reporting filter.
- GrpcLbClientStats* client_stats = attribute->client_stats();
+ GrpcLbClientStats* client_stats = subchannel_wrapper->client_stats();
if (client_stats != nullptr) {
client_stats->Ref().release(); // Ref passed via metadata.
// The metadata value is a hack: we pretend the pointer points to
@@ -635,10 +647,14 @@ GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
// Create a new copy on the call arena, since the subchannel list
// may get refreshed between when we return this pick and when the
// initial metadata goes out on the wire.
- char* lb_token = static_cast<char*>(
- args.call_state->Alloc(attribute->lb_token().size() + 1));
- strcpy(lb_token, attribute->lb_token().c_str());
- args.initial_metadata->Add(kGrpcLbLbTokenMetadataKey, lb_token);
+ if (!subchannel_wrapper->lb_token().empty()) {
+ char* lb_token = static_cast<char*>(
+ args.call_state->Alloc(subchannel_wrapper->lb_token().size() + 1));
+ strcpy(lb_token, subchannel_wrapper->lb_token().c_str());
+ args.initial_metadata->Add(kGrpcLbLbTokenMetadataKey, lb_token);
+ }
+ // Unwrap subchannel to pass up to the channel.
+ result.subchannel = subchannel_wrapper->wrapped_subchannel();
}
return result;
}
@@ -650,8 +666,21 @@ GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
RefCountedPtr<SubchannelInterface> GrpcLb::Helper::CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) {
if (parent_->shutting_down_) return nullptr;
- return parent_->channel_control_helper()->CreateSubchannel(std::move(address),
- args);
+ const TokenAndClientStatsAttribute* attribute =
+ static_cast<const TokenAndClientStatsAttribute*>(
+ address.GetAttribute(kGrpcLbAddressAttributeKey));
+ if (attribute == nullptr) {
+ gpr_log(GPR_ERROR,
+ "[grpclb %p] no TokenAndClientStatsAttribute for address %p",
+ parent_.get(), address.ToString().c_str());
+ abort();
+ }
+ TString lb_token = attribute->lb_token();
+ RefCountedPtr<GrpcLbClientStats> client_stats = attribute->client_stats();
+ return MakeRefCounted<SubchannelWrapper>(
+ parent_->channel_control_helper()->CreateSubchannel(std::move(address),
+ args),
+ std::move(lb_token), std::move(client_stats));
}
void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
@@ -662,56 +691,37 @@ void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
parent_->child_policy_ready_ = state == GRPC_CHANNEL_READY;
// Enter fallback mode if needed.
parent_->MaybeEnterFallbackModeAfterStartup();
- // There are three cases to consider here:
- // 1. We're in fallback mode. In this case, we're always going to use
- // the child policy's result, so we pass its picker through as-is.
- // 2. The serverlist contains only drop entries. In this case, we
- // want to use our own picker so that we can return the drops.
- // 3. Not in fallback mode and serverlist is not all drops (i.e., it
- // may be empty or contain at least one backend address). There are
- // two sub-cases:
- // a. The child policy is reporting state READY. In this case, we wrap
- // the child's picker in our own, so that we can handle drops and LB
- // token metadata for each pick.
- // b. The child policy is reporting a state other than READY. In this
- // case, we don't want to use our own picker, because we don't want
- // to process drops for picks that yield a QUEUE result; this would
- // result in dropping too many calls, since we will see the
- // queued picks multiple times, and we'd consider each one a
- // separate call for the drop calculation.
- //
- // Cases 1 and 3b: return picker from the child policy as-is.
- if (parent_->serverlist_ == nullptr ||
- (!parent_->serverlist_->ContainsAllDropEntries() &&
- state != GRPC_CHANNEL_READY)) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
- gpr_log(GPR_INFO,
- "[grpclb %p helper %p] state=%s (%s) passing "
- "child picker %p as-is",
- parent_.get(), this, ConnectivityStateName(state),
- status.ToString().c_str(), picker.get());
- }
- parent_->channel_control_helper()->UpdateState(state, status,
- std::move(picker));
- return;
- }
- // Cases 2 and 3a: wrap picker from the child in our own picker.
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
- gpr_log(GPR_INFO,
- "[grpclb %p helper %p] state=%s (%s) wrapping child "
- "picker %p",
- parent_.get(), this, ConnectivityStateName(state),
- status.ToString().c_str(), picker.get());
+ // We pass the serverlist to the picker so that it can handle drops.
+ // However, we don't want to handle drops in the case where the child
+ // policy is reporting a state other than READY (unless we are
+ // dropping *all* calls), because we don't want to process drops for picks
+ // that yield a QUEUE result; this would result in dropping too many calls,
+ // since we will see the queued picks multiple times, and we'd consider each
+ // one a separate call for the drop calculation. So in this case, we pass
+ // a null serverlist to the picker, which tells it not to do drops.
+ RefCountedPtr<Serverlist> serverlist;
+ if (state == GRPC_CHANNEL_READY ||
+ (parent_->serverlist_ != nullptr &&
+ parent_->serverlist_->ContainsAllDropEntries())) {
+ serverlist = parent_->serverlist_;
}
RefCountedPtr<GrpcLbClientStats> client_stats;
if (parent_->lb_calld_ != nullptr &&
parent_->lb_calld_->client_stats() != nullptr) {
client_stats = parent_->lb_calld_->client_stats()->Ref();
}
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
+ gpr_log(GPR_INFO,
+ "[grpclb %p helper %p] state=%s (%s) wrapping child "
+ "picker %p (serverlist=%p, client_stats=%p)",
+ parent_.get(), this, ConnectivityStateName(state),
+ status.ToString().c_str(), picker.get(), serverlist.get(),
+ client_stats.get());
+ }
parent_->channel_control_helper()->UpdateState(
state, status,
- y_absl::make_unique<Picker>(parent_.get(), parent_->serverlist_,
- std::move(picker), std::move(client_stats)));
+ y_absl::make_unique<Picker>(std::move(serverlist), std::move(picker),
+ std::move(client_stats)));
}
void GrpcLb::Helper::RequestReresolution() {
@@ -738,15 +748,16 @@ void GrpcLb::Helper::AddTraceEvent(TraceSeverity severity,
GrpcLb::BalancerCallState::BalancerCallState(
RefCountedPtr<LoadBalancingPolicy> parent_grpclb_policy)
- : InternallyRefCounted<BalancerCallState>(&grpc_lb_glb_trace),
+ : InternallyRefCounted<BalancerCallState>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace) ? "BalancerCallState"
+ : nullptr),
grpclb_policy_(std::move(parent_grpclb_policy)) {
GPR_ASSERT(grpclb_policy_ != nullptr);
GPR_ASSERT(!grpclb_policy()->shutting_down_);
// Init the LB call. Note that the LB call will progress every time there's
// activity in grpclb_policy_->interested_parties(), which is comprised of
// the polling entities from client_channel.
- GPR_ASSERT(grpclb_policy()->server_name_ != nullptr);
- GPR_ASSERT(grpclb_policy()->server_name_[0] != '\0');
+ GPR_ASSERT(!grpclb_policy()->server_name_.empty());
// Closure Initialization
GRPC_CLOSURE_INIT(&lb_on_initial_request_sent_, OnInitialRequestSent, this,
grpc_schedule_on_exec_ctx);
@@ -769,7 +780,7 @@ GrpcLb::BalancerCallState::BalancerCallState(
upb::Arena arena;
grpc_slice request_payload_slice = GrpcLbRequestCreate(
grpclb_policy()->config_->service_name().empty()
- ? grpclb_policy()->server_name_
+ ? grpclb_policy()->server_name_.c_str()
: grpclb_policy()->config_->service_name().c_str(),
arena.ptr());
send_message_payload_ =
@@ -835,8 +846,9 @@ void GrpcLb::BalancerCallState::StartQuery() {
// with the callback.
auto self = Ref(DEBUG_LOCATION, "on_initial_request_sent");
self.release();
- call_error = grpc_call_start_batch_and_execute(
- lb_call_, ops, (size_t)(op - ops), &lb_on_initial_request_sent_);
+ call_error = grpc_call_start_batch_and_execute(lb_call_, ops,
+ static_cast<size_t>(op - ops),
+ &lb_on_initial_request_sent_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
// Op: recv initial metadata.
op = ops;
@@ -858,7 +870,8 @@ void GrpcLb::BalancerCallState::StartQuery() {
self = Ref(DEBUG_LOCATION, "on_message_received");
self.release();
call_error = grpc_call_start_batch_and_execute(
- lb_call_, ops, (size_t)(op - ops), &lb_on_balancer_message_received_);
+ lb_call_, ops, static_cast<size_t>(op - ops),
+ &lb_on_balancer_message_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
// Op: recv server status.
op = ops;
@@ -874,7 +887,8 @@ void GrpcLb::BalancerCallState::StartQuery() {
// ref instead of a new ref. When it's invoked, it's the initial ref that is
// unreffed.
call_error = grpc_call_start_batch_and_execute(
- lb_call_, ops, (size_t)(op - ops), &lb_on_balancer_status_received_);
+ lb_call_, ops, static_cast<size_t>(op - ops),
+ &lb_on_balancer_status_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
@@ -932,7 +946,7 @@ void GrpcLb::BalancerCallState::SendClientLoadReportLocked() {
if (num_calls_started == 0 && num_calls_finished == 0 &&
num_calls_finished_with_client_failed_to_send == 0 &&
num_calls_finished_known_received == 0 &&
- (drop_token_counts == nullptr || drop_token_counts->size() == 0)) {
+ (drop_token_counts == nullptr || drop_token_counts->empty())) {
if (last_client_load_report_counters_were_zero_) {
ScheduleNextClientLoadReportLocked();
return;
@@ -1245,12 +1259,10 @@ ServerAddressList ExtractBalancerAddresses(const grpc_channel_args& args) {
* stream for the reception of load balancing updates.
*
* Inputs:
- * - \a addresses: corresponding to the balancers.
* - \a response_generator: in order to propagate updates from the resolver
* above the grpclb policy.
* - \a args: other args inherited from the grpclb policy. */
grpc_channel_args* BuildBalancerChannelArgs(
- const ServerAddressList& addresses,
FakeResolverResponseGenerator* response_generator,
const grpc_channel_args* args) {
// Channel args to remove.
@@ -1299,7 +1311,7 @@ grpc_channel_args* BuildBalancerChannelArgs(
args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), args_to_add.data(),
args_to_add.size());
// Make any necessary modifications for security.
- return ModifyGrpclbBalancerChannelArgs(addresses, new_args);
+ return ModifyGrpclbBalancerChannelArgs(new_args);
}
//
@@ -1326,15 +1338,14 @@ GrpcLb::GrpcLb(Args args)
const grpc_arg* arg = grpc_channel_args_find(args.args, GRPC_ARG_SERVER_URI);
const char* server_uri = grpc_channel_arg_get_string(arg);
GPR_ASSERT(server_uri != nullptr);
- grpc_uri* uri = grpc_uri_parse(server_uri, true);
- GPR_ASSERT(uri->path[0] != '\0');
- server_name_ = gpr_strdup(uri->path[0] == '/' ? uri->path + 1 : uri->path);
+ y_absl::StatusOr<URI> uri = URI::Parse(server_uri);
+ GPR_ASSERT(uri.ok() && !uri->path().empty());
+ server_name_ = TString(y_absl::StripPrefix(uri->path(), "/"));
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
gpr_log(GPR_INFO,
"[grpclb %p] Will use '%s' as the server name for LB request.",
- this, server_name_);
+ this, server_name_.c_str());
}
- grpc_uri_destroy(uri);
// Record LB call timeout.
arg = grpc_channel_args_find(args.args, GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS);
lb_call_timeout_ms_ = grpc_channel_arg_get_integer(arg, {0, 0, INT_MAX});
@@ -1344,10 +1355,7 @@ GrpcLb::GrpcLb(Args args)
arg, {GRPC_GRPCLB_DEFAULT_FALLBACK_TIMEOUT_MS, 0, INT_MAX});
}
-GrpcLb::~GrpcLb() {
- gpr_free((void*)server_name_);
- grpc_channel_args_destroy(args_);
-}
+GrpcLb::~GrpcLb() { grpc_channel_args_destroy(args_); }
void GrpcLb::ShutdownLocked() {
shutting_down_ = true;
@@ -1448,14 +1456,14 @@ void GrpcLb::ProcessAddressesAndChannelArgsLocked(
// since we use this to trigger the client_load_reporting filter.
static const char* args_to_remove[] = {GRPC_ARG_LB_POLICY_NAME};
grpc_arg new_arg = grpc_channel_arg_string_create(
- (char*)GRPC_ARG_LB_POLICY_NAME, (char*)"grpclb");
+ const_cast<char*>(GRPC_ARG_LB_POLICY_NAME), const_cast<char*>("grpclb"));
grpc_channel_args_destroy(args_);
args_ = grpc_channel_args_copy_and_add_and_remove(
&args, args_to_remove, GPR_ARRAY_SIZE(args_to_remove), &new_arg, 1);
// Construct args for balancer channel.
ServerAddressList balancer_addresses = ExtractBalancerAddresses(args);
- grpc_channel_args* lb_channel_args = BuildBalancerChannelArgs(
- balancer_addresses, response_generator_.get(), &args);
+ grpc_channel_args* lb_channel_args =
+ BuildBalancerChannelArgs(response_generator_.get(), &args);
// Create balancer channel if needed.
if (lb_channel_ == nullptr) {
TString uri_str = y_absl::StrCat("fake:///", server_name_);
@@ -1757,7 +1765,8 @@ bool maybe_add_client_load_reporting_filter(grpc_channel_stack_builder* builder,
// will minimize the number of metadata elements that the filter
// needs to iterate through to find the ClientStats object.
return grpc_channel_stack_builder_prepend_filter(
- builder, (const grpc_channel_filter*)arg, nullptr, nullptr);
+ builder, static_cast<const grpc_channel_filter*>(arg), nullptr,
+ nullptr);
}
return true;
}
@@ -1768,10 +1777,10 @@ void grpc_lb_policy_grpclb_init() {
grpc_core::LoadBalancingPolicyRegistry::Builder::
RegisterLoadBalancingPolicyFactory(
y_absl::make_unique<grpc_core::GrpcLbFactory>());
- grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
- GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- maybe_add_client_load_reporting_filter,
- (void*)&grpc_client_load_reporting_filter);
+ grpc_channel_init_register_stage(
+ GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
+ maybe_add_client_load_reporting_filter,
+ const_cast<grpc_channel_filter*>(&grpc_client_load_reporting_filter));
}
void grpc_lb_policy_grpclb_shutdown() {}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
index f8197a89bfb..07c5fd6fe9e 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.cc
@@ -24,8 +24,7 @@
namespace grpc_core {
-grpc_channel_args* ModifyGrpclbBalancerChannelArgs(
- const ServerAddressList& /*addresses*/, grpc_channel_args* args) {
+grpc_channel_args* ModifyGrpclbBalancerChannelArgs(grpc_channel_args* args) {
return args;
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
index 1458233022f..8ea48852855 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h
@@ -33,8 +33,7 @@ namespace grpc_core {
/// Takes ownership of \a args.
///
/// Caller takes ownership of the returned args.
-grpc_channel_args* ModifyGrpclbBalancerChannelArgs(
- const ServerAddressList& addresses, grpc_channel_args* args);
+grpc_channel_args* ModifyGrpclbBalancerChannelArgs(grpc_channel_args* args);
grpc_channel* CreateGrpclbBalancerChannel(const char* target_uri,
const grpc_channel_args& args);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
index e918ee08360..da975f0e708 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc
@@ -39,8 +39,7 @@
namespace grpc_core {
-grpc_channel_args* ModifyGrpclbBalancerChannelArgs(
- const ServerAddressList& addresses, grpc_channel_args* args) {
+grpc_channel_args* ModifyGrpclbBalancerChannelArgs(grpc_channel_args* args) {
y_absl::InlinedVector<const char*, 1> args_to_remove;
y_absl::InlinedVector<grpc_arg, 1> args_to_add;
// Substitute the channel credentials with a version without call
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
index 1566e7b5f17..7462d55cf24 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc
@@ -25,6 +25,8 @@
#include <grpc/support/atm.h>
#include <grpc/support/string_util.h>
+#include "y_absl/memory/memory.h"
+
#include "src/core/lib/gprpp/sync.h"
namespace grpc_core {
@@ -52,7 +54,7 @@ void GrpcLbClientStats::AddCallDropped(const char* token) {
// Record the drop.
MutexLock lock(&drop_count_mu_);
if (drop_token_counts_ == nullptr) {
- drop_token_counts_.reset(new DroppedCallCounts());
+ drop_token_counts_ = y_absl::make_unique<DroppedCallCounts>();
}
for (size_t i = 0; i < drop_token_counts_->size(); ++i) {
if (strcmp((*drop_token_counts_)[i].token.get(), token) == 0) {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
index 3185b993c41..2ba01c1e835 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc
@@ -155,13 +155,13 @@ grpc_millis grpc_grpclb_duration_to_millis(
} // namespace
-bool GrpcLbResponseParse(const grpc_slice& encoded_grpc_grpclb_response,
+bool GrpcLbResponseParse(const grpc_slice& serialized_response,
upb_arena* arena, GrpcLbResponse* result) {
grpc_lb_v1_LoadBalanceResponse* response =
grpc_lb_v1_LoadBalanceResponse_parse(
reinterpret_cast<const char*>(
- GRPC_SLICE_START_PTR(encoded_grpc_grpclb_response)),
- GRPC_SLICE_LENGTH(encoded_grpc_grpclb_response), arena);
+ GRPC_SLICE_START_PTR(serialized_response)),
+ GRPC_SLICE_LENGTH(serialized_response), arena);
// Handle serverlist responses.
if (ParseServerList(*response, &result->serverlist)) {
result->type = result->SERVERLIST;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
index 6caa120f587..1a55251bb35 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h
@@ -66,7 +66,7 @@ grpc_slice GrpcLbLoadReportRequestCreate(
// Deserialize a grpclb response.
bool GrpcLbResponseParse(const grpc_slice& serialized_response,
- upb_arena* arena, GrpcLbResponse* response);
+ upb_arena* arena, GrpcLbResponse* result);
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
index ab780530085..92bfff4602b 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc
@@ -55,7 +55,7 @@ class PickFirst : public LoadBalancingPolicy {
void ResetBackoffLocked() override;
private:
- ~PickFirst();
+ ~PickFirst() override;
class PickFirstSubchannelList;
@@ -94,7 +94,7 @@ class PickFirst : public LoadBalancingPolicy {
policy->Ref(DEBUG_LOCATION, "subchannel_list").release();
}
- ~PickFirstSubchannelList() {
+ ~PickFirstSubchannelList() override {
PickFirst* p = static_cast<PickFirst*>(policy());
p->Unref(DEBUG_LOCATION, "subchannel_list");
}
@@ -497,7 +497,7 @@ class PickFirstFactory : public LoadBalancingPolicyFactory {
const char* name() const override { return kPickFirst; }
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
- const Json& json, grpc_error** /*error*/) const override {
+ const Json& /*json*/, grpc_error** /*error*/) const override {
return MakeRefCounted<PickFirstConfig>();
}
};
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
index 38114b1a007..b01fe874333 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc
@@ -56,23 +56,24 @@ constexpr int kDefaultChildFailoverTimeoutMs = 10000;
// Config for priority LB policy.
class PriorityLbConfig : public LoadBalancingPolicy::Config {
public:
- PriorityLbConfig(
- std::map<TString, RefCountedPtr<LoadBalancingPolicy::Config>>
- children,
- std::vector<TString> priorities)
+ struct PriorityLbChild {
+ RefCountedPtr<LoadBalancingPolicy::Config> config;
+ bool ignore_reresolution_requests = false;
+ };
+
+ PriorityLbConfig(std::map<TString, PriorityLbChild> children,
+ std::vector<TString> priorities)
: children_(std::move(children)), priorities_(std::move(priorities)) {}
const char* name() const override { return kPriority; }
- const std::map<TString, RefCountedPtr<LoadBalancingPolicy::Config>>&
- children() const {
+ const std::map<TString, PriorityLbChild>& children() const {
return children_;
}
const std::vector<TString>& priorities() const { return priorities_; }
private:
- const std::map<TString, RefCountedPtr<LoadBalancingPolicy::Config>>
- children_;
+ const std::map<TString, PriorityLbChild> children_;
const std::vector<TString> priorities_;
};
@@ -93,13 +94,14 @@ class PriorityLb : public LoadBalancingPolicy {
public:
ChildPriority(RefCountedPtr<PriorityLb> priority_policy, TString name);
- ~ChildPriority() {
+ ~ChildPriority() override {
priority_policy_.reset(DEBUG_LOCATION, "ChildPriority");
}
const TString& name() const { return name_; }
- void UpdateLocked(RefCountedPtr<LoadBalancingPolicy::Config> config);
+ void UpdateLocked(RefCountedPtr<LoadBalancingPolicy::Config> config,
+ bool ignore_reresolution_requests);
void ExitIdleLocked();
void ResetBackoffLocked();
void DeactivateLocked();
@@ -152,7 +154,7 @@ class PriorityLb : public LoadBalancingPolicy {
explicit Helper(RefCountedPtr<ChildPriority> priority)
: priority_(std::move(priority)) {}
- ~Helper() { priority_.reset(DEBUG_LOCATION, "Helper"); }
+ ~Helper() override { priority_.reset(DEBUG_LOCATION, "Helper"); }
RefCountedPtr<SubchannelInterface> CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) override;
@@ -184,6 +186,7 @@ class PriorityLb : public LoadBalancingPolicy {
RefCountedPtr<PriorityLb> priority_policy_;
const TString name_;
+ bool ignore_reresolution_requests_ = false;
OrphanablePtr<LoadBalancingPolicy> child_policy_;
@@ -202,7 +205,7 @@ class PriorityLb : public LoadBalancingPolicy {
bool failover_timer_callback_pending_ = false;
};
- ~PriorityLb();
+ ~PriorityLb() override;
void ShutdownLocked() override;
@@ -311,7 +314,8 @@ void PriorityLb::UpdateLocked(UpdateArgs args) {
child->DeactivateLocked();
} else {
// Existing child found in new config. Update it.
- child->UpdateLocked(config_it->second);
+ child->UpdateLocked(config_it->second.config,
+ config_it->second.ignore_reresolution_requests);
}
}
// Try to get connected.
@@ -359,8 +363,10 @@ void PriorityLb::HandleChildConnectivityStateChangeLocked(
// Otherwise, find the child's priority.
uint32_t child_priority = GetChildPriorityLocked(child->name());
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_priority_trace)) {
- gpr_log(GPR_INFO, "[priority_lb %p] state update for priority %d, child %s",
- this, child_priority, child->name().c_str());
+ gpr_log(GPR_INFO,
+ "[priority_lb %p] state update for priority %u, child %s, current "
+ "priority %u",
+ this, child_priority, child->name().c_str(), current_priority_);
}
// Ignore priorities not in the current config.
if (child_priority == UINT32_MAX) return;
@@ -408,12 +414,13 @@ void PriorityLb::DeleteChild(ChildPriority* child) {
}
void PriorityLb::TryNextPriorityLocked(bool report_connecting) {
+ current_priority_ = UINT32_MAX;
for (uint32_t priority = 0; priority < config_->priorities().size();
++priority) {
// If the child for the priority does not exist yet, create it.
const TString& child_name = config_->priorities()[priority];
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_priority_trace)) {
- gpr_log(GPR_INFO, "[priority_lb %p] trying priority %d, child %s", this,
+ gpr_log(GPR_INFO, "[priority_lb %p] trying priority %u, child %s", this,
priority, child_name.c_str());
}
auto& child = children_[child_name];
@@ -425,7 +432,10 @@ void PriorityLb::TryNextPriorityLocked(bool report_connecting) {
}
child = MakeOrphanable<ChildPriority>(
Ref(DEBUG_LOCATION, "ChildPriority"), child_name);
- child->UpdateLocked(config_->children().find(child_name)->second);
+ auto child_config = config_->children().find(child_name);
+ GPR_DEBUG_ASSERT(child_config != config_->children().end());
+ child->UpdateLocked(child_config->second.config,
+ child_config->second.ignore_reresolution_requests);
return;
}
// The child already exists.
@@ -441,7 +451,7 @@ void PriorityLb::TryNextPriorityLocked(bool report_connecting) {
if (child->failover_timer_callback_pending()) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_priority_trace)) {
gpr_log(GPR_INFO,
- "[priority_lb %p] priority %d, child %s: child still "
+ "[priority_lb %p] priority %u, child %s: child still "
"attempting to connect, will wait",
this, priority, child_name.c_str());
}
@@ -461,7 +471,6 @@ void PriorityLb::TryNextPriorityLocked(bool report_connecting) {
"TRANSIENT_FAILURE",
this);
}
- current_priority_ = UINT32_MAX;
current_child_from_before_update_ = nullptr;
grpc_error* error = grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("no ready priority"),
@@ -473,7 +482,7 @@ void PriorityLb::TryNextPriorityLocked(bool report_connecting) {
void PriorityLb::SelectPriorityLocked(uint32_t priority) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_priority_trace)) {
- gpr_log(GPR_INFO, "[priority_lb %p] selected priority %d, child %s", this,
+ gpr_log(GPR_INFO, "[priority_lb %p] selected priority %u, child %s", this,
priority, config_->priorities()[priority].c_str());
}
current_priority_ = priority;
@@ -534,12 +543,14 @@ void PriorityLb::ChildPriority::Orphan() {
}
void PriorityLb::ChildPriority::UpdateLocked(
- RefCountedPtr<LoadBalancingPolicy::Config> config) {
+ RefCountedPtr<LoadBalancingPolicy::Config> config,
+ bool ignore_reresolution_requests) {
if (priority_policy_->shutting_down_) return;
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_priority_trace)) {
gpr_log(GPR_INFO, "[priority_lb %p] child %s (%p): start update",
priority_policy_.get(), name_.c_str(), this);
}
+ ignore_reresolution_requests_ = ignore_reresolution_requests;
// Create policy if needed.
if (child_policy_ == nullptr) {
child_policy_ = CreateChildPolicyLocked(priority_policy_->args_);
@@ -731,6 +742,9 @@ void PriorityLb::ChildPriority::OnDeactivationTimerLocked(grpc_error* error) {
void PriorityLb::ChildPriority::Helper::RequestReresolution() {
if (priority_->priority_policy_->shutting_down_) return;
+ if (priority_->ignore_reresolution_requests_) {
+ return;
+ }
priority_->priority_policy_->channel_control_helper()->RequestReresolution();
}
@@ -784,7 +798,7 @@ class PriorityLbFactory : public LoadBalancingPolicyFactory {
}
std::vector<grpc_error*> error_list;
// Children.
- std::map<TString, RefCountedPtr<LoadBalancingPolicy::Config>> children;
+ std::map<TString, PriorityLbConfig::PriorityLbChild> children;
auto it = json.object_value().find("children");
if (it == json.object_value().end()) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -813,6 +827,22 @@ class PriorityLbFactory : public LoadBalancingPolicyFactory {
grpc_error* parse_error = GRPC_ERROR_NONE;
auto config = LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
it2->second, &parse_error);
+ bool ignore_resolution_requests = false;
+ // If present, ignore_reresolution_requests must be of type
+ // boolean.
+ auto it3 =
+ element.object_value().find("ignore_reresolution_requests");
+ if (it3 != element.object_value().end()) {
+ if (it3->second.type() == Json::Type::JSON_TRUE) {
+ ignore_resolution_requests = true;
+ } else if (it3->second.type() != Json::Type::JSON_FALSE) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:children key:", child_name,
+ " field:ignore_reresolution_requests:should "
+ "be type boolean")
+ .c_str()));
+ }
+ }
if (config == nullptr) {
GPR_DEBUG_ASSERT(parse_error != GRPC_ERROR_NONE);
error_list.push_back(
@@ -821,7 +851,9 @@ class PriorityLbFactory : public LoadBalancingPolicyFactory {
&parse_error, 1));
GRPC_ERROR_UNREF(parse_error);
}
- children[child_name] = std::move(config);
+ children[child_name].config = std::move(config);
+ children[child_name].ignore_reresolution_requests =
+ ignore_resolution_requests;
}
}
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
new file mode 100644
index 00000000000..921bd2e0078
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc
@@ -0,0 +1,23 @@
+//
+// Copyright 2018 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+namespace grpc_core {
+
+const char* kRequestRingHashAttribute = "request_ring_hash";
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h
new file mode 100644
index 00000000000..dc176c2dc49
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h
@@ -0,0 +1,27 @@
+//
+// Copyright 2018 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H
+#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H
+
+#include <grpc/support/port_platform.h>
+
+namespace grpc_core {
+extern const char* kRequestRingHashAttribute;
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
index b277add32a1..ce12a315300 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc
@@ -65,7 +65,7 @@ class RoundRobin : public LoadBalancingPolicy {
void ResetBackoffLocked() override;
private:
- ~RoundRobin();
+ ~RoundRobin() override;
// Forward declaration.
class RoundRobinSubchannelList;
@@ -122,7 +122,7 @@ class RoundRobin : public LoadBalancingPolicy {
policy->Ref(DEBUG_LOCATION, "subchannel_list").release();
}
- ~RoundRobinSubchannelList() {
+ ~RoundRobinSubchannelList() override {
RoundRobin* p = static_cast<RoundRobin*>(policy());
p->Unref(DEBUG_LOCATION, "subchannel_list");
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
index db46cd1104e..e9dd0886a40 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h
@@ -143,7 +143,9 @@ class SubchannelData {
: subchannel_data_(subchannel_data),
subchannel_list_(std::move(subchannel_list)) {}
- ~Watcher() { subchannel_list_.reset(DEBUG_LOCATION, "Watcher dtor"); }
+ ~Watcher() override {
+ subchannel_list_.reset(DEBUG_LOCATION, "Watcher dtor");
+ }
void OnConnectivityStateChange(grpc_connectivity_state new_state) override;
@@ -354,7 +356,8 @@ SubchannelList<SubchannelListType, SubchannelDataType>::SubchannelList(
LoadBalancingPolicy* policy, TraceFlag* tracer, ServerAddressList addresses,
LoadBalancingPolicy::ChannelControlHelper* helper,
const grpc_channel_args& args) Y_NO_SANITIZE("undefined")
- : InternallyRefCounted<SubchannelListType>(tracer),
+ : InternallyRefCounted<SubchannelListType>(
+ GRPC_TRACE_FLAG_ENABLED(*tracer) ? "SubchannelList" : nullptr),
policy_(policy),
tracer_(tracer) {
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
@@ -364,9 +367,9 @@ SubchannelList<SubchannelListType, SubchannelDataType>::SubchannelList(
}
subchannels_.reserve(addresses.size());
// Create a subchannel for each address.
- for (const ServerAddress& address : addresses) {
+ for (ServerAddress address : addresses) {
RefCountedPtr<SubchannelInterface> subchannel =
- helper->CreateSubchannel(std::move(address), args);
+ helper->CreateSubchannel(address, args);
if (subchannel == nullptr) {
// Subchannel could not be created.
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
@@ -384,7 +387,7 @@ SubchannelList<SubchannelListType, SubchannelDataType>::SubchannelList(
tracer_->name(), policy_, this, subchannels_.size(),
subchannel.get(), address.ToString().c_str());
}
- subchannels_.emplace_back(this, address, std::move(subchannel));
+ subchannels_.emplace_back(this, std::move(address), std::move(subchannel));
}
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
index d1d225930a5..affc0e99392 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc
@@ -118,7 +118,7 @@ class WeightedTargetLb : public LoadBalancingPolicy {
public:
WeightedChild(RefCountedPtr<WeightedTargetLb> weighted_target_policy,
const TString& name);
- ~WeightedChild();
+ ~WeightedChild() override;
void Orphan() override;
@@ -142,7 +142,7 @@ class WeightedTargetLb : public LoadBalancingPolicy {
explicit Helper(RefCountedPtr<WeightedChild> weighted_child)
: weighted_child_(std::move(weighted_child)) {}
- ~Helper() { weighted_child_.reset(DEBUG_LOCATION, "Helper"); }
+ ~Helper() override { weighted_child_.reset(DEBUG_LOCATION, "Helper"); }
RefCountedPtr<SubchannelInterface> CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) override;
@@ -188,7 +188,7 @@ class WeightedTargetLb : public LoadBalancingPolicy {
bool shutdown_ = false;
};
- ~WeightedTargetLb();
+ ~WeightedTargetLb() override;
void ShutdownLocked() override;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
index b81106cc31b..d62fe49cb36 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc
@@ -24,6 +24,7 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/service_config.h"
+#include "src/core/ext/xds/xds_certificate_provider.h"
#include "src/core/ext/xds/xds_client.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gprpp/memory.h"
@@ -31,6 +32,7 @@
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/security/credentials/xds/xds_credentials.h"
#include "src/core/lib/transport/error_utils.h"
namespace grpc_core {
@@ -61,26 +63,31 @@ class CdsLb : public LoadBalancingPolicy {
void UpdateLocked(UpdateArgs args) override;
void ResetBackoffLocked() override;
+ void ExitIdleLocked() override;
private:
// Watcher for getting cluster data from XdsClient.
class ClusterWatcher : public XdsClient::ClusterWatcherInterface {
public:
- explicit ClusterWatcher(RefCountedPtr<CdsLb> parent)
- : parent_(std::move(parent)) {}
+ ClusterWatcher(RefCountedPtr<CdsLb> parent, TString name)
+ : parent_(std::move(parent)), name_(std::move(name)) {}
void OnClusterChanged(XdsApi::CdsUpdate cluster_data) override {
- new Notifier(parent_, std::move(cluster_data));
+ new Notifier(parent_, name_, std::move(cluster_data));
}
- void OnError(grpc_error* error) override { new Notifier(parent_, error); }
- void OnResourceDoesNotExist() override { new Notifier(parent_); }
+ void OnError(grpc_error* error) override {
+ new Notifier(parent_, name_, error);
+ }
+ void OnResourceDoesNotExist() override { new Notifier(parent_, name_); }
private:
class Notifier {
public:
- Notifier(RefCountedPtr<CdsLb> parent, XdsApi::CdsUpdate update);
- Notifier(RefCountedPtr<CdsLb> parent, grpc_error* error);
- explicit Notifier(RefCountedPtr<CdsLb> parent);
+ Notifier(RefCountedPtr<CdsLb> parent, TString name,
+ XdsApi::CdsUpdate update);
+ Notifier(RefCountedPtr<CdsLb> parent, TString name,
+ grpc_error* error);
+ explicit Notifier(RefCountedPtr<CdsLb> parent, TString name);
private:
enum Type { kUpdate, kError, kDoesNotExist };
@@ -89,12 +96,22 @@ class CdsLb : public LoadBalancingPolicy {
void RunInWorkSerializer(grpc_error* error);
RefCountedPtr<CdsLb> parent_;
+ TString name_;
grpc_closure closure_;
XdsApi::CdsUpdate update_;
Type type_;
};
RefCountedPtr<CdsLb> parent_;
+ TString name_;
+ };
+
+ struct WatcherState {
+ // Pointer to watcher, to be used when cancelling.
+ // Not owned, so do not dereference.
+ ClusterWatcher* watcher = nullptr;
+ // Most recent update obtained from this watcher.
+ y_absl::optional<XdsApi::CdsUpdate> update;
};
// Delegating helper to be passed to child policy.
@@ -113,13 +130,24 @@ class CdsLb : public LoadBalancingPolicy {
RefCountedPtr<CdsLb> parent_;
};
- ~CdsLb();
+ ~CdsLb() override;
void ShutdownLocked() override;
- void OnClusterChanged(XdsApi::CdsUpdate cluster_data);
- void OnError(grpc_error* error);
- void OnResourceDoesNotExist();
+ bool GenerateDiscoveryMechanismForCluster(
+ const TString& name, Json::Array* discovery_mechanisms,
+ std::set<TString>* clusters_needed);
+ void OnClusterChanged(const TString& name,
+ XdsApi::CdsUpdate cluster_data);
+ void OnError(const TString& name, grpc_error* error);
+ void OnResourceDoesNotExist(const TString& name);
+
+ grpc_error* UpdateXdsCertificateProvider(
+ const TString& cluster_name, const XdsApi::CdsUpdate& cluster_data);
+
+ void CancelClusterDataWatch(y_absl::string_view cluster_name,
+ XdsClient::ClusterWatcherInterface* watcher,
+ bool delay_unsubscription = false);
void MaybeDestroyChildPolicyLocked();
@@ -130,9 +158,14 @@ class CdsLb : public LoadBalancingPolicy {
// The xds client.
RefCountedPtr<XdsClient> xds_client_;
- // A pointer to the cluster watcher, to be used when cancelling the watch.
- // Note that this is not owned, so this pointer must never be derefernced.
- ClusterWatcher* cluster_watcher_ = nullptr;
+
+ // Maps from cluster name to the state for that cluster.
+ // The root of the tree is config_->cluster().
+ std::map<TString, WatcherState> watchers_;
+
+ RefCountedPtr<grpc_tls_certificate_provider> root_certificate_provider_;
+ RefCountedPtr<grpc_tls_certificate_provider> identity_certificate_provider_;
+ RefCountedPtr<XdsCertificateProvider> xds_certificate_provider_;
// Child LB policy.
OrphanablePtr<LoadBalancingPolicy> child_policy_;
@@ -146,21 +179,26 @@ class CdsLb : public LoadBalancingPolicy {
//
CdsLb::ClusterWatcher::Notifier::Notifier(RefCountedPtr<CdsLb> parent,
+ TString name,
XdsApi::CdsUpdate update)
- : parent_(std::move(parent)), update_(std::move(update)), type_(kUpdate) {
+ : parent_(std::move(parent)),
+ name_(std::move(name)),
+ update_(std::move(update)),
+ type_(kUpdate) {
GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
}
CdsLb::ClusterWatcher::Notifier::Notifier(RefCountedPtr<CdsLb> parent,
- grpc_error* error)
- : parent_(std::move(parent)), type_(kError) {
+ TString name, grpc_error* error)
+ : parent_(std::move(parent)), name_(std::move(name)), type_(kError) {
GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
ExecCtx::Run(DEBUG_LOCATION, &closure_, error);
}
-CdsLb::ClusterWatcher::Notifier::Notifier(RefCountedPtr<CdsLb> parent)
- : parent_(std::move(parent)), type_(kDoesNotExist) {
+CdsLb::ClusterWatcher::Notifier::Notifier(RefCountedPtr<CdsLb> parent,
+ TString name)
+ : parent_(std::move(parent)), name_(std::move(name)), type_(kDoesNotExist) {
GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
}
@@ -176,13 +214,13 @@ void CdsLb::ClusterWatcher::Notifier::RunInExecCtx(void* arg,
void CdsLb::ClusterWatcher::Notifier::RunInWorkSerializer(grpc_error* error) {
switch (type_) {
case kUpdate:
- parent_->OnClusterChanged(std::move(update_));
+ parent_->OnClusterChanged(name_, std::move(update_));
break;
case kError:
- parent_->OnError(error);
+ parent_->OnError(name_, error);
break;
case kDoesNotExist:
- parent_->OnResourceDoesNotExist();
+ parent_->OnResourceDoesNotExist(name_);
break;
};
delete this;
@@ -252,13 +290,15 @@ void CdsLb::ShutdownLocked() {
shutting_down_ = true;
MaybeDestroyChildPolicyLocked();
if (xds_client_ != nullptr) {
- if (cluster_watcher_ != nullptr) {
+ for (auto& watcher : watchers_) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
gpr_log(GPR_INFO, "[cdslb %p] cancelling watch for cluster %s", this,
- config_->cluster().c_str());
+ watcher.first.c_str());
}
- xds_client_->CancelClusterDataWatch(config_->cluster(), cluster_watcher_);
+ CancelClusterDataWatch(watcher.first, watcher.second.watcher,
+ /*delay_unsubscription=*/false);
}
+ watchers_.clear();
xds_client_.reset(DEBUG_LOCATION, "CdsLb");
}
grpc_channel_args_destroy(args_);
@@ -277,6 +317,10 @@ void CdsLb::ResetBackoffLocked() {
if (child_policy_ != nullptr) child_policy_->ResetBackoffLocked();
}
+void CdsLb::ExitIdleLocked() {
+ if (child_policy_ != nullptr) child_policy_->ExitIdleLocked();
+}
+
void CdsLb::UpdateLocked(UpdateArgs args) {
// Update config.
auto old_config = std::move(config_);
@@ -292,110 +336,214 @@ void CdsLb::UpdateLocked(UpdateArgs args) {
// If cluster name changed, cancel watcher and restart.
if (old_config == nullptr || old_config->cluster() != config_->cluster()) {
if (old_config != nullptr) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
- gpr_log(GPR_INFO, "[cdslb %p] cancelling watch for cluster %s", this,
- old_config->cluster().c_str());
+ for (auto& watcher : watchers_) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
+ gpr_log(GPR_INFO, "[cdslb %p] cancelling watch for cluster %s", this,
+ watcher.first.c_str());
+ }
+ CancelClusterDataWatch(watcher.first, watcher.second.watcher,
+ /*delay_unsubscription=*/true);
}
- xds_client_->CancelClusterDataWatch(old_config->cluster(),
- cluster_watcher_,
- /*delay_unsubscription=*/true);
- }
- if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
- gpr_log(GPR_INFO, "[cdslb %p] starting watch for cluster %s", this,
- config_->cluster().c_str());
+ watchers_.clear();
}
- auto watcher = y_absl::make_unique<ClusterWatcher>(Ref());
- cluster_watcher_ = watcher.get();
+ auto watcher = y_absl::make_unique<ClusterWatcher>(Ref(), config_->cluster());
+ watchers_[config_->cluster()].watcher = watcher.get();
xds_client_->WatchClusterData(config_->cluster(), std::move(watcher));
}
}
-void CdsLb::OnClusterChanged(XdsApi::CdsUpdate cluster_data) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
- gpr_log(GPR_INFO,
- "[cdslb %p] received CDS update from xds client %p: "
- "eds_service_name=%s lrs_load_reporting_server_name=%s "
- "max_concurrent_requests=%d",
- this, xds_client_.get(), cluster_data.eds_service_name.c_str(),
- cluster_data.lrs_load_reporting_server_name.has_value()
- ? cluster_data.lrs_load_reporting_server_name.value().c_str()
- : "(unset)",
- cluster_data.max_concurrent_requests);
+// This method will attempt to generate one or multiple entries of discovery
+// mechanism recursively:
+// For cluster types EDS or LOGICAL_DNS, one discovery mechanism entry may be
+// generated cluster name, type and other data from the CdsUpdate inserted into
+// the entry and the entry appended to the array of entries.
+// Note, discovery mechanism entry can be generated if an CdsUpdate is
+// available; otherwise, just return false. For cluster type AGGREGATE,
+// recursively call the method for each child cluster.
+bool CdsLb::GenerateDiscoveryMechanismForCluster(
+ const TString& name, Json::Array* discovery_mechanisms,
+ std::set<TString>* clusters_needed) {
+ clusters_needed->insert(name);
+ auto& state = watchers_[name];
+ // Create a new watcher if needed.
+ if (state.watcher == nullptr) {
+ auto watcher = y_absl::make_unique<ClusterWatcher>(Ref(), name);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
+ gpr_log(GPR_INFO, "[cdslb %p] starting watch for cluster %s", this,
+ name.c_str());
+ }
+ state.watcher = watcher.get();
+ xds_client_->WatchClusterData(name, std::move(watcher));
+ return false;
}
- // Construct config for child policy.
- Json::Object child_config = {
- {"clusterName", config_->cluster()},
- {"max_concurrent_requests", cluster_data.max_concurrent_requests},
- {"localityPickingPolicy",
- Json::Array{
- Json::Object{
- {"weighted_target_experimental",
- Json::Object{
- {"targets", Json::Object()},
- }},
- },
- }},
- {"endpointPickingPolicy",
- Json::Array{
- Json::Object{
- {"round_robin", Json::Object()},
- },
- }},
- };
- if (!cluster_data.eds_service_name.empty()) {
- child_config["edsServiceName"] = cluster_data.eds_service_name;
+ // Don't have the update we need yet.
+ if (!state.update.has_value()) return false;
+ // For AGGREGATE clusters, recursively expand to child clusters.
+ if (state.update->cluster_type == XdsApi::CdsUpdate::ClusterType::AGGREGATE) {
+ bool missing_cluster = false;
+ for (const TString& child_name :
+ state.update->prioritized_cluster_names) {
+ if (!GenerateDiscoveryMechanismForCluster(
+ child_name, discovery_mechanisms, clusters_needed)) {
+ missing_cluster = true;
+ }
+ }
+ return !missing_cluster;
}
- if (cluster_data.lrs_load_reporting_server_name.has_value()) {
- child_config["lrsLoadReportingServerName"] =
- cluster_data.lrs_load_reporting_server_name.value();
+ TString type;
+ switch (state.update->cluster_type) {
+ case XdsApi::CdsUpdate::ClusterType::EDS:
+ type = "EDS";
+ break;
+ case XdsApi::CdsUpdate::ClusterType::LOGICAL_DNS:
+ type = "LOGICAL_DNS";
+ break;
+ default:
+ GPR_ASSERT(0);
+ break;
}
- Json json = Json::Array{
- Json::Object{
- {"eds_experimental", std::move(child_config)},
- },
+ Json::Object mechanism = {
+ {"clusterName", name},
+ {"max_concurrent_requests", state.update->max_concurrent_requests},
+ {"type", std::move(type)},
};
+ if (!state.update->eds_service_name.empty()) {
+ mechanism["edsServiceName"] = state.update->eds_service_name;
+ }
+ if (state.update->lrs_load_reporting_server_name.has_value()) {
+ mechanism["lrsLoadReportingServerName"] =
+ state.update->lrs_load_reporting_server_name.value();
+ }
+ discovery_mechanisms->emplace_back(std::move(mechanism));
+ return true;
+}
+
+void CdsLb::OnClusterChanged(const TString& name,
+ XdsApi::CdsUpdate cluster_data) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
- TString json_str = json.Dump(/*indent=*/1);
- gpr_log(GPR_INFO, "[cdslb %p] generated config for child policy: %s", this,
- json_str.c_str());
+ gpr_log(
+ GPR_INFO,
+ "[cdslb %p] received CDS update for cluster %s from xds client %p: %s",
+ this, name.c_str(), xds_client_.get(), cluster_data.ToString().c_str());
}
+ // Store the update in the map if we are still interested in watching this
+ // cluster (i.e., it is not cancelled already).
+ // If we've already deleted this entry, then this is an update notification
+ // that was scheduled before the deletion, so we can just ignore it.
+ auto it = watchers_.find(name);
+ if (it == watchers_.end()) return;
+ it->second.update = cluster_data;
+ // Take care of integration with new certificate code.
grpc_error* error = GRPC_ERROR_NONE;
- RefCountedPtr<LoadBalancingPolicy::Config> config =
- LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(json, &error);
+ error = UpdateXdsCertificateProvider(name, it->second.update.value());
if (error != GRPC_ERROR_NONE) {
- OnError(error);
- return;
+ return OnError(name, error);
}
- // Create child policy if not already present.
- if (child_policy_ == nullptr) {
- LoadBalancingPolicy::Args args;
- args.work_serializer = work_serializer();
- args.args = args_;
- args.channel_control_helper = y_absl::make_unique<Helper>(Ref());
- child_policy_ = LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(
- config->name(), std::move(args));
- if (child_policy_ == nullptr) {
- OnError(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "failed to create child policy"));
+ // Scan the map starting from the root cluster to generate the list of
+ // discovery mechanisms. If we don't have some of the data we need (i.e., we
+ // just started up and not all watchers have returned data yet), then don't
+ // update the child policy at all.
+ Json::Array discovery_mechanisms;
+ std::set<TString> clusters_needed;
+ if (GenerateDiscoveryMechanismForCluster(
+ config_->cluster(), &discovery_mechanisms, &clusters_needed)) {
+ // Construct config for child policy.
+ Json::Object xds_lb_policy;
+ if (cluster_data.lb_policy == "RING_HASH") {
+ TString hash_function;
+ switch (cluster_data.hash_function) {
+ case XdsApi::CdsUpdate::HashFunction::XX_HASH:
+ hash_function = "XX_HASH";
+ break;
+ case XdsApi::CdsUpdate::HashFunction::MURMUR_HASH_2:
+ hash_function = "MURMUR_HASH_2";
+ break;
+ default:
+ GPR_ASSERT(0);
+ break;
+ }
+ xds_lb_policy["RING_HASH"] = Json::Object{
+ {"min_ring_size", cluster_data.min_ring_size},
+ {"max_ring_size", cluster_data.max_ring_size},
+ {"hash_function", hash_function},
+ };
+ } else {
+ xds_lb_policy["ROUND_ROBIN"] = Json::Object();
+ }
+ Json::Object child_config = {
+ {"xdsLbPolicy",
+ Json::Array{
+ xds_lb_policy,
+ }},
+ {"discoveryMechanisms", std::move(discovery_mechanisms)},
+ };
+ Json json = Json::Array{
+ Json::Object{
+ {"xds_cluster_resolver_experimental", std::move(child_config)},
+ },
+ };
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
+ TString json_str = json.Dump(/*indent=*/1);
+ gpr_log(GPR_INFO, "[cdslb %p] generated config for child policy: %s",
+ this, json_str.c_str());
+ }
+ RefCountedPtr<LoadBalancingPolicy::Config> config =
+ LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(json, &error);
+ if (error != GRPC_ERROR_NONE) {
+ OnError(name, error);
return;
}
- grpc_pollset_set_add_pollset_set(child_policy_->interested_parties(),
- interested_parties());
+ // Create child policy if not already present.
+ if (child_policy_ == nullptr) {
+ LoadBalancingPolicy::Args args;
+ args.work_serializer = work_serializer();
+ args.args = args_;
+ args.channel_control_helper = y_absl::make_unique<Helper>(Ref());
+ child_policy_ = LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(
+ config->name(), std::move(args));
+ if (child_policy_ == nullptr) {
+ OnError(name, GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "failed to create child policy"));
+ return;
+ }
+ grpc_pollset_set_add_pollset_set(child_policy_->interested_parties(),
+ interested_parties());
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
+ gpr_log(GPR_INFO, "[cdslb %p] created child policy %s (%p)", this,
+ config->name(), child_policy_.get());
+ }
+ }
+ // Update child policy.
+ UpdateArgs args;
+ args.config = std::move(config);
+ if (xds_certificate_provider_ != nullptr) {
+ grpc_arg arg_to_add = xds_certificate_provider_->MakeChannelArg();
+ args.args = grpc_channel_args_copy_and_add(args_, &arg_to_add, 1);
+ } else {
+ args.args = grpc_channel_args_copy(args_);
+ }
+ child_policy_->UpdateLocked(std::move(args));
+ }
+ // Remove entries in watchers_ for any clusters not in clusters_needed
+ for (auto it = watchers_.begin(); it != watchers_.end();) {
+ const TString& cluster_name = it->first;
+ if (clusters_needed.find(cluster_name) != clusters_needed.end()) {
+ ++it;
+ continue;
+ }
if (GRPC_TRACE_FLAG_ENABLED(grpc_cds_lb_trace)) {
- gpr_log(GPR_INFO, "[cdslb %p] created child policy %s (%p)", this,
- config->name(), child_policy_.get());
+ gpr_log(GPR_INFO, "[cdslb %p] cancelling watch for cluster %s", this,
+ cluster_name.c_str());
}
+ CancelClusterDataWatch(cluster_name, it->second.watcher,
+ /*delay_unsubscription=*/false);
+ it = watchers_.erase(it);
}
- // Update child policy.
- UpdateArgs args;
- args.config = std::move(config);
- args.args = grpc_channel_args_copy(args_);
- child_policy_->UpdateLocked(std::move(args));
}
-void CdsLb::OnError(grpc_error* error) {
+void CdsLb::OnError(const TString& name, grpc_error* error) {
gpr_log(GPR_ERROR, "[cdslb %p] xds error obtaining data for cluster %s: %s",
- this, config_->cluster().c_str(), grpc_error_string(error));
+ this, name.c_str(), grpc_error_string(error));
// Go into TRANSIENT_FAILURE if we have not yet created the child
// policy (i.e., we have not yet received data from xds). Otherwise,
// we keep running with the data we had previously.
@@ -408,11 +556,11 @@ void CdsLb::OnError(grpc_error* error) {
}
}
-void CdsLb::OnResourceDoesNotExist() {
+void CdsLb::OnResourceDoesNotExist(const TString& name) {
gpr_log(GPR_ERROR,
"[cdslb %p] CDS resource for %s does not exist -- reporting "
"TRANSIENT_FAILURE",
- this, config_->cluster().c_str());
+ this, name.c_str());
grpc_error* error =
grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("CDS resource \"", config_->cluster(),
@@ -425,6 +573,118 @@ void CdsLb::OnResourceDoesNotExist() {
MaybeDestroyChildPolicyLocked();
}
+grpc_error* CdsLb::UpdateXdsCertificateProvider(
+ const TString& cluster_name, const XdsApi::CdsUpdate& cluster_data) {
+ // Early out if channel is not configured to use xds security.
+ grpc_channel_credentials* channel_credentials =
+ grpc_channel_credentials_find_in_args(args_);
+ if (channel_credentials == nullptr ||
+ channel_credentials->type() != kCredentialsTypeXds) {
+ xds_certificate_provider_ = nullptr;
+ return GRPC_ERROR_NONE;
+ }
+ if (xds_certificate_provider_ == nullptr) {
+ xds_certificate_provider_ = MakeRefCounted<XdsCertificateProvider>();
+ }
+ // Configure root cert.
+ y_absl::string_view root_provider_instance_name =
+ cluster_data.common_tls_context.combined_validation_context
+ .validation_context_certificate_provider_instance.instance_name;
+ y_absl::string_view root_provider_cert_name =
+ cluster_data.common_tls_context.combined_validation_context
+ .validation_context_certificate_provider_instance.certificate_name;
+ RefCountedPtr<XdsCertificateProvider> new_root_provider;
+ if (!root_provider_instance_name.empty()) {
+ new_root_provider =
+ xds_client_->certificate_provider_store()
+ .CreateOrGetCertificateProvider(root_provider_instance_name);
+ if (new_root_provider == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Certificate provider instance name: \"",
+ root_provider_instance_name, "\" not recognized.")
+ .c_str());
+ }
+ }
+ if (root_certificate_provider_ != new_root_provider) {
+ if (root_certificate_provider_ != nullptr &&
+ root_certificate_provider_->interested_parties() != nullptr) {
+ grpc_pollset_set_del_pollset_set(
+ interested_parties(),
+ root_certificate_provider_->interested_parties());
+ }
+ if (new_root_provider != nullptr &&
+ new_root_provider->interested_parties() != nullptr) {
+ grpc_pollset_set_add_pollset_set(interested_parties(),
+ new_root_provider->interested_parties());
+ }
+ root_certificate_provider_ = std::move(new_root_provider);
+ }
+ xds_certificate_provider_->UpdateRootCertNameAndDistributor(
+ cluster_name, root_provider_cert_name,
+ root_certificate_provider_ == nullptr
+ ? nullptr
+ : root_certificate_provider_->distributor());
+ // Configure identity cert.
+ y_absl::string_view identity_provider_instance_name =
+ cluster_data.common_tls_context
+ .tls_certificate_certificate_provider_instance.instance_name;
+ y_absl::string_view identity_provider_cert_name =
+ cluster_data.common_tls_context
+ .tls_certificate_certificate_provider_instance.certificate_name;
+ RefCountedPtr<XdsCertificateProvider> new_identity_provider;
+ if (!identity_provider_instance_name.empty()) {
+ new_identity_provider =
+ xds_client_->certificate_provider_store()
+ .CreateOrGetCertificateProvider(identity_provider_instance_name);
+ if (new_identity_provider == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Certificate provider instance name: \"",
+ identity_provider_instance_name, "\" not recognized.")
+ .c_str());
+ }
+ }
+ if (identity_certificate_provider_ != new_identity_provider) {
+ if (identity_certificate_provider_ != nullptr &&
+ identity_certificate_provider_->interested_parties() != nullptr) {
+ grpc_pollset_set_del_pollset_set(
+ interested_parties(),
+ identity_certificate_provider_->interested_parties());
+ }
+ if (new_identity_provider != nullptr &&
+ new_identity_provider->interested_parties() != nullptr) {
+ grpc_pollset_set_add_pollset_set(
+ interested_parties(), new_identity_provider->interested_parties());
+ }
+ identity_certificate_provider_ = std::move(new_identity_provider);
+ }
+ xds_certificate_provider_->UpdateIdentityCertNameAndDistributor(
+ cluster_name, identity_provider_cert_name,
+ identity_certificate_provider_ == nullptr
+ ? nullptr
+ : identity_certificate_provider_->distributor());
+ // Configure SAN matchers.
+ const std::vector<StringMatcher>& match_subject_alt_names =
+ cluster_data.common_tls_context.combined_validation_context
+ .default_validation_context.match_subject_alt_names;
+ xds_certificate_provider_->UpdateSubjectAlternativeNameMatchers(
+ cluster_name, match_subject_alt_names);
+ return GRPC_ERROR_NONE;
+}
+
+void CdsLb::CancelClusterDataWatch(y_absl::string_view cluster_name,
+ XdsClient::ClusterWatcherInterface* watcher,
+ bool delay_unsubscription) {
+ if (xds_certificate_provider_ != nullptr) {
+ TString name(cluster_name);
+ xds_certificate_provider_->UpdateRootCertNameAndDistributor(name, "",
+ nullptr);
+ xds_certificate_provider_->UpdateIdentityCertNameAndDistributor(name, "",
+ nullptr);
+ xds_certificate_provider_->UpdateSubjectAlternativeNameMatchers(name, {});
+ }
+ xds_client_->CancelClusterDataWatch(cluster_name, watcher,
+ delay_unsubscription);
+}
//
// factory
//
@@ -459,6 +719,7 @@ class CdsLbFactory : public LoadBalancingPolicyFactory {
return nullptr;
}
std::vector<grpc_error*> error_list;
+ // cluster name.
TString cluster;
auto it = json.object_value().find("cluster");
if (it == json.object_value().end()) {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc
deleted file mode 100644
index 93fff4d3e39..00000000000
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc
+++ /dev/null
@@ -1,1152 +0,0 @@
-//
-// Copyright 2018 gRPC authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#include <grpc/support/port_platform.h>
-
-#include <inttypes.h>
-#include <limits.h>
-
-#include "y_absl/strings/str_cat.h"
-#include "y_absl/types/optional.h"
-
-#include <grpc/grpc.h>
-
-#include "src/core/ext/filters/client_channel/client_channel.h"
-#include "src/core/ext/filters/client_channel/lb_policy.h"
-#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h"
-#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
-#include "src/core/ext/filters/client_channel/lb_policy/xds/xds.h"
-#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
-#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
-#include "src/core/ext/filters/client_channel/server_address.h"
-#include "src/core/ext/xds/xds_channel_args.h"
-#include "src/core/ext/xds/xds_client.h"
-#include "src/core/ext/xds/xds_client_stats.h"
-#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/gpr/env.h"
-#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/orphanable.h"
-#include "src/core/lib/gprpp/ref_counted_ptr.h"
-#include "src/core/lib/iomgr/timer.h"
-#include "src/core/lib/iomgr/work_serializer.h"
-#include "src/core/lib/transport/error_utils.h"
-#include "src/core/lib/uri/uri_parser.h"
-
-#define GRPC_EDS_DEFAULT_FALLBACK_TIMEOUT 10000
-
-namespace grpc_core {
-
-TraceFlag grpc_lb_eds_trace(false, "eds_lb");
-
-namespace {
-
-constexpr char kEds[] = "eds_experimental";
-
-const char* kXdsLocalityNameAttributeKey = "xds_locality_name";
-
-// TODO (donnadionne): Check to see if circuit breaking is enabled, this will be
-// removed once circuit breaking feature is fully integrated and enabled by
-// default.
-bool XdsCircuitBreakingEnabled() {
- char* value = gpr_getenv("GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING");
- bool parsed_value;
- bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value);
- gpr_free(value);
- return parse_succeeded && parsed_value;
-}
-
-// Config for EDS LB policy.
-class EdsLbConfig : public LoadBalancingPolicy::Config {
- public:
- EdsLbConfig(TString cluster_name, TString eds_service_name,
- y_absl::optional<TString> lrs_load_reporting_server_name,
- Json locality_picking_policy, Json endpoint_picking_policy,
- uint32_t max_concurrent_requests)
- : cluster_name_(std::move(cluster_name)),
- eds_service_name_(std::move(eds_service_name)),
- lrs_load_reporting_server_name_(
- std::move(lrs_load_reporting_server_name)),
- locality_picking_policy_(std::move(locality_picking_policy)),
- endpoint_picking_policy_(std::move(endpoint_picking_policy)),
- max_concurrent_requests_(max_concurrent_requests) {}
-
- const char* name() const override { return kEds; }
-
- const TString& cluster_name() const { return cluster_name_; }
- const TString& eds_service_name() const { return eds_service_name_; }
- const y_absl::optional<TString>& lrs_load_reporting_server_name() const {
- return lrs_load_reporting_server_name_;
- };
- const Json& locality_picking_policy() const {
- return locality_picking_policy_;
- }
- const Json& endpoint_picking_policy() const {
- return endpoint_picking_policy_;
- }
- const uint32_t max_concurrent_requests() const {
- return max_concurrent_requests_;
- }
-
- private:
- TString cluster_name_;
- TString eds_service_name_;
- y_absl::optional<TString> lrs_load_reporting_server_name_;
- Json locality_picking_policy_;
- Json endpoint_picking_policy_;
- uint32_t max_concurrent_requests_;
-};
-
-// EDS LB policy.
-class EdsLb : public LoadBalancingPolicy {
- public:
- EdsLb(RefCountedPtr<XdsClient> xds_client, Args args);
-
- const char* name() const override { return kEds; }
-
- void UpdateLocked(UpdateArgs args) override;
- void ResetBackoffLocked() override;
-
- private:
- class XdsLocalityAttribute : public ServerAddress::AttributeInterface {
- public:
- explicit XdsLocalityAttribute(RefCountedPtr<XdsLocalityName> locality_name)
- : locality_name_(std::move(locality_name)) {}
-
- RefCountedPtr<XdsLocalityName> locality_name() const {
- return locality_name_;
- }
-
- std::unique_ptr<AttributeInterface> Copy() const override {
- return y_absl::make_unique<XdsLocalityAttribute>(locality_name_->Ref());
- }
-
- int Cmp(const AttributeInterface* other) const override {
- const auto* other_locality_attr =
- static_cast<const XdsLocalityAttribute*>(other);
- return locality_name_->Compare(*other_locality_attr->locality_name_);
- }
-
- TString ToString() const override {
- return locality_name_->AsHumanReadableString();
- }
-
- private:
- RefCountedPtr<XdsLocalityName> locality_name_;
- };
-
- class StatsSubchannelWrapper : public DelegatingSubchannel {
- public:
- StatsSubchannelWrapper(
- RefCountedPtr<SubchannelInterface> wrapped_subchannel,
- RefCountedPtr<XdsClusterLocalityStats> locality_stats)
- : DelegatingSubchannel(std::move(wrapped_subchannel)),
- locality_stats_(std::move(locality_stats)) {}
-
- XdsClusterLocalityStats* locality_stats() const {
- return locality_stats_.get();
- }
-
- private:
- RefCountedPtr<XdsClusterLocalityStats> locality_stats_;
- };
-
- class EndpointWatcher : public XdsClient::EndpointWatcherInterface {
- public:
- explicit EndpointWatcher(RefCountedPtr<EdsLb> parent)
- : parent_(std::move(parent)) {}
- void OnEndpointChanged(XdsApi::EdsUpdate update) override {
- new Notifier(parent_, std::move(update));
- }
- void OnError(grpc_error* error) override { new Notifier(parent_, error); }
- void OnResourceDoesNotExist() override { new Notifier(parent_); }
-
- private:
- class Notifier {
- public:
- Notifier(RefCountedPtr<EdsLb> parent, XdsApi::EdsUpdate update);
- Notifier(RefCountedPtr<EdsLb> parent, grpc_error* error);
- explicit Notifier(RefCountedPtr<EdsLb> parent);
-
- private:
- enum Type { kUpdate, kError, kDoesNotExist };
-
- static void RunInExecCtx(void* arg, grpc_error* error);
- void RunInWorkSerializer(grpc_error* error);
-
- RefCountedPtr<EdsLb> parent_;
- grpc_closure closure_;
- XdsApi::EdsUpdate update_;
- Type type_;
- };
-
- RefCountedPtr<EdsLb> parent_;
- };
-
- // A simple wrapper for ref-counting a picker from the child policy.
- class ChildPickerWrapper : public RefCounted<ChildPickerWrapper> {
- public:
- explicit ChildPickerWrapper(std::unique_ptr<SubchannelPicker> picker)
- : picker_(std::move(picker)) {}
- PickResult Pick(PickArgs args) { return picker_->Pick(args); }
-
- private:
- std::unique_ptr<SubchannelPicker> picker_;
- };
-
- // A picker that handles drops.
- class EdsPicker : public SubchannelPicker {
- public:
- explicit EdsPicker(RefCountedPtr<EdsLb> eds_policy);
-
- PickResult Pick(PickArgs args) override;
-
- private:
- RefCountedPtr<EdsLb> eds_policy_;
- RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config_;
- RefCountedPtr<XdsClusterDropStats> drop_stats_;
- RefCountedPtr<ChildPickerWrapper> child_picker_;
- bool xds_circuit_breaking_enabled_;
- uint32_t max_concurrent_requests_;
- };
-
- class Helper : public ChannelControlHelper {
- public:
- explicit Helper(RefCountedPtr<EdsLb> eds_policy)
- : eds_policy_(std::move(eds_policy)) {}
-
- ~Helper() { eds_policy_.reset(DEBUG_LOCATION, "Helper"); }
-
- RefCountedPtr<SubchannelInterface> CreateSubchannel(
- ServerAddress address, const grpc_channel_args& args) override;
- void UpdateState(grpc_connectivity_state state, const y_absl::Status& status,
- std::unique_ptr<SubchannelPicker> picker) override;
- // This is a no-op, because we get the addresses from the xds
- // client, which is a watch-based API.
- void RequestReresolution() override {}
- void AddTraceEvent(TraceSeverity severity,
- y_absl::string_view message) override;
-
- private:
- RefCountedPtr<EdsLb> eds_policy_;
- };
-
- ~EdsLb();
-
- void ShutdownLocked() override;
-
- void OnEndpointChanged(XdsApi::EdsUpdate update);
- void OnError(grpc_error* error);
- void OnResourceDoesNotExist();
-
- void MaybeDestroyChildPolicyLocked();
-
- void UpdatePriorityList(XdsApi::EdsUpdate::PriorityList priority_list);
- void UpdateChildPolicyLocked();
- OrphanablePtr<LoadBalancingPolicy> CreateChildPolicyLocked(
- const grpc_channel_args* args);
- ServerAddressList CreateChildPolicyAddressesLocked();
- RefCountedPtr<Config> CreateChildPolicyConfigLocked();
- grpc_channel_args* CreateChildPolicyArgsLocked(
- const grpc_channel_args* args_in);
- void MaybeUpdateEdsPickerLocked();
-
- // Caller must ensure that config_ is set before calling.
- const y_absl::string_view GetEdsResourceName() const {
- if (!is_xds_uri_) return server_name_;
- if (!config_->eds_service_name().empty()) {
- return config_->eds_service_name();
- }
- return config_->cluster_name();
- }
-
- // Returns a pair containing the cluster and eds_service_name to use
- // for LRS load reporting.
- // Caller must ensure that config_ is set before calling.
- std::pair<y_absl::string_view, y_absl::string_view> GetLrsClusterKey() const {
- if (!is_xds_uri_) return {server_name_, y_absl::string_view{}};
- return {config_->cluster_name(), config_->eds_service_name()};
- }
-
- // Server name from target URI.
- TString server_name_;
- bool is_xds_uri_;
-
- // Current channel args and config from the resolver.
- const grpc_channel_args* args_ = nullptr;
- RefCountedPtr<EdsLbConfig> config_;
-
- // Internal state.
- bool shutting_down_ = false;
-
- // The xds client and endpoint watcher.
- RefCountedPtr<XdsClient> xds_client_;
- // A pointer to the endpoint watcher, to be used when cancelling the watch.
- // Note that this is not owned, so this pointer must never be derefernced.
- EndpointWatcher* endpoint_watcher_ = nullptr;
- // The latest data from the endpoint watcher.
- XdsApi::EdsUpdate::PriorityList priority_list_;
- // State used to retain child policy names for priority policy.
- std::vector<size_t /*child_number*/> priority_child_numbers_;
-
- RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config_;
- RefCountedPtr<XdsClusterDropStats> drop_stats_;
- // Current concurrent number of requests;
- Atomic<uint32_t> concurrent_requests_{0};
-
- OrphanablePtr<LoadBalancingPolicy> child_policy_;
-
- // The latest state and picker returned from the child policy.
- grpc_connectivity_state child_state_;
- y_absl::Status child_status_;
- RefCountedPtr<ChildPickerWrapper> child_picker_;
-};
-
-//
-// EdsLb::EdsPicker
-//
-
-EdsLb::EdsPicker::EdsPicker(RefCountedPtr<EdsLb> eds_policy)
- : eds_policy_(std::move(eds_policy)),
- drop_stats_(eds_policy_->drop_stats_),
- child_picker_(eds_policy_->child_picker_),
- xds_circuit_breaking_enabled_(XdsCircuitBreakingEnabled()),
- max_concurrent_requests_(
- eds_policy_->config_->max_concurrent_requests()) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] constructed new drop picker %p",
- eds_policy_.get(), this);
- }
-}
-
-EdsLb::PickResult EdsLb::EdsPicker::Pick(PickArgs args) {
- uint32_t current = eds_policy_->concurrent_requests_.FetchAdd(1);
- if (xds_circuit_breaking_enabled_) {
- // Check and see if we exceeded the max concurrent requests count.
- if (current >= max_concurrent_requests_) {
- eds_policy_->concurrent_requests_.FetchSub(1);
- if (drop_stats_ != nullptr) {
- drop_stats_->AddUncategorizedDrops();
- }
- PickResult result;
- result.type = PickResult::PICK_COMPLETE;
- return result;
- }
- }
- // If we're not dropping the call, we should always have a child picker.
- if (child_picker_ == nullptr) { // Should never happen.
- PickResult result;
- result.type = PickResult::PICK_FAILED;
- result.error =
- grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "eds drop picker not given any child picker"),
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
- eds_policy_->concurrent_requests_.FetchSub(1);
- return result;
- }
- // Not dropping, so delegate to child's picker.
- PickResult result = child_picker_->Pick(args);
- if (result.type == result.PICK_COMPLETE && result.subchannel != nullptr) {
- XdsClusterLocalityStats* locality_stats = nullptr;
- if (drop_stats_ != nullptr) { // If load reporting is enabled.
- auto* subchannel_wrapper =
- static_cast<StatsSubchannelWrapper*>(result.subchannel.get());
- // Handle load reporting.
- locality_stats = subchannel_wrapper->locality_stats()->Ref().release();
- // Record a call started.
- locality_stats->AddCallStarted();
- // Unwrap subchannel to pass back up the stack.
- result.subchannel = subchannel_wrapper->wrapped_subchannel();
- }
- // Intercept the recv_trailing_metadata op to record call completion.
- EdsLb* eds_policy = static_cast<EdsLb*>(
- eds_policy_->Ref(DEBUG_LOCATION, "DropPickPicker+call").release());
- auto original_recv_trailing_metadata_ready =
- result.recv_trailing_metadata_ready;
- result.recv_trailing_metadata_ready =
- // Note: This callback does not run in either the control plane
- // work serializer or in the data plane mutex.
- [locality_stats, original_recv_trailing_metadata_ready, eds_policy](
- grpc_error* error, MetadataInterface* metadata,
- CallState* call_state) {
- // Record call completion for load reporting.
- if (locality_stats != nullptr) {
- const bool call_failed = error != GRPC_ERROR_NONE;
- locality_stats->AddCallFinished(call_failed);
- locality_stats->Unref(DEBUG_LOCATION, "LocalityStats+call");
- }
- // Decrement number of calls in flight.
- eds_policy->concurrent_requests_.FetchSub(1);
- eds_policy->Unref(DEBUG_LOCATION, "DropPickPicker+call");
- // Invoke the original recv_trailing_metadata_ready callback, if any.
- if (original_recv_trailing_metadata_ready != nullptr) {
- original_recv_trailing_metadata_ready(error, metadata, call_state);
- }
- };
- } else {
- // TODO(roth): We should ideally also record call failures here in the case
- // where a pick fails. This is challenging, because we don't know which
- // picks are for wait_for_ready RPCs or how many times we'll return a
- // failure for the same wait_for_ready RPC.
- eds_policy_->concurrent_requests_.FetchSub(1);
- }
- return result;
-}
-
-//
-// EdsLb::Helper
-//
-
-RefCountedPtr<SubchannelInterface> EdsLb::Helper::CreateSubchannel(
- ServerAddress address, const grpc_channel_args& args) {
- if (eds_policy_->shutting_down_) return nullptr;
- // If load reporting is enabled, wrap the subchannel such that it
- // includes the locality stats object, which will be used by the EdsPicker.
- if (eds_policy_->config_->lrs_load_reporting_server_name().has_value()) {
- RefCountedPtr<XdsLocalityName> locality_name;
- auto* attribute = address.GetAttribute(kXdsLocalityNameAttributeKey);
- if (attribute != nullptr) {
- const auto* locality_attr =
- static_cast<const XdsLocalityAttribute*>(attribute);
- locality_name = locality_attr->locality_name();
- }
- RefCountedPtr<XdsClusterLocalityStats> locality_stats =
- eds_policy_->xds_client_->AddClusterLocalityStats(
- *eds_policy_->config_->lrs_load_reporting_server_name(),
- eds_policy_->config_->cluster_name(),
- eds_policy_->config_->eds_service_name(), std::move(locality_name));
- return MakeRefCounted<StatsSubchannelWrapper>(
- eds_policy_->channel_control_helper()->CreateSubchannel(
- std::move(address), args),
- std::move(locality_stats));
- }
- // Load reporting not enabled, so don't wrap the subchannel.
- return eds_policy_->channel_control_helper()->CreateSubchannel(
- std::move(address), args);
-}
-
-void EdsLb::Helper::UpdateState(grpc_connectivity_state state,
- const y_absl::Status& status,
- std::unique_ptr<SubchannelPicker> picker) {
- if (eds_policy_->shutting_down_ || eds_policy_->child_policy_ == nullptr) {
- return;
- }
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO,
- "[edslb %p] child policy updated state=%s (%s) "
- "picker=%p",
- eds_policy_.get(), ConnectivityStateName(state),
- status.ToString().c_str(), picker.get());
- }
- // Save the state and picker.
- eds_policy_->child_state_ = state;
- eds_policy_->child_status_ = status;
- eds_policy_->child_picker_ =
- MakeRefCounted<ChildPickerWrapper>(std::move(picker));
- // Wrap the picker in a EdsPicker and pass it up.
- eds_policy_->MaybeUpdateEdsPickerLocked();
-}
-
-void EdsLb::Helper::AddTraceEvent(TraceSeverity severity,
- y_absl::string_view message) {
- if (eds_policy_->shutting_down_) return;
- eds_policy_->channel_control_helper()->AddTraceEvent(severity, message);
-}
-
-//
-// EdsLb::EndpointWatcher::Notifier
-//
-
-EdsLb::EndpointWatcher::Notifier::Notifier(RefCountedPtr<EdsLb> parent,
- XdsApi::EdsUpdate update)
- : parent_(std::move(parent)), update_(std::move(update)), type_(kUpdate) {
- GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
- ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
-}
-
-EdsLb::EndpointWatcher::Notifier::Notifier(RefCountedPtr<EdsLb> parent,
- grpc_error* error)
- : parent_(std::move(parent)), type_(kError) {
- GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
- ExecCtx::Run(DEBUG_LOCATION, &closure_, error);
-}
-
-EdsLb::EndpointWatcher::Notifier::Notifier(RefCountedPtr<EdsLb> parent)
- : parent_(std::move(parent)), type_(kDoesNotExist) {
- GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
- ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
-}
-
-void EdsLb::EndpointWatcher::Notifier::RunInExecCtx(void* arg,
- grpc_error* error) {
- Notifier* self = static_cast<Notifier*>(arg);
- GRPC_ERROR_REF(error);
- self->parent_->work_serializer()->Run(
- [self, error]() { self->RunInWorkSerializer(error); }, DEBUG_LOCATION);
-}
-
-void EdsLb::EndpointWatcher::Notifier::RunInWorkSerializer(grpc_error* error) {
- switch (type_) {
- case kUpdate:
- parent_->OnEndpointChanged(std::move(update_));
- break;
- case kError:
- parent_->OnError(error);
- break;
- case kDoesNotExist:
- parent_->OnResourceDoesNotExist();
- break;
- };
- delete this;
-}
-
-//
-// EdsLb public methods
-//
-
-EdsLb::EdsLb(RefCountedPtr<XdsClient> xds_client, Args args)
- : LoadBalancingPolicy(std::move(args)), xds_client_(std::move(xds_client)) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] created -- using xds client %p", this,
- xds_client_.get());
- }
- // Record server name.
- const char* server_uri =
- grpc_channel_args_find_string(args.args, GRPC_ARG_SERVER_URI);
- GPR_ASSERT(server_uri != nullptr);
- grpc_uri* uri = grpc_uri_parse(server_uri, true);
- GPR_ASSERT(uri->path[0] != '\0');
- server_name_ = uri->path[0] == '/' ? uri->path + 1 : uri->path;
- is_xds_uri_ = strcmp(uri->scheme, "xds") == 0;
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] server name from channel (is_xds_uri=%d): %s",
- this, is_xds_uri_, server_name_.c_str());
- }
- grpc_uri_destroy(uri);
- // EDS-only flow.
- if (!is_xds_uri_) {
- // Setup channelz linkage.
- channelz::ChannelNode* parent_channelz_node =
- grpc_channel_args_find_pointer<channelz::ChannelNode>(
- args.args, GRPC_ARG_CHANNELZ_CHANNEL_NODE);
- if (parent_channelz_node != nullptr) {
- xds_client_->AddChannelzLinkage(parent_channelz_node);
- }
- // Couple polling.
- grpc_pollset_set_add_pollset_set(xds_client_->interested_parties(),
- interested_parties());
- }
-}
-
-EdsLb::~EdsLb() {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] destroying eds LB policy", this);
- }
-}
-
-void EdsLb::ShutdownLocked() {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] shutting down", this);
- }
- shutting_down_ = true;
- // Drop our ref to the child's picker, in case it's holding a ref to
- // the child.
- child_picker_.reset();
- MaybeDestroyChildPolicyLocked();
- drop_stats_.reset();
- // Cancel watcher.
- if (endpoint_watcher_ != nullptr) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] cancelling xds watch for %s", this,
- TString(GetEdsResourceName()).c_str());
- }
- xds_client_->CancelEndpointDataWatch(GetEdsResourceName(),
- endpoint_watcher_);
- }
- if (!is_xds_uri_) {
- // Remove channelz linkage.
- channelz::ChannelNode* parent_channelz_node =
- grpc_channel_args_find_pointer<channelz::ChannelNode>(
- args_, GRPC_ARG_CHANNELZ_CHANNEL_NODE);
- if (parent_channelz_node != nullptr) {
- xds_client_->RemoveChannelzLinkage(parent_channelz_node);
- }
- // Decouple polling.
- grpc_pollset_set_del_pollset_set(xds_client_->interested_parties(),
- interested_parties());
- }
- xds_client_.reset(DEBUG_LOCATION, "EdsLb");
- // Destroy channel args.
- grpc_channel_args_destroy(args_);
- args_ = nullptr;
-}
-
-void EdsLb::MaybeDestroyChildPolicyLocked() {
- if (child_policy_ != nullptr) {
- grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
- interested_parties());
- child_policy_.reset();
- }
-}
-
-void EdsLb::UpdateLocked(UpdateArgs args) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] Received update", this);
- }
- const bool is_initial_update = args_ == nullptr;
- // Update config.
- auto old_config = std::move(config_);
- config_ = std::move(args.config);
- // Update args.
- grpc_channel_args_destroy(args_);
- args_ = args.args;
- args.args = nullptr;
- const bool lrs_server_changed =
- is_initial_update || config_->lrs_load_reporting_server_name() !=
- old_config->lrs_load_reporting_server_name();
- const bool max_concurrent_requests_changed =
- is_initial_update || config_->max_concurrent_requests() !=
- old_config->max_concurrent_requests();
- // Update drop stats for load reporting if needed.
- if (lrs_server_changed) {
- drop_stats_.reset();
- if (config_->lrs_load_reporting_server_name().has_value()) {
- const auto key = GetLrsClusterKey();
- drop_stats_ = xds_client_->AddClusterDropStats(
- config_->lrs_load_reporting_server_name().value(),
- key.first /*cluster_name*/, key.second /*eds_service_name*/);
- }
- }
- if (lrs_server_changed || max_concurrent_requests_changed) {
- MaybeUpdateEdsPickerLocked();
- }
- // Update child policy if needed.
- // Note that this comes after updating drop_stats_, since we want that
- // to be used by any new picker we create here.
- if (child_policy_ != nullptr) UpdateChildPolicyLocked();
- // Create endpoint watcher if needed.
- if (is_initial_update) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] starting xds watch for %s", this,
- TString(GetEdsResourceName()).c_str());
- }
- auto watcher = y_absl::make_unique<EndpointWatcher>(
- Ref(DEBUG_LOCATION, "EndpointWatcher"));
- endpoint_watcher_ = watcher.get();
- xds_client_->WatchEndpointData(GetEdsResourceName(), std::move(watcher));
- }
-}
-
-void EdsLb::ResetBackoffLocked() {
- // When the XdsClient is instantiated in the resolver instead of in this
- // LB policy, this is done via the resolver, so we don't need to do it here.
- if (!is_xds_uri_ && xds_client_ != nullptr) xds_client_->ResetBackoff();
- if (child_policy_ != nullptr) {
- child_policy_->ResetBackoffLocked();
- }
-}
-
-void EdsLb::OnEndpointChanged(XdsApi::EdsUpdate update) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] Received EDS update from xds client", this);
- }
- // Update the drop config.
- drop_config_ = std::move(update.drop_config);
- // If priority list is empty, add a single priority, just so that we
- // have a child in which to create the eds_drop policy.
- if (update.priorities.empty()) update.priorities.emplace_back();
- // Update child policy.
- UpdatePriorityList(std::move(update.priorities));
-}
-
-void EdsLb::OnError(grpc_error* error) {
- gpr_log(GPR_ERROR, "[edslb %p] xds watcher reported error: %s", this,
- grpc_error_string(error));
- // Go into TRANSIENT_FAILURE if we have not yet created the child
- // policy (i.e., we have not yet received data from xds). Otherwise,
- // we keep running with the data we had previously.
- if (child_policy_ == nullptr) {
- channel_control_helper()->UpdateState(
- GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
- y_absl::make_unique<TransientFailurePicker>(error));
- } else {
- GRPC_ERROR_UNREF(error);
- }
-}
-
-void EdsLb::OnResourceDoesNotExist() {
- gpr_log(
- GPR_ERROR,
- "[edslb %p] EDS resource does not exist -- reporting TRANSIENT_FAILURE",
- this);
- grpc_error* error = grpc_error_set_int(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("EDS resource does not exist"),
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE);
- channel_control_helper()->UpdateState(
- GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
- y_absl::make_unique<TransientFailurePicker>(error));
- MaybeDestroyChildPolicyLocked();
-}
-
-//
-// child policy-related methods
-//
-
-void EdsLb::UpdatePriorityList(XdsApi::EdsUpdate::PriorityList priority_list) {
- // Build some maps from locality to child number and the reverse from
- // the old data in priority_list_ and priority_child_numbers_.
- std::map<XdsLocalityName*, size_t /*child_number*/, XdsLocalityName::Less>
- locality_child_map;
- std::map<size_t, std::set<XdsLocalityName*>> child_locality_map;
- for (size_t priority = 0; priority < priority_list_.size(); ++priority) {
- size_t child_number = priority_child_numbers_[priority];
- const auto& localities = priority_list_[priority].localities;
- for (const auto& p : localities) {
- XdsLocalityName* locality_name = p.first;
- locality_child_map[locality_name] = child_number;
- child_locality_map[child_number].insert(locality_name);
- }
- }
- // Construct new list of children.
- std::vector<size_t> priority_child_numbers;
- for (size_t priority = 0; priority < priority_list.size(); ++priority) {
- const auto& localities = priority_list[priority].localities;
- y_absl::optional<size_t> child_number;
- // If one of the localities in this priority already existed, reuse its
- // child number.
- for (const auto& p : localities) {
- XdsLocalityName* locality_name = p.first;
- if (!child_number.has_value()) {
- auto it = locality_child_map.find(locality_name);
- if (it != locality_child_map.end()) {
- child_number = it->second;
- locality_child_map.erase(it);
- // Remove localities that *used* to be in this child number, so
- // that we don't incorrectly reuse this child number for a
- // subsequent priority.
- for (XdsLocalityName* old_locality :
- child_locality_map[*child_number]) {
- locality_child_map.erase(old_locality);
- }
- }
- } else {
- // Remove all localities that are now in this child number, so
- // that we don't accidentally reuse this child number for a
- // subsequent priority.
- locality_child_map.erase(locality_name);
- }
- }
- // If we didn't find an existing child number, assign a new one.
- if (!child_number.has_value()) {
- for (child_number = 0;
- child_locality_map.find(*child_number) != child_locality_map.end();
- ++(*child_number))
- ;
- // Add entry so we know that the child number is in use.
- // (Don't need to add the list of localities, since we won't use them.)
- child_locality_map[*child_number];
- }
- priority_child_numbers.push_back(*child_number);
- }
- // Save update.
- priority_list_ = std::move(priority_list);
- priority_child_numbers_ = std::move(priority_child_numbers);
- // Update child policy.
- UpdateChildPolicyLocked();
-}
-
-ServerAddressList EdsLb::CreateChildPolicyAddressesLocked() {
- ServerAddressList addresses;
- for (size_t priority = 0; priority < priority_list_.size(); ++priority) {
- const auto& localities = priority_list_[priority].localities;
- TString priority_child_name =
- y_absl::StrCat("child", priority_child_numbers_[priority]);
- for (const auto& p : localities) {
- const auto& locality_name = p.first;
- const auto& locality = p.second;
- std::vector<TString> hierarchical_path = {
- priority_child_name, locality_name->AsHumanReadableString()};
- for (const auto& endpoint : locality.endpoints) {
- addresses.emplace_back(
- endpoint
- .WithAttribute(kHierarchicalPathAttributeKey,
- MakeHierarchicalPathAttribute(hierarchical_path))
- .WithAttribute(kXdsLocalityNameAttributeKey,
- y_absl::make_unique<XdsLocalityAttribute>(
- locality_name->Ref())));
- }
- }
- }
- return addresses;
-}
-
-RefCountedPtr<LoadBalancingPolicy::Config>
-EdsLb::CreateChildPolicyConfigLocked() {
- const auto lrs_key = GetLrsClusterKey();
- Json::Object priority_children;
- Json::Array priority_priorities;
- for (size_t priority = 0; priority < priority_list_.size(); ++priority) {
- const auto& localities = priority_list_[priority].localities;
- Json::Object weighted_targets;
- for (const auto& p : localities) {
- XdsLocalityName* locality_name = p.first;
- const auto& locality = p.second;
- // Construct JSON object containing locality name.
- Json::Object locality_name_json;
- if (!locality_name->region().empty()) {
- locality_name_json["region"] = locality_name->region();
- }
- if (!locality_name->zone().empty()) {
- locality_name_json["zone"] = locality_name->zone();
- }
- if (!locality_name->sub_zone().empty()) {
- locality_name_json["subzone"] = locality_name->sub_zone();
- }
- // Add weighted target entry.
- weighted_targets[locality_name->AsHumanReadableString()] = Json::Object{
- {"weight", locality.lb_weight},
- {"childPolicy", config_->endpoint_picking_policy()},
- };
- }
- // Construct locality-picking policy.
- // Start with field from our config and add the "targets" field.
- Json locality_picking_config = config_->locality_picking_policy();
- Json::Object& config =
- *(*locality_picking_config.mutable_array())[0].mutable_object();
- auto it = config.begin();
- GPR_ASSERT(it != config.end());
- (*it->second.mutable_object())["targets"] = std::move(weighted_targets);
- // Wrap it in the drop policy.
- Json::Array drop_categories;
- for (const auto& category : drop_config_->drop_category_list()) {
- drop_categories.push_back(Json::Object{
- {"category", category.name},
- {"requests_per_million", category.parts_per_million},
- });
- }
- Json::Object eds_drop_config = {
- {"clusterName", TString(lrs_key.first)},
- {"childPolicy", std::move(locality_picking_config)},
- {"dropCategories", std::move(drop_categories)},
- };
- if (!lrs_key.second.empty()) {
- eds_drop_config["edsServiceName"] = TString(lrs_key.second);
- }
- if (config_->lrs_load_reporting_server_name().has_value()) {
- eds_drop_config["lrsLoadReportingServerName"] =
- config_->lrs_load_reporting_server_name().value();
- }
- Json locality_picking_policy = Json::Array{Json::Object{
- {"eds_drop_experimental", std::move(eds_drop_config)},
- }};
- // Add priority entry.
- const size_t child_number = priority_child_numbers_[priority];
- TString child_name = y_absl::StrCat("child", child_number);
- priority_priorities.emplace_back(child_name);
- priority_children[child_name] = Json::Object{
- {"config", std::move(locality_picking_policy)},
- };
- }
- Json json = Json::Array{Json::Object{
- {"priority_experimental",
- Json::Object{
- {"children", std::move(priority_children)},
- {"priorities", std::move(priority_priorities)},
- }},
- }};
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- TString json_str = json.Dump(/*indent=*/1);
- gpr_log(GPR_INFO, "[edslb %p] generated config for child policy: %s", this,
- json_str.c_str());
- }
- grpc_error* error = GRPC_ERROR_NONE;
- RefCountedPtr<LoadBalancingPolicy::Config> config =
- LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(json, &error);
- if (error != GRPC_ERROR_NONE) {
- // This should never happen, but if it does, we basically have no
- // way to fix it, so we put the channel in TRANSIENT_FAILURE.
- gpr_log(GPR_ERROR,
- "[edslb %p] error parsing generated child policy config -- "
- "will put channel in TRANSIENT_FAILURE: %s",
- this, grpc_error_string(error));
- error = grpc_error_set_int(
- grpc_error_add_child(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "eds LB policy: error parsing generated child policy config"),
- error),
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
- channel_control_helper()->UpdateState(
- GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
- y_absl::make_unique<TransientFailurePicker>(error));
- return nullptr;
- }
- return config;
-}
-
-void EdsLb::UpdateChildPolicyLocked() {
- if (shutting_down_) return;
- UpdateArgs update_args;
- update_args.config = CreateChildPolicyConfigLocked();
- if (update_args.config == nullptr) return;
- update_args.addresses = CreateChildPolicyAddressesLocked();
- update_args.args = CreateChildPolicyArgsLocked(args_);
- if (child_policy_ == nullptr) {
- child_policy_ = CreateChildPolicyLocked(update_args.args);
- }
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p] Updating child policy %p", this,
- child_policy_.get());
- }
- child_policy_->UpdateLocked(std::move(update_args));
-}
-
-grpc_channel_args* EdsLb::CreateChildPolicyArgsLocked(
- const grpc_channel_args* args) {
- grpc_arg args_to_add[] = {
- // A channel arg indicating if the target is a backend inferred from an
- // xds load balancer.
- // TODO(roth): This isn't needed with the new fallback design.
- // Remove as part of implementing the new fallback functionality.
- grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_ADDRESS_IS_BACKEND_FROM_XDS_LOAD_BALANCER),
- 1),
- // Inhibit client-side health checking, since the balancer does
- // this for us.
- grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_INHIBIT_HEALTH_CHECKING), 1),
- };
- return grpc_channel_args_copy_and_add(args, args_to_add,
- GPR_ARRAY_SIZE(args_to_add));
-}
-
-OrphanablePtr<LoadBalancingPolicy> EdsLb::CreateChildPolicyLocked(
- const grpc_channel_args* args) {
- LoadBalancingPolicy::Args lb_policy_args;
- lb_policy_args.work_serializer = work_serializer();
- lb_policy_args.args = args;
- lb_policy_args.channel_control_helper =
- y_absl::make_unique<Helper>(Ref(DEBUG_LOCATION, "Helper"));
- OrphanablePtr<LoadBalancingPolicy> lb_policy =
- LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(
- "priority_experimental", std::move(lb_policy_args));
- if (GPR_UNLIKELY(lb_policy == nullptr)) {
- gpr_log(GPR_ERROR, "[edslb %p] failure creating child policy", this);
- return nullptr;
- }
- if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_eds_trace)) {
- gpr_log(GPR_INFO, "[edslb %p]: Created new child policy %p", this,
- lb_policy.get());
- }
- // Add our interested_parties pollset_set to that of the newly created
- // child policy. This will make the child policy progress upon activity on
- // this policy, which in turn is tied to the application's call.
- grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
- interested_parties());
- return lb_policy;
-}
-
-void EdsLb::MaybeUpdateEdsPickerLocked() {
- // Update only if we have a child picker.
- if (child_picker_ != nullptr) {
- channel_control_helper()->UpdateState(
- child_state_, child_status_,
- y_absl::make_unique<EdsPicker>(Ref(DEBUG_LOCATION, "EdsPicker")));
- }
-}
-
-//
-// factory
-//
-
-class EdsLbFactory : public LoadBalancingPolicyFactory {
- public:
- OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
- LoadBalancingPolicy::Args args) const override {
- grpc_error* error = GRPC_ERROR_NONE;
- RefCountedPtr<XdsClient> xds_client = XdsClient::GetOrCreate(&error);
- if (error != GRPC_ERROR_NONE) {
- gpr_log(GPR_ERROR,
- "cannot get XdsClient to instantiate eds LB policy: %s",
- grpc_error_string(error));
- GRPC_ERROR_UNREF(error);
- return nullptr;
- }
- return MakeOrphanable<EdsChildHandler>(std::move(xds_client),
- std::move(args));
- }
-
- const char* name() const override { return kEds; }
-
- RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
- const Json& json, grpc_error** error) const override {
- GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
- if (json.type() == Json::Type::JSON_NULL) {
- // eds was mentioned as a policy in the deprecated loadBalancingPolicy
- // field or in the client API.
- *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:loadBalancingPolicy error:eds policy requires configuration. "
- "Please use loadBalancingConfig field of service config instead.");
- return nullptr;
- }
- std::vector<grpc_error*> error_list;
- // EDS service name.
- TString eds_service_name;
- auto it = json.object_value().find("edsServiceName");
- if (it != json.object_value().end()) {
- if (it->second.type() != Json::Type::STRING) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:edsServiceName error:type should be string"));
- } else {
- eds_service_name = it->second.string_value();
- }
- }
- // Cluster name.
- TString cluster_name;
- it = json.object_value().find("clusterName");
- if (it == json.object_value().end()) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:clusterName error:required field missing"));
- } else if (it->second.type() != Json::Type::STRING) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:clusterName error:type should be string"));
- } else {
- cluster_name = it->second.string_value();
- }
- // LRS load reporting server name.
- y_absl::optional<TString> lrs_load_reporting_server_name;
- it = json.object_value().find("lrsLoadReportingServerName");
- if (it != json.object_value().end()) {
- if (it->second.type() != Json::Type::STRING) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:lrsLoadReportingServerName error:type should be string"));
- } else {
- lrs_load_reporting_server_name.emplace(it->second.string_value());
- }
- }
- // Locality-picking policy.
- Json locality_picking_policy;
- it = json.object_value().find("localityPickingPolicy");
- if (it == json.object_value().end()) {
- locality_picking_policy = Json::Array{
- Json::Object{
- {"weighted_target_experimental",
- Json::Object{
- {"targets", Json::Object()},
- }},
- },
- };
- } else {
- locality_picking_policy = it->second;
- }
- grpc_error* parse_error = GRPC_ERROR_NONE;
- if (LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
- locality_picking_policy, &parse_error) == nullptr) {
- GPR_DEBUG_ASSERT(parse_error != GRPC_ERROR_NONE);
- error_list.push_back(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "localityPickingPolicy", &parse_error, 1));
- GRPC_ERROR_UNREF(parse_error);
- }
- // Endpoint-picking policy. Called "childPolicy" for xds policy.
- Json endpoint_picking_policy;
- it = json.object_value().find("endpointPickingPolicy");
- if (it == json.object_value().end()) {
- endpoint_picking_policy = Json::Array{
- Json::Object{
- {"round_robin", Json::Object()},
- },
- };
- } else {
- endpoint_picking_policy = it->second;
- }
- parse_error = GRPC_ERROR_NONE;
- if (LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
- endpoint_picking_policy, &parse_error) == nullptr) {
- GPR_DEBUG_ASSERT(parse_error != GRPC_ERROR_NONE);
- error_list.push_back(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "endpointPickingPolicy", &parse_error, 1));
- GRPC_ERROR_UNREF(parse_error);
- }
- // Max concurrent requests.
- uint32_t max_concurrent_requests = 1024;
- it = json.object_value().find("max_concurrent_requests");
- if (it != json.object_value().end()) {
- if (it->second.type() != Json::Type::NUMBER) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:max_concurrent_requests error:must be of type number"));
- } else {
- max_concurrent_requests =
- gpr_parse_nonnegative_int(it->second.string_value().c_str());
- }
- }
- // Construct config.
- if (error_list.empty()) {
- return MakeRefCounted<EdsLbConfig>(
- std::move(cluster_name), std::move(eds_service_name),
- std::move(lrs_load_reporting_server_name),
- std::move(locality_picking_policy),
- std::move(endpoint_picking_policy), max_concurrent_requests);
- } else {
- *error = GRPC_ERROR_CREATE_FROM_VECTOR(
- "eds_experimental LB policy config", &error_list);
- return nullptr;
- }
- }
-
- private:
- class EdsChildHandler : public ChildPolicyHandler {
- public:
- EdsChildHandler(RefCountedPtr<XdsClient> xds_client, Args args)
- : ChildPolicyHandler(std::move(args), &grpc_lb_eds_trace),
- xds_client_(std::move(xds_client)) {}
-
- bool ConfigChangeRequiresNewPolicyInstance(
- LoadBalancingPolicy::Config* old_config,
- LoadBalancingPolicy::Config* new_config) const override {
- GPR_ASSERT(old_config->name() == kEds);
- GPR_ASSERT(new_config->name() == kEds);
- EdsLbConfig* old_eds_config = static_cast<EdsLbConfig*>(old_config);
- EdsLbConfig* new_eds_config = static_cast<EdsLbConfig*>(new_config);
- return old_eds_config->cluster_name() != new_eds_config->cluster_name() ||
- old_eds_config->eds_service_name() !=
- new_eds_config->eds_service_name() ||
- old_eds_config->lrs_load_reporting_server_name() !=
- new_eds_config->lrs_load_reporting_server_name();
- }
-
- OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
- const char* name, LoadBalancingPolicy::Args args) const override {
- return MakeOrphanable<EdsLb>(xds_client_, std::move(args));
- }
-
- private:
- RefCountedPtr<XdsClient> xds_client_;
- };
-};
-
-} // namespace
-
-} // namespace grpc_core
-
-//
-// Plugin registration
-//
-
-void grpc_lb_policy_eds_init() {
- grpc_core::LoadBalancingPolicyRegistry::Builder::
- RegisterLoadBalancingPolicyFactory(
- y_absl::make_unique<grpc_core::EdsLbFactory>());
-}
-
-void grpc_lb_policy_eds_shutdown() {}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds.h
index 1de3472a3a0..b73746f5da1 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds.h
@@ -1,32 +1,60 @@
-/*
- *
- * Copyright 2018 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.
- *
- */
+//
+// Copyright 2018 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_H
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_H
#include <grpc/support/port_platform.h>
-/** Channel arg indicating if a target corresponding to the address is a backend
- * received from a balancer. The type of this arg is an integer and the value is
- * treated as a bool. */
-// TODO(roth): Depending on how we ultimately decide to handle fallback,
-// this may no longer be needed.
-#define GRPC_ARG_ADDRESS_IS_BACKEND_FROM_XDS_LOAD_BALANCER \
- "grpc.address_is_backend_from_xds_load_balancer"
+#include "src/core/ext/filters/client_channel/server_address.h"
+#include "src/core/ext/xds/xds_client_stats.h"
+#include "src/core/lib/gprpp/ref_counted_ptr.h"
+
+namespace grpc_core {
+
+// Defined in the EDS policy.
+extern const char* kXdsLocalityNameAttributeKey;
+
+class XdsLocalityAttribute : public ServerAddress::AttributeInterface {
+ public:
+ explicit XdsLocalityAttribute(RefCountedPtr<XdsLocalityName> locality_name)
+ : locality_name_(std::move(locality_name)) {}
+
+ RefCountedPtr<XdsLocalityName> locality_name() const {
+ return locality_name_;
+ }
+
+ std::unique_ptr<AttributeInterface> Copy() const override {
+ return y_absl::make_unique<XdsLocalityAttribute>(locality_name_->Ref());
+ }
+
+ int Cmp(const AttributeInterface* other) const override {
+ const auto* other_locality_attr =
+ static_cast<const XdsLocalityAttribute*>(other);
+ return locality_name_->Compare(*other_locality_attr->locality_name_);
+ }
+
+ TString ToString() const override {
+ return locality_name_->AsHumanReadableString();
+ }
+
+ private:
+ RefCountedPtr<XdsLocalityName> locality_name_;
+};
+
+} // namespace grpc_core
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_H */
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h
new file mode 100644
index 00000000000..2351502c8ce
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h
@@ -0,0 +1,29 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_CHANNEL_ARGS_H
+#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_CHANNEL_ARGS_H
+
+// Channel arg indicating the xDS cluster name.
+// Set by xds_cluster_impl LB policy and used by GoogleDefaultCredentials.
+#define GRPC_ARG_XDS_CLUSTER_NAME "grpc.internal.xds_cluster_name"
+
+// For testing purpose, this channel arg indicating xds_cluster_resolver LB
+// policy should use the fake DNS resolver to resolve logical dns cluster.
+#define GRPC_ARG_XDS_LOGICAL_DNS_CLUSTER_FAKE_RESOLVER_RESPONSE_GENERATOR \
+ "grpc.internal.xds_logical_dns_cluster_fake_resolver_response_generator"
+
+#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_XDS_XDS_CHANNEL_ARGS_H
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc
index 0b17015dd82..5bd83bab614 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc
@@ -22,39 +22,109 @@
#include "src/core/ext/filters/client_channel/lb_policy.h"
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/xds/xds_client.h"
#include "src/core/ext/xds/xds_client_stats.h"
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/iomgr/work_serializer.h"
namespace grpc_core {
-TraceFlag grpc_eds_drop_lb_trace(false, "eds_drop_lb");
+TraceFlag grpc_xds_cluster_impl_lb_trace(false, "xds_cluster_impl_lb");
namespace {
-constexpr char kEdsDrop[] = "eds_drop_experimental";
+//
+// global circuit breaker atomic map
+//
-// Config for EDS drop LB policy.
-class EdsDropLbConfig : public LoadBalancingPolicy::Config {
+class CircuitBreakerCallCounterMap {
public:
- EdsDropLbConfig(RefCountedPtr<LoadBalancingPolicy::Config> child_policy,
- TString cluster_name, TString eds_service_name,
- y_absl::optional<TString> lrs_load_reporting_server_name,
- RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config)
+ using Key =
+ std::pair<TString /*cluster*/, TString /*eds_service_name*/>;
+
+ class CallCounter : public RefCounted<CallCounter> {
+ public:
+ explicit CallCounter(Key key) : key_(std::move(key)) {}
+ ~CallCounter() override;
+
+ uint32_t Increment() { return concurrent_requests_.FetchAdd(1); }
+ void Decrement() { concurrent_requests_.FetchSub(1); }
+
+ private:
+ Key key_;
+ Atomic<uint32_t> concurrent_requests_{0};
+ };
+
+ RefCountedPtr<CallCounter> GetOrCreate(const TString& cluster,
+ const TString& eds_service_name);
+
+ private:
+ Mutex mu_;
+ std::map<Key, CallCounter*> map_;
+};
+
+CircuitBreakerCallCounterMap* g_call_counter_map = nullptr;
+
+RefCountedPtr<CircuitBreakerCallCounterMap::CallCounter>
+CircuitBreakerCallCounterMap::GetOrCreate(const TString& cluster,
+ const TString& eds_service_name) {
+ Key key(cluster, eds_service_name);
+ RefCountedPtr<CallCounter> result;
+ MutexLock lock(&mu_);
+ auto it = map_.find(key);
+ if (it == map_.end()) {
+ it = map_.insert({key, nullptr}).first;
+ } else {
+ result = it->second->RefIfNonZero();
+ }
+ if (result == nullptr) {
+ result = MakeRefCounted<CallCounter>(std::move(key));
+ it->second = result.get();
+ }
+ return result;
+}
+
+CircuitBreakerCallCounterMap::CallCounter::~CallCounter() {
+ MutexLock lock(&g_call_counter_map->mu_);
+ auto it = g_call_counter_map->map_.find(key_);
+ if (it != g_call_counter_map->map_.end() && it->second == this) {
+ g_call_counter_map->map_.erase(it);
+ }
+}
+
+//
+// LB policy
+//
+
+constexpr char kXdsClusterImpl[] = "xds_cluster_impl_experimental";
+
+// Config for xDS Cluster Impl LB policy.
+class XdsClusterImplLbConfig : public LoadBalancingPolicy::Config {
+ public:
+ XdsClusterImplLbConfig(
+ RefCountedPtr<LoadBalancingPolicy::Config> child_policy,
+ TString cluster_name, TString eds_service_name,
+ y_absl::optional<TString> lrs_load_reporting_server_name,
+ uint32_t max_concurrent_requests,
+ RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config)
: child_policy_(std::move(child_policy)),
cluster_name_(std::move(cluster_name)),
eds_service_name_(std::move(eds_service_name)),
lrs_load_reporting_server_name_(
std::move(lrs_load_reporting_server_name)),
+ max_concurrent_requests_(max_concurrent_requests),
drop_config_(std::move(drop_config)) {}
- const char* name() const override { return kEdsDrop; }
+ const char* name() const override { return kXdsClusterImpl; }
RefCountedPtr<LoadBalancingPolicy::Config> child_policy() const {
return child_policy_;
@@ -64,6 +134,7 @@ class EdsDropLbConfig : public LoadBalancingPolicy::Config {
const y_absl::optional<TString>& lrs_load_reporting_server_name() const {
return lrs_load_reporting_server_name_;
};
+ uint32_t max_concurrent_requests() const { return max_concurrent_requests_; }
RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config() const {
return drop_config_;
}
@@ -73,21 +144,38 @@ class EdsDropLbConfig : public LoadBalancingPolicy::Config {
TString cluster_name_;
TString eds_service_name_;
y_absl::optional<TString> lrs_load_reporting_server_name_;
+ uint32_t max_concurrent_requests_;
RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config_;
};
-// EDS Drop LB policy.
-class EdsDropLb : public LoadBalancingPolicy {
+// xDS Cluster Impl LB policy.
+class XdsClusterImplLb : public LoadBalancingPolicy {
public:
- EdsDropLb(RefCountedPtr<XdsClient> xds_client, Args args);
+ XdsClusterImplLb(RefCountedPtr<XdsClient> xds_client, Args args);
- const char* name() const override { return kEdsDrop; }
+ const char* name() const override { return kXdsClusterImpl; }
void UpdateLocked(UpdateArgs args) override;
void ExitIdleLocked() override;
void ResetBackoffLocked() override;
private:
+ class StatsSubchannelWrapper : public DelegatingSubchannel {
+ public:
+ StatsSubchannelWrapper(
+ RefCountedPtr<SubchannelInterface> wrapped_subchannel,
+ RefCountedPtr<XdsClusterLocalityStats> locality_stats)
+ : DelegatingSubchannel(std::move(wrapped_subchannel)),
+ locality_stats_(std::move(locality_stats)) {}
+
+ XdsClusterLocalityStats* locality_stats() const {
+ return locality_stats_.get();
+ }
+
+ private:
+ RefCountedPtr<XdsClusterLocalityStats> locality_stats_;
+ };
+
// A simple wrapper for ref-counting a picker from the child policy.
class RefCountedPicker : public RefCounted<RefCountedPicker> {
public:
@@ -100,16 +188,16 @@ class EdsDropLb : public LoadBalancingPolicy {
};
// A picker that wraps the picker from the child to perform drops.
- class DropPicker : public SubchannelPicker {
+ class Picker : public SubchannelPicker {
public:
- DropPicker(EdsDropLb* eds_drop_lb, RefCountedPtr<RefCountedPicker> picker)
- : drop_config_(eds_drop_lb->config_->drop_config()),
- drop_stats_(eds_drop_lb->drop_stats_),
- picker_(std::move(picker)) {}
+ Picker(XdsClusterImplLb* xds_cluster_impl_lb,
+ RefCountedPtr<RefCountedPicker> picker);
- PickResult Pick(PickArgs args);
+ PickResult Pick(PickArgs args) override;
private:
+ RefCountedPtr<CircuitBreakerCallCounterMap::CallCounter> call_counter_;
+ uint32_t max_concurrent_requests_;
RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config_;
RefCountedPtr<XdsClusterDropStats> drop_stats_;
RefCountedPtr<RefCountedPicker> picker_;
@@ -117,10 +205,12 @@ class EdsDropLb : public LoadBalancingPolicy {
class Helper : public ChannelControlHelper {
public:
- explicit Helper(RefCountedPtr<EdsDropLb> eds_drop_policy)
- : eds_drop_policy_(std::move(eds_drop_policy)) {}
+ explicit Helper(RefCountedPtr<XdsClusterImplLb> xds_cluster_impl_policy)
+ : xds_cluster_impl_policy_(std::move(xds_cluster_impl_policy)) {}
- ~Helper() { eds_drop_policy_.reset(DEBUG_LOCATION, "Helper"); }
+ ~Helper() override {
+ xds_cluster_impl_policy_.reset(DEBUG_LOCATION, "Helper");
+ }
RefCountedPtr<SubchannelInterface> CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) override;
@@ -131,10 +221,10 @@ class EdsDropLb : public LoadBalancingPolicy {
y_absl::string_view message) override;
private:
- RefCountedPtr<EdsDropLb> eds_drop_policy_;
+ RefCountedPtr<XdsClusterImplLb> xds_cluster_impl_policy_;
};
- ~EdsDropLb();
+ ~XdsClusterImplLb() override;
void ShutdownLocked() override;
@@ -146,7 +236,10 @@ class EdsDropLb : public LoadBalancingPolicy {
void MaybeUpdatePickerLocked();
// Current config from the resolver.
- RefCountedPtr<EdsDropLbConfig> config_;
+ RefCountedPtr<XdsClusterImplLbConfig> config_;
+
+ // Current concurrent number of requests.
+ RefCountedPtr<CircuitBreakerCallCounterMap::CallCounter> call_counter_;
// Internal state.
bool shutting_down_ = false;
@@ -166,12 +259,26 @@ class EdsDropLb : public LoadBalancingPolicy {
};
//
-// EdsDropLb::DropPicker
+// XdsClusterImplLb::Picker
//
-LoadBalancingPolicy::PickResult EdsDropLb::DropPicker::Pick(
+XdsClusterImplLb::Picker::Picker(XdsClusterImplLb* xds_cluster_impl_lb,
+ RefCountedPtr<RefCountedPicker> picker)
+ : call_counter_(xds_cluster_impl_lb->call_counter_),
+ max_concurrent_requests_(
+ xds_cluster_impl_lb->config_->max_concurrent_requests()),
+ drop_config_(xds_cluster_impl_lb->config_->drop_config()),
+ drop_stats_(xds_cluster_impl_lb->drop_stats_),
+ picker_(std::move(picker)) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_impl_lb %p] constructed new picker %p",
+ xds_cluster_impl_lb, this);
+ }
+}
+
+LoadBalancingPolicy::PickResult XdsClusterImplLb::Picker::Pick(
LoadBalancingPolicy::PickArgs args) {
- // Handle drop.
+ // Handle EDS drops.
const TString* drop_category;
if (drop_config_->ShouldDrop(&drop_category)) {
if (drop_stats_ != nullptr) drop_stats_->AddCallDropped(*drop_category);
@@ -179,41 +286,99 @@ LoadBalancingPolicy::PickResult EdsDropLb::DropPicker::Pick(
result.type = PickResult::PICK_COMPLETE;
return result;
}
+ // Handle circuit breaking.
+ uint32_t current = call_counter_->Increment();
+ // Check and see if we exceeded the max concurrent requests count.
+ if (current >= max_concurrent_requests_) {
+ call_counter_->Decrement();
+ if (drop_stats_ != nullptr) drop_stats_->AddUncategorizedDrops();
+ PickResult result;
+ result.type = PickResult::PICK_COMPLETE;
+ return result;
+ }
// If we're not dropping the call, we should always have a child picker.
if (picker_ == nullptr) { // Should never happen.
PickResult result;
result.type = PickResult::PICK_FAILED;
- result.error =
- grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "eds_drop picker not given any child picker"),
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
+ result.error = grpc_error_set_int(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "xds_cluster_impl picker not given any child picker"),
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
+ call_counter_->Decrement();
return result;
}
// Not dropping, so delegate to child picker.
- return picker_->Pick(args);
+ PickResult result = picker_->Pick(args);
+ if (result.type == result.PICK_COMPLETE && result.subchannel != nullptr) {
+ XdsClusterLocalityStats* locality_stats = nullptr;
+ if (drop_stats_ != nullptr) { // If load reporting is enabled.
+ auto* subchannel_wrapper =
+ static_cast<StatsSubchannelWrapper*>(result.subchannel.get());
+ // Handle load reporting.
+ locality_stats = subchannel_wrapper->locality_stats()->Ref().release();
+ // Record a call started.
+ locality_stats->AddCallStarted();
+ // Unwrap subchannel to pass back up the stack.
+ result.subchannel = subchannel_wrapper->wrapped_subchannel();
+ }
+ // Intercept the recv_trailing_metadata op to record call completion.
+ auto* call_counter = call_counter_->Ref(DEBUG_LOCATION, "call").release();
+ auto original_recv_trailing_metadata_ready =
+ result.recv_trailing_metadata_ready;
+ result.recv_trailing_metadata_ready =
+ // Note: This callback does not run in either the control plane
+ // work serializer or in the data plane mutex.
+ [locality_stats, original_recv_trailing_metadata_ready, call_counter](
+ grpc_error* error, MetadataInterface* metadata,
+ CallState* call_state) {
+ // Record call completion for load reporting.
+ if (locality_stats != nullptr) {
+ const bool call_failed = error != GRPC_ERROR_NONE;
+ locality_stats->AddCallFinished(call_failed);
+ locality_stats->Unref(DEBUG_LOCATION, "LocalityStats+call");
+ }
+ // Decrement number of calls in flight.
+ call_counter->Decrement();
+ call_counter->Unref(DEBUG_LOCATION, "call");
+ // Invoke the original recv_trailing_metadata_ready callback, if any.
+ if (original_recv_trailing_metadata_ready != nullptr) {
+ original_recv_trailing_metadata_ready(error, metadata, call_state);
+ }
+ };
+ } else {
+ // TODO(roth): We should ideally also record call failures here in the case
+ // where a pick fails. This is challenging, because we don't know which
+ // picks are for wait_for_ready RPCs or how many times we'll return a
+ // failure for the same wait_for_ready RPC.
+ call_counter_->Decrement();
+ }
+ return result;
}
//
-// EdsDropLb
+// XdsClusterImplLb
//
-EdsDropLb::EdsDropLb(RefCountedPtr<XdsClient> xds_client, Args args)
+XdsClusterImplLb::XdsClusterImplLb(RefCountedPtr<XdsClient> xds_client,
+ Args args)
: LoadBalancingPolicy(std::move(args)), xds_client_(std::move(xds_client)) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
- gpr_log(GPR_INFO, "[eds_drop_lb %p] created -- using xds client %p", this,
- xds_client_.get());
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_impl_lb %p] created -- using xds client %p",
+ this, xds_client_.get());
}
}
-EdsDropLb::~EdsDropLb() {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
- gpr_log(GPR_INFO, "[eds_drop_lb %p] destroying xds LB policy", this);
+XdsClusterImplLb::~XdsClusterImplLb() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_impl_lb %p] destroying xds_cluster_impl LB policy",
+ this);
}
}
-void EdsDropLb::ShutdownLocked() {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
- gpr_log(GPR_INFO, "[eds_drop_lb %p] shutting down", this);
+void XdsClusterImplLb::ShutdownLocked() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_impl_lb %p] shutting down", this);
}
shutting_down_ = true;
// Remove the child policy's interested_parties pollset_set from the
@@ -230,50 +395,60 @@ void EdsDropLb::ShutdownLocked() {
xds_client_.reset();
}
-void EdsDropLb::ExitIdleLocked() {
+void XdsClusterImplLb::ExitIdleLocked() {
if (child_policy_ != nullptr) child_policy_->ExitIdleLocked();
}
-void EdsDropLb::ResetBackoffLocked() {
+void XdsClusterImplLb::ResetBackoffLocked() {
// The XdsClient will have its backoff reset by the xds resolver, so we
// don't need to do it here.
if (child_policy_ != nullptr) child_policy_->ResetBackoffLocked();
}
-void EdsDropLb::UpdateLocked(UpdateArgs args) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
- gpr_log(GPR_INFO, "[eds_drop_lb %p] Received update", this);
+void XdsClusterImplLb::UpdateLocked(UpdateArgs args) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_impl_lb %p] Received update", this);
}
// Update config.
+ const bool is_initial_update = config_ == nullptr;
auto old_config = std::move(config_);
config_ = std::move(args.config);
- // Update load reporting if needed.
- if (old_config == nullptr ||
- config_->lrs_load_reporting_server_name() !=
- old_config->lrs_load_reporting_server_name() ||
- config_->cluster_name() != old_config->cluster_name() ||
- config_->eds_service_name() != old_config->eds_service_name()) {
- drop_stats_.reset();
+ // On initial update, create drop stats.
+ if (is_initial_update) {
if (config_->lrs_load_reporting_server_name().has_value()) {
drop_stats_ = xds_client_->AddClusterDropStats(
config_->lrs_load_reporting_server_name().value(),
config_->cluster_name(), config_->eds_service_name());
}
+ call_counter_ = g_call_counter_map->GetOrCreate(
+ config_->cluster_name(), config_->eds_service_name());
+ } else {
+ // Cluster name, EDS service name, and LRS server name should never
+ // change, because the EDS policy above us should be swapped out if
+ // that happens.
+ GPR_ASSERT(config_->cluster_name() == old_config->cluster_name());
+ GPR_ASSERT(config_->eds_service_name() == old_config->eds_service_name());
+ GPR_ASSERT(config_->lrs_load_reporting_server_name() ==
+ old_config->lrs_load_reporting_server_name());
+ }
+ // Update picker if max_concurrent_requests has changed.
+ if (is_initial_update || config_->max_concurrent_requests() !=
+ old_config->max_concurrent_requests()) {
MaybeUpdatePickerLocked();
}
// Update child policy.
UpdateChildPolicyLocked(std::move(args.addresses), args.args);
- args.args = nullptr;
}
-void EdsDropLb::MaybeUpdatePickerLocked() {
+void XdsClusterImplLb::MaybeUpdatePickerLocked() {
// If we're dropping all calls, report READY, regardless of what (or
// whether) the child has reported.
if (config_->drop_config() != nullptr && config_->drop_config()->drop_all()) {
- auto drop_picker = y_absl::make_unique<DropPicker>(this, picker_);
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
+ auto drop_picker = y_absl::make_unique<Picker>(this, picker_);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
gpr_log(GPR_INFO,
- "[eds_drop_lb %p] updating connectivity (drop all): state=READY "
+ "[xds_cluster_impl_lb %p] updating connectivity (drop all): "
+ "state=READY "
"picker=%p",
this, drop_picker.get());
}
@@ -283,10 +458,11 @@ void EdsDropLb::MaybeUpdatePickerLocked() {
}
// Otherwise, update only if we have a child picker.
if (picker_ != nullptr) {
- auto drop_picker = y_absl::make_unique<DropPicker>(this, picker_);
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
+ auto drop_picker = y_absl::make_unique<Picker>(this, picker_);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
gpr_log(GPR_INFO,
- "[eds_drop_lb %p] updating connectivity: state=%s status=(%s) "
+ "[xds_cluster_impl_lb %p] updating connectivity: state=%s "
+ "status=(%s) "
"picker=%p",
this, ConnectivityStateName(state_), status_.ToString().c_str(),
drop_picker.get());
@@ -296,7 +472,7 @@ void EdsDropLb::MaybeUpdatePickerLocked() {
}
}
-OrphanablePtr<LoadBalancingPolicy> EdsDropLb::CreateChildPolicyLocked(
+OrphanablePtr<LoadBalancingPolicy> XdsClusterImplLb::CreateChildPolicyLocked(
const grpc_channel_args* args) {
LoadBalancingPolicy::Args lb_policy_args;
lb_policy_args.work_serializer = work_serializer();
@@ -305,9 +481,10 @@ OrphanablePtr<LoadBalancingPolicy> EdsDropLb::CreateChildPolicyLocked(
y_absl::make_unique<Helper>(Ref(DEBUG_LOCATION, "Helper"));
OrphanablePtr<LoadBalancingPolicy> lb_policy =
MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
- &grpc_eds_drop_lb_trace);
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
- gpr_log(GPR_INFO, "[eds_drop_lb %p] Created new child policy handler %p",
+ &grpc_xds_cluster_impl_lb_trace);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_impl_lb %p] Created new child policy handler %p",
this, lb_policy.get());
}
// Add our interested_parties pollset_set to that of the newly created
@@ -318,8 +495,8 @@ OrphanablePtr<LoadBalancingPolicy> EdsDropLb::CreateChildPolicyLocked(
return lb_policy;
}
-void EdsDropLb::UpdateChildPolicyLocked(ServerAddressList addresses,
- const grpc_channel_args* args) {
+void XdsClusterImplLb::UpdateChildPolicyLocked(ServerAddressList addresses,
+ const grpc_channel_args* args) {
// Create policy if needed.
if (child_policy_ == nullptr) {
child_policy_ = CreateChildPolicyLocked(args);
@@ -328,78 +505,110 @@ void EdsDropLb::UpdateChildPolicyLocked(ServerAddressList addresses,
UpdateArgs update_args;
update_args.addresses = std::move(addresses);
update_args.config = config_->child_policy();
- update_args.args = args;
+ grpc_arg cluster_arg = grpc_channel_arg_string_create(
+ const_cast<char*>(GRPC_ARG_XDS_CLUSTER_NAME),
+ const_cast<char*>(config_->cluster_name().c_str()));
+ update_args.args = grpc_channel_args_copy_and_add(args, &cluster_arg, 1);
// Update the policy.
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
- gpr_log(GPR_INFO, "[eds_drop_lb %p] Updating child policy handler %p", this,
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_impl_lb %p] Updating child policy handler %p", this,
child_policy_.get());
}
child_policy_->UpdateLocked(std::move(update_args));
}
//
-// EdsDropLb::Helper
+// XdsClusterImplLb::Helper
//
-RefCountedPtr<SubchannelInterface> EdsDropLb::Helper::CreateSubchannel(
+RefCountedPtr<SubchannelInterface> XdsClusterImplLb::Helper::CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) {
- if (eds_drop_policy_->shutting_down_) return nullptr;
- return eds_drop_policy_->channel_control_helper()->CreateSubchannel(
+ if (xds_cluster_impl_policy_->shutting_down_) return nullptr;
+ // If load reporting is enabled, wrap the subchannel such that it
+ // includes the locality stats object, which will be used by the EdsPicker.
+ if (xds_cluster_impl_policy_->config_->lrs_load_reporting_server_name()
+ .has_value()) {
+ RefCountedPtr<XdsLocalityName> locality_name;
+ auto* attribute = address.GetAttribute(kXdsLocalityNameAttributeKey);
+ if (attribute != nullptr) {
+ const auto* locality_attr =
+ static_cast<const XdsLocalityAttribute*>(attribute);
+ locality_name = locality_attr->locality_name();
+ }
+ RefCountedPtr<XdsClusterLocalityStats> locality_stats =
+ xds_cluster_impl_policy_->xds_client_->AddClusterLocalityStats(
+ *xds_cluster_impl_policy_->config_
+ ->lrs_load_reporting_server_name(),
+ xds_cluster_impl_policy_->config_->cluster_name(),
+ xds_cluster_impl_policy_->config_->eds_service_name(),
+ std::move(locality_name));
+ return MakeRefCounted<StatsSubchannelWrapper>(
+ xds_cluster_impl_policy_->channel_control_helper()->CreateSubchannel(
+ std::move(address), args),
+ std::move(locality_stats));
+ }
+ // Load reporting not enabled, so don't wrap the subchannel.
+ return xds_cluster_impl_policy_->channel_control_helper()->CreateSubchannel(
std::move(address), args);
}
-void EdsDropLb::Helper::UpdateState(grpc_connectivity_state state,
- const y_absl::Status& status,
- std::unique_ptr<SubchannelPicker> picker) {
- if (eds_drop_policy_->shutting_down_) return;
- if (GRPC_TRACE_FLAG_ENABLED(grpc_eds_drop_lb_trace)) {
+void XdsClusterImplLb::Helper::UpdateState(
+ grpc_connectivity_state state, const y_absl::Status& status,
+ std::unique_ptr<SubchannelPicker> picker) {
+ if (xds_cluster_impl_policy_->shutting_down_) return;
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_cluster_impl_lb_trace)) {
gpr_log(GPR_INFO,
- "[eds_drop_lb %p] child connectivity state update: state=%s (%s) "
+ "[xds_cluster_impl_lb %p] child connectivity state update: "
+ "state=%s (%s) "
"picker=%p",
- eds_drop_policy_.get(), ConnectivityStateName(state),
+ xds_cluster_impl_policy_.get(), ConnectivityStateName(state),
status.ToString().c_str(), picker.get());
}
// Save the state and picker.
- eds_drop_policy_->state_ = state;
- eds_drop_policy_->status_ = status;
- eds_drop_policy_->picker_ =
+ xds_cluster_impl_policy_->state_ = state;
+ xds_cluster_impl_policy_->status_ = status;
+ xds_cluster_impl_policy_->picker_ =
MakeRefCounted<RefCountedPicker>(std::move(picker));
// Wrap the picker and return it to the channel.
- eds_drop_policy_->MaybeUpdatePickerLocked();
+ xds_cluster_impl_policy_->MaybeUpdatePickerLocked();
}
-void EdsDropLb::Helper::RequestReresolution() {
- if (eds_drop_policy_->shutting_down_) return;
- eds_drop_policy_->channel_control_helper()->RequestReresolution();
+void XdsClusterImplLb::Helper::RequestReresolution() {
+ if (xds_cluster_impl_policy_->shutting_down_) return;
+ xds_cluster_impl_policy_->channel_control_helper()->RequestReresolution();
}
-void EdsDropLb::Helper::AddTraceEvent(TraceSeverity severity,
- y_absl::string_view message) {
- if (eds_drop_policy_->shutting_down_) return;
- eds_drop_policy_->channel_control_helper()->AddTraceEvent(severity, message);
+void XdsClusterImplLb::Helper::AddTraceEvent(TraceSeverity severity,
+ y_absl::string_view message) {
+ if (xds_cluster_impl_policy_->shutting_down_) return;
+ xds_cluster_impl_policy_->channel_control_helper()->AddTraceEvent(severity,
+ message);
}
//
// factory
//
-class EdsDropLbFactory : public LoadBalancingPolicyFactory {
+class XdsClusterImplLbFactory : public LoadBalancingPolicyFactory {
public:
OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
LoadBalancingPolicy::Args args) const override {
grpc_error* error = GRPC_ERROR_NONE;
RefCountedPtr<XdsClient> xds_client = XdsClient::GetOrCreate(&error);
if (error != GRPC_ERROR_NONE) {
- gpr_log(GPR_ERROR,
- "cannot get XdsClient to instantiate eds_drop LB policy: %s",
- grpc_error_string(error));
+ gpr_log(
+ GPR_ERROR,
+ "cannot get XdsClient to instantiate xds_cluster_impl LB policy: %s",
+ grpc_error_string(error));
GRPC_ERROR_UNREF(error);
return nullptr;
}
- return MakeOrphanable<EdsDropLb>(std::move(xds_client), std::move(args));
+ return MakeOrphanable<XdsClusterImplLb>(std::move(xds_client),
+ std::move(args));
}
- const char* name() const override { return kEdsDrop; }
+ const char* name() const override { return kXdsClusterImpl; }
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
const Json& json, grpc_error** error) const override {
@@ -408,7 +617,7 @@ class EdsDropLbFactory : public LoadBalancingPolicyFactory {
// This policy was configured in the deprecated loadBalancingPolicy
// field or in the client API.
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:loadBalancingPolicy error:eds_drop policy requires "
+ "field:loadBalancingPolicy error:xds_cluster_impl policy requires "
"configuration. Please use loadBalancingConfig field of service "
"config instead.");
return nullptr;
@@ -466,6 +675,18 @@ class EdsDropLbFactory : public LoadBalancingPolicyFactory {
lrs_load_reporting_server_name = it->second.string_value();
}
}
+ // Max concurrent requests.
+ uint32_t max_concurrent_requests = 1024;
+ it = json.object_value().find("maxConcurrentRequests");
+ if (it != json.object_value().end()) {
+ if (it->second.type() != Json::Type::NUMBER) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:max_concurrent_requests error:must be of type number"));
+ } else {
+ max_concurrent_requests =
+ gpr_parse_nonnegative_int(it->second.string_value().c_str());
+ }
+ }
// Drop config.
auto drop_config = MakeRefCounted<XdsApi::EdsUpdate::DropConfig>();
it = json.object_value().find("dropCategories");
@@ -482,13 +703,13 @@ class EdsDropLbFactory : public LoadBalancingPolicyFactory {
}
if (!error_list.empty()) {
*error = GRPC_ERROR_CREATE_FROM_VECTOR(
- "eds_drop_experimental LB policy config", &error_list);
+ "xds_cluster_impl_experimental LB policy config", &error_list);
return nullptr;
}
- return MakeRefCounted<EdsDropLbConfig>(
+ return MakeRefCounted<XdsClusterImplLbConfig>(
std::move(child_policy), std::move(cluster_name),
std::move(eds_service_name), std::move(lrs_load_reporting_server_name),
- std::move(drop_config));
+ max_concurrent_requests, std::move(drop_config));
}
private:
@@ -562,10 +783,13 @@ class EdsDropLbFactory : public LoadBalancingPolicyFactory {
// Plugin registration
//
-void grpc_lb_policy_eds_drop_init() {
+void grpc_lb_policy_xds_cluster_impl_init() {
+ grpc_core::g_call_counter_map = new grpc_core::CircuitBreakerCallCounterMap();
grpc_core::LoadBalancingPolicyRegistry::Builder::
RegisterLoadBalancingPolicyFactory(
- y_absl::make_unique<grpc_core::EdsDropLbFactory>());
+ y_absl::make_unique<grpc_core::XdsClusterImplLbFactory>());
}
-void grpc_lb_policy_eds_drop_shutdown() {}
+void grpc_lb_policy_xds_cluster_impl_shutdown() {
+ delete grpc_core::g_call_counter_map;
+}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
index f113887a88e..5e7bbd542e0 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc
@@ -16,18 +16,13 @@
#include <grpc/support/port_platform.h>
-#include <inttypes.h>
-#include <limits.h>
-#include <string.h>
+#include <set>
+#include <util/generic/string.h>
+#include <vector>
-#include "y_absl/container/inlined_vector.h"
-#include "y_absl/strings/match.h"
-#include "y_absl/strings/numbers.h"
+#include "y_absl/status/status.h"
#include "y_absl/strings/str_cat.h"
-#include "y_absl/strings/str_join.h"
-#include "y_absl/strings/str_split.h"
#include "y_absl/strings/string_view.h"
-#include "re2/re2.h"
#include <grpc/grpc.h>
@@ -36,7 +31,6 @@
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
#include "src/core/ext/filters/client_channel/resolver/xds/xds_resolver.h"
-#include "src/core/ext/xds/xds_api.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/orphanable.h"
@@ -61,7 +55,7 @@ class XdsClusterManagerLbConfig : public LoadBalancingPolicy::Config {
using ClusterMap =
std::map<TString, RefCountedPtr<LoadBalancingPolicy::Config>>;
- XdsClusterManagerLbConfig(ClusterMap cluster_map)
+ explicit XdsClusterManagerLbConfig(ClusterMap cluster_map)
: cluster_map_(std::move(cluster_map)) {}
const char* name() const override { return kXdsClusterManager; }
@@ -109,17 +103,13 @@ class XdsClusterManagerLb : public LoadBalancingPolicy {
// It is required that the keys of cluster_map have to live at least as long
// as the ClusterPicker instance.
- ClusterPicker(ClusterMap cluster_map,
- RefCountedPtr<XdsClusterManagerLbConfig> config)
- : cluster_map_(std::move(cluster_map)), config_(std::move(config)) {}
+ explicit ClusterPicker(ClusterMap cluster_map)
+ : cluster_map_(std::move(cluster_map)) {}
PickResult Pick(PickArgs args) override;
private:
ClusterMap cluster_map_;
- // Take a reference to config so that we can use
- // XdsApi::RdsUpdate::RdsRoute::Matchers from it.
- RefCountedPtr<XdsClusterManagerLbConfig> config_;
};
// Each ClusterChild holds a ref to its parent XdsClusterManagerLb.
@@ -127,7 +117,7 @@ class XdsClusterManagerLb : public LoadBalancingPolicy {
public:
ClusterChild(RefCountedPtr<XdsClusterManagerLb> xds_cluster_manager_policy,
const TString& name);
- ~ClusterChild();
+ ~ClusterChild() override;
void Orphan() override;
@@ -151,7 +141,9 @@ class XdsClusterManagerLb : public LoadBalancingPolicy {
explicit Helper(RefCountedPtr<ClusterChild> xds_cluster_manager_child)
: xds_cluster_manager_child_(std::move(xds_cluster_manager_child)) {}
- ~Helper() { xds_cluster_manager_child_.reset(DEBUG_LOCATION, "Helper"); }
+ ~Helper() override {
+ xds_cluster_manager_child_.reset(DEBUG_LOCATION, "Helper");
+ }
RefCountedPtr<SubchannelInterface> CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) override;
@@ -192,7 +184,7 @@ class XdsClusterManagerLb : public LoadBalancingPolicy {
bool shutdown_ = false;
};
- ~XdsClusterManagerLb();
+ ~XdsClusterManagerLb() override;
void ShutdownLocked() override;
@@ -368,8 +360,7 @@ void XdsClusterManagerLb::UpdateStateLocked() {
Ref(DEBUG_LOCATION, "QueuePicker")));
}
}
- picker =
- y_absl::make_unique<ClusterPicker>(std::move(cluster_map), config_);
+ picker = y_absl::make_unique<ClusterPicker>(std::move(cluster_map));
break;
}
case GRPC_CHANNEL_CONNECTING:
@@ -510,7 +501,7 @@ void XdsClusterManagerLb::ClusterChild::ResetBackoffLocked() {
void XdsClusterManagerLb::ClusterChild::DeactivateLocked() {
// If already deactivated, don't do that again.
- if (delayed_removal_timer_callback_pending_ == true) return;
+ if (delayed_removal_timer_callback_pending_) return;
// Set the child weight to 0 so that future picker won't contain this child.
// Start a timer to delete the child.
Ref(DEBUG_LOCATION, "ClusterChild+timer").release();
@@ -547,8 +538,9 @@ void XdsClusterManagerLb::ClusterChild::OnDelayedRemovalTimerLocked(
RefCountedPtr<SubchannelInterface>
XdsClusterManagerLb::ClusterChild::Helper::CreateSubchannel(
ServerAddress address, const grpc_channel_args& args) {
- if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_)
+ if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_) {
return nullptr;
+ }
return xds_cluster_manager_child_->xds_cluster_manager_policy_
->channel_control_helper()
->CreateSubchannel(std::move(address), args);
@@ -566,8 +558,9 @@ void XdsClusterManagerLb::ClusterChild::Helper::UpdateState(
xds_cluster_manager_child_->name_.c_str(), ConnectivityStateName(state),
status.ToString().c_str(), picker.get());
}
- if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_)
+ if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_) {
return;
+ }
// Cache the picker in the ClusterChild.
xds_cluster_manager_child_->picker_wrapper_ =
MakeRefCounted<ChildPickerWrapper>(xds_cluster_manager_child_->name_,
@@ -591,8 +584,9 @@ void XdsClusterManagerLb::ClusterChild::Helper::UpdateState(
}
void XdsClusterManagerLb::ClusterChild::Helper::RequestReresolution() {
- if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_)
+ if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_) {
return;
+ }
xds_cluster_manager_child_->xds_cluster_manager_policy_
->channel_control_helper()
->RequestReresolution();
@@ -600,8 +594,9 @@ void XdsClusterManagerLb::ClusterChild::Helper::RequestReresolution() {
void XdsClusterManagerLb::ClusterChild::Helper::AddTraceEvent(
TraceSeverity severity, y_absl::string_view message) {
- if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_)
+ if (xds_cluster_manager_child_->xds_cluster_manager_policy_->shutting_down_) {
return;
+ }
xds_cluster_manager_child_->xds_cluster_manager_policy_
->channel_control_helper()
->AddTraceEvent(severity, message);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
new file mode 100644
index 00000000000..9901884dcea
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc
@@ -0,0 +1,1384 @@
+//
+// Copyright 2018 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include <inttypes.h>
+#include <limits.h>
+
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/types/optional.h"
+
+#include <grpc/grpc.h>
+
+#include "src/core/ext/filters/client_channel/client_channel.h"
+#include "src/core/ext/filters/client_channel/lb_policy.h"
+#include "src/core/ext/filters/client_channel/lb_policy/address_filtering.h"
+#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"
+#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
+#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
+#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
+#include "src/core/ext/filters/client_channel/resolver_registry.h"
+#include "src/core/ext/filters/client_channel/server_address.h"
+#include "src/core/ext/xds/xds_channel_args.h"
+#include "src/core/ext/xds/xds_client.h"
+#include "src/core/ext/xds/xds_client_stats.h"
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gprpp/orphanable.h"
+#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/iomgr/work_serializer.h"
+#include "src/core/lib/transport/error_utils.h"
+#include "src/core/lib/uri/uri_parser.h"
+
+#define GRPC_EDS_DEFAULT_FALLBACK_TIMEOUT 10000
+
+namespace grpc_core {
+
+TraceFlag grpc_lb_xds_cluster_resolver_trace(false, "xds_cluster_resolver_lb");
+
+const char* kXdsLocalityNameAttributeKey = "xds_locality_name";
+
+namespace {
+
+constexpr char kXdsClusterResolver[] = "xds_cluster_resolver_experimental";
+
+// Config for EDS LB policy.
+class XdsClusterResolverLbConfig : public LoadBalancingPolicy::Config {
+ public:
+ struct DiscoveryMechanism {
+ TString cluster_name;
+ y_absl::optional<TString> lrs_load_reporting_server_name;
+ uint32_t max_concurrent_requests;
+ enum DiscoveryMechanismType {
+ EDS,
+ LOGICAL_DNS,
+ };
+ DiscoveryMechanismType type;
+ TString eds_service_name;
+
+ bool operator==(const DiscoveryMechanism& other) const {
+ return (cluster_name == other.cluster_name &&
+ lrs_load_reporting_server_name ==
+ other.lrs_load_reporting_server_name &&
+ max_concurrent_requests == other.max_concurrent_requests &&
+ type == other.type && eds_service_name == other.eds_service_name);
+ }
+ };
+
+ XdsClusterResolverLbConfig(
+ std::vector<DiscoveryMechanism> discovery_mechanisms, Json xds_lb_policy)
+ : discovery_mechanisms_(std::move(discovery_mechanisms)),
+ xds_lb_policy_(std::move(xds_lb_policy)) {}
+
+ const char* name() const override { return kXdsClusterResolver; }
+ const std::vector<DiscoveryMechanism>& discovery_mechanisms() const {
+ return discovery_mechanisms_;
+ }
+
+ const Json& xds_lb_policy() const { return xds_lb_policy_; }
+
+ private:
+ std::vector<DiscoveryMechanism> discovery_mechanisms_;
+ Json xds_lb_policy_;
+};
+
+// Xds Cluster Resolver LB policy.
+class XdsClusterResolverLb : public LoadBalancingPolicy {
+ public:
+ XdsClusterResolverLb(RefCountedPtr<XdsClient> xds_client, Args args);
+
+ const char* name() const override { return kXdsClusterResolver; }
+
+ void UpdateLocked(UpdateArgs args) override;
+ void ResetBackoffLocked() override;
+ void ExitIdleLocked() override;
+
+ private:
+ // Discovery Mechanism Base class
+ //
+ // Implemented by EDS and LOGICAL_DNS.
+ //
+ // Implementations are responsible for calling the LB policy's
+ // OnEndpointChanged(), OnError(), and OnResourceDoesNotExist()
+ // methods when the corresponding events occur.
+ //
+ // Must implement Orphan() method to cancel the watchers.
+ class DiscoveryMechanism : public InternallyRefCounted<DiscoveryMechanism> {
+ public:
+ DiscoveryMechanism(
+ RefCountedPtr<XdsClusterResolverLb> xds_cluster_resolver_lb,
+ size_t index)
+ : parent_(std::move(xds_cluster_resolver_lb)), index_(index) {}
+ virtual void Start() = 0;
+ void Orphan() override = 0;
+ virtual Json::Array override_child_policy() = 0;
+ virtual bool disable_reresolution() = 0;
+
+ // Caller must ensure that config_ is set before calling.
+ y_absl::string_view GetXdsClusterResolverResourceName() const {
+ if (!parent_->is_xds_uri_) return parent_->server_name_;
+ if (!parent_->config_->discovery_mechanisms()[index_]
+ .eds_service_name.empty()) {
+ return parent_->config_->discovery_mechanisms()[index_]
+ .eds_service_name;
+ }
+ return parent_->config_->discovery_mechanisms()[index_].cluster_name;
+ }
+
+ // Returns a pair containing the cluster and eds_service_name
+ // to use for LRS load reporting. Caller must ensure that config_ is set
+ // before calling.
+ std::pair<y_absl::string_view, y_absl::string_view> GetLrsClusterKey() const {
+ if (!parent_->is_xds_uri_) return {parent_->server_name_, y_absl::string_view{}};
+ return {
+ parent_->config_->discovery_mechanisms()[index_].cluster_name,
+ parent_->config_->discovery_mechanisms()[index_].eds_service_name};
+ }
+
+ protected:
+ XdsClusterResolverLb* parent() const { return parent_.get(); }
+ size_t index() const { return index_; }
+
+ private:
+ RefCountedPtr<XdsClusterResolverLb> parent_;
+ // Stores its own index in the vector of DiscoveryMechanism.
+ size_t index_;
+ };
+
+ class EdsDiscoveryMechanism : public DiscoveryMechanism {
+ public:
+ EdsDiscoveryMechanism(
+ RefCountedPtr<XdsClusterResolverLb> xds_cluster_resolver_lb,
+ size_t index)
+ : DiscoveryMechanism(std::move(xds_cluster_resolver_lb), index) {}
+ void Start() override;
+ void Orphan() override;
+ Json::Array override_child_policy() override { return Json::Array{}; }
+ bool disable_reresolution() override { return true; }
+
+ private:
+ class EndpointWatcher : public XdsClient::EndpointWatcherInterface {
+ public:
+ explicit EndpointWatcher(
+ RefCountedPtr<EdsDiscoveryMechanism> discovery_mechanism)
+ : discovery_mechanism_(std::move(discovery_mechanism)) {}
+ ~EndpointWatcher() override {
+ discovery_mechanism_.reset(DEBUG_LOCATION, "EndpointWatcher");
+ }
+ void OnEndpointChanged(XdsApi::EdsUpdate update) override {
+ new Notifier(discovery_mechanism_, std::move(update));
+ }
+ void OnError(grpc_error* error) override {
+ new Notifier(discovery_mechanism_, error);
+ }
+ void OnResourceDoesNotExist() override {
+ new Notifier(discovery_mechanism_);
+ }
+
+ private:
+ class Notifier {
+ public:
+ Notifier(RefCountedPtr<EdsDiscoveryMechanism> discovery_mechanism,
+ XdsApi::EdsUpdate update);
+ Notifier(RefCountedPtr<EdsDiscoveryMechanism> discovery_mechanism,
+ grpc_error* error);
+ explicit Notifier(
+ RefCountedPtr<EdsDiscoveryMechanism> discovery_mechanism);
+ ~Notifier() { discovery_mechanism_.reset(DEBUG_LOCATION, "Notifier"); }
+
+ private:
+ enum Type { kUpdate, kError, kDoesNotExist };
+
+ static void RunInExecCtx(void* arg, grpc_error* error);
+ void RunInWorkSerializer(grpc_error* error);
+
+ RefCountedPtr<EdsDiscoveryMechanism> discovery_mechanism_;
+ grpc_closure closure_;
+ XdsApi::EdsUpdate update_;
+ Type type_;
+ };
+
+ RefCountedPtr<EdsDiscoveryMechanism> discovery_mechanism_;
+ };
+
+ // Note that this is not owned, so this pointer must never be dereferenced.
+ EndpointWatcher* watcher_ = nullptr;
+ };
+
+ class LogicalDNSDiscoveryMechanism : public DiscoveryMechanism {
+ public:
+ LogicalDNSDiscoveryMechanism(
+ RefCountedPtr<XdsClusterResolverLb> xds_cluster_resolver_lb,
+ size_t index)
+ : DiscoveryMechanism(std::move(xds_cluster_resolver_lb), index) {}
+ void Start() override;
+ void Orphan() override;
+ Json::Array override_child_policy() override {
+ return Json::Array{
+ Json::Object{
+ {"pick_first", Json::Object()},
+ },
+ };
+ }
+ bool disable_reresolution() override { return false; };
+
+ private:
+ class ResolverResultHandler : public Resolver::ResultHandler {
+ public:
+ explicit ResolverResultHandler(
+ RefCountedPtr<LogicalDNSDiscoveryMechanism> discovery_mechanism)
+ : discovery_mechanism_(std::move(discovery_mechanism)) {}
+
+ ~ResolverResultHandler() override {}
+
+ void ReturnResult(Resolver::Result result) override;
+
+ void ReturnError(grpc_error* error) override;
+
+ private:
+ RefCountedPtr<LogicalDNSDiscoveryMechanism> discovery_mechanism_;
+ };
+ // This is only necessary because of a bug in msvc where nested class cannot
+ // access protected member in base class.
+ friend class ResolverResultHandler;
+ OrphanablePtr<Resolver> resolver_;
+ };
+
+ struct DiscoveryMechanismEntry {
+ OrphanablePtr<DiscoveryMechanism> discovery_mechanism;
+ bool first_update_received = false;
+ // Number of priorities this mechanism has contributed to priority_list_.
+ // (The sum of this across all discovery mechanisms should always equal
+ // the number of priorities in priority_list_.)
+ uint32_t num_priorities = 0;
+ RefCountedPtr<XdsApi::EdsUpdate::DropConfig> drop_config;
+ // Populated only when an update has been delivered by the mechanism
+ // but has not yet been applied to the LB policy's combined priority_list_.
+ y_absl::optional<XdsApi::EdsUpdate::PriorityList> pending_priority_list;
+ };
+
+ class Helper : public ChannelControlHelper {
+ public:
+ explicit Helper(
+ RefCountedPtr<XdsClusterResolverLb> xds_cluster_resolver_policy)
+ : xds_cluster_resolver_policy_(std::move(xds_cluster_resolver_policy)) {
+ }
+
+ ~Helper() override {
+ xds_cluster_resolver_policy_.reset(DEBUG_LOCATION, "Helper");
+ }
+
+ RefCountedPtr<SubchannelInterface> CreateSubchannel(
+ ServerAddress address, const grpc_channel_args& args) override;
+ void UpdateState(grpc_connectivity_state state, const y_absl::Status& status,
+ std::unique_ptr<SubchannelPicker> picker) override;
+ // This is a no-op, because we get the addresses from the xds
+ // client, which is a watch-based API.
+ void RequestReresolution() override {}
+ void AddTraceEvent(TraceSeverity severity,
+ y_absl::string_view message) override;
+
+ private:
+ RefCountedPtr<XdsClusterResolverLb> xds_cluster_resolver_policy_;
+ };
+
+ ~XdsClusterResolverLb() override;
+
+ void ShutdownLocked() override;
+
+ void OnEndpointChanged(size_t index, XdsApi::EdsUpdate update);
+ void OnError(size_t index, grpc_error* error);
+ void OnResourceDoesNotExist(size_t index);
+
+ void MaybeDestroyChildPolicyLocked();
+
+ void UpdatePriorityList(XdsApi::EdsUpdate::PriorityList priority_list);
+ void UpdateChildPolicyLocked();
+ OrphanablePtr<LoadBalancingPolicy> CreateChildPolicyLocked(
+ const grpc_channel_args* args);
+ ServerAddressList CreateChildPolicyAddressesLocked();
+ RefCountedPtr<Config> CreateChildPolicyConfigLocked();
+ grpc_channel_args* CreateChildPolicyArgsLocked(
+ const grpc_channel_args* args_in);
+
+ // Server name from target URI.
+ TString server_name_;
+ bool is_xds_uri_;
+
+ // Current channel args and config from the resolver.
+ const grpc_channel_args* args_ = nullptr;
+ RefCountedPtr<XdsClusterResolverLbConfig> config_;
+
+ // Internal state.
+ bool shutting_down_ = false;
+
+ // The xds client and endpoint watcher.
+ RefCountedPtr<XdsClient> xds_client_;
+
+ // Vector of discovery mechansism entries in priority order.
+ std::vector<DiscoveryMechanismEntry> discovery_mechanisms_;
+
+ // The latest data from the endpoint watcher.
+ XdsApi::EdsUpdate::PriorityList priority_list_;
+ // State used to retain child policy names for priority policy.
+ std::vector<size_t /*child_number*/> priority_child_numbers_;
+
+ OrphanablePtr<LoadBalancingPolicy> child_policy_;
+};
+
+//
+// XdsClusterResolverLb::Helper
+//
+
+RefCountedPtr<SubchannelInterface>
+XdsClusterResolverLb::Helper::CreateSubchannel(ServerAddress address,
+ const grpc_channel_args& args) {
+ if (xds_cluster_resolver_policy_->shutting_down_) return nullptr;
+ return xds_cluster_resolver_policy_->channel_control_helper()
+ ->CreateSubchannel(std::move(address), args);
+}
+
+void XdsClusterResolverLb::Helper::UpdateState(
+ grpc_connectivity_state state, const y_absl::Status& status,
+ std::unique_ptr<SubchannelPicker> picker) {
+ if (xds_cluster_resolver_policy_->shutting_down_ ||
+ xds_cluster_resolver_policy_->child_policy_ == nullptr) {
+ return;
+ }
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] child policy updated state=%s (%s) "
+ "picker=%p",
+ xds_cluster_resolver_policy_.get(), ConnectivityStateName(state),
+ status.ToString().c_str(), picker.get());
+ }
+ xds_cluster_resolver_policy_->channel_control_helper()->UpdateState(
+ state, status, std::move(picker));
+}
+
+void XdsClusterResolverLb::Helper::AddTraceEvent(TraceSeverity severity,
+ y_absl::string_view message) {
+ if (xds_cluster_resolver_policy_->shutting_down_) return;
+ xds_cluster_resolver_policy_->channel_control_helper()->AddTraceEvent(
+ severity, message);
+}
+
+//
+// XdsClusterResolverLb::EdsDiscoveryMechanism
+//
+
+void XdsClusterResolverLb::EdsDiscoveryMechanism::Start() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] eds discovery mechanism %" PRIuPTR
+ ":%p starting xds watch for %s",
+ parent(), index(), this,
+ TString(GetXdsClusterResolverResourceName()).c_str());
+ }
+ auto watcher = y_absl::make_unique<EndpointWatcher>(
+ Ref(DEBUG_LOCATION, "EdsDiscoveryMechanism"));
+ watcher_ = watcher.get();
+ parent()->xds_client_->WatchEndpointData(GetXdsClusterResolverResourceName(),
+ std::move(watcher));
+}
+
+void XdsClusterResolverLb::EdsDiscoveryMechanism::Orphan() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] eds discovery mechanism %" PRIuPTR
+ ":%p cancelling xds watch for %s",
+ parent(), index(), this,
+ TString(GetXdsClusterResolverResourceName()).c_str());
+ }
+ parent()->xds_client_->CancelEndpointDataWatch(
+ GetXdsClusterResolverResourceName(), watcher_);
+ Unref();
+}
+
+//
+// XdsClusterResolverLb::EndpointWatcher::Notifier
+//
+
+XdsClusterResolverLb::EdsDiscoveryMechanism::EndpointWatcher::Notifier::
+ Notifier(RefCountedPtr<XdsClusterResolverLb::EdsDiscoveryMechanism>
+ discovery_mechanism,
+ XdsApi::EdsUpdate update)
+ : discovery_mechanism_(std::move(discovery_mechanism)),
+ update_(std::move(update)),
+ type_(kUpdate) {
+ GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
+ ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
+}
+
+XdsClusterResolverLb::EdsDiscoveryMechanism::EndpointWatcher::Notifier::
+ Notifier(RefCountedPtr<XdsClusterResolverLb::EdsDiscoveryMechanism>
+ discovery_mechanism,
+ grpc_error* error)
+ : discovery_mechanism_(std::move(discovery_mechanism)), type_(kError) {
+ GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
+ ExecCtx::Run(DEBUG_LOCATION, &closure_, error);
+}
+
+XdsClusterResolverLb::EdsDiscoveryMechanism::EndpointWatcher::Notifier::
+ Notifier(RefCountedPtr<XdsClusterResolverLb::EdsDiscoveryMechanism>
+ discovery_mechanism)
+ : discovery_mechanism_(std::move(discovery_mechanism)),
+ type_(kDoesNotExist) {
+ GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
+ ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
+}
+
+void XdsClusterResolverLb::EdsDiscoveryMechanism::EndpointWatcher::Notifier::
+ RunInExecCtx(void* arg, grpc_error* error) {
+ Notifier* self = static_cast<Notifier*>(arg);
+ GRPC_ERROR_REF(error);
+ self->discovery_mechanism_->parent()->work_serializer()->Run(
+ [self, error]() { self->RunInWorkSerializer(error); }, DEBUG_LOCATION);
+}
+
+void XdsClusterResolverLb::EdsDiscoveryMechanism::EndpointWatcher::Notifier::
+ RunInWorkSerializer(grpc_error* error) {
+ switch (type_) {
+ case kUpdate:
+ discovery_mechanism_->parent()->OnEndpointChanged(
+ discovery_mechanism_->index(), std::move(update_));
+ break;
+ case kError:
+ discovery_mechanism_->parent()->OnError(discovery_mechanism_->index(),
+ error);
+ break;
+ case kDoesNotExist:
+ discovery_mechanism_->parent()->OnResourceDoesNotExist(
+ discovery_mechanism_->index());
+ break;
+ };
+ delete this;
+}
+
+//
+// XdsClusterResolverLb::LogicalDNSDiscoveryMechanism
+//
+
+void XdsClusterResolverLb::LogicalDNSDiscoveryMechanism::Start() {
+ TString target = parent()->server_name_;
+ grpc_channel_args* args = nullptr;
+ FakeResolverResponseGenerator* fake_resolver_response_generator =
+ grpc_channel_args_find_pointer<FakeResolverResponseGenerator>(
+ parent()->args_,
+ GRPC_ARG_XDS_LOGICAL_DNS_CLUSTER_FAKE_RESOLVER_RESPONSE_GENERATOR);
+ if (fake_resolver_response_generator != nullptr) {
+ target = y_absl::StrCat("fake:", target);
+ grpc_arg new_arg = FakeResolverResponseGenerator::MakeChannelArg(
+ fake_resolver_response_generator);
+ args = grpc_channel_args_copy_and_add(parent()->args_, &new_arg, 1);
+ } else {
+ args = grpc_channel_args_copy(parent()->args_);
+ }
+ resolver_ = ResolverRegistry::CreateResolver(
+ target.c_str(), args, parent()->interested_parties(),
+ parent()->work_serializer(),
+ y_absl::make_unique<ResolverResultHandler>(
+ Ref(DEBUG_LOCATION, "LogicalDNSDiscoveryMechanism")));
+ grpc_channel_args_destroy(args);
+ if (resolver_ == nullptr) {
+ parent()->OnResourceDoesNotExist(index());
+ return;
+ }
+ resolver_->StartLocked();
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] logical DNS discovery mechanism "
+ "%" PRIuPTR ":%p starting dns resolver %p",
+ parent(), index(), this, resolver_.get());
+ }
+}
+
+void XdsClusterResolverLb::LogicalDNSDiscoveryMechanism::Orphan() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(
+ GPR_INFO,
+ "[xds_cluster_resolver_lb %p] logical DNS discovery mechanism %" PRIuPTR
+ ":%p shutting down dns resolver %p",
+ parent(), index(), this, resolver_.get());
+ }
+ resolver_.reset();
+ Unref();
+}
+
+//
+// XdsClusterResolverLb::LogicalDNSDiscoveryMechanism::ResolverResultHandler
+//
+
+void XdsClusterResolverLb::LogicalDNSDiscoveryMechanism::ResolverResultHandler::
+ ReturnResult(Resolver::Result result) {
+ // convert result to eds update
+ XdsApi::EdsUpdate update;
+ XdsApi::EdsUpdate::Priority::Locality locality;
+ locality.name = MakeRefCounted<XdsLocalityName>("", "", "");
+ locality.lb_weight = 1;
+ locality.endpoints = std::move(result.addresses);
+ XdsApi::EdsUpdate::Priority priority;
+ priority.localities.emplace(locality.name.get(), std::move(locality));
+ update.priorities.emplace_back(std::move(priority));
+ discovery_mechanism_->parent()->OnEndpointChanged(
+ discovery_mechanism_->index(), std::move(update));
+}
+
+void XdsClusterResolverLb::LogicalDNSDiscoveryMechanism::ResolverResultHandler::
+ ReturnError(grpc_error* error) {
+ discovery_mechanism_->parent()->OnError(discovery_mechanism_->index(), error);
+}
+
+//
+// XdsClusterResolverLb public methods
+//
+
+XdsClusterResolverLb::XdsClusterResolverLb(RefCountedPtr<XdsClient> xds_client,
+ Args args)
+ : LoadBalancingPolicy(std::move(args)), xds_client_(std::move(xds_client)) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] created -- using xds client %p", this,
+ xds_client_.get());
+ }
+ // Record server name.
+ const char* server_uri =
+ grpc_channel_args_find_string(args.args, GRPC_ARG_SERVER_URI);
+ GPR_ASSERT(server_uri != nullptr);
+ y_absl::StatusOr<URI> uri = URI::Parse(server_uri);
+ GPR_ASSERT(uri.ok() && !uri->path().empty());
+ server_name_ = TString(y_absl::StripPrefix(uri->path(), "/"));
+ is_xds_uri_ = uri->scheme() == "xds";
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] server name from channel "
+ "(is_xds_uri=%d): %s",
+ this, is_xds_uri_, server_name_.c_str());
+ }
+ // EDS-only flow.
+ if (!is_xds_uri_) {
+ // Setup channelz linkage.
+ channelz::ChannelNode* parent_channelz_node =
+ grpc_channel_args_find_pointer<channelz::ChannelNode>(
+ args.args, GRPC_ARG_CHANNELZ_CHANNEL_NODE);
+ if (parent_channelz_node != nullptr) {
+ xds_client_->AddChannelzLinkage(parent_channelz_node);
+ }
+ // Couple polling.
+ grpc_pollset_set_add_pollset_set(xds_client_->interested_parties(),
+ interested_parties());
+ }
+}
+
+XdsClusterResolverLb::~XdsClusterResolverLb() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] destroying xds_cluster_resolver LB "
+ "policy",
+ this);
+ }
+}
+
+void XdsClusterResolverLb::ShutdownLocked() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_resolver_lb %p] shutting down", this);
+ }
+ shutting_down_ = true;
+ MaybeDestroyChildPolicyLocked();
+ discovery_mechanisms_.clear();
+ if (!is_xds_uri_) {
+ // Remove channelz linkage.
+ channelz::ChannelNode* parent_channelz_node =
+ grpc_channel_args_find_pointer<channelz::ChannelNode>(
+ args_, GRPC_ARG_CHANNELZ_CHANNEL_NODE);
+ if (parent_channelz_node != nullptr) {
+ xds_client_->RemoveChannelzLinkage(parent_channelz_node);
+ }
+ // Decouple polling.
+ grpc_pollset_set_del_pollset_set(xds_client_->interested_parties(),
+ interested_parties());
+ }
+ xds_client_.reset(DEBUG_LOCATION, "XdsClusterResolverLb");
+ // Destroy channel args.
+ grpc_channel_args_destroy(args_);
+ args_ = nullptr;
+}
+
+void XdsClusterResolverLb::MaybeDestroyChildPolicyLocked() {
+ if (child_policy_ != nullptr) {
+ grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
+ interested_parties());
+ child_policy_.reset();
+ }
+}
+
+void XdsClusterResolverLb::UpdateLocked(UpdateArgs args) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_resolver_lb %p] Received update", this);
+ }
+ const bool is_initial_update = args_ == nullptr;
+ // Update config.
+ auto old_config = std::move(config_);
+ config_ = std::move(args.config);
+ // Update args.
+ grpc_channel_args_destroy(args_);
+ args_ = args.args;
+ args.args = nullptr;
+ // Update child policy if needed.
+ if (child_policy_ != nullptr) UpdateChildPolicyLocked();
+ // Create endpoint watcher if needed.
+ if (is_initial_update) {
+ for (const auto& config : config_->discovery_mechanisms()) {
+ DiscoveryMechanismEntry entry;
+ if (config.type == XdsClusterResolverLbConfig::DiscoveryMechanism::
+ DiscoveryMechanismType::EDS) {
+ entry.discovery_mechanism =
+ grpc_core::MakeOrphanable<EdsDiscoveryMechanism>(
+ Ref(DEBUG_LOCATION, "EdsDiscoveryMechanism"),
+ discovery_mechanisms_.size());
+ } else if (config.type == XdsClusterResolverLbConfig::DiscoveryMechanism::
+ DiscoveryMechanismType::LOGICAL_DNS) {
+ entry.discovery_mechanism =
+ grpc_core::MakeOrphanable<LogicalDNSDiscoveryMechanism>(
+ Ref(DEBUG_LOCATION, "LogicalDNSDiscoveryMechanism"),
+ discovery_mechanisms_.size());
+ } else {
+ GPR_ASSERT(0);
+ }
+ discovery_mechanisms_.push_back(std::move(entry));
+ }
+ // Call start() on all discovery mechanisms after creation.
+ for (const auto& discovery_mechanism : discovery_mechanisms_) {
+ discovery_mechanism.discovery_mechanism->Start();
+ }
+ }
+}
+
+void XdsClusterResolverLb::ResetBackoffLocked() {
+ // When the XdsClient is instantiated in the resolver instead of in this
+ // LB policy, this is done via the resolver, so we don't need to do it here.
+ if (!is_xds_uri_ && xds_client_ != nullptr) xds_client_->ResetBackoff();
+ if (child_policy_ != nullptr) {
+ child_policy_->ResetBackoffLocked();
+ }
+}
+
+void XdsClusterResolverLb::ExitIdleLocked() {
+ if (child_policy_ != nullptr) child_policy_->ExitIdleLocked();
+}
+
+void XdsClusterResolverLb::OnEndpointChanged(size_t index,
+ XdsApi::EdsUpdate update) {
+ if (shutting_down_) return;
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p] Received update from xds client"
+ " for discovery mechanism %" PRIuPTR "",
+ this, index);
+ }
+ // We need at least one priority for each discovery mechanism, just so that we
+ // have a child in which to create the xds_cluster_impl policy. This ensures
+ // that we properly handle the case of a discovery mechanism dropping 100% of
+ // calls, the OnError() case, and the OnResourceDoesNotExist() case.
+ if (update.priorities.empty()) update.priorities.emplace_back();
+ discovery_mechanisms_[index].drop_config = std::move(update.drop_config);
+ discovery_mechanisms_[index].pending_priority_list =
+ std::move(update.priorities);
+ discovery_mechanisms_[index].first_update_received = true;
+ // If any discovery mechanism has not received its first update,
+ // wait until that happens before creating the child policy.
+ // TODO(roth): If this becomes problematic in the future (e.g., a
+ // secondary discovery mechanism delaying us from starting up at all),
+ // we can consider some sort of optimization whereby we can create the
+ // priority policy with only a subset of its children. But we need to
+ // make sure not to get into a situation where the priority policy
+ // will put the channel into TRANSIENT_FAILURE instead of CONNECTING
+ // while we're still waiting for the other discovery mechanism(s).
+ for (DiscoveryMechanismEntry& mechanism : discovery_mechanisms_) {
+ if (!mechanism.first_update_received) return;
+ }
+ // Construct new priority list.
+ XdsApi::EdsUpdate::PriorityList priority_list;
+ size_t priority_index = 0;
+ for (DiscoveryMechanismEntry& mechanism : discovery_mechanisms_) {
+ // If the mechanism has a pending update, use that.
+ // Otherwise, use the priorities that it previously contributed to the
+ // combined list.
+ if (mechanism.pending_priority_list.has_value()) {
+ priority_list.insert(priority_list.end(),
+ mechanism.pending_priority_list->begin(),
+ mechanism.pending_priority_list->end());
+ priority_index += mechanism.num_priorities;
+ mechanism.num_priorities = mechanism.pending_priority_list->size();
+ mechanism.pending_priority_list.reset();
+ } else {
+ priority_list.insert(
+ priority_list.end(), priority_list_.begin() + priority_index,
+ priority_list_.begin() + priority_index + mechanism.num_priorities);
+ priority_index += mechanism.num_priorities;
+ }
+ }
+ // Update child policy.
+ UpdatePriorityList(std::move(priority_list));
+}
+
+void XdsClusterResolverLb::OnError(size_t index, grpc_error* error) {
+ gpr_log(GPR_ERROR,
+ "[xds_cluster_resolver_lb %p] discovery mechanism %" PRIuPTR
+ " xds watcher reported error: %s",
+ this, index, grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ if (shutting_down_) return;
+ if (!discovery_mechanisms_[index].first_update_received) {
+ // Call OnEndpointChanged with an empty update just like
+ // OnResourceDoesNotExist.
+ OnEndpointChanged(index, XdsApi::EdsUpdate());
+ }
+}
+
+void XdsClusterResolverLb::OnResourceDoesNotExist(size_t index) {
+ gpr_log(GPR_ERROR,
+ "[xds_cluster_resolver_lb %p] discovery mechanism %" PRIuPTR
+ " resource does not exist",
+ this, index);
+ if (shutting_down_) return;
+ // Call OnEndpointChanged with an empty update.
+ OnEndpointChanged(index, XdsApi::EdsUpdate());
+}
+
+//
+// child policy-related methods
+//
+
+void XdsClusterResolverLb::UpdatePriorityList(
+ XdsApi::EdsUpdate::PriorityList priority_list) {
+ // Build some maps from locality to child number and the reverse from
+ // the old data in priority_list_ and priority_child_numbers_.
+ std::map<XdsLocalityName*, size_t /*child_number*/, XdsLocalityName::Less>
+ locality_child_map;
+ std::map<size_t, std::set<XdsLocalityName*>> child_locality_map;
+ for (size_t priority = 0; priority < priority_list_.size(); ++priority) {
+ size_t child_number = priority_child_numbers_[priority];
+ const auto& localities = priority_list_[priority].localities;
+ for (const auto& p : localities) {
+ XdsLocalityName* locality_name = p.first;
+ locality_child_map[locality_name] = child_number;
+ child_locality_map[child_number].insert(locality_name);
+ }
+ }
+ // Construct new list of children.
+ std::vector<size_t> priority_child_numbers;
+ for (size_t priority = 0; priority < priority_list.size(); ++priority) {
+ const auto& localities = priority_list[priority].localities;
+ y_absl::optional<size_t> child_number;
+ // If one of the localities in this priority already existed, reuse its
+ // child number.
+ for (const auto& p : localities) {
+ XdsLocalityName* locality_name = p.first;
+ if (!child_number.has_value()) {
+ auto it = locality_child_map.find(locality_name);
+ if (it != locality_child_map.end()) {
+ child_number = it->second;
+ locality_child_map.erase(it);
+ // Remove localities that *used* to be in this child number, so
+ // that we don't incorrectly reuse this child number for a
+ // subsequent priority.
+ for (XdsLocalityName* old_locality :
+ child_locality_map[*child_number]) {
+ locality_child_map.erase(old_locality);
+ }
+ }
+ } else {
+ // Remove all localities that are now in this child number, so
+ // that we don't accidentally reuse this child number for a
+ // subsequent priority.
+ locality_child_map.erase(locality_name);
+ }
+ }
+ // If we didn't find an existing child number, assign a new one.
+ if (!child_number.has_value()) {
+ for (child_number = 0;
+ child_locality_map.find(*child_number) != child_locality_map.end();
+ ++(*child_number)) {
+ }
+ // Add entry so we know that the child number is in use.
+ // (Don't need to add the list of localities, since we won't use them.)
+ child_locality_map[*child_number];
+ }
+ priority_child_numbers.push_back(*child_number);
+ }
+ // Save update.
+ priority_list_ = std::move(priority_list);
+ priority_child_numbers_ = std::move(priority_child_numbers);
+ // Update child policy.
+ UpdateChildPolicyLocked();
+}
+
+ServerAddressList XdsClusterResolverLb::CreateChildPolicyAddressesLocked() {
+ ServerAddressList addresses;
+ for (size_t priority = 0; priority < priority_list_.size(); ++priority) {
+ const auto& localities = priority_list_[priority].localities;
+ TString priority_child_name =
+ y_absl::StrCat("child", priority_child_numbers_[priority]);
+ for (const auto& p : localities) {
+ const auto& locality_name = p.first;
+ const auto& locality = p.second;
+ std::vector<TString> hierarchical_path = {
+ priority_child_name, locality_name->AsHumanReadableString()};
+ for (const auto& endpoint : locality.endpoints) {
+ addresses.emplace_back(
+ endpoint
+ .WithAttribute(kHierarchicalPathAttributeKey,
+ MakeHierarchicalPathAttribute(hierarchical_path))
+ .WithAttribute(kXdsLocalityNameAttributeKey,
+ y_absl::make_unique<XdsLocalityAttribute>(
+ locality_name->Ref()))
+ .WithAttribute(ServerAddressWeightAttribute::
+ kServerAddressWeightAttributeKey,
+ y_absl::make_unique<ServerAddressWeightAttribute>(
+ locality.lb_weight)));
+ }
+ }
+ }
+ return addresses;
+}
+
+RefCountedPtr<LoadBalancingPolicy::Config>
+XdsClusterResolverLb::CreateChildPolicyConfigLocked() {
+ Json::Object priority_children;
+ Json::Array priority_priorities;
+ // Setting up index to iterate through the discovery mechanisms and keeping
+ // track the discovery_mechanism each priority belongs to.
+ size_t discovery_index = 0;
+ // Setting up num_priorities_remaining to track the priorities in each
+ // discovery_mechanism.
+ size_t num_priorities_remaining_in_discovery =
+ discovery_mechanisms_[discovery_index].num_priorities;
+ for (size_t priority = 0; priority < priority_list_.size(); ++priority) {
+ Json child_policy;
+ if (!discovery_mechanisms_[discovery_index]
+ .discovery_mechanism->override_child_policy()
+ .empty()) {
+ child_policy = discovery_mechanisms_[discovery_index]
+ .discovery_mechanism->override_child_policy();
+ } else {
+ const auto& xds_lb_policy = config_->xds_lb_policy().object_value();
+ if (xds_lb_policy.find("ROUND_ROBIN") != xds_lb_policy.end()) {
+ const auto& localities = priority_list_[priority].localities;
+ Json::Object weighted_targets;
+ for (const auto& p : localities) {
+ XdsLocalityName* locality_name = p.first;
+ const auto& locality = p.second;
+ // Construct JSON object containing locality name.
+ Json::Object locality_name_json;
+ if (!locality_name->region().empty()) {
+ locality_name_json["region"] = locality_name->region();
+ }
+ if (!locality_name->zone().empty()) {
+ locality_name_json["zone"] = locality_name->zone();
+ }
+ if (!locality_name->sub_zone().empty()) {
+ locality_name_json["sub_zone"] = locality_name->sub_zone();
+ }
+ // Add weighted target entry.
+ weighted_targets[locality_name->AsHumanReadableString()] =
+ Json::Object{
+ {"weight", locality.lb_weight},
+ {"childPolicy",
+ Json::Array{
+ Json::Object{
+ {"round_robin", Json::Object()},
+ },
+ }},
+ };
+ }
+ // Construct locality-picking policy.
+ // Start with field from our config and add the "targets" field.
+ child_policy = Json::Array{
+ Json::Object{
+ {"weighted_target_experimental",
+ Json::Object{
+ {"targets", Json::Object()},
+ }},
+ },
+ };
+ Json::Object& config =
+ *(*child_policy.mutable_array())[0].mutable_object();
+ auto it = config.begin();
+ GPR_ASSERT(it != config.end());
+ (*it->second.mutable_object())["targets"] = std::move(weighted_targets);
+ } else {
+ auto it = xds_lb_policy.find("RING_HASH");
+ GPR_ASSERT(it != xds_lb_policy.end());
+ Json::Object ring_hash_experimental_policy = it->second.object_value();
+ child_policy = Json::Array{
+ Json::Object{
+ {"ring_hash_experimental", ring_hash_experimental_policy},
+ },
+ };
+ }
+ }
+ // Wrap it in the drop policy.
+ Json::Array drop_categories;
+ if (discovery_mechanisms_[discovery_index].drop_config != nullptr) {
+ for (const auto& category : discovery_mechanisms_[discovery_index]
+ .drop_config->drop_category_list()) {
+ drop_categories.push_back(Json::Object{
+ {"category", category.name},
+ {"requests_per_million", category.parts_per_million},
+ });
+ }
+ }
+ const auto lrs_key = discovery_mechanisms_[discovery_index]
+ .discovery_mechanism->GetLrsClusterKey();
+ Json::Object xds_cluster_impl_config = {
+ {"clusterName", TString(lrs_key.first)},
+ {"childPolicy", std::move(child_policy)},
+ {"dropCategories", std::move(drop_categories)},
+ {"maxConcurrentRequests",
+ config_->discovery_mechanisms()[discovery_index]
+ .max_concurrent_requests},
+ };
+ if (!lrs_key.second.empty()) {
+ xds_cluster_impl_config["edsServiceName"] = TString(lrs_key.second);
+ }
+ if (config_->discovery_mechanisms()[discovery_index]
+ .lrs_load_reporting_server_name.has_value()) {
+ xds_cluster_impl_config["lrsLoadReportingServerName"] =
+ config_->discovery_mechanisms()[discovery_index]
+ .lrs_load_reporting_server_name.value();
+ }
+ Json locality_picking_policy = Json::Array{Json::Object{
+ {"xds_cluster_impl_experimental", std::move(xds_cluster_impl_config)},
+ }};
+ // Add priority entry.
+ const size_t child_number = priority_child_numbers_[priority];
+ TString child_name = y_absl::StrCat("child", child_number);
+ priority_priorities.emplace_back(child_name);
+ Json::Object child_config = {
+ {"config", std::move(locality_picking_policy)},
+ };
+ if (discovery_mechanisms_[discovery_index]
+ .discovery_mechanism->disable_reresolution()) {
+ child_config["ignore_reresolution_requests"] = true;
+ }
+ priority_children[child_name] = std::move(child_config);
+ // Each priority in the priority_list_ should correspond to a priority in a
+ // discovery mechanism in discovery_mechanisms_ (both in the same order).
+ // Keeping track of the discovery_mechanism each priority belongs to.
+ --num_priorities_remaining_in_discovery;
+ while (num_priorities_remaining_in_discovery == 0 &&
+ discovery_index < discovery_mechanisms_.size() - 1) {
+ ++discovery_index;
+ num_priorities_remaining_in_discovery =
+ discovery_mechanisms_[discovery_index].num_priorities;
+ }
+ }
+ // There should be matching number of priorities in discovery_mechanisms_ and
+ // in priority_list_; therefore at the end of looping through all the
+ // priorities, num_priorities_remaining should be down to 0, and index should
+ // be the last index in discovery_mechanisms_.
+ GPR_ASSERT(num_priorities_remaining_in_discovery == 0);
+ GPR_ASSERT(discovery_index == discovery_mechanisms_.size() - 1);
+ Json json = Json::Array{Json::Object{
+ {"priority_experimental",
+ Json::Object{
+ {"children", std::move(priority_children)},
+ {"priorities", std::move(priority_priorities)},
+ }},
+ }};
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ TString json_str = json.Dump(/*indent=*/1);
+ gpr_log(
+ GPR_INFO,
+ "[xds_cluster_resolver_lb %p] generated config for child policy: %s",
+ this, json_str.c_str());
+ }
+ grpc_error* error = GRPC_ERROR_NONE;
+ RefCountedPtr<LoadBalancingPolicy::Config> config =
+ LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(json, &error);
+ if (error != GRPC_ERROR_NONE) {
+ // This should never happen, but if it does, we basically have no
+ // way to fix it, so we put the channel in TRANSIENT_FAILURE.
+ gpr_log(GPR_ERROR,
+ "[xds_cluster_resolver_lb %p] error parsing generated child policy "
+ "config -- "
+ "will put channel in TRANSIENT_FAILURE: %s",
+ this, grpc_error_string(error));
+ error = grpc_error_set_int(
+ grpc_error_add_child(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "xds_cluster_resolver LB policy: error "
+ "parsing generated child policy config"),
+ error),
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_INTERNAL);
+ channel_control_helper()->UpdateState(
+ GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(error),
+ y_absl::make_unique<TransientFailurePicker>(error));
+ return nullptr;
+ }
+ return config;
+}
+
+void XdsClusterResolverLb::UpdateChildPolicyLocked() {
+ if (shutting_down_) return;
+ UpdateArgs update_args;
+ update_args.config = CreateChildPolicyConfigLocked();
+ if (update_args.config == nullptr) return;
+ update_args.addresses = CreateChildPolicyAddressesLocked();
+ update_args.args = CreateChildPolicyArgsLocked(args_);
+ if (child_policy_ == nullptr) {
+ child_policy_ = CreateChildPolicyLocked(update_args.args);
+ }
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO, "[xds_cluster_resolver_lb %p] Updating child policy %p",
+ this, child_policy_.get());
+ }
+ child_policy_->UpdateLocked(std::move(update_args));
+}
+
+grpc_channel_args* XdsClusterResolverLb::CreateChildPolicyArgsLocked(
+ const grpc_channel_args* args) {
+ // Inhibit client-side health checking, since the balancer does this for us.
+ grpc_arg new_arg = grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_INHIBIT_HEALTH_CHECKING), 1);
+ return grpc_channel_args_copy_and_add(args, &new_arg, 1);
+}
+
+OrphanablePtr<LoadBalancingPolicy>
+XdsClusterResolverLb::CreateChildPolicyLocked(const grpc_channel_args* args) {
+ LoadBalancingPolicy::Args lb_policy_args;
+ lb_policy_args.work_serializer = work_serializer();
+ lb_policy_args.args = args;
+ lb_policy_args.channel_control_helper =
+ y_absl::make_unique<Helper>(Ref(DEBUG_LOCATION, "Helper"));
+ OrphanablePtr<LoadBalancingPolicy> lb_policy =
+ LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(
+ "priority_experimental", std::move(lb_policy_args));
+ if (GPR_UNLIKELY(lb_policy == nullptr)) {
+ gpr_log(GPR_ERROR,
+ "[xds_cluster_resolver_lb %p] failure creating child policy", this);
+ return nullptr;
+ }
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_xds_cluster_resolver_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_cluster_resolver_lb %p]: Created new child policy %p", this,
+ lb_policy.get());
+ }
+ // Add our interested_parties pollset_set to that of the newly created
+ // child policy. This will make the child policy progress upon activity on
+ // this policy, which in turn is tied to the application's call.
+ grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
+ interested_parties());
+ return lb_policy;
+}
+
+//
+// factory
+//
+
+class XdsClusterResolverLbFactory : public LoadBalancingPolicyFactory {
+ public:
+ OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
+ LoadBalancingPolicy::Args args) const override {
+ grpc_error* error = GRPC_ERROR_NONE;
+ RefCountedPtr<XdsClient> xds_client = XdsClient::GetOrCreate(&error);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR,
+ "cannot get XdsClient to instantiate xds_cluster_resolver LB "
+ "policy: %s",
+ grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ return nullptr;
+ }
+ return MakeOrphanable<XdsClusterResolverChildHandler>(std::move(xds_client),
+ std::move(args));
+ }
+
+ const char* name() const override { return kXdsClusterResolver; }
+
+ RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
+ const Json& json, grpc_error** error) const override {
+ GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
+ if (json.type() == Json::Type::JSON_NULL) {
+ // xds_cluster_resolver was mentioned as a policy in the deprecated
+ // loadBalancingPolicy field or in the client API.
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:loadBalancingPolicy error:xds_cluster_resolver policy "
+ "requires configuration. "
+ "Please use loadBalancingConfig field of service config instead.");
+ return nullptr;
+ }
+ std::vector<grpc_error*> error_list;
+ std::vector<XdsClusterResolverLbConfig::DiscoveryMechanism>
+ discovery_mechanisms;
+ auto it = json.object_value().find("discoveryMechanisms");
+ if (it == json.object_value().end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:discoveryMechanisms error:required field missing"));
+ } else if (it->second.type() != Json::Type::ARRAY) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:discoveryMechanisms error:type should be array"));
+ } else {
+ const Json::Array& array = it->second.array_value();
+ for (size_t i = 0; i < array.size(); ++i) {
+ XdsClusterResolverLbConfig::DiscoveryMechanism discovery_mechanism;
+ std::vector<grpc_error*> discovery_mechanism_errors =
+ ParseDiscoveryMechanism(array[i], &discovery_mechanism);
+ if (!discovery_mechanism_errors.empty()) {
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:discovery_mechanism element: ", i, " error")
+ .c_str());
+ for (grpc_error* discovery_mechanism_error :
+ discovery_mechanism_errors) {
+ error = grpc_error_add_child(error, discovery_mechanism_error);
+ }
+ error_list.push_back(error);
+ }
+ discovery_mechanisms.emplace_back(std::move(discovery_mechanism));
+ }
+ }
+ if (discovery_mechanisms.empty()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:discovery_mechanism error:list is missing or empty"));
+ }
+ Json xds_lb_policy = Json::Object{
+ {"ROUND_ROBIN", Json::Object()},
+ };
+ it = json.object_value().find("xdsLbPolicy");
+ if (it != json.object_value().end()) {
+ if (it->second.type() != Json::Type::ARRAY) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:xdsLbPolicy error:type should be array"));
+ } else {
+ const Json::Array& array = it->second.array_value();
+ for (size_t i = 0; i < array.size(); ++i) {
+ if (array[i].type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:xdsLbPolicy error:element should be of type object"));
+ continue;
+ }
+ const Json::Object& policy = array[i].object_value();
+ auto policy_it = policy.find("ROUND_ROBIN");
+ if (policy_it != policy.end()) {
+ if (policy_it->second.type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:ROUND_ROBIN error:type should be object"));
+ }
+ break;
+ }
+ policy_it = policy.find("RING_HASH");
+ if (policy_it != policy.end()) {
+ if (policy_it->second.type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:RING_HASH error:type should be object"));
+ continue;
+ }
+ // TODO(donnadionne): Move this to a method in
+ // ring_hash_experimental and call it here.
+ const Json::Object& ring_hash = policy_it->second.object_value();
+ xds_lb_policy = array[i];
+ size_t min_ring_size = 1024;
+ size_t max_ring_size = 8388608;
+ auto ring_hash_it = ring_hash.find("min_ring_size");
+ if (ring_hash_it == ring_hash.end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:min_ring_size missing"));
+ } else if (ring_hash_it->second.type() != Json::Type::NUMBER) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:min_ring_size error: should be of "
+ "number"));
+ } else {
+ min_ring_size = gpr_parse_nonnegative_int(
+ ring_hash_it->second.string_value().c_str());
+ }
+ ring_hash_it = ring_hash.find("max_ring_size");
+ if (ring_hash_it == ring_hash.end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:max_ring_size missing"));
+ } else if (ring_hash_it->second.type() != Json::Type::NUMBER) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:max_ring_size error: should be of "
+ "number"));
+ } else {
+ max_ring_size = gpr_parse_nonnegative_int(
+ ring_hash_it->second.string_value().c_str());
+ }
+ if (min_ring_size <= 0 || min_ring_size > 8388608 ||
+ max_ring_size <= 0 || max_ring_size > 8388608 ||
+ min_ring_size > max_ring_size) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:max_ring_size and or min_ring_size error: "
+ "values need to be in the range of 1 to 8388608 "
+ "and max_ring_size cannot be smaller than "
+ "min_ring_size"));
+ }
+ ring_hash_it = ring_hash.find("hash_function");
+ if (ring_hash_it == ring_hash.end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:hash_function missing"));
+ } else if (ring_hash_it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:hash_function error: should be a "
+ "string"));
+ } else if (ring_hash_it->second.string_value() != "XX_HASH" &&
+ ring_hash_it->second.string_value() != "MURMUR_HASH_2") {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:hash_function error: unsupported "
+ "hash_function"));
+ }
+ break;
+ }
+ }
+ }
+ }
+ // Construct config.
+ if (error_list.empty()) {
+ return MakeRefCounted<XdsClusterResolverLbConfig>(
+ std::move(discovery_mechanisms), std::move(xds_lb_policy));
+ } else {
+ *error = GRPC_ERROR_CREATE_FROM_VECTOR(
+ "xds_cluster_resolver_experimental LB policy config", &error_list);
+ return nullptr;
+ }
+ }
+
+ private:
+ static std::vector<grpc_error*> ParseDiscoveryMechanism(
+ const Json& json,
+ XdsClusterResolverLbConfig::DiscoveryMechanism* discovery_mechanism) {
+ std::vector<grpc_error*> error_list;
+ if (json.type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "value should be of type object"));
+ return error_list;
+ }
+ // Cluster name.
+ auto it = json.object_value().find("clusterName");
+ if (it == json.object_value().end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:clusterName error:required field missing"));
+ } else if (it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:clusterName error:type should be string"));
+ } else {
+ discovery_mechanism->cluster_name = it->second.string_value();
+ }
+ // LRS load reporting server name.
+ it = json.object_value().find("lrsLoadReportingServerName");
+ if (it != json.object_value().end()) {
+ if (it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:lrsLoadReportingServerName error:type should be string"));
+ } else {
+ discovery_mechanism->lrs_load_reporting_server_name.emplace(
+ it->second.string_value());
+ }
+ }
+ // Max concurrent requests.
+ discovery_mechanism->max_concurrent_requests = 1024;
+ it = json.object_value().find("max_concurrent_requests");
+ if (it != json.object_value().end()) {
+ if (it->second.type() != Json::Type::NUMBER) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:max_concurrent_requests error:must be of type number"));
+ } else {
+ discovery_mechanism->max_concurrent_requests =
+ gpr_parse_nonnegative_int(it->second.string_value().c_str());
+ }
+ }
+ // Discovery Mechanism type
+ it = json.object_value().find("type");
+ if (it == json.object_value().end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:type error:required field missing"));
+ } else if (it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:type error:type should be string"));
+ } else {
+ if (it->second.string_value() == "EDS") {
+ discovery_mechanism->type = XdsClusterResolverLbConfig::
+ DiscoveryMechanism::DiscoveryMechanismType::EDS;
+ } else if (it->second.string_value() == "LOGICAL_DNS") {
+ discovery_mechanism->type = XdsClusterResolverLbConfig::
+ DiscoveryMechanism::DiscoveryMechanismType::LOGICAL_DNS;
+ } else {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:type error:invalid type"));
+ }
+ }
+ // EDS service name.
+ it = json.object_value().find("edsServiceName");
+ if (it != json.object_value().end()) {
+ if (it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:xds_cluster_resolverServiceName error:type should be "
+ "string"));
+ } else {
+ discovery_mechanism->eds_service_name = it->second.string_value();
+ }
+ }
+ return error_list;
+ }
+
+ class XdsClusterResolverChildHandler : public ChildPolicyHandler {
+ public:
+ XdsClusterResolverChildHandler(RefCountedPtr<XdsClient> xds_client,
+ Args args)
+ : ChildPolicyHandler(std::move(args),
+ &grpc_lb_xds_cluster_resolver_trace),
+ xds_client_(std::move(xds_client)) {}
+
+ bool ConfigChangeRequiresNewPolicyInstance(
+ LoadBalancingPolicy::Config* old_config,
+ LoadBalancingPolicy::Config* new_config) const override {
+ GPR_ASSERT(old_config->name() == kXdsClusterResolver);
+ GPR_ASSERT(new_config->name() == kXdsClusterResolver);
+ XdsClusterResolverLbConfig* old_xds_cluster_resolver_config =
+ static_cast<XdsClusterResolverLbConfig*>(old_config);
+ XdsClusterResolverLbConfig* new_xds_cluster_resolver_config =
+ static_cast<XdsClusterResolverLbConfig*>(new_config);
+ return old_xds_cluster_resolver_config->discovery_mechanisms() !=
+ new_xds_cluster_resolver_config->discovery_mechanisms();
+ }
+
+ OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
+ const char* /*name*/, LoadBalancingPolicy::Args args) const override {
+ return MakeOrphanable<XdsClusterResolverLb>(xds_client_, std::move(args));
+ }
+
+ private:
+ RefCountedPtr<XdsClient> xds_client_;
+ };
+};
+
+} // namespace
+
+} // namespace grpc_core
+
+//
+// Plugin registration
+//
+
+void grpc_lb_policy_xds_cluster_resolver_init() {
+ grpc_core::LoadBalancingPolicyRegistry::Builder::
+ RegisterLoadBalancingPolicyFactory(
+ y_absl::make_unique<grpc_core::XdsClusterResolverLbFactory>());
+}
+
+void grpc_lb_policy_xds_cluster_resolver_shutdown() {}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.cc
index e57599962ad..49338ecc5ea 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.cc
@@ -24,73 +24,33 @@
namespace grpc_core {
-LocalSubchannelPool::LocalSubchannelPool() {
- subchannel_map_ = grpc_avl_create(&subchannel_avl_vtable_);
+RefCountedPtr<Subchannel> LocalSubchannelPool::RegisterSubchannel(
+ const SubchannelKey& key, RefCountedPtr<Subchannel> constructed) {
+ auto it = subchannel_map_.find(key);
+ // Because this pool is only accessed under the client channel's work
+ // serializer, and because FindSubchannel is checked before invoking
+ // RegisterSubchannel, no such subchannel should exist in the map.
+ GPR_ASSERT(it == subchannel_map_.end());
+ subchannel_map_[key] = constructed.get();
+ return constructed;
+}
+
+void LocalSubchannelPool::UnregisterSubchannel(const SubchannelKey& key,
+ Subchannel* subchannel) {
+ auto it = subchannel_map_.find(key);
+ // Because this subchannel pool is accessed only under the client
+ // channel's work serializer, any subchannel created by RegisterSubchannel
+ // will be deleted from the map in UnregisterSubchannel.
+ GPR_ASSERT(it != subchannel_map_.end());
+ GPR_ASSERT(it->second == subchannel);
+ subchannel_map_.erase(it);
+}
+
+RefCountedPtr<Subchannel> LocalSubchannelPool::FindSubchannel(
+ const SubchannelKey& key) {
+ auto it = subchannel_map_.find(key);
+ if (it == subchannel_map_.end()) return nullptr;
+ return it->second->Ref();
}
-LocalSubchannelPool::~LocalSubchannelPool() {
- grpc_avl_unref(subchannel_map_, nullptr);
-}
-
-Subchannel* LocalSubchannelPool::RegisterSubchannel(SubchannelKey* key,
- Subchannel* constructed) {
- // Check to see if a subchannel already exists.
- Subchannel* c =
- static_cast<Subchannel*>(grpc_avl_get(subchannel_map_, key, nullptr));
- if (c != nullptr) {
- // The subchannel already exists. Reuse it.
- c = GRPC_SUBCHANNEL_REF(c, "subchannel_register+reuse");
- GRPC_SUBCHANNEL_UNREF(constructed, "subchannel_register+found_existing");
- } else {
- // There hasn't been such subchannel. Add one.
- subchannel_map_ = grpc_avl_add(subchannel_map_, new SubchannelKey(*key),
- constructed, nullptr);
- c = constructed;
- }
- return c;
-}
-
-void LocalSubchannelPool::UnregisterSubchannel(SubchannelKey* key) {
- subchannel_map_ = grpc_avl_remove(subchannel_map_, key, nullptr);
-}
-
-Subchannel* LocalSubchannelPool::FindSubchannel(SubchannelKey* key) {
- Subchannel* c =
- static_cast<Subchannel*>(grpc_avl_get(subchannel_map_, key, nullptr));
- return c == nullptr ? c : GRPC_SUBCHANNEL_REF(c, "found_from_pool");
-}
-
-namespace {
-
-void sck_avl_destroy(void* p, void* /*user_data*/) {
- SubchannelKey* key = static_cast<SubchannelKey*>(p);
- delete key;
-}
-
-void* sck_avl_copy(void* p, void* /*unused*/) {
- const SubchannelKey* key = static_cast<const SubchannelKey*>(p);
- auto new_key = new SubchannelKey(*key);
- return static_cast<void*>(new_key);
-}
-
-long sck_avl_compare(void* a, void* b, void* /*unused*/) {
- const SubchannelKey* key_a = static_cast<const SubchannelKey*>(a);
- const SubchannelKey* key_b = static_cast<const SubchannelKey*>(b);
- return key_a->Cmp(*key_b);
-}
-
-void scv_avl_destroy(void* /*p*/, void* /*user_data*/) {}
-
-void* scv_avl_copy(void* p, void* /*unused*/) { return p; }
-
-} // namespace
-
-const grpc_avl_vtable LocalSubchannelPool::subchannel_avl_vtable_ = {
- sck_avl_destroy, // destroy_key
- sck_avl_copy, // copy_key
- sck_avl_compare, // compare_keys
- scv_avl_destroy, // destroy_value
- scv_avl_copy // copy_value
-};
-
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
index 7d18d9b53f5..f039f6da9ab 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/local_subchannel_pool.h
@@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
+#include <map>
+
#include "src/core/ext/filters/client_channel/subchannel_pool_interface.h"
namespace grpc_core {
@@ -34,22 +36,21 @@ namespace grpc_core {
// Thread-unsafe.
class LocalSubchannelPool final : public SubchannelPoolInterface {
public:
- LocalSubchannelPool();
- ~LocalSubchannelPool() override;
+ LocalSubchannelPool() {}
+ ~LocalSubchannelPool() override {}
// Implements interface methods.
// Thread-unsafe. Intended to be invoked within the client_channel work
// serializer.
- Subchannel* RegisterSubchannel(SubchannelKey* key,
- Subchannel* constructed) override;
- void UnregisterSubchannel(SubchannelKey* key) override;
- Subchannel* FindSubchannel(SubchannelKey* key) override;
+ RefCountedPtr<Subchannel> RegisterSubchannel(
+ const SubchannelKey& key, RefCountedPtr<Subchannel> constructed) override;
+ void UnregisterSubchannel(const SubchannelKey& key,
+ Subchannel* subchannel) override;
+ RefCountedPtr<Subchannel> FindSubchannel(const SubchannelKey& key) override;
private:
- // The vtable for subchannel operations in an AVL tree.
- static const grpc_avl_vtable subchannel_avl_vtable_;
// A map from subchannel key to subchannel.
- grpc_avl subchannel_map_;
+ std::map<SubchannelKey, Subchannel*> subchannel_map_;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.cc
index 4a76a7d7bdc..a5494b1666a 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.cc
@@ -29,11 +29,10 @@ namespace grpc_core {
// Resolver
//
-Resolver::Resolver(std::shared_ptr<WorkSerializer> work_serializer,
- std::unique_ptr<ResultHandler> result_handler)
- : InternallyRefCounted(&grpc_trace_resolver_refcount),
- work_serializer_(std::move(work_serializer)),
- result_handler_(std::move(result_handler)) {}
+Resolver::Resolver()
+ : InternallyRefCounted(GRPC_TRACE_FLAG_ENABLED(grpc_trace_resolver_refcount)
+ ? "Resolver"
+ : nullptr) {}
//
// Resolver::Result
@@ -61,6 +60,9 @@ Resolver::Result::Result(Result&& other) noexcept {
}
Resolver::Result& Resolver::Result::operator=(const Result& other) {
+ if (&other == this) {
+ return *this;
+ }
addresses = other.addresses;
service_config = other.service_config;
GRPC_ERROR_UNREF(service_config_error);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.h
index de941a063b4..bd556a60c9e 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver.h
@@ -32,6 +32,9 @@
extern grpc_core::DebugOnlyTraceFlag grpc_trace_resolver_refcount;
+// Name associated with individual address, if available.
+#define GRPC_ARG_ADDRESS_NAME "grpc.address_name"
+
namespace grpc_core {
/// Interface for name resolution.
@@ -87,7 +90,7 @@ class Resolver : public InternallyRefCounted<Resolver> {
// Not copyable nor movable.
Resolver(const Resolver&) = delete;
Resolver& operator=(const Resolver&) = delete;
- virtual ~Resolver() = default;
+ ~Resolver() override = default;
/// Starts resolving.
virtual void StartLocked() = 0;
@@ -122,21 +125,10 @@ class Resolver : public InternallyRefCounted<Resolver> {
}
protected:
- Resolver(std::shared_ptr<WorkSerializer> work_serializer,
- std::unique_ptr<ResultHandler> result_handler);
+ Resolver();
/// Shuts down the resolver.
virtual void ShutdownLocked() = 0;
-
- std::shared_ptr<WorkSerializer> work_serializer() const {
- return work_serializer_;
- }
-
- ResultHandler* result_handler() const { return result_handler_.get(); }
-
- private:
- std::shared_ptr<WorkSerializer> work_serializer_;
- std::unique_ptr<ResultHandler> result_handler_;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index 43d638ab3f1..9a488212366 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -75,7 +75,7 @@ class AresDnsResolver : public Resolver {
void ShutdownLocked() override;
private:
- virtual ~AresDnsResolver();
+ ~AresDnsResolver() override;
void MaybeStartResolvingLocked();
void StartResolvingLocked();
@@ -86,15 +86,25 @@ class AresDnsResolver : public Resolver {
void OnResolvedLocked(grpc_error* error);
/// DNS server to use (if not system default)
- char* dns_server_;
+ TString dns_server_;
/// name to resolve (usually the same as target_name)
- char* name_to_resolve_;
+ TString name_to_resolve_;
/// channel args
grpc_channel_args* channel_args_;
- /// whether to request the service config
- bool request_service_config_;
+ std::shared_ptr<WorkSerializer> work_serializer_;
+ std::unique_ptr<ResultHandler> result_handler_;
/// pollset_set to drive the name resolution process
grpc_pollset_set* interested_parties_;
+
+ /// whether to request the service config
+ bool request_service_config_;
+ // whether or not to enable SRV DNS queries
+ bool enable_srv_queries_;
+ // timeout in milliseconds for active DNS queries
+ int query_timeout_ms_;
+ /// min interval between DNS requests
+ grpc_millis min_time_between_resolutions_;
+
/// closures used by the work_serializer
grpc_closure on_next_resolution_;
grpc_closure on_resolved_;
@@ -105,8 +115,6 @@ class AresDnsResolver : public Resolver {
/// next resolution timer
bool have_next_resolution_timer_ = false;
grpc_timer next_resolution_timer_;
- /// min interval between DNS requests
- grpc_millis min_time_between_resolutions_;
/// timestamp of last DNS request
grpc_millis last_resolution_timestamp_ = -1;
/// retry backoff state
@@ -119,14 +127,25 @@ class AresDnsResolver : public Resolver {
char* service_config_json_ = nullptr;
// has shutdown been initiated
bool shutdown_initiated_ = false;
- // timeout in milliseconds for active DNS queries
- int query_timeout_ms_;
- // whether or not to enable SRV DNS queries
- bool enable_srv_queries_;
};
AresDnsResolver::AresDnsResolver(ResolverArgs args)
- : Resolver(std::move(args.work_serializer), std::move(args.result_handler)),
+ : dns_server_(args.uri.authority()),
+ name_to_resolve_(y_absl::StripPrefix(args.uri.path(), "/")),
+ channel_args_(grpc_channel_args_copy(args.args)),
+ work_serializer_(std::move(args.work_serializer)),
+ result_handler_(std::move(args.result_handler)),
+ interested_parties_(args.pollset_set),
+ request_service_config_(!grpc_channel_args_find_bool(
+ channel_args_, GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION, true)),
+ enable_srv_queries_(grpc_channel_args_find_bool(
+ channel_args_, GRPC_ARG_DNS_ENABLE_SRV_QUERIES, false)),
+ query_timeout_ms_(grpc_channel_args_find_integer(
+ channel_args_, GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS,
+ {GRPC_DNS_ARES_DEFAULT_QUERY_TIMEOUT_MS, 0, INT_MAX})),
+ min_time_between_resolutions_(grpc_channel_args_find_integer(
+ channel_args_, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS,
+ {1000 * 30, 0, INT_MAX})),
backoff_(
BackOff::Options()
.set_initial_backoff(GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS *
@@ -134,49 +153,14 @@ AresDnsResolver::AresDnsResolver(ResolverArgs args)
.set_multiplier(GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER)
.set_jitter(GRPC_DNS_RECONNECT_JITTER)
.set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000)) {
- // Closure Initialization
+ // Closure initialization.
GRPC_CLOSURE_INIT(&on_next_resolution_, OnNextResolution, this,
grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&on_resolved_, OnResolved, this, grpc_schedule_on_exec_ctx);
- // Get name to resolve from URI path.
- const char* path = args.uri->path;
- if (path[0] == '/') ++path;
- name_to_resolve_ = gpr_strdup(path);
- // Get DNS server from URI authority.
- dns_server_ = nullptr;
- if (0 != strcmp(args.uri->authority, "")) {
- dns_server_ = gpr_strdup(args.uri->authority);
- }
- channel_args_ = grpc_channel_args_copy(args.args);
- // Disable service config option
- const grpc_arg* arg = grpc_channel_args_find(
- channel_args_, GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION);
- request_service_config_ = !grpc_channel_arg_get_bool(arg, true);
- // Min time b/t resolutions option
- arg = grpc_channel_args_find(channel_args_,
- GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS);
- min_time_between_resolutions_ =
- grpc_channel_arg_get_integer(arg, {1000 * 30, 0, INT_MAX});
- // Enable SRV queries option
- arg = grpc_channel_args_find(channel_args_, GRPC_ARG_DNS_ENABLE_SRV_QUERIES);
- enable_srv_queries_ = grpc_channel_arg_get_bool(arg, false);
- interested_parties_ = grpc_pollset_set_create();
- if (args.pollset_set != nullptr) {
- grpc_pollset_set_add_pollset_set(interested_parties_, args.pollset_set);
- }
-
- const grpc_arg* query_timeout_ms_arg =
- grpc_channel_args_find(channel_args_, GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS);
- query_timeout_ms_ = grpc_channel_arg_get_integer(
- query_timeout_ms_arg,
- {GRPC_DNS_ARES_DEFAULT_QUERY_TIMEOUT_MS, 0, INT_MAX});
}
AresDnsResolver::~AresDnsResolver() {
GRPC_CARES_TRACE_LOG("resolver:%p destroying AresDnsResolver", this);
- grpc_pollset_set_destroy(interested_parties_);
- gpr_free(dns_server_);
- gpr_free(name_to_resolve_);
grpc_channel_args_destroy(channel_args_);
}
@@ -212,8 +196,8 @@ void AresDnsResolver::ShutdownLocked() {
void AresDnsResolver::OnNextResolution(void* arg, grpc_error* error) {
AresDnsResolver* r = static_cast<AresDnsResolver*>(arg);
GRPC_ERROR_REF(error); // ref owned by lambda
- r->work_serializer()->Run([r, error]() { r->OnNextResolutionLocked(error); },
- DEBUG_LOCATION);
+ r->work_serializer_->Run([r, error]() { r->OnNextResolutionLocked(error); },
+ DEBUG_LOCATION);
}
void AresDnsResolver::OnNextResolutionLocked(grpc_error* error) {
@@ -324,8 +308,8 @@ TString ChooseServiceConfig(char* service_config_choice_json,
void AresDnsResolver::OnResolved(void* arg, grpc_error* error) {
AresDnsResolver* r = static_cast<AresDnsResolver*>(arg);
GRPC_ERROR_REF(error); // ref owned by lambda
- r->work_serializer()->Run([r, error]() { r->OnResolvedLocked(error); },
- DEBUG_LOCATION);
+ r->work_serializer_->Run([r, error]() { r->OnResolvedLocked(error); },
+ DEBUG_LOCATION);
}
void AresDnsResolver::OnResolvedLocked(grpc_error* error) {
@@ -362,7 +346,7 @@ void AresDnsResolver::OnResolvedLocked(grpc_error* error) {
}
result.args = grpc_channel_args_copy_and_add(channel_args_, new_args.data(),
new_args.size());
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
addresses_.reset();
balancer_addresses_.reset();
// Reset backoff state so that we start from the beginning when the
@@ -373,7 +357,7 @@ void AresDnsResolver::OnResolvedLocked(grpc_error* error) {
grpc_error_string(error));
TString error_message =
y_absl::StrCat("DNS resolution failed for service: ", name_to_resolve_);
- result_handler()->ReturnError(grpc_error_set_int(
+ result_handler_->ReturnError(grpc_error_set_int(
GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(error_message.c_str(),
&error, 1),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
@@ -439,11 +423,11 @@ void AresDnsResolver::StartResolvingLocked() {
resolving_ = true;
service_config_json_ = nullptr;
pending_request_ = grpc_dns_lookup_ares_locked(
- dns_server_, name_to_resolve_, kDefaultPort, interested_parties_,
- &on_resolved_, &addresses_,
+ dns_server_.c_str(), name_to_resolve_.c_str(), kDefaultPort,
+ interested_parties_, &on_resolved_, &addresses_,
enable_srv_queries_ ? &balancer_addresses_ : nullptr,
request_service_config_ ? &service_config_json_ : nullptr,
- query_timeout_ms_, work_serializer());
+ query_timeout_ms_, work_serializer_);
last_resolution_timestamp_ = grpc_core::ExecCtx::Get()->Now();
GRPC_CARES_TRACE_LOG("resolver:%p Started resolving. pending_request_:%p",
this, pending_request_);
@@ -455,7 +439,7 @@ void AresDnsResolver::StartResolvingLocked() {
class AresDnsResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* /*uri*/) const override { return true; }
+ bool IsValidUri(const URI& /*uri*/) const override { return true; }
OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
return MakeOrphanable<AresDnsResolver>(std::move(args));
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
deleted file mode 100644
index 9e6bd876228..00000000000
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- *
- * Copyright 2016 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/iomgr/port.h"
-#if GRPC_ARES == 1
-
-#include <ares.h>
-#include <string.h>
-
-#include "y_absl/strings/str_cat.h"
-
-#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h"
-
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-#include <grpc/support/string_util.h>
-#include <grpc/support/time.h>
-#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
-#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/iomgr/iomgr_internal.h"
-#include "src/core/lib/iomgr/sockaddr_utils.h"
-#include "src/core/lib/iomgr/timer.h"
-
-typedef struct fd_node {
- /** the owner of this fd node */
- grpc_ares_ev_driver* ev_driver;
- /** a closure wrapping on_readable_locked, which should be
- invoked when the grpc_fd in this node becomes readable. */
- grpc_closure read_closure;
- /** a closure wrapping on_writable_locked, which should be
- invoked when the grpc_fd in this node becomes writable. */
- grpc_closure write_closure;
- /** next fd node in the list */
- struct fd_node* next;
-
- /** wrapped fd that's polled by grpc's poller for the current platform */
- grpc_core::GrpcPolledFd* grpc_polled_fd;
- /** if the readable closure has been registered */
- bool readable_registered;
- /** if the writable closure has been registered */
- bool writable_registered;
- /** if the fd has been shutdown yet from grpc iomgr perspective */
- bool already_shutdown;
-} fd_node;
-
-struct grpc_ares_ev_driver {
- /** the ares_channel owned by this event driver */
- ares_channel channel;
- /** pollset set for driving the IO events of the channel */
- grpc_pollset_set* pollset_set;
- /** refcount of the event driver */
- gpr_refcount refs;
-
- /** work_serializer to synchronize c-ares and I/O callbacks on */
- std::shared_ptr<grpc_core::WorkSerializer> work_serializer;
- /** a list of grpc_fd that this event driver is currently using. */
- fd_node* fds;
- /** is this event driver currently working? */
- bool working;
- /** is this event driver being shut down */
- bool shutting_down;
- /** request object that's using this ev driver */
- grpc_ares_request* request;
- /** Owned by the ev_driver. Creates new GrpcPolledFd's */
- std::unique_ptr<grpc_core::GrpcPolledFdFactory> polled_fd_factory;
- /** query timeout in milliseconds */
- int query_timeout_ms;
- /** alarm to cancel active queries */
- grpc_timer query_timeout;
- /** cancels queries on a timeout */
- grpc_closure on_timeout_locked;
- /** alarm to poll ares_process on in case fd events don't happen */
- grpc_timer ares_backup_poll_alarm;
- /** polls ares_process on a periodic timer */
- grpc_closure on_ares_backup_poll_alarm_locked;
-};
-
-static void grpc_ares_notify_on_event_locked(grpc_ares_ev_driver* ev_driver);
-
-static grpc_ares_ev_driver* grpc_ares_ev_driver_ref(
- grpc_ares_ev_driver* ev_driver) {
- GRPC_CARES_TRACE_LOG("request:%p Ref ev_driver %p", ev_driver->request,
- ev_driver);
- gpr_ref(&ev_driver->refs);
- return ev_driver;
-}
-
-static void grpc_ares_ev_driver_unref(grpc_ares_ev_driver* ev_driver) {
- GRPC_CARES_TRACE_LOG("request:%p Unref ev_driver %p", ev_driver->request,
- ev_driver);
- if (gpr_unref(&ev_driver->refs)) {
- GRPC_CARES_TRACE_LOG("request:%p destroy ev_driver %p", ev_driver->request,
- ev_driver);
- GPR_ASSERT(ev_driver->fds == nullptr);
- ares_destroy(ev_driver->channel);
- grpc_ares_complete_request_locked(ev_driver->request);
- delete ev_driver;
- }
-}
-
-static void fd_node_destroy_locked(fd_node* fdn) {
- GRPC_CARES_TRACE_LOG("request:%p delete fd: %s", fdn->ev_driver->request,
- fdn->grpc_polled_fd->GetName());
- GPR_ASSERT(!fdn->readable_registered);
- GPR_ASSERT(!fdn->writable_registered);
- GPR_ASSERT(fdn->already_shutdown);
- delete fdn->grpc_polled_fd;
- gpr_free(fdn);
-}
-
-static void fd_node_shutdown_locked(fd_node* fdn, const char* reason) {
- if (!fdn->already_shutdown) {
- fdn->already_shutdown = true;
- fdn->grpc_polled_fd->ShutdownLocked(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING(reason));
- }
-}
-
-static void on_timeout(void* arg, grpc_error* error);
-static void on_timeout_locked(grpc_ares_ev_driver* arg, grpc_error* error);
-
-static void on_ares_backup_poll_alarm(void* arg, grpc_error* error);
-static void on_ares_backup_poll_alarm_locked(grpc_ares_ev_driver* arg,
- grpc_error* error);
-
-static void noop_inject_channel_config(ares_channel /*channel*/) {}
-
-void (*grpc_ares_test_only_inject_config)(ares_channel channel) =
- noop_inject_channel_config;
-
-grpc_error* grpc_ares_ev_driver_create_locked(
- grpc_ares_ev_driver** ev_driver, grpc_pollset_set* pollset_set,
- int query_timeout_ms,
- std::shared_ptr<grpc_core::WorkSerializer> work_serializer,
- grpc_ares_request* request) {
- *ev_driver = new grpc_ares_ev_driver();
- ares_options opts;
- memset(&opts, 0, sizeof(opts));
- opts.flags |= ARES_FLAG_STAYOPEN;
- int status = ares_init_options(&(*ev_driver)->channel, &opts, ARES_OPT_FLAGS);
- grpc_ares_test_only_inject_config((*ev_driver)->channel);
- GRPC_CARES_TRACE_LOG("request:%p grpc_ares_ev_driver_create_locked", request);
- if (status != ARES_SUCCESS) {
- grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("Failed to init ares channel. C-ares error: ",
- ares_strerror(status))
- .c_str());
- gpr_free(*ev_driver);
- return err;
- }
- (*ev_driver)->work_serializer = std::move(work_serializer);
- gpr_ref_init(&(*ev_driver)->refs, 1);
- (*ev_driver)->pollset_set = pollset_set;
- (*ev_driver)->fds = nullptr;
- (*ev_driver)->working = false;
- (*ev_driver)->shutting_down = false;
- (*ev_driver)->request = request;
- (*ev_driver)->polled_fd_factory =
- grpc_core::NewGrpcPolledFdFactory((*ev_driver)->work_serializer);
- (*ev_driver)
- ->polled_fd_factory->ConfigureAresChannelLocked((*ev_driver)->channel);
- (*ev_driver)->query_timeout_ms = query_timeout_ms;
- return GRPC_ERROR_NONE;
-}
-
-void grpc_ares_ev_driver_on_queries_complete_locked(
- grpc_ares_ev_driver* ev_driver) {
- // We mark the event driver as being shut down. If the event driver
- // is working, grpc_ares_notify_on_event_locked will shut down the
- // fds; if it's not working, there are no fds to shut down.
- ev_driver->shutting_down = true;
- grpc_timer_cancel(&ev_driver->query_timeout);
- grpc_timer_cancel(&ev_driver->ares_backup_poll_alarm);
- grpc_ares_ev_driver_unref(ev_driver);
-}
-
-void grpc_ares_ev_driver_shutdown_locked(grpc_ares_ev_driver* ev_driver) {
- ev_driver->shutting_down = true;
- fd_node* fn = ev_driver->fds;
- while (fn != nullptr) {
- fd_node_shutdown_locked(fn, "grpc_ares_ev_driver_shutdown");
- fn = fn->next;
- }
-}
-
-// Search fd in the fd_node list head. This is an O(n) search, the max possible
-// value of n is ARES_GETSOCK_MAXNUM (16). n is typically 1 - 2 in our tests.
-static fd_node* pop_fd_node_locked(fd_node** head, ares_socket_t as) {
- fd_node dummy_head;
- dummy_head.next = *head;
- fd_node* node = &dummy_head;
- while (node->next != nullptr) {
- if (node->next->grpc_polled_fd->GetWrappedAresSocketLocked() == as) {
- fd_node* ret = node->next;
- node->next = node->next->next;
- *head = dummy_head.next;
- return ret;
- }
- node = node->next;
- }
- return nullptr;
-}
-
-static grpc_millis calculate_next_ares_backup_poll_alarm_ms(
- grpc_ares_ev_driver* driver) {
- // An alternative here could be to use ares_timeout to try to be more
- // accurate, but that would require using "struct timeval"'s, which just makes
- // things a bit more complicated. So just poll every second, as suggested
- // by the c-ares code comments.
- grpc_millis ms_until_next_ares_backup_poll_alarm = 1000;
- GRPC_CARES_TRACE_LOG(
- "request:%p ev_driver=%p. next ares process poll time in "
- "%" PRId64 " ms",
- driver->request, driver, ms_until_next_ares_backup_poll_alarm);
- return ms_until_next_ares_backup_poll_alarm +
- grpc_core::ExecCtx::Get()->Now();
-}
-
-static void on_timeout(void* arg, grpc_error* error) {
- grpc_ares_ev_driver* driver = static_cast<grpc_ares_ev_driver*>(arg);
- GRPC_ERROR_REF(error); // ref owned by lambda
- driver->work_serializer->Run(
- [driver, error]() { on_timeout_locked(driver, error); }, DEBUG_LOCATION);
-}
-
-static void on_timeout_locked(grpc_ares_ev_driver* driver, grpc_error* error) {
- GRPC_CARES_TRACE_LOG(
- "request:%p ev_driver=%p on_timeout_locked. driver->shutting_down=%d. "
- "err=%s",
- driver->request, driver, driver->shutting_down, grpc_error_string(error));
- if (!driver->shutting_down && error == GRPC_ERROR_NONE) {
- grpc_ares_ev_driver_shutdown_locked(driver);
- }
- grpc_ares_ev_driver_unref(driver);
- GRPC_ERROR_UNREF(error);
-}
-
-static void on_ares_backup_poll_alarm(void* arg, grpc_error* error) {
- grpc_ares_ev_driver* driver = static_cast<grpc_ares_ev_driver*>(arg);
- GRPC_ERROR_REF(error);
- driver->work_serializer->Run(
- [driver, error]() { on_ares_backup_poll_alarm_locked(driver, error); },
- DEBUG_LOCATION);
-}
-
-/* In case of non-responsive DNS servers, dropped packets, etc., c-ares has
- * intelligent timeout and retry logic, which we can take advantage of by
- * polling ares_process_fd on time intervals. Overall, the c-ares library is
- * meant to be called into and given a chance to proceed name resolution:
- * a) when fd events happen
- * b) when some time has passed without fd events having happened
- * For the latter, we use this backup poller. Also see
- * https://github.com/grpc/grpc/pull/17688 description for more details. */
-static void on_ares_backup_poll_alarm_locked(grpc_ares_ev_driver* driver,
- grpc_error* error) {
- GRPC_CARES_TRACE_LOG(
- "request:%p ev_driver=%p on_ares_backup_poll_alarm_locked. "
- "driver->shutting_down=%d. "
- "err=%s",
- driver->request, driver, driver->shutting_down, grpc_error_string(error));
- if (!driver->shutting_down && error == GRPC_ERROR_NONE) {
- fd_node* fdn = driver->fds;
- while (fdn != nullptr) {
- if (!fdn->already_shutdown) {
- GRPC_CARES_TRACE_LOG(
- "request:%p ev_driver=%p on_ares_backup_poll_alarm_locked; "
- "ares_process_fd. fd=%s",
- driver->request, driver, fdn->grpc_polled_fd->GetName());
- ares_socket_t as = fdn->grpc_polled_fd->GetWrappedAresSocketLocked();
- ares_process_fd(driver->channel, as, as);
- }
- fdn = fdn->next;
- }
- if (!driver->shutting_down) {
- grpc_millis next_ares_backup_poll_alarm =
- calculate_next_ares_backup_poll_alarm_ms(driver);
- grpc_ares_ev_driver_ref(driver);
- GRPC_CLOSURE_INIT(&driver->on_ares_backup_poll_alarm_locked,
- on_ares_backup_poll_alarm, driver,
- grpc_schedule_on_exec_ctx);
- grpc_timer_init(&driver->ares_backup_poll_alarm,
- next_ares_backup_poll_alarm,
- &driver->on_ares_backup_poll_alarm_locked);
- }
- grpc_ares_notify_on_event_locked(driver);
- }
- grpc_ares_ev_driver_unref(driver);
- GRPC_ERROR_UNREF(error);
-}
-
-static void on_readable_locked(fd_node* fdn, grpc_error* error) {
- GPR_ASSERT(fdn->readable_registered);
- grpc_ares_ev_driver* ev_driver = fdn->ev_driver;
- const ares_socket_t as = fdn->grpc_polled_fd->GetWrappedAresSocketLocked();
- fdn->readable_registered = false;
- GRPC_CARES_TRACE_LOG("request:%p readable on %s", fdn->ev_driver->request,
- fdn->grpc_polled_fd->GetName());
- if (error == GRPC_ERROR_NONE) {
- do {
- ares_process_fd(ev_driver->channel, as, ARES_SOCKET_BAD);
- } while (fdn->grpc_polled_fd->IsFdStillReadableLocked());
- } else {
- // If error is not GRPC_ERROR_NONE, it means the fd has been shutdown or
- // timed out. The pending lookups made on this ev_driver will be cancelled
- // by the following ares_cancel() and the on_done callbacks will be invoked
- // with a status of ARES_ECANCELLED. The remaining file descriptors in this
- // ev_driver will be cleaned up in the follwing
- // grpc_ares_notify_on_event_locked().
- ares_cancel(ev_driver->channel);
- }
- grpc_ares_notify_on_event_locked(ev_driver);
- grpc_ares_ev_driver_unref(ev_driver);
- GRPC_ERROR_UNREF(error);
-}
-
-static void on_readable(void* arg, grpc_error* error) {
- fd_node* fdn = static_cast<fd_node*>(arg);
- GRPC_ERROR_REF(error); /* ref owned by lambda */
- fdn->ev_driver->work_serializer->Run(
- [fdn, error]() { on_readable_locked(fdn, error); }, DEBUG_LOCATION);
-}
-
-static void on_writable_locked(fd_node* fdn, grpc_error* error) {
- GPR_ASSERT(fdn->writable_registered);
- grpc_ares_ev_driver* ev_driver = fdn->ev_driver;
- const ares_socket_t as = fdn->grpc_polled_fd->GetWrappedAresSocketLocked();
- fdn->writable_registered = false;
- GRPC_CARES_TRACE_LOG("request:%p writable on %s", ev_driver->request,
- fdn->grpc_polled_fd->GetName());
- if (error == GRPC_ERROR_NONE) {
- ares_process_fd(ev_driver->channel, ARES_SOCKET_BAD, as);
- } else {
- // If error is not GRPC_ERROR_NONE, it means the fd has been shutdown or
- // timed out. The pending lookups made on this ev_driver will be cancelled
- // by the following ares_cancel() and the on_done callbacks will be invoked
- // with a status of ARES_ECANCELLED. The remaining file descriptors in this
- // ev_driver will be cleaned up in the follwing
- // grpc_ares_notify_on_event_locked().
- ares_cancel(ev_driver->channel);
- }
- grpc_ares_notify_on_event_locked(ev_driver);
- grpc_ares_ev_driver_unref(ev_driver);
- GRPC_ERROR_UNREF(error);
-}
-
-static void on_writable(void* arg, grpc_error* error) {
- fd_node* fdn = static_cast<fd_node*>(arg);
- GRPC_ERROR_REF(error); /* ref owned by lambda */
- fdn->ev_driver->work_serializer->Run(
- [fdn, error]() { on_writable_locked(fdn, error); }, DEBUG_LOCATION);
-}
-
-ares_channel* grpc_ares_ev_driver_get_channel_locked(
- grpc_ares_ev_driver* ev_driver) {
- return &ev_driver->channel;
-}
-
-// Get the file descriptors used by the ev_driver's ares channel, register
-// driver_closure with these filedescriptors.
-static void grpc_ares_notify_on_event_locked(grpc_ares_ev_driver* ev_driver) {
- fd_node* new_list = nullptr;
- if (!ev_driver->shutting_down) {
- ares_socket_t socks[ARES_GETSOCK_MAXNUM];
- int socks_bitmask =
- ares_getsock(ev_driver->channel, socks, ARES_GETSOCK_MAXNUM);
- for (size_t i = 0; i < ARES_GETSOCK_MAXNUM; i++) {
- if (ARES_GETSOCK_READABLE(socks_bitmask, i) ||
- ARES_GETSOCK_WRITABLE(socks_bitmask, i)) {
- fd_node* fdn = pop_fd_node_locked(&ev_driver->fds, socks[i]);
- // Create a new fd_node if sock[i] is not in the fd_node list.
- if (fdn == nullptr) {
- fdn = static_cast<fd_node*>(gpr_malloc(sizeof(fd_node)));
- fdn->grpc_polled_fd =
- ev_driver->polled_fd_factory->NewGrpcPolledFdLocked(
- socks[i], ev_driver->pollset_set, ev_driver->work_serializer);
- GRPC_CARES_TRACE_LOG("request:%p new fd: %s", ev_driver->request,
- fdn->grpc_polled_fd->GetName());
- fdn->ev_driver = ev_driver;
- fdn->readable_registered = false;
- fdn->writable_registered = false;
- fdn->already_shutdown = false;
- }
- fdn->next = new_list;
- new_list = fdn;
- // Register read_closure if the socket is readable and read_closure has
- // not been registered with this socket.
- if (ARES_GETSOCK_READABLE(socks_bitmask, i) &&
- !fdn->readable_registered) {
- grpc_ares_ev_driver_ref(ev_driver);
- GRPC_CARES_TRACE_LOG("request:%p notify read on: %s",
- ev_driver->request,
- fdn->grpc_polled_fd->GetName());
- GRPC_CLOSURE_INIT(&fdn->read_closure, on_readable, fdn,
- grpc_schedule_on_exec_ctx);
- fdn->grpc_polled_fd->RegisterForOnReadableLocked(&fdn->read_closure);
- fdn->readable_registered = true;
- }
- // Register write_closure if the socket is writable and write_closure
- // has not been registered with this socket.
- if (ARES_GETSOCK_WRITABLE(socks_bitmask, i) &&
- !fdn->writable_registered) {
- GRPC_CARES_TRACE_LOG("request:%p notify write on: %s",
- ev_driver->request,
- fdn->grpc_polled_fd->GetName());
- grpc_ares_ev_driver_ref(ev_driver);
- GRPC_CLOSURE_INIT(&fdn->write_closure, on_writable, fdn,
- grpc_schedule_on_exec_ctx);
- fdn->grpc_polled_fd->RegisterForOnWriteableLocked(
- &fdn->write_closure);
- fdn->writable_registered = true;
- }
- }
- }
- }
- // Any remaining fds in ev_driver->fds were not returned by ares_getsock() and
- // are therefore no longer in use, so they can be shut down and removed from
- // the list.
- while (ev_driver->fds != nullptr) {
- fd_node* cur = ev_driver->fds;
- ev_driver->fds = ev_driver->fds->next;
- fd_node_shutdown_locked(cur, "c-ares fd shutdown");
- if (!cur->readable_registered && !cur->writable_registered) {
- fd_node_destroy_locked(cur);
- } else {
- cur->next = new_list;
- new_list = cur;
- }
- }
- ev_driver->fds = new_list;
- // If the ev driver has no working fd, all the tasks are done.
- if (new_list == nullptr) {
- ev_driver->working = false;
- GRPC_CARES_TRACE_LOG("request:%p ev driver stop working",
- ev_driver->request);
- }
-}
-
-void grpc_ares_ev_driver_start_locked(grpc_ares_ev_driver* ev_driver) {
- if (!ev_driver->working) {
- ev_driver->working = true;
- grpc_ares_notify_on_event_locked(ev_driver);
- // Initialize overall DNS resolution timeout alarm
- grpc_millis timeout =
- ev_driver->query_timeout_ms == 0
- ? GRPC_MILLIS_INF_FUTURE
- : ev_driver->query_timeout_ms + grpc_core::ExecCtx::Get()->Now();
- GRPC_CARES_TRACE_LOG(
- "request:%p ev_driver=%p grpc_ares_ev_driver_start_locked. timeout in "
- "%" PRId64 " ms",
- ev_driver->request, ev_driver, timeout);
- grpc_ares_ev_driver_ref(ev_driver);
- GRPC_CLOSURE_INIT(&ev_driver->on_timeout_locked, on_timeout, ev_driver,
- grpc_schedule_on_exec_ctx);
- grpc_timer_init(&ev_driver->query_timeout, timeout,
- &ev_driver->on_timeout_locked);
- // Initialize the backup poll alarm
- grpc_millis next_ares_backup_poll_alarm =
- calculate_next_ares_backup_poll_alarm_ms(ev_driver);
- grpc_ares_ev_driver_ref(ev_driver);
- GRPC_CLOSURE_INIT(&ev_driver->on_ares_backup_poll_alarm_locked,
- on_ares_backup_poll_alarm, ev_driver,
- grpc_schedule_on_exec_ctx);
- grpc_timer_init(&ev_driver->ares_backup_poll_alarm,
- next_ares_backup_poll_alarm,
- &ev_driver->on_ares_backup_poll_alarm_locked);
- }
-}
-
-#endif /* GRPC_ARES == 1 */
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
index cedf0c39709..cc884864862 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h
@@ -22,39 +22,8 @@
#include <grpc/support/port_platform.h>
#include <ares.h>
-#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
#include "src/core/lib/iomgr/pollset_set.h"
-
-typedef struct grpc_ares_ev_driver grpc_ares_ev_driver;
-
-/* Start \a ev_driver. It will keep working until all IO on its ares_channel is
- done, or grpc_ares_ev_driver_destroy() is called. It may notify the callbacks
- bound to its ares_channel when necessary. */
-void grpc_ares_ev_driver_start_locked(grpc_ares_ev_driver* ev_driver);
-
-/* Returns the ares_channel owned by \a ev_driver. To bind a c-ares query to
- \a ev_driver, use the ares_channel owned by \a ev_driver as the arg of the
- query. */
-ares_channel* grpc_ares_ev_driver_get_channel_locked(
- grpc_ares_ev_driver* ev_driver);
-
-/* Creates a new grpc_ares_ev_driver. Returns GRPC_ERROR_NONE if \a ev_driver is
- created successfully. */
-grpc_error* grpc_ares_ev_driver_create_locked(
- grpc_ares_ev_driver** ev_driver, grpc_pollset_set* pollset_set,
- int query_timeout_ms,
- std::shared_ptr<grpc_core::WorkSerializer> work_serializer,
- grpc_ares_request* request);
-
-/* Called back when all DNS lookups have completed. */
-void grpc_ares_ev_driver_on_queries_complete_locked(
- grpc_ares_ev_driver* ev_driver);
-
-/* Shutdown all the grpc_fds used by \a ev_driver */
-void grpc_ares_ev_driver_shutdown_locked(grpc_ares_ev_driver* ev_driver);
-
-/* Exposed in this header for C-core tests only */
-extern void (*grpc_ares_test_only_inject_config)(ares_channel channel);
+#include "src/core/lib/iomgr/work_serializer.h"
namespace grpc_core {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
index e1fcaa5090c..d09d92bb930 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc
@@ -43,19 +43,19 @@ namespace grpc_core {
class GrpcPolledFdPosix : public GrpcPolledFd {
public:
GrpcPolledFdPosix(ares_socket_t as, grpc_pollset_set* driver_pollset_set)
- : name_(y_absl::StrCat("c-ares fd: ", (int)as)), as_(as) {
- fd_ = grpc_fd_create((int)as, name_.c_str(), false);
+ : name_(y_absl::StrCat("c-ares fd: ", static_cast<int>(as))), as_(as) {
+ fd_ = grpc_fd_create(static_cast<int>(as), name_.c_str(), false);
driver_pollset_set_ = driver_pollset_set;
grpc_pollset_set_add_fd(driver_pollset_set_, fd_);
}
- ~GrpcPolledFdPosix() {
+ ~GrpcPolledFdPosix() override {
grpc_pollset_set_del_fd(driver_pollset_set_, fd_);
/* c-ares library will close the fd inside grpc_fd. This fd may be picked up
immediately by another thread, and should not be closed by the following
grpc_fd_orphan. */
- int dummy_release_fd;
- grpc_fd_orphan(fd_, nullptr, &dummy_release_fd, "c-ares query finished");
+ int phony_release_fd;
+ grpc_fd_orphan(fd_, nullptr, &phony_release_fd, "c-ares query finished");
}
void RegisterForOnReadableLocked(grpc_closure* read_closure) override {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
index e228469517b..493107cdc07 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc
@@ -251,7 +251,7 @@ class GrpcPolledFdWindows {
}
}
- bool IsFdStillReadableLocked() { return GRPC_SLICE_LENGTH(read_buf_) > 0; }
+ bool IsFdStillReadableLocked() { return read_buf_has_data_; }
void ShutdownLocked(grpc_error* error) {
grpc_winsocket_shutdown(winsocket_);
@@ -362,6 +362,8 @@ class GrpcPolledFdWindows {
DWORD bytes_sent = 0;
int wsa_error_code = 0;
if (SendWriteBuf(&bytes_sent, nullptr, &wsa_error_code) != 0) {
+ grpc_slice_unref_internal(write_buf_);
+ write_buf_ = grpc_empty_slice();
wsa_error_ctx->SetWSAError(wsa_error_code);
char* msg = gpr_format_message(wsa_error_code);
GRPC_CARES_TRACE_LOG(
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
index c3b236af689..9b742d2d346 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc
@@ -46,6 +46,7 @@
#include "src/core/lib/iomgr/nameser.h"
#include "src/core/lib/iomgr/parse_address.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/transport/authority_override.h"
using grpc_core::ServerAddress;
@@ -56,6 +57,8 @@ grpc_core::TraceFlag grpc_trace_cares_address_sorting(false,
grpc_core::TraceFlag grpc_trace_cares_resolver(false, "cares_resolver");
+typedef struct grpc_ares_ev_driver grpc_ares_ev_driver;
+
struct grpc_ares_request {
/** indicates the DNS server to use, if specified */
struct ares_addr_port_node dns_server_addr;
@@ -77,6 +80,58 @@ struct grpc_ares_request {
grpc_error* error;
};
+typedef struct fd_node {
+ /** the owner of this fd node */
+ grpc_ares_ev_driver* ev_driver;
+ /** a closure wrapping on_readable_locked, which should be
+ invoked when the grpc_fd in this node becomes readable. */
+ grpc_closure read_closure;
+ /** a closure wrapping on_writable_locked, which should be
+ invoked when the grpc_fd in this node becomes writable. */
+ grpc_closure write_closure;
+ /** next fd node in the list */
+ struct fd_node* next;
+
+ /** wrapped fd that's polled by grpc's poller for the current platform */
+ grpc_core::GrpcPolledFd* grpc_polled_fd;
+ /** if the readable closure has been registered */
+ bool readable_registered;
+ /** if the writable closure has been registered */
+ bool writable_registered;
+ /** if the fd has been shutdown yet from grpc iomgr perspective */
+ bool already_shutdown;
+} fd_node;
+
+struct grpc_ares_ev_driver {
+ /** the ares_channel owned by this event driver */
+ ares_channel channel;
+ /** pollset set for driving the IO events of the channel */
+ grpc_pollset_set* pollset_set;
+ /** refcount of the event driver */
+ gpr_refcount refs;
+
+ /** work_serializer to synchronize c-ares and I/O callbacks on */
+ std::shared_ptr<grpc_core::WorkSerializer> work_serializer;
+ /** a list of grpc_fd that this event driver is currently using. */
+ fd_node* fds;
+ /** is this event driver being shut down */
+ bool shutting_down;
+ /** request object that's using this ev driver */
+ grpc_ares_request* request;
+ /** Owned by the ev_driver. Creates new GrpcPolledFd's */
+ std::unique_ptr<grpc_core::GrpcPolledFdFactory> polled_fd_factory;
+ /** query timeout in milliseconds */
+ int query_timeout_ms;
+ /** alarm to cancel active queries */
+ grpc_timer query_timeout;
+ /** cancels queries on a timeout */
+ grpc_closure on_timeout_locked;
+ /** alarm to poll ares_process on in case fd events don't happen */
+ grpc_timer ares_backup_poll_alarm;
+ /** polls ares_process on a periodic timer */
+ grpc_closure on_ares_backup_poll_alarm_locked;
+};
+
// TODO(apolcyn): make grpc_ares_hostbyname_request a sub-class
// of GrpcAresQuery.
typedef struct grpc_ares_hostbyname_request {
@@ -121,6 +176,380 @@ class GrpcAresQuery {
const TString name_;
};
+static grpc_ares_ev_driver* grpc_ares_ev_driver_ref(
+ grpc_ares_ev_driver* ev_driver) {
+ GRPC_CARES_TRACE_LOG("request:%p Ref ev_driver %p", ev_driver->request,
+ ev_driver);
+ gpr_ref(&ev_driver->refs);
+ return ev_driver;
+}
+
+static void grpc_ares_ev_driver_unref(grpc_ares_ev_driver* ev_driver) {
+ GRPC_CARES_TRACE_LOG("request:%p Unref ev_driver %p", ev_driver->request,
+ ev_driver);
+ if (gpr_unref(&ev_driver->refs)) {
+ GRPC_CARES_TRACE_LOG("request:%p destroy ev_driver %p", ev_driver->request,
+ ev_driver);
+ GPR_ASSERT(ev_driver->fds == nullptr);
+ ares_destroy(ev_driver->channel);
+ grpc_ares_complete_request_locked(ev_driver->request);
+ delete ev_driver;
+ }
+}
+
+static void fd_node_destroy_locked(fd_node* fdn) {
+ GRPC_CARES_TRACE_LOG("request:%p delete fd: %s", fdn->ev_driver->request,
+ fdn->grpc_polled_fd->GetName());
+ GPR_ASSERT(!fdn->readable_registered);
+ GPR_ASSERT(!fdn->writable_registered);
+ GPR_ASSERT(fdn->already_shutdown);
+ delete fdn->grpc_polled_fd;
+ gpr_free(fdn);
+}
+
+static void fd_node_shutdown_locked(fd_node* fdn, const char* reason) {
+ if (!fdn->already_shutdown) {
+ fdn->already_shutdown = true;
+ fdn->grpc_polled_fd->ShutdownLocked(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(reason));
+ }
+}
+
+void grpc_ares_ev_driver_on_queries_complete_locked(
+ grpc_ares_ev_driver* ev_driver) {
+ // We mark the event driver as being shut down.
+ // grpc_ares_notify_on_event_locked will shut down any remaining
+ // fds.
+ ev_driver->shutting_down = true;
+ grpc_timer_cancel(&ev_driver->query_timeout);
+ grpc_timer_cancel(&ev_driver->ares_backup_poll_alarm);
+ grpc_ares_ev_driver_unref(ev_driver);
+}
+
+void grpc_ares_ev_driver_shutdown_locked(grpc_ares_ev_driver* ev_driver) {
+ ev_driver->shutting_down = true;
+ fd_node* fn = ev_driver->fds;
+ while (fn != nullptr) {
+ fd_node_shutdown_locked(fn, "grpc_ares_ev_driver_shutdown");
+ fn = fn->next;
+ }
+}
+
+// Search fd in the fd_node list head. This is an O(n) search, the max possible
+// value of n is ARES_GETSOCK_MAXNUM (16). n is typically 1 - 2 in our tests.
+static fd_node* pop_fd_node_locked(fd_node** head, ares_socket_t as) {
+ fd_node phony_head;
+ phony_head.next = *head;
+ fd_node* node = &phony_head;
+ while (node->next != nullptr) {
+ if (node->next->grpc_polled_fd->GetWrappedAresSocketLocked() == as) {
+ fd_node* ret = node->next;
+ node->next = node->next->next;
+ *head = phony_head.next;
+ return ret;
+ }
+ node = node->next;
+ }
+ return nullptr;
+}
+
+static grpc_millis calculate_next_ares_backup_poll_alarm_ms(
+ grpc_ares_ev_driver* driver) {
+ // An alternative here could be to use ares_timeout to try to be more
+ // accurate, but that would require using "struct timeval"'s, which just makes
+ // things a bit more complicated. So just poll every second, as suggested
+ // by the c-ares code comments.
+ grpc_millis ms_until_next_ares_backup_poll_alarm = 1000;
+ GRPC_CARES_TRACE_LOG(
+ "request:%p ev_driver=%p. next ares process poll time in "
+ "%" PRId64 " ms",
+ driver->request, driver, ms_until_next_ares_backup_poll_alarm);
+ return ms_until_next_ares_backup_poll_alarm +
+ grpc_core::ExecCtx::Get()->Now();
+}
+
+static void on_timeout_locked(grpc_ares_ev_driver* driver, grpc_error* error) {
+ GRPC_CARES_TRACE_LOG(
+ "request:%p ev_driver=%p on_timeout_locked. driver->shutting_down=%d. "
+ "err=%s",
+ driver->request, driver, driver->shutting_down, grpc_error_string(error));
+ if (!driver->shutting_down && error == GRPC_ERROR_NONE) {
+ grpc_ares_ev_driver_shutdown_locked(driver);
+ }
+ grpc_ares_ev_driver_unref(driver);
+ GRPC_ERROR_UNREF(error);
+}
+
+static void on_timeout(void* arg, grpc_error* error) {
+ grpc_ares_ev_driver* driver = static_cast<grpc_ares_ev_driver*>(arg);
+ GRPC_ERROR_REF(error); // ref owned by lambda
+ driver->work_serializer->Run(
+ [driver, error]() { on_timeout_locked(driver, error); }, DEBUG_LOCATION);
+}
+
+static void grpc_ares_notify_on_event_locked(grpc_ares_ev_driver* ev_driver);
+
+static void on_ares_backup_poll_alarm_locked(grpc_ares_ev_driver* driver,
+ grpc_error* error);
+
+static void on_ares_backup_poll_alarm(void* arg, grpc_error* error) {
+ grpc_ares_ev_driver* driver = static_cast<grpc_ares_ev_driver*>(arg);
+ GRPC_ERROR_REF(error);
+ driver->work_serializer->Run(
+ [driver, error]() { on_ares_backup_poll_alarm_locked(driver, error); },
+ DEBUG_LOCATION);
+}
+
+/* In case of non-responsive DNS servers, dropped packets, etc., c-ares has
+ * intelligent timeout and retry logic, which we can take advantage of by
+ * polling ares_process_fd on time intervals. Overall, the c-ares library is
+ * meant to be called into and given a chance to proceed name resolution:
+ * a) when fd events happen
+ * b) when some time has passed without fd events having happened
+ * For the latter, we use this backup poller. Also see
+ * https://github.com/grpc/grpc/pull/17688 description for more details. */
+static void on_ares_backup_poll_alarm_locked(grpc_ares_ev_driver* driver,
+ grpc_error* error) {
+ GRPC_CARES_TRACE_LOG(
+ "request:%p ev_driver=%p on_ares_backup_poll_alarm_locked. "
+ "driver->shutting_down=%d. "
+ "err=%s",
+ driver->request, driver, driver->shutting_down, grpc_error_string(error));
+ if (!driver->shutting_down && error == GRPC_ERROR_NONE) {
+ fd_node* fdn = driver->fds;
+ while (fdn != nullptr) {
+ if (!fdn->already_shutdown) {
+ GRPC_CARES_TRACE_LOG(
+ "request:%p ev_driver=%p on_ares_backup_poll_alarm_locked; "
+ "ares_process_fd. fd=%s",
+ driver->request, driver, fdn->grpc_polled_fd->GetName());
+ ares_socket_t as = fdn->grpc_polled_fd->GetWrappedAresSocketLocked();
+ ares_process_fd(driver->channel, as, as);
+ }
+ fdn = fdn->next;
+ }
+ if (!driver->shutting_down) {
+ grpc_millis next_ares_backup_poll_alarm =
+ calculate_next_ares_backup_poll_alarm_ms(driver);
+ grpc_ares_ev_driver_ref(driver);
+ GRPC_CLOSURE_INIT(&driver->on_ares_backup_poll_alarm_locked,
+ on_ares_backup_poll_alarm, driver,
+ grpc_schedule_on_exec_ctx);
+ grpc_timer_init(&driver->ares_backup_poll_alarm,
+ next_ares_backup_poll_alarm,
+ &driver->on_ares_backup_poll_alarm_locked);
+ }
+ grpc_ares_notify_on_event_locked(driver);
+ }
+ grpc_ares_ev_driver_unref(driver);
+ GRPC_ERROR_UNREF(error);
+}
+
+static void on_readable_locked(fd_node* fdn, grpc_error* error) {
+ GPR_ASSERT(fdn->readable_registered);
+ grpc_ares_ev_driver* ev_driver = fdn->ev_driver;
+ const ares_socket_t as = fdn->grpc_polled_fd->GetWrappedAresSocketLocked();
+ fdn->readable_registered = false;
+ GRPC_CARES_TRACE_LOG("request:%p readable on %s", fdn->ev_driver->request,
+ fdn->grpc_polled_fd->GetName());
+ if (error == GRPC_ERROR_NONE) {
+ do {
+ ares_process_fd(ev_driver->channel, as, ARES_SOCKET_BAD);
+ } while (fdn->grpc_polled_fd->IsFdStillReadableLocked());
+ } else {
+ // If error is not GRPC_ERROR_NONE, it means the fd has been shutdown or
+ // timed out. The pending lookups made on this ev_driver will be cancelled
+ // by the following ares_cancel() and the on_done callbacks will be invoked
+ // with a status of ARES_ECANCELLED. The remaining file descriptors in this
+ // ev_driver will be cleaned up in the follwing
+ // grpc_ares_notify_on_event_locked().
+ ares_cancel(ev_driver->channel);
+ }
+ grpc_ares_notify_on_event_locked(ev_driver);
+ grpc_ares_ev_driver_unref(ev_driver);
+ GRPC_ERROR_UNREF(error);
+}
+
+static void on_readable(void* arg, grpc_error* error) {
+ fd_node* fdn = static_cast<fd_node*>(arg);
+ GRPC_ERROR_REF(error); /* ref owned by lambda */
+ fdn->ev_driver->work_serializer->Run(
+ [fdn, error]() { on_readable_locked(fdn, error); }, DEBUG_LOCATION);
+}
+
+static void on_writable_locked(fd_node* fdn, grpc_error* error) {
+ GPR_ASSERT(fdn->writable_registered);
+ grpc_ares_ev_driver* ev_driver = fdn->ev_driver;
+ const ares_socket_t as = fdn->grpc_polled_fd->GetWrappedAresSocketLocked();
+ fdn->writable_registered = false;
+ GRPC_CARES_TRACE_LOG("request:%p writable on %s", ev_driver->request,
+ fdn->grpc_polled_fd->GetName());
+ if (error == GRPC_ERROR_NONE) {
+ ares_process_fd(ev_driver->channel, ARES_SOCKET_BAD, as);
+ } else {
+ // If error is not GRPC_ERROR_NONE, it means the fd has been shutdown or
+ // timed out. The pending lookups made on this ev_driver will be cancelled
+ // by the following ares_cancel() and the on_done callbacks will be invoked
+ // with a status of ARES_ECANCELLED. The remaining file descriptors in this
+ // ev_driver will be cleaned up in the follwing
+ // grpc_ares_notify_on_event_locked().
+ ares_cancel(ev_driver->channel);
+ }
+ grpc_ares_notify_on_event_locked(ev_driver);
+ grpc_ares_ev_driver_unref(ev_driver);
+ GRPC_ERROR_UNREF(error);
+}
+
+static void on_writable(void* arg, grpc_error* error) {
+ fd_node* fdn = static_cast<fd_node*>(arg);
+ GRPC_ERROR_REF(error); /* ref owned by lambda */
+ fdn->ev_driver->work_serializer->Run(
+ [fdn, error]() { on_writable_locked(fdn, error); }, DEBUG_LOCATION);
+}
+
+// Get the file descriptors used by the ev_driver's ares channel, register
+// driver_closure with these filedescriptors.
+static void grpc_ares_notify_on_event_locked(grpc_ares_ev_driver* ev_driver) {
+ fd_node* new_list = nullptr;
+ if (!ev_driver->shutting_down) {
+ ares_socket_t socks[ARES_GETSOCK_MAXNUM];
+ int socks_bitmask =
+ ares_getsock(ev_driver->channel, socks, ARES_GETSOCK_MAXNUM);
+ for (size_t i = 0; i < ARES_GETSOCK_MAXNUM; i++) {
+ if (ARES_GETSOCK_READABLE(socks_bitmask, i) ||
+ ARES_GETSOCK_WRITABLE(socks_bitmask, i)) {
+ fd_node* fdn = pop_fd_node_locked(&ev_driver->fds, socks[i]);
+ // Create a new fd_node if sock[i] is not in the fd_node list.
+ if (fdn == nullptr) {
+ fdn = static_cast<fd_node*>(gpr_malloc(sizeof(fd_node)));
+ fdn->grpc_polled_fd =
+ ev_driver->polled_fd_factory->NewGrpcPolledFdLocked(
+ socks[i], ev_driver->pollset_set, ev_driver->work_serializer);
+ GRPC_CARES_TRACE_LOG("request:%p new fd: %s", ev_driver->request,
+ fdn->grpc_polled_fd->GetName());
+ fdn->ev_driver = ev_driver;
+ fdn->readable_registered = false;
+ fdn->writable_registered = false;
+ fdn->already_shutdown = false;
+ }
+ fdn->next = new_list;
+ new_list = fdn;
+ // Register read_closure if the socket is readable and read_closure has
+ // not been registered with this socket.
+ if (ARES_GETSOCK_READABLE(socks_bitmask, i) &&
+ !fdn->readable_registered) {
+ grpc_ares_ev_driver_ref(ev_driver);
+ GRPC_CARES_TRACE_LOG("request:%p notify read on: %s",
+ ev_driver->request,
+ fdn->grpc_polled_fd->GetName());
+ GRPC_CLOSURE_INIT(&fdn->read_closure, on_readable, fdn,
+ grpc_schedule_on_exec_ctx);
+ fdn->grpc_polled_fd->RegisterForOnReadableLocked(&fdn->read_closure);
+ fdn->readable_registered = true;
+ }
+ // Register write_closure if the socket is writable and write_closure
+ // has not been registered with this socket.
+ if (ARES_GETSOCK_WRITABLE(socks_bitmask, i) &&
+ !fdn->writable_registered) {
+ GRPC_CARES_TRACE_LOG("request:%p notify write on: %s",
+ ev_driver->request,
+ fdn->grpc_polled_fd->GetName());
+ grpc_ares_ev_driver_ref(ev_driver);
+ GRPC_CLOSURE_INIT(&fdn->write_closure, on_writable, fdn,
+ grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(&fdn->write_closure, on_writable, fdn,
+ grpc_schedule_on_exec_ctx);
+ fdn->grpc_polled_fd->RegisterForOnWriteableLocked(
+ &fdn->write_closure);
+ fdn->writable_registered = true;
+ }
+ }
+ }
+ }
+ // Any remaining fds in ev_driver->fds were not returned by ares_getsock() and
+ // are therefore no longer in use, so they can be shut down and removed from
+ // the list.
+ while (ev_driver->fds != nullptr) {
+ fd_node* cur = ev_driver->fds;
+ ev_driver->fds = ev_driver->fds->next;
+ fd_node_shutdown_locked(cur, "c-ares fd shutdown");
+ if (!cur->readable_registered && !cur->writable_registered) {
+ fd_node_destroy_locked(cur);
+ } else {
+ cur->next = new_list;
+ new_list = cur;
+ }
+ }
+ ev_driver->fds = new_list;
+}
+
+void grpc_ares_ev_driver_start_locked(grpc_ares_ev_driver* ev_driver) {
+ grpc_ares_notify_on_event_locked(ev_driver);
+ // Initialize overall DNS resolution timeout alarm
+ grpc_millis timeout =
+ ev_driver->query_timeout_ms == 0
+ ? GRPC_MILLIS_INF_FUTURE
+ : ev_driver->query_timeout_ms + grpc_core::ExecCtx::Get()->Now();
+ GRPC_CARES_TRACE_LOG(
+ "request:%p ev_driver=%p grpc_ares_ev_driver_start_locked. timeout in "
+ "%" PRId64 " ms",
+ ev_driver->request, ev_driver, timeout);
+ grpc_ares_ev_driver_ref(ev_driver);
+ GRPC_CLOSURE_INIT(&ev_driver->on_timeout_locked, on_timeout, ev_driver,
+ grpc_schedule_on_exec_ctx);
+ grpc_timer_init(&ev_driver->query_timeout, timeout,
+ &ev_driver->on_timeout_locked);
+ // Initialize the backup poll alarm
+ grpc_millis next_ares_backup_poll_alarm =
+ calculate_next_ares_backup_poll_alarm_ms(ev_driver);
+ grpc_ares_ev_driver_ref(ev_driver);
+ GRPC_CLOSURE_INIT(&ev_driver->on_ares_backup_poll_alarm_locked,
+ on_ares_backup_poll_alarm, ev_driver,
+ grpc_schedule_on_exec_ctx);
+ grpc_timer_init(&ev_driver->ares_backup_poll_alarm,
+ next_ares_backup_poll_alarm,
+ &ev_driver->on_ares_backup_poll_alarm_locked);
+}
+
+static void noop_inject_channel_config(ares_channel /*channel*/) {}
+
+void (*grpc_ares_test_only_inject_config)(ares_channel channel) =
+ noop_inject_channel_config;
+
+grpc_error* grpc_ares_ev_driver_create_locked(
+ grpc_ares_ev_driver** ev_driver, grpc_pollset_set* pollset_set,
+ int query_timeout_ms,
+ std::shared_ptr<grpc_core::WorkSerializer> work_serializer,
+ grpc_ares_request* request) {
+ *ev_driver = new grpc_ares_ev_driver();
+ ares_options opts;
+ memset(&opts, 0, sizeof(opts));
+ opts.flags |= ARES_FLAG_STAYOPEN;
+ int status = ares_init_options(&(*ev_driver)->channel, &opts, ARES_OPT_FLAGS);
+ grpc_ares_test_only_inject_config((*ev_driver)->channel);
+ GRPC_CARES_TRACE_LOG("request:%p grpc_ares_ev_driver_create_locked", request);
+ if (status != ARES_SUCCESS) {
+ grpc_error* err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Failed to init ares channel. C-ares error: ",
+ ares_strerror(status))
+ .c_str());
+ gpr_free(*ev_driver);
+ return err;
+ }
+ (*ev_driver)->work_serializer = std::move(work_serializer);
+ gpr_ref_init(&(*ev_driver)->refs, 1);
+ (*ev_driver)->pollset_set = pollset_set;
+ (*ev_driver)->fds = nullptr;
+ (*ev_driver)->shutting_down = false;
+ (*ev_driver)->request = request;
+ (*ev_driver)->polled_fd_factory =
+ grpc_core::NewGrpcPolledFdFactory((*ev_driver)->work_serializer);
+ (*ev_driver)
+ ->polled_fd_factory->ConfigureAresChannelLocked((*ev_driver)->channel);
+ (*ev_driver)->query_timeout_ms = query_timeout_ms;
+ return GRPC_ERROR_NONE;
+}
+
static void log_address_sorting_list(const grpc_ares_request* r,
const ServerAddressList& addresses,
const char* input_output_str) {
@@ -139,8 +568,8 @@ void grpc_cares_wrapper_address_sorting_sort(const grpc_ares_request* r,
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_cares_address_sorting)) {
log_address_sorting_list(r, *addresses, "input");
}
- address_sorting_sortable* sortables = (address_sorting_sortable*)gpr_zalloc(
- sizeof(address_sorting_sortable) * addresses->size());
+ address_sorting_sortable* sortables = static_cast<address_sorting_sortable*>(
+ gpr_zalloc(sizeof(address_sorting_sortable) * addresses->size()));
for (size_t i = 0; i < addresses->size(); ++i) {
sortables[i].user_data = &(*addresses)[i];
memcpy(&sortables[i].dest_addr.addr, &(*addresses)[i].address().addr,
@@ -303,22 +732,20 @@ static void on_srv_query_done_locked(void* arg, int status, int /*timeouts*/,
GRPC_CARES_TRACE_LOG("request:%p ares_parse_srv_reply: %d", r,
parse_status);
if (parse_status == ARES_SUCCESS) {
- ares_channel* channel =
- grpc_ares_ev_driver_get_channel_locked(r->ev_driver);
for (struct ares_srv_reply* srv_it = reply; srv_it != nullptr;
srv_it = srv_it->next) {
if (grpc_ares_query_ipv6()) {
grpc_ares_hostbyname_request* hr = create_hostbyname_request_locked(
r, srv_it->host, htons(srv_it->port), true /* is_balancer */,
"AAAA");
- ares_gethostbyname(*channel, hr->host, AF_INET6,
+ ares_gethostbyname(r->ev_driver->channel, hr->host, AF_INET6,
on_hostbyname_done_locked, hr);
}
grpc_ares_hostbyname_request* hr = create_hostbyname_request_locked(
r, srv_it->host, htons(srv_it->port), true /* is_balancer */, "A");
- ares_gethostbyname(*channel, hr->host, AF_INET,
+ ares_gethostbyname(r->ev_driver->channel, hr->host, AF_INET,
on_hostbyname_done_locked, hr);
- grpc_ares_ev_driver_start_locked(r->ev_driver);
+ grpc_ares_notify_on_event_locked(r->ev_driver);
}
}
if (reply != nullptr) {
@@ -400,7 +827,6 @@ void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(
std::shared_ptr<grpc_core::WorkSerializer> work_serializer) {
grpc_error* error = GRPC_ERROR_NONE;
grpc_ares_hostbyname_request* hr = nullptr;
- ares_channel* channel = nullptr;
/* parse name, splitting it into host and port parts */
TString host;
TString port;
@@ -423,9 +849,8 @@ void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(
query_timeout_ms,
std::move(work_serializer), r);
if (error != GRPC_ERROR_NONE) goto error_cleanup;
- channel = grpc_ares_ev_driver_get_channel_locked(r->ev_driver);
// If dns_server is specified, use it.
- if (dns_server != nullptr) {
+ if (dns_server != nullptr && dns_server[0] != '\0') {
GRPC_CARES_TRACE_LOG("request:%p Using DNS server %s", r, dns_server);
grpc_resolved_address addr;
if (grpc_parse_ipv4_hostport(dns_server, &addr, false /* log_errors */)) {
@@ -450,7 +875,8 @@ void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(
GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name));
goto error_cleanup;
}
- int status = ares_set_servers_ports(*channel, &r->dns_server_addr);
+ int status =
+ ares_set_servers_ports(r->ev_driver->channel, &r->dns_server_addr);
if (status != ARES_SUCCESS) {
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("C-ares status is not ARES_SUCCESS: ",
@@ -464,25 +890,25 @@ void grpc_dns_lookup_ares_continue_after_check_localhost_and_ip_literals_locked(
hr = create_hostbyname_request_locked(r, host.c_str(),
grpc_strhtons(port.c_str()),
/*is_balancer=*/false, "AAAA");
- ares_gethostbyname(*channel, hr->host, AF_INET6, on_hostbyname_done_locked,
- hr);
+ ares_gethostbyname(r->ev_driver->channel, hr->host, AF_INET6,
+ on_hostbyname_done_locked, hr);
}
hr = create_hostbyname_request_locked(r, host.c_str(),
grpc_strhtons(port.c_str()),
/*is_balancer=*/false, "A");
- ares_gethostbyname(*channel, hr->host, AF_INET, on_hostbyname_done_locked,
- hr);
+ ares_gethostbyname(r->ev_driver->channel, hr->host, AF_INET,
+ on_hostbyname_done_locked, hr);
if (r->balancer_addresses_out != nullptr) {
/* Query the SRV record */
TString service_name = y_absl::StrCat("_grpclb._tcp.", host);
GrpcAresQuery* srv_query = new GrpcAresQuery(r, service_name);
- ares_query(*channel, service_name.c_str(), ns_c_in, ns_t_srv,
+ ares_query(r->ev_driver->channel, service_name.c_str(), ns_c_in, ns_t_srv,
on_srv_query_done_locked, srv_query);
}
if (r->service_config_json_out != nullptr) {
TString config_name = y_absl::StrCat("_grpc_config.", host);
GrpcAresQuery* txt_query = new GrpcAresQuery(r, config_name);
- ares_search(*channel, config_name.c_str(), ns_c_in, ns_t_txt,
+ ares_search(r->ev_driver->channel, config_name.c_str(), ns_c_in, ns_t_txt,
on_txt_done_locked, txt_query);
}
grpc_ares_ev_driver_start_locked(r->ev_driver);
@@ -545,11 +971,7 @@ static bool target_matches_localhost_inner(const char* name, TString* host,
gpr_log(GPR_ERROR, "Unable to split host and port for name: %s", name);
return false;
}
- if (gpr_stricmp(host->c_str(), "localhost") == 0) {
- return true;
- } else {
- return false;
- }
+ return gpr_stricmp(host->c_str(), "localhost") == 0;
}
static bool target_matches_localhost(const char* name) {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
index ddce754934f..6c29bb68a47 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h
@@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
+#include <ares.h>
+
#include "src/core/ext/filters/client_channel/server_address.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/polling_entity.h"
@@ -93,5 +95,8 @@ bool grpc_ares_query_ipv6();
void grpc_cares_wrapper_address_sorting_sort(
const grpc_ares_request* request, grpc_core::ServerAddressList* addresses);
+/* Exposed in this header for C-core tests only */
+extern void (*grpc_ares_test_only_inject_config)(ares_channel channel);
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVER_DNS_C_ARES_GRPC_ARES_WRAPPER_H \
*/
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
deleted file mode 100644
index 2049f371184..00000000000
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- *
- * Copyright 2016-2017 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <grpc/support/port_platform.h>
-
-#if GRPC_ARES != 1
-
-#include "src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h"
-
-struct grpc_ares_request {
- char val;
-};
-
-static grpc_ares_request* grpc_dns_lookup_ares_locked_impl(
- const char* dns_server, const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- std::unique_ptr<grpc_core::ServerAddressList>* addrs,
- std::unique_ptr<grpc_core::ServerAddressList>* balancer_addrs,
- char** service_config_json, int query_timeout_ms,
- std::shared_ptr<grpc_core::WorkSerializer> work_serializer) {
- return NULL;
-}
-
-grpc_ares_request* (*grpc_dns_lookup_ares_locked)(
- const char* dns_server, const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- std::unique_ptr<grpc_core::ServerAddressList>* addrs,
- std::unique_ptr<grpc_core::ServerAddressList>* balancer_addrs,
- char** service_config_json, int query_timeout_ms,
- std::shared_ptr<grpc_core::WorkSerializer> work_serializer) =
- grpc_dns_lookup_ares_locked_impl;
-
-static void grpc_cancel_ares_request_locked_impl(grpc_ares_request* r) {}
-
-void (*grpc_cancel_ares_request_locked)(grpc_ares_request* r) =
- grpc_cancel_ares_request_locked_impl;
-
-grpc_error* grpc_ares_init(void) { return GRPC_ERROR_NONE; }
-
-void grpc_ares_cleanup(void) {}
-
-static void grpc_resolve_address_ares_impl(const char* name,
- const char* default_port,
- grpc_pollset_set* interested_parties,
- grpc_closure* on_done,
- grpc_resolved_addresses** addrs) {}
-
-void (*grpc_resolve_address_ares)(
- const char* name, const char* default_port,
- grpc_pollset_set* interested_parties, grpc_closure* on_done,
- grpc_resolved_addresses** addrs) = grpc_resolve_address_ares_impl;
-
-#endif /* GRPC_ARES != 1 */
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
index a0e35661908..516a1eb1722 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc
@@ -63,7 +63,7 @@ class NativeDnsResolver : public Resolver {
void ShutdownLocked() override;
private:
- virtual ~NativeDnsResolver();
+ ~NativeDnsResolver() override;
void MaybeStartResolvingLocked();
void StartResolvingLocked();
@@ -74,9 +74,11 @@ class NativeDnsResolver : public Resolver {
void OnResolvedLocked(grpc_error* error);
/// name to resolve
- char* name_to_resolve_ = nullptr;
+ TString name_to_resolve_;
/// channel args
grpc_channel_args* channel_args_ = nullptr;
+ std::shared_ptr<WorkSerializer> work_serializer_;
+ std::unique_ptr<ResultHandler> result_handler_;
/// pollset_set to drive the name resolution process
grpc_pollset_set* interested_parties_ = nullptr;
/// are we shutting down?
@@ -99,7 +101,14 @@ class NativeDnsResolver : public Resolver {
};
NativeDnsResolver::NativeDnsResolver(ResolverArgs args)
- : Resolver(std::move(args.work_serializer), std::move(args.result_handler)),
+ : name_to_resolve_(y_absl::StripPrefix(args.uri.path(), "/")),
+ channel_args_(grpc_channel_args_copy(args.args)),
+ work_serializer_(std::move(args.work_serializer)),
+ result_handler_(std::move(args.result_handler)),
+ interested_parties_(grpc_pollset_set_create()),
+ min_time_between_resolutions_(grpc_channel_args_find_integer(
+ channel_args_, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS,
+ {1000 * 30, 0, INT_MAX})),
backoff_(
BackOff::Options()
.set_initial_backoff(GRPC_DNS_INITIAL_CONNECT_BACKOFF_SECONDS *
@@ -107,15 +116,6 @@ NativeDnsResolver::NativeDnsResolver(ResolverArgs args)
.set_multiplier(GRPC_DNS_RECONNECT_BACKOFF_MULTIPLIER)
.set_jitter(GRPC_DNS_RECONNECT_JITTER)
.set_max_backoff(GRPC_DNS_RECONNECT_MAX_BACKOFF_SECONDS * 1000)) {
- char* path = args.uri->path;
- if (path[0] == '/') ++path;
- name_to_resolve_ = gpr_strdup(path);
- channel_args_ = grpc_channel_args_copy(args.args);
- const grpc_arg* arg = grpc_channel_args_find(
- args.args, GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS);
- min_time_between_resolutions_ =
- grpc_channel_arg_get_integer(arg, {1000 * 30, 0, INT_MAX});
- interested_parties_ = grpc_pollset_set_create();
if (args.pollset_set != nullptr) {
grpc_pollset_set_add_pollset_set(interested_parties_, args.pollset_set);
}
@@ -124,7 +124,6 @@ NativeDnsResolver::NativeDnsResolver(ResolverArgs args)
NativeDnsResolver::~NativeDnsResolver() {
grpc_channel_args_destroy(channel_args_);
grpc_pollset_set_destroy(interested_parties_);
- gpr_free(name_to_resolve_);
}
void NativeDnsResolver::StartLocked() { MaybeStartResolvingLocked(); }
@@ -152,8 +151,8 @@ void NativeDnsResolver::ShutdownLocked() {
void NativeDnsResolver::OnNextResolution(void* arg, grpc_error* error) {
NativeDnsResolver* r = static_cast<NativeDnsResolver*>(arg);
GRPC_ERROR_REF(error); // ref owned by lambda
- r->work_serializer()->Run([r, error]() { r->OnNextResolutionLocked(error); },
- DEBUG_LOCATION);
+ r->work_serializer_->Run([r, error]() { r->OnNextResolutionLocked(error); },
+ DEBUG_LOCATION);
}
void NativeDnsResolver::OnNextResolutionLocked(grpc_error* error) {
@@ -168,8 +167,8 @@ void NativeDnsResolver::OnNextResolutionLocked(grpc_error* error) {
void NativeDnsResolver::OnResolved(void* arg, grpc_error* error) {
NativeDnsResolver* r = static_cast<NativeDnsResolver*>(arg);
GRPC_ERROR_REF(error); // owned by lambda
- r->work_serializer()->Run([r, error]() { r->OnResolvedLocked(error); },
- DEBUG_LOCATION);
+ r->work_serializer_->Run([r, error]() { r->OnResolvedLocked(error); },
+ DEBUG_LOCATION);
}
void NativeDnsResolver::OnResolvedLocked(grpc_error* error) {
@@ -192,7 +191,7 @@ void NativeDnsResolver::OnResolvedLocked(grpc_error* error) {
}
grpc_resolved_addresses_destroy(addresses_);
result.args = grpc_channel_args_copy(channel_args_);
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
// Reset backoff state so that we start from the beginning when the
// next request gets triggered.
backoff_.Reset();
@@ -202,7 +201,7 @@ void NativeDnsResolver::OnResolvedLocked(grpc_error* error) {
// Return transient error.
TString error_message =
y_absl::StrCat("DNS resolution failed for service: ", name_to_resolve_);
- result_handler()->ReturnError(grpc_error_set_int(
+ result_handler_->ReturnError(grpc_error_set_int(
GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(error_message.c_str(),
&error, 1),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
@@ -272,8 +271,8 @@ void NativeDnsResolver::StartResolvingLocked() {
addresses_ = nullptr;
GRPC_CLOSURE_INIT(&on_resolved_, NativeDnsResolver::OnResolved, this,
grpc_schedule_on_exec_ctx);
- grpc_resolve_address(name_to_resolve_, kDefaultPort, interested_parties_,
- &on_resolved_, &addresses_);
+ grpc_resolve_address(name_to_resolve_.c_str(), kDefaultPort,
+ interested_parties_, &on_resolved_, &addresses_);
last_resolution_timestamp_ = grpc_core::ExecCtx::Get()->Now();
}
@@ -283,8 +282,8 @@ void NativeDnsResolver::StartResolvingLocked() {
class NativeDnsResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override {
- if (GPR_UNLIKELY(0 != strcmp(uri->authority, ""))) {
+ bool IsValidUri(const URI& uri) const override {
+ if (GPR_UNLIKELY(!uri.authority().empty())) {
gpr_log(GPR_ERROR, "authority based dns uri's not supported");
return false;
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
index 792146ed049..99f3c24dd27 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc
@@ -59,7 +59,7 @@ class FakeResolver : public Resolver {
friend class FakeResolverResponseGenerator;
friend class FakeResolverResponseSetter;
- virtual ~FakeResolver();
+ ~FakeResolver() override;
void ShutdownLocked() override;
@@ -69,6 +69,8 @@ class FakeResolver : public Resolver {
// passed-in parameters
grpc_channel_args* channel_args_ = nullptr;
+ std::shared_ptr<WorkSerializer> work_serializer_;
+ std::unique_ptr<ResultHandler> result_handler_;
RefCountedPtr<FakeResolverResponseGenerator> response_generator_;
// If has_next_result_ is true, next_result_ is the next resolution result
// to be returned.
@@ -89,7 +91,8 @@ class FakeResolver : public Resolver {
};
FakeResolver::FakeResolver(ResolverArgs args)
- : Resolver(std::move(args.work_serializer), std::move(args.result_handler)),
+ : work_serializer_(std::move(args.work_serializer)),
+ result_handler_(std::move(args.result_handler)),
response_generator_(
FakeResolverResponseGenerator::GetFromArgs(args.args)) {
// Channels sharing the same subchannels may have different resolver response
@@ -121,8 +124,8 @@ void FakeResolver::RequestReresolutionLocked() {
if (!reresolution_closure_pending_) {
reresolution_closure_pending_ = true;
Ref().release(); // ref held by closure
- work_serializer()->Run([this]() { ReturnReresolutionResult(); },
- DEBUG_LOCATION);
+ work_serializer_->Run([this]() { ReturnReresolutionResult(); },
+ DEBUG_LOCATION);
}
}
}
@@ -140,7 +143,7 @@ void FakeResolver::MaybeSendResultLocked() {
if (return_failure_) {
// TODO(roth): Change resolver result generator to be able to inject
// the error to be returned.
- result_handler()->ReturnError(grpc_error_set_int(
+ result_handler_->ReturnError(grpc_error_set_int(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resolver transient failure"),
GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE));
return_failure_ = false;
@@ -155,7 +158,7 @@ void FakeResolver::MaybeSendResultLocked() {
// name, only the one in next_results_ will be kept since next_results_ is
// before channel_args_.
result.args = grpc_channel_args_union(next_result_.args, channel_args_);
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
has_next_result_ = false;
}
}
@@ -236,8 +239,8 @@ void FakeResolverResponseGenerator::SetResponse(Resolver::Result result) {
}
FakeResolverResponseSetter* arg =
new FakeResolverResponseSetter(resolver, std::move(result));
- resolver->work_serializer()->Run([arg]() { arg->SetResponseLocked(); },
- DEBUG_LOCATION);
+ resolver->work_serializer_->Run([arg]() { arg->SetResponseLocked(); },
+ DEBUG_LOCATION);
}
void FakeResolverResponseGenerator::SetReresolutionResponse(
@@ -250,7 +253,7 @@ void FakeResolverResponseGenerator::SetReresolutionResponse(
}
FakeResolverResponseSetter* arg = new FakeResolverResponseSetter(
resolver, std::move(result), true /* has_result */);
- resolver->work_serializer()->Run(
+ resolver->work_serializer_->Run(
[arg]() { arg->SetReresolutionResponseLocked(); }, DEBUG_LOCATION);
}
@@ -263,7 +266,7 @@ void FakeResolverResponseGenerator::UnsetReresolutionResponse() {
}
FakeResolverResponseSetter* arg =
new FakeResolverResponseSetter(resolver, Resolver::Result());
- resolver->work_serializer()->Run(
+ resolver->work_serializer_->Run(
[arg]() { arg->SetReresolutionResponseLocked(); }, DEBUG_LOCATION);
}
@@ -276,8 +279,8 @@ void FakeResolverResponseGenerator::SetFailure() {
}
FakeResolverResponseSetter* arg =
new FakeResolverResponseSetter(resolver, Resolver::Result());
- resolver->work_serializer()->Run([arg]() { arg->SetFailureLocked(); },
- DEBUG_LOCATION);
+ resolver->work_serializer_->Run([arg]() { arg->SetFailureLocked(); },
+ DEBUG_LOCATION);
}
void FakeResolverResponseGenerator::SetFailureOnReresolution() {
@@ -290,8 +293,8 @@ void FakeResolverResponseGenerator::SetFailureOnReresolution() {
FakeResolverResponseSetter* arg = new FakeResolverResponseSetter(
resolver, Resolver::Result(), false /* has_result */,
false /* immediate */);
- resolver->work_serializer()->Run([arg]() { arg->SetFailureLocked(); },
- DEBUG_LOCATION);
+ resolver->work_serializer_->Run([arg]() { arg->SetFailureLocked(); },
+ DEBUG_LOCATION);
}
void FakeResolverResponseGenerator::SetFakeResolver(
@@ -302,8 +305,8 @@ void FakeResolverResponseGenerator::SetFakeResolver(
if (has_result_) {
FakeResolverResponseSetter* arg =
new FakeResolverResponseSetter(resolver_, std::move(result_));
- resolver_->work_serializer()->Run([arg]() { arg->SetResponseLocked(); },
- DEBUG_LOCATION);
+ resolver_->work_serializer_->Run([arg]() { arg->SetResponseLocked(); },
+ DEBUG_LOCATION);
has_result_ = false;
}
}
@@ -339,7 +342,7 @@ grpc_arg FakeResolverResponseGenerator::MakeChannelArg(
FakeResolverResponseGenerator* generator) {
grpc_arg arg;
arg.type = GRPC_ARG_POINTER;
- arg.key = (char*)GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR;
+ arg.key = const_cast<char*>(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR);
arg.value.pointer.p = generator;
arg.value.pointer.vtable = &response_generator_arg_vtable;
return arg;
@@ -362,7 +365,7 @@ namespace {
class FakeResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* /*uri*/) const override { return true; }
+ bool IsValidUri(const URI& /*uri*/) const override { return true; }
OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
return MakeOrphanable<FakeResolver>(std::move(args));
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
index b9fd90c069f..b9ca69df1e0 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h
@@ -43,7 +43,7 @@ class FakeResolverResponseGenerator
: public RefCounted<FakeResolverResponseGenerator> {
public:
FakeResolverResponseGenerator();
- ~FakeResolverResponseGenerator();
+ ~FakeResolverResponseGenerator() override;
// Instructs the fake resolver associated with the response generator
// instance to trigger a new resolution with the specified result. If the
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
new file mode 100644
index 00000000000..596619df934
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc
@@ -0,0 +1,377 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/filters/client_channel/resolver_registry.h"
+#include "src/core/ext/xds/xds_client.h"
+#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/http/httpcli.h"
+#include "src/core/lib/iomgr/polling_entity.h"
+#include "src/core/lib/security/credentials/alts/check_gcp_environment.h"
+
+namespace grpc_core {
+
+namespace {
+
+class GoogleCloud2ProdResolver : public Resolver {
+ public:
+ explicit GoogleCloud2ProdResolver(ResolverArgs args);
+
+ void StartLocked() override;
+ void RequestReresolutionLocked() override;
+ void ResetBackoffLocked() override;
+ void ShutdownLocked() override;
+
+ private:
+ // Represents an HTTP request to the metadata server.
+ class MetadataQuery : public InternallyRefCounted<MetadataQuery> {
+ public:
+ MetadataQuery(RefCountedPtr<GoogleCloud2ProdResolver> resolver,
+ const char* path, grpc_polling_entity* pollent);
+ ~MetadataQuery() override;
+
+ void Orphan() override;
+
+ private:
+ static void OnHttpRequestDone(void* arg, grpc_error* error);
+
+ // Calls OnDone() if not already called. Releases a ref.
+ void MaybeCallOnDone(grpc_error* error);
+
+ // If error is not GRPC_ERROR_NONE, then it's not safe to look at response.
+ virtual void OnDone(GoogleCloud2ProdResolver* resolver,
+ const grpc_http_response* response,
+ grpc_error* error) = 0;
+
+ RefCountedPtr<GoogleCloud2ProdResolver> resolver_;
+ grpc_httpcli_context context_;
+ grpc_httpcli_response response_;
+ grpc_closure on_done_;
+ Atomic<bool> on_done_called_{false};
+ };
+
+ // A metadata server query to get the zone.
+ class ZoneQuery : public MetadataQuery {
+ public:
+ ZoneQuery(RefCountedPtr<GoogleCloud2ProdResolver> resolver,
+ grpc_polling_entity* pollent);
+
+ private:
+ void OnDone(GoogleCloud2ProdResolver* resolver,
+ const grpc_http_response* response, grpc_error* error) override;
+ };
+
+ // A metadata server query to get the IPv6 address.
+ class IPv6Query : public MetadataQuery {
+ public:
+ IPv6Query(RefCountedPtr<GoogleCloud2ProdResolver> resolver,
+ grpc_polling_entity* pollent);
+
+ private:
+ void OnDone(GoogleCloud2ProdResolver* resolver,
+ const grpc_http_response* response, grpc_error* error) override;
+ };
+
+ void ZoneQueryDone(TString zone);
+ void IPv6QueryDone(bool ipv6_supported);
+ void StartXdsResolver();
+
+ std::shared_ptr<WorkSerializer> work_serializer_;
+ grpc_polling_entity pollent_;
+ bool using_dns_ = false;
+ OrphanablePtr<Resolver> child_resolver_;
+
+ OrphanablePtr<ZoneQuery> zone_query_;
+ y_absl::optional<TString> zone_;
+
+ OrphanablePtr<IPv6Query> ipv6_query_;
+ y_absl::optional<bool> supports_ipv6_;
+};
+
+//
+// GoogleCloud2ProdResolver::MetadataQuery
+//
+
+GoogleCloud2ProdResolver::MetadataQuery::MetadataQuery(
+ RefCountedPtr<GoogleCloud2ProdResolver> resolver, const char* path,
+ grpc_polling_entity* pollent)
+ : resolver_(std::move(resolver)) {
+ grpc_httpcli_context_init(&context_);
+ // Start HTTP request.
+ GRPC_CLOSURE_INIT(&on_done_, OnHttpRequestDone, this, nullptr);
+ Ref().release(); // Ref held by callback.
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ grpc_http_header header = {const_cast<char*>("Metadata-Flavor"),
+ const_cast<char*>("Google")};
+ request.host = const_cast<char*>("metadata.google.internal");
+ request.http.path = const_cast<char*>(path);
+ request.http.hdr_count = 1;
+ request.http.hdrs = &header;
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("c2p_resolver");
+ grpc_httpcli_get(&context_, pollent, resource_quota, &request,
+ ExecCtx::Get()->Now() + 10000, // 10s timeout
+ &on_done_, &response_);
+ grpc_resource_quota_unref_internal(resource_quota);
+}
+
+GoogleCloud2ProdResolver::MetadataQuery::~MetadataQuery() {
+ grpc_httpcli_context_destroy(&context_);
+ grpc_http_response_destroy(&response_);
+}
+
+void GoogleCloud2ProdResolver::MetadataQuery::Orphan() {
+ // TODO(roth): Once the HTTP client library supports cancellation,
+ // use that here.
+ MaybeCallOnDone(GRPC_ERROR_CANCELLED);
+}
+
+void GoogleCloud2ProdResolver::MetadataQuery::OnHttpRequestDone(
+ void* arg, grpc_error* error) {
+ auto* self = static_cast<MetadataQuery*>(arg);
+ self->MaybeCallOnDone(GRPC_ERROR_REF(error));
+}
+
+void GoogleCloud2ProdResolver::MetadataQuery::MaybeCallOnDone(
+ grpc_error* error) {
+ bool expected = false;
+ if (!on_done_called_.CompareExchangeStrong(
+ &expected, true, MemoryOrder::RELAXED, MemoryOrder::RELAXED)) {
+ // We've already called OnDone(), so just clean up.
+ GRPC_ERROR_UNREF(error);
+ Unref();
+ return;
+ }
+ // Hop back into WorkSerializer to call OnDone().
+ // Note: We implicitly pass our ref to the callback here.
+ resolver_->work_serializer_->Run(
+ [this, error]() {
+ OnDone(resolver_.get(), &response_, error);
+ Unref();
+ },
+ DEBUG_LOCATION);
+}
+
+//
+// GoogleCloud2ProdResolver::ZoneQuery
+//
+
+GoogleCloud2ProdResolver::ZoneQuery::ZoneQuery(
+ RefCountedPtr<GoogleCloud2ProdResolver> resolver,
+ grpc_polling_entity* pollent)
+ : MetadataQuery(std::move(resolver), "/computeMetadata/v1/instance/zone",
+ pollent) {}
+
+void GoogleCloud2ProdResolver::ZoneQuery::OnDone(
+ GoogleCloud2ProdResolver* resolver, const grpc_http_response* response,
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "error fetching zone from metadata server: %s",
+ grpc_error_string(error));
+ }
+ TString zone;
+ if (error == GRPC_ERROR_NONE && response->status == 200) {
+ y_absl::string_view body(response->body, response->body_length);
+ size_t i = body.find_last_of('/');
+ if (i == body.npos) {
+ gpr_log(GPR_ERROR, "could not parse zone from metadata server: %s",
+ TString(body).c_str());
+ } else {
+ zone = TString(body.substr(i));
+ }
+ }
+ resolver->ZoneQueryDone(std::move(zone));
+ GRPC_ERROR_UNREF(error);
+}
+
+//
+// GoogleCloud2ProdResolver::IPv6Query
+//
+
+GoogleCloud2ProdResolver::IPv6Query::IPv6Query(
+ RefCountedPtr<GoogleCloud2ProdResolver> resolver,
+ grpc_polling_entity* pollent)
+ : MetadataQuery(std::move(resolver),
+ "/computeMetadata/v1/instance/network-interfaces/0/ipv6s",
+ pollent) {}
+
+void GoogleCloud2ProdResolver::IPv6Query::OnDone(
+ GoogleCloud2ProdResolver* resolver, const grpc_http_response* response,
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "error fetching IPv6 address from metadata server: %s",
+ grpc_error_string(error));
+ }
+ resolver->IPv6QueryDone(error == GRPC_ERROR_NONE && response->status == 200);
+ GRPC_ERROR_UNREF(error);
+}
+
+//
+// GoogleCloud2ProdResolver
+//
+
+GoogleCloud2ProdResolver::GoogleCloud2ProdResolver(ResolverArgs args)
+ : work_serializer_(std::move(args.work_serializer)),
+ pollent_(grpc_polling_entity_create_from_pollset_set(args.pollset_set)) {
+ y_absl::string_view name_to_resolve = y_absl::StripPrefix(args.uri.path(), "/");
+ // If we're not running on GCP, we can't use DirectPath, so delegate
+ // to the DNS resolver.
+ if (!grpc_alts_is_running_on_gcp() ||
+ // If the client is already using xDS, we can't use it here, because
+ // they may be talking to a completely different xDS server than we
+ // want to.
+ // TODO(roth): When we implement xDS federation, remove this constraint.
+ UniquePtr<char>(gpr_getenv("GRPC_XDS_BOOTSTRAP")) != nullptr ||
+ UniquePtr<char>(gpr_getenv("GRPC_XDS_BOOTSTRAP_CONFIG")) != nullptr) {
+ using_dns_ = true;
+ child_resolver_ = ResolverRegistry::CreateResolver(
+ y_absl::StrCat("dns:", name_to_resolve).c_str(), args.args,
+ args.pollset_set, work_serializer_, std::move(args.result_handler));
+ GPR_ASSERT(child_resolver_ != nullptr);
+ return;
+ }
+ // Create xds resolver.
+ child_resolver_ = ResolverRegistry::CreateResolver(
+ y_absl::StrCat("xds:", name_to_resolve).c_str(), args.args,
+ args.pollset_set, work_serializer_, std::move(args.result_handler));
+ GPR_ASSERT(child_resolver_ != nullptr);
+}
+
+void GoogleCloud2ProdResolver::StartLocked() {
+ if (using_dns_) {
+ child_resolver_->StartLocked();
+ return;
+ }
+ // Using xDS. Start metadata server queries.
+ zone_query_ = MakeOrphanable<ZoneQuery>(Ref(), &pollent_);
+ ipv6_query_ = MakeOrphanable<IPv6Query>(Ref(), &pollent_);
+}
+
+void GoogleCloud2ProdResolver::RequestReresolutionLocked() {
+ if (child_resolver_ != nullptr) {
+ child_resolver_->RequestReresolutionLocked();
+ }
+}
+
+void GoogleCloud2ProdResolver::ResetBackoffLocked() {
+ if (child_resolver_ != nullptr) {
+ child_resolver_->ResetBackoffLocked();
+ }
+}
+
+void GoogleCloud2ProdResolver::ShutdownLocked() {
+ zone_query_.reset();
+ ipv6_query_.reset();
+ child_resolver_.reset();
+}
+
+void GoogleCloud2ProdResolver::ZoneQueryDone(TString zone) {
+ zone_query_.reset();
+ zone_ = std::move(zone);
+ if (supports_ipv6_.has_value()) StartXdsResolver();
+}
+
+void GoogleCloud2ProdResolver::IPv6QueryDone(bool ipv6_supported) {
+ ipv6_query_.reset();
+ supports_ipv6_ = ipv6_supported;
+ if (zone_.has_value()) StartXdsResolver();
+}
+
+void GoogleCloud2ProdResolver::StartXdsResolver() {
+ // Construct bootstrap JSON.
+ Json::Object node = {
+ {"id", "C2P"},
+ };
+ if (!zone_->empty()) {
+ node["locality"] = Json::Object{
+ {"zone", *zone_},
+ };
+ };
+ if (*supports_ipv6_) {
+ node["metadata"] = Json::Object{
+ {"TRAFFICDIRECTOR_DIRECTPATH_C2P_IPV6_CAPABLE", true},
+ };
+ }
+ // Allow the TD server uri to be overridden for testing purposes.
+ UniquePtr<char> override_server(
+ gpr_getenv("GRPC_TEST_ONLY_GOOGLE_C2P_RESOLVER_TRAFFIC_DIRECTOR_URI"));
+ const char* server_uri =
+ override_server != nullptr && strlen(override_server.get()) > 0
+ ? override_server.get()
+ : "directpath-trafficdirector.googleapis.com";
+ Json bootstrap = Json::Object{
+ {"xds_servers",
+ Json::Array{
+ Json::Object{
+ {"server_uri", server_uri},
+ {"channel_creds",
+ Json::Array{
+ Json::Object{
+ {"type", "google_default"},
+ },
+ }},
+ {"server_features", Json::Array{"xds_v3"}},
+ },
+ }},
+ {"node", std::move(node)},
+ };
+ // Inject bootstrap JSON as fallback config.
+ internal::SetXdsFallbackBootstrapConfig(bootstrap.Dump().c_str());
+ // Now start xDS resolver.
+ child_resolver_->StartLocked();
+}
+
+//
+// Factory
+//
+
+class GoogleCloud2ProdResolverFactory : public ResolverFactory {
+ public:
+ bool IsValidUri(const URI& uri) const override {
+ if (GPR_UNLIKELY(!uri.authority().empty())) {
+ gpr_log(GPR_ERROR, "google-c2p URI scheme does not support authorities");
+ return false;
+ }
+ return true;
+ }
+
+ OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
+ if (!IsValidUri(args.uri)) return nullptr;
+ return MakeOrphanable<GoogleCloud2ProdResolver>(std::move(args));
+ }
+
+ const char* scheme() const override { return "google-c2p"; }
+};
+
+} // namespace
+
+void GoogleCloud2ProdResolverInit() {
+ // TODO(roth): Remove env var protection once this code is proven stable.
+ UniquePtr<char> value(gpr_getenv("GRPC_EXPERIMENTAL_GOOGLE_C2P_RESOLVER"));
+ bool parsed_value;
+ bool parse_succeeded = gpr_parse_bool_value(value.get(), &parsed_value);
+ if (parse_succeeded && parsed_value) {
+ ResolverRegistry::Builder::RegisterResolverFactory(
+ y_absl::make_unique<GoogleCloud2ProdResolverFactory>());
+ }
+}
+
+void GoogleCloud2ProdResolverShutdown() {}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
index b52bd8afba5..461cd6d8cdf 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc
@@ -23,6 +23,8 @@
#include <stdlib.h>
#include <string.h>
+#include "y_absl/strings/str_split.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/string_util.h>
@@ -33,7 +35,6 @@
#include "src/core/lib/iomgr/parse_address.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
-#include "src/core/lib/iomgr/work_serializer.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
@@ -51,13 +52,14 @@ class SockaddrResolver : public Resolver {
void ShutdownLocked() override {}
private:
+ std::unique_ptr<ResultHandler> result_handler_;
ServerAddressList addresses_;
const grpc_channel_args* channel_args_ = nullptr;
};
SockaddrResolver::SockaddrResolver(ServerAddressList addresses,
ResolverArgs args)
- : Resolver(std::move(args.work_serializer), std::move(args.result_handler)),
+ : result_handler_(std::move(args.result_handler)),
addresses_(std::move(addresses)),
channel_args_(grpc_channel_args_copy(args.args)) {}
@@ -71,37 +73,27 @@ void SockaddrResolver::StartLocked() {
// TODO(roth): Use std::move() once channel args is converted to C++.
result.args = channel_args_;
channel_args_ = nullptr;
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
}
//
// Factory
//
-void DoNothing(void* /*ignored*/) {}
-
-bool ParseUri(const grpc_uri* uri,
- bool parse(const grpc_uri* uri, grpc_resolved_address* dst),
+bool ParseUri(const URI& uri,
+ bool parse(const URI& uri, grpc_resolved_address* dst),
ServerAddressList* addresses) {
- if (0 != strcmp(uri->authority, "")) {
+ if (!uri.authority().empty()) {
gpr_log(GPR_ERROR, "authority-based URIs not supported by the %s scheme",
- uri->scheme);
+ uri.scheme().c_str());
return false;
}
// Construct addresses.
- grpc_slice path_slice =
- grpc_slice_new(uri->path, strlen(uri->path), DoNothing);
- grpc_slice_buffer path_parts;
- grpc_slice_buffer_init(&path_parts);
- grpc_slice_split(path_slice, ",", &path_parts);
bool errors_found = false;
- for (size_t i = 0; i < path_parts.count; i++) {
- grpc_uri ith_uri = *uri;
- grpc_core::UniquePtr<char> part_str(
- grpc_slice_to_c_string(path_parts.slices[i]));
- ith_uri.path = part_str.get();
+ for (y_absl::string_view ith_path : y_absl::StrSplit(uri.path(), ',')) {
+ URI ith_uri(uri.scheme(), "", TString(ith_path), {}, "");
grpc_resolved_address addr;
- if (!parse(&ith_uri, &addr)) {
+ if (!parse(ith_uri, &addr)) {
errors_found = true;
break;
}
@@ -109,14 +101,11 @@ bool ParseUri(const grpc_uri* uri,
addresses->emplace_back(addr, nullptr /* args */);
}
}
- grpc_slice_buffer_destroy_internal(&path_parts);
- grpc_slice_unref_internal(path_slice);
return !errors_found;
}
OrphanablePtr<Resolver> CreateSockaddrResolver(
- ResolverArgs args,
- bool parse(const grpc_uri* uri, grpc_resolved_address* dst)) {
+ ResolverArgs args, bool parse(const URI& uri, grpc_resolved_address* dst)) {
ServerAddressList addresses;
if (!ParseUri(args.uri, parse, &addresses)) return nullptr;
// Instantiate resolver.
@@ -126,7 +115,7 @@ OrphanablePtr<Resolver> CreateSockaddrResolver(
class IPv4ResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override {
+ bool IsValidUri(const URI& uri) const override {
return ParseUri(uri, grpc_parse_ipv4, nullptr);
}
@@ -139,7 +128,7 @@ class IPv4ResolverFactory : public ResolverFactory {
class IPv6ResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override {
+ bool IsValidUri(const URI& uri) const override {
return ParseUri(uri, grpc_parse_ipv6, nullptr);
}
@@ -153,7 +142,7 @@ class IPv6ResolverFactory : public ResolverFactory {
#ifdef GRPC_HAVE_UNIX_SOCKET
class UnixResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override {
+ bool IsValidUri(const URI& uri) const override {
return ParseUri(uri, grpc_parse_unix, nullptr);
}
@@ -161,13 +150,29 @@ class UnixResolverFactory : public ResolverFactory {
return CreateSockaddrResolver(std::move(args), grpc_parse_unix);
}
- grpc_core::UniquePtr<char> GetDefaultAuthority(
- grpc_uri* /*uri*/) const override {
- return grpc_core::UniquePtr<char>(gpr_strdup("localhost"));
+ TString GetDefaultAuthority(const URI& /*uri*/) const override {
+ return "localhost";
}
const char* scheme() const override { return "unix"; }
};
+
+class UnixAbstractResolverFactory : public ResolverFactory {
+ public:
+ bool IsValidUri(const URI& uri) const override {
+ return ParseUri(uri, grpc_parse_unix_abstract, nullptr);
+ }
+
+ OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const override {
+ return CreateSockaddrResolver(std::move(args), grpc_parse_unix_abstract);
+ }
+
+ TString GetDefaultAuthority(const URI& /*uri*/) const override {
+ return "localhost";
+ }
+
+ const char* scheme() const override { return "unix-abstract"; }
+};
#endif // GRPC_HAVE_UNIX_SOCKET
} // namespace
@@ -182,6 +187,8 @@ void grpc_resolver_sockaddr_init() {
#ifdef GRPC_HAVE_UNIX_SOCKET
grpc_core::ResolverRegistry::Builder::RegisterResolverFactory(
y_absl::make_unique<grpc_core::UnixResolverFactory>());
+ grpc_core::ResolverRegistry::Builder::RegisterResolverFactory(
+ y_absl::make_unique<grpc_core::UnixAbstractResolverFactory>());
#endif
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
index 03f98d0fa3e..800bd68537d 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc
@@ -22,13 +22,18 @@
#include "y_absl/strings/str_join.h"
#include "y_absl/strings/str_split.h"
#include "re2/re2.h"
+#define XXH_INLINE_ALL
+#include "xxhash.h"
#include "src/core/ext/filters/client_channel/config_selector.h"
+#include "src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h"
#include "src/core/ext/filters/client_channel/resolver_registry.h"
#include "src/core/ext/xds/xds_client.h"
+#include "src/core/ext/xds/xds_http_filters.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/surface/lame_client.h"
#include "src/core/lib/transport/timeout_encoding.h"
namespace grpc_core {
@@ -46,13 +51,11 @@ namespace {
class XdsResolver : public Resolver {
public:
explicit XdsResolver(ResolverArgs args)
- : Resolver(std::move(args.work_serializer),
- std::move(args.result_handler)),
+ : work_serializer_(std::move(args.work_serializer)),
+ result_handler_(std::move(args.result_handler)),
+ server_name_(y_absl::StripPrefix(args.uri.path(), "/")),
args_(grpc_channel_args_copy(args.args)),
interested_parties_(args.pollset_set) {
- char* path = args.uri->path;
- if (path[0] == '/') ++path;
- server_name_ = path;
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_resolver_trace)) {
gpr_log(GPR_INFO, "[xds_resolver %p] created for server name %s", this,
server_name_.c_str());
@@ -137,9 +140,8 @@ class XdsResolver : public Resolver {
class XdsConfigSelector : public ConfigSelector {
public:
- XdsConfigSelector(RefCountedPtr<XdsResolver> resolver,
- const std::vector<XdsApi::Route>& routes);
- ~XdsConfigSelector();
+ XdsConfigSelector(RefCountedPtr<XdsResolver> resolver, grpc_error** error);
+ ~XdsConfigSelector() override;
const char* name() const override { return "XdsConfigSelector"; }
@@ -152,23 +154,41 @@ class XdsResolver : public Resolver {
CallConfig GetCallConfig(GetCallConfigArgs args) override;
+ std::vector<const grpc_channel_filter*> GetFilters() override {
+ return filters_;
+ }
+
+ grpc_channel_args* ModifyChannelArgs(grpc_channel_args* args) override;
+
private:
struct Route {
+ struct ClusterWeightState {
+ uint32_t range_end;
+ y_absl::string_view cluster;
+ RefCountedPtr<ServiceConfig> method_config;
+
+ bool operator==(const ClusterWeightState& other) const;
+ };
+
XdsApi::Route route;
- y_absl::InlinedVector<std::pair<uint32_t, y_absl::string_view>, 2>
- weighted_cluster_state;
- bool operator==(const Route& other) const {
- return route == other.route &&
- weighted_cluster_state == other.weighted_cluster_state;
- }
+ RefCountedPtr<ServiceConfig> method_config;
+ y_absl::InlinedVector<ClusterWeightState, 2> weighted_cluster_state;
+
+ bool operator==(const Route& other) const;
};
using RouteTable = std::vector<Route>;
void MaybeAddCluster(const TString& name);
+ grpc_error* CreateMethodConfig(
+ const XdsApi::Route& route,
+ const XdsApi::Route::ClusterWeight* cluster_weight,
+ RefCountedPtr<ServiceConfig>* method_config);
RefCountedPtr<XdsResolver> resolver_;
RouteTable route_table_;
std::map<y_absl::string_view, RefCountedPtr<ClusterState>> clusters_;
+ std::vector<const grpc_channel_filter*> filters_;
+ grpc_error* filter_error_ = GRPC_ERROR_NONE;
};
void OnListenerUpdate(XdsApi::LdsUpdate listener);
@@ -180,15 +200,25 @@ class XdsResolver : public Resolver {
void GenerateResult();
void MaybeRemoveUnusedClusters();
+ std::shared_ptr<WorkSerializer> work_serializer_;
+ std::unique_ptr<ResultHandler> result_handler_;
TString server_name_;
const grpc_channel_args* args_;
grpc_pollset_set* interested_parties_;
+
RefCountedPtr<XdsClient> xds_client_;
+
XdsClient::ListenerWatcherInterface* listener_watcher_ = nullptr;
+ // This will not contain the RouteConfiguration, even if it comes with the
+ // LDS response; instead, the relevant VirtualHost from the
+ // RouteConfiguration will be saved in current_virtual_host_.
+ XdsApi::LdsUpdate current_listener_;
+
TString route_config_name_;
XdsClient::RouteConfigWatcherInterface* route_config_watcher_ = nullptr;
+ XdsApi::RdsUpdate::VirtualHost current_virtual_host_;
+
ClusterState::ClusterStateMap cluster_state_map_;
- std::vector<XdsApi::Route> current_update_;
};
//
@@ -207,7 +237,7 @@ XdsResolver::Notifier::Notifier(RefCountedPtr<XdsResolver> resolver,
XdsResolver::Notifier::Notifier(RefCountedPtr<XdsResolver> resolver,
XdsApi::RdsUpdate update)
: resolver_(std::move(resolver)), type_(kRdsUpdate) {
- update_.rds_update = std::move(update);
+ update_.http_connection_manager.rds_update = std::move(update);
GRPC_CLOSURE_INIT(&closure_, &RunInExecCtx, this, nullptr);
ExecCtx::Run(DEBUG_LOCATION, &closure_, GRPC_ERROR_NONE);
}
@@ -228,7 +258,7 @@ XdsResolver::Notifier::Notifier(RefCountedPtr<XdsResolver> resolver)
void XdsResolver::Notifier::RunInExecCtx(void* arg, grpc_error* error) {
Notifier* self = static_cast<Notifier*>(arg);
GRPC_ERROR_REF(error);
- self->resolver_->work_serializer()->Run(
+ self->resolver_->work_serializer_->Run(
[self, error]() { self->RunInWorkSerializer(error); }, DEBUG_LOCATION);
}
@@ -243,7 +273,8 @@ void XdsResolver::Notifier::RunInWorkSerializer(grpc_error* error) {
resolver_->OnListenerUpdate(std::move(update_));
break;
case kRdsUpdate:
- resolver_->OnRouteConfigUpdate(std::move(*update_.rds_update));
+ resolver_->OnRouteConfigUpdate(
+ std::move(*update_.http_connection_manager.rds_update));
break;
case kError:
resolver_->OnError(error);
@@ -256,12 +287,34 @@ void XdsResolver::Notifier::RunInWorkSerializer(grpc_error* error) {
}
//
+// XdsResolver::XdsConfigSelector::Route
+//
+
+bool MethodConfigsEqual(const ServiceConfig* sc1, const ServiceConfig* sc2) {
+ if (sc1 == nullptr) return sc2 == nullptr;
+ if (sc2 == nullptr) return false;
+ return sc1->json_string() == sc2->json_string();
+}
+
+bool XdsResolver::XdsConfigSelector::Route::ClusterWeightState::operator==(
+ const ClusterWeightState& other) const {
+ return range_end == other.range_end && cluster == other.cluster &&
+ MethodConfigsEqual(method_config.get(), other.method_config.get());
+}
+
+bool XdsResolver::XdsConfigSelector::Route::operator==(
+ const Route& other) const {
+ return route == other.route &&
+ weighted_cluster_state == other.weighted_cluster_state &&
+ MethodConfigsEqual(method_config.get(), other.method_config.get());
+}
+
+//
// XdsResolver::XdsConfigSelector
//
XdsResolver::XdsConfigSelector::XdsConfigSelector(
- RefCountedPtr<XdsResolver> resolver,
- const std::vector<XdsApi::Route>& routes)
+ RefCountedPtr<XdsResolver> resolver, grpc_error** error)
: resolver_(std::move(resolver)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_resolver_trace)) {
gpr_log(GPR_INFO, "[xds_resolver %p] creating XdsConfigSelector %p",
@@ -276,8 +329,8 @@ XdsResolver::XdsConfigSelector::XdsConfigSelector(
// weighted_cluster_state field points to the memory in the route field, so
// moving the entry in a reallocation will cause the string_view to point to
// invalid data.
- route_table_.reserve(routes.size());
- for (auto& route : routes) {
+ route_table_.reserve(resolver_->current_virtual_host_.routes.size());
+ for (auto& route : resolver_->current_virtual_host_.routes) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_resolver_trace)) {
gpr_log(GPR_INFO, "[xds_resolver %p] XdsConfigSelector %p: route: %s",
resolver_.get(), this, route.ToString().c_str());
@@ -285,18 +338,62 @@ XdsResolver::XdsConfigSelector::XdsConfigSelector(
route_table_.emplace_back();
auto& route_entry = route_table_.back();
route_entry.route = route;
+ // If the route doesn't specify a timeout, set its timeout to the global
+ // one.
+ if (!route.max_stream_duration.has_value()) {
+ route_entry.route.max_stream_duration =
+ resolver_->current_listener_.http_connection_manager
+ .http_max_stream_duration;
+ }
if (route.weighted_clusters.empty()) {
+ *error = CreateMethodConfig(route_entry.route, nullptr,
+ &route_entry.method_config);
MaybeAddCluster(route.cluster_name);
} else {
uint32_t end = 0;
for (const auto& weighted_cluster : route_entry.route.weighted_clusters) {
- MaybeAddCluster(weighted_cluster.name);
+ Route::ClusterWeightState cluster_weight_state;
+ *error = CreateMethodConfig(route_entry.route, &weighted_cluster,
+ &cluster_weight_state.method_config);
+ if (*error != GRPC_ERROR_NONE) return;
end += weighted_cluster.weight;
- route_entry.weighted_cluster_state.emplace_back(end,
- weighted_cluster.name);
+ cluster_weight_state.range_end = end;
+ cluster_weight_state.cluster = weighted_cluster.name;
+ route_entry.weighted_cluster_state.push_back(
+ std::move(cluster_weight_state));
+ MaybeAddCluster(weighted_cluster.name);
}
}
}
+ // Populate filter list.
+ bool found_router = false;
+ for (const auto& http_filter :
+ resolver_->current_listener_.http_connection_manager.http_filters) {
+ // Stop at the router filter. It's a no-op for us, and we ignore
+ // anything that may come after it, for compatibility with Envoy.
+ if (http_filter.config.config_proto_type_name ==
+ kXdsHttpRouterFilterConfigName) {
+ found_router = true;
+ break;
+ }
+ // Find filter. This is guaranteed to succeed, because it's checked
+ // at config validation time in the XdsApi code.
+ const XdsHttpFilterImpl* filter_impl =
+ XdsHttpFilterRegistry::GetFilterForType(
+ http_filter.config.config_proto_type_name);
+ GPR_ASSERT(filter_impl != nullptr);
+ // Add C-core filter to list.
+ filters_.push_back(filter_impl->channel_filter());
+ }
+ // For compatibility with Envoy, if the router filter is not
+ // configured, we fail all RPCs.
+ if (!found_router) {
+ filter_error_ =
+ grpc_error_set_int(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "no xDS HTTP router filter configured"),
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE);
+ filters_.push_back(&grpc_lame_filter);
+ }
}
XdsResolver::XdsConfigSelector::~XdsConfigSelector() {
@@ -306,6 +403,111 @@ XdsResolver::XdsConfigSelector::~XdsConfigSelector() {
}
clusters_.clear();
resolver_->MaybeRemoveUnusedClusters();
+ GRPC_ERROR_UNREF(filter_error_);
+}
+
+const XdsHttpFilterImpl::FilterConfig* FindFilterConfigOverride(
+ const TString& instance_name,
+ const XdsApi::RdsUpdate::VirtualHost& vhost, const XdsApi::Route& route,
+ const XdsApi::Route::ClusterWeight* cluster_weight) {
+ // Check ClusterWeight, if any.
+ if (cluster_weight != nullptr) {
+ auto it = cluster_weight->typed_per_filter_config.find(instance_name);
+ if (it != cluster_weight->typed_per_filter_config.end()) return &it->second;
+ }
+ // Check Route.
+ auto it = route.typed_per_filter_config.find(instance_name);
+ if (it != route.typed_per_filter_config.end()) return &it->second;
+ // Check VirtualHost.
+ it = vhost.typed_per_filter_config.find(instance_name);
+ if (it != vhost.typed_per_filter_config.end()) return &it->second;
+ // Not found.
+ return nullptr;
+}
+
+grpc_error* XdsResolver::XdsConfigSelector::CreateMethodConfig(
+ const XdsApi::Route& route,
+ const XdsApi::Route::ClusterWeight* cluster_weight,
+ RefCountedPtr<ServiceConfig>* method_config) {
+ std::vector<TString> fields;
+ // Set timeout.
+ if (route.max_stream_duration.has_value() &&
+ (route.max_stream_duration->seconds != 0 ||
+ route.max_stream_duration->nanos != 0)) {
+ fields.emplace_back(y_absl::StrFormat(" \"timeout\": \"%d.%09ds\"",
+ route.max_stream_duration->seconds,
+ route.max_stream_duration->nanos));
+ }
+ // Handle xDS HTTP filters.
+ std::map<TString, std::vector<TString>> per_filter_configs;
+ grpc_channel_args* args = grpc_channel_args_copy(resolver_->args_);
+ for (const auto& http_filter :
+ resolver_->current_listener_.http_connection_manager.http_filters) {
+ // Stop at the router filter. It's a no-op for us, and we ignore
+ // anything that may come after it, for compatibility with Envoy.
+ if (http_filter.config.config_proto_type_name ==
+ kXdsHttpRouterFilterConfigName) {
+ break;
+ }
+ // Find filter. This is guaranteed to succeed, because it's checked
+ // at config validation time in the XdsApi code.
+ const XdsHttpFilterImpl* filter_impl =
+ XdsHttpFilterRegistry::GetFilterForType(
+ http_filter.config.config_proto_type_name);
+ GPR_ASSERT(filter_impl != nullptr);
+ // Allow filter to add channel args that may affect service config
+ // parsing.
+ args = filter_impl->ModifyChannelArgs(args);
+ // Find config override, if any.
+ const XdsHttpFilterImpl::FilterConfig* config_override =
+ FindFilterConfigOverride(http_filter.name,
+ resolver_->current_virtual_host_, route,
+ cluster_weight);
+ // Generate service config for filter.
+ auto method_config_field =
+ filter_impl->GenerateServiceConfig(http_filter.config, config_override);
+ if (!method_config_field.ok()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("failed to generate method config for HTTP filter ",
+ http_filter.name, ": ",
+ method_config_field.status().ToString())
+ .c_str());
+ }
+ per_filter_configs[method_config_field->service_config_field_name]
+ .push_back(method_config_field->element);
+ }
+ for (const auto& p : per_filter_configs) {
+ fields.emplace_back(y_absl::StrCat(" \"", p.first, "\": [\n",
+ y_absl::StrJoin(p.second, ",\n"),
+ "\n ]"));
+ }
+ // Construct service config.
+ grpc_error* error = GRPC_ERROR_NONE;
+ if (!fields.empty()) {
+ TString json = y_absl::StrCat(
+ "{\n"
+ " \"methodConfig\": [ {\n"
+ " \"name\": [\n"
+ " {}\n"
+ " ],\n"
+ " ",
+ y_absl::StrJoin(fields, ",\n"),
+ "\n } ]\n"
+ "}");
+ *method_config = ServiceConfig::Create(args, json.c_str(), &error);
+ }
+ grpc_channel_args_destroy(args);
+ return error;
+}
+
+grpc_channel_args* XdsResolver::XdsConfigSelector::ModifyChannelArgs(
+ grpc_channel_args* args) {
+ if (filter_error_ == GRPC_ERROR_NONE) return args;
+ grpc_arg error_arg = MakeLameClientErrorArg(filter_error_);
+ grpc_channel_args* new_args =
+ grpc_channel_args_copy_and_add(args, &error_arg, 1);
+ grpc_channel_args_destroy(args);
+ return new_args;
}
void XdsResolver::XdsConfigSelector::MaybeAddCluster(const TString& name) {
@@ -321,100 +523,50 @@ void XdsResolver::XdsConfigSelector::MaybeAddCluster(const TString& name) {
}
}
-bool PathMatch(const y_absl::string_view& path,
- const XdsApi::Route::Matchers::PathMatcher& path_matcher) {
- switch (path_matcher.type) {
- case XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PREFIX:
- return y_absl::StartsWith(path, path_matcher.string_matcher);
- case XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PATH:
- return path == path_matcher.string_matcher;
- case XdsApi::Route::Matchers::PathMatcher::PathMatcherType::REGEX:
- return RE2::FullMatch(path.data(), *path_matcher.regex_matcher);
- default:
- return false;
- }
-}
-
-y_absl::optional<y_absl::string_view> GetMetadataValue(
- const TString& target_key, grpc_metadata_batch* initial_metadata,
+y_absl::optional<y_absl::string_view> GetHeaderValue(
+ grpc_metadata_batch* initial_metadata, y_absl::string_view header_name,
TString* concatenated_value) {
- // Find all values for the specified key.
- GPR_DEBUG_ASSERT(initial_metadata != nullptr);
- y_absl::InlinedVector<y_absl::string_view, 1> values;
- for (grpc_linked_mdelem* md = initial_metadata->list.head; md != nullptr;
- md = md->next) {
- y_absl::string_view key = StringViewFromSlice(GRPC_MDKEY(md->md));
- y_absl::string_view value = StringViewFromSlice(GRPC_MDVALUE(md->md));
- if (target_key == key) values.push_back(value);
- }
- // If none found, no match.
- if (values.empty()) return y_absl::nullopt;
- // If exactly one found, return it as-is.
- if (values.size() == 1) return values.front();
- // If more than one found, concatenate the values, using
- // *concatenated_values as a temporary holding place for the
- // concatenated string.
- *concatenated_value = y_absl::StrJoin(values, ",");
- return *concatenated_value;
-}
-
-bool HeaderMatchHelper(
- const XdsApi::Route::Matchers::HeaderMatcher& header_matcher,
- grpc_metadata_batch* initial_metadata) {
- TString concatenated_value;
- y_absl::optional<y_absl::string_view> value;
// Note: If we ever allow binary headers here, we still need to
// special-case ignore "grpc-tags-bin" and "grpc-trace-bin", since
// they are not visible to the LB policy in grpc-go.
- if (y_absl::EndsWith(header_matcher.name, "-bin") ||
- header_matcher.name == "grpc-previous-rpc-attempts") {
- value = y_absl::nullopt;
- } else if (header_matcher.name == "content-type") {
- value = "application/grpc";
- } else {
- value = GetMetadataValue(header_matcher.name, initial_metadata,
- &concatenated_value);
+ if (y_absl::EndsWith(header_name, "-bin")) {
+ return y_absl::nullopt;
+ } else if (header_name == "content-type") {
+ return "application/grpc";
}
- if (!value.has_value()) {
- if (header_matcher.type ==
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PRESENT) {
- return !header_matcher.present_match;
- } else {
- // For all other header matcher types, we need the header value to
- // exist to consider matches.
+ return grpc_metadata_batch_get_value(initial_metadata, header_name,
+ concatenated_value);
+}
+
+bool HeadersMatch(const std::vector<HeaderMatcher>& header_matchers,
+ grpc_metadata_batch* initial_metadata) {
+ for (const auto& header_matcher : header_matchers) {
+ TString concatenated_value;
+ if (!header_matcher.Match(GetHeaderValue(
+ initial_metadata, header_matcher.name(), &concatenated_value))) {
return false;
}
}
- switch (header_matcher.type) {
- case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::EXACT:
- return value.value() == header_matcher.string_matcher;
- case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::REGEX:
- return RE2::FullMatch(value.value().data(), *header_matcher.regex_match);
- case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::RANGE:
- int64_t int_value;
- if (!y_absl::SimpleAtoi(value.value(), &int_value)) {
- return false;
- }
- return int_value >= header_matcher.range_start &&
- int_value < header_matcher.range_end;
- case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PREFIX:
- return y_absl::StartsWith(value.value(), header_matcher.string_matcher);
- case XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::SUFFIX:
- return y_absl::EndsWith(value.value(), header_matcher.string_matcher);
- default:
- return false;
- }
+ return true;
}
-bool HeadersMatch(
- const std::vector<XdsApi::Route::Matchers::HeaderMatcher>& header_matchers,
+y_absl::optional<uint64_t> HeaderHashHelper(
+ const XdsApi::Route::HashPolicy& policy,
grpc_metadata_batch* initial_metadata) {
- for (const auto& header_matcher : header_matchers) {
- bool match = HeaderMatchHelper(header_matcher, initial_metadata);
- if (header_matcher.invert_match) match = !match;
- if (!match) return false;
+ GPR_ASSERT(policy.type == XdsApi::Route::HashPolicy::HEADER);
+ TString value_buffer;
+ y_absl::optional<y_absl::string_view> header_value =
+ GetHeaderValue(initial_metadata, policy.header_name, &value_buffer);
+ if (policy.regex != nullptr) {
+ // If GetHeaderValue() did not already store the value in
+ // value_buffer, copy it there now, so we can modify it.
+ if (header_value->data() != value_buffer.data()) {
+ value_buffer = TString(*header_value);
+ }
+ RE2::GlobalReplace(&value_buffer, *policy.regex, policy.regex_substitution);
+ header_value = value_buffer;
}
- return true;
+ return XXH64(header_value->data(), header_value->size(), 0);
}
bool UnderFraction(const uint32_t fraction_per_million) {
@@ -427,8 +579,8 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig(
GetCallConfigArgs args) {
for (const auto& entry : route_table_) {
// Path matching.
- if (!PathMatch(StringViewFromSlice(*args.path),
- entry.route.matchers.path_matcher)) {
+ if (!entry.route.matchers.path_matcher.Match(
+ StringViewFromSlice(*args.path))) {
continue;
}
// Header Matching.
@@ -443,13 +595,15 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig(
}
// Found a route match
y_absl::string_view cluster_name;
+ RefCountedPtr<ServiceConfig> method_config;
if (entry.route.weighted_clusters.empty()) {
cluster_name = entry.route.cluster_name;
+ method_config = entry.method_config;
} else {
const uint32_t key =
rand() %
entry.weighted_cluster_state[entry.weighted_cluster_state.size() - 1]
- .first;
+ .range_end;
// Find the index in weighted clusters corresponding to key.
size_t mid = 0;
size_t start_index = 0;
@@ -457,9 +611,9 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig(
size_t index = 0;
while (end_index > start_index) {
mid = (start_index + end_index) / 2;
- if (entry.weighted_cluster_state[mid].first > key) {
+ if (entry.weighted_cluster_state[mid].range_end > key) {
end_index = mid;
- } else if (entry.weighted_cluster_state[mid].first < key) {
+ } else if (entry.weighted_cluster_state[mid].range_end < key) {
start_index = mid + 1;
} else {
index = mid + 1;
@@ -467,16 +621,56 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig(
}
}
if (index == 0) index = start_index;
- GPR_ASSERT(entry.weighted_cluster_state[index].first > key);
- cluster_name = entry.weighted_cluster_state[index].second;
+ GPR_ASSERT(entry.weighted_cluster_state[index].range_end > key);
+ cluster_name = entry.weighted_cluster_state[index].cluster;
+ method_config = entry.weighted_cluster_state[index].method_config;
}
auto it = clusters_.find(cluster_name);
GPR_ASSERT(it != clusters_.end());
XdsResolver* resolver =
static_cast<XdsResolver*>(resolver_->Ref().release());
ClusterState* cluster_state = it->second->Ref().release();
+ // Generate a hash
+ y_absl::optional<uint64_t> hash;
+ for (const auto& hash_policy : entry.route.hash_policies) {
+ y_absl::optional<uint64_t> new_hash;
+ switch (hash_policy.type) {
+ case XdsApi::Route::HashPolicy::HEADER:
+ new_hash = HeaderHashHelper(hash_policy, args.initial_metadata);
+ break;
+ case XdsApi::Route::HashPolicy::CHANNEL_ID:
+ new_hash =
+ static_cast<uint64_t>(reinterpret_cast<uintptr_t>(resolver));
+ break;
+ default:
+ GPR_ASSERT(0);
+ }
+ if (new_hash.has_value()) {
+ // Rotating the old value prevents duplicate hash rules from cancelling
+ // each other out and preserves all of the entropy
+ const uint64_t old_value =
+ hash.has_value() ? ((hash.value() << 1) | (hash.value() >> 63)) : 0;
+ hash = old_value ^ new_hash.value();
+ }
+ // If the policy is a terminal policy and a hash has been generated,
+ // ignore the rest of the hash policies.
+ if (hash_policy.terminal && hash.has_value()) {
+ break;
+ }
+ }
+ if (!hash.has_value()) {
+ // If there is no hash, we just choose a random value as a default.
+ hash = rand();
+ }
CallConfig call_config;
+ if (method_config != nullptr) {
+ call_config.method_configs =
+ method_config->GetMethodParsedConfigVector(grpc_empty_slice());
+ call_config.service_config = std::move(method_config);
+ }
call_config.call_attributes[kXdsClusterAttribute] = it->first;
+ call_config.call_attributes[kRequestRingHashAttribute] =
+ y_absl::StrFormat("%" PRIu64, hash.value());
call_config.on_call_committed = [resolver, cluster_state]() {
cluster_state->Unref();
ExecCtx::Run(
@@ -492,7 +686,7 @@ ConfigSelector::CallConfig XdsResolver::XdsConfigSelector::GetCallConfig(
GRPC_CLOSURE_CREATE(
[](void* arg, grpc_error* /*error*/) {
auto* resolver = static_cast<XdsResolver*>(arg);
- resolver->work_serializer()->Run(
+ resolver->work_serializer_->Run(
[resolver]() {
resolver->MaybeRemoveUnusedClusters();
resolver->Unref();
@@ -519,7 +713,7 @@ void XdsResolver::StartLocked() {
"Failed to create xds client -- channel will remain in "
"TRANSIENT_FAILURE: %s",
grpc_error_string(error));
- result_handler()->ReturnError(error);
+ result_handler_->ReturnError(error);
return;
}
grpc_pollset_set_add_pollset_set(xds_client_->interested_parties(),
@@ -564,23 +758,34 @@ void XdsResolver::OnListenerUpdate(XdsApi::LdsUpdate listener) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_resolver_trace)) {
gpr_log(GPR_INFO, "[xds_resolver %p] received updated listener data", this);
}
- if (listener.route_config_name != route_config_name_) {
+ if (listener.http_connection_manager.route_config_name !=
+ route_config_name_) {
if (route_config_watcher_ != nullptr) {
xds_client_->CancelRouteConfigDataWatch(
route_config_name_, route_config_watcher_,
- /*delay_unsubscription=*/!listener.route_config_name.empty());
+ /*delay_unsubscription=*/
+ !listener.http_connection_manager.route_config_name.empty());
route_config_watcher_ = nullptr;
}
- route_config_name_ = std::move(listener.route_config_name);
+ route_config_name_ =
+ std::move(listener.http_connection_manager.route_config_name);
if (!route_config_name_.empty()) {
+ current_virtual_host_.routes.clear();
auto watcher = y_absl::make_unique<RouteConfigWatcher>(Ref());
route_config_watcher_ = watcher.get();
xds_client_->WatchRouteConfigData(route_config_name_, std::move(watcher));
}
}
+ current_listener_ = std::move(listener);
if (route_config_name_.empty()) {
- GPR_ASSERT(listener.rds_update.has_value());
- OnRouteConfigUpdate(std::move(*listener.rds_update));
+ GPR_ASSERT(
+ current_listener_.http_connection_manager.rds_update.has_value());
+ OnRouteConfigUpdate(
+ std::move(*current_listener_.http_connection_manager.rds_update));
+ } else {
+ // HCM may contain newer filter config. We need to propagate the update as
+ // config selector to the channel
+ GenerateResult();
}
}
@@ -598,8 +803,8 @@ void XdsResolver::OnRouteConfigUpdate(XdsApi::RdsUpdate rds_update) {
.c_str()));
return;
}
- // Save the list of routes in the resolver.
- current_update_ = std::move(vhost->routes);
+ // Save the virtual host in the resolver.
+ current_virtual_host_ = std::move(*vhost);
// Send a new result to the channel.
GenerateResult();
}
@@ -610,7 +815,7 @@ void XdsResolver::OnError(grpc_error* error) {
Result result;
result.args = grpc_channel_args_copy(args_);
result.service_config_error = error;
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
}
void XdsResolver::OnResourceDoesNotExist() {
@@ -618,13 +823,13 @@ void XdsResolver::OnResourceDoesNotExist() {
"[xds_resolver %p] LDS/RDS resource does not exist -- clearing "
"update and returning empty service config",
this);
- current_update_.clear();
+ current_virtual_host_.routes.clear();
Result result;
result.service_config =
ServiceConfig::Create(args_, "{}", &result.service_config_error);
GPR_ASSERT(result.service_config != nullptr);
result.args = grpc_channel_args_copy(args_);
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
}
grpc_error* XdsResolver::CreateServiceConfig(
@@ -660,13 +865,17 @@ grpc_error* XdsResolver::CreateServiceConfig(
}
void XdsResolver::GenerateResult() {
- if (current_update_.empty()) return;
+ if (current_virtual_host_.routes.empty()) return;
// First create XdsConfigSelector, which may add new entries to the cluster
// state map, and then CreateServiceConfig for LB policies.
- auto config_selector =
- MakeRefCounted<XdsConfigSelector>(Ref(), current_update_);
+ grpc_error* error = GRPC_ERROR_NONE;
+ auto config_selector = MakeRefCounted<XdsConfigSelector>(Ref(), &error);
+ if (error != GRPC_ERROR_NONE) {
+ OnError(error);
+ return;
+ }
Result result;
- grpc_error* error = CreateServiceConfig(&result.service_config);
+ error = CreateServiceConfig(&result.service_config);
if (error != GRPC_ERROR_NONE) {
OnError(error);
return;
@@ -677,7 +886,7 @@ void XdsResolver::GenerateResult() {
}
grpc_arg new_arg = config_selector->MakeChannelArg();
result.args = grpc_channel_args_copy_and_add(args_, &new_arg, 1);
- result_handler()->ReturnResult(std::move(result));
+ result_handler_->ReturnResult(std::move(result));
}
void XdsResolver::MaybeRemoveUnusedClusters() {
@@ -703,8 +912,8 @@ void XdsResolver::MaybeRemoveUnusedClusters() {
class XdsResolverFactory : public ResolverFactory {
public:
- bool IsValidUri(const grpc_uri* uri) const override {
- if (GPR_UNLIKELY(0 != strcmp(uri->authority, ""))) {
+ bool IsValidUri(const URI& uri) const override {
+ if (GPR_UNLIKELY(!uri.authority().empty())) {
gpr_log(GPR_ERROR, "URI authority not supported");
return false;
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_factory.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_factory.h
index d8dd801ae09..a065b4274e5 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_factory.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_factory.h
@@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
+#include "y_absl/strings/strip.h"
+
#include <grpc/support/string_util.h>
#include "src/core/ext/filters/client_channel/resolver.h"
@@ -33,7 +35,7 @@ namespace grpc_core {
struct ResolverArgs {
/// The parsed URI to resolve.
- grpc_uri* uri = nullptr;
+ URI uri;
/// Channel args to be included in resolver results.
const grpc_channel_args* args = nullptr;
/// Used to drive I/O in the name resolution process.
@@ -48,17 +50,15 @@ class ResolverFactory {
public:
/// Returns a bool indicating whether the input uri is valid to create a
/// resolver.
- virtual bool IsValidUri(const grpc_uri* uri) const = 0;
+ virtual bool IsValidUri(const URI& uri) const = 0;
/// Returns a new resolver instance.
virtual OrphanablePtr<Resolver> CreateResolver(ResolverArgs args) const = 0;
/// Returns a string representing the default authority to use for this
/// scheme.
- virtual grpc_core::UniquePtr<char> GetDefaultAuthority(grpc_uri* uri) const {
- const char* path = uri->path;
- if (path[0] == '/') ++path;
- return grpc_core::UniquePtr<char>(gpr_strdup(path));
+ virtual TString GetDefaultAuthority(const URI& uri) const {
+ return TString(y_absl::StripPrefix(uri.path(), "/"));
}
/// Returns the URI scheme that this factory implements.
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.cc
index 4cea1ec382c..6834f5a5f50 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.cc
@@ -24,6 +24,7 @@
#include "y_absl/container/inlined_vector.h"
#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_format.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -50,9 +51,9 @@ class RegistryState {
factories_.push_back(std::move(factory));
}
- ResolverFactory* LookupResolverFactory(const char* scheme) const {
+ ResolverFactory* LookupResolverFactory(y_absl::string_view scheme) const {
for (size_t i = 0; i < factories_.size(); ++i) {
- if (strcmp(scheme, factories_[i]->scheme()) == 0) {
+ if (scheme == factories_[i]->scheme()) {
return factories_[i].get();
}
}
@@ -65,26 +66,35 @@ class RegistryState {
// point to the parsed URI.
// If \a default_prefix_ needs to be prepended, sets \a canonical_target
// to the canonical target string.
- ResolverFactory* FindResolverFactory(const char* target, grpc_uri** uri,
+ ResolverFactory* FindResolverFactory(y_absl::string_view target, URI* uri,
TString* canonical_target) const {
GPR_ASSERT(uri != nullptr);
- *uri = grpc_uri_parse(target, 1);
+ y_absl::StatusOr<URI> tmp_uri = URI::Parse(target);
ResolverFactory* factory =
- *uri == nullptr ? nullptr : LookupResolverFactory((*uri)->scheme);
- if (factory == nullptr) {
- grpc_uri_destroy(*uri);
- *canonical_target = y_absl::StrCat(default_prefix_.get(), target);
- *uri = grpc_uri_parse(canonical_target->c_str(), 1);
- factory =
- *uri == nullptr ? nullptr : LookupResolverFactory((*uri)->scheme);
- if (factory == nullptr) {
- grpc_uri_destroy(grpc_uri_parse(target, 0));
- grpc_uri_destroy(grpc_uri_parse(canonical_target->c_str(), 0));
- gpr_log(GPR_ERROR, "don't know how to resolve '%s' or '%s'", target,
- canonical_target->c_str());
- }
+ tmp_uri.ok() ? LookupResolverFactory(tmp_uri->scheme()) : nullptr;
+ if (factory != nullptr) {
+ *uri = *tmp_uri;
+ return factory;
+ }
+ *canonical_target = y_absl::StrCat(default_prefix_.get(), target);
+ y_absl::StatusOr<URI> tmp_uri2 = URI::Parse(*canonical_target);
+ factory =
+ tmp_uri2.ok() ? LookupResolverFactory(tmp_uri2->scheme()) : nullptr;
+ if (factory != nullptr) {
+ *uri = *tmp_uri2;
+ return factory;
}
- return factory;
+ if (!tmp_uri.ok() || !tmp_uri2.ok()) {
+ gpr_log(GPR_ERROR, "%s",
+ y_absl::StrFormat("Error parsing URI(s). '%s':%s; '%s':%s", target,
+ tmp_uri.status().ToString(), *canonical_target,
+ tmp_uri2.status().ToString())
+ .c_str());
+ return nullptr;
+ }
+ gpr_log(GPR_ERROR, "Don't know how to resolve '%s' or '%s'.",
+ TString(target).c_str(), canonical_target->c_str());
+ return nullptr;
}
private:
@@ -114,10 +124,9 @@ void ResolverRegistry::Builder::ShutdownRegistry() {
g_state = nullptr;
}
-void ResolverRegistry::Builder::SetDefaultPrefix(
- const char* default_resolver_prefix) {
+void ResolverRegistry::Builder::SetDefaultPrefix(const char* default_prefix) {
InitRegistry();
- g_state->SetDefaultPrefix(default_resolver_prefix);
+ g_state->SetDefaultPrefix(default_prefix);
}
void ResolverRegistry::Builder::RegisterResolverFactory(
@@ -135,14 +144,12 @@ ResolverFactory* ResolverRegistry::LookupResolverFactory(const char* scheme) {
return g_state->LookupResolverFactory(scheme);
}
-bool ResolverRegistry::IsValidTarget(const char* target) {
- grpc_uri* uri = nullptr;
+bool ResolverRegistry::IsValidTarget(y_absl::string_view target) {
+ URI uri;
TString canonical_target;
ResolverFactory* factory =
g_state->FindResolverFactory(target, &uri, &canonical_target);
- bool result = factory == nullptr ? false : factory->IsValidUri(uri);
- grpc_uri_destroy(uri);
- return result;
+ return factory == nullptr ? false : factory->IsValidUri(uri);
}
OrphanablePtr<Resolver> ResolverRegistry::CreateResolver(
@@ -151,12 +158,10 @@ OrphanablePtr<Resolver> ResolverRegistry::CreateResolver(
std::shared_ptr<WorkSerializer> work_serializer,
std::unique_ptr<Resolver::ResultHandler> result_handler) {
GPR_ASSERT(g_state != nullptr);
- grpc_uri* uri = nullptr;
TString canonical_target;
- ResolverFactory* factory =
- g_state->FindResolverFactory(target, &uri, &canonical_target);
ResolverArgs resolver_args;
- resolver_args.uri = uri;
+ ResolverFactory* factory = g_state->FindResolverFactory(
+ target, &resolver_args.uri, &canonical_target);
resolver_args.args = args;
resolver_args.pollset_set = pollset_set;
resolver_args.work_serializer = std::move(work_serializer);
@@ -164,30 +169,26 @@ OrphanablePtr<Resolver> ResolverRegistry::CreateResolver(
OrphanablePtr<Resolver> resolver =
factory == nullptr ? nullptr
: factory->CreateResolver(std::move(resolver_args));
- grpc_uri_destroy(uri);
return resolver;
}
-grpc_core::UniquePtr<char> ResolverRegistry::GetDefaultAuthority(
- const char* target) {
+TString ResolverRegistry::GetDefaultAuthority(y_absl::string_view target) {
GPR_ASSERT(g_state != nullptr);
- grpc_uri* uri = nullptr;
+ URI uri;
TString canonical_target;
ResolverFactory* factory =
g_state->FindResolverFactory(target, &uri, &canonical_target);
- grpc_core::UniquePtr<char> authority =
- factory == nullptr ? nullptr : factory->GetDefaultAuthority(uri);
- grpc_uri_destroy(uri);
+ TString authority =
+ factory == nullptr ? "" : factory->GetDefaultAuthority(uri);
return authority;
}
grpc_core::UniquePtr<char> ResolverRegistry::AddDefaultPrefixIfNeeded(
const char* target) {
GPR_ASSERT(g_state != nullptr);
- grpc_uri* uri = nullptr;
+ URI uri;
TString canonical_target;
g_state->FindResolverFactory(target, &uri, &canonical_target);
- grpc_uri_destroy(uri);
return grpc_core::UniquePtr<char>(canonical_target.empty()
? gpr_strdup(target)
: gpr_strdup(canonical_target.c_str()));
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.h
index bf34216b2cf..1858f0ea641 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_registry.h
@@ -51,7 +51,7 @@ class ResolverRegistry {
};
/// Checks whether the user input \a target is valid to create a resolver.
- static bool IsValidTarget(const char* target);
+ static bool IsValidTarget(y_absl::string_view target);
/// Creates a resolver given \a target.
/// First tries to parse \a target as a URI. If this succeeds, tries
@@ -73,7 +73,7 @@ class ResolverRegistry {
std::unique_ptr<Resolver::ResultHandler> result_handler);
/// Returns the default authority to pass from a client for \a target.
- static grpc_core::UniquePtr<char> GetDefaultAuthority(const char* target);
+ static TString GetDefaultAuthority(y_absl::string_view target);
/// Returns \a target with the default prefix prepended, if needed.
static grpc_core::UniquePtr<char> AddDefaultPrefixIfNeeded(
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc
index e800b1e8f3b..4dc8af7b6cd 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.cc
@@ -95,26 +95,19 @@ std::unique_ptr<ClientChannelMethodParsedConfig::RetryPolicy> ParseRetryPolicy(
}
}
// Parse initialBackoff.
- it = json.object_value().find("initialBackoff");
- if (it != json.object_value().end()) {
- if (!ParseDurationFromJson(it->second, &retry_policy->initial_backoff)) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:initialBackoff error:Failed to parse"));
- } else if (retry_policy->initial_backoff == 0) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:initialBackoff error:must be greater than 0"));
- }
+ if (ParseJsonObjectFieldAsDuration(json.object_value(), "initialBackoff",
+ &retry_policy->initial_backoff,
+ &error_list) &&
+ retry_policy->initial_backoff == 0) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:initialBackoff error:must be greater than 0"));
}
// Parse maxBackoff.
- it = json.object_value().find("maxBackoff");
- if (it != json.object_value().end()) {
- if (!ParseDurationFromJson(it->second, &retry_policy->max_backoff)) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:maxBackoff error:failed to parse"));
- } else if (retry_policy->max_backoff == 0) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:maxBackoff error:should be greater than 0"));
- }
+ if (ParseJsonObjectFieldAsDuration(json.object_value(), "maxBackoff",
+ &retry_policy->max_backoff, &error_list) &&
+ retry_policy->max_backoff == 0) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:maxBackoff error:should be greater than 0"));
}
// Parse backoffMultiplier.
it = json.object_value().find("backoffMultiplier");
@@ -255,27 +248,25 @@ grpc_error* ParseRetryThrottling(
return GRPC_ERROR_CREATE_FROM_VECTOR("retryPolicy", &error_list);
}
-const char* ParseHealthCheckConfig(const Json& field, grpc_error** error) {
+y_absl::optional<TString> ParseHealthCheckConfig(const Json& field,
+ grpc_error** error) {
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
- const char* service_name = nullptr;
if (field.type() != Json::Type::OBJECT) {
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"field:healthCheckConfig error:should be of type object");
- return nullptr;
+ return y_absl::nullopt;
}
std::vector<grpc_error*> error_list;
+ y_absl::optional<TString> service_name;
auto it = field.object_value().find("serviceName");
if (it != field.object_value().end()) {
if (it->second.type() != Json::Type::STRING) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"field:serviceName error:should be of type string"));
} else {
- service_name = it->second.string_value().c_str();
+ service_name = it->second.string_value();
}
}
- if (!error_list.empty()) {
- return nullptr;
- }
*error =
GRPC_ERROR_CREATE_FROM_VECTOR("field:healthCheckConfig", &error_list);
return service_name;
@@ -288,12 +279,8 @@ ClientChannelServiceConfigParser::ParseGlobalParams(
const grpc_channel_args* /*args*/, const Json& json, grpc_error** error) {
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
std::vector<grpc_error*> error_list;
- RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config;
- TString lb_policy_name;
- y_absl::optional<ClientChannelGlobalParsedConfig::RetryThrottling>
- retry_throttling;
- const char* health_check_service_name = nullptr;
// Parse LB config.
+ RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config;
auto it = json.object_value().find("loadBalancingConfig");
if (it != json.object_value().end()) {
grpc_error* parse_error = GRPC_ERROR_NONE;
@@ -307,6 +294,7 @@ ClientChannelServiceConfigParser::ParseGlobalParams(
}
}
// Parse deprecated LB policy.
+ TString lb_policy_name;
it = json.object_value().find("loadBalancingPolicy");
if (it != json.object_value().end()) {
if (it->second.type() != Json::Type::STRING) {
@@ -332,6 +320,8 @@ ClientChannelServiceConfigParser::ParseGlobalParams(
}
}
// Parse retry throttling.
+ y_absl::optional<ClientChannelGlobalParsedConfig::RetryThrottling>
+ retry_throttling;
it = json.object_value().find("retryThrottling");
if (it != json.object_value().end()) {
ClientChannelGlobalParsedConfig::RetryThrottling data;
@@ -343,6 +333,7 @@ ClientChannelServiceConfigParser::ParseGlobalParams(
}
}
// Parse health check config.
+ y_absl::optional<TString> health_check_service_name;
it = json.object_value().find("healthCheckConfig");
if (it != json.object_value().end()) {
grpc_error* parsing_error = GRPC_ERROR_NONE;
@@ -357,7 +348,7 @@ ClientChannelServiceConfigParser::ParseGlobalParams(
if (*error == GRPC_ERROR_NONE) {
return y_absl::make_unique<ClientChannelGlobalParsedConfig>(
std::move(parsed_lb_config), std::move(lb_policy_name),
- retry_throttling, health_check_service_name);
+ retry_throttling, std::move(health_check_service_name));
}
return nullptr;
}
@@ -383,13 +374,8 @@ ClientChannelServiceConfigParser::ParsePerMethodParams(
}
}
// Parse timeout.
- it = json.object_value().find("timeout");
- if (it != json.object_value().end()) {
- if (!ParseDurationFromJson(it->second, &timeout)) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:timeout error:Failed parsing"));
- };
- }
+ ParseJsonObjectFieldAsDuration(json.object_value(), "timeout", &timeout,
+ &error_list, false);
// Parse retry policy.
it = json.object_value().find("retryPolicy");
if (it != json.object_value().end()) {
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.h
index 6149ebe32bc..f8e3f2992a1 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolver_result_parsing.h
@@ -49,15 +49,11 @@ class ClientChannelGlobalParsedConfig
RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config,
TString parsed_deprecated_lb_policy,
const y_absl::optional<RetryThrottling>& retry_throttling,
- const char* health_check_service_name)
+ y_absl::optional<TString> health_check_service_name)
: parsed_lb_config_(std::move(parsed_lb_config)),
parsed_deprecated_lb_policy_(std::move(parsed_deprecated_lb_policy)),
retry_throttling_(retry_throttling),
- health_check_service_name_(health_check_service_name) {}
-
- y_absl::optional<RetryThrottling> retry_throttling() const {
- return retry_throttling_;
- }
+ health_check_service_name_(std::move(health_check_service_name)) {}
RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config() const {
return parsed_lb_config_;
@@ -67,7 +63,11 @@ class ClientChannelGlobalParsedConfig
return parsed_deprecated_lb_policy_;
}
- const char* health_check_service_name() const {
+ y_absl::optional<RetryThrottling> retry_throttling() const {
+ return retry_throttling_;
+ }
+
+ const y_absl::optional<TString>& health_check_service_name() const {
return health_check_service_name_;
}
@@ -75,7 +75,7 @@ class ClientChannelGlobalParsedConfig
RefCountedPtr<LoadBalancingPolicy::Config> parsed_lb_config_;
TString parsed_deprecated_lb_policy_;
y_absl::optional<RetryThrottling> retry_throttling_;
- const char* health_check_service_name_;
+ y_absl::optional<TString> health_check_service_name_;
};
class ClientChannelMethodParsedConfig
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.cc
deleted file mode 100644
index af27e2eeae0..00000000000
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.cc
+++ /dev/null
@@ -1,355 +0,0 @@
-/*
- *
- * Copyright 2015 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/ext/filters/client_channel/resolving_lb_policy.h"
-
-#include <inttypes.h>
-#include <limits.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "y_absl/strings/str_cat.h"
-#include "y_absl/strings/str_join.h"
-
-#include <grpc/support/alloc.h>
-#include <grpc/support/log.h>
-#include <grpc/support/string_util.h>
-#include <grpc/support/sync.h>
-
-#include "src/core/ext/filters/client_channel/backup_poller.h"
-#include "src/core/ext/filters/client_channel/http_connect_handshaker.h"
-#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
-#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
-#include "src/core/ext/filters/client_channel/proxy_mapper_registry.h"
-#include "src/core/ext/filters/client_channel/resolver_registry.h"
-#include "src/core/ext/filters/client_channel/retry_throttle.h"
-#include "src/core/ext/filters/client_channel/server_address.h"
-#include "src/core/ext/filters/client_channel/service_config.h"
-#include "src/core/ext/filters/client_channel/subchannel.h"
-#include "src/core/ext/filters/deadline/deadline_filter.h"
-#include "src/core/lib/backoff/backoff.h"
-#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/connected_channel.h"
-#include "src/core/lib/channel/status_util.h"
-#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/manual_constructor.h"
-#include "src/core/lib/gprpp/sync.h"
-#include "src/core/lib/iomgr/iomgr.h"
-#include "src/core/lib/iomgr/polling_entity.h"
-#include "src/core/lib/profiling/timers.h"
-#include "src/core/lib/slice/slice_internal.h"
-#include "src/core/lib/slice/slice_string_helpers.h"
-#include "src/core/lib/surface/channel.h"
-#include "src/core/lib/transport/connectivity_state.h"
-#include "src/core/lib/transport/error_utils.h"
-#include "src/core/lib/transport/metadata.h"
-#include "src/core/lib/transport/metadata_batch.h"
-#include "src/core/lib/transport/static_metadata.h"
-#include "src/core/lib/transport/status_metadata.h"
-
-namespace grpc_core {
-
-//
-// ResolvingLoadBalancingPolicy::ResolverResultHandler
-//
-
-class ResolvingLoadBalancingPolicy::ResolverResultHandler
- : public Resolver::ResultHandler {
- public:
- explicit ResolverResultHandler(
- RefCountedPtr<ResolvingLoadBalancingPolicy> parent)
- : parent_(std::move(parent)) {}
-
- ~ResolverResultHandler() {
- if (GRPC_TRACE_FLAG_ENABLED(*(parent_->tracer_))) {
- gpr_log(GPR_INFO, "resolving_lb=%p: resolver shutdown complete",
- parent_.get());
- }
- }
-
- void ReturnResult(Resolver::Result result) override {
- parent_->OnResolverResultChangedLocked(std::move(result));
- }
-
- void ReturnError(grpc_error* error) override {
- parent_->OnResolverError(error);
- }
-
- private:
- RefCountedPtr<ResolvingLoadBalancingPolicy> parent_;
-};
-
-//
-// ResolvingLoadBalancingPolicy::ResolvingControlHelper
-//
-
-class ResolvingLoadBalancingPolicy::ResolvingControlHelper
- : public LoadBalancingPolicy::ChannelControlHelper {
- public:
- explicit ResolvingControlHelper(
- RefCountedPtr<ResolvingLoadBalancingPolicy> parent)
- : parent_(std::move(parent)) {}
-
- RefCountedPtr<SubchannelInterface> CreateSubchannel(
- ServerAddress address, const grpc_channel_args& args) override {
- if (parent_->resolver_ == nullptr) return nullptr; // Shutting down.
- return parent_->channel_control_helper()->CreateSubchannel(
- std::move(address), args);
- }
-
- void UpdateState(grpc_connectivity_state state, const y_absl::Status& status,
- std::unique_ptr<SubchannelPicker> picker) override {
- if (parent_->resolver_ == nullptr) return; // Shutting down.
- parent_->channel_control_helper()->UpdateState(state, status,
- std::move(picker));
- }
-
- void RequestReresolution() override {
- if (parent_->resolver_ == nullptr) return; // Shutting down.
- if (GRPC_TRACE_FLAG_ENABLED(*(parent_->tracer_))) {
- gpr_log(GPR_INFO, "resolving_lb=%p: started name re-resolving",
- parent_.get());
- }
- parent_->resolver_->RequestReresolutionLocked();
- }
-
- void AddTraceEvent(TraceSeverity severity,
- y_absl::string_view message) override {
- if (parent_->resolver_ == nullptr) return; // Shutting down.
- parent_->channel_control_helper()->AddTraceEvent(severity, message);
- }
-
- private:
- RefCountedPtr<ResolvingLoadBalancingPolicy> parent_;
-};
-
-//
-// ResolvingLoadBalancingPolicy
-//
-
-ResolvingLoadBalancingPolicy::ResolvingLoadBalancingPolicy(
- Args args, TraceFlag* tracer, grpc_core::UniquePtr<char> target_uri,
- ChannelConfigHelper* helper)
- : LoadBalancingPolicy(std::move(args)),
- tracer_(tracer),
- target_uri_(std::move(target_uri)),
- helper_(helper) {
- GPR_ASSERT(helper_ != nullptr);
- resolver_ = ResolverRegistry::CreateResolver(
- target_uri_.get(), args.args, interested_parties(), work_serializer(),
- y_absl::make_unique<ResolverResultHandler>(Ref()));
- // Since the validity of args has been checked when create the channel,
- // CreateResolver() must return a non-null result.
- GPR_ASSERT(resolver_ != nullptr);
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: starting name resolution", this);
- }
- channel_control_helper()->UpdateState(GRPC_CHANNEL_CONNECTING, y_absl::Status(),
- y_absl::make_unique<QueuePicker>(Ref()));
- resolver_->StartLocked();
-}
-
-ResolvingLoadBalancingPolicy::~ResolvingLoadBalancingPolicy() {
- GPR_ASSERT(resolver_ == nullptr);
- GPR_ASSERT(lb_policy_ == nullptr);
-}
-
-void ResolvingLoadBalancingPolicy::ShutdownLocked() {
- if (resolver_ != nullptr) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: shutting down resolver=%p", this,
- resolver_.get());
- }
- resolver_.reset();
- if (lb_policy_ != nullptr) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: shutting down lb_policy=%p", this,
- lb_policy_.get());
- }
- grpc_pollset_set_del_pollset_set(lb_policy_->interested_parties(),
- interested_parties());
- lb_policy_.reset();
- }
- }
-}
-
-void ResolvingLoadBalancingPolicy::ExitIdleLocked() {
- if (lb_policy_ != nullptr) lb_policy_->ExitIdleLocked();
-}
-
-void ResolvingLoadBalancingPolicy::ResetBackoffLocked() {
- if (resolver_ != nullptr) {
- resolver_->ResetBackoffLocked();
- resolver_->RequestReresolutionLocked();
- }
- if (lb_policy_ != nullptr) lb_policy_->ResetBackoffLocked();
-}
-
-void ResolvingLoadBalancingPolicy::OnResolverError(grpc_error* error) {
- if (resolver_ == nullptr) {
- GRPC_ERROR_UNREF(error);
- return;
- }
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: resolver transient failure: %s", this,
- grpc_error_string(error));
- }
- // If we already have an LB policy from a previous resolution
- // result, then we continue to let it set the connectivity state.
- // Otherwise, we go into TRANSIENT_FAILURE.
- if (lb_policy_ == nullptr) {
- grpc_error* state_error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "Resolver transient failure", &error, 1);
- helper_->ResolverTransientFailure(GRPC_ERROR_REF(state_error));
- channel_control_helper()->UpdateState(
- GRPC_CHANNEL_TRANSIENT_FAILURE, grpc_error_to_absl_status(state_error),
- y_absl::make_unique<TransientFailurePicker>(state_error));
- }
- GRPC_ERROR_UNREF(error);
-}
-
-void ResolvingLoadBalancingPolicy::CreateOrUpdateLbPolicyLocked(
- RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config,
- Resolver::Result result) {
- // Construct update.
- UpdateArgs update_args;
- update_args.addresses = std::move(result.addresses);
- update_args.config = std::move(lb_policy_config);
- // Remove the config selector from channel args so that we're not holding
- // unnecessary refs that cause it to be destroyed somewhere other than in the
- // WorkSerializer.
- const char* arg_name = GRPC_ARG_CONFIG_SELECTOR;
- update_args.args =
- grpc_channel_args_copy_and_remove(result.args, &arg_name, 1);
- // Create policy if needed.
- if (lb_policy_ == nullptr) {
- lb_policy_ = CreateLbPolicyLocked(*update_args.args);
- }
- // Update the policy.
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: Updating child policy %p", this,
- lb_policy_.get());
- }
- lb_policy_->UpdateLocked(std::move(update_args));
-}
-
-// Creates a new LB policy.
-OrphanablePtr<LoadBalancingPolicy>
-ResolvingLoadBalancingPolicy::CreateLbPolicyLocked(
- const grpc_channel_args& args) {
- LoadBalancingPolicy::Args lb_policy_args;
- lb_policy_args.work_serializer = work_serializer();
- lb_policy_args.channel_control_helper =
- y_absl::make_unique<ResolvingControlHelper>(Ref());
- lb_policy_args.args = &args;
- OrphanablePtr<LoadBalancingPolicy> lb_policy =
- MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args), tracer_);
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: created new LB policy %p", this,
- lb_policy.get());
- }
- grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
- interested_parties());
- return lb_policy;
-}
-
-void ResolvingLoadBalancingPolicy::MaybeAddTraceMessagesForAddressChangesLocked(
- bool resolution_contains_addresses, TraceStringVector* trace_strings) {
- if (!resolution_contains_addresses &&
- previous_resolution_contained_addresses_) {
- trace_strings->push_back("Address list became empty");
- } else if (resolution_contains_addresses &&
- !previous_resolution_contained_addresses_) {
- trace_strings->push_back("Address list became non-empty");
- }
- previous_resolution_contained_addresses_ = resolution_contains_addresses;
-}
-
-void ResolvingLoadBalancingPolicy::ConcatenateAndAddChannelTraceLocked(
- const TraceStringVector& trace_strings) const {
- if (!trace_strings.empty()) {
- TString message =
- y_absl::StrCat("Resolution event: ", y_absl::StrJoin(trace_strings, ", "));
- channel_control_helper()->AddTraceEvent(ChannelControlHelper::TRACE_INFO,
- message);
- }
-}
-
-void ResolvingLoadBalancingPolicy::OnResolverResultChangedLocked(
- Resolver::Result result) {
- // Handle race conditions.
- if (resolver_ == nullptr) return;
- if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
- gpr_log(GPR_INFO, "resolving_lb=%p: got resolver result", this);
- }
- // We only want to trace the address resolution in the follow cases:
- // (a) Address resolution resulted in service config change.
- // (b) Address resolution that causes number of backends to go from
- // zero to non-zero.
- // (c) Address resolution that causes number of backends to go from
- // non-zero to zero.
- // (d) Address resolution that causes a new LB policy to be created.
- //
- // We track a list of strings to eventually be concatenated and traced.
- TraceStringVector trace_strings;
- MaybeAddTraceMessagesForAddressChangesLocked(!result.addresses.empty(),
- &trace_strings);
- // The result of grpc_error_string() is owned by the error itself.
- // We're storing that string in trace_strings, so we need to make sure
- // that the error lives until we're done with the string.
- grpc_error* service_config_error =
- GRPC_ERROR_REF(result.service_config_error);
- if (service_config_error != GRPC_ERROR_NONE) {
- trace_strings.push_back(grpc_error_string(service_config_error));
- }
- // Choose the service config.
- ChannelConfigHelper::ChooseServiceConfigResult service_config_result;
- if (helper_ != nullptr) {
- service_config_result = helper_->ChooseServiceConfig(result);
- } else {
- service_config_result.lb_policy_config = child_lb_config_;
- }
- if (service_config_result.no_valid_service_config) {
- // We received an invalid service config and we don't have a
- // previous service config to fall back to.
- OnResolverError(GRPC_ERROR_REF(service_config_error));
- trace_strings.push_back("no valid service config");
- } else {
- // Create or update LB policy, as needed.
- CreateOrUpdateLbPolicyLocked(
- std::move(service_config_result.lb_policy_config), std::move(result));
- if (service_config_result.service_config_changed) {
- // Tell channel to start using new service config for calls.
- // This needs to happen after the LB policy has been updated, since
- // the ConfigSelector may need the LB policy to know about new
- // destinations before it can send RPCs to those destinations.
- if (helper_ != nullptr) helper_->StartUsingServiceConfigForCalls();
- // TODO(ncteisen): might be worth somehow including a snippet of the
- // config in the trace, at the risk of bloating the trace logs.
- trace_strings.push_back("Service config changed");
- }
- }
- // Add channel trace event.
- ConcatenateAndAddChannelTraceLocked(trace_strings);
- GRPC_ERROR_UNREF(service_config_error);
-}
-
-} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.h
deleted file mode 100644
index 1bd1db8b789..00000000000
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/resolving_lb_policy.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * Copyright 2018 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVING_LB_POLICY_H
-#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVING_LB_POLICY_H
-
-#include <grpc/support/port_platform.h>
-
-#include "y_absl/container/inlined_vector.h"
-
-#include "src/core/ext/filters/client_channel/config_selector.h"
-#include "src/core/ext/filters/client_channel/lb_policy.h"
-#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
-#include "src/core/ext/filters/client_channel/resolver.h"
-#include "src/core/lib/channel/channel_args.h"
-#include "src/core/lib/channel/channel_stack.h"
-#include "src/core/lib/debug/trace.h"
-#include "src/core/lib/gprpp/orphanable.h"
-#include "src/core/lib/iomgr/call_combiner.h"
-#include "src/core/lib/iomgr/closure.h"
-#include "src/core/lib/iomgr/polling_entity.h"
-#include "src/core/lib/iomgr/pollset_set.h"
-#include "src/core/lib/transport/connectivity_state.h"
-#include "src/core/lib/transport/metadata_batch.h"
-
-namespace grpc_core {
-
-// An LB policy that wraps a resolver and a child LB policy to make use
-// of the addresses returned by the resolver.
-//
-// When used in the client_channel code, the resolver will attempt to
-// fetch the service config, and the child LB policy name and config
-// will be determined based on the service config.
-//
-// When used in an LB policy implementation that needs to do another
-// round of resolution before creating a child policy, the resolver does
-// not fetch the service config, and the caller must pre-determine the
-// child LB policy and config to use.
-class ResolvingLoadBalancingPolicy : public LoadBalancingPolicy {
- public:
- class ChannelConfigHelper {
- public:
- struct ChooseServiceConfigResult {
- // Set to true if the service config has changed since the last result.
- bool service_config_changed = false;
- // Set to true if we don't have a valid service config to use.
- // This tells the ResolvingLoadBalancingPolicy to put the channel
- // into TRANSIENT_FAILURE.
- bool no_valid_service_config = false;
- // The LB policy config to use.
- RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config;
- };
-
- virtual ~ChannelConfigHelper() = default;
-
- // Chooses the service config for the channel.
- virtual ChooseServiceConfigResult ChooseServiceConfig(
- const Resolver::Result& result) = 0;
-
- // Starts using the service config for calls.
- virtual void StartUsingServiceConfigForCalls() = 0;
-
- // Indicates a resolver transient failure.
- virtual void ResolverTransientFailure(grpc_error* error) = 0;
- };
-
- ResolvingLoadBalancingPolicy(Args args, TraceFlag* tracer,
- grpc_core::UniquePtr<char> target_uri,
- ChannelConfigHelper* helper);
-
- virtual const char* name() const override { return "resolving_lb"; }
-
- // No-op -- should never get updates from the channel.
- // TODO(roth): Need to support updating child LB policy's config for xds
- // use case.
- void UpdateLocked(UpdateArgs /*args*/) override {}
-
- void ExitIdleLocked() override;
-
- void ResetBackoffLocked() override;
-
- private:
- using TraceStringVector = y_absl::InlinedVector<const char*, 3>;
-
- class ResolverResultHandler;
- class ResolvingControlHelper;
-
- ~ResolvingLoadBalancingPolicy();
-
- void ShutdownLocked() override;
-
- void OnResolverError(grpc_error* error);
- void CreateOrUpdateLbPolicyLocked(
- RefCountedPtr<LoadBalancingPolicy::Config> lb_policy_config,
- Resolver::Result result);
- OrphanablePtr<LoadBalancingPolicy> CreateLbPolicyLocked(
- const grpc_channel_args& args);
- void MaybeAddTraceMessagesForAddressChangesLocked(
- bool resolution_contains_addresses, TraceStringVector* trace_strings);
- void ConcatenateAndAddChannelTraceLocked(
- const TraceStringVector& trace_strings) const;
- void OnResolverResultChangedLocked(Resolver::Result result);
-
- // Passed in from caller at construction time.
- TraceFlag* tracer_;
- grpc_core::UniquePtr<char> target_uri_;
- ChannelConfigHelper* helper_;
-
- // Resolver and associated state.
- OrphanablePtr<Resolver> resolver_;
- bool previous_resolution_contained_addresses_ = false;
-
- // Determined by resolver results.
- grpc_core::UniquePtr<char> child_policy_name_;
- RefCountedPtr<LoadBalancingPolicy::Config> child_lb_config_;
-
- // Child LB policy.
- OrphanablePtr<LoadBalancingPolicy> lb_policy_;
-};
-
-} // namespace grpc_core
-
-#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_RESOLVING_LB_POLICY_H */
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.cc
index 65df8034d71..98ca9006216 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.cc
@@ -23,6 +23,8 @@
#include <limits.h>
#include <string.h>
+#include <util/generic/string.h>
+
#include <grpc/support/alloc.h>
#include <grpc/support/atm.h>
#include <grpc/support/string_util.h>
@@ -164,20 +166,20 @@ void ServerRetryThrottleMap::Shutdown() {
}
RefCountedPtr<ServerRetryThrottleData> ServerRetryThrottleMap::GetDataForServer(
- const char* server_name, intptr_t max_milli_tokens,
+ const TString& server_name, intptr_t max_milli_tokens,
intptr_t milli_token_ratio) {
RefCountedPtr<ServerRetryThrottleData> result;
gpr_mu_lock(&g_mu);
ServerRetryThrottleData* throttle_data =
static_cast<ServerRetryThrottleData*>(
- grpc_avl_get(g_avl, const_cast<char*>(server_name), nullptr));
+ grpc_avl_get(g_avl, const_cast<char*>(server_name.c_str()), nullptr));
if (throttle_data == nullptr ||
throttle_data->max_milli_tokens() != max_milli_tokens ||
throttle_data->milli_token_ratio() != milli_token_ratio) {
// Entry not found, or found with old parameters. Create a new one.
result = MakeRefCounted<ServerRetryThrottleData>(
max_milli_tokens, milli_token_ratio, throttle_data);
- g_avl = grpc_avl_add(g_avl, gpr_strdup(server_name),
+ g_avl = grpc_avl_add(g_avl, gpr_strdup(server_name.c_str()),
result->Ref().release(), nullptr);
} else {
// Entry found. Return a new ref to it.
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.h
index 897a617f59a..859c8313d3f 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_throttle.h
@@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
+#include <util/generic/string.h>
+
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted.h"
@@ -32,7 +34,7 @@ class ServerRetryThrottleData : public RefCounted<ServerRetryThrottleData> {
public:
ServerRetryThrottleData(intptr_t max_milli_tokens, intptr_t milli_token_ratio,
ServerRetryThrottleData* old_throttle_data);
- ~ServerRetryThrottleData();
+ ~ServerRetryThrottleData() override;
/// Records a failure. Returns true if it's okay to send a retry.
bool RecordFailure();
@@ -67,7 +69,7 @@ class ServerRetryThrottleMap {
/// Returns the failure data for \a server_name, creating a new entry if
/// needed.
static RefCountedPtr<ServerRetryThrottleData> GetDataForServer(
- const char* server_name, intptr_t max_milli_tokens,
+ const TString& server_name, intptr_t max_milli_tokens,
intptr_t milli_token_ratio);
};
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.cc
index 89ea1d9055a..6efb9a0a39d 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.cc
@@ -32,6 +32,12 @@
namespace grpc_core {
//
+// ServerAddressWeightAttribute
+//
+const char* ServerAddressWeightAttribute::kServerAddressWeightAttributeKey =
+ "server_address_weight";
+
+//
// ServerAddress
//
@@ -55,6 +61,9 @@ ServerAddress::ServerAddress(const ServerAddress& other)
}
}
ServerAddress& ServerAddress::operator=(const ServerAddress& other) {
+ if (&other == this) {
+ return *this;
+ }
address_ = other.address_;
grpc_channel_args_destroy(args_);
args_ = grpc_channel_args_copy(other.args_);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.h
index f9359730fae..59b404e6ef8 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/server_address.h
@@ -25,8 +25,10 @@
#include <memory>
#include "y_absl/container/inlined_vector.h"
+#include "y_absl/strings/str_format.h"
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/iomgr/resolve_address.h"
namespace grpc_core {
@@ -97,10 +99,6 @@ class ServerAddress {
TString ToString() const;
private:
- // Allows the channel to access the attributes without knowing the keys.
- // (We intentionally do not allow LB policies to do this.)
- friend class ChannelServerAddressPeer;
-
grpc_resolved_address address_;
grpc_channel_args* args_;
std::map<const char*, std::unique_ptr<AttributeInterface>> attributes_;
@@ -112,6 +110,35 @@ class ServerAddress {
typedef y_absl::InlinedVector<ServerAddress, 1> ServerAddressList;
+//
+// ServerAddressWeightAttribute
+//
+class ServerAddressWeightAttribute : public ServerAddress::AttributeInterface {
+ public:
+ static const char* kServerAddressWeightAttributeKey;
+
+ explicit ServerAddressWeightAttribute(uint32_t weight) : weight_(weight) {}
+
+ uint32_t weight() const { return weight_; }
+
+ std::unique_ptr<AttributeInterface> Copy() const override {
+ return y_absl::make_unique<ServerAddressWeightAttribute>(weight_);
+ }
+
+ int Cmp(const AttributeInterface* other) const override {
+ const auto* other_locality_attr =
+ static_cast<const ServerAddressWeightAttribute*>(other);
+ return GPR_ICMP(weight_, other_locality_attr->weight_);
+ }
+
+ TString ToString() const override {
+ return y_absl::StrFormat("%d", weight_);
+ }
+
+ private:
+ uint32_t weight_;
+};
+
} // namespace grpc_core
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_SERVER_ADDRESS_H */
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.cc
index 9ff2ad942b9..3f5483e7720 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.cc
@@ -204,7 +204,9 @@ TString ServiceConfig::ParseJsonMethodName(const Json& json,
const ServiceConfigParser::ParsedConfigVector*
ServiceConfig::GetMethodParsedConfigVector(const grpc_slice& path) const {
- if (parsed_method_configs_map_.empty()) return nullptr;
+ if (parsed_method_configs_map_.empty()) {
+ return default_method_config_vector_;
+ }
// Try looking up the full path in the map.
auto it = parsed_method_configs_map_.find(path);
if (it != parsed_method_configs_map_.end()) return it->second;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.h
index 718f6026c2d..86d71f18316 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config.h
@@ -71,7 +71,7 @@ class ServiceConfig : public RefCounted<ServiceConfig> {
ServiceConfig(const grpc_channel_args* args, TString json_string,
Json json, grpc_error** error);
- ~ServiceConfig();
+ ~ServiceConfig() override;
const TString& json_string() const { return json_string_; }
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config_call_data.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config_call_data.h
index b6b5b73ce08..0ddbc3698bc 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config_call_data.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/service_config_call_data.h
@@ -19,6 +19,10 @@
#include <grpc/support/port_platform.h>
+#include <map>
+
+#include "y_absl/strings/string_view.h"
+
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/ext/filters/client_channel/service_config_parser.h"
#include "src/core/lib/channel/context.h"
@@ -35,13 +39,22 @@ class ServiceConfigCallData {
ServiceConfigCallData(
RefCountedPtr<ServiceConfig> service_config,
const ServiceConfigParser::ParsedConfigVector* method_configs,
+ std::map<const char*, y_absl::string_view> call_attributes,
grpc_call_context_element* call_context)
: service_config_(std::move(service_config)),
- method_configs_(method_configs) {
+ method_configs_(method_configs),
+ call_attributes_(std::move(call_attributes)) {
call_context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value = this;
call_context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].destroy = Destroy;
}
+ ServiceConfigCallData(
+ RefCountedPtr<ServiceConfig> service_config,
+ const ServiceConfigParser::ParsedConfigVector* method_configs,
+ grpc_call_context_element* call_context)
+ : ServiceConfigCallData(std::move(service_config), method_configs, {},
+ call_context) {}
+
ServiceConfig* service_config() { return service_config_.get(); }
ServiceConfigParser::ParsedConfig* GetMethodParsedConfig(size_t index) const {
@@ -53,6 +66,10 @@ class ServiceConfigCallData {
return service_config_->GetGlobalParsedConfig(index);
}
+ const std::map<const char*, y_absl::string_view>& call_attributes() const {
+ return call_attributes_;
+ }
+
private:
static void Destroy(void* ptr) {
ServiceConfigCallData* self = static_cast<ServiceConfigCallData*>(ptr);
@@ -61,6 +78,7 @@ class ServiceConfigCallData {
RefCountedPtr<ServiceConfig> service_config_;
const ServiceConfigParser::ParsedConfigVector* method_configs_ = nullptr;
+ std::map<const char*, y_absl::string_view> call_attributes_;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.cc
index 39800681e0f..50738085f5b 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.cc
@@ -87,7 +87,10 @@ DebugOnlyTraceFlag grpc_trace_subchannel_refcount(false, "subchannel_refcount");
ConnectedSubchannel::ConnectedSubchannel(
grpc_channel_stack* channel_stack, const grpc_channel_args* args,
RefCountedPtr<channelz::SubchannelNode> channelz_subchannel)
- : RefCounted<ConnectedSubchannel>(&grpc_trace_subchannel_refcount),
+ : RefCounted<ConnectedSubchannel>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_trace_subchannel_refcount)
+ ? "ConnectedSubchannel"
+ : nullptr),
channel_stack_(channel_stack),
args_(grpc_channel_args_copy(args)),
channelz_subchannel_(std::move(channelz_subchannel)) {}
@@ -118,18 +121,9 @@ void ConnectedSubchannel::Ping(grpc_closure* on_initiate,
elem->filter->start_transport_op(elem, op);
}
-size_t ConnectedSubchannel::GetInitialCallSizeEstimate(
- size_t parent_data_size) const {
- size_t allocation_size =
- GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(SubchannelCall));
- if (parent_data_size > 0) {
- allocation_size +=
- GPR_ROUND_UP_TO_ALIGNMENT_SIZE(channel_stack_->call_stack_size) +
- parent_data_size;
- } else {
- allocation_size += channel_stack_->call_stack_size;
- }
- return allocation_size;
+size_t ConnectedSubchannel::GetInitialCallSizeEstimate() const {
+ return GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(SubchannelCall)) +
+ channel_stack_->call_stack_size;
}
//
@@ -139,8 +133,7 @@ size_t ConnectedSubchannel::GetInitialCallSizeEstimate(
RefCountedPtr<SubchannelCall> SubchannelCall::Create(Args args,
grpc_error** error) {
const size_t allocation_size =
- args.connected_subchannel->GetInitialCallSizeEstimate(
- args.parent_data_size);
+ args.connected_subchannel->GetInitialCallSizeEstimate();
Arena* arena = args.arena;
return RefCountedPtr<SubchannelCall>(new (
arena->Alloc(allocation_size)) SubchannelCall(std::move(args), error));
@@ -184,12 +177,6 @@ void SubchannelCall::StartTransportStreamOpBatch(
top_elem->filter->start_transport_stream_op_batch(top_elem, batch);
}
-void* SubchannelCall::GetParentData() {
- grpc_channel_stack* chanstk = connected_subchannel_->channel_stack();
- return (char*)this + GPR_ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(SubchannelCall)) +
- GPR_ROUND_UP_TO_ALIGNMENT_SIZE(chanstk->call_stack_size);
-}
-
grpc_call_stack* SubchannelCall::GetCallStack() {
return SUBCHANNEL_CALL_TO_CALL_STACK(this);
}
@@ -316,20 +303,17 @@ class Subchannel::ConnectedSubchannelStateWatcher
: public AsyncConnectivityStateWatcherInterface {
public:
// Must be instantiated while holding c->mu.
- explicit ConnectedSubchannelStateWatcher(Subchannel* c) : subchannel_(c) {
- // Steal subchannel ref for connecting.
- GRPC_SUBCHANNEL_WEAK_REF(subchannel_, "state_watcher");
- GRPC_SUBCHANNEL_WEAK_UNREF(subchannel_, "connecting");
- }
+ explicit ConnectedSubchannelStateWatcher(WeakRefCountedPtr<Subchannel> c)
+ : subchannel_(std::move(c)) {}
- ~ConnectedSubchannelStateWatcher() {
- GRPC_SUBCHANNEL_WEAK_UNREF(subchannel_, "state_watcher");
+ ~ConnectedSubchannelStateWatcher() override {
+ subchannel_.reset(DEBUG_LOCATION, "state_watcher");
}
private:
void OnConnectivityStateChange(grpc_connectivity_state new_state,
const y_absl::Status& status) override {
- Subchannel* c = subchannel_;
+ Subchannel* c = subchannel_.get();
MutexLock lock(&c->mu_);
switch (new_state) {
case GRPC_CHANNEL_TRANSIENT_FAILURE:
@@ -370,7 +354,7 @@ class Subchannel::ConnectedSubchannelStateWatcher
}
}
- Subchannel* subchannel_;
+ WeakRefCountedPtr<Subchannel> subchannel_;
};
// Asynchronously notifies the \a watcher of a change in the connectvity state
@@ -388,17 +372,17 @@ class Subchannel::AsyncWatcherNotifierLocked {
}
watcher_->PushConnectivityStateChange(
{state, status, std::move(connected_subchannel)});
- ExecCtx::Run(
- DEBUG_LOCATION,
- GRPC_CLOSURE_INIT(&closure_,
- [](void* arg, grpc_error* /*error*/) {
- auto* self =
- static_cast<AsyncWatcherNotifierLocked*>(arg);
- self->watcher_->OnConnectivityStateChange();
- delete self;
- },
- this, nullptr),
- GRPC_ERROR_NONE);
+ ExecCtx::Run(DEBUG_LOCATION,
+ GRPC_CLOSURE_INIT(
+ &closure_,
+ [](void* arg, grpc_error* /*error*/) {
+ auto* self =
+ static_cast<AsyncWatcherNotifierLocked*>(arg);
+ self->watcher_->OnConnectivityStateChange();
+ delete self;
+ },
+ this, nullptr),
+ GRPC_ERROR_NONE);
}
private:
@@ -437,24 +421,23 @@ void Subchannel::ConnectivityStateWatcherList::NotifyLocked(
class Subchannel::HealthWatcherMap::HealthWatcher
: public AsyncConnectivityStateWatcherInterface {
public:
- HealthWatcher(Subchannel* c,
- grpc_core::UniquePtr<char> health_check_service_name,
- grpc_connectivity_state subchannel_state)
- : subchannel_(c),
+ HealthWatcher(WeakRefCountedPtr<Subchannel> c,
+ TString health_check_service_name)
+ : subchannel_(std::move(c)),
health_check_service_name_(std::move(health_check_service_name)),
- state_(subchannel_state == GRPC_CHANNEL_READY ? GRPC_CHANNEL_CONNECTING
- : subchannel_state) {
- GRPC_SUBCHANNEL_WEAK_REF(subchannel_, "health_watcher");
+ state_(subchannel_->state_ == GRPC_CHANNEL_READY
+ ? GRPC_CHANNEL_CONNECTING
+ : subchannel_->state_) {
// If the subchannel is already connected, start health checking.
- if (subchannel_state == GRPC_CHANNEL_READY) StartHealthCheckingLocked();
+ if (subchannel_->state_ == GRPC_CHANNEL_READY) StartHealthCheckingLocked();
}
- ~HealthWatcher() {
- GRPC_SUBCHANNEL_WEAK_UNREF(subchannel_, "health_watcher");
+ ~HealthWatcher() override {
+ subchannel_.reset(DEBUG_LOCATION, "health_watcher");
}
- const char* health_check_service_name() const {
- return health_check_service_name_.get();
+ const TString& health_check_service_name() const {
+ return health_check_service_name_;
}
grpc_connectivity_state state() const { return state_; }
@@ -463,7 +446,8 @@ class Subchannel::HealthWatcherMap::HealthWatcher
grpc_connectivity_state initial_state,
RefCountedPtr<Subchannel::ConnectivityStateWatcherInterface> watcher) {
if (state_ != initial_state) {
- new AsyncWatcherNotifierLocked(watcher, subchannel_, state_, status_);
+ new AsyncWatcherNotifierLocked(watcher, subchannel_.get(), state_,
+ status_);
}
watcher_list_.AddWatcherLocked(std::move(watcher));
}
@@ -475,7 +459,8 @@ class Subchannel::HealthWatcherMap::HealthWatcher
bool HasWatchers() const { return !watcher_list_.empty(); }
- void NotifyLocked(grpc_connectivity_state state, const y_absl::Status& status) {
+ void NotifyLocked(grpc_connectivity_state state, const y_absl::Status& status)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(subchannel_->mu_) {
if (state == GRPC_CHANNEL_READY) {
// If we had not already notified for CONNECTING state, do so now.
// (We may have missed this earlier, because if the transition
@@ -484,14 +469,14 @@ class Subchannel::HealthWatcherMap::HealthWatcher
if (state_ != GRPC_CHANNEL_CONNECTING) {
state_ = GRPC_CHANNEL_CONNECTING;
status_ = status;
- watcher_list_.NotifyLocked(subchannel_, state_, status);
+ watcher_list_.NotifyLocked(subchannel_.get(), state_, status);
}
// If we've become connected, start health checking.
StartHealthCheckingLocked();
} else {
state_ = state;
status_ = status;
- watcher_list_.NotifyLocked(subchannel_, state_, status);
+ watcher_list_.NotifyLocked(subchannel_.get(), state_, status);
// We're not connected, so stop health checking.
health_check_client_.reset();
}
@@ -510,19 +495,20 @@ class Subchannel::HealthWatcherMap::HealthWatcher
if (new_state != GRPC_CHANNEL_SHUTDOWN && health_check_client_ != nullptr) {
state_ = new_state;
status_ = status;
- watcher_list_.NotifyLocked(subchannel_, new_state, status);
+ watcher_list_.NotifyLocked(subchannel_.get(), new_state, status);
}
}
- void StartHealthCheckingLocked() {
+ void StartHealthCheckingLocked()
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(subchannel_->mu_) {
GPR_ASSERT(health_check_client_ == nullptr);
health_check_client_ = MakeOrphanable<HealthCheckClient>(
- health_check_service_name_.get(), subchannel_->connected_subchannel_,
+ health_check_service_name_, subchannel_->connected_subchannel_,
subchannel_->pollset_set_, subchannel_->channelz_node_, Ref());
}
- Subchannel* subchannel_;
- grpc_core::UniquePtr<char> health_check_service_name_;
+ WeakRefCountedPtr<Subchannel> subchannel_;
+ TString health_check_service_name_;
OrphanablePtr<HealthCheckClient> health_check_client_;
grpc_connectivity_state state_;
y_absl::Status status_;
@@ -534,19 +520,19 @@ class Subchannel::HealthWatcherMap::HealthWatcher
//
void Subchannel::HealthWatcherMap::AddWatcherLocked(
- Subchannel* subchannel, grpc_connectivity_state initial_state,
- grpc_core::UniquePtr<char> health_check_service_name,
+ WeakRefCountedPtr<Subchannel> subchannel,
+ grpc_connectivity_state initial_state,
+ const TString& health_check_service_name,
RefCountedPtr<ConnectivityStateWatcherInterface> watcher) {
// If the health check service name is not already present in the map,
// add it.
- auto it = map_.find(health_check_service_name.get());
+ auto it = map_.find(health_check_service_name);
HealthWatcher* health_watcher;
if (it == map_.end()) {
- const char* key = health_check_service_name.get();
- auto w = MakeOrphanable<HealthWatcher>(
- subchannel, std::move(health_check_service_name), subchannel->state_);
+ auto w = MakeOrphanable<HealthWatcher>(std::move(subchannel),
+ health_check_service_name);
health_watcher = w.get();
- map_[key] = std::move(w);
+ map_.emplace(health_check_service_name, std::move(w));
} else {
health_watcher = it->second.get();
}
@@ -555,7 +541,7 @@ void Subchannel::HealthWatcherMap::AddWatcherLocked(
}
void Subchannel::HealthWatcherMap::RemoveWatcherLocked(
- const char* health_check_service_name,
+ const TString& health_check_service_name,
ConnectivityStateWatcherInterface* watcher) {
auto it = map_.find(health_check_service_name);
GPR_ASSERT(it != map_.end());
@@ -574,7 +560,7 @@ void Subchannel::HealthWatcherMap::NotifyLocked(grpc_connectivity_state state,
grpc_connectivity_state
Subchannel::HealthWatcherMap::CheckConnectivityStateLocked(
- Subchannel* subchannel, const char* health_check_service_name) {
+ Subchannel* subchannel, const TString& health_check_service_name) {
auto it = map_.find(health_check_service_name);
if (it == map_.end()) {
// If the health check service name is not found in the map, we're
@@ -662,14 +648,16 @@ Subchannel::ConnectivityStateWatcherInterface::PopConnectivityStateChange() {
return state_change;
}
-Subchannel::Subchannel(SubchannelKey* key,
+Subchannel::Subchannel(SubchannelKey key,
OrphanablePtr<SubchannelConnector> connector,
const grpc_channel_args* args)
- : key_(key),
+ : DualRefCounted<Subchannel>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_trace_subchannel_refcount) ? "Subchannel"
+ : nullptr),
+ key_(std::move(key)),
connector_(std::move(connector)),
backoff_(ParseArgsForBackoffValues(args, &min_connect_timeout_ms_)) {
GRPC_STATS_INC_CLIENT_SUBCHANNELS_CREATED();
- gpr_atm_no_barrier_store(&ref_pair_, 1 << INTERNAL_REF_BITS);
pollset_set_ = grpc_pollset_set_create();
grpc_resolved_address* addr =
static_cast<grpc_resolved_address*>(gpr_malloc(sizeof(*addr)));
@@ -699,7 +687,7 @@ Subchannel::Subchannel(SubchannelKey* key,
const grpc_integer_options options = {
GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT, 0, INT_MAX};
size_t channel_tracer_max_memory =
- (size_t)grpc_channel_arg_get_integer(arg, options);
+ static_cast<size_t>(grpc_channel_arg_get_integer(arg, options));
if (channelz_enabled) {
channelz_node_ = MakeRefCounted<channelz::SubchannelNode>(
GetTargetAddress(), channel_tracer_max_memory);
@@ -719,26 +707,26 @@ Subchannel::~Subchannel() {
grpc_channel_args_destroy(args_);
connector_.reset();
grpc_pollset_set_destroy(pollset_set_);
- delete key_;
}
-Subchannel* Subchannel::Create(OrphanablePtr<SubchannelConnector> connector,
- const grpc_channel_args* args) {
- SubchannelKey* key = new SubchannelKey(args);
+RefCountedPtr<Subchannel> Subchannel::Create(
+ OrphanablePtr<SubchannelConnector> connector,
+ const grpc_channel_args* args) {
+ SubchannelKey key(args);
SubchannelPoolInterface* subchannel_pool =
SubchannelPoolInterface::GetSubchannelPoolFromChannelArgs(args);
GPR_ASSERT(subchannel_pool != nullptr);
- Subchannel* c = subchannel_pool->FindSubchannel(key);
+ RefCountedPtr<Subchannel> c = subchannel_pool->FindSubchannel(key);
if (c != nullptr) {
- delete key;
return c;
}
- c = new Subchannel(key, std::move(connector), args);
+ c = MakeRefCounted<Subchannel>(std::move(key), std::move(connector), args);
// Try to register the subchannel before setting the subchannel pool.
// Otherwise, in case of a registration race, unreffing c in
// RegisterSubchannel() will cause c to be tried to be unregistered, while
// its key maps to a different subchannel.
- Subchannel* registered = subchannel_pool->RegisterSubchannel(key, c);
+ RefCountedPtr<Subchannel> registered =
+ subchannel_pool->RegisterSubchannel(c->key_, c);
if (registered == c) c->subchannel_pool_ = subchannel_pool->Ref();
return registered;
}
@@ -762,68 +750,6 @@ void Subchannel::ThrottleKeepaliveTime(int new_keepalive_time) {
}
}
-Subchannel* Subchannel::Ref(GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
- gpr_atm old_refs;
- old_refs = RefMutate((1 << INTERNAL_REF_BITS),
- 0 GRPC_SUBCHANNEL_REF_MUTATE_PURPOSE("STRONG_REF"));
- GPR_ASSERT((old_refs & STRONG_REF_MASK) != 0);
- return this;
-}
-
-void Subchannel::Unref(GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
- gpr_atm old_refs;
- // add a weak ref and subtract a strong ref (atomically)
- old_refs = RefMutate(
- static_cast<gpr_atm>(1) - static_cast<gpr_atm>(1 << INTERNAL_REF_BITS),
- 1 GRPC_SUBCHANNEL_REF_MUTATE_PURPOSE("STRONG_UNREF"));
- if ((old_refs & STRONG_REF_MASK) == (1 << INTERNAL_REF_BITS)) {
- Disconnect();
- }
- GRPC_SUBCHANNEL_WEAK_UNREF(this, "strong-unref");
-}
-
-Subchannel* Subchannel::WeakRef(GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
- gpr_atm old_refs;
- old_refs = RefMutate(1, 0 GRPC_SUBCHANNEL_REF_MUTATE_PURPOSE("WEAK_REF"));
- GPR_ASSERT(old_refs != 0);
- return this;
-}
-
-namespace {
-
-void subchannel_destroy(void* arg, grpc_error* /*error*/) {
- Subchannel* self = static_cast<Subchannel*>(arg);
- delete self;
-}
-
-} // namespace
-
-void Subchannel::WeakUnref(GRPC_SUBCHANNEL_REF_EXTRA_ARGS) {
- gpr_atm old_refs;
- old_refs = RefMutate(-static_cast<gpr_atm>(1),
- 1 GRPC_SUBCHANNEL_REF_MUTATE_PURPOSE("WEAK_UNREF"));
- if (old_refs == 1) {
- ExecCtx::Run(DEBUG_LOCATION,
- GRPC_CLOSURE_CREATE(subchannel_destroy, this,
- grpc_schedule_on_exec_ctx),
- GRPC_ERROR_NONE);
- }
-}
-
-Subchannel* Subchannel::RefFromWeakRef() {
- for (;;) {
- gpr_atm old_refs = gpr_atm_acq_load(&ref_pair_);
- if (old_refs >= (1 << INTERNAL_REF_BITS)) {
- gpr_atm new_refs = old_refs + (1 << INTERNAL_REF_BITS);
- if (gpr_atm_rel_cas(&ref_pair_, old_refs, new_refs)) {
- return this;
- }
- } else {
- return nullptr;
- }
- }
-}
-
const char* Subchannel::GetTargetAddress() {
const grpc_arg* addr_arg =
grpc_channel_args_find(args_, GRPC_ARG_SUBCHANNEL_ADDRESS);
@@ -837,15 +763,15 @@ channelz::SubchannelNode* Subchannel::channelz_node() {
}
grpc_connectivity_state Subchannel::CheckConnectivityState(
- const char* health_check_service_name,
+ const y_absl::optional<TString>& health_check_service_name,
RefCountedPtr<ConnectedSubchannel>* connected_subchannel) {
MutexLock lock(&mu_);
grpc_connectivity_state state;
- if (health_check_service_name == nullptr) {
+ if (!health_check_service_name.has_value()) {
state = state_;
} else {
state = health_watcher_map_.CheckConnectivityStateLocked(
- this, health_check_service_name);
+ this, *health_check_service_name);
}
if (connected_subchannel != nullptr && state == GRPC_CHANNEL_READY) {
*connected_subchannel = connected_subchannel_;
@@ -855,37 +781,38 @@ grpc_connectivity_state Subchannel::CheckConnectivityState(
void Subchannel::WatchConnectivityState(
grpc_connectivity_state initial_state,
- grpc_core::UniquePtr<char> health_check_service_name,
+ const y_absl::optional<TString>& health_check_service_name,
RefCountedPtr<ConnectivityStateWatcherInterface> watcher) {
MutexLock lock(&mu_);
grpc_pollset_set* interested_parties = watcher->interested_parties();
if (interested_parties != nullptr) {
grpc_pollset_set_add_pollset_set(pollset_set_, interested_parties);
}
- if (health_check_service_name == nullptr) {
+ if (!health_check_service_name.has_value()) {
if (state_ != initial_state) {
new AsyncWatcherNotifierLocked(watcher, this, state_, status_);
}
watcher_list_.AddWatcherLocked(std::move(watcher));
} else {
- health_watcher_map_.AddWatcherLocked(this, initial_state,
- std::move(health_check_service_name),
- std::move(watcher));
+ health_watcher_map_.AddWatcherLocked(
+ WeakRef(DEBUG_LOCATION, "health_watcher"), initial_state,
+ *health_check_service_name, std::move(watcher));
}
}
void Subchannel::CancelConnectivityStateWatch(
- const char* health_check_service_name,
+ const y_absl::optional<TString>& health_check_service_name,
ConnectivityStateWatcherInterface* watcher) {
MutexLock lock(&mu_);
grpc_pollset_set* interested_parties = watcher->interested_parties();
if (interested_parties != nullptr) {
grpc_pollset_set_del_pollset_set(pollset_set_, interested_parties);
}
- if (health_check_service_name == nullptr) {
+ if (!health_check_service_name.has_value()) {
watcher_list_.RemoveWatcherLocked(watcher);
} else {
- health_watcher_map_.RemoveWatcherLocked(health_check_service_name, watcher);
+ health_watcher_map_.RemoveWatcherLocked(*health_check_service_name,
+ watcher);
}
}
@@ -906,10 +833,25 @@ void Subchannel::ResetBackoff() {
}
}
+void Subchannel::Orphan() {
+ // The subchannel_pool is only used once here in this subchannel, so the
+ // access can be outside of the lock.
+ if (subchannel_pool_ != nullptr) {
+ subchannel_pool_->UnregisterSubchannel(key_, this);
+ subchannel_pool_.reset();
+ }
+ MutexLock lock(&mu_);
+ GPR_ASSERT(!disconnected_);
+ disconnected_ = true;
+ connector_.reset();
+ connected_subchannel_.reset();
+ health_watcher_map_.ShutdownLocked();
+}
+
grpc_arg Subchannel::CreateSubchannelAddressArg(
const grpc_resolved_address* addr) {
return grpc_channel_arg_string_create(
- (char*)GRPC_ARG_SUBCHANNEL_ADDRESS,
+ const_cast<char*>(GRPC_ARG_SUBCHANNEL_ADDRESS),
gpr_strdup(addr->len > 0 ? grpc_sockaddr_to_uri(addr).c_str() : ""));
}
@@ -925,10 +867,12 @@ const char* Subchannel::GetUriFromSubchannelAddressArg(
namespace {
void UriToSockaddr(const char* uri_str, grpc_resolved_address* addr) {
- grpc_uri* uri = grpc_uri_parse(uri_str, 0 /* suppress_errors */);
- GPR_ASSERT(uri != nullptr);
- if (!grpc_parse_uri(uri, addr)) memset(addr, 0, sizeof(*addr));
- grpc_uri_destroy(uri);
+ y_absl::StatusOr<URI> uri = URI::Parse(uri_str);
+ if (!uri.ok()) {
+ gpr_log(GPR_ERROR, "%s", uri.status().ToString().c_str());
+ GPR_ASSERT(uri.ok());
+ }
+ if (!grpc_parse_uri(*uri, addr)) memset(addr, 0, sizeof(*addr));
}
} // namespace
@@ -997,7 +941,8 @@ void Subchannel::MaybeStartConnectingLocked() {
return;
}
connecting_ = true;
- GRPC_SUBCHANNEL_WEAK_REF(this, "connecting");
+ WeakRef(DEBUG_LOCATION, "connecting")
+ .release(); // ref held by pending connect
if (!backoff_begun_) {
backoff_begun_ = true;
ContinueConnectingLocked();
@@ -1019,10 +964,8 @@ void Subchannel::MaybeStartConnectingLocked() {
}
void Subchannel::OnRetryAlarm(void* arg, grpc_error* error) {
- Subchannel* c = static_cast<Subchannel*>(arg);
- // TODO(soheilhy): Once subchannel refcounting is simplified, we can get use
- // MutexLock instead of ReleasableMutexLock, here.
- ReleasableMutexLock lock(&c->mu_);
+ WeakRefCountedPtr<Subchannel> c(static_cast<Subchannel*>(arg));
+ MutexLock lock(&c->mu_);
c->have_retry_alarm_ = false;
if (c->disconnected_) {
error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING("Disconnected",
@@ -1036,10 +979,9 @@ void Subchannel::OnRetryAlarm(void* arg, grpc_error* error) {
if (error == GRPC_ERROR_NONE) {
gpr_log(GPR_INFO, "Failed to connect to channel, retrying");
c->ContinueConnectingLocked();
- lock.Unlock();
- } else {
- lock.Unlock();
- GRPC_SUBCHANNEL_WEAK_UNREF(c, "connecting");
+ // Still connecting, keep ref around. Note that this stolen ref won't
+ // be dropped without first acquiring c->mu_.
+ c.release();
}
GRPC_ERROR_UNREF(error);
}
@@ -1057,27 +999,23 @@ void Subchannel::ContinueConnectingLocked() {
}
void Subchannel::OnConnectingFinished(void* arg, grpc_error* error) {
- auto* c = static_cast<Subchannel*>(arg);
+ WeakRefCountedPtr<Subchannel> c(static_cast<Subchannel*>(arg));
const grpc_channel_args* delete_channel_args =
c->connecting_result_.channel_args;
- GRPC_SUBCHANNEL_WEAK_REF(c, "on_connecting_finished");
{
MutexLock lock(&c->mu_);
c->connecting_ = false;
if (c->connecting_result_.transport != nullptr &&
c->PublishTransportLocked()) {
// Do nothing, transport was published.
- } else if (c->disconnected_) {
- GRPC_SUBCHANNEL_WEAK_UNREF(c, "connecting");
- } else {
+ } else if (!c->disconnected_) {
gpr_log(GPR_INFO, "Connect failed: %s", grpc_error_string(error));
c->SetConnectivityStateLocked(GRPC_CHANNEL_TRANSIENT_FAILURE,
grpc_error_to_absl_status(error));
- GRPC_SUBCHANNEL_WEAK_UNREF(c, "connecting");
}
}
- GRPC_SUBCHANNEL_WEAK_UNREF(c, "on_connecting_finished");
grpc_channel_args_destroy(delete_channel_args);
+ c.reset(DEBUG_LOCATION, "connecting");
}
namespace {
@@ -1130,39 +1068,11 @@ bool Subchannel::PublishTransportLocked() {
}
// Start watching connected subchannel.
connected_subchannel_->StartWatch(
- pollset_set_, MakeOrphanable<ConnectedSubchannelStateWatcher>(this));
+ pollset_set_, MakeOrphanable<ConnectedSubchannelStateWatcher>(
+ WeakRef(DEBUG_LOCATION, "state_watcher")));
// Report initial state.
SetConnectivityStateLocked(GRPC_CHANNEL_READY, y_absl::Status());
return true;
}
-void Subchannel::Disconnect() {
- // The subchannel_pool is only used once here in this subchannel, so the
- // access can be outside of the lock.
- if (subchannel_pool_ != nullptr) {
- subchannel_pool_->UnregisterSubchannel(key_);
- subchannel_pool_.reset();
- }
- MutexLock lock(&mu_);
- GPR_ASSERT(!disconnected_);
- disconnected_ = true;
- connector_.reset();
- connected_subchannel_.reset();
- health_watcher_map_.ShutdownLocked();
-}
-
-gpr_atm Subchannel::RefMutate(
- gpr_atm delta, int barrier GRPC_SUBCHANNEL_REF_MUTATE_EXTRA_ARGS) {
- gpr_atm old_val = barrier ? gpr_atm_full_fetch_add(&ref_pair_, delta)
- : gpr_atm_no_barrier_fetch_add(&ref_pair_, delta);
-#ifndef NDEBUG
- if (grpc_trace_subchannel_refcount.enabled()) {
- gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG,
- "SUBCHANNEL: %p %12s 0x%" PRIxPTR " -> 0x%" PRIxPTR " [%s]", this,
- purpose, old_val, old_val + delta, reason);
- }
-#endif
- return old_val;
-}
-
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.h
index 0ced846c385..0bca09c8b34 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel.h
@@ -30,7 +30,7 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gprpp/arena.h"
-#include "src/core/lib/gprpp/map.h"
+#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
@@ -42,31 +42,6 @@
// Channel arg containing a URI indicating the address to connect to.
#define GRPC_ARG_SUBCHANNEL_ADDRESS "grpc.subchannel_address"
-// For debugging refcounting.
-#ifndef NDEBUG
-#define GRPC_SUBCHANNEL_REF(p, r) (p)->Ref(__FILE__, __LINE__, (r))
-#define GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(p, r) (p)->RefFromWeakRef()
-#define GRPC_SUBCHANNEL_UNREF(p, r) (p)->Unref(__FILE__, __LINE__, (r))
-#define GRPC_SUBCHANNEL_WEAK_REF(p, r) (p)->WeakRef(__FILE__, __LINE__, (r))
-#define GRPC_SUBCHANNEL_WEAK_UNREF(p, r) (p)->WeakUnref(__FILE__, __LINE__, (r))
-#define GRPC_SUBCHANNEL_REF_EXTRA_ARGS \
- const char *file, int line, const char *reason
-#define GRPC_SUBCHANNEL_REF_REASON reason
-#define GRPC_SUBCHANNEL_REF_MUTATE_EXTRA_ARGS \
- , GRPC_SUBCHANNEL_REF_EXTRA_ARGS, const char* purpose
-#define GRPC_SUBCHANNEL_REF_MUTATE_PURPOSE(x) , file, line, reason, x
-#else
-#define GRPC_SUBCHANNEL_REF(p, r) (p)->Ref()
-#define GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(p, r) (p)->RefFromWeakRef()
-#define GRPC_SUBCHANNEL_UNREF(p, r) (p)->Unref()
-#define GRPC_SUBCHANNEL_WEAK_REF(p, r) (p)->WeakRef()
-#define GRPC_SUBCHANNEL_WEAK_UNREF(p, r) (p)->WeakUnref()
-#define GRPC_SUBCHANNEL_REF_EXTRA_ARGS
-#define GRPC_SUBCHANNEL_REF_REASON ""
-#define GRPC_SUBCHANNEL_REF_MUTATE_EXTRA_ARGS
-#define GRPC_SUBCHANNEL_REF_MUTATE_PURPOSE(x)
-#endif
-
namespace grpc_core {
class SubchannelCall;
@@ -76,7 +51,7 @@ class ConnectedSubchannel : public RefCounted<ConnectedSubchannel> {
ConnectedSubchannel(
grpc_channel_stack* channel_stack, const grpc_channel_args* args,
RefCountedPtr<channelz::SubchannelNode> channelz_subchannel);
- ~ConnectedSubchannel();
+ ~ConnectedSubchannel() override;
void StartWatch(grpc_pollset_set* interested_parties,
OrphanablePtr<ConnectivityStateWatcherInterface> watcher);
@@ -89,7 +64,7 @@ class ConnectedSubchannel : public RefCounted<ConnectedSubchannel> {
return channelz_subchannel_.get();
}
- size_t GetInitialCallSizeEstimate(size_t parent_data_size) const;
+ size_t GetInitialCallSizeEstimate() const;
private:
grpc_channel_stack* channel_stack_;
@@ -111,18 +86,12 @@ class SubchannelCall {
Arena* arena;
grpc_call_context_element* context;
CallCombiner* call_combiner;
- size_t parent_data_size;
};
static RefCountedPtr<SubchannelCall> Create(Args args, grpc_error** error);
// Continues processing a transport stream op batch.
void StartTransportStreamOpBatch(grpc_transport_stream_op_batch* batch);
- // Returns a pointer to the parent data associated with the subchannel call.
- // The data will be of the size specified in \a parent_data_size field of
- // the args passed to \a ConnectedSubchannel::CreateCall().
- void* GetParentData();
-
// Returns the call stack of the subchannel call.
grpc_call_stack* GetCallStack();
@@ -139,8 +108,6 @@ class SubchannelCall {
void Unref();
void Unref(const DebugLocation& location, const char* reason);
- static void Destroy(void* arg, grpc_error* error);
-
private:
// Allow RefCountedPtr<> to access IncrementRefCount().
template <typename T>
@@ -159,6 +126,8 @@ class SubchannelCall {
void IncrementRefCount();
void IncrementRefCount(const DebugLocation& location, const char* reason);
+ static void Destroy(void* arg, grpc_error* error);
+
RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
grpc_closure* after_call_stack_destroy_ = nullptr;
// State needed to support channelz interception of recv trailing metadata.
@@ -175,7 +144,7 @@ class SubchannelCall {
// different from the SubchannelInterface that is exposed to LB policy
// implementations. The client channel provides an adaptor class
// (SubchannelWrapper) that "converts" between the two.
-class Subchannel {
+class Subchannel : public DualRefCounted<Subchannel> {
public:
class ConnectivityStateWatcherInterface
: public RefCounted<ConnectivityStateWatcherInterface> {
@@ -186,7 +155,7 @@ class Subchannel {
RefCountedPtr<ConnectedSubchannel> connected_subchannel;
};
- virtual ~ConnectivityStateWatcherInterface() = default;
+ ~ConnectivityStateWatcherInterface() override = default;
// Will be invoked whenever the subchannel's connectivity state
// changes. There will be only one invocation of this method on a
@@ -211,37 +180,29 @@ class Subchannel {
ConnectivityStateChange PopConnectivityStateChange();
private:
+ Mutex mu_; // protects the queue
// Keeps track of the updates that the watcher instance must be notified of.
// TODO(yashkt): This is currently needed to send the state updates in the
// right order when asynchronously notifying. This will no longer be
// necessary when we have access to EventManager.
- std::deque<ConnectivityStateChange> connectivity_state_queue_;
- Mutex mu_; // protects the queue
+ std::deque<ConnectivityStateChange> connectivity_state_queue_
+ Y_ABSL_GUARDED_BY(&mu_);
};
+ // Creates a subchannel given \a connector and \a args.
+ static RefCountedPtr<Subchannel> Create(
+ OrphanablePtr<SubchannelConnector> connector,
+ const grpc_channel_args* args);
+
// The ctor and dtor are not intended to use directly.
- Subchannel(SubchannelKey* key, OrphanablePtr<SubchannelConnector> connector,
+ Subchannel(SubchannelKey key, OrphanablePtr<SubchannelConnector> connector,
const grpc_channel_args* args);
- ~Subchannel();
-
- // Creates a subchannel given \a connector and \a args.
- static Subchannel* Create(OrphanablePtr<SubchannelConnector> connector,
- const grpc_channel_args* args);
+ ~Subchannel() override;
// Throttles keepalive time to \a new_keepalive_time iff \a new_keepalive_time
// is larger than the subchannel's current keepalive time. The updated value
// will have an affect when the subchannel creates a new ConnectedSubchannel.
- void ThrottleKeepaliveTime(int new_keepalive_time);
-
- // Strong and weak refcounting.
- Subchannel* Ref(GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
- void Unref(GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
- Subchannel* WeakRef(GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
- void WeakUnref(GRPC_SUBCHANNEL_REF_EXTRA_ARGS);
- // Attempts to return a strong ref when only the weak refcount is guaranteed
- // non-zero. If the strong refcount is zero, does not alter the refcount and
- // returns null.
- Subchannel* RefFromWeakRef();
+ void ThrottleKeepaliveTime(int new_keepalive_time) Y_ABSL_LOCKS_EXCLUDED(mu_);
// Gets the string representing the subchannel address.
// Caller doesn't take ownership.
@@ -257,8 +218,9 @@ class Subchannel {
// service name.
// If the return value is GRPC_CHANNEL_READY, also sets *connected_subchannel.
grpc_connectivity_state CheckConnectivityState(
- const char* health_check_service_name,
- RefCountedPtr<ConnectedSubchannel>* connected_subchannel);
+ const y_absl::optional<TString>& health_check_service_name,
+ RefCountedPtr<ConnectedSubchannel>* connected_subchannel)
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
// Starts watching the subchannel's connectivity state.
// The first callback to the watcher will be delivered when the
@@ -270,23 +232,28 @@ class Subchannel {
// destroyed or when CancelConnectivityStateWatch() is called.
void WatchConnectivityState(
grpc_connectivity_state initial_state,
- grpc_core::UniquePtr<char> health_check_service_name,
- RefCountedPtr<ConnectivityStateWatcherInterface> watcher);
+ const y_absl::optional<TString>& health_check_service_name,
+ RefCountedPtr<ConnectivityStateWatcherInterface> watcher)
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
// Cancels a connectivity state watch.
// If the watcher has already been destroyed, this is a no-op.
- void CancelConnectivityStateWatch(const char* health_check_service_name,
- ConnectivityStateWatcherInterface* watcher);
+ void CancelConnectivityStateWatch(
+ const y_absl::optional<TString>& health_check_service_name,
+ ConnectivityStateWatcherInterface* watcher) Y_ABSL_LOCKS_EXCLUDED(mu_);
// Attempt to connect to the backend. Has no effect if already connected.
- void AttemptToConnect();
+ void AttemptToConnect() Y_ABSL_LOCKS_EXCLUDED(mu_);
// Resets the connection backoff of the subchannel.
// TODO(roth): Move connection backoff out of subchannels and up into LB
// policy code (probably by adding a SubchannelGroup between
// SubchannelList and SubchannelData), at which point this method can
// go away.
- void ResetBackoff();
+ void ResetBackoff() Y_ABSL_LOCKS_EXCLUDED(mu_);
+
+ // Tears down any existing connection, and arranges for destruction
+ void Orphan() override Y_ABSL_LOCKS_EXCLUDED(mu_);
// Returns a new channel arg encoding the subchannel address as a URI
// string. Caller is responsible for freeing the string.
@@ -339,25 +306,27 @@ class Subchannel {
class HealthWatcherMap {
public:
void AddWatcherLocked(
- Subchannel* subchannel, grpc_connectivity_state initial_state,
- grpc_core::UniquePtr<char> health_check_service_name,
+ WeakRefCountedPtr<Subchannel> subchannel,
+ grpc_connectivity_state initial_state,
+ const TString& health_check_service_name,
RefCountedPtr<ConnectivityStateWatcherInterface> watcher);
- void RemoveWatcherLocked(const char* health_check_service_name,
+ void RemoveWatcherLocked(const TString& health_check_service_name,
ConnectivityStateWatcherInterface* watcher);
// Notifies the watcher when the subchannel's state changes.
- void NotifyLocked(grpc_connectivity_state state,
- const y_absl::Status& status);
+ void NotifyLocked(grpc_connectivity_state state, const y_absl::Status& status)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&Subchannel::mu_);
grpc_connectivity_state CheckConnectivityStateLocked(
- Subchannel* subchannel, const char* health_check_service_name);
+ Subchannel* subchannel, const TString& health_check_service_name)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(&Subchannel::mu_);
void ShutdownLocked();
private:
class HealthWatcher;
- std::map<const char*, OrphanablePtr<HealthWatcher>, StringLess> map_;
+ std::map<TString, OrphanablePtr<HealthWatcher>> map_;
};
class ConnectedSubchannelStateWatcher;
@@ -366,72 +335,65 @@ class Subchannel {
// Sets the subchannel's connectivity state to \a state.
void SetConnectivityStateLocked(grpc_connectivity_state state,
- const y_absl::Status& status);
+ const y_absl::Status& status)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
// Methods for connection.
- void MaybeStartConnectingLocked();
- static void OnRetryAlarm(void* arg, grpc_error* error);
- void ContinueConnectingLocked();
- static void OnConnectingFinished(void* arg, grpc_error* error);
- bool PublishTransportLocked();
- void Disconnect();
-
- gpr_atm RefMutate(gpr_atm delta,
- int barrier GRPC_SUBCHANNEL_REF_MUTATE_EXTRA_ARGS);
+ void MaybeStartConnectingLocked() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
+ static void OnRetryAlarm(void* arg, grpc_error* error)
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
+ void ContinueConnectingLocked() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
+ static void OnConnectingFinished(void* arg, grpc_error* error)
+ Y_ABSL_LOCKS_EXCLUDED(mu_);
+ bool PublishTransportLocked() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_);
// The subchannel pool this subchannel is in.
RefCountedPtr<SubchannelPoolInterface> subchannel_pool_;
// TODO(juanlishen): Consider using args_ as key_ directly.
// Subchannel key that identifies this subchannel in the subchannel pool.
- SubchannelKey* key_;
+ const SubchannelKey key_;
// Channel args.
grpc_channel_args* args_;
// pollset_set tracking who's interested in a connection being setup.
grpc_pollset_set* pollset_set_;
- // Protects the other members.
- Mutex mu_;
- // Refcount
- // - lower INTERNAL_REF_BITS bits are for internal references:
- // these do not keep the subchannel open.
- // - upper remaining bits are for public references: these do
- // keep the subchannel open
- gpr_atm ref_pair_;
-
- // Connection states.
+ // Channelz tracking.
+ RefCountedPtr<channelz::SubchannelNode> channelz_node_;
+
+ // Connection state.
OrphanablePtr<SubchannelConnector> connector_;
- // Set during connection.
SubchannelConnector::Result connecting_result_;
grpc_closure on_connecting_finished_;
+
+ // Protects the other members.
+ Mutex mu_;
+
// Active connection, or null.
- RefCountedPtr<ConnectedSubchannel> connected_subchannel_;
- bool connecting_ = false;
- bool disconnected_ = false;
+ RefCountedPtr<ConnectedSubchannel> connected_subchannel_ Y_ABSL_GUARDED_BY(mu_);
+ bool connecting_ Y_ABSL_GUARDED_BY(mu_) = false;
+ bool disconnected_ Y_ABSL_GUARDED_BY(mu_) = false;
// Connectivity state tracking.
- grpc_connectivity_state state_ = GRPC_CHANNEL_IDLE;
- y_absl::Status status_;
+ grpc_connectivity_state state_ Y_ABSL_GUARDED_BY(mu_) = GRPC_CHANNEL_IDLE;
+ y_absl::Status status_ Y_ABSL_GUARDED_BY(mu_);
// The list of watchers without a health check service name.
- ConnectivityStateWatcherList watcher_list_;
+ ConnectivityStateWatcherList watcher_list_ Y_ABSL_GUARDED_BY(mu_);
// The map of watchers with health check service names.
- HealthWatcherMap health_watcher_map_;
+ HealthWatcherMap health_watcher_map_ Y_ABSL_GUARDED_BY(mu_);
// Backoff state.
- BackOff backoff_;
- grpc_millis next_attempt_deadline_;
- grpc_millis min_connect_timeout_ms_;
- bool backoff_begun_ = false;
+ BackOff backoff_ Y_ABSL_GUARDED_BY(mu_);
+ grpc_millis next_attempt_deadline_ Y_ABSL_GUARDED_BY(mu_);
+ grpc_millis min_connect_timeout_ms_ Y_ABSL_GUARDED_BY(mu_);
+ bool backoff_begun_ Y_ABSL_GUARDED_BY(mu_) = false;
// Retry alarm.
- grpc_timer retry_alarm_;
- grpc_closure on_retry_alarm_;
- bool have_retry_alarm_ = false;
+ grpc_timer retry_alarm_ Y_ABSL_GUARDED_BY(mu_);
+ grpc_closure on_retry_alarm_ Y_ABSL_GUARDED_BY(mu_);
+ bool have_retry_alarm_ Y_ABSL_GUARDED_BY(mu_) = false;
// reset_backoff() was called while alarm was pending.
- bool retry_immediately_ = false;
+ bool retry_immediately_ Y_ABSL_GUARDED_BY(mu_) = false;
// Keepalive time period (-1 for unset)
- int keepalive_time_ = -1;
-
- // Channelz tracking.
- RefCountedPtr<channelz::SubchannelNode> channelz_node_;
+ int keepalive_time_ Y_ABSL_GUARDED_BY(mu_) = -1;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_interface.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_interface.h
index ccaca4ef08f..c1618470a2f 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_interface.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_interface.h
@@ -21,9 +21,11 @@
#include <grpc/support/port_platform.h>
-#include "src/core/ext/filters/client_channel/server_address.h"
+#include <grpc/impl/codegen/connectivity_state.h>
+#include <grpc/impl/codegen/grpc_types.h>
+
#include "src/core/lib/gprpp/ref_counted.h"
-#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/iomgr/pollset_set.h"
namespace grpc_core {
@@ -45,11 +47,10 @@ class SubchannelInterface : public RefCounted<SubchannelInterface> {
virtual grpc_pollset_set* interested_parties() = 0;
};
- template <typename TraceFlagT = TraceFlag>
- explicit SubchannelInterface(TraceFlagT* trace_flag = nullptr)
- : RefCounted<SubchannelInterface>(trace_flag) {}
+ explicit SubchannelInterface(const char* trace = nullptr)
+ : RefCounted<SubchannelInterface>(trace) {}
- virtual ~SubchannelInterface() = default;
+ ~SubchannelInterface() override = default;
// Returns the current connectivity state of the subchannel.
virtual grpc_connectivity_state CheckConnectivityState() = 0;
@@ -88,11 +89,6 @@ class SubchannelInterface : public RefCounted<SubchannelInterface> {
// TODO(roth): Need a better non-grpc-specific abstraction here.
virtual const grpc_channel_args* channel_args() = 0;
-
- // Allows accessing the attributes associated with the address for
- // this subchannel.
- virtual const ServerAddress::AttributeInterface* GetAttribute(
- const char* key) const = 0;
};
// A class that delegates to another subchannel, to be used in cases
@@ -124,10 +120,6 @@ class DelegatingSubchannel : public SubchannelInterface {
const grpc_channel_args* channel_args() override {
return wrapped_subchannel_->channel_args();
}
- const ServerAddress::AttributeInterface* GetAttribute(
- const char* key) const override {
- return wrapped_subchannel_->GetAttribute(key);
- }
private:
RefCountedPtr<SubchannelInterface> wrapped_subchannel_;
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.cc
index bb35f228b70..308541c5309 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.cc
@@ -44,13 +44,27 @@ SubchannelKey::SubchannelKey(const SubchannelKey& other) {
}
SubchannelKey& SubchannelKey::operator=(const SubchannelKey& other) {
+ if (&other == this) {
+ return *this;
+ }
grpc_channel_args_destroy(const_cast<grpc_channel_args*>(args_));
Init(other.args_, grpc_channel_args_copy);
return *this;
}
-int SubchannelKey::Cmp(const SubchannelKey& other) const {
- return grpc_channel_args_compare(args_, other.args_);
+SubchannelKey::SubchannelKey(SubchannelKey&& other) noexcept {
+ args_ = other.args_;
+ other.args_ = nullptr;
+}
+
+SubchannelKey& SubchannelKey::operator=(SubchannelKey&& other) noexcept {
+ args_ = other.args_;
+ other.args_ = nullptr;
+ return *this;
+}
+
+bool SubchannelKey::operator<(const SubchannelKey& other) const {
+ return grpc_channel_args_compare(args_, other.args_) < 0;
}
void SubchannelKey::Init(
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.h b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.h
index 2fe5fa3fd05..8a8a0cb6934 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.h
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/subchannel_pool_interface.h
@@ -23,6 +23,7 @@
#include "src/core/lib/avl/avl.h"
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/ref_counted.h"
namespace grpc_core {
@@ -40,11 +41,11 @@ class SubchannelKey {
// Copyable.
SubchannelKey(const SubchannelKey& other);
SubchannelKey& operator=(const SubchannelKey& other);
- // Not movable.
- SubchannelKey(SubchannelKey&&) = delete;
- SubchannelKey& operator=(SubchannelKey&&) = delete;
+ // Movable
+ SubchannelKey(SubchannelKey&&) noexcept;
+ SubchannelKey& operator=(SubchannelKey&&) noexcept;
- int Cmp(const SubchannelKey& other) const;
+ bool operator<(const SubchannelKey& other) const;
private:
// Initializes the subchannel key with the given \a args and the function to
@@ -62,21 +63,26 @@ class SubchannelKey {
// shut down safely. See https://github.com/grpc/grpc/issues/12560.
class SubchannelPoolInterface : public RefCounted<SubchannelPoolInterface> {
public:
- SubchannelPoolInterface() : RefCounted(&grpc_subchannel_pool_trace) {}
- virtual ~SubchannelPoolInterface() {}
+ SubchannelPoolInterface()
+ : RefCounted(GRPC_TRACE_FLAG_ENABLED(grpc_subchannel_pool_trace)
+ ? "SubchannelPoolInterface"
+ : nullptr) {}
+ ~SubchannelPoolInterface() override {}
// Registers a subchannel against a key. Returns the subchannel registered
// with \a key, which may be different from \a constructed because we reuse
// (instead of update) any existing subchannel already registered with \a key.
- virtual Subchannel* RegisterSubchannel(SubchannelKey* key,
- Subchannel* constructed) = 0;
+ virtual RefCountedPtr<Subchannel> RegisterSubchannel(
+ const SubchannelKey& key, RefCountedPtr<Subchannel> constructed) = 0;
// Removes the registered subchannel found by \a key.
- virtual void UnregisterSubchannel(SubchannelKey* key) = 0;
+ virtual void UnregisterSubchannel(const SubchannelKey& key,
+ Subchannel* subchannel) = 0;
// Finds the subchannel registered for the given subchannel key. Returns NULL
// if no such channel exists. Thread-safe.
- virtual Subchannel* FindSubchannel(SubchannelKey* key) = 0;
+ virtual RefCountedPtr<Subchannel> FindSubchannel(
+ const SubchannelKey& key) = 0;
// Creates a channel arg from \a subchannel pool.
static grpc_arg CreateChannelArg(SubchannelPoolInterface* subchannel_pool);
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc b/contrib/libs/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc
index 2ea3eadeec3..e39dda4dd90 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_idle/client_idle_filter.cc
@@ -187,7 +187,7 @@ void ChannelData::StartTransportOp(grpc_channel_element* elem,
ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
// Catch the disconnect_with_error transport op.
if (op->disconnect_with_error != nullptr) {
- // IncreaseCallCount() introduces a dummy call and prevent the timer from
+ // IncreaseCallCount() introduces a phony call and prevent the timer from
// being reset by other threads.
chand->IncreaseCallCount();
// If the timer has been set, cancel the timer.
diff --git a/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.cc b/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.cc
index e4027b0719f..837e337b64b 100644
--- a/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.cc
@@ -32,53 +32,82 @@
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/channel_init.h"
-//
-// grpc_deadline_state
-//
+namespace grpc_core {
+
+// A fire-and-forget class representing a pending deadline timer.
+// Allocated on the call arena.
+class TimerState {
+ public:
+ TimerState(grpc_call_element* elem, grpc_millis deadline) : elem_(elem) {
+ grpc_deadline_state* deadline_state =
+ static_cast<grpc_deadline_state*>(elem_->call_data);
+ GRPC_CALL_STACK_REF(deadline_state->call_stack, "DeadlineTimerState");
+ GRPC_CLOSURE_INIT(&closure_, TimerCallback, this, nullptr);
+ grpc_timer_init(&timer_, deadline, &closure_);
+ }
-// The on_complete callback used when sending a cancel_error batch down the
-// filter stack. Yields the call combiner when the batch returns.
-static void yield_call_combiner(void* arg, grpc_error* /*ignored*/) {
- grpc_deadline_state* deadline_state = static_cast<grpc_deadline_state*>(arg);
- GRPC_CALL_COMBINER_STOP(deadline_state->call_combiner,
- "got on_complete from cancel_stream batch");
- GRPC_CALL_STACK_UNREF(deadline_state->call_stack, "deadline_timer");
-}
+ void Cancel() { grpc_timer_cancel(&timer_); }
+
+ private:
+ // The on_complete callback used when sending a cancel_error batch down the
+ // filter stack. Yields the call combiner when the batch returns.
+ static void YieldCallCombiner(void* arg, grpc_error* /*ignored*/) {
+ TimerState* self = static_cast<TimerState*>(arg);
+ grpc_deadline_state* deadline_state =
+ static_cast<grpc_deadline_state*>(self->elem_->call_data);
+ GRPC_CALL_COMBINER_STOP(deadline_state->call_combiner,
+ "got on_complete from cancel_stream batch");
+ GRPC_CALL_STACK_UNREF(deadline_state->call_stack, "DeadlineTimerState");
+ }
-// This is called via the call combiner, so access to deadline_state is
-// synchronized.
-static void send_cancel_op_in_call_combiner(void* arg, grpc_error* error) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
- grpc_deadline_state* deadline_state =
- static_cast<grpc_deadline_state*>(elem->call_data);
- grpc_transport_stream_op_batch* batch = grpc_make_transport_stream_op(
- GRPC_CLOSURE_INIT(&deadline_state->timer_callback, yield_call_combiner,
- deadline_state, grpc_schedule_on_exec_ctx));
- batch->cancel_stream = true;
- batch->payload->cancel_stream.cancel_error = GRPC_ERROR_REF(error);
- elem->filter->start_transport_stream_op_batch(elem, batch);
-}
+ // This is called via the call combiner, so access to deadline_state is
+ // synchronized.
+ static void SendCancelOpInCallCombiner(void* arg, grpc_error* error) {
+ TimerState* self = static_cast<TimerState*>(arg);
+ grpc_transport_stream_op_batch* batch = grpc_make_transport_stream_op(
+ GRPC_CLOSURE_INIT(&self->closure_, YieldCallCombiner, self, nullptr));
+ batch->cancel_stream = true;
+ batch->payload->cancel_stream.cancel_error = GRPC_ERROR_REF(error);
+ self->elem_->filter->start_transport_stream_op_batch(self->elem_, batch);
+ }
-// Timer callback.
-static void timer_callback(void* arg, grpc_error* error) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
- grpc_deadline_state* deadline_state =
- static_cast<grpc_deadline_state*>(elem->call_data);
- if (error != GRPC_ERROR_CANCELLED) {
- error = grpc_error_set_int(
- GRPC_ERROR_CREATE_FROM_STATIC_STRING("Deadline Exceeded"),
- GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_DEADLINE_EXCEEDED);
- deadline_state->call_combiner->Cancel(GRPC_ERROR_REF(error));
- GRPC_CLOSURE_INIT(&deadline_state->timer_callback,
- send_cancel_op_in_call_combiner, elem,
- grpc_schedule_on_exec_ctx);
- GRPC_CALL_COMBINER_START(deadline_state->call_combiner,
- &deadline_state->timer_callback, error,
- "deadline exceeded -- sending cancel_stream op");
- } else {
- GRPC_CALL_STACK_UNREF(deadline_state->call_stack, "deadline_timer");
+ // Timer callback.
+ static void TimerCallback(void* arg, grpc_error* error) {
+ TimerState* self = static_cast<TimerState*>(arg);
+ grpc_deadline_state* deadline_state =
+ static_cast<grpc_deadline_state*>(self->elem_->call_data);
+ if (error != GRPC_ERROR_CANCELLED) {
+ error = grpc_error_set_int(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Deadline Exceeded"),
+ GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_DEADLINE_EXCEEDED);
+ deadline_state->call_combiner->Cancel(GRPC_ERROR_REF(error));
+ GRPC_CLOSURE_INIT(&self->closure_, SendCancelOpInCallCombiner, self,
+ nullptr);
+ GRPC_CALL_COMBINER_START(deadline_state->call_combiner, &self->closure_,
+ error,
+ "deadline exceeded -- sending cancel_stream op");
+ } else {
+ GRPC_CALL_STACK_UNREF(deadline_state->call_stack, "DeadlineTimerState");
+ }
}
-}
+
+ // NOTE: This object's dtor is never called, so do not add any data
+ // members that require destruction!
+ // TODO(roth): We should ideally call this object's dtor somewhere,
+ // but that would require adding more synchronization, because we'd
+ // need to call the dtor only after both (a) the timer callback
+ // finishes and (b) the filter sees the call completion and attempts
+ // to cancel the timer.
+ grpc_call_element* elem_;
+ grpc_timer timer_;
+ grpc_closure closure_;
+};
+
+} // namespace grpc_core
+
+//
+// grpc_deadline_state
+//
// Starts the deadline timer.
// This is called via the call combiner, so access to deadline_state is
@@ -90,41 +119,18 @@ static void start_timer_if_needed(grpc_call_element* elem,
}
grpc_deadline_state* deadline_state =
static_cast<grpc_deadline_state*>(elem->call_data);
- grpc_closure* closure = nullptr;
- switch (deadline_state->timer_state) {
- case GRPC_DEADLINE_STATE_PENDING:
- // Note: We do not start the timer if there is already a timer
- return;
- case GRPC_DEADLINE_STATE_FINISHED:
- deadline_state->timer_state = GRPC_DEADLINE_STATE_PENDING;
- // If we've already created and destroyed a timer, we always create a
- // new closure: we have no other guarantee that the inlined closure is
- // not in use (it may hold a pending call to timer_callback)
- closure =
- GRPC_CLOSURE_CREATE(timer_callback, elem, grpc_schedule_on_exec_ctx);
- break;
- case GRPC_DEADLINE_STATE_INITIAL:
- deadline_state->timer_state = GRPC_DEADLINE_STATE_PENDING;
- closure =
- GRPC_CLOSURE_INIT(&deadline_state->timer_callback, timer_callback,
- elem, grpc_schedule_on_exec_ctx);
- break;
- }
- GPR_ASSERT(closure != nullptr);
- GRPC_CALL_STACK_REF(deadline_state->call_stack, "deadline_timer");
- grpc_timer_init(&deadline_state->timer, deadline, closure);
+ GPR_ASSERT(deadline_state->timer_state == nullptr);
+ deadline_state->timer_state =
+ deadline_state->arena->New<grpc_core::TimerState>(elem, deadline);
}
// Cancels the deadline timer.
// This is called via the call combiner, so access to deadline_state is
// synchronized.
static void cancel_timer_if_needed(grpc_deadline_state* deadline_state) {
- if (deadline_state->timer_state == GRPC_DEADLINE_STATE_PENDING) {
- deadline_state->timer_state = GRPC_DEADLINE_STATE_FINISHED;
- grpc_timer_cancel(&deadline_state->timer);
- } else {
- // timer was either in STATE_INITIAL (nothing to cancel)
- // OR in STATE_FINISHED (again nothing to cancel)
+ if (deadline_state->timer_state != nullptr) {
+ deadline_state->timer_state->Cancel();
+ deadline_state->timer_state = nullptr;
}
}
@@ -182,10 +188,11 @@ static void start_timer_after_init(void* arg, grpc_error* error) {
}
grpc_deadline_state::grpc_deadline_state(grpc_call_element* elem,
- grpc_call_stack* call_stack,
- grpc_core::CallCombiner* call_combiner,
+ const grpc_call_element_args& args,
grpc_millis deadline)
- : call_stack(call_stack), call_combiner(call_combiner) {
+ : call_stack(args.call_stack),
+ call_combiner(args.call_combiner),
+ arena(args.arena) {
// Deadline will always be infinite on servers, so the timer will only be
// set on clients with a finite deadline.
if (deadline != GRPC_MILLIS_INF_FUTURE) {
@@ -263,8 +270,7 @@ typedef struct server_call_data {
// Constructor for call_data. Used for both client and server filters.
static grpc_error* deadline_init_call_elem(grpc_call_element* elem,
const grpc_call_element_args* args) {
- new (elem->call_data) grpc_deadline_state(
- elem, args->call_stack, args->call_combiner, args->deadline);
+ new (elem->call_data) grpc_deadline_state(elem, *args, args->deadline);
return GRPC_ERROR_NONE;
}
@@ -377,10 +383,12 @@ static bool maybe_add_deadline_filter(grpc_channel_stack_builder* builder,
void grpc_deadline_filter_init(void) {
grpc_channel_init_register_stage(
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- maybe_add_deadline_filter, (void*)&grpc_client_deadline_filter);
+ maybe_add_deadline_filter,
+ const_cast<grpc_channel_filter*>(&grpc_client_deadline_filter));
grpc_channel_init_register_stage(
GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- maybe_add_deadline_filter, (void*)&grpc_server_deadline_filter);
+ maybe_add_deadline_filter,
+ const_cast<grpc_channel_filter*>(&grpc_server_deadline_filter));
}
void grpc_deadline_filter_shutdown(void) {}
diff --git a/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.h b/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.h
index 7c4e9aaed0e..fd6fd457213 100644
--- a/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.h
+++ b/contrib/libs/grpc/src/core/ext/filters/deadline/deadline_filter.h
@@ -22,26 +22,22 @@
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/iomgr/timer.h"
-enum grpc_deadline_timer_state {
- GRPC_DEADLINE_STATE_INITIAL,
- GRPC_DEADLINE_STATE_PENDING,
- GRPC_DEADLINE_STATE_FINISHED
-};
+namespace grpc_core {
+class TimerState;
+} // namespace grpc_core
// State used for filters that enforce call deadlines.
// Must be the first field in the filter's call_data.
struct grpc_deadline_state {
- grpc_deadline_state(grpc_call_element* elem, grpc_call_stack* call_stack,
- grpc_core::CallCombiner* call_combiner,
- grpc_millis deadline);
+ grpc_deadline_state(grpc_call_element* elem,
+ const grpc_call_element_args& args, grpc_millis deadline);
~grpc_deadline_state();
// We take a reference to the call stack for the timer callback.
grpc_call_stack* call_stack;
grpc_core::CallCombiner* call_combiner;
- grpc_deadline_timer_state timer_state = GRPC_DEADLINE_STATE_INITIAL;
- grpc_timer timer;
- grpc_closure timer_callback;
+ grpc_core::Arena* arena;
+ grpc_core::TimerState* timer_state = nullptr;
// Closure to invoke when we receive trailing metadata.
// We use this to cancel the timer.
grpc_closure recv_trailing_metadata_ready;
diff --git a/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.cc b/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.cc
new file mode 100644
index 00000000000..5ee53c24158
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.cc
@@ -0,0 +1,500 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/filters/fault_injection/fault_injection_filter.h"
+
+#include "y_absl/strings/numbers.h"
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+
+#include "src/core/ext/filters/client_channel/service_config.h"
+#include "src/core/ext/filters/client_channel/service_config_call_data.h"
+#include "src/core/ext/filters/fault_injection/service_config_parser.h"
+#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/channel/status_util.h"
+#include "src/core/lib/gprpp/atomic.h"
+#include "src/core/lib/gprpp/sync.h"
+#include "src/core/lib/iomgr/closure.h"
+#include "src/core/lib/iomgr/timer.h"
+#include "src/core/lib/transport/status_conversion.h"
+
+namespace grpc_core {
+
+TraceFlag grpc_fault_injection_filter_trace(false, "fault_injection_filter");
+
+namespace {
+
+Atomic<uint32_t> g_active_faults{0};
+static_assert(
+ std::is_trivially_destructible<Atomic<uint32_t>>::value,
+ "the active fault counter needs to have a trivially destructible type");
+
+inline int GetLinkedMetadatumValueInt(grpc_linked_mdelem* md) {
+ int res;
+ if (y_absl::SimpleAtoi(StringViewFromSlice(GRPC_MDVALUE(md->md)), &res)) {
+ return res;
+ } else {
+ return -1;
+ }
+}
+
+inline uint32_t GetLinkedMetadatumValueUnsignedInt(grpc_linked_mdelem* md) {
+ uint32_t res;
+ if (y_absl::SimpleAtoi(StringViewFromSlice(GRPC_MDVALUE(md->md)), &res)) {
+ return res;
+ } else {
+ return -1;
+ }
+}
+
+inline int64_t GetLinkedMetadatumValueInt64(grpc_linked_mdelem* md) {
+ int64_t res;
+ if (y_absl::SimpleAtoi(StringViewFromSlice(GRPC_MDVALUE(md->md)), &res)) {
+ return res;
+ } else {
+ return -1;
+ }
+}
+
+inline bool UnderFraction(const uint32_t numerator,
+ const uint32_t denominator) {
+ if (numerator <= 0) return false;
+ if (numerator >= denominator) return true;
+ // Generate a random number in [0, denominator).
+ const uint32_t random_number = rand() % denominator;
+ return random_number < numerator;
+}
+
+class ChannelData {
+ public:
+ static grpc_error* Init(grpc_channel_element* elem,
+ grpc_channel_element_args* args);
+ static void Destroy(grpc_channel_element* elem);
+
+ int index() const { return index_; }
+
+ private:
+ ChannelData(grpc_channel_element* elem, grpc_channel_element_args* args);
+ ~ChannelData() = default;
+
+ // The relative index of instances of the same filter.
+ int index_;
+};
+
+class CallData {
+ public:
+ static grpc_error* Init(grpc_call_element* elem,
+ const grpc_call_element_args* args);
+
+ static void Destroy(grpc_call_element* elem,
+ const grpc_call_final_info* /*final_info*/,
+ grpc_closure* /*then_schedule_closure*/);
+
+ static void StartTransportStreamOpBatch(
+ grpc_call_element* elem, grpc_transport_stream_op_batch* batch);
+
+ private:
+ class ResumeBatchCanceller;
+
+ CallData(grpc_call_element* elem, const grpc_call_element_args* args);
+ ~CallData();
+
+ void DecideWhetherToInjectFaults(grpc_metadata_batch* initial_metadata);
+
+ // Checks if current active faults exceed the allowed max faults.
+ bool HaveActiveFaultsQuota(bool increment);
+
+ // Returns true if this RPC needs to be delayed. If so, this call will be
+ // counted as an active fault.
+ bool MaybeDelay();
+
+ // Returns the aborted RPC status if this RPC needs to be aborted. If so,
+ // this call will be counted as an active fault. Otherwise, it returns
+ // GRPC_ERROR_NONE.
+ // If this call is already been delay injected, skip the active faults
+ // quota check.
+ grpc_error* MaybeAbort();
+
+ // Delays the stream operations batch.
+ void DelayBatch(grpc_call_element* elem,
+ grpc_transport_stream_op_batch* batch);
+
+ // Cancels the delay timer.
+ void CancelDelayTimer() { grpc_timer_cancel(&delay_timer_); }
+
+ // Finishes the fault injection, should only be called once.
+ void FaultInjectionFinished() {
+ g_active_faults.FetchSub(1, MemoryOrder::RELAXED);
+ }
+
+ // This is a callback that will be invoked after the delay timer is up.
+ static void ResumeBatch(void* arg, grpc_error* error);
+
+ // This is a callback invoked upon completion of recv_trailing_metadata.
+ // Injects the abort_error_ to the recv_trailing_metadata batch if needed.
+ static void HijackedRecvTrailingMetadataReady(void* arg, grpc_error*);
+
+ // Used to track the policy structs that needs to be destroyed in dtor.
+ bool fi_policy_owned_ = false;
+ const FaultInjectionMethodParsedConfig::FaultInjectionPolicy* fi_policy_;
+ grpc_call_stack* owning_call_;
+ Arena* arena_;
+ CallCombiner* call_combiner_;
+
+ // Indicates whether we are doing a delay and/or an abort for this call.
+ bool delay_request_ = false;
+ bool abort_request_ = false;
+
+ // Delay states
+ grpc_timer delay_timer_ Y_ABSL_GUARDED_BY(delay_mu_);
+ ResumeBatchCanceller* resume_batch_canceller_ Y_ABSL_GUARDED_BY(delay_mu_);
+ grpc_transport_stream_op_batch* delayed_batch_ Y_ABSL_GUARDED_BY(delay_mu_);
+ // Abort states
+ grpc_error* abort_error_ = GRPC_ERROR_NONE;
+ grpc_closure recv_trailing_metadata_ready_;
+ grpc_closure* original_recv_trailing_metadata_ready_;
+ // Protects the asynchronous delay, resume, and cancellation.
+ Mutex delay_mu_;
+};
+
+// ChannelData
+
+grpc_error* ChannelData::Init(grpc_channel_element* elem,
+ grpc_channel_element_args* args) {
+ GPR_ASSERT(elem->filter == &FaultInjectionFilterVtable);
+ new (elem->channel_data) ChannelData(elem, args);
+ return GRPC_ERROR_NONE;
+}
+
+void ChannelData::Destroy(grpc_channel_element* elem) {
+ auto* chand = static_cast<ChannelData*>(elem->channel_data);
+ chand->~ChannelData();
+}
+
+ChannelData::ChannelData(grpc_channel_element* elem,
+ grpc_channel_element_args* args)
+ : index_(grpc_channel_stack_filter_instance_number(args->channel_stack,
+ elem)) {}
+
+// CallData::ResumeBatchCanceller
+
+class CallData::ResumeBatchCanceller {
+ public:
+ explicit ResumeBatchCanceller(grpc_call_element* elem) : elem_(elem) {
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ GRPC_CALL_STACK_REF(calld->owning_call_, "ResumeBatchCanceller");
+ GRPC_CLOSURE_INIT(&closure_, &Cancel, this, grpc_schedule_on_exec_ctx);
+ calld->call_combiner_->SetNotifyOnCancel(&closure_);
+ }
+
+ private:
+ static void Cancel(void* arg, grpc_error* error) {
+ auto* self = static_cast<ResumeBatchCanceller*>(arg);
+ auto* chand = static_cast<ChannelData*>(self->elem_->channel_data);
+ auto* calld = static_cast<CallData*>(self->elem_->call_data);
+ {
+ MutexLock lock(&calld->delay_mu_);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_fault_injection_filter_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: cancelling schdueled pick: "
+ "error=%s self=%p calld->resume_batch_canceller_=%p",
+ chand, calld, grpc_error_string(error), self,
+ calld->resume_batch_canceller_);
+ }
+ if (error != GRPC_ERROR_NONE && calld->resume_batch_canceller_ == self) {
+ // Cancel the delayed pick.
+ calld->CancelDelayTimer();
+ calld->FaultInjectionFinished();
+ // Fail pending batches on the call.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ calld->delayed_batch_, GRPC_ERROR_REF(error),
+ calld->call_combiner_);
+ }
+ }
+ GRPC_CALL_STACK_UNREF(calld->owning_call_, "ResumeBatchCanceller");
+ delete self;
+ }
+
+ grpc_call_element* elem_;
+ grpc_closure closure_;
+};
+
+// CallData
+
+grpc_error* CallData::Init(grpc_call_element* elem,
+ const grpc_call_element_args* args) {
+ auto* calld = new (elem->call_data) CallData(elem, args);
+ if (calld->fi_policy_ == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "failed to find fault injection policy");
+ }
+ return GRPC_ERROR_NONE;
+}
+
+void CallData::Destroy(grpc_call_element* elem,
+ const grpc_call_final_info* /*final_info*/,
+ grpc_closure* /*then_schedule_closure*/) {
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ calld->~CallData();
+}
+
+void CallData::StartTransportStreamOpBatch(
+ grpc_call_element* elem, grpc_transport_stream_op_batch* batch) {
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ // There should only be one send_initial_metdata op, and fault injection also
+ // only need to be enforced once.
+ if (batch->send_initial_metadata) {
+ calld->DecideWhetherToInjectFaults(
+ batch->payload->send_initial_metadata.send_initial_metadata);
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_fault_injection_filter_trace)) {
+ gpr_log(GPR_INFO,
+ "chand=%p calld=%p: Fault injection triggered delay=%d abort=%d",
+ elem->channel_data, calld, calld->delay_request_,
+ calld->abort_request_);
+ }
+ if (calld->MaybeDelay()) {
+ // Delay the batch, and pass down the batch in the scheduled closure.
+ calld->DelayBatch(elem, batch);
+ return;
+ }
+ grpc_error* abort_error = calld->MaybeAbort();
+ if (abort_error != GRPC_ERROR_NONE) {
+ calld->abort_error_ = abort_error;
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(calld->abort_error_), calld->call_combiner_);
+ return;
+ }
+ } else {
+ if (batch->recv_trailing_metadata) {
+ // Intercept recv_trailing_metadata callback so that we can inject the
+ // failure when aborting streaming calls, because their
+ // recv_trailing_metatdata op may not be on the same batch as the
+ // send_initial_metadata op.
+ calld->original_recv_trailing_metadata_ready_ =
+ batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready;
+ batch->payload->recv_trailing_metadata.recv_trailing_metadata_ready =
+ &calld->recv_trailing_metadata_ready_;
+ }
+ if (calld->abort_error_ != GRPC_ERROR_NONE) {
+ // If we already decided to abort, then immediately fail this batch.
+ grpc_transport_stream_op_batch_finish_with_failure(
+ batch, GRPC_ERROR_REF(calld->abort_error_), calld->call_combiner_);
+ return;
+ }
+ }
+ // Chain to the next filter.
+ grpc_call_next_op(elem, batch);
+}
+
+CallData::CallData(grpc_call_element* elem, const grpc_call_element_args* args)
+ : owning_call_(args->call_stack),
+ arena_(args->arena),
+ call_combiner_(args->call_combiner) {
+ auto* chand = static_cast<ChannelData*>(elem->channel_data);
+ // Fetch the fault injection policy from the service config, based on the
+ // relative index for which policy should this CallData use.
+ auto* service_config_call_data = static_cast<ServiceConfigCallData*>(
+ args->context[GRPC_CONTEXT_SERVICE_CONFIG_CALL_DATA].value);
+ auto* method_params = static_cast<FaultInjectionMethodParsedConfig*>(
+ service_config_call_data->GetMethodParsedConfig(
+ FaultInjectionServiceConfigParser::ParserIndex()));
+ if (method_params != nullptr) {
+ fi_policy_ = method_params->fault_injection_policy(chand->index());
+ }
+ GRPC_CLOSURE_INIT(&recv_trailing_metadata_ready_,
+ HijackedRecvTrailingMetadataReady, elem,
+ grpc_schedule_on_exec_ctx);
+}
+
+CallData::~CallData() {
+ if (fi_policy_owned_) {
+ fi_policy_->~FaultInjectionPolicy();
+ }
+ GRPC_ERROR_UNREF(abort_error_);
+}
+
+void CallData::DecideWhetherToInjectFaults(
+ grpc_metadata_batch* initial_metadata) {
+ FaultInjectionMethodParsedConfig::FaultInjectionPolicy* copied_policy =
+ nullptr;
+ // Update the policy with values in initial metadata.
+ if (!fi_policy_->abort_code_header.empty() ||
+ !fi_policy_->abort_percentage_header.empty() ||
+ !fi_policy_->delay_header.empty() ||
+ !fi_policy_->delay_percentage_header.empty()) {
+ // Defer the actual copy until the first matched header.
+ auto maybe_copy_policy_func = [this, &copied_policy]() {
+ if (copied_policy == nullptr) {
+ copied_policy =
+ arena_->New<FaultInjectionMethodParsedConfig::FaultInjectionPolicy>(
+ *fi_policy_);
+ }
+ };
+ for (grpc_linked_mdelem* md = initial_metadata->list.head; md != nullptr;
+ md = md->next) {
+ y_absl::string_view key = StringViewFromSlice(GRPC_MDKEY(md->md));
+ // Only perform string comparison if:
+ // 1. Needs to check this header;
+ // 2. The value is not been filled before.
+ if (!fi_policy_->abort_code_header.empty() &&
+ (copied_policy == nullptr ||
+ copied_policy->abort_code == GRPC_STATUS_OK) &&
+ key == fi_policy_->abort_code_header) {
+ maybe_copy_policy_func();
+ grpc_status_code_from_int(GetLinkedMetadatumValueInt(md),
+ &copied_policy->abort_code);
+ }
+ if (!fi_policy_->abort_percentage_header.empty() &&
+ key == fi_policy_->abort_percentage_header) {
+ maybe_copy_policy_func();
+ copied_policy->abort_percentage_numerator =
+ GPR_MIN(GetLinkedMetadatumValueUnsignedInt(md),
+ fi_policy_->abort_percentage_numerator);
+ }
+ if (!fi_policy_->delay_header.empty() &&
+ (copied_policy == nullptr || copied_policy->delay == 0) &&
+ key == fi_policy_->delay_header) {
+ maybe_copy_policy_func();
+ copied_policy->delay = static_cast<grpc_millis>(
+ GPR_MAX(GetLinkedMetadatumValueInt64(md), 0));
+ }
+ if (!fi_policy_->delay_percentage_header.empty() &&
+ key == fi_policy_->delay_percentage_header) {
+ maybe_copy_policy_func();
+ copied_policy->delay_percentage_numerator =
+ GPR_MIN(GetLinkedMetadatumValueUnsignedInt(md),
+ fi_policy_->delay_percentage_numerator);
+ }
+ }
+ if (copied_policy != nullptr) fi_policy_ = copied_policy;
+ }
+ // Roll the dice
+ delay_request_ = fi_policy_->delay != 0 &&
+ UnderFraction(fi_policy_->delay_percentage_numerator,
+ fi_policy_->delay_percentage_denominator);
+ abort_request_ = fi_policy_->abort_code != GRPC_STATUS_OK &&
+ UnderFraction(fi_policy_->abort_percentage_numerator,
+ fi_policy_->abort_percentage_denominator);
+ if (!delay_request_ && !abort_request_) {
+ if (copied_policy != nullptr) copied_policy->~FaultInjectionPolicy();
+ // No fault injection for this call
+ } else {
+ fi_policy_owned_ = copied_policy != nullptr;
+ }
+}
+
+bool CallData::HaveActiveFaultsQuota(bool increment) {
+ if (g_active_faults.Load(MemoryOrder::ACQUIRE) >= fi_policy_->max_faults) {
+ return false;
+ }
+ if (increment) g_active_faults.FetchAdd(1, MemoryOrder::RELAXED);
+ return true;
+}
+
+bool CallData::MaybeDelay() {
+ if (delay_request_) {
+ return HaveActiveFaultsQuota(true);
+ }
+ return false;
+}
+
+grpc_error* CallData::MaybeAbort() {
+ if (abort_request_ && (delay_request_ || HaveActiveFaultsQuota(false))) {
+ return grpc_error_set_int(
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(fi_policy_->abort_message.c_str()),
+ GRPC_ERROR_INT_GRPC_STATUS, fi_policy_->abort_code);
+ }
+ return GRPC_ERROR_NONE;
+}
+
+void CallData::DelayBatch(grpc_call_element* elem,
+ grpc_transport_stream_op_batch* batch) {
+ MutexLock lock(&delay_mu_);
+ delayed_batch_ = batch;
+ resume_batch_canceller_ = new ResumeBatchCanceller(elem);
+ grpc_millis resume_time = ExecCtx::Get()->Now() + fi_policy_->delay;
+ GRPC_CLOSURE_INIT(&batch->handler_private.closure, ResumeBatch, elem,
+ grpc_schedule_on_exec_ctx);
+ grpc_timer_init(&delay_timer_, resume_time, &batch->handler_private.closure);
+}
+
+void CallData::ResumeBatch(void* arg, grpc_error* error) {
+ grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ MutexLock lock(&calld->delay_mu_);
+ // Cancelled or canceller has already run
+ if (error == GRPC_ERROR_CANCELLED ||
+ calld->resume_batch_canceller_ == nullptr) {
+ return;
+ }
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_fault_injection_filter_trace)) {
+ gpr_log(GPR_INFO, "chand=%p calld=%p: Resuming delayed stream op batch %p",
+ elem->channel_data, calld, calld->delayed_batch_);
+ }
+ // Lame the canceller
+ calld->resume_batch_canceller_ = nullptr;
+ // Finish fault injection.
+ calld->FaultInjectionFinished();
+ // Abort if needed.
+ error = calld->MaybeAbort();
+ if (error != GRPC_ERROR_NONE) {
+ grpc_transport_stream_op_batch_finish_with_failure(
+ calld->delayed_batch_, error, calld->call_combiner_);
+ return;
+ }
+ // Chain to the next filter.
+ grpc_call_next_op(elem, calld->delayed_batch_);
+}
+
+void CallData::HijackedRecvTrailingMetadataReady(void* arg, grpc_error* error) {
+ grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
+ auto* calld = static_cast<CallData*>(elem->call_data);
+ if (calld->abort_error_ != GRPC_ERROR_NONE) {
+ error = grpc_error_add_child(GRPC_ERROR_REF(error),
+ GRPC_ERROR_REF(calld->abort_error_));
+ } else {
+ error = GRPC_ERROR_REF(error);
+ }
+ Closure::Run(DEBUG_LOCATION, calld->original_recv_trailing_metadata_ready_,
+ error);
+}
+
+} // namespace
+
+extern const grpc_channel_filter FaultInjectionFilterVtable = {
+ CallData::StartTransportStreamOpBatch,
+ grpc_channel_next_op,
+ sizeof(CallData),
+ CallData::Init,
+ grpc_call_stack_ignore_set_pollset_or_pollset_set,
+ CallData::Destroy,
+ sizeof(ChannelData),
+ ChannelData::Init,
+ ChannelData::Destroy,
+ grpc_channel_next_get_info,
+ "fault_injection_filter",
+};
+
+void FaultInjectionFilterInit(void) {
+ grpc_core::FaultInjectionServiceConfigParser::Register();
+}
+
+void FaultInjectionFilterShutdown(void) {}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.h b/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.h
new file mode 100644
index 00000000000..fbc1eb0cf9e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/fault_injection/fault_injection_filter.h
@@ -0,0 +1,39 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef GRPC_CORE_EXT_FILTERS_FAULT_INJECTION_FAULT_INJECTION_FILTER_H
+#define GRPC_CORE_EXT_FILTERS_FAULT_INJECTION_FAULT_INJECTION_FILTER_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/filters/fault_injection/service_config_parser.h"
+#include "src/core/lib/channel/channel_stack.h"
+
+// Channel arg key for enabling parsing fault injection via method config.
+#define GRPC_ARG_PARSE_FAULT_INJECTION_METHOD_CONFIG \
+ "grpc.parse_fault_injection_method_config"
+
+namespace grpc_core {
+
+// This channel filter is intended to be used by the dynamic filters, instead
+// of the ordinary channel stack. The fault injection filter fetches fault
+// injection policy from the method config of service config returned by the
+// resolver, and enforces the fault injection policy.
+extern const grpc_channel_filter FaultInjectionFilterVtable;
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_FILTERS_FAULT_INJECTION_FAULT_INJECTION_FILTER_H
diff --git a/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.cc b/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.cc
new file mode 100644
index 00000000000..ffda88c947e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.cc
@@ -0,0 +1,189 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/filters/fault_injection/service_config_parser.h"
+
+#include <vector>
+
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/string_view.h"
+#include "src/core/ext/filters/client_channel/service_config.h"
+#include "src/core/ext/filters/fault_injection/fault_injection_filter.h"
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/channel/status_util.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/json/json_util.h"
+
+namespace grpc_core {
+
+namespace {
+
+size_t g_fault_injection_parser_index;
+
+std::vector<FaultInjectionMethodParsedConfig::FaultInjectionPolicy>
+ParseFaultInjectionPolicy(const Json::Array& policies_json_array,
+ std::vector<grpc_error*>* error_list) {
+ std::vector<FaultInjectionMethodParsedConfig::FaultInjectionPolicy> policies;
+ for (size_t i = 0; i < policies_json_array.size(); i++) {
+ FaultInjectionMethodParsedConfig::FaultInjectionPolicy
+ fault_injection_policy;
+ std::vector<grpc_error*> sub_error_list;
+ if (policies_json_array[i].type() != Json::Type::OBJECT) {
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("faultInjectionPolicy index ", i,
+ " is not a JSON object")
+ .c_str()));
+ continue;
+ }
+ const Json::Object& json_object = policies_json_array[i].object_value();
+ // Parse abort_code
+ TString abort_code_string;
+ if (ParseJsonObjectField(json_object, "abortCode", &abort_code_string,
+ &sub_error_list, false)) {
+ if (!grpc_status_code_from_string(abort_code_string.c_str(),
+ &(fault_injection_policy.abort_code))) {
+ sub_error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:abortCode error:failed to parse status code"));
+ }
+ }
+ // Parse abort_message
+ if (!ParseJsonObjectField(json_object, "abortMessage",
+ &fault_injection_policy.abort_message,
+ &sub_error_list, false)) {
+ fault_injection_policy.abort_message = "Fault injected";
+ }
+ // Parse abort_code_header
+ ParseJsonObjectField(json_object, "abortCodeHeader",
+ &fault_injection_policy.abort_code_header,
+ &sub_error_list, false);
+ // Parse abort_percentage_header
+ ParseJsonObjectField(json_object, "abortPercentageHeader",
+ &fault_injection_policy.abort_percentage_header,
+ &sub_error_list, false);
+ // Parse abort_percentage_numerator
+ ParseJsonObjectField(json_object, "abortPercentageNumerator",
+ &fault_injection_policy.abort_percentage_numerator,
+ &sub_error_list, false);
+ // Parse abort_percentage_denominator
+ if (ParseJsonObjectField(
+ json_object, "abortPercentageDenominator",
+ &fault_injection_policy.abort_percentage_denominator,
+ &sub_error_list, false)) {
+ if (fault_injection_policy.abort_percentage_denominator != 100 &&
+ fault_injection_policy.abort_percentage_denominator != 10000 &&
+ fault_injection_policy.abort_percentage_denominator != 1000000) {
+ sub_error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:abortPercentageDenominator error:Denominator can only be "
+ "one of "
+ "100, 10000, 1000000"));
+ }
+ }
+ // Parse delay
+ ParseJsonObjectFieldAsDuration(json_object, "delay",
+ &fault_injection_policy.delay,
+ &sub_error_list, false);
+ // Parse delay_header
+ ParseJsonObjectField(json_object, "delayHeader",
+ &fault_injection_policy.delay_header, &sub_error_list,
+ false);
+ // Parse delay_percentage_header
+ ParseJsonObjectField(json_object, "delayPercentageHeader",
+ &fault_injection_policy.delay_percentage_header,
+ &sub_error_list, false);
+ // Parse delay_percentage_numerator
+ ParseJsonObjectField(json_object, "delayPercentageNumerator",
+ &fault_injection_policy.delay_percentage_numerator,
+ &sub_error_list, false);
+ // Parse delay_percentage_denominator
+ if (ParseJsonObjectField(
+ json_object, "delayPercentageDenominator",
+ &fault_injection_policy.delay_percentage_denominator,
+ &sub_error_list, false)) {
+ if (fault_injection_policy.delay_percentage_denominator != 100 &&
+ fault_injection_policy.delay_percentage_denominator != 10000 &&
+ fault_injection_policy.delay_percentage_denominator != 1000000) {
+ sub_error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:delayPercentageDenominator error:Denominator can only be "
+ "one of "
+ "100, 10000, 1000000"));
+ }
+ }
+ // Parse max_faults
+ if (ParseJsonObjectField(json_object, "maxFaults",
+ &fault_injection_policy.max_faults,
+ &sub_error_list, false)) {
+ if (fault_injection_policy.max_faults < 0) {
+ sub_error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "field:maxFaults error:should be zero or positive"));
+ }
+ }
+ if (!sub_error_list.empty()) {
+ // Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
+ // string is not static in this case.
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("failed to parse faultInjectionPolicy index ", i)
+ .c_str());
+ for (size_t i = 0; i < sub_error_list.size(); ++i) {
+ error = grpc_error_add_child(error, sub_error_list[i]);
+ }
+ error_list->push_back(error);
+ }
+ policies.push_back(std::move(fault_injection_policy));
+ }
+ return policies;
+}
+
+} // namespace
+
+std::unique_ptr<ServiceConfigParser::ParsedConfig>
+FaultInjectionServiceConfigParser::ParsePerMethodParams(
+ const grpc_channel_args* args, const Json& json, grpc_error** error) {
+ GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
+ // Only parse fault injection policy if the following channel arg is present.
+ if (!grpc_channel_args_find_bool(
+ args, GRPC_ARG_PARSE_FAULT_INJECTION_METHOD_CONFIG, false)) {
+ return nullptr;
+ }
+ // Parse fault injection policy from given Json
+ std::vector<FaultInjectionMethodParsedConfig::FaultInjectionPolicy>
+ fault_injection_policies;
+ std::vector<grpc_error*> error_list;
+ const Json::Array* policies_json_array;
+ if (ParseJsonObjectField(json.object_value(), "faultInjectionPolicy",
+ &policies_json_array, &error_list)) {
+ fault_injection_policies =
+ ParseFaultInjectionPolicy(*policies_json_array, &error_list);
+ }
+ *error = GRPC_ERROR_CREATE_FROM_VECTOR("Fault injection parser", &error_list);
+ if (*error != GRPC_ERROR_NONE || fault_injection_policies.empty()) {
+ return nullptr;
+ }
+ return y_absl::make_unique<FaultInjectionMethodParsedConfig>(
+ std::move(fault_injection_policies));
+}
+
+void FaultInjectionServiceConfigParser::Register() {
+ g_fault_injection_parser_index = ServiceConfigParser::RegisterParser(
+ y_absl::make_unique<FaultInjectionServiceConfigParser>());
+}
+
+size_t FaultInjectionServiceConfigParser::ParserIndex() {
+ return g_fault_injection_parser_index;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.h b/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.h
new file mode 100644
index 00000000000..33e395e0728
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/filters/fault_injection/service_config_parser.h
@@ -0,0 +1,85 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef GRPC_CORE_EXT_FILTERS_FAULT_INJECTION_SERVICE_CONFIG_PARSER_H
+#define GRPC_CORE_EXT_FILTERS_FAULT_INJECTION_SERVICE_CONFIG_PARSER_H
+
+#include <grpc/support/port_platform.h>
+
+#include <vector>
+
+#include "src/core/ext/filters/client_channel/service_config.h"
+#include "src/core/lib/iomgr/exec_ctx.h"
+
+namespace grpc_core {
+
+class FaultInjectionMethodParsedConfig
+ : public ServiceConfigParser::ParsedConfig {
+ public:
+ struct FaultInjectionPolicy {
+ grpc_status_code abort_code = GRPC_STATUS_OK;
+ TString abort_message;
+ TString abort_code_header;
+ TString abort_percentage_header;
+ uint32_t abort_percentage_numerator = 0;
+ uint32_t abort_percentage_denominator = 100;
+
+ grpc_millis delay = 0;
+ TString delay_header;
+ TString delay_percentage_header;
+ uint32_t delay_percentage_numerator = 0;
+ uint32_t delay_percentage_denominator = 100;
+
+ // By default, the max allowed active faults are unlimited.
+ uint32_t max_faults = std::numeric_limits<uint32_t>::max();
+ };
+
+ explicit FaultInjectionMethodParsedConfig(
+ std::vector<FaultInjectionPolicy> fault_injection_policies)
+ : fault_injection_policies_(std::move(fault_injection_policies)) {}
+
+ // Returns the fault injection policy at certain index.
+ // There might be multiple fault injection policies functioning at the same
+ // time. The order between the policies are stable, and an index is used to
+ // keep track of their relative positions. The FaultInjectionFilter uses this
+ // method to access the parsed fault injection policy in service config,
+ // whether it came from xDS resolver or directly from service config
+ const FaultInjectionPolicy* fault_injection_policy(int index) const {
+ if (static_cast<size_t>(index) >= fault_injection_policies_.size()) {
+ return nullptr;
+ }
+ return &fault_injection_policies_[index];
+ }
+
+ private:
+ std::vector<FaultInjectionPolicy> fault_injection_policies_;
+};
+
+class FaultInjectionServiceConfigParser : public ServiceConfigParser::Parser {
+ public:
+ // Parses the per-method service config for fault injection filter.
+ std::unique_ptr<ServiceConfigParser::ParsedConfig> ParsePerMethodParams(
+ const grpc_channel_args* args, const Json& json,
+ grpc_error** error) override;
+ // Returns the parser index for FaultInjectionServiceConfigParser.
+ static size_t ParserIndex();
+ // Registers FaultInjectionServiceConfigParser to ServiceConfigParser.
+ static void Register();
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_FILTERS_FAULT_INJECTION_SERVICE_CONFIG_PARSER_H
diff --git a/contrib/libs/grpc/src/core/ext/filters/http/client/http_client_filter.cc b/contrib/libs/grpc/src/core/ext/filters/http/client/http_client_filter.cc
index f5f18474da8..25be7ae437b 100644
--- a/contrib/libs/grpc/src/core/ext/filters/http/client/http_client_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/http/client/http_client_filter.cc
@@ -43,7 +43,7 @@
#include "src/core/lib/transport/transport_impl.h"
#define EXPECTED_CONTENT_TYPE "application/grpc"
-#define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1
+#define EXPECTED_CONTENT_TYPE_LENGTH (sizeof(EXPECTED_CONTENT_TYPE) - 1)
/* default maximum size of payload eligible for GET request */
static constexpr size_t kMaxPayloadSizeForGet = 2048;
diff --git a/contrib/libs/grpc/src/core/ext/filters/http/client_authority_filter.cc b/contrib/libs/grpc/src/core/ext/filters/http/client_authority_filter.cc
index 2c3cae6adbc..9511d2591a3 100644
--- a/contrib/libs/grpc/src/core/ext/filters/http/client_authority_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/http/client_authority_filter.cc
@@ -148,12 +148,12 @@ static bool add_client_authority_filter(grpc_channel_stack_builder* builder,
}
void grpc_client_authority_filter_init(void) {
- grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL, INT_MAX,
- add_client_authority_filter,
- (void*)&grpc_client_authority_filter);
- grpc_channel_init_register_stage(GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX,
- add_client_authority_filter,
- (void*)&grpc_client_authority_filter);
+ grpc_channel_init_register_stage(
+ GRPC_CLIENT_SUBCHANNEL, INT_MAX, add_client_authority_filter,
+ const_cast<grpc_channel_filter*>(&grpc_client_authority_filter));
+ grpc_channel_init_register_stage(
+ GRPC_CLIENT_DIRECT_CHANNEL, INT_MAX, add_client_authority_filter,
+ const_cast<grpc_channel_filter*>(&grpc_client_authority_filter));
}
void grpc_client_authority_filter_shutdown(void) {}
diff --git a/contrib/libs/grpc/src/core/ext/filters/http/http_filters_plugin.cc b/contrib/libs/grpc/src/core/ext/filters/http/http_filters_plugin.cc
index 637dc3030f2..d5577d56145 100644
--- a/contrib/libs/grpc/src/core/ext/filters/http/http_filters_plugin.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/http/http_filters_plugin.cc
@@ -93,13 +93,16 @@ void grpc_http_filters_init(void) {
maybe_add_optional_filter<true>, &decompress_filter);
grpc_channel_init_register_stage(
GRPC_CLIENT_SUBCHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- maybe_add_required_filter, (void*)&grpc_http_client_filter);
+ maybe_add_required_filter,
+ const_cast<grpc_channel_filter*>(&grpc_http_client_filter));
grpc_channel_init_register_stage(
GRPC_CLIENT_DIRECT_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- maybe_add_required_filter, (void*)&grpc_http_client_filter);
+ maybe_add_required_filter,
+ const_cast<grpc_channel_filter*>(&grpc_http_client_filter));
grpc_channel_init_register_stage(
GRPC_SERVER_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- maybe_add_required_filter, (void*)&grpc_http_server_filter);
+ maybe_add_required_filter,
+ const_cast<grpc_channel_filter*>(&grpc_http_server_filter));
}
void grpc_http_filters_shutdown(void) {}
diff --git a/contrib/libs/grpc/src/core/ext/filters/http/server/http_server_filter.cc b/contrib/libs/grpc/src/core/ext/filters/http/server/http_server_filter.cc
index 62dc76fb6cc..e4ece548b55 100644
--- a/contrib/libs/grpc/src/core/ext/filters/http/server/http_server_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/http/server/http_server_filter.cc
@@ -33,7 +33,7 @@
#include "src/core/lib/transport/static_metadata.h"
#define EXPECTED_CONTENT_TYPE "application/grpc"
-#define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1
+#define EXPECTED_CONTENT_TYPE_LENGTH (sizeof(EXPECTED_CONTENT_TYPE) - 1)
static void hs_recv_initial_metadata_ready(void* user_data, grpc_error* err);
static void hs_recv_trailing_metadata_ready(void* user_data, grpc_error* err);
@@ -269,8 +269,8 @@ static grpc_error* hs_filter_incoming_metadata(grpc_call_element* elem,
/* offset of the character '?' */
size_t offset = 0;
for (offset = 0; offset < path_length && *path_ptr != k_query_separator;
- path_ptr++, offset++)
- ;
+ path_ptr++, offset++) {
+ }
if (offset < path_length) {
grpc_slice query_slice =
grpc_slice_sub(path_slice, offset + 1, path_length);
diff --git a/contrib/libs/grpc/src/core/ext/filters/max_age/max_age_filter.cc b/contrib/libs/grpc/src/core/ext/filters/max_age/max_age_filter.cc
index c57efd6d1ca..f34f7d4325c 100644
--- a/contrib/libs/grpc/src/core/ext/filters/max_age/max_age_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/max_age/max_age_filter.cc
@@ -54,16 +54,16 @@ struct channel_data {
grpc_channel_stack* channel_stack;
/* Guards access to max_age_timer, max_age_timer_pending, max_age_grace_timer
and max_age_grace_timer_pending */
- gpr_mu max_age_timer_mu;
+ grpc_core::Mutex max_age_timer_mu;
/* True if the max_age timer callback is currently pending */
- bool max_age_timer_pending;
+ bool max_age_timer_pending Y_ABSL_GUARDED_BY(max_age_timer_mu) = false;
/* True if the max_age_grace timer callback is currently pending */
- bool max_age_grace_timer_pending;
+ bool max_age_grace_timer_pending Y_ABSL_GUARDED_BY(max_age_timer_mu) = false;
/* The timer for checking if the channel has reached its max age */
- grpc_timer max_age_timer;
+ grpc_timer max_age_timer Y_ABSL_GUARDED_BY(max_age_timer_mu);
/* The timer for checking if the max-aged channel has uesed up the grace
period */
- grpc_timer max_age_grace_timer;
+ grpc_timer max_age_grace_timer Y_ABSL_GUARDED_BY(max_age_timer_mu);
/* The timer for checking if the channel's idle duration reaches
max_connection_idle */
grpc_timer max_idle_timer;
@@ -224,7 +224,7 @@ class ConnectivityWatcher : public AsyncConnectivityStateWatcherInterface {
GRPC_CHANNEL_STACK_REF(chand_->channel_stack, "max_age conn_watch");
}
- ~ConnectivityWatcher() {
+ ~ConnectivityWatcher() override {
GRPC_CHANNEL_STACK_UNREF(chand_->channel_stack, "max_age conn_watch");
}
@@ -260,13 +260,15 @@ class ConnectivityWatcher : public AsyncConnectivityStateWatcherInterface {
static void start_max_age_timer_after_init(void* arg, grpc_error* /*error*/) {
channel_data* chand = static_cast<channel_data*>(arg);
- gpr_mu_lock(&chand->max_age_timer_mu);
- chand->max_age_timer_pending = true;
- GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_timer");
- grpc_timer_init(&chand->max_age_timer,
- grpc_core::ExecCtx::Get()->Now() + chand->max_connection_age,
- &chand->close_max_age_channel);
- gpr_mu_unlock(&chand->max_age_timer_mu);
+ {
+ grpc_core::MutexLock lock(&chand->max_age_timer_mu);
+ chand->max_age_timer_pending = true;
+ GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_timer");
+ grpc_timer_init(
+ &chand->max_age_timer,
+ grpc_core::ExecCtx::Get()->Now() + chand->max_connection_age,
+ &chand->close_max_age_channel);
+ }
grpc_transport_op* op = grpc_make_transport_op(nullptr);
op->start_connectivity_watch.reset(new grpc_core::ConnectivityWatcher(chand));
op->start_connectivity_watch_state = GRPC_CHANNEL_IDLE;
@@ -278,16 +280,17 @@ static void start_max_age_timer_after_init(void* arg, grpc_error* /*error*/) {
static void start_max_age_grace_timer_after_goaway_op(void* arg,
grpc_error* /*error*/) {
channel_data* chand = static_cast<channel_data*>(arg);
- gpr_mu_lock(&chand->max_age_timer_mu);
- chand->max_age_grace_timer_pending = true;
- GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_grace_timer");
- grpc_timer_init(
- &chand->max_age_grace_timer,
- chand->max_connection_age_grace == GRPC_MILLIS_INF_FUTURE
- ? GRPC_MILLIS_INF_FUTURE
- : grpc_core::ExecCtx::Get()->Now() + chand->max_connection_age_grace,
- &chand->force_close_max_age_channel);
- gpr_mu_unlock(&chand->max_age_timer_mu);
+ {
+ grpc_core::MutexLock lock(&chand->max_age_timer_mu);
+ chand->max_age_grace_timer_pending = true;
+ GRPC_CHANNEL_STACK_REF(chand->channel_stack, "max_age max_age_grace_timer");
+ grpc_timer_init(&chand->max_age_grace_timer,
+ chand->max_connection_age_grace == GRPC_MILLIS_INF_FUTURE
+ ? GRPC_MILLIS_INF_FUTURE
+ : grpc_core::ExecCtx::Get()->Now() +
+ chand->max_connection_age_grace,
+ &chand->force_close_max_age_channel);
+ }
GRPC_CHANNEL_STACK_UNREF(chand->channel_stack,
"max_age start_max_age_grace_timer_after_goaway_op");
}
@@ -350,9 +353,10 @@ static void max_idle_timer_cb(void* arg, grpc_error* error) {
static void close_max_age_channel(void* arg, grpc_error* error) {
channel_data* chand = static_cast<channel_data*>(arg);
- gpr_mu_lock(&chand->max_age_timer_mu);
- chand->max_age_timer_pending = false;
- gpr_mu_unlock(&chand->max_age_timer_mu);
+ {
+ grpc_core::MutexLock lock(&chand->max_age_timer_mu);
+ chand->max_age_timer_pending = false;
+ }
if (error == GRPC_ERROR_NONE) {
GRPC_CHANNEL_STACK_REF(chand->channel_stack,
"max_age start_max_age_grace_timer_after_goaway_op");
@@ -372,9 +376,10 @@ static void close_max_age_channel(void* arg, grpc_error* error) {
static void force_close_max_age_channel(void* arg, grpc_error* error) {
channel_data* chand = static_cast<channel_data*>(arg);
- gpr_mu_lock(&chand->max_age_timer_mu);
- chand->max_age_grace_timer_pending = false;
- gpr_mu_unlock(&chand->max_age_timer_mu);
+ {
+ grpc_core::MutexLock lock(&chand->max_age_timer_mu);
+ chand->max_age_grace_timer_pending = false;
+ }
if (error == GRPC_ERROR_NONE) {
grpc_transport_op* op = grpc_make_transport_op(nullptr);
op->disconnect_with_error =
@@ -426,9 +431,7 @@ static void max_age_destroy_call_elem(
static grpc_error* max_age_init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
- gpr_mu_init(&chand->max_age_timer_mu);
- chand->max_age_timer_pending = false;
- chand->max_age_grace_timer_pending = false;
+ new (chand) channel_data();
chand->channel_stack = args->channel_stack;
chand->max_connection_age =
add_random_max_connection_age_jitter_and_convert_to_grpc_millis(
@@ -513,7 +516,7 @@ static grpc_error* max_age_init_channel_elem(grpc_channel_element* elem,
/* Destructor for channel_data. */
static void max_age_destroy_channel_elem(grpc_channel_element* elem) {
channel_data* chand = static_cast<channel_data*>(elem->channel_data);
- gpr_mu_destroy(&chand->max_age_timer_mu);
+ chand->~channel_data();
}
const grpc_channel_filter grpc_max_age_filter = {
diff --git a/contrib/libs/grpc/src/core/ext/filters/message_size/message_size_filter.cc b/contrib/libs/grpc/src/core/ext/filters/message_size/message_size_filter.cc
index 944479ac3b2..a8ebe787db4 100644
--- a/contrib/libs/grpc/src/core/ext/filters/message_size/message_size_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/message_size/message_size_filter.cc
@@ -302,7 +302,7 @@ static grpc_error* message_size_init_call_elem(
static void message_size_destroy_call_elem(
grpc_call_element* elem, const grpc_call_final_info* /*final_info*/,
grpc_closure* /*ignored*/) {
- call_data* calld = (call_data*)elem->call_data;
+ call_data* calld = static_cast<call_data*>(elem->call_data);
calld->~call_data();
}
diff --git a/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc b/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
index 7f9a4fcaf82..40239d6c300 100644
--- a/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc
@@ -192,7 +192,7 @@ static bool register_workaround_cronet_compression(
if (a == nullptr) {
return true;
}
- if (grpc_channel_arg_get_bool(a, false) == false) {
+ if (!grpc_channel_arg_get_bool(a, false)) {
return true;
}
return grpc_channel_stack_builder_prepend_filter(
diff --git a/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_utils.cc b/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_utils.cc
index 4dabe896d3b..2a184ba895f 100644
--- a/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_utils.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/workarounds/workaround_utils.cc
@@ -42,7 +42,7 @@ grpc_workaround_user_agent_md* grpc_parse_user_agent(grpc_mdelem md) {
user_agent_md->workaround_active[i] = ua_parser[i](md);
}
}
- grpc_mdelem_set_user_data(md, destroy_user_agent_md, (void*)user_agent_md);
+ grpc_mdelem_set_user_data(md, destroy_user_agent_md, user_agent_md);
return user_agent_md;
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/authority.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/authority.cc
index bad3153b013..325b312991d 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/authority.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/authority.cc
@@ -26,7 +26,7 @@ grpc_channel_args* grpc_default_authority_add_if_not_present(
grpc_channel_args_find(args, GRPC_ARG_DEFAULT_AUTHORITY) != nullptr;
grpc_arg new_args[1];
size_t num_new_args = 0;
- grpc_core::UniquePtr<char> default_authority;
+ TString default_authority;
if (!has_default_authority) {
const grpc_arg* server_uri_arg =
grpc_channel_args_find(args, GRPC_ARG_SERVER_URI);
@@ -34,9 +34,9 @@ grpc_channel_args* grpc_default_authority_add_if_not_present(
GPR_ASSERT(server_uri_str != nullptr);
default_authority =
grpc_core::ResolverRegistry::GetDefaultAuthority(server_uri_str);
- GPR_ASSERT(default_authority != nullptr);
new_args[num_new_args++] = grpc_channel_arg_string_create(
- const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY), default_authority.get());
+ const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY),
+ const_cast<char*>(default_authority.c_str()));
}
return grpc_channel_args_copy_and_add(args, new_args, num_new_args);
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.cc
index 3408ed92675..345663a04cd 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.cc
@@ -178,7 +178,7 @@ void Chttp2Connector::OnHandshakeDone(void* arg, grpc_error* error) {
self->Ref().release(); // Ref held by OnTimeout()
grpc_chttp2_transport_start_reading(self->result_->transport,
args->read_buffer,
- &self->on_receive_settings_);
+ &self->on_receive_settings_, nullptr);
GRPC_CLOSURE_INIT(&self->on_timeout_, OnTimeout, self,
grpc_schedule_on_exec_ctx);
grpc_timer_init(&self->timer_, self->args_.deadline, &self->on_timeout_);
@@ -220,7 +220,7 @@ void Chttp2Connector::OnReceiveSettings(void* arg, grpc_error* error) {
self->Unref();
}
-void Chttp2Connector::OnTimeout(void* arg, grpc_error* error) {
+void Chttp2Connector::OnTimeout(void* arg, grpc_error* /*error*/) {
Chttp2Connector* self = static_cast<Chttp2Connector*>(arg);
{
MutexLock lock(&self->mu_);
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.h b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.h
index 322cbc2eba4..1488b8e128f 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.h
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/chttp2_connector.h
@@ -30,7 +30,7 @@ namespace grpc_core {
class Chttp2Connector : public SubchannelConnector {
public:
Chttp2Connector();
- ~Chttp2Connector();
+ ~Chttp2Connector() override;
void Connect(const Args& args, Result* result, grpc_closure* notify) override;
void Shutdown(grpc_error* error) override;
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
index 189ed7d1ce5..d82cc1d3f5e 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create.cc
@@ -37,10 +37,11 @@ namespace grpc_core {
class Chttp2InsecureClientChannelFactory : public ClientChannelFactory {
public:
- Subchannel* CreateSubchannel(const grpc_channel_args* args) override {
+ RefCountedPtr<Subchannel> CreateSubchannel(
+ const grpc_channel_args* args) override {
grpc_channel_args* new_args =
grpc_default_authority_add_if_not_present(args);
- Subchannel* s =
+ RefCountedPtr<Subchannel> s =
Subchannel::Create(MakeOrphanable<Chttp2Connector>(), new_args);
grpc_channel_args_destroy(new_args);
return s;
@@ -49,9 +50,13 @@ class Chttp2InsecureClientChannelFactory : public ClientChannelFactory {
namespace {
-grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args) {
+grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args,
+ grpc_error** error) {
if (target == nullptr) {
gpr_log(GPR_ERROR, "cannot create channel with NULL target name");
+ if (error != nullptr) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("channel target is NULL");
+ }
return nullptr;
}
// Add channel arg containing the server URI.
@@ -62,8 +67,8 @@ grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args) {
const char* to_remove[] = {GRPC_ARG_SERVER_URI};
grpc_channel_args* new_args =
grpc_channel_args_copy_and_add_and_remove(args, to_remove, 1, &arg, 1);
- grpc_channel* channel =
- grpc_channel_create(target, new_args, GRPC_CLIENT_CHANNEL, nullptr);
+ grpc_channel* channel = grpc_channel_create(
+ target, new_args, GRPC_CLIENT_CHANNEL, nullptr, nullptr, error);
grpc_channel_args_destroy(new_args);
return channel;
}
@@ -101,12 +106,20 @@ grpc_channel* grpc_insecure_channel_create(const char* target,
const char* arg_to_remove = arg.key;
grpc_channel_args* new_args = grpc_channel_args_copy_and_add_and_remove(
args, &arg_to_remove, 1, &arg, 1);
+ grpc_error* error = GRPC_ERROR_NONE;
// Create channel.
- grpc_channel* channel = grpc_core::CreateChannel(target, new_args);
+ grpc_channel* channel = grpc_core::CreateChannel(target, new_args, &error);
// Clean up.
grpc_channel_args_destroy(new_args);
- return channel != nullptr ? channel
- : grpc_lame_client_channel_create(
- target, GRPC_STATUS_INTERNAL,
- "Failed to create client channel");
+ if (channel == nullptr) {
+ intptr_t integer;
+ grpc_status_code status = GRPC_STATUS_INTERNAL;
+ if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &integer)) {
+ status = static_cast<grpc_status_code>(integer);
+ }
+ GRPC_ERROR_UNREF(error);
+ channel = grpc_lame_client_channel_create(
+ target, status, "Failed to create client channel");
+ }
+ return channel;
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
index 5bdcb387c9b..1360047cd56 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc
@@ -42,7 +42,8 @@ grpc_channel* grpc_insecure_channel_create_from_fd(
(target, fd, args));
grpc_arg default_authority_arg = grpc_channel_arg_string_create(
- (char*)GRPC_ARG_DEFAULT_AUTHORITY, (char*)"test.authority");
+ const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY),
+ const_cast<char*>("test.authority"));
grpc_channel_args* final_args =
grpc_channel_args_copy_and_add(args, &default_authority_arg, 1);
@@ -55,17 +56,27 @@ grpc_channel* grpc_insecure_channel_create_from_fd(
grpc_transport* transport =
grpc_create_chttp2_transport(final_args, client, true);
GPR_ASSERT(transport);
- grpc_channel* channel = grpc_channel_create(
- target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport);
+ grpc_error* error = nullptr;
+ grpc_channel* channel =
+ grpc_channel_create(target, final_args, GRPC_CLIENT_DIRECT_CHANNEL,
+ transport, nullptr, &error);
grpc_channel_args_destroy(final_args);
- grpc_chttp2_transport_start_reading(transport, nullptr, nullptr);
+ if (channel != nullptr) {
+ grpc_chttp2_transport_start_reading(transport, nullptr, nullptr, nullptr);
+ grpc_core::ExecCtx::Get()->Flush();
+ } else {
+ intptr_t integer;
+ grpc_status_code status = GRPC_STATUS_INTERNAL;
+ if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &integer)) {
+ status = static_cast<grpc_status_code>(integer);
+ }
+ GRPC_ERROR_UNREF(error);
+ grpc_transport_destroy(transport);
+ channel = grpc_lame_client_channel_create(
+ target, status, "Failed to create client channel");
+ }
- grpc_core::ExecCtx::Get()->Flush();
-
- return channel != nullptr ? channel
- : grpc_lame_client_channel_create(
- target, GRPC_STATUS_INTERNAL,
- "Failed to create client channel");
+ return channel;
}
#else // !GPR_SUPPORT_CHANNELS_FROM_FD
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
index 93dadf36456..d3f60add4d4 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc
@@ -43,14 +43,15 @@ namespace grpc_core {
class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
public:
- Subchannel* CreateSubchannel(const grpc_channel_args* args) override {
+ RefCountedPtr<Subchannel> CreateSubchannel(
+ const grpc_channel_args* args) override {
grpc_channel_args* new_args = GetSecureNamingChannelArgs(args);
if (new_args == nullptr) {
gpr_log(GPR_ERROR,
"Failed to create channel args during subchannel creation.");
return nullptr;
}
- Subchannel* s =
+ RefCountedPtr<Subchannel> s =
Subchannel::Create(MakeOrphanable<Chttp2Connector>(), new_args);
grpc_channel_args_destroy(new_args);
return s;
@@ -78,9 +79,8 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
// First, check the authority override channel arg.
// Otherwise, get it from the server name used to construct the
// channel.
- grpc_core::UniquePtr<char> authority(
- gpr_strdup(FindAuthorityOverrideInArgs(args)));
- if (authority == nullptr) {
+ TString authority(FindAuthorityOverrideInArgs(args));
+ if (authority.empty()) {
const char* server_uri_str =
grpc_channel_args_find_string(args, GRPC_ARG_SERVER_URI);
GPR_ASSERT(server_uri_str != nullptr);
@@ -92,7 +92,8 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
// If the channel args don't already contain GRPC_ARG_DEFAULT_AUTHORITY,
// add the arg, setting it to the value just obtained.
args_to_add[num_args_to_add++] = grpc_channel_arg_string_create(
- const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY), authority.get());
+ const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY),
+ const_cast<char*>(authority.c_str()));
}
grpc_channel_args* args_with_authority =
grpc_channel_args_copy_and_add(args, args_to_add, num_args_to_add);
@@ -101,12 +102,12 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
RefCountedPtr<grpc_channel_security_connector>
subchannel_security_connector =
channel_credentials->create_security_connector(
- /*call_creds=*/nullptr, authority.get(), args_with_authority,
+ /*call_creds=*/nullptr, authority.c_str(), args_with_authority,
&new_args_from_connector);
if (subchannel_security_connector == nullptr) {
gpr_log(GPR_ERROR,
"Failed to create secure subchannel for secure name '%s'",
- authority.get());
+ authority.c_str());
grpc_channel_args_destroy(args_with_authority);
return nullptr;
}
@@ -127,9 +128,13 @@ class Chttp2SecureClientChannelFactory : public ClientChannelFactory {
namespace {
-grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args) {
+grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args,
+ grpc_error** error) {
if (target == nullptr) {
gpr_log(GPR_ERROR, "cannot create channel with NULL target name");
+ if (error != nullptr) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("channel target is NULL");
+ }
return nullptr;
}
// Add channel arg containing the server URI.
@@ -140,8 +145,8 @@ grpc_channel* CreateChannel(const char* target, const grpc_channel_args* args) {
const char* to_remove[] = {GRPC_ARG_SERVER_URI};
grpc_channel_args* new_args =
grpc_channel_args_copy_and_add_and_remove(args, to_remove, 1, &arg, 1);
- grpc_channel* channel =
- grpc_channel_create(target, new_args, GRPC_CLIENT_CHANNEL, nullptr);
+ grpc_channel* channel = grpc_channel_create(
+ target, new_args, GRPC_CLIENT_CHANNEL, nullptr, nullptr, error);
grpc_channel_args_destroy(new_args);
return channel;
}
@@ -176,6 +181,7 @@ grpc_channel* grpc_secure_channel_create(grpc_channel_credentials* creds,
4, ((void*)creds, target, (void*)args, (void*)reserved));
GPR_ASSERT(reserved == nullptr);
grpc_channel* channel = nullptr;
+ grpc_error* error = GRPC_ERROR_NONE;
if (creds != nullptr) {
// Add channel args containing the client channel factory and channel
// credentials.
@@ -189,12 +195,19 @@ grpc_channel* grpc_secure_channel_create(grpc_channel_credentials* creds,
args, &arg_to_remove, 1, args_to_add, GPR_ARRAY_SIZE(args_to_add));
new_args = creds->update_arguments(new_args);
// Create channel.
- channel = grpc_core::CreateChannel(target, new_args);
+ channel = grpc_core::CreateChannel(target, new_args, &error);
// Clean up.
grpc_channel_args_destroy(new_args);
}
- return channel != nullptr ? channel
- : grpc_lame_client_channel_create(
- target, GRPC_STATUS_INTERNAL,
- "Failed to create secure client channel");
+ if (channel == nullptr) {
+ intptr_t integer;
+ grpc_status_code status = GRPC_STATUS_INTERNAL;
+ if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &integer)) {
+ status = static_cast<grpc_status_code>(integer);
+ }
+ GRPC_ERROR_UNREF(error);
+ channel = grpc_lame_client_channel_create(
+ target, status, "Failed to create secure client channel");
+ }
+ return channel;
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc
index 94cf61310bc..45ea9c8a4eb 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.cc
@@ -25,6 +25,7 @@
#include <string.h>
#include <vector>
+#include "y_absl/strings/match.h"
#include "y_absl/strings/str_cat.h"
#include "y_absl/strings/str_format.h"
@@ -45,7 +46,9 @@
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/resource_quota.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/tcp_server.h"
+#include "src/core/lib/iomgr/unix_sockets_posix.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/server.h"
@@ -53,17 +56,24 @@
namespace grpc_core {
namespace {
+const char kUnixUriPrefix[] = "unix:";
+const char kUnixAbstractUriPrefix[] = "unix-abstract:";
+
class Chttp2ServerListener : public Server::ListenerInterface {
public:
- static grpc_error* Create(Server* server, const char* addr,
- grpc_channel_args* args, int* port_num);
+ static grpc_error* Create(Server* server, grpc_resolved_address* addr,
+ grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier,
+ int* port_num);
static grpc_error* CreateWithAcceptor(Server* server, const char* name,
- grpc_channel_args* args);
+ grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier);
// Do not instantiate directly. Use one of the factory methods above.
- Chttp2ServerListener(Server* server, grpc_channel_args* args);
- ~Chttp2ServerListener();
+ Chttp2ServerListener(Server* server, grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier);
+ ~Chttp2ServerListener() override;
void Start(Server* server,
const std::vector<grpc_pollset*>* pollsets) override;
@@ -77,58 +87,212 @@ class Chttp2ServerListener : public Server::ListenerInterface {
void Orphan() override;
private:
- class ConnectionState : public RefCounted<ConnectionState> {
+ class ConfigFetcherWatcher
+ : public grpc_server_config_fetcher::WatcherInterface {
public:
- ConnectionState(Chttp2ServerListener* listener,
- grpc_pollset* accepting_pollset,
- grpc_tcp_server_acceptor* acceptor,
- RefCountedPtr<HandshakeManager> handshake_mgr,
- grpc_channel_args* args, grpc_endpoint* endpoint);
+ explicit ConfigFetcherWatcher(RefCountedPtr<Chttp2ServerListener> listener)
+ : listener_(std::move(listener)) {}
+
+ void UpdateConnectionManager(
+ RefCountedPtr<grpc_server_config_fetcher::ConnectionManager>
+ connection_manager) override;
- ~ConnectionState();
+ void StopServing() override;
private:
- static void OnTimeout(void* arg, grpc_error* error);
- static void OnReceiveSettings(void* arg, grpc_error* error);
- static void OnHandshakeDone(void* arg, grpc_error* error);
-
- Chttp2ServerListener* const listener_;
- grpc_pollset* const accepting_pollset_;
- grpc_tcp_server_acceptor* const acceptor_;
- RefCountedPtr<HandshakeManager> handshake_mgr_;
- // State for enforcing handshake timeout on receiving HTTP/2 settings.
- grpc_chttp2_transport* transport_ = nullptr;
- grpc_millis deadline_;
- grpc_timer timer_;
- grpc_closure on_timeout_;
- grpc_closure on_receive_settings_;
- grpc_pollset_set* const interested_parties_;
+ RefCountedPtr<Chttp2ServerListener> listener_;
};
+ class ActiveConnection : public InternallyRefCounted<ActiveConnection> {
+ public:
+ class HandshakingState : public InternallyRefCounted<HandshakingState> {
+ public:
+ HandshakingState(RefCountedPtr<ActiveConnection> connection_ref,
+ grpc_pollset* accepting_pollset,
+ grpc_tcp_server_acceptor* acceptor,
+ grpc_channel_args* args);
+
+ ~HandshakingState() override;
+
+ void Orphan() override;
+
+ void Start(grpc_endpoint* endpoint, grpc_channel_args* args);
+
+ // Needed to be able to grab an external ref in ActiveConnection::Start()
+ using InternallyRefCounted<HandshakingState>::Ref;
+
+ private:
+ static void OnTimeout(void* arg, grpc_error* error);
+ static void OnReceiveSettings(void* arg, grpc_error* /* error */);
+ static void OnHandshakeDone(void* arg, grpc_error* error);
+ RefCountedPtr<ActiveConnection> const connection_;
+ grpc_pollset* const accepting_pollset_;
+ grpc_tcp_server_acceptor* const acceptor_;
+ RefCountedPtr<HandshakeManager> handshake_mgr_
+ Y_ABSL_GUARDED_BY(&connection_->mu_);
+ // State for enforcing handshake timeout on receiving HTTP/2 settings.
+ grpc_millis const deadline_;
+ grpc_timer timer_ Y_ABSL_GUARDED_BY(&connection_->mu_);
+ grpc_closure on_timeout_ Y_ABSL_GUARDED_BY(&connection_->mu_);
+ grpc_closure on_receive_settings_ Y_ABSL_GUARDED_BY(&connection_->mu_);
+ grpc_pollset_set* const interested_parties_;
+ };
+
+ ActiveConnection(grpc_pollset* accepting_pollset,
+ grpc_tcp_server_acceptor* acceptor,
+ grpc_channel_args* args);
+ ~ActiveConnection() override;
+
+ void Orphan() override;
+
+ void SendGoAway();
+
+ void Start(RefCountedPtr<Chttp2ServerListener> listener,
+ grpc_endpoint* endpoint, grpc_channel_args* args);
+
+ // Needed to be able to grab an external ref in
+ // Chttp2ServerListener::OnAccept()
+ using InternallyRefCounted<ActiveConnection>::Ref;
+
+ private:
+ static void OnClose(void* arg, grpc_error* error);
+
+ RefCountedPtr<Chttp2ServerListener> listener_;
+ Mutex mu_ Y_ABSL_ACQUIRED_AFTER(&listener_->mu_);
+ // Set by HandshakingState before the handshaking begins and reset when
+ // handshaking is done.
+ OrphanablePtr<HandshakingState> handshaking_state_ Y_ABSL_GUARDED_BY(&mu_);
+ // Set by HandshakingState when handshaking is done and a valid transport is
+ // created.
+ grpc_chttp2_transport* transport_ Y_ABSL_GUARDED_BY(&mu_) = nullptr;
+ grpc_closure on_close_;
+ bool shutdown_ Y_ABSL_GUARDED_BY(&mu_) = false;
+ };
+
+ // To allow access to RefCounted<> like interface.
+ friend class RefCountedPtr<Chttp2ServerListener>;
+
+ // Should only be called once so as to start the TCP server.
+ void StartListening();
+
static void OnAccept(void* arg, grpc_endpoint* tcp,
grpc_pollset* accepting_pollset,
grpc_tcp_server_acceptor* acceptor);
- RefCountedPtr<HandshakeManager> CreateHandshakeManager();
-
static void TcpServerShutdownComplete(void* arg, grpc_error* error);
static void DestroyListener(Server* /*server*/, void* arg,
grpc_closure* destroy_done);
+ // The interface required by RefCountedPtr<> has been manually implemented
+ // here to take a ref on tcp_server_ instead. Note that, the handshaker needs
+ // tcp_server_ to exist for the lifetime of the handshake since it's needed by
+ // acceptor. Sharing refs between the listener and tcp_server_ is just an
+ // optimization to avoid taking additional refs on the listener, since
+ // TcpServerShutdownComplete already holds a ref to the listener.
+ void IncrementRefCount() { grpc_tcp_server_ref(tcp_server_); }
+ void IncrementRefCount(const DebugLocation& /* location */,
+ const char* /* reason */) {
+ IncrementRefCount();
+ }
+
+ RefCountedPtr<Chttp2ServerListener> Ref() GRPC_MUST_USE_RESULT {
+ IncrementRefCount();
+ return RefCountedPtr<Chttp2ServerListener>(this);
+ }
+ RefCountedPtr<Chttp2ServerListener> Ref(const DebugLocation& /* location */,
+ const char* /* reason */)
+ GRPC_MUST_USE_RESULT {
+ return Ref();
+ }
+
+ void Unref() { grpc_tcp_server_unref(tcp_server_); }
+ void Unref(const DebugLocation& /* location */, const char* /* reason */) {
+ Unref();
+ }
+
Server* const server_;
- grpc_channel_args* const args_;
grpc_tcp_server* tcp_server_;
+ grpc_resolved_address resolved_address_;
+ Chttp2ServerArgsModifier const args_modifier_;
+ ConfigFetcherWatcher* config_fetcher_watcher_ = nullptr;
+ Mutex channel_args_mu_;
+ grpc_channel_args* args_ Y_ABSL_GUARDED_BY(channel_args_mu_);
+ RefCountedPtr<grpc_server_config_fetcher::ConnectionManager>
+ connection_manager_ Y_ABSL_GUARDED_BY(channel_args_mu_);
Mutex mu_;
- bool shutdown_ = true;
- grpc_closure tcp_server_shutdown_complete_;
- grpc_closure* on_destroy_done_ = nullptr;
- HandshakeManager* pending_handshake_mgrs_ = nullptr;
+ // Signals whether grpc_tcp_server_start() has been called.
+ bool started_ Y_ABSL_GUARDED_BY(mu_) = false;
+ // Signals whether grpc_tcp_server_start() has completed.
+ CondVar started_cv_ Y_ABSL_GUARDED_BY(mu_);
+ // Signals whether new requests/connections are to be accepted.
+ bool is_serving_ Y_ABSL_GUARDED_BY(mu_) = false;
+ // Signals whether the application has triggered shutdown.
+ bool shutdown_ Y_ABSL_GUARDED_BY(mu_) = false;
+ std::map<ActiveConnection*, OrphanablePtr<ActiveConnection>> connections_
+ Y_ABSL_GUARDED_BY(mu_);
+ grpc_closure tcp_server_shutdown_complete_ Y_ABSL_GUARDED_BY(mu_);
+ grpc_closure* on_destroy_done_ Y_ABSL_GUARDED_BY(mu_) = nullptr;
RefCountedPtr<channelz::ListenSocketNode> channelz_listen_socket_;
};
//
-// Chttp2ServerListener::ConnectionState
+// Chttp2ServerListener::ConfigFetcherWatcher
+//
+
+void Chttp2ServerListener::ConfigFetcherWatcher::UpdateConnectionManager(
+ RefCountedPtr<grpc_server_config_fetcher::ConnectionManager>
+ connection_manager) {
+ RefCountedPtr<grpc_server_config_fetcher::ConnectionManager>
+ connection_manager_to_destroy;
+ {
+ MutexLock lock(&listener_->channel_args_mu_);
+ connection_manager_to_destroy = listener_->connection_manager_;
+ listener_->connection_manager_ = std::move(connection_manager);
+ }
+ {
+ MutexLock lock(&listener_->mu_);
+ if (listener_->shutdown_) {
+ return;
+ }
+ listener_->is_serving_ = true;
+ if (listener_->started_) return;
+ }
+ int port_temp;
+ grpc_error* error = grpc_tcp_server_add_port(
+ listener_->tcp_server_, &listener_->resolved_address_, &port_temp);
+ if (error != GRPC_ERROR_NONE) {
+ GRPC_ERROR_UNREF(error);
+ gpr_log(GPR_ERROR, "Error adding port to server: %s",
+ grpc_error_string(error));
+ // TODO(yashykt): We wouldn't need to assert here if we bound to the
+ // port earlier during AddPort.
+ GPR_ASSERT(0);
+ }
+ listener_->StartListening();
+ {
+ MutexLock lock(&listener_->mu_);
+ listener_->started_ = true;
+ listener_->started_cv_.SignalAll();
+ }
+}
+
+void Chttp2ServerListener::ConfigFetcherWatcher::StopServing() {
+ std::map<ActiveConnection*, OrphanablePtr<ActiveConnection>> connections;
+ {
+ MutexLock lock(&listener_->mu_);
+ listener_->is_serving_ = false;
+ connections = std::move(listener_->connections_);
+ }
+ // Send GOAWAYs on the transports so that they disconnected when existing RPCs
+ // finish.
+ for (auto& connection : connections) {
+ connection.first->SendGoAway();
+ }
+}
+
+//
+// Chttp2ServerListener::ActiveConnection::HandshakingState
//
grpc_millis GetConnectionDeadline(const grpc_channel_args* args) {
@@ -138,73 +302,96 @@ grpc_millis GetConnectionDeadline(const grpc_channel_args* args) {
return ExecCtx::Get()->Now() + timeout_ms;
}
-Chttp2ServerListener::ConnectionState::ConnectionState(
- Chttp2ServerListener* listener, grpc_pollset* accepting_pollset,
- grpc_tcp_server_acceptor* acceptor,
- RefCountedPtr<HandshakeManager> handshake_mgr, grpc_channel_args* args,
- grpc_endpoint* endpoint)
- : listener_(listener),
+Chttp2ServerListener::ActiveConnection::HandshakingState::HandshakingState(
+ RefCountedPtr<ActiveConnection> connection_ref,
+ grpc_pollset* accepting_pollset, grpc_tcp_server_acceptor* acceptor,
+ grpc_channel_args* args)
+ : connection_(std::move(connection_ref)),
accepting_pollset_(accepting_pollset),
acceptor_(acceptor),
- handshake_mgr_(std::move(handshake_mgr)),
+ handshake_mgr_(MakeRefCounted<HandshakeManager>()),
deadline_(GetConnectionDeadline(args)),
interested_parties_(grpc_pollset_set_create()) {
grpc_pollset_set_add_pollset(interested_parties_, accepting_pollset_);
HandshakerRegistry::AddHandshakers(HANDSHAKER_SERVER, args,
interested_parties_, handshake_mgr_.get());
- handshake_mgr_->DoHandshake(endpoint, args, deadline_, acceptor_,
- OnHandshakeDone, this);
}
-Chttp2ServerListener::ConnectionState::~ConnectionState() {
- if (transport_ != nullptr) {
- GRPC_CHTTP2_UNREF_TRANSPORT(transport_, "receive settings timeout");
- }
+Chttp2ServerListener::ActiveConnection::HandshakingState::~HandshakingState() {
grpc_pollset_set_del_pollset(interested_parties_, accepting_pollset_);
grpc_pollset_set_destroy(interested_parties_);
}
-void Chttp2ServerListener::ConnectionState::OnTimeout(void* arg,
- grpc_error* error) {
- ConnectionState* self = static_cast<ConnectionState*>(arg);
+void Chttp2ServerListener::ActiveConnection::HandshakingState::Orphan() {
+ {
+ MutexLock lock(&connection_->mu_);
+ if (handshake_mgr_ != nullptr) {
+ handshake_mgr_->Shutdown(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Listener stopped serving."));
+ }
+ }
+ Unref();
+}
+
+void Chttp2ServerListener::ActiveConnection::HandshakingState::Start(
+ grpc_endpoint* endpoint, grpc_channel_args* args) {
+ Ref().release(); // Held by OnHandshakeDone
+ RefCountedPtr<HandshakeManager> handshake_mgr;
+ {
+ MutexLock lock(&connection_->mu_);
+ if (handshake_mgr_ == nullptr) return;
+ handshake_mgr = handshake_mgr_;
+ }
+ handshake_mgr->DoHandshake(endpoint, args, deadline_, acceptor_,
+ OnHandshakeDone, this);
+}
+
+void Chttp2ServerListener::ActiveConnection::HandshakingState::OnTimeout(
+ void* arg, grpc_error* error) {
+ HandshakingState* self = static_cast<HandshakingState*>(arg);
// Note that we may be called with GRPC_ERROR_NONE when the timer fires
// or with an error indicating that the timer system is being shut down.
if (error != GRPC_ERROR_CANCELLED) {
grpc_transport_op* op = grpc_make_transport_op(nullptr);
op->disconnect_with_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Did not receive HTTP/2 settings before handshake timeout");
- grpc_transport_perform_op(&self->transport_->base, op);
+ grpc_chttp2_transport* transport = nullptr;
+ {
+ MutexLock lock(&self->connection_->mu_);
+ transport = self->connection_->transport_;
+ }
+ grpc_transport_perform_op(&transport->base, op);
}
self->Unref();
}
-void Chttp2ServerListener::ConnectionState::OnReceiveSettings(
- void* arg, grpc_error* error) {
- ConnectionState* self = static_cast<ConnectionState*>(arg);
- if (error == GRPC_ERROR_NONE) {
- grpc_timer_cancel(&self->timer_);
- }
+void Chttp2ServerListener::ActiveConnection::HandshakingState::
+ OnReceiveSettings(void* arg, grpc_error* /* error */) {
+ HandshakingState* self = static_cast<HandshakingState*>(arg);
+ grpc_timer_cancel(&self->timer_);
self->Unref();
}
-void Chttp2ServerListener::ConnectionState::OnHandshakeDone(void* arg,
- grpc_error* error) {
+void Chttp2ServerListener::ActiveConnection::HandshakingState::OnHandshakeDone(
+ void* arg, grpc_error* error) {
auto* args = static_cast<HandshakerArgs*>(arg);
- ConnectionState* self = static_cast<ConnectionState*>(args->user_data);
+ HandshakingState* self = static_cast<HandshakingState*>(args->user_data);
+ OrphanablePtr<HandshakingState> handshaking_state_ref;
+ RefCountedPtr<HandshakeManager> handshake_mgr;
+ bool cleanup_connection = false;
+ bool free_resource_quota = false;
+ grpc_resource_user* resource_user =
+ self->connection_->listener_->server_->default_resource_user();
{
- MutexLock lock(&self->listener_->mu_);
- grpc_resource_user* resource_user =
- self->listener_->server_->default_resource_user();
- if (error != GRPC_ERROR_NONE || self->listener_->shutdown_) {
+ MutexLock connection_lock(&self->connection_->mu_);
+ if (error != GRPC_ERROR_NONE || self->connection_->shutdown_) {
const char* error_str = grpc_error_string(error);
gpr_log(GPR_DEBUG, "Handshaking failed: %s", error_str);
- if (resource_user != nullptr) {
- grpc_resource_user_free(resource_user,
- GRPC_RESOURCE_QUOTA_CHANNEL_SIZE);
- }
+ cleanup_connection = true;
+ free_resource_quota = true;
if (error == GRPC_ERROR_NONE && args->endpoint != nullptr) {
- // We were shut down after handshaking completed successfully, so
- // destroy the endpoint here.
+ // We were shut down or stopped serving after handshaking completed
+ // successfully, so destroy the endpoint here.
// TODO(ctiller): It is currently necessary to shutdown endpoints
// before destroying them, even if we know that there are no
// pending read/write callbacks. This should be fixed, at which
@@ -222,44 +409,167 @@ void Chttp2ServerListener::ConnectionState::OnHandshakeDone(void* arg,
if (args->endpoint != nullptr) {
grpc_transport* transport = grpc_create_chttp2_transport(
args->args, args->endpoint, false, resource_user);
- self->listener_->server_->SetupTransport(
- transport, self->accepting_pollset_, args->args,
- grpc_chttp2_transport_get_socket_node(transport), resource_user);
- // Use notify_on_receive_settings callback to enforce the
- // handshake deadline.
- // Note: The reinterpret_cast<>s here are safe, because
- // grpc_chttp2_transport is a C-style extension of
- // grpc_transport, so this is morally equivalent of a
- // static_cast<> to a derived class.
- // TODO(roth): Change to static_cast<> when we C++-ify the
- // transport API.
- self->transport_ = reinterpret_cast<grpc_chttp2_transport*>(transport);
- self->Ref().release(); // Held by OnReceiveSettings().
- GRPC_CLOSURE_INIT(&self->on_receive_settings_, OnReceiveSettings, self,
- grpc_schedule_on_exec_ctx);
- grpc_chttp2_transport_start_reading(transport, args->read_buffer,
- &self->on_receive_settings_);
- grpc_channel_args_destroy(args->args);
- self->Ref().release(); // Held by OnTimeout().
- GRPC_CHTTP2_REF_TRANSPORT(
- reinterpret_cast<grpc_chttp2_transport*>(transport),
- "receive settings timeout");
- GRPC_CLOSURE_INIT(&self->on_timeout_, OnTimeout, self,
- grpc_schedule_on_exec_ctx);
- grpc_timer_init(&self->timer_, self->deadline_, &self->on_timeout_);
- } else {
- if (resource_user != nullptr) {
- grpc_resource_user_free(resource_user,
- GRPC_RESOURCE_QUOTA_CHANNEL_SIZE);
+ grpc_error* channel_init_err =
+ self->connection_->listener_->server_->SetupTransport(
+ transport, self->accepting_pollset_, args->args,
+ grpc_chttp2_transport_get_socket_node(transport),
+ resource_user);
+ if (channel_init_err == GRPC_ERROR_NONE) {
+ // Use notify_on_receive_settings callback to enforce the
+ // handshake deadline.
+ // Note: The reinterpret_cast<>s here are safe, because
+ // grpc_chttp2_transport is a C-style extension of
+ // grpc_transport, so this is morally equivalent of a
+ // static_cast<> to a derived class.
+ // TODO(roth): Change to static_cast<> when we C++-ify the
+ // transport API.
+ self->connection_->transport_ =
+ reinterpret_cast<grpc_chttp2_transport*>(transport);
+ GRPC_CHTTP2_REF_TRANSPORT(self->connection_->transport_,
+ "ActiveConnection"); // Held by connection_
+ self->Ref().release(); // Held by OnReceiveSettings().
+ GRPC_CLOSURE_INIT(&self->on_receive_settings_, OnReceiveSettings,
+ self, grpc_schedule_on_exec_ctx);
+ // If the listener has been configured with a config fetcher, we need
+ // to watch on the transport being closed so that we can an updated
+ // list of active connections.
+ grpc_closure* on_close = nullptr;
+ if (self->connection_->listener_->config_fetcher_watcher_ !=
+ nullptr) {
+ // Refs helds by OnClose()
+ self->connection_->Ref().release();
+ on_close = &self->connection_->on_close_;
+ } else {
+ // Remove the connection from the connections_ map since OnClose()
+ // will not be invoked when a config fetcher is set.
+ cleanup_connection = true;
+ }
+ grpc_chttp2_transport_start_reading(transport, args->read_buffer,
+ &self->on_receive_settings_,
+ on_close);
+ grpc_channel_args_destroy(args->args);
+ self->Ref().release(); // Held by OnTimeout().
+ GRPC_CLOSURE_INIT(&self->on_timeout_, OnTimeout, self,
+ grpc_schedule_on_exec_ctx);
+ grpc_timer_init(&self->timer_, self->deadline_, &self->on_timeout_);
+ } else {
+ // Failed to create channel from transport. Clean up.
+ gpr_log(GPR_ERROR, "Failed to create channel: %s",
+ grpc_error_string(channel_init_err));
+ GRPC_ERROR_UNREF(channel_init_err);
+ grpc_transport_destroy(transport);
+ grpc_slice_buffer_destroy_internal(args->read_buffer);
+ gpr_free(args->read_buffer);
+ cleanup_connection = true;
+ free_resource_quota = true;
+ grpc_channel_args_destroy(args->args);
}
+ } else {
+ cleanup_connection = true;
+ free_resource_quota = true;
}
}
- self->handshake_mgr_->RemoveFromPendingMgrList(
- &self->listener_->pending_handshake_mgrs_);
+ // Since the handshake manager is done, the connection no longer needs to
+ // shutdown the handshake when the listener needs to stop serving.
+ // Avoid calling the destructor of HandshakeManager and HandshakingState
+ // from within the critical region.
+ handshake_mgr = std::move(self->handshake_mgr_);
+ handshaking_state_ref = std::move(self->connection_->handshaking_state_);
}
- self->handshake_mgr_.reset();
gpr_free(self->acceptor_);
- grpc_tcp_server_unref(self->listener_->tcp_server_);
+ OrphanablePtr<ActiveConnection> connection;
+ if (free_resource_quota && resource_user != nullptr) {
+ grpc_resource_user_free(resource_user, GRPC_RESOURCE_QUOTA_CHANNEL_SIZE);
+ }
+ if (cleanup_connection) {
+ MutexLock listener_lock(&self->connection_->listener_->mu_);
+ auto it = self->connection_->listener_->connections_.find(
+ self->connection_.get());
+ if (it != self->connection_->listener_->connections_.end()) {
+ connection = std::move(it->second);
+ self->connection_->listener_->connections_.erase(it);
+ }
+ }
+ self->Unref();
+}
+
+//
+// Chttp2ServerListener::ActiveConnection
+//
+
+Chttp2ServerListener::ActiveConnection::ActiveConnection(
+ grpc_pollset* accepting_pollset, grpc_tcp_server_acceptor* acceptor,
+ grpc_channel_args* args)
+ : handshaking_state_(MakeOrphanable<HandshakingState>(
+ Ref(), accepting_pollset, acceptor, args)) {
+ GRPC_CLOSURE_INIT(&on_close_, ActiveConnection::OnClose, this,
+ grpc_schedule_on_exec_ctx);
+}
+
+Chttp2ServerListener::ActiveConnection::~ActiveConnection() {
+ if (transport_ != nullptr) {
+ GRPC_CHTTP2_UNREF_TRANSPORT(transport_, "ActiveConnection");
+ }
+}
+
+void Chttp2ServerListener::ActiveConnection::Orphan() {
+ OrphanablePtr<HandshakingState> handshaking_state;
+ {
+ MutexLock lock(&mu_);
+ shutdown_ = true;
+ // Reset handshaking_state_ since we have been orphaned by the listener
+ // signaling that the listener has stopped serving.
+ handshaking_state = std::move(handshaking_state_);
+ }
+ Unref();
+}
+
+void Chttp2ServerListener::ActiveConnection::SendGoAway() {
+ grpc_chttp2_transport* transport = nullptr;
+ {
+ MutexLock lock(&mu_);
+ transport = transport_;
+ }
+ if (transport != nullptr) {
+ grpc_transport_op* op = grpc_make_transport_op(nullptr);
+ op->goaway_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Server is stopping to serve requests.");
+ grpc_transport_perform_op(&transport->base, op);
+ }
+}
+
+void Chttp2ServerListener::ActiveConnection::Start(
+ RefCountedPtr<Chttp2ServerListener> listener, grpc_endpoint* endpoint,
+ grpc_channel_args* args) {
+ RefCountedPtr<HandshakingState> handshaking_state_ref;
+ listener_ = std::move(listener);
+ {
+ MutexLock lock(&mu_);
+ if (shutdown_) return;
+ // Hold a ref to HandshakingState to allow starting the handshake outside
+ // the critical region.
+ handshaking_state_ref = handshaking_state_->Ref();
+ }
+ handshaking_state_ref->Start(endpoint, args);
+}
+
+void Chttp2ServerListener::ActiveConnection::OnClose(void* arg,
+ grpc_error* /* error */) {
+ ActiveConnection* self = static_cast<ActiveConnection*>(arg);
+ OrphanablePtr<ActiveConnection> connection;
+ {
+ MutexLock listener_lock(&self->listener_->mu_);
+ MutexLock connection_lock(&self->mu_);
+ // The node was already deleted from the connections_ list if the connection
+ // is shutdown.
+ if (!self->shutdown_) {
+ auto it = self->listener_->connections_.find(self);
+ if (it != self->listener_->connections_.end()) {
+ connection = std::move(it->second);
+ self->listener_->connections_.erase(it);
+ }
+ }
+ }
self->Unref();
}
@@ -267,72 +577,45 @@ void Chttp2ServerListener::ConnectionState::OnHandshakeDone(void* arg,
// Chttp2ServerListener
//
-grpc_error* Chttp2ServerListener::Create(Server* server, const char* addr,
+grpc_error* Chttp2ServerListener::Create(Server* server,
+ grpc_resolved_address* addr,
grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier,
int* port_num) {
- std::vector<grpc_error*> error_list;
- grpc_resolved_addresses* resolved = nullptr;
Chttp2ServerListener* listener = nullptr;
// The bulk of this method is inside of a lambda to make cleanup
// easier without using goto.
grpc_error* error = [&]() {
- *port_num = -1;
- /* resolve address */
- grpc_error* error = grpc_blocking_resolve_address(addr, "https", &resolved);
- if (error != GRPC_ERROR_NONE) return error;
// Create Chttp2ServerListener.
- listener = new Chttp2ServerListener(server, args);
+ listener = new Chttp2ServerListener(server, args, args_modifier);
error = grpc_tcp_server_create(&listener->tcp_server_shutdown_complete_,
args, &listener->tcp_server_);
if (error != GRPC_ERROR_NONE) return error;
- for (size_t i = 0; i < resolved->naddrs; i++) {
- int port_temp;
- error = grpc_tcp_server_add_port(listener->tcp_server_,
- &resolved->addrs[i], &port_temp);
- if (error != GRPC_ERROR_NONE) {
- error_list.push_back(error);
- } else {
- if (*port_num == -1) {
- *port_num = port_temp;
- } else {
- GPR_ASSERT(*port_num == port_temp);
- }
- }
- }
- if (error_list.size() == resolved->naddrs) {
- TString msg =
- y_absl::StrFormat("No address added out of total %" PRIuPTR " resolved",
- resolved->naddrs);
- return GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(
- msg.c_str(), error_list.data(), error_list.size());
- } else if (!error_list.empty()) {
- TString msg = y_absl::StrFormat(
- "Only %" PRIuPTR " addresses added out of total %" PRIuPTR
- " resolved",
- resolved->naddrs - error_list.size(), resolved->naddrs);
- error = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(
- msg.c_str(), error_list.data(), error_list.size());
- gpr_log(GPR_INFO, "WARNING: %s", grpc_error_string(error));
- GRPC_ERROR_UNREF(error);
- /* we managed to bind some addresses: continue */
+ if (server->config_fetcher() != nullptr) {
+ listener->resolved_address_ = *addr;
+ // TODO(yashykt): Consider binding so as to be able to return the port
+ // number.
+ } else {
+ error = grpc_tcp_server_add_port(listener->tcp_server_, addr, port_num);
+ if (error != GRPC_ERROR_NONE) return error;
}
// Create channelz node.
if (grpc_channel_args_find_bool(args, GRPC_ARG_ENABLE_CHANNELZ,
GRPC_ENABLE_CHANNELZ_DEFAULT)) {
+ TString string_address = grpc_sockaddr_to_uri(addr);
listener->channelz_listen_socket_ =
MakeRefCounted<channelz::ListenSocketNode>(
- addr, y_absl::StrFormat("chttp2 listener %s", addr));
+ string_address.c_str(),
+ y_absl::StrFormat("chttp2 listener %s", string_address.c_str()));
}
- /* Register with the server only upon success */
+ // Register with the server only upon success
server->AddListener(OrphanablePtr<Server::ListenerInterface>(listener));
return GRPC_ERROR_NONE;
}();
- if (resolved != nullptr) {
- grpc_resolved_addresses_destroy(resolved);
- }
if (error != GRPC_ERROR_NONE) {
if (listener != nullptr) {
if (listener->tcp_server_ != nullptr) {
+ // listener is deleted when tcp_server_ is shutdown.
grpc_tcp_server_unref(listener->tcp_server_);
} else {
delete listener;
@@ -340,18 +623,15 @@ grpc_error* Chttp2ServerListener::Create(Server* server, const char* addr,
} else {
grpc_channel_args_destroy(args);
}
- *port_num = 0;
- }
- for (grpc_error* error : error_list) {
- GRPC_ERROR_UNREF(error);
}
return error;
}
-grpc_error* Chttp2ServerListener::CreateWithAcceptor(Server* server,
- const char* name,
- grpc_channel_args* args) {
- Chttp2ServerListener* listener = new Chttp2ServerListener(server, args);
+grpc_error* Chttp2ServerListener::CreateWithAcceptor(
+ Server* server, const char* name, grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier) {
+ Chttp2ServerListener* listener =
+ new Chttp2ServerListener(server, args, args_modifier);
grpc_error* error = grpc_tcp_server_create(
&listener->tcp_server_shutdown_complete_, args, &listener->tcp_server_);
if (error != GRPC_ERROR_NONE) {
@@ -366,97 +646,170 @@ grpc_error* Chttp2ServerListener::CreateWithAcceptor(Server* server,
return GRPC_ERROR_NONE;
}
-Chttp2ServerListener::Chttp2ServerListener(Server* server,
- grpc_channel_args* args)
- : server_(server), args_(args) {
+Chttp2ServerListener::Chttp2ServerListener(
+ Server* server, grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier)
+ : server_(server), args_modifier_(args_modifier), args_(args) {
GRPC_CLOSURE_INIT(&tcp_server_shutdown_complete_, TcpServerShutdownComplete,
this, grpc_schedule_on_exec_ctx);
}
Chttp2ServerListener::~Chttp2ServerListener() {
+ // Flush queued work before destroying handshaker factory, since that
+ // may do a synchronous unref.
+ ExecCtx::Get()->Flush();
+ if (on_destroy_done_ != nullptr) {
+ ExecCtx::Run(DEBUG_LOCATION, on_destroy_done_, GRPC_ERROR_NONE);
+ ExecCtx::Get()->Flush();
+ }
grpc_channel_args_destroy(args_);
}
/* Server callback: start listening on our ports */
-void Chttp2ServerListener::Start(Server* /*server*/,
- const std::vector<grpc_pollset*>* pollsets) {
- {
- MutexLock lock(&mu_);
- shutdown_ = false;
+void Chttp2ServerListener::Start(
+ Server* /*server*/, const std::vector<grpc_pollset*>* /* pollsets */) {
+ if (server_->config_fetcher() != nullptr) {
+ grpc_channel_args* args = nullptr;
+ auto watcher = y_absl::make_unique<ConfigFetcherWatcher>(Ref());
+ config_fetcher_watcher_ = watcher.get();
+ {
+ MutexLock lock(&channel_args_mu_);
+ args = grpc_channel_args_copy(args_);
+ }
+ server_->config_fetcher()->StartWatch(
+ grpc_sockaddr_to_string(&resolved_address_, false), args,
+ std::move(watcher));
+ } else {
+ {
+ MutexLock lock(&mu_);
+ started_ = true;
+ is_serving_ = true;
+ }
+ StartListening();
}
- grpc_tcp_server_start(tcp_server_, pollsets, OnAccept, this);
}
-void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) {
- MutexLock lock(&mu_);
- on_destroy_done_ = on_destroy_done;
+void Chttp2ServerListener::StartListening() {
+ grpc_tcp_server_start(tcp_server_, &server_->pollsets(), OnAccept, this);
}
-RefCountedPtr<HandshakeManager> Chttp2ServerListener::CreateHandshakeManager() {
+void Chttp2ServerListener::SetOnDestroyDone(grpc_closure* on_destroy_done) {
MutexLock lock(&mu_);
- if (shutdown_) return nullptr;
- grpc_resource_user* resource_user = server_->default_resource_user();
- if (resource_user != nullptr &&
- !grpc_resource_user_safe_alloc(resource_user,
- GRPC_RESOURCE_QUOTA_CHANNEL_SIZE)) {
- gpr_log(GPR_ERROR,
- "Memory quota exhausted, rejecting connection, no handshaking.");
- return nullptr;
- }
- auto handshake_mgr = MakeRefCounted<HandshakeManager>();
- handshake_mgr->AddToPendingMgrList(&pending_handshake_mgrs_);
- grpc_tcp_server_ref(tcp_server_); // Ref held by ConnectionState.
- return handshake_mgr;
+ on_destroy_done_ = on_destroy_done;
}
void Chttp2ServerListener::OnAccept(void* arg, grpc_endpoint* tcp,
grpc_pollset* accepting_pollset,
grpc_tcp_server_acceptor* acceptor) {
Chttp2ServerListener* self = static_cast<Chttp2ServerListener*>(arg);
- RefCountedPtr<HandshakeManager> handshake_mgr =
- self->CreateHandshakeManager();
- if (handshake_mgr == nullptr) {
- grpc_endpoint_shutdown(tcp, GRPC_ERROR_NONE);
+ grpc_channel_args* args = nullptr;
+ RefCountedPtr<grpc_server_config_fetcher::ConnectionManager>
+ connection_manager;
+ {
+ MutexLock lock(&self->channel_args_mu_);
+ args = grpc_channel_args_copy(self->args_);
+ connection_manager = self->connection_manager_;
+ }
+ auto endpoint_cleanup = [&](grpc_error* error) {
+ grpc_endpoint_shutdown(tcp, error);
grpc_endpoint_destroy(tcp);
gpr_free(acceptor);
- return;
+ };
+ if (self->server_->config_fetcher() != nullptr) {
+ if (connection_manager == nullptr) {
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No ConnectionManager configured. Closing connection.");
+ endpoint_cleanup(error);
+ grpc_channel_args_destroy(args);
+ return;
+ }
+ // TODO(yashykt): Maybe combine the following two arg modifiers into a
+ // single one.
+ y_absl::StatusOr<grpc_channel_args*> args_result =
+ connection_manager->UpdateChannelArgsForConnection(args, tcp);
+ if (!args_result.ok()) {
+ gpr_log(GPR_DEBUG, "Closing connection: %s",
+ args_result.status().ToString().c_str());
+ endpoint_cleanup(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ args_result.status().ToString().c_str()));
+ return;
+ }
+ grpc_error* error = GRPC_ERROR_NONE;
+ args = self->args_modifier_(*args_result, &error);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_DEBUG, "Closing connection: %s", grpc_error_string(error));
+ endpoint_cleanup(error);
+ grpc_channel_args_destroy(args);
+ return;
+ }
}
- // Deletes itself when done.
- new ConnectionState(self, accepting_pollset, acceptor,
- std::move(handshake_mgr), self->args_, tcp);
-}
-
-void Chttp2ServerListener::TcpServerShutdownComplete(void* arg,
- grpc_error* error) {
- Chttp2ServerListener* self = static_cast<Chttp2ServerListener*>(arg);
- /* ensure all threads have unlocked */
- grpc_closure* destroy_done = nullptr;
+ auto connection =
+ MakeOrphanable<ActiveConnection>(accepting_pollset, acceptor, args);
+ // Hold a ref to connection to allow starting handshake outside the
+ // critical region
+ RefCountedPtr<ActiveConnection> connection_ref = connection->Ref();
+ RefCountedPtr<Chttp2ServerListener> listener_ref;
{
MutexLock lock(&self->mu_);
- destroy_done = self->on_destroy_done_;
- GPR_ASSERT(self->shutdown_);
- if (self->pending_handshake_mgrs_ != nullptr) {
- self->pending_handshake_mgrs_->ShutdownAllPending(GRPC_ERROR_REF(error));
+ // Shutdown the the connection if listener's stopped serving.
+ if (!self->shutdown_ && self->is_serving_) {
+ grpc_resource_user* resource_user =
+ self->server_->default_resource_user();
+ if (resource_user != nullptr &&
+ !grpc_resource_user_safe_alloc(resource_user,
+ GRPC_RESOURCE_QUOTA_CHANNEL_SIZE)) {
+ gpr_log(
+ GPR_ERROR,
+ "Memory quota exhausted, rejecting connection, no handshaking.");
+ } else {
+ // This ref needs to be taken in the critical region after having made
+ // sure that the listener has not been Orphaned, so as to avoid
+ // heap-use-after-free issues where `Ref()` is invoked when the ref of
+ // tcp_server_ has already reached 0. (Ref() implementation of
+ // Chttp2ServerListener is grpc_tcp_server_ref().)
+ listener_ref = self->Ref();
+ self->connections_.emplace(connection.get(), std::move(connection));
+ }
}
- self->channelz_listen_socket_.reset();
}
- // Flush queued work before destroying handshaker factory, since that
- // may do a synchronous unref.
- ExecCtx::Get()->Flush();
- if (destroy_done != nullptr) {
- ExecCtx::Run(DEBUG_LOCATION, destroy_done, GRPC_ERROR_REF(error));
- ExecCtx::Get()->Flush();
+ if (connection != nullptr) {
+ endpoint_cleanup(GRPC_ERROR_NONE);
+ } else {
+ connection_ref->Start(std::move(listener_ref), tcp, args);
}
+ grpc_channel_args_destroy(args);
+}
+
+void Chttp2ServerListener::TcpServerShutdownComplete(void* arg,
+ grpc_error* error) {
+ Chttp2ServerListener* self = static_cast<Chttp2ServerListener*>(arg);
+ self->channelz_listen_socket_.reset();
+ GRPC_ERROR_UNREF(error);
delete self;
}
/* Server callback: destroy the tcp listener (so we don't generate further
callbacks) */
void Chttp2ServerListener::Orphan() {
+ // Cancel the watch before shutting down so as to avoid holding a ref to the
+ // listener in the watcher.
+ if (config_fetcher_watcher_ != nullptr) {
+ server_->config_fetcher()->CancelWatch(config_fetcher_watcher_);
+ }
+ std::map<ActiveConnection*, OrphanablePtr<ActiveConnection>> connections;
grpc_tcp_server* tcp_server;
{
MutexLock lock(&mu_);
shutdown_ = true;
+ is_serving_ = false;
+ // Orphan the connections so that they can start cleaning up.
+ connections = std::move(connections_);
+ // If the listener is currently set to be serving but has not been started
+ // yet, it means that `grpc_tcp_server_start` is in progress. Wait for the
+ // operation to finish to avoid causing races.
+ while (is_serving_ && !started_) {
+ started_cv_.Wait(&mu_);
+ }
tcp_server = tcp_server_;
}
grpc_tcp_server_shutdown_listeners(tcp_server);
@@ -470,12 +823,77 @@ void Chttp2ServerListener::Orphan() {
//
grpc_error* Chttp2ServerAddPort(Server* server, const char* addr,
- grpc_channel_args* args, int* port_num) {
+ grpc_channel_args* args,
+ Chttp2ServerArgsModifier args_modifier,
+ int* port_num) {
if (strncmp(addr, "external:", 9) == 0) {
- return grpc_core::Chttp2ServerListener::CreateWithAcceptor(server, addr,
- args);
+ return grpc_core::Chttp2ServerListener::CreateWithAcceptor(
+ server, addr, args, args_modifier);
+ }
+ *port_num = -1;
+ grpc_resolved_addresses* resolved = nullptr;
+ std::vector<grpc_error*> error_list;
+ // Using lambda to avoid use of goto.
+ grpc_error* error = [&]() {
+ if (y_absl::StartsWith(addr, kUnixUriPrefix)) {
+ error = grpc_resolve_unix_domain_address(
+ addr + sizeof(kUnixUriPrefix) - 1, &resolved);
+ } else if (y_absl::StartsWith(addr, kUnixAbstractUriPrefix)) {
+ error = grpc_resolve_unix_abstract_domain_address(
+ addr + sizeof(kUnixAbstractUriPrefix) - 1, &resolved);
+ } else {
+ error = grpc_blocking_resolve_address(addr, "https", &resolved);
+ }
+ if (error != GRPC_ERROR_NONE) return error;
+ // Create a listener for each resolved address.
+ for (size_t i = 0; i < resolved->naddrs; i++) {
+ // If address has a wildcard port (0), use the same port as a previous
+ // listener.
+ if (*port_num != -1 && grpc_sockaddr_get_port(&resolved->addrs[i]) == 0) {
+ grpc_sockaddr_set_port(&resolved->addrs[i], *port_num);
+ }
+ int port_temp = -1;
+ error = grpc_core::Chttp2ServerListener::Create(
+ server, &resolved->addrs[i], grpc_channel_args_copy(args),
+ args_modifier, &port_temp);
+ if (error != GRPC_ERROR_NONE) {
+ error_list.push_back(error);
+ } else {
+ if (*port_num == -1) {
+ *port_num = port_temp;
+ } else {
+ GPR_ASSERT(*port_num == port_temp);
+ }
+ }
+ }
+ if (error_list.size() == resolved->naddrs) {
+ TString msg =
+ y_absl::StrFormat("No address added out of total %" PRIuPTR " resolved",
+ resolved->naddrs);
+ return GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(
+ msg.c_str(), error_list.data(), error_list.size());
+ } else if (!error_list.empty()) {
+ TString msg = y_absl::StrFormat(
+ "Only %" PRIuPTR " addresses added out of total %" PRIuPTR
+ " resolved",
+ resolved->naddrs - error_list.size(), resolved->naddrs);
+ error = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(
+ msg.c_str(), error_list.data(), error_list.size());
+ gpr_log(GPR_INFO, "WARNING: %s", grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ // we managed to bind some addresses: continue without error
+ }
+ return GRPC_ERROR_NONE;
+ }(); // lambda end
+ for (grpc_error* error : error_list) {
+ GRPC_ERROR_UNREF(error);
}
- return grpc_core::Chttp2ServerListener::Create(server, addr, args, port_num);
+ grpc_channel_args_destroy(args);
+ if (resolved != nullptr) {
+ grpc_resolved_addresses_destroy(resolved);
+ }
+ if (error != GRPC_ERROR_NONE) *port_num = 0;
+ return error;
}
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.h b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.h
index 095cc5e4c04..10322e9af34 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.h
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/chttp2_server.h
@@ -28,10 +28,19 @@
namespace grpc_core {
+// A function to modify channel args for a listening addr:port. Note that this
+// is used to create a security connector for listeners when the servers are
+// configured with a config fetcher. Not invoked if there is no config fetcher
+// added to the server. Takes ownership of the args. Caller takes ownership of
+// returned args. On failure, the error parameter will be set.
+using Chttp2ServerArgsModifier =
+ std::function<grpc_channel_args*(grpc_channel_args*, grpc_error**)>;
+
/// Adds a port to \a server. Sets \a port_num to the port number.
/// Takes ownership of \a args.
-grpc_error* Chttp2ServerAddPort(Server* server, const char* addr,
- grpc_channel_args* args, int* port_num);
+grpc_error* Chttp2ServerAddPort(
+ Server* server, const char* addr, grpc_channel_args* args,
+ Chttp2ServerArgsModifier connection_args_modifier, int* port_num);
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
index eebae9efaa9..3a3d6f371e5 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc
@@ -27,6 +27,15 @@
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/server.h"
+namespace {
+
+grpc_channel_args* ModifyArgsForConnection(grpc_channel_args* args,
+ grpc_error** /*error*/) {
+ return args;
+}
+
+} // namespace
+
int grpc_server_add_insecure_http2_port(grpc_server* server, const char* addr) {
grpc_core::ExecCtx exec_ctx;
int port_num = 0;
@@ -34,7 +43,8 @@ int grpc_server_add_insecure_http2_port(grpc_server* server, const char* addr) {
(server, addr));
grpc_error* err = grpc_core::Chttp2ServerAddPort(
server->core_server.get(), addr,
- grpc_channel_args_copy(server->core_server->channel_args()), &port_num);
+ grpc_channel_args_copy(server->core_server->channel_args()),
+ ModifyArgsForConnection, &port_num);
if (err != GRPC_ERROR_NONE) {
const char* msg = grpc_error_string(err);
gpr_log(GPR_ERROR, "%s", msg);
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
index 33086bd6020..43edf6f2aeb 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc
@@ -51,12 +51,19 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server* server,
grpc_transport* transport = grpc_create_chttp2_transport(
server_args, server_endpoint, false /* is_client */);
- for (grpc_pollset* pollset : core_server->pollsets()) {
- grpc_endpoint_add_to_pollset(server_endpoint, pollset);
+ grpc_error* error =
+ core_server->SetupTransport(transport, nullptr, server_args, nullptr);
+ if (error == GRPC_ERROR_NONE) {
+ for (grpc_pollset* pollset : core_server->pollsets()) {
+ grpc_endpoint_add_to_pollset(server_endpoint, pollset);
+ }
+ grpc_chttp2_transport_start_reading(transport, nullptr, nullptr, nullptr);
+ } else {
+ gpr_log(GPR_ERROR, "Failed to create channel: %s",
+ grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ grpc_transport_destroy(transport);
}
-
- core_server->SetupTransport(transport, nullptr, server_args, nullptr);
- grpc_chttp2_transport_start_reading(transport, nullptr, nullptr);
}
#else // !GPR_SUPPORT_CHANNELS_FROM_FD
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
index c49e1511a57..a78332b54e5 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc
@@ -18,12 +18,11 @@
#include <grpc/support/port_platform.h>
-#include <grpc/grpc.h>
-
#include <string.h>
#include "y_absl/strings/str_cat.h"
+#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -38,6 +37,35 @@
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/server.h"
+namespace {
+
+grpc_channel_args* ModifyArgsForConnection(grpc_channel_args* args,
+ grpc_error** error) {
+ grpc_server_credentials* server_credentials =
+ grpc_find_server_credentials_in_args(args);
+ if (server_credentials == nullptr) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Could not find server credentials");
+ return args;
+ }
+ auto security_connector = server_credentials->create_security_connector(args);
+ if (security_connector == nullptr) {
+ *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Unable to create secure server with credentials of type ",
+ server_credentials->type())
+ .c_str());
+ return args;
+ }
+ grpc_arg arg_to_add =
+ grpc_security_connector_to_arg(security_connector.get());
+ grpc_channel_args* new_args =
+ grpc_channel_args_copy_and_add(args, &arg_to_add, 1);
+ grpc_channel_args_destroy(args);
+ return new_args;
+}
+
+} // namespace
+
int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr,
grpc_server_credentials* creds) {
grpc_core::ExecCtx exec_ctx;
@@ -55,27 +83,43 @@ int grpc_server_add_secure_http2_port(grpc_server* server, const char* addr,
"No credentials specified for secure server port (creds==NULL)");
goto done;
}
- sc = creds->create_security_connector();
- if (sc == nullptr) {
- err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("Unable to create secure server with credentials of type ",
- creds->type())
- .c_str());
- goto done;
+ // TODO(yashykt): Ideally, we would not want to have different behavior here
+ // based on whether a config fetcher is configured or not. Currently, we have
+ // a feature for SSL credentials reloading with an application callback that
+ // assumes that there is a single security connector. If we delay the creation
+ // of the security connector to after the creation of the listener(s), we
+ // would have potentially multiple security connectors which breaks the
+ // assumption for SSL creds reloading. When the API for SSL creds reloading is
+ // rewritten, we would be able to make this workaround go away by removing
+ // that assumption. As an immediate drawback of this workaround, config
+ // fetchers need to be registered before adding ports to the server.
+ if (server->core_server->config_fetcher() != nullptr) {
+ // Create channel args.
+ grpc_arg arg_to_add = grpc_server_credentials_to_arg(creds);
+ args = grpc_channel_args_copy_and_add(server->core_server->channel_args(),
+ &arg_to_add, 1);
+ } else {
+ sc = creds->create_security_connector(nullptr);
+ if (sc == nullptr) {
+ err = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(
+ "Unable to create secure server with credentials of type ",
+ creds->type())
+ .c_str());
+ goto done;
+ }
+ grpc_arg args_to_add[2];
+ args_to_add[0] = grpc_server_credentials_to_arg(creds);
+ args_to_add[1] = grpc_security_connector_to_arg(sc.get());
+ args = grpc_channel_args_copy_and_add(server->core_server->channel_args(),
+ args_to_add,
+ GPR_ARRAY_SIZE(args_to_add));
}
- // Create channel args.
- grpc_arg args_to_add[2];
- args_to_add[0] = grpc_server_credentials_to_arg(creds);
- args_to_add[1] = grpc_security_connector_to_arg(sc.get());
- args =
- grpc_channel_args_copy_and_add(server->core_server->channel_args(),
- args_to_add, GPR_ARRAY_SIZE(args_to_add));
// Add server port.
err = grpc_core::Chttp2ServerAddPort(server->core_server.get(), addr, args,
- &port_num);
+ ModifyArgsForConnection, &port_num);
done:
sc.reset(DEBUG_LOCATION, "server");
-
if (err != GRPC_ERROR_NONE) {
const char* msg = grpc_error_string(err);
gpr_log(GPR_ERROR, "%s", msg);
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/bin_decoder.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/bin_decoder.cc
index 249035d7e89..2906a5d2a05 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/bin_decoder.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/bin_decoder.cc
@@ -66,16 +66,16 @@ static bool input_is_valid(const uint8_t* input_ptr, size_t length) {
return true;
}
-#define COMPOSE_OUTPUT_BYTE_0(input_ptr) \
- (uint8_t)((decode_table[input_ptr[0]] << 2) | \
- (decode_table[input_ptr[1]] >> 4))
+#define COMPOSE_OUTPUT_BYTE_0(input_ptr) \
+ (uint8_t)((decode_table[(input_ptr)[0]] << 2) | \
+ (decode_table[(input_ptr)[1]] >> 4))
-#define COMPOSE_OUTPUT_BYTE_1(input_ptr) \
- (uint8_t)((decode_table[input_ptr[1]] << 4) | \
- (decode_table[input_ptr[2]] >> 2))
+#define COMPOSE_OUTPUT_BYTE_1(input_ptr) \
+ (uint8_t)((decode_table[(input_ptr)[1]] << 4) | \
+ (decode_table[(input_ptr)[2]] >> 2))
#define COMPOSE_OUTPUT_BYTE_2(input_ptr) \
- (uint8_t)((decode_table[input_ptr[2]] << 6) | decode_table[input_ptr[3]])
+ (uint8_t)((decode_table[(input_ptr)[2]] << 6) | decode_table[(input_ptr)[3]])
// By RFC 4648, if the length of the encoded string without padding is 4n+r,
// the length of decoded string is: 1) 3n if r = 0, 2) 3n + 1 if r = 2, 3, or
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
index 180ca625435..ebb5e944d31 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.cc
@@ -69,7 +69,6 @@
#define DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS false
#define KEEPALIVE_TIME_BACKOFF_MULTIPLIER 2
-#define DEFAULT_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS 300000 /* 5 minutes */
#define DEFAULT_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS 300000 /* 5 minutes */
#define DEFAULT_MAX_PINGS_BETWEEN_DATA 2
#define DEFAULT_MAX_PING_STRIKES 2
@@ -89,8 +88,6 @@ static bool g_default_client_keepalive_permit_without_calls =
static bool g_default_server_keepalive_permit_without_calls =
DEFAULT_KEEPALIVE_PERMIT_WITHOUT_CALLS;
-static int g_default_min_sent_ping_interval_without_data_ms =
- DEFAULT_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS;
static int g_default_min_recv_ping_interval_without_data_ms =
DEFAULT_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS;
static int g_default_max_pings_without_data = DEFAULT_MAX_PINGS_BETWEEN_DATA;
@@ -129,10 +126,10 @@ static void connectivity_state_set(grpc_chttp2_transport* t,
const y_absl::Status& status,
const char* reason);
-static void benign_reclaimer(void* t, grpc_error* error);
-static void destructive_reclaimer(void* t, grpc_error* error);
-static void benign_reclaimer_locked(void* t, grpc_error* error);
-static void destructive_reclaimer_locked(void* t, grpc_error* error);
+static void benign_reclaimer(void* arg, grpc_error* error);
+static void destructive_reclaimer(void* arg, grpc_error* error);
+static void benign_reclaimer_locked(void* arg, grpc_error* error);
+static void destructive_reclaimer_locked(void* arg, grpc_error* error);
static void post_benign_reclaimer(grpc_chttp2_transport* t);
static void post_destructive_reclaimer(grpc_chttp2_transport* t);
@@ -149,8 +146,7 @@ static void next_bdp_ping_timer_expired_locked(void* tp, grpc_error* error);
static void cancel_pings(grpc_chttp2_transport* t, grpc_error* error);
static void send_ping_locked(grpc_chttp2_transport* t,
- grpc_closure* on_initiate,
- grpc_closure* on_complete);
+ grpc_closure* on_initiate, grpc_closure* on_ack);
static void retry_initiate_ping_locked(void* tp, grpc_error* error);
// keepalive-relevant functions
@@ -169,6 +165,26 @@ static void reset_byte_stream(void* arg, grpc_error* error);
// GRPC_EXPERIMENTAL_DISABLE_FLOW_CONTROL
bool g_flow_control_enabled = true;
+namespace grpc_core {
+
+namespace {
+TestOnlyGlobalHttp2TransportInitCallback test_only_init_callback = nullptr;
+TestOnlyGlobalHttp2TransportDestructCallback test_only_destruct_callback =
+ nullptr;
+} // namespace
+
+void TestOnlySetGlobalHttp2TransportInitCallback(
+ TestOnlyGlobalHttp2TransportInitCallback callback) {
+ test_only_init_callback = callback;
+}
+
+void TestOnlySetGlobalHttp2TransportDestructCallback(
+ TestOnlyGlobalHttp2TransportDestructCallback callback) {
+ test_only_destruct_callback = callback;
+}
+
+} // namespace grpc_core
+
//
// CONSTRUCTION/DESTRUCTION/REFCOUNTING
//
@@ -225,6 +241,9 @@ grpc_chttp2_transport::~grpc_chttp2_transport() {
GRPC_ERROR_UNREF(closed_with_error);
gpr_free(ping_acks);
+ if (grpc_core::test_only_destruct_callback != nullptr) {
+ grpc_core::test_only_destruct_callback();
+ }
}
static const grpc_transport_vtable* get_vtable(void);
@@ -273,15 +292,6 @@ static bool read_channel_args(grpc_chttp2_transport* t,
&channel_args->args[i], {g_default_max_ping_strikes, 0, INT_MAX});
} else if (0 ==
strcmp(channel_args->args[i].key,
- GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS)) {
- t->ping_policy.min_sent_ping_interval_without_data =
- grpc_channel_arg_get_integer(
- &channel_args->args[i],
- grpc_integer_options{
- g_default_min_sent_ping_interval_without_data_ms, 0,
- INT_MAX});
- } else if (0 ==
- strcmp(channel_args->args[i].key,
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)) {
t->ping_policy.min_recv_ping_interval_without_data =
grpc_channel_arg_get_integer(
@@ -379,7 +389,9 @@ static bool read_channel_args(grpc_chttp2_transport* t,
t->channelz_socket =
grpc_core::MakeRefCounted<grpc_core::channelz::SocketNode>(
TString(grpc_endpoint_get_local_address(t->ep)), t->peer_string,
- y_absl::StrFormat("%s %s", get_vtable()->name, t->peer_string));
+ y_absl::StrFormat("%s %s", get_vtable()->name, t->peer_string),
+ grpc_core::channelz::SocketNode::Security::GetFromChannelArgs(
+ channel_args));
}
return enable_bdp;
}
@@ -408,8 +420,6 @@ static void init_transport_keepalive_settings(grpc_chttp2_transport* t) {
static void configure_transport_ping_policy(grpc_chttp2_transport* t) {
t->ping_policy.max_pings_without_data = g_default_max_pings_without_data;
- t->ping_policy.min_sent_ping_interval_without_data =
- g_default_min_sent_ping_interval_without_data_ms;
t->ping_policy.max_ping_strikes = g_default_max_ping_strikes;
t->ping_policy.min_recv_ping_interval_without_data =
g_default_min_recv_ping_interval_without_data_ms;
@@ -434,7 +444,9 @@ static void init_keepalive_pings_if_enabled(grpc_chttp2_transport* t) {
grpc_chttp2_transport::grpc_chttp2_transport(
const grpc_channel_args* channel_args, grpc_endpoint* ep, bool is_client,
grpc_resource_user* resource_user)
- : refs(1, &grpc_trace_chttp2_refcount),
+ : refs(1, GRPC_TRACE_FLAG_ENABLED(grpc_trace_chttp2_refcount)
+ ? "chttp2_refcount"
+ : nullptr),
ep(ep),
peer_string(grpc_endpoint_get_peer(ep)),
resource_user(resource_user),
@@ -517,6 +529,9 @@ grpc_chttp2_transport::grpc_chttp2_transport(
grpc_chttp2_initiate_write(this, GRPC_CHTTP2_INITIATE_WRITE_INITIAL_WRITE);
post_benign_reclaimer(this);
+ if (grpc_core::test_only_init_callback != nullptr) {
+ grpc_core::test_only_init_callback();
+ }
}
static void destroy_transport_locked(void* tp, grpc_error* /*error*/) {
@@ -592,6 +607,11 @@ static void close_transport_locked(grpc_chttp2_transport* t,
GRPC_ERROR_REF(error));
t->notify_on_receive_settings = nullptr;
}
+ if (t->notify_on_close != nullptr) {
+ grpc_core::ExecCtx::Run(DEBUG_LOCATION, t->notify_on_close,
+ GRPC_ERROR_REF(error));
+ t->notify_on_close = nullptr;
+ }
GRPC_ERROR_UNREF(error);
}
@@ -629,7 +649,7 @@ grpc_chttp2_stream::grpc_chttp2_stream(grpc_chttp2_transport* t,
metadata_buffer{grpc_chttp2_incoming_metadata_buffer(arena),
grpc_chttp2_incoming_metadata_buffer(arena)} {
if (server_data) {
- id = static_cast<uint32_t>((uintptr_t)server_data);
+ id = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(server_data));
*t->accepting_stream = this;
grpc_chttp2_stream_map_add(&t->stream_map, id, this);
post_destructive_reclaimer(t);
@@ -762,7 +782,7 @@ grpc_chttp2_stream* grpc_chttp2_parsing_accept_stream(grpc_chttp2_transport* t,
GPR_ASSERT(t->accepting_stream == nullptr);
t->accepting_stream = &accepting;
t->accept_stream_cb(t->accept_stream_cb_user_data, &t->base,
- (void*)static_cast<uintptr_t>(id));
+ reinterpret_cast<void*>(id));
t->accepting_stream = nullptr;
return accepting;
}
@@ -1053,7 +1073,7 @@ static void queue_setting_update(grpc_chttp2_transport* t,
}
if (use_value != t->settings[GRPC_LOCAL_SETTINGS][id]) {
t->settings[GRPC_LOCAL_SETTINGS][id] = use_value;
- t->dirtied_local_settings = 1;
+ t->dirtied_local_settings = true;
}
}
@@ -2110,7 +2130,7 @@ static void add_error(grpc_error* error, grpc_error** refs, size_t* nrefs) {
}
static grpc_error* removal_error(grpc_error* extra_error, grpc_chttp2_stream* s,
- const char* master_error_msg) {
+ const char* main_error_msg) {
grpc_error* refs[3];
size_t nrefs = 0;
add_error(s->read_closed_error, refs, &nrefs);
@@ -2118,7 +2138,7 @@ static grpc_error* removal_error(grpc_error* extra_error, grpc_chttp2_stream* s,
add_error(extra_error, refs, &nrefs);
grpc_error* error = GRPC_ERROR_NONE;
if (nrefs > 0) {
- error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(master_error_msg,
+ error = GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(main_error_msg,
refs, nrefs);
}
GRPC_ERROR_UNREF(extra_error);
@@ -2582,9 +2602,7 @@ void schedule_bdp_ping_locked(grpc_chttp2_transport* t) {
grpc_schedule_on_exec_ctx),
GRPC_CLOSURE_INIT(&t->finish_bdp_ping_locked, finish_bdp_ping, t,
grpc_schedule_on_exec_ctx));
- // TODO(yashykt): Enabling this causes internal b/168345569. Re-enable once
- // fixed.
- // grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_BDP_PING);
+ grpc_chttp2_initiate_write(t, GRPC_CHTTP2_INITIATE_WRITE_BDP_PING);
}
static void start_bdp_ping(void* tp, grpc_error* error) {
@@ -2722,14 +2740,6 @@ void grpc_chttp2_config_default_keepalive_args(grpc_channel_args* args,
} else if (0 ==
strcmp(
args->args[i].key,
- GRPC_ARG_HTTP2_MIN_SENT_PING_INTERVAL_WITHOUT_DATA_MS)) {
- g_default_min_sent_ping_interval_without_data_ms =
- grpc_channel_arg_get_integer(
- &args->args[i],
- {g_default_min_sent_ping_interval_without_data_ms, 0, INT_MAX});
- } else if (0 ==
- strcmp(
- args->args[i].key,
GRPC_ARG_HTTP2_MIN_RECV_PING_INTERVAL_WITHOUT_DATA_MS)) {
g_default_min_recv_ping_interval_without_data_ms =
grpc_channel_arg_get_integer(
@@ -3314,7 +3324,7 @@ grpc_transport* grpc_create_chttp2_transport(
void grpc_chttp2_transport_start_reading(
grpc_transport* transport, grpc_slice_buffer* read_buffer,
- grpc_closure* notify_on_receive_settings) {
+ grpc_closure* notify_on_receive_settings, grpc_closure* notify_on_close) {
grpc_chttp2_transport* t =
reinterpret_cast<grpc_chttp2_transport*>(transport);
GRPC_CHTTP2_REF_TRANSPORT(
@@ -3324,6 +3334,7 @@ void grpc_chttp2_transport_start_reading(
gpr_free(read_buffer);
}
t->notify_on_receive_settings = notify_on_receive_settings;
+ t->notify_on_close = notify_on_close;
t->combiner->Run(
GRPC_CLOSURE_INIT(&t->read_action_locked, read_action_locked, t, nullptr),
GRPC_ERROR_NONE);
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.h b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.h
index b04630bbe2b..a72d268d189 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.h
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/chttp2_transport.h
@@ -47,6 +47,17 @@ grpc_chttp2_transport_get_socket_node(grpc_transport* transport);
/// HTTP/2 settings are received from the peer.
void grpc_chttp2_transport_start_reading(
grpc_transport* transport, grpc_slice_buffer* read_buffer,
- grpc_closure* notify_on_receive_settings);
+ grpc_closure* notify_on_receive_settings, grpc_closure* notify_on_close);
+
+namespace grpc_core {
+typedef void (*TestOnlyGlobalHttp2TransportInitCallback)();
+typedef void (*TestOnlyGlobalHttp2TransportDestructCallback)();
+
+void TestOnlySetGlobalHttp2TransportInitCallback(
+ TestOnlyGlobalHttp2TransportInitCallback callback);
+
+void TestOnlySetGlobalHttp2TransportDestructCallback(
+ TestOnlyGlobalHttp2TransportDestructCallback callback);
+} // namespace grpc_core
#endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_CHTTP2_TRANSPORT_H */
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/flow_control.h b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/flow_control.h
index a55ab82efb4..7e053585b18 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/flow_control.h
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/flow_control.h
@@ -201,7 +201,7 @@ class TransportFlowControlBase {
class TransportFlowControlDisabled final : public TransportFlowControlBase {
public:
// Maxes out all values
- TransportFlowControlDisabled(grpc_chttp2_transport* t);
+ explicit TransportFlowControlDisabled(grpc_chttp2_transport* t);
bool flow_control_enabled() const override { return false; }
@@ -221,7 +221,7 @@ class TransportFlowControlDisabled final : public TransportFlowControlBase {
class TransportFlowControl final : public TransportFlowControlBase {
public:
TransportFlowControl(const grpc_chttp2_transport* t, bool enable_bdp_probe);
- ~TransportFlowControl() {}
+ ~TransportFlowControl() override {}
bool flow_control_enabled() const override { return true; }
@@ -409,7 +409,7 @@ class StreamFlowControlDisabled : public StreamFlowControlBase {
class StreamFlowControl final : public StreamFlowControlBase {
public:
StreamFlowControl(TransportFlowControl* tfc, const grpc_chttp2_stream* s);
- ~StreamFlowControl() {
+ ~StreamFlowControl() override {
tfc_->PreUpdateAnnouncedWindowOverIncomingWindow(announced_window_delta_);
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_data.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_data.cc
index 6869bdb006d..b1bc4599ed0 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_data.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_data.cc
@@ -297,7 +297,11 @@ grpc_error* grpc_chttp2_data_parser_parse(void* /*parser*/,
}
if (is_last && s->received_last_frame) {
- grpc_chttp2_mark_stream_closed(t, s, true, false, GRPC_ERROR_NONE);
+ grpc_chttp2_mark_stream_closed(
+ t, s, true, false,
+ t->is_client ? GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Data frame with END_STREAM flag received")
+ : GRPC_ERROR_NONE);
}
return GRPC_ERROR_NONE;
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_goaway.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_goaway.cc
index 79a8a03dc7e..118158ce524 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_goaway.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_goaway.cc
@@ -129,9 +129,10 @@ grpc_error* grpc_chttp2_goaway_parser_parse(void* parser,
++cur;
/* fallthrough */
case GRPC_CHTTP2_GOAWAY_DEBUG:
- if (end != cur)
+ if (end != cur) {
memcpy(p->debug_data + p->debug_pos, cur,
static_cast<size_t>(end - cur));
+ }
GPR_ASSERT((size_t)(end - cur) < UINT32_MAX - p->debug_pos);
p->debug_pos += static_cast<uint32_t>(end - cur);
p->state = GRPC_CHTTP2_GOAWAY_DEBUG;
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_settings.h b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_settings.h
index 181471401cd..147d5ea3a33 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_settings.h
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_settings.h
@@ -43,7 +43,8 @@ struct grpc_chttp2_settings_parser {
uint32_t incoming_settings[GRPC_CHTTP2_NUM_SETTINGS];
};
/* Create a settings frame by diffing old & new, and updating old to be new */
-grpc_slice grpc_chttp2_settings_create(uint32_t* old, const uint32_t* newval,
+grpc_slice grpc_chttp2_settings_create(uint32_t* old_settings,
+ const uint32_t* new_settings,
uint32_t force_mask, size_t count);
/* Create an ack settings frame */
grpc_slice grpc_chttp2_settings_ack_create(void);
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_window_update.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_window_update.cc
index 20efb09b0d3..f4f779b4b97 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_window_update.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/frame_window_update.cc
@@ -28,13 +28,13 @@
#include <grpc/support/log.h>
grpc_slice grpc_chttp2_window_update_create(
- uint32_t id, uint32_t window_update, grpc_transport_one_way_stats* stats) {
+ uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats* stats) {
static const size_t frame_size = 13;
grpc_slice slice = GRPC_SLICE_MALLOC(frame_size);
stats->header_bytes += frame_size;
uint8_t* p = GRPC_SLICE_START_PTR(slice);
- GPR_ASSERT(window_update);
+ GPR_ASSERT(window_delta);
*p++ = 0;
*p++ = 0;
@@ -45,10 +45,10 @@ grpc_slice grpc_chttp2_window_update_create(
*p++ = static_cast<uint8_t>(id >> 16);
*p++ = static_cast<uint8_t>(id >> 8);
*p++ = static_cast<uint8_t>(id);
- *p++ = static_cast<uint8_t>(window_update >> 24);
- *p++ = static_cast<uint8_t>(window_update >> 16);
- *p++ = static_cast<uint8_t>(window_update >> 8);
- *p++ = static_cast<uint8_t>(window_update);
+ *p++ = static_cast<uint8_t>(window_delta >> 24);
+ *p++ = static_cast<uint8_t>(window_delta >> 16);
+ *p++ = static_cast<uint8_t>(window_delta >> 8);
+ *p++ = static_cast<uint8_t>(window_delta);
return slice;
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_encoder.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
index 4ceaec24b3d..cc1eba96582 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_encoder.cc
@@ -104,7 +104,7 @@ struct SliceRefComparator {
struct MetadataComparator {
typedef grpc_mdelem Type;
- static const grpc_mdelem Null() { return {0}; }
+ static grpc_mdelem Null() { return {0}; }
static bool IsNull(const grpc_mdelem md) { return md.payload == 0; }
static bool Equals(const grpc_mdelem md1, const grpc_mdelem md2) {
return md1.payload == md2.payload;
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_parser.cc
index a325439ad59..af79fed4d1b 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_parser.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/hpack_parser.cc
@@ -1301,12 +1301,13 @@ static grpc_error* append_string(grpc_chttp2_hpack_parser* p,
}
bits = inverse_base64[*cur];
++cur;
- if (bits == 255)
+ if (bits == 255) {
return parse_error(
p, cur, end,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Illegal base64 character"));
- else if (bits == 64)
+ } else if (bits == 64) {
goto b64_byte0;
+ }
p->base64_buffer = bits << 18;
/* fallthrough */
b64_byte1:
@@ -1317,12 +1318,13 @@ static grpc_error* append_string(grpc_chttp2_hpack_parser* p,
}
bits = inverse_base64[*cur];
++cur;
- if (bits == 255)
+ if (bits == 255) {
return parse_error(
p, cur, end,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Illegal base64 character"));
- else if (bits == 64)
+ } else if (bits == 64) {
goto b64_byte1;
+ }
p->base64_buffer |= bits << 12;
/* fallthrough */
b64_byte2:
@@ -1333,12 +1335,13 @@ static grpc_error* append_string(grpc_chttp2_hpack_parser* p,
}
bits = inverse_base64[*cur];
++cur;
- if (bits == 255)
+ if (bits == 255) {
return parse_error(
p, cur, end,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Illegal base64 character"));
- else if (bits == 64)
+ } else if (bits == 64) {
goto b64_byte2;
+ }
p->base64_buffer |= bits << 6;
/* fallthrough */
b64_byte3:
@@ -1349,12 +1352,13 @@ static grpc_error* append_string(grpc_chttp2_hpack_parser* p,
}
bits = inverse_base64[*cur];
++cur;
- if (bits == 255)
+ if (bits == 255) {
return parse_error(
p, cur, end,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Illegal base64 character"));
- else if (bits == 64)
+ } else if (bits == 64) {
goto b64_byte3;
+ }
p->base64_buffer |= bits;
bits = p->base64_buffer;
decoded[0] = static_cast<uint8_t>(bits >> 16);
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/internal.h b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/internal.h
index 2f028c08f38..4be244d330c 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/internal.h
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/internal.h
@@ -118,7 +118,6 @@ struct grpc_chttp2_ping_queue {
struct grpc_chttp2_repeated_ping_policy {
int max_pings_without_data;
int max_ping_strikes;
- grpc_millis min_sent_ping_interval_without_data;
grpc_millis min_recv_ping_interval_without_data;
};
struct grpc_chttp2_repeated_ping_state {
@@ -302,6 +301,7 @@ struct grpc_chttp2_transport {
grpc_core::Combiner* combiner;
grpc_closure* notify_on_receive_settings = nullptr;
+ grpc_closure* notify_on_close = nullptr;
/** write execution state of the transport */
grpc_chttp2_write_state write_state = GRPC_CHTTP2_WRITE_STATE_IDLE;
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/parsing.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/parsing.cc
index 741d72041b2..bdd14259d03 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/parsing.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/parsing.cc
@@ -98,6 +98,7 @@ grpc_error* grpc_chttp2_perform_read(grpc_chttp2_transport* t,
.c_str());
}
++cur;
+ // NOLINTNEXTLINE(bugprone-misplaced-widening-cast)
t->deframe_state = static_cast<grpc_chttp2_deframe_transport_state>(
1 + static_cast<int>(t->deframe_state));
}
@@ -747,7 +748,7 @@ static grpc_error* init_settings_frame_parser(grpc_chttp2_transport* t) {
&t->hpack_parser.table,
t->settings[GRPC_ACKED_SETTINGS]
[GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]);
- t->sent_local_settings = 0;
+ t->sent_local_settings = false;
}
t->parser = grpc_chttp2_settings_parser_parse;
t->parser_data = &t->simple.settings;
diff --git a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/writing.cc b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/writing.cc
index f8e21e8e159..317afcc5103 100644
--- a/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/writing.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/chttp2/transport/writing.cc
@@ -81,8 +81,7 @@ static void maybe_initiate_ping(grpc_chttp2_transport* t) {
(t->keepalive_permit_without_calls == 0 &&
grpc_chttp2_stream_map_size(&t->stream_map) == 0)
? 7200 * GPR_MS_PER_SEC
- : (t->ping_policy.min_sent_ping_interval_without_data +
- GPR_MS_PER_SEC); /* A second is added to deal with network delays
+ : (GPR_MS_PER_SEC); /* A second is added to deal with network delays
and timing imprecision */
grpc_millis next_allowed_ping =
t->ping_state.last_ping_sent_time + next_allowed_ping_interval;
@@ -199,7 +198,7 @@ class StreamWriteContext;
class WriteContext {
public:
- WriteContext(grpc_chttp2_transport* t) : t_(t) {
+ explicit WriteContext(grpc_chttp2_transport* t) : t_(t) {
GRPC_STATS_INC_HTTP2_WRITES_BEGUN();
GPR_TIMER_SCOPE("grpc_chttp2_begin_write", 0);
}
diff --git a/contrib/libs/grpc/src/core/ext/transport/inproc/inproc_transport.cc b/contrib/libs/grpc/src/core/ext/transport/inproc/inproc_transport.cc
index 728831f3648..da2671037b4 100644
--- a/contrib/libs/grpc/src/core/ext/transport/inproc/inproc_transport.cc
+++ b/contrib/libs/grpc/src/core/ext/transport/inproc/inproc_transport.cc
@@ -153,10 +153,11 @@ struct inproc_stream {
// side to avoid destruction
INPROC_LOG(GPR_INFO, "calling accept stream cb %p %p",
st->accept_stream_cb, st->accept_stream_data);
- (*st->accept_stream_cb)(st->accept_stream_data, &st->base, (void*)this);
+ (*st->accept_stream_cb)(st->accept_stream_data, &st->base, this);
} else {
// This is the server-side and is being called through accept_stream_cb
- inproc_stream* cs = (inproc_stream*)server_data;
+ inproc_stream* cs = const_cast<inproc_stream*>(
+ static_cast<const inproc_stream*>(server_data));
other_side = cs;
// Ref the server-side stream on behalf of the client now
ref("inproc_init_stream:srv");
@@ -1281,8 +1282,8 @@ grpc_channel* grpc_inproc_channel_create(grpc_server* server,
// Add a default authority channel argument for the client
grpc_arg default_authority_arg;
default_authority_arg.type = GRPC_ARG_STRING;
- default_authority_arg.key = (char*)GRPC_ARG_DEFAULT_AUTHORITY;
- default_authority_arg.value.string = (char*)"inproc.authority";
+ default_authority_arg.key = const_cast<char*>(GRPC_ARG_DEFAULT_AUTHORITY);
+ default_authority_arg.value.string = const_cast<char*>("inproc.authority");
grpc_channel_args* client_args =
grpc_channel_args_copy_and_add(args, &default_authority_arg, 1);
@@ -1292,10 +1293,43 @@ grpc_channel* grpc_inproc_channel_create(grpc_server* server,
client_args);
// TODO(ncteisen): design and support channelz GetSocket for inproc.
- server->core_server->SetupTransport(server_transport, nullptr, server_args,
- nullptr);
- grpc_channel* channel = grpc_channel_create(
- "inproc", client_args, GRPC_CLIENT_DIRECT_CHANNEL, client_transport);
+ grpc_error* error = server->core_server->SetupTransport(
+ server_transport, nullptr, server_args, nullptr);
+ grpc_channel* channel = nullptr;
+ if (error == GRPC_ERROR_NONE) {
+ channel =
+ grpc_channel_create("inproc", client_args, GRPC_CLIENT_DIRECT_CHANNEL,
+ client_transport, nullptr, &error);
+ if (error != GRPC_ERROR_NONE) {
+ GPR_ASSERT(!channel);
+ gpr_log(GPR_ERROR, "Failed to create client channel: %s",
+ grpc_error_string(error));
+ intptr_t integer;
+ grpc_status_code status = GRPC_STATUS_INTERNAL;
+ if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &integer)) {
+ status = static_cast<grpc_status_code>(integer);
+ }
+ GRPC_ERROR_UNREF(error);
+ // client_transport was destroyed when grpc_channel_create saw an error.
+ grpc_transport_destroy(server_transport);
+ channel = grpc_lame_client_channel_create(
+ nullptr, status, "Failed to create client channel");
+ }
+ } else {
+ GPR_ASSERT(!channel);
+ gpr_log(GPR_ERROR, "Failed to create server channel: %s",
+ grpc_error_string(error));
+ intptr_t integer;
+ grpc_status_code status = GRPC_STATUS_INTERNAL;
+ if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &integer)) {
+ status = static_cast<grpc_status_code>(integer);
+ }
+ GRPC_ERROR_UNREF(error);
+ grpc_transport_destroy(client_transport);
+ grpc_transport_destroy(server_transport);
+ channel = grpc_lame_client_channel_create(
+ nullptr, status, "Failed to create server channel");
+ }
// Free up created channel args
grpc_channel_args_destroy(server_args);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c
new file mode 100644
index 00000000000..d230ccb2ff6
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c
@@ -0,0 +1,406 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/admin/v3/config_dump.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/admin/v3/config_dump.upb.h"
+#include "envoy/config/bootstrap/v3/bootstrap.upb.h"
+#include "google/protobuf/any.upb.h"
+#include "google/protobuf/timestamp.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_admin_v3_ConfigDump_submsgs[1] = {
+ &google_protobuf_Any_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ConfigDump__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_ConfigDump_msginit = {
+ &envoy_admin_v3_ConfigDump_submsgs[0],
+ &envoy_admin_v3_ConfigDump__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_UpdateFailureState_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_UpdateFailureState__fields[4] = {
+ {1, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {2, UPB_SIZE(24, 48), 2, 1, 11, 1},
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {4, UPB_SIZE(12, 24), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_admin_v3_UpdateFailureState_msginit = {
+ &envoy_admin_v3_UpdateFailureState_submsgs[0],
+ &envoy_admin_v3_UpdateFailureState__fields[0],
+ UPB_SIZE(32, 64), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_BootstrapConfigDump_submsgs[2] = {
+ &envoy_config_bootstrap_v3_Bootstrap_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_BootstrapConfigDump__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_BootstrapConfigDump_msginit = {
+ &envoy_admin_v3_BootstrapConfigDump_submsgs[0],
+ &envoy_admin_v3_BootstrapConfigDump__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ListenersConfigDump_submsgs[2] = {
+ &envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit,
+ &envoy_admin_v3_ListenersConfigDump_StaticListener_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ListenersConfigDump__fields[3] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), 0, 1, 11, 3},
+ {3, UPB_SIZE(12, 24), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_ListenersConfigDump_msginit = {
+ &envoy_admin_v3_ListenersConfigDump_submsgs[0],
+ &envoy_admin_v3_ListenersConfigDump__fields[0],
+ UPB_SIZE(16, 32), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ListenersConfigDump_StaticListener_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ListenersConfigDump_StaticListener__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ListenersConfigDump_StaticListener_msginit = {
+ &envoy_admin_v3_ListenersConfigDump_StaticListener_submsgs[0],
+ &envoy_admin_v3_ListenersConfigDump_StaticListener__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ListenersConfigDump_DynamicListenerState_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ListenersConfigDump_DynamicListenerState__fields[3] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit = {
+ &envoy_admin_v3_ListenersConfigDump_DynamicListenerState_submsgs[0],
+ &envoy_admin_v3_ListenersConfigDump_DynamicListenerState__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ListenersConfigDump_DynamicListener_submsgs[2] = {
+ &envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit,
+ &envoy_admin_v3_UpdateFailureState_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ListenersConfigDump_DynamicListener__fields[6] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 24), 1, 0, 11, 1},
+ {3, UPB_SIZE(20, 32), 2, 0, 11, 1},
+ {4, UPB_SIZE(24, 40), 3, 0, 11, 1},
+ {5, UPB_SIZE(28, 48), 4, 1, 11, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit = {
+ &envoy_admin_v3_ListenersConfigDump_DynamicListener_submsgs[0],
+ &envoy_admin_v3_ListenersConfigDump_DynamicListener__fields[0],
+ UPB_SIZE(32, 64), 6, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ClustersConfigDump_submsgs[2] = {
+ &envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit,
+ &envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ClustersConfigDump__fields[4] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), 0, 1, 11, 3},
+ {3, UPB_SIZE(12, 24), 0, 0, 11, 3},
+ {4, UPB_SIZE(16, 32), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_ClustersConfigDump_msginit = {
+ &envoy_admin_v3_ClustersConfigDump_submsgs[0],
+ &envoy_admin_v3_ClustersConfigDump__fields[0],
+ UPB_SIZE(24, 48), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ClustersConfigDump_StaticCluster_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ClustersConfigDump_StaticCluster__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit = {
+ &envoy_admin_v3_ClustersConfigDump_StaticCluster_submsgs[0],
+ &envoy_admin_v3_ClustersConfigDump_StaticCluster__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ClustersConfigDump_DynamicCluster_submsgs[3] = {
+ &envoy_admin_v3_UpdateFailureState_msginit,
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ClustersConfigDump_DynamicCluster__fields[5] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(20, 32), 2, 2, 11, 1},
+ {4, UPB_SIZE(24, 40), 3, 0, 11, 1},
+ {5, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit = {
+ &envoy_admin_v3_ClustersConfigDump_DynamicCluster_submsgs[0],
+ &envoy_admin_v3_ClustersConfigDump_DynamicCluster__fields[0],
+ UPB_SIZE(32, 48), 5, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_RoutesConfigDump_submsgs[2] = {
+ &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit,
+ &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_RoutesConfigDump__fields[2] = {
+ {2, UPB_SIZE(0, 0), 0, 1, 11, 3},
+ {3, UPB_SIZE(4, 8), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_RoutesConfigDump_msginit = {
+ &envoy_admin_v3_RoutesConfigDump_submsgs[0],
+ &envoy_admin_v3_RoutesConfigDump__fields[0],
+ UPB_SIZE(8, 16), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_RoutesConfigDump_StaticRouteConfig__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit = {
+ &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_submsgs[0],
+ &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_submsgs[3] = {
+ &envoy_admin_v3_UpdateFailureState_msginit,
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig__fields[5] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(20, 32), 2, 2, 11, 1},
+ {4, UPB_SIZE(24, 40), 3, 0, 11, 1},
+ {5, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit = {
+ &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_submsgs[0],
+ &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig__fields[0],
+ UPB_SIZE(32, 48), 5, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ScopedRoutesConfigDump_submsgs[2] = {
+ &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit,
+ &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ScopedRoutesConfigDump__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 1, 11, 3},
+ {2, UPB_SIZE(4, 8), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_msginit = {
+ &envoy_admin_v3_ScopedRoutesConfigDump_submsgs[0],
+ &envoy_admin_v3_ScopedRoutesConfigDump__fields[0],
+ UPB_SIZE(8, 16), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs__fields[3] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 32), 0, 0, 11, 3},
+ {3, UPB_SIZE(12, 24), 1, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit = {
+ &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_submsgs[0],
+ &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_submsgs[3] = {
+ &envoy_admin_v3_UpdateFailureState_msginit,
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs__fields[6] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(32, 56), 0, 1, 11, 3},
+ {4, UPB_SIZE(24, 40), 1, 2, 11, 1},
+ {5, UPB_SIZE(28, 48), 2, 0, 11, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit = {
+ &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_submsgs[0],
+ &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs__fields[0],
+ UPB_SIZE(40, 64), 6, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_SecretsConfigDump_submsgs[2] = {
+ &envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit,
+ &envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_SecretsConfigDump__fields[3] = {
+ {1, UPB_SIZE(0, 0), 0, 1, 11, 3},
+ {2, UPB_SIZE(4, 8), 0, 0, 11, 3},
+ {3, UPB_SIZE(8, 16), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_SecretsConfigDump_msginit = {
+ &envoy_admin_v3_SecretsConfigDump_submsgs[0],
+ &envoy_admin_v3_SecretsConfigDump__fields[0],
+ UPB_SIZE(16, 24), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_SecretsConfigDump_DynamicSecret_submsgs[3] = {
+ &envoy_admin_v3_UpdateFailureState_msginit,
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_SecretsConfigDump_DynamicSecret__fields[6] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(24, 40), 1, 2, 11, 1},
+ {4, UPB_SIZE(28, 48), 2, 1, 11, 1},
+ {5, UPB_SIZE(32, 56), 3, 0, 11, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit = {
+ &envoy_admin_v3_SecretsConfigDump_DynamicSecret_submsgs[0],
+ &envoy_admin_v3_SecretsConfigDump_DynamicSecret__fields[0],
+ UPB_SIZE(40, 64), 6, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_SecretsConfigDump_StaticSecret_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_SecretsConfigDump_StaticSecret__fields[3] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 0, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit = {
+ &envoy_admin_v3_SecretsConfigDump_StaticSecret_submsgs[0],
+ &envoy_admin_v3_SecretsConfigDump_StaticSecret__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_EndpointsConfigDump_submsgs[2] = {
+ &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit,
+ &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_EndpointsConfigDump__fields[2] = {
+ {2, UPB_SIZE(0, 0), 0, 1, 11, 3},
+ {3, UPB_SIZE(4, 8), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_admin_v3_EndpointsConfigDump_msginit = {
+ &envoy_admin_v3_EndpointsConfigDump_submsgs[0],
+ &envoy_admin_v3_EndpointsConfigDump__fields[0],
+ UPB_SIZE(8, 16), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+};
+
+const upb_msglayout envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit = {
+ &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_submsgs[0],
+ &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_submsgs[3] = {
+ &envoy_admin_v3_UpdateFailureState_msginit,
+ &google_protobuf_Any_msginit,
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const upb_msglayout_field envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig__fields[5] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(20, 32), 2, 2, 11, 1},
+ {4, UPB_SIZE(24, 40), 3, 0, 11, 1},
+ {5, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit = {
+ &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_submsgs[0],
+ &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig__fields[0],
+ UPB_SIZE(32, 48), 5, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h
new file mode 100644
index 00000000000..6f117c6659d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h
@@ -0,0 +1,1459 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/admin/v3/config_dump.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_ADMIN_V3_CONFIG_DUMP_PROTO_UPB_H_
+#define ENVOY_ADMIN_V3_CONFIG_DUMP_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_admin_v3_ConfigDump;
+struct envoy_admin_v3_UpdateFailureState;
+struct envoy_admin_v3_BootstrapConfigDump;
+struct envoy_admin_v3_ListenersConfigDump;
+struct envoy_admin_v3_ListenersConfigDump_StaticListener;
+struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState;
+struct envoy_admin_v3_ListenersConfigDump_DynamicListener;
+struct envoy_admin_v3_ClustersConfigDump;
+struct envoy_admin_v3_ClustersConfigDump_StaticCluster;
+struct envoy_admin_v3_ClustersConfigDump_DynamicCluster;
+struct envoy_admin_v3_RoutesConfigDump;
+struct envoy_admin_v3_RoutesConfigDump_StaticRouteConfig;
+struct envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig;
+struct envoy_admin_v3_ScopedRoutesConfigDump;
+struct envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs;
+struct envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs;
+struct envoy_admin_v3_SecretsConfigDump;
+struct envoy_admin_v3_SecretsConfigDump_DynamicSecret;
+struct envoy_admin_v3_SecretsConfigDump_StaticSecret;
+struct envoy_admin_v3_EndpointsConfigDump;
+struct envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig;
+struct envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig;
+typedef struct envoy_admin_v3_ConfigDump envoy_admin_v3_ConfigDump;
+typedef struct envoy_admin_v3_UpdateFailureState envoy_admin_v3_UpdateFailureState;
+typedef struct envoy_admin_v3_BootstrapConfigDump envoy_admin_v3_BootstrapConfigDump;
+typedef struct envoy_admin_v3_ListenersConfigDump envoy_admin_v3_ListenersConfigDump;
+typedef struct envoy_admin_v3_ListenersConfigDump_StaticListener envoy_admin_v3_ListenersConfigDump_StaticListener;
+typedef struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState envoy_admin_v3_ListenersConfigDump_DynamicListenerState;
+typedef struct envoy_admin_v3_ListenersConfigDump_DynamicListener envoy_admin_v3_ListenersConfigDump_DynamicListener;
+typedef struct envoy_admin_v3_ClustersConfigDump envoy_admin_v3_ClustersConfigDump;
+typedef struct envoy_admin_v3_ClustersConfigDump_StaticCluster envoy_admin_v3_ClustersConfigDump_StaticCluster;
+typedef struct envoy_admin_v3_ClustersConfigDump_DynamicCluster envoy_admin_v3_ClustersConfigDump_DynamicCluster;
+typedef struct envoy_admin_v3_RoutesConfigDump envoy_admin_v3_RoutesConfigDump;
+typedef struct envoy_admin_v3_RoutesConfigDump_StaticRouteConfig envoy_admin_v3_RoutesConfigDump_StaticRouteConfig;
+typedef struct envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig;
+typedef struct envoy_admin_v3_ScopedRoutesConfigDump envoy_admin_v3_ScopedRoutesConfigDump;
+typedef struct envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs;
+typedef struct envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs;
+typedef struct envoy_admin_v3_SecretsConfigDump envoy_admin_v3_SecretsConfigDump;
+typedef struct envoy_admin_v3_SecretsConfigDump_DynamicSecret envoy_admin_v3_SecretsConfigDump_DynamicSecret;
+typedef struct envoy_admin_v3_SecretsConfigDump_StaticSecret envoy_admin_v3_SecretsConfigDump_StaticSecret;
+typedef struct envoy_admin_v3_EndpointsConfigDump envoy_admin_v3_EndpointsConfigDump;
+typedef struct envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig;
+typedef struct envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig;
+extern const upb_msglayout envoy_admin_v3_ConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_UpdateFailureState_msginit;
+extern const upb_msglayout envoy_admin_v3_BootstrapConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_StaticListener_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit;
+extern const upb_msglayout envoy_admin_v3_SecretsConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit;
+extern const upb_msglayout envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit;
+struct envoy_config_bootstrap_v3_Bootstrap;
+struct google_protobuf_Any;
+struct google_protobuf_Timestamp;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_msginit;
+extern const upb_msglayout google_protobuf_Any_msginit;
+extern const upb_msglayout google_protobuf_Timestamp_msginit;
+
+typedef enum {
+ envoy_admin_v3_UNKNOWN = 0,
+ envoy_admin_v3_REQUESTED = 1,
+ envoy_admin_v3_DOES_NOT_EXIST = 2,
+ envoy_admin_v3_ACKED = 3,
+ envoy_admin_v3_NACKED = 4
+} envoy_admin_v3_ClientResourceStatus;
+
+
+/* envoy.admin.v3.ConfigDump */
+
+UPB_INLINE envoy_admin_v3_ConfigDump *envoy_admin_v3_ConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_ConfigDump *)_upb_msg_new(&envoy_admin_v3_ConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ConfigDump *envoy_admin_v3_ConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ConfigDump *ret = envoy_admin_v3_ConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ConfigDump *envoy_admin_v3_ConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ConfigDump *ret = envoy_admin_v3_ConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ConfigDump_serialize(const envoy_admin_v3_ConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_ConfigDump_has_configs(const envoy_admin_v3_ConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const struct google_protobuf_Any* const* envoy_admin_v3_ConfigDump_configs(const envoy_admin_v3_ConfigDump *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+
+UPB_INLINE struct google_protobuf_Any** envoy_admin_v3_ConfigDump_mutable_configs(envoy_admin_v3_ConfigDump *msg, size_t *len) {
+ return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE struct google_protobuf_Any** envoy_admin_v3_ConfigDump_resize_configs(envoy_admin_v3_ConfigDump *msg, size_t len, upb_arena *arena) {
+ return (struct google_protobuf_Any**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ConfigDump_add_configs(envoy_admin_v3_ConfigDump *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.admin.v3.UpdateFailureState */
+
+UPB_INLINE envoy_admin_v3_UpdateFailureState *envoy_admin_v3_UpdateFailureState_new(upb_arena *arena) {
+ return (envoy_admin_v3_UpdateFailureState *)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_UpdateFailureState *envoy_admin_v3_UpdateFailureState_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_UpdateFailureState *ret = envoy_admin_v3_UpdateFailureState_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_UpdateFailureState_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_UpdateFailureState *envoy_admin_v3_UpdateFailureState_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_UpdateFailureState *ret = envoy_admin_v3_UpdateFailureState_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_UpdateFailureState_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_UpdateFailureState_serialize(const envoy_admin_v3_UpdateFailureState *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_UpdateFailureState_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_UpdateFailureState_has_failed_configuration(const envoy_admin_v3_UpdateFailureState *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_UpdateFailureState_failed_configuration(const envoy_admin_v3_UpdateFailureState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_UpdateFailureState_has_last_update_attempt(const envoy_admin_v3_UpdateFailureState *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_UpdateFailureState_last_update_attempt(const envoy_admin_v3_UpdateFailureState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_Timestamp*); }
+UPB_INLINE upb_strview envoy_admin_v3_UpdateFailureState_details(const envoy_admin_v3_UpdateFailureState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_admin_v3_UpdateFailureState_version_info(const envoy_admin_v3_UpdateFailureState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+
+UPB_INLINE void envoy_admin_v3_UpdateFailureState_set_failed_configuration(envoy_admin_v3_UpdateFailureState *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_UpdateFailureState_mutable_failed_configuration(envoy_admin_v3_UpdateFailureState *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_UpdateFailureState_failed_configuration(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_UpdateFailureState_set_failed_configuration(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_UpdateFailureState_set_last_update_attempt(envoy_admin_v3_UpdateFailureState *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_UpdateFailureState_mutable_last_update_attempt(envoy_admin_v3_UpdateFailureState *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_UpdateFailureState_last_update_attempt(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_UpdateFailureState_set_last_update_attempt(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_UpdateFailureState_set_details(envoy_admin_v3_UpdateFailureState *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_UpdateFailureState_set_version_info(envoy_admin_v3_UpdateFailureState *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+
+/* envoy.admin.v3.BootstrapConfigDump */
+
+UPB_INLINE envoy_admin_v3_BootstrapConfigDump *envoy_admin_v3_BootstrapConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_BootstrapConfigDump *)_upb_msg_new(&envoy_admin_v3_BootstrapConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_BootstrapConfigDump *envoy_admin_v3_BootstrapConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_BootstrapConfigDump *ret = envoy_admin_v3_BootstrapConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_BootstrapConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_BootstrapConfigDump *envoy_admin_v3_BootstrapConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_BootstrapConfigDump *ret = envoy_admin_v3_BootstrapConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_BootstrapConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_BootstrapConfigDump_serialize(const envoy_admin_v3_BootstrapConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_BootstrapConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_BootstrapConfigDump_has_bootstrap(const envoy_admin_v3_BootstrapConfigDump *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_bootstrap_v3_Bootstrap* envoy_admin_v3_BootstrapConfigDump_bootstrap(const envoy_admin_v3_BootstrapConfigDump *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_bootstrap_v3_Bootstrap*); }
+UPB_INLINE bool envoy_admin_v3_BootstrapConfigDump_has_last_updated(const envoy_admin_v3_BootstrapConfigDump *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_BootstrapConfigDump_last_updated(const envoy_admin_v3_BootstrapConfigDump *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_BootstrapConfigDump_set_bootstrap(envoy_admin_v3_BootstrapConfigDump *msg, struct envoy_config_bootstrap_v3_Bootstrap* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_bootstrap_v3_Bootstrap*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Bootstrap* envoy_admin_v3_BootstrapConfigDump_mutable_bootstrap(envoy_admin_v3_BootstrapConfigDump *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Bootstrap* sub = (struct envoy_config_bootstrap_v3_Bootstrap*)envoy_admin_v3_BootstrapConfigDump_bootstrap(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Bootstrap*)_upb_msg_new(&envoy_config_bootstrap_v3_Bootstrap_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_BootstrapConfigDump_set_bootstrap(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_BootstrapConfigDump_set_last_updated(envoy_admin_v3_BootstrapConfigDump *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_BootstrapConfigDump_mutable_last_updated(envoy_admin_v3_BootstrapConfigDump *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_BootstrapConfigDump_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_BootstrapConfigDump_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.ListenersConfigDump */
+
+UPB_INLINE envoy_admin_v3_ListenersConfigDump *envoy_admin_v3_ListenersConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_ListenersConfigDump *)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump *envoy_admin_v3_ListenersConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ListenersConfigDump *ret = envoy_admin_v3_ListenersConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump *envoy_admin_v3_ListenersConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ListenersConfigDump *ret = envoy_admin_v3_ListenersConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ListenersConfigDump_serialize(const envoy_admin_v3_ListenersConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ListenersConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ListenersConfigDump_version_info(const envoy_admin_v3_ListenersConfigDump *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_has_static_listeners(const envoy_admin_v3_ListenersConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_admin_v3_ListenersConfigDump_StaticListener* const* envoy_admin_v3_ListenersConfigDump_static_listeners(const envoy_admin_v3_ListenersConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ListenersConfigDump_StaticListener* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_has_dynamic_listeners(const envoy_admin_v3_ListenersConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const envoy_admin_v3_ListenersConfigDump_DynamicListener* const* envoy_admin_v3_ListenersConfigDump_dynamic_listeners(const envoy_admin_v3_ListenersConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ListenersConfigDump_DynamicListener* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_set_version_info(envoy_admin_v3_ListenersConfigDump *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_StaticListener** envoy_admin_v3_ListenersConfigDump_mutable_static_listeners(envoy_admin_v3_ListenersConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ListenersConfigDump_StaticListener**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_StaticListener** envoy_admin_v3_ListenersConfigDump_resize_static_listeners(envoy_admin_v3_ListenersConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ListenersConfigDump_StaticListener**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ListenersConfigDump_StaticListener* envoy_admin_v3_ListenersConfigDump_add_static_listeners(envoy_admin_v3_ListenersConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ListenersConfigDump_StaticListener* sub = (struct envoy_admin_v3_ListenersConfigDump_StaticListener*)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_StaticListener_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 envoy_admin_v3_ListenersConfigDump_DynamicListener** envoy_admin_v3_ListenersConfigDump_mutable_dynamic_listeners(envoy_admin_v3_ListenersConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ListenersConfigDump_DynamicListener**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListener** envoy_admin_v3_ListenersConfigDump_resize_dynamic_listeners(envoy_admin_v3_ListenersConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ListenersConfigDump_DynamicListener**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ListenersConfigDump_DynamicListener* envoy_admin_v3_ListenersConfigDump_add_dynamic_listeners(envoy_admin_v3_ListenersConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ListenersConfigDump_DynamicListener* sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListener*)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_DynamicListener_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;
+}
+
+/* envoy.admin.v3.ListenersConfigDump.StaticListener */
+
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_StaticListener *envoy_admin_v3_ListenersConfigDump_StaticListener_new(upb_arena *arena) {
+ return (envoy_admin_v3_ListenersConfigDump_StaticListener *)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_StaticListener_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_StaticListener *envoy_admin_v3_ListenersConfigDump_StaticListener_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ListenersConfigDump_StaticListener *ret = envoy_admin_v3_ListenersConfigDump_StaticListener_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_StaticListener_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_StaticListener *envoy_admin_v3_ListenersConfigDump_StaticListener_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ListenersConfigDump_StaticListener *ret = envoy_admin_v3_ListenersConfigDump_StaticListener_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_StaticListener_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ListenersConfigDump_StaticListener_serialize(const envoy_admin_v3_ListenersConfigDump_StaticListener *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ListenersConfigDump_StaticListener_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_StaticListener_has_listener(const envoy_admin_v3_ListenersConfigDump_StaticListener *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_ListenersConfigDump_StaticListener_listener(const envoy_admin_v3_ListenersConfigDump_StaticListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_StaticListener_has_last_updated(const envoy_admin_v3_ListenersConfigDump_StaticListener *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_ListenersConfigDump_StaticListener_last_updated(const envoy_admin_v3_ListenersConfigDump_StaticListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_StaticListener_set_listener(envoy_admin_v3_ListenersConfigDump_StaticListener *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ListenersConfigDump_StaticListener_mutable_listener(envoy_admin_v3_ListenersConfigDump_StaticListener *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_ListenersConfigDump_StaticListener_listener(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_StaticListener_set_listener(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_StaticListener_set_last_updated(envoy_admin_v3_ListenersConfigDump_StaticListener *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_ListenersConfigDump_StaticListener_mutable_last_updated(envoy_admin_v3_ListenersConfigDump_StaticListener *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_ListenersConfigDump_StaticListener_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_StaticListener_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.ListenersConfigDump.DynamicListenerState */
+
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListenerState *envoy_admin_v3_ListenersConfigDump_DynamicListenerState_new(upb_arena *arena) {
+ return (envoy_admin_v3_ListenersConfigDump_DynamicListenerState *)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListenerState *envoy_admin_v3_ListenersConfigDump_DynamicListenerState_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState *ret = envoy_admin_v3_ListenersConfigDump_DynamicListenerState_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListenerState *envoy_admin_v3_ListenersConfigDump_DynamicListenerState_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState *ret = envoy_admin_v3_ListenersConfigDump_DynamicListenerState_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ListenersConfigDump_DynamicListenerState_serialize(const envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ListenersConfigDump_DynamicListenerState_version_info(const envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_DynamicListenerState_has_listener(const envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_ListenersConfigDump_DynamicListenerState_listener(const envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_DynamicListenerState_has_last_updated(const envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_ListenersConfigDump_DynamicListenerState_last_updated(const envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_version_info(envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_listener(envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ListenersConfigDump_DynamicListenerState_mutable_listener(envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_ListenersConfigDump_DynamicListenerState_listener(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_listener(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_last_updated(envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_ListenersConfigDump_DynamicListenerState_mutable_last_updated(envoy_admin_v3_ListenersConfigDump_DynamicListenerState *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_ListenersConfigDump_DynamicListenerState_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.ListenersConfigDump.DynamicListener */
+
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListener *envoy_admin_v3_ListenersConfigDump_DynamicListener_new(upb_arena *arena) {
+ return (envoy_admin_v3_ListenersConfigDump_DynamicListener *)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListener *envoy_admin_v3_ListenersConfigDump_DynamicListener_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ListenersConfigDump_DynamicListener *ret = envoy_admin_v3_ListenersConfigDump_DynamicListener_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ListenersConfigDump_DynamicListener *envoy_admin_v3_ListenersConfigDump_DynamicListener_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ListenersConfigDump_DynamicListener *ret = envoy_admin_v3_ListenersConfigDump_DynamicListener_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ListenersConfigDump_DynamicListener_serialize(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ListenersConfigDump_DynamicListener_name(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_DynamicListener_has_active_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_admin_v3_ListenersConfigDump_DynamicListenerState* envoy_admin_v3_ListenersConfigDump_DynamicListener_active_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const envoy_admin_v3_ListenersConfigDump_DynamicListenerState*); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_DynamicListener_has_warming_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_admin_v3_ListenersConfigDump_DynamicListenerState* envoy_admin_v3_ListenersConfigDump_DynamicListener_warming_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const envoy_admin_v3_ListenersConfigDump_DynamicListenerState*); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_DynamicListener_has_draining_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_admin_v3_ListenersConfigDump_DynamicListenerState* envoy_admin_v3_ListenersConfigDump_DynamicListener_draining_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_admin_v3_ListenersConfigDump_DynamicListenerState*); }
+UPB_INLINE bool envoy_admin_v3_ListenersConfigDump_DynamicListener_has_error_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_admin_v3_UpdateFailureState* envoy_admin_v3_ListenersConfigDump_DynamicListener_error_state(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_admin_v3_UpdateFailureState*); }
+UPB_INLINE int32_t envoy_admin_v3_ListenersConfigDump_DynamicListener_client_status(const envoy_admin_v3_ListenersConfigDump_DynamicListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListener_set_name(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListener_set_active_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, envoy_admin_v3_ListenersConfigDump_DynamicListenerState* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), envoy_admin_v3_ListenersConfigDump_DynamicListenerState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState* envoy_admin_v3_ListenersConfigDump_DynamicListener_mutable_active_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState* sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState*)envoy_admin_v3_ListenersConfigDump_DynamicListener_active_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState*)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_active_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListener_set_warming_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, envoy_admin_v3_ListenersConfigDump_DynamicListenerState* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), envoy_admin_v3_ListenersConfigDump_DynamicListenerState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState* envoy_admin_v3_ListenersConfigDump_DynamicListener_mutable_warming_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState* sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState*)envoy_admin_v3_ListenersConfigDump_DynamicListener_warming_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState*)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_warming_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListener_set_draining_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, envoy_admin_v3_ListenersConfigDump_DynamicListenerState* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_admin_v3_ListenersConfigDump_DynamicListenerState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState* envoy_admin_v3_ListenersConfigDump_DynamicListener_mutable_draining_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState* sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState*)envoy_admin_v3_ListenersConfigDump_DynamicListener_draining_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_ListenersConfigDump_DynamicListenerState*)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_draining_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListener_set_error_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, envoy_admin_v3_UpdateFailureState* value) {
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_admin_v3_UpdateFailureState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_UpdateFailureState* envoy_admin_v3_ListenersConfigDump_DynamicListener_mutable_error_state(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, upb_arena *arena) {
+ struct envoy_admin_v3_UpdateFailureState* sub = (struct envoy_admin_v3_UpdateFailureState*)envoy_admin_v3_ListenersConfigDump_DynamicListener_error_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_UpdateFailureState*)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_error_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ListenersConfigDump_DynamicListener_set_client_status(envoy_admin_v3_ListenersConfigDump_DynamicListener *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.admin.v3.ClustersConfigDump */
+
+UPB_INLINE envoy_admin_v3_ClustersConfigDump *envoy_admin_v3_ClustersConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_ClustersConfigDump *)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump *envoy_admin_v3_ClustersConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ClustersConfigDump *ret = envoy_admin_v3_ClustersConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ClustersConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump *envoy_admin_v3_ClustersConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ClustersConfigDump *ret = envoy_admin_v3_ClustersConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ClustersConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ClustersConfigDump_serialize(const envoy_admin_v3_ClustersConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ClustersConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ClustersConfigDump_version_info(const envoy_admin_v3_ClustersConfigDump *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_has_static_clusters(const envoy_admin_v3_ClustersConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_admin_v3_ClustersConfigDump_StaticCluster* const* envoy_admin_v3_ClustersConfigDump_static_clusters(const envoy_admin_v3_ClustersConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ClustersConfigDump_StaticCluster* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_has_dynamic_active_clusters(const envoy_admin_v3_ClustersConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const envoy_admin_v3_ClustersConfigDump_DynamicCluster* const* envoy_admin_v3_ClustersConfigDump_dynamic_active_clusters(const envoy_admin_v3_ClustersConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ClustersConfigDump_DynamicCluster* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_has_dynamic_warming_clusters(const envoy_admin_v3_ClustersConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_admin_v3_ClustersConfigDump_DynamicCluster* const* envoy_admin_v3_ClustersConfigDump_dynamic_warming_clusters(const envoy_admin_v3_ClustersConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ClustersConfigDump_DynamicCluster* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_set_version_info(envoy_admin_v3_ClustersConfigDump *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_StaticCluster** envoy_admin_v3_ClustersConfigDump_mutable_static_clusters(envoy_admin_v3_ClustersConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ClustersConfigDump_StaticCluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_StaticCluster** envoy_admin_v3_ClustersConfigDump_resize_static_clusters(envoy_admin_v3_ClustersConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ClustersConfigDump_StaticCluster**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ClustersConfigDump_StaticCluster* envoy_admin_v3_ClustersConfigDump_add_static_clusters(envoy_admin_v3_ClustersConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ClustersConfigDump_StaticCluster* sub = (struct envoy_admin_v3_ClustersConfigDump_StaticCluster*)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_StaticCluster_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 envoy_admin_v3_ClustersConfigDump_DynamicCluster** envoy_admin_v3_ClustersConfigDump_mutable_dynamic_active_clusters(envoy_admin_v3_ClustersConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ClustersConfigDump_DynamicCluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_DynamicCluster** envoy_admin_v3_ClustersConfigDump_resize_dynamic_active_clusters(envoy_admin_v3_ClustersConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ClustersConfigDump_DynamicCluster**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ClustersConfigDump_DynamicCluster* envoy_admin_v3_ClustersConfigDump_add_dynamic_active_clusters(envoy_admin_v3_ClustersConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ClustersConfigDump_DynamicCluster* sub = (struct envoy_admin_v3_ClustersConfigDump_DynamicCluster*)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_DynamicCluster_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 envoy_admin_v3_ClustersConfigDump_DynamicCluster** envoy_admin_v3_ClustersConfigDump_mutable_dynamic_warming_clusters(envoy_admin_v3_ClustersConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ClustersConfigDump_DynamicCluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_DynamicCluster** envoy_admin_v3_ClustersConfigDump_resize_dynamic_warming_clusters(envoy_admin_v3_ClustersConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ClustersConfigDump_DynamicCluster**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ClustersConfigDump_DynamicCluster* envoy_admin_v3_ClustersConfigDump_add_dynamic_warming_clusters(envoy_admin_v3_ClustersConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ClustersConfigDump_DynamicCluster* sub = (struct envoy_admin_v3_ClustersConfigDump_DynamicCluster*)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.admin.v3.ClustersConfigDump.StaticCluster */
+
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_StaticCluster *envoy_admin_v3_ClustersConfigDump_StaticCluster_new(upb_arena *arena) {
+ return (envoy_admin_v3_ClustersConfigDump_StaticCluster *)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_StaticCluster *envoy_admin_v3_ClustersConfigDump_StaticCluster_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ClustersConfigDump_StaticCluster *ret = envoy_admin_v3_ClustersConfigDump_StaticCluster_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_StaticCluster *envoy_admin_v3_ClustersConfigDump_StaticCluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ClustersConfigDump_StaticCluster *ret = envoy_admin_v3_ClustersConfigDump_StaticCluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ClustersConfigDump_StaticCluster_serialize(const envoy_admin_v3_ClustersConfigDump_StaticCluster *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_StaticCluster_has_cluster(const envoy_admin_v3_ClustersConfigDump_StaticCluster *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_ClustersConfigDump_StaticCluster_cluster(const envoy_admin_v3_ClustersConfigDump_StaticCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_StaticCluster_has_last_updated(const envoy_admin_v3_ClustersConfigDump_StaticCluster *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_ClustersConfigDump_StaticCluster_last_updated(const envoy_admin_v3_ClustersConfigDump_StaticCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_StaticCluster_set_cluster(envoy_admin_v3_ClustersConfigDump_StaticCluster *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ClustersConfigDump_StaticCluster_mutable_cluster(envoy_admin_v3_ClustersConfigDump_StaticCluster *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_ClustersConfigDump_StaticCluster_cluster(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ClustersConfigDump_StaticCluster_set_cluster(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_StaticCluster_set_last_updated(envoy_admin_v3_ClustersConfigDump_StaticCluster *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_ClustersConfigDump_StaticCluster_mutable_last_updated(envoy_admin_v3_ClustersConfigDump_StaticCluster *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_ClustersConfigDump_StaticCluster_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ClustersConfigDump_StaticCluster_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.ClustersConfigDump.DynamicCluster */
+
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_DynamicCluster *envoy_admin_v3_ClustersConfigDump_DynamicCluster_new(upb_arena *arena) {
+ return (envoy_admin_v3_ClustersConfigDump_DynamicCluster *)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_DynamicCluster *envoy_admin_v3_ClustersConfigDump_DynamicCluster_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster *ret = envoy_admin_v3_ClustersConfigDump_DynamicCluster_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ClustersConfigDump_DynamicCluster *envoy_admin_v3_ClustersConfigDump_DynamicCluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster *ret = envoy_admin_v3_ClustersConfigDump_DynamicCluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ClustersConfigDump_DynamicCluster_serialize(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ClustersConfigDump_DynamicCluster_version_info(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_DynamicCluster_has_cluster(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_ClustersConfigDump_DynamicCluster_cluster(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_DynamicCluster_has_last_updated(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_ClustersConfigDump_DynamicCluster_last_updated(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Timestamp*); }
+UPB_INLINE bool envoy_admin_v3_ClustersConfigDump_DynamicCluster_has_error_state(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_admin_v3_UpdateFailureState* envoy_admin_v3_ClustersConfigDump_DynamicCluster_error_state(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_admin_v3_UpdateFailureState*); }
+UPB_INLINE int32_t envoy_admin_v3_ClustersConfigDump_DynamicCluster_client_status(const envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_version_info(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_cluster(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ClustersConfigDump_DynamicCluster_mutable_cluster(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_ClustersConfigDump_DynamicCluster_cluster(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_cluster(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_last_updated(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_ClustersConfigDump_DynamicCluster_mutable_last_updated(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_ClustersConfigDump_DynamicCluster_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_error_state(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, envoy_admin_v3_UpdateFailureState* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_admin_v3_UpdateFailureState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_UpdateFailureState* envoy_admin_v3_ClustersConfigDump_DynamicCluster_mutable_error_state(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, upb_arena *arena) {
+ struct envoy_admin_v3_UpdateFailureState* sub = (struct envoy_admin_v3_UpdateFailureState*)envoy_admin_v3_ClustersConfigDump_DynamicCluster_error_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_UpdateFailureState*)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_error_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_client_status(envoy_admin_v3_ClustersConfigDump_DynamicCluster *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.admin.v3.RoutesConfigDump */
+
+UPB_INLINE envoy_admin_v3_RoutesConfigDump *envoy_admin_v3_RoutesConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_RoutesConfigDump *)_upb_msg_new(&envoy_admin_v3_RoutesConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump *envoy_admin_v3_RoutesConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_RoutesConfigDump *ret = envoy_admin_v3_RoutesConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_RoutesConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump *envoy_admin_v3_RoutesConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_RoutesConfigDump *ret = envoy_admin_v3_RoutesConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_RoutesConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_RoutesConfigDump_serialize(const envoy_admin_v3_RoutesConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_RoutesConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_has_static_route_configs(const envoy_admin_v3_RoutesConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig* const* envoy_admin_v3_RoutesConfigDump_static_route_configs(const envoy_admin_v3_RoutesConfigDump *msg, size_t *len) { return (const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_has_dynamic_route_configs(const envoy_admin_v3_RoutesConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig* const* envoy_admin_v3_RoutesConfigDump_dynamic_route_configs(const envoy_admin_v3_RoutesConfigDump *msg, size_t *len) { return (const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_StaticRouteConfig** envoy_admin_v3_RoutesConfigDump_mutable_static_route_configs(envoy_admin_v3_RoutesConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_RoutesConfigDump_StaticRouteConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_StaticRouteConfig** envoy_admin_v3_RoutesConfigDump_resize_static_route_configs(envoy_admin_v3_RoutesConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_RoutesConfigDump_StaticRouteConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_RoutesConfigDump_StaticRouteConfig* envoy_admin_v3_RoutesConfigDump_add_static_route_configs(envoy_admin_v3_RoutesConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_RoutesConfigDump_StaticRouteConfig* sub = (struct envoy_admin_v3_RoutesConfigDump_StaticRouteConfig*)_upb_msg_new(&envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig** envoy_admin_v3_RoutesConfigDump_mutable_dynamic_route_configs(envoy_admin_v3_RoutesConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig** envoy_admin_v3_RoutesConfigDump_resize_dynamic_route_configs(envoy_admin_v3_RoutesConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig* envoy_admin_v3_RoutesConfigDump_add_dynamic_route_configs(envoy_admin_v3_RoutesConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig* sub = (struct envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig*)_upb_msg_new(&envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.admin.v3.RoutesConfigDump.StaticRouteConfig */
+
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_new(upb_arena *arena) {
+ return (envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *)_upb_msg_new(&envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *ret = envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *ret = envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_serialize(const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_has_route_config(const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_route_config(const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_has_last_updated(const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_last_updated(const envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_set_route_config(envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_mutable_route_config(envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_route_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_set_route_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_set_last_updated(envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_mutable_last_updated(envoy_admin_v3_RoutesConfigDump_StaticRouteConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig */
+
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_new(upb_arena *arena) {
+ return (envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *)_upb_msg_new(&envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *ret = envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *ret = envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_serialize(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_version_info(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_has_route_config(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_route_config(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_has_last_updated(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_last_updated(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Timestamp*); }
+UPB_INLINE bool envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_has_error_state(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_admin_v3_UpdateFailureState* envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_error_state(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_admin_v3_UpdateFailureState*); }
+UPB_INLINE int32_t envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_client_status(const envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_version_info(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_route_config(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_mutable_route_config(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_route_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_route_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_last_updated(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_mutable_last_updated(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_error_state(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, envoy_admin_v3_UpdateFailureState* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_admin_v3_UpdateFailureState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_UpdateFailureState* envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_mutable_error_state(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_UpdateFailureState* sub = (struct envoy_admin_v3_UpdateFailureState*)envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_error_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_UpdateFailureState*)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_error_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_client_status(envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.admin.v3.ScopedRoutesConfigDump */
+
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump *envoy_admin_v3_ScopedRoutesConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump *)_upb_msg_new(&envoy_admin_v3_ScopedRoutesConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump *envoy_admin_v3_ScopedRoutesConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ScopedRoutesConfigDump *ret = envoy_admin_v3_ScopedRoutesConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ScopedRoutesConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump *envoy_admin_v3_ScopedRoutesConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ScopedRoutesConfigDump *ret = envoy_admin_v3_ScopedRoutesConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ScopedRoutesConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ScopedRoutesConfigDump_serialize(const envoy_admin_v3_ScopedRoutesConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ScopedRoutesConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_has_inline_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs* const* envoy_admin_v3_ScopedRoutesConfigDump_inline_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_has_dynamic_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs* const* envoy_admin_v3_ScopedRoutesConfigDump_dynamic_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump *msg, size_t *len) { return (const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs** envoy_admin_v3_ScopedRoutesConfigDump_mutable_inline_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs** envoy_admin_v3_ScopedRoutesConfigDump_resize_inline_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs* envoy_admin_v3_ScopedRoutesConfigDump_add_inline_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs* sub = (struct envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs*)_upb_msg_new(&envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs** envoy_admin_v3_ScopedRoutesConfigDump_mutable_dynamic_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs** envoy_admin_v3_ScopedRoutesConfigDump_resize_dynamic_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs* envoy_admin_v3_ScopedRoutesConfigDump_add_dynamic_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs* sub = (struct envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs*)_upb_msg_new(&envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs */
+
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_new(upb_arena *arena) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *)_upb_msg_new(&envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *ret = envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *ret = envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_serialize(const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_name(const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_has_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const struct google_protobuf_Any* const* envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_has_last_updated(const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_last_updated(const envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_set_name(envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE struct google_protobuf_Any** envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_mutable_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, size_t *len) {
+ return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+}
+UPB_INLINE struct google_protobuf_Any** envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_resize_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, size_t len, upb_arena *arena) {
+ return (struct google_protobuf_Any**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_add_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_set_last_updated(envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_mutable_last_updated(envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs */
+
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_new(upb_arena *arena) {
+ return (envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *)_upb_msg_new(&envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *ret = envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *ret = envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_serialize(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_name(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_version_info(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_has_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE const struct google_protobuf_Any* const* envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_scoped_route_configs(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); }
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_has_last_updated(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_last_updated(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Timestamp*); }
+UPB_INLINE bool envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_has_error_state(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_admin_v3_UpdateFailureState* envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_error_state(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_admin_v3_UpdateFailureState*); }
+UPB_INLINE int32_t envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_client_status(const envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_name(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_version_info(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
+}
+UPB_INLINE struct google_protobuf_Any** envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_mutable_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, size_t *len) {
+ return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
+}
+UPB_INLINE struct google_protobuf_Any** envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_resize_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, size_t len, upb_arena *arena) {
+ return (struct google_protobuf_Any**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 56), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_add_scoped_route_configs(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 56), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_last_updated(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_mutable_last_updated(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_error_state(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, envoy_admin_v3_UpdateFailureState* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_admin_v3_UpdateFailureState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_UpdateFailureState* envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_mutable_error_state(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, upb_arena *arena) {
+ struct envoy_admin_v3_UpdateFailureState* sub = (struct envoy_admin_v3_UpdateFailureState*)envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_error_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_UpdateFailureState*)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_error_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_set_client_status(envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.admin.v3.SecretsConfigDump */
+
+UPB_INLINE envoy_admin_v3_SecretsConfigDump *envoy_admin_v3_SecretsConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_SecretsConfigDump *)_upb_msg_new(&envoy_admin_v3_SecretsConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump *envoy_admin_v3_SecretsConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_SecretsConfigDump *ret = envoy_admin_v3_SecretsConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_SecretsConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump *envoy_admin_v3_SecretsConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_SecretsConfigDump *ret = envoy_admin_v3_SecretsConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_SecretsConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_SecretsConfigDump_serialize(const envoy_admin_v3_SecretsConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_SecretsConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_has_static_secrets(const envoy_admin_v3_SecretsConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_admin_v3_SecretsConfigDump_StaticSecret* const* envoy_admin_v3_SecretsConfigDump_static_secrets(const envoy_admin_v3_SecretsConfigDump *msg, size_t *len) { return (const envoy_admin_v3_SecretsConfigDump_StaticSecret* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_has_dynamic_active_secrets(const envoy_admin_v3_SecretsConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE const envoy_admin_v3_SecretsConfigDump_DynamicSecret* const* envoy_admin_v3_SecretsConfigDump_dynamic_active_secrets(const envoy_admin_v3_SecretsConfigDump *msg, size_t *len) { return (const envoy_admin_v3_SecretsConfigDump_DynamicSecret* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_has_dynamic_warming_secrets(const envoy_admin_v3_SecretsConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_admin_v3_SecretsConfigDump_DynamicSecret* const* envoy_admin_v3_SecretsConfigDump_dynamic_warming_secrets(const envoy_admin_v3_SecretsConfigDump *msg, size_t *len) { return (const envoy_admin_v3_SecretsConfigDump_DynamicSecret* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_StaticSecret** envoy_admin_v3_SecretsConfigDump_mutable_static_secrets(envoy_admin_v3_SecretsConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_SecretsConfigDump_StaticSecret**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_StaticSecret** envoy_admin_v3_SecretsConfigDump_resize_static_secrets(envoy_admin_v3_SecretsConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_SecretsConfigDump_StaticSecret**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_SecretsConfigDump_StaticSecret* envoy_admin_v3_SecretsConfigDump_add_static_secrets(envoy_admin_v3_SecretsConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_SecretsConfigDump_StaticSecret* sub = (struct envoy_admin_v3_SecretsConfigDump_StaticSecret*)_upb_msg_new(&envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret** envoy_admin_v3_SecretsConfigDump_mutable_dynamic_active_secrets(envoy_admin_v3_SecretsConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_SecretsConfigDump_DynamicSecret**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret** envoy_admin_v3_SecretsConfigDump_resize_dynamic_active_secrets(envoy_admin_v3_SecretsConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_SecretsConfigDump_DynamicSecret**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_SecretsConfigDump_DynamicSecret* envoy_admin_v3_SecretsConfigDump_add_dynamic_active_secrets(envoy_admin_v3_SecretsConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_SecretsConfigDump_DynamicSecret* sub = (struct envoy_admin_v3_SecretsConfigDump_DynamicSecret*)_upb_msg_new(&envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret** envoy_admin_v3_SecretsConfigDump_mutable_dynamic_warming_secrets(envoy_admin_v3_SecretsConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_SecretsConfigDump_DynamicSecret**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret** envoy_admin_v3_SecretsConfigDump_resize_dynamic_warming_secrets(envoy_admin_v3_SecretsConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_SecretsConfigDump_DynamicSecret**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_SecretsConfigDump_DynamicSecret* envoy_admin_v3_SecretsConfigDump_add_dynamic_warming_secrets(envoy_admin_v3_SecretsConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_SecretsConfigDump_DynamicSecret* sub = (struct envoy_admin_v3_SecretsConfigDump_DynamicSecret*)_upb_msg_new(&envoy_admin_v3_SecretsConfigDump_DynamicSecret_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;
+}
+
+/* envoy.admin.v3.SecretsConfigDump.DynamicSecret */
+
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret *envoy_admin_v3_SecretsConfigDump_DynamicSecret_new(upb_arena *arena) {
+ return (envoy_admin_v3_SecretsConfigDump_DynamicSecret *)_upb_msg_new(&envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret *envoy_admin_v3_SecretsConfigDump_DynamicSecret_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_SecretsConfigDump_DynamicSecret *ret = envoy_admin_v3_SecretsConfigDump_DynamicSecret_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_DynamicSecret *envoy_admin_v3_SecretsConfigDump_DynamicSecret_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_SecretsConfigDump_DynamicSecret *ret = envoy_admin_v3_SecretsConfigDump_DynamicSecret_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_SecretsConfigDump_DynamicSecret_serialize(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_SecretsConfigDump_DynamicSecret_name(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_admin_v3_SecretsConfigDump_DynamicSecret_version_info(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_DynamicSecret_has_last_updated(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_SecretsConfigDump_DynamicSecret_last_updated(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Timestamp*); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_DynamicSecret_has_secret(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_SecretsConfigDump_DynamicSecret_secret(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_DynamicSecret_has_error_state(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_admin_v3_UpdateFailureState* envoy_admin_v3_SecretsConfigDump_DynamicSecret_error_state(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const envoy_admin_v3_UpdateFailureState*); }
+UPB_INLINE int32_t envoy_admin_v3_SecretsConfigDump_DynamicSecret_client_status(const envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_name(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_version_info(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_last_updated(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_SecretsConfigDump_DynamicSecret_mutable_last_updated(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_SecretsConfigDump_DynamicSecret_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_secret(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_SecretsConfigDump_DynamicSecret_mutable_secret(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_SecretsConfigDump_DynamicSecret_secret(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_secret(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_error_state(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, envoy_admin_v3_UpdateFailureState* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 56), envoy_admin_v3_UpdateFailureState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_UpdateFailureState* envoy_admin_v3_SecretsConfigDump_DynamicSecret_mutable_error_state(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, upb_arena *arena) {
+ struct envoy_admin_v3_UpdateFailureState* sub = (struct envoy_admin_v3_UpdateFailureState*)envoy_admin_v3_SecretsConfigDump_DynamicSecret_error_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_UpdateFailureState*)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_error_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_DynamicSecret_set_client_status(envoy_admin_v3_SecretsConfigDump_DynamicSecret *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.admin.v3.SecretsConfigDump.StaticSecret */
+
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_StaticSecret *envoy_admin_v3_SecretsConfigDump_StaticSecret_new(upb_arena *arena) {
+ return (envoy_admin_v3_SecretsConfigDump_StaticSecret *)_upb_msg_new(&envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_StaticSecret *envoy_admin_v3_SecretsConfigDump_StaticSecret_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_SecretsConfigDump_StaticSecret *ret = envoy_admin_v3_SecretsConfigDump_StaticSecret_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_SecretsConfigDump_StaticSecret *envoy_admin_v3_SecretsConfigDump_StaticSecret_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_SecretsConfigDump_StaticSecret *ret = envoy_admin_v3_SecretsConfigDump_StaticSecret_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_SecretsConfigDump_StaticSecret_serialize(const envoy_admin_v3_SecretsConfigDump_StaticSecret *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_SecretsConfigDump_StaticSecret_name(const envoy_admin_v3_SecretsConfigDump_StaticSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_StaticSecret_has_last_updated(const envoy_admin_v3_SecretsConfigDump_StaticSecret *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_SecretsConfigDump_StaticSecret_last_updated(const envoy_admin_v3_SecretsConfigDump_StaticSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Timestamp*); }
+UPB_INLINE bool envoy_admin_v3_SecretsConfigDump_StaticSecret_has_secret(const envoy_admin_v3_SecretsConfigDump_StaticSecret *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_SecretsConfigDump_StaticSecret_secret(const envoy_admin_v3_SecretsConfigDump_StaticSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Any*); }
+
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_StaticSecret_set_name(envoy_admin_v3_SecretsConfigDump_StaticSecret *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_StaticSecret_set_last_updated(envoy_admin_v3_SecretsConfigDump_StaticSecret *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_SecretsConfigDump_StaticSecret_mutable_last_updated(envoy_admin_v3_SecretsConfigDump_StaticSecret *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_SecretsConfigDump_StaticSecret_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_SecretsConfigDump_StaticSecret_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_SecretsConfigDump_StaticSecret_set_secret(envoy_admin_v3_SecretsConfigDump_StaticSecret *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_SecretsConfigDump_StaticSecret_mutable_secret(envoy_admin_v3_SecretsConfigDump_StaticSecret *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_SecretsConfigDump_StaticSecret_secret(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_SecretsConfigDump_StaticSecret_set_secret(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.EndpointsConfigDump */
+
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump *envoy_admin_v3_EndpointsConfigDump_new(upb_arena *arena) {
+ return (envoy_admin_v3_EndpointsConfigDump *)_upb_msg_new(&envoy_admin_v3_EndpointsConfigDump_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump *envoy_admin_v3_EndpointsConfigDump_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_EndpointsConfigDump *ret = envoy_admin_v3_EndpointsConfigDump_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_EndpointsConfigDump_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump *envoy_admin_v3_EndpointsConfigDump_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_EndpointsConfigDump *ret = envoy_admin_v3_EndpointsConfigDump_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_EndpointsConfigDump_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_EndpointsConfigDump_serialize(const envoy_admin_v3_EndpointsConfigDump *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_EndpointsConfigDump_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_has_static_endpoint_configs(const envoy_admin_v3_EndpointsConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig* const* envoy_admin_v3_EndpointsConfigDump_static_endpoint_configs(const envoy_admin_v3_EndpointsConfigDump *msg, size_t *len) { return (const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_has_dynamic_endpoint_configs(const envoy_admin_v3_EndpointsConfigDump *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig* const* envoy_admin_v3_EndpointsConfigDump_dynamic_endpoint_configs(const envoy_admin_v3_EndpointsConfigDump *msg, size_t *len) { return (const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig** envoy_admin_v3_EndpointsConfigDump_mutable_static_endpoint_configs(envoy_admin_v3_EndpointsConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig** envoy_admin_v3_EndpointsConfigDump_resize_static_endpoint_configs(envoy_admin_v3_EndpointsConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig* envoy_admin_v3_EndpointsConfigDump_add_static_endpoint_configs(envoy_admin_v3_EndpointsConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig* sub = (struct envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig*)_upb_msg_new(&envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig** envoy_admin_v3_EndpointsConfigDump_mutable_dynamic_endpoint_configs(envoy_admin_v3_EndpointsConfigDump *msg, size_t *len) {
+ return (envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig** envoy_admin_v3_EndpointsConfigDump_resize_dynamic_endpoint_configs(envoy_admin_v3_EndpointsConfigDump *msg, size_t len, upb_arena *arena) {
+ return (envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig* envoy_admin_v3_EndpointsConfigDump_add_dynamic_endpoint_configs(envoy_admin_v3_EndpointsConfigDump *msg, upb_arena *arena) {
+ struct envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig* sub = (struct envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig*)_upb_msg_new(&envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig */
+
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_new(upb_arena *arena) {
+ return (envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *)_upb_msg_new(&envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *ret = envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *ret = envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_serialize(const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_has_endpoint_config(const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_endpoint_config(const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_has_last_updated(const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_last_updated(const envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Timestamp*); }
+
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_set_endpoint_config(envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_mutable_endpoint_config(envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_endpoint_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_set_endpoint_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_set_last_updated(envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_mutable_last_updated(envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig */
+
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_new(upb_arena *arena) {
+ return (envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *)_upb_msg_new(&envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit, arena);
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *ret = envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *ret = envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_serialize(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_version_info(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_has_endpoint_config(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_endpoint_config(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_has_last_updated(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_last_updated(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Timestamp*); }
+UPB_INLINE bool envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_has_error_state(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_admin_v3_UpdateFailureState* envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_error_state(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_admin_v3_UpdateFailureState*); }
+UPB_INLINE int32_t envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_client_status(const envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_version_info(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_endpoint_config(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_mutable_endpoint_config(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_endpoint_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_endpoint_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_last_updated(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, struct google_protobuf_Timestamp* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Timestamp*) = value;
+}
+UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_mutable_last_updated(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_last_updated(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Timestamp*)_upb_msg_new(&google_protobuf_Timestamp_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_last_updated(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_error_state(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, envoy_admin_v3_UpdateFailureState* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_admin_v3_UpdateFailureState*) = value;
+}
+UPB_INLINE struct envoy_admin_v3_UpdateFailureState* envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_mutable_error_state(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_UpdateFailureState* sub = (struct envoy_admin_v3_UpdateFailureState*)envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_error_state(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_UpdateFailureState*)_upb_msg_new(&envoy_admin_v3_UpdateFailureState_msginit, arena);
+ if (!sub) return NULL;
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_error_state(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_client_status(envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_ADMIN_V3_CONFIG_DUMP_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h
index cdb472fc2f2..1478843b590 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.c
index 3e5712a4792..8f1877d1c6d 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.c
@@ -20,7 +20,7 @@ static const upb_msglayout_field envoy_annotations_ResourceAnnotation__fields[1]
const upb_msglayout envoy_annotations_ResourceAnnotation_msginit = {
NULL,
&envoy_annotations_ResourceAnnotation__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.h
index ed6660a2d8a..534eef36b8c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/annotations/resource.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_annotations_ResourceAnnotation *envoy_annotations_ResourceAnnot
envoy_annotations_ResourceAnnotation *ret = envoy_annotations_ResourceAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_annotations_ResourceAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_annotations_ResourceAnnotation *envoy_annotations_ResourceAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_annotations_ResourceAnnotation *ret = envoy_annotations_ResourceAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_annotations_ResourceAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_annotations_ResourceAnnotation_serialize(const envoy_annotations_ResourceAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_annotations_ResourceAnnotation_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c
index 8968072a56f..fa6dcbc1fb9 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c
@@ -14,7 +14,6 @@
#include "envoy/type/matcher/v3/metadata.upb.h"
#include "envoy/type/v3/percent.upb.h"
#include "google/protobuf/any.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -28,15 +27,15 @@ static const upb_msglayout *const envoy_config_accesslog_v3_AccessLog_submsgs[2]
};
static const upb_msglayout_field envoy_config_accesslog_v3_AccessLog__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {4, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1},
};
const upb_msglayout envoy_config_accesslog_v3_AccessLog_msginit = {
&envoy_config_accesslog_v3_AccessLog_submsgs[0],
&envoy_config_accesslog_v3_AccessLog__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_AccessLogFilter_submsgs[12] = {
@@ -72,7 +71,7 @@ static const upb_msglayout_field envoy_config_accesslog_v3_AccessLogFilter__fiel
const upb_msglayout envoy_config_accesslog_v3_AccessLogFilter_msginit = {
&envoy_config_accesslog_v3_AccessLogFilter_submsgs[0],
&envoy_config_accesslog_v3_AccessLogFilter__fields[0],
- UPB_SIZE(8, 16), 12, false,
+ UPB_SIZE(8, 16), 12, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_ComparisonFilter_submsgs[1] = {
@@ -80,14 +79,14 @@ static const upb_msglayout *const envoy_config_accesslog_v3_ComparisonFilter_sub
};
static const upb_msglayout_field envoy_config_accesslog_v3_ComparisonFilter__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(8, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {2, UPB_SIZE(8, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_accesslog_v3_ComparisonFilter_msginit = {
&envoy_config_accesslog_v3_ComparisonFilter_submsgs[0],
&envoy_config_accesslog_v3_ComparisonFilter__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_StatusCodeFilter_submsgs[1] = {
@@ -95,13 +94,13 @@ static const upb_msglayout *const envoy_config_accesslog_v3_StatusCodeFilter_sub
};
static const upb_msglayout_field envoy_config_accesslog_v3_StatusCodeFilter__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_accesslog_v3_StatusCodeFilter_msginit = {
&envoy_config_accesslog_v3_StatusCodeFilter_submsgs[0],
&envoy_config_accesslog_v3_StatusCodeFilter__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_DurationFilter_submsgs[1] = {
@@ -109,25 +108,25 @@ static const upb_msglayout *const envoy_config_accesslog_v3_DurationFilter_subms
};
static const upb_msglayout_field envoy_config_accesslog_v3_DurationFilter__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_accesslog_v3_DurationFilter_msginit = {
&envoy_config_accesslog_v3_DurationFilter_submsgs[0],
&envoy_config_accesslog_v3_DurationFilter__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
const upb_msglayout envoy_config_accesslog_v3_NotHealthCheckFilter_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
const upb_msglayout envoy_config_accesslog_v3_TraceableFilter_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_RuntimeFilter_submsgs[1] = {
@@ -136,14 +135,14 @@ static const upb_msglayout *const envoy_config_accesslog_v3_RuntimeFilter_submsg
static const upb_msglayout_field envoy_config_accesslog_v3_RuntimeFilter__fields[3] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
- {2, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_accesslog_v3_RuntimeFilter_msginit = {
&envoy_config_accesslog_v3_RuntimeFilter_submsgs[0],
&envoy_config_accesslog_v3_RuntimeFilter__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_AndFilter_submsgs[1] = {
@@ -157,7 +156,7 @@ static const upb_msglayout_field envoy_config_accesslog_v3_AndFilter__fields[1]
const upb_msglayout envoy_config_accesslog_v3_AndFilter_msginit = {
&envoy_config_accesslog_v3_AndFilter_submsgs[0],
&envoy_config_accesslog_v3_AndFilter__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_OrFilter_submsgs[1] = {
@@ -171,7 +170,7 @@ static const upb_msglayout_field envoy_config_accesslog_v3_OrFilter__fields[1] =
const upb_msglayout envoy_config_accesslog_v3_OrFilter_msginit = {
&envoy_config_accesslog_v3_OrFilter_submsgs[0],
&envoy_config_accesslog_v3_OrFilter__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_HeaderFilter_submsgs[1] = {
@@ -179,13 +178,13 @@ static const upb_msglayout *const envoy_config_accesslog_v3_HeaderFilter_submsgs
};
static const upb_msglayout_field envoy_config_accesslog_v3_HeaderFilter__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_accesslog_v3_HeaderFilter_msginit = {
&envoy_config_accesslog_v3_HeaderFilter_submsgs[0],
&envoy_config_accesslog_v3_HeaderFilter__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_config_accesslog_v3_ResponseFlagFilter__fields[1] = {
@@ -195,7 +194,7 @@ static const upb_msglayout_field envoy_config_accesslog_v3_ResponseFlagFilter__f
const upb_msglayout envoy_config_accesslog_v3_ResponseFlagFilter_msginit = {
NULL,
&envoy_config_accesslog_v3_ResponseFlagFilter__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field envoy_config_accesslog_v3_GrpcStatusFilter__fields[2] = {
@@ -206,7 +205,7 @@ static const upb_msglayout_field envoy_config_accesslog_v3_GrpcStatusFilter__fie
const upb_msglayout envoy_config_accesslog_v3_GrpcStatusFilter_msginit = {
NULL,
&envoy_config_accesslog_v3_GrpcStatusFilter__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_MetadataFilter_submsgs[2] = {
@@ -215,14 +214,14 @@ static const upb_msglayout *const envoy_config_accesslog_v3_MetadataFilter_subms
};
static const upb_msglayout_field envoy_config_accesslog_v3_MetadataFilter__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_accesslog_v3_MetadataFilter_msginit = {
&envoy_config_accesslog_v3_MetadataFilter_submsgs[0],
&envoy_config_accesslog_v3_MetadataFilter__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_accesslog_v3_ExtensionFilter_submsgs[1] = {
@@ -237,7 +236,7 @@ static const upb_msglayout_field envoy_config_accesslog_v3_ExtensionFilter__fiel
const upb_msglayout envoy_config_accesslog_v3_ExtensionFilter_msginit = {
&envoy_config_accesslog_v3_ExtensionFilter_submsgs[0],
&envoy_config_accesslog_v3_ExtensionFilter__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h
index 2e9cb7a741d..8e33c869c72 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -114,6 +115,12 @@ UPB_INLINE envoy_config_accesslog_v3_AccessLog *envoy_config_accesslog_v3_Access
envoy_config_accesslog_v3_AccessLog *ret = envoy_config_accesslog_v3_AccessLog_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_AccessLog_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_AccessLog *envoy_config_accesslog_v3_AccessLog_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_AccessLog *ret = envoy_config_accesslog_v3_AccessLog_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_AccessLog_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_AccessLog_serialize(const envoy_config_accesslog_v3_AccessLog *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_AccessLog_msginit, arena, len);
}
@@ -122,19 +129,20 @@ typedef enum {
envoy_config_accesslog_v3_AccessLog_config_type_typed_config = 4,
envoy_config_accesslog_v3_AccessLog_config_type_NOT_SET = 0
} envoy_config_accesslog_v3_AccessLog_config_type_oneofcases;
-UPB_INLINE envoy_config_accesslog_v3_AccessLog_config_type_oneofcases envoy_config_accesslog_v3_AccessLog_config_type_case(const envoy_config_accesslog_v3_AccessLog* msg) { return (envoy_config_accesslog_v3_AccessLog_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); }
+UPB_INLINE envoy_config_accesslog_v3_AccessLog_config_type_oneofcases envoy_config_accesslog_v3_AccessLog_config_type_case(const envoy_config_accesslog_v3_AccessLog* msg) { return (envoy_config_accesslog_v3_AccessLog_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
-UPB_INLINE upb_strview envoy_config_accesslog_v3_AccessLog_name(const envoy_config_accesslog_v3_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_accesslog_v3_AccessLog_has_filter(const envoy_config_accesslog_v3_AccessLog *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_accesslog_v3_AccessLogFilter* envoy_config_accesslog_v3_AccessLog_filter(const envoy_config_accesslog_v3_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_accesslog_v3_AccessLogFilter*); }
-UPB_INLINE bool envoy_config_accesslog_v3_AccessLog_has_typed_config(const envoy_config_accesslog_v3_AccessLog *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 4; }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_accesslog_v3_AccessLog_typed_config(const envoy_config_accesslog_v3_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 4, NULL); }
+UPB_INLINE upb_strview envoy_config_accesslog_v3_AccessLog_name(const envoy_config_accesslog_v3_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_accesslog_v3_AccessLog_has_filter(const envoy_config_accesslog_v3_AccessLog *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_accesslog_v3_AccessLogFilter* envoy_config_accesslog_v3_AccessLog_filter(const envoy_config_accesslog_v3_AccessLog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_accesslog_v3_AccessLogFilter*); }
+UPB_INLINE bool envoy_config_accesslog_v3_AccessLog_has_typed_config(const envoy_config_accesslog_v3_AccessLog *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 4; }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_accesslog_v3_AccessLog_typed_config(const envoy_config_accesslog_v3_AccessLog *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); }
UPB_INLINE void envoy_config_accesslog_v3_AccessLog_set_name(envoy_config_accesslog_v3_AccessLog *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_accesslog_v3_AccessLog_set_filter(envoy_config_accesslog_v3_AccessLog *msg, envoy_config_accesslog_v3_AccessLogFilter* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_accesslog_v3_AccessLogFilter*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_accesslog_v3_AccessLogFilter*) = value;
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLogFilter* envoy_config_accesslog_v3_AccessLog_mutable_filter(envoy_config_accesslog_v3_AccessLog *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_AccessLogFilter* sub = (struct envoy_config_accesslog_v3_AccessLogFilter*)envoy_config_accesslog_v3_AccessLog_filter(msg);
@@ -146,7 +154,7 @@ UPB_INLINE struct envoy_config_accesslog_v3_AccessLogFilter* envoy_config_access
return sub;
}
UPB_INLINE void envoy_config_accesslog_v3_AccessLog_set_typed_config(envoy_config_accesslog_v3_AccessLog *msg, struct google_protobuf_Any* value) {
- UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 4);
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 4);
}
UPB_INLINE struct google_protobuf_Any* envoy_config_accesslog_v3_AccessLog_mutable_typed_config(envoy_config_accesslog_v3_AccessLog *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_accesslog_v3_AccessLog_typed_config(msg);
@@ -168,6 +176,12 @@ UPB_INLINE envoy_config_accesslog_v3_AccessLogFilter *envoy_config_accesslog_v3_
envoy_config_accesslog_v3_AccessLogFilter *ret = envoy_config_accesslog_v3_AccessLogFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_AccessLogFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_AccessLogFilter *envoy_config_accesslog_v3_AccessLogFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_AccessLogFilter *ret = envoy_config_accesslog_v3_AccessLogFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_AccessLogFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_AccessLogFilter_serialize(const envoy_config_accesslog_v3_AccessLogFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_AccessLogFilter_msginit, arena, len);
}
@@ -369,18 +383,25 @@ UPB_INLINE envoy_config_accesslog_v3_ComparisonFilter *envoy_config_accesslog_v3
envoy_config_accesslog_v3_ComparisonFilter *ret = envoy_config_accesslog_v3_ComparisonFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_ComparisonFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_ComparisonFilter *envoy_config_accesslog_v3_ComparisonFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_ComparisonFilter *ret = envoy_config_accesslog_v3_ComparisonFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_ComparisonFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_ComparisonFilter_serialize(const envoy_config_accesslog_v3_ComparisonFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_ComparisonFilter_msginit, arena, len);
}
-UPB_INLINE int32_t envoy_config_accesslog_v3_ComparisonFilter_op(const envoy_config_accesslog_v3_ComparisonFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_accesslog_v3_ComparisonFilter_has_value(const envoy_config_accesslog_v3_ComparisonFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
+UPB_INLINE int32_t envoy_config_accesslog_v3_ComparisonFilter_op(const envoy_config_accesslog_v3_ComparisonFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_accesslog_v3_ComparisonFilter_has_value(const envoy_config_accesslog_v3_ComparisonFilter *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_config_core_v3_RuntimeUInt32* envoy_config_accesslog_v3_ComparisonFilter_value(const envoy_config_accesslog_v3_ComparisonFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_config_core_v3_RuntimeUInt32*); }
UPB_INLINE void envoy_config_accesslog_v3_ComparisonFilter_set_op(envoy_config_accesslog_v3_ComparisonFilter *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_config_accesslog_v3_ComparisonFilter_set_value(envoy_config_accesslog_v3_ComparisonFilter *msg, struct envoy_config_core_v3_RuntimeUInt32* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_config_core_v3_RuntimeUInt32*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RuntimeUInt32* envoy_config_accesslog_v3_ComparisonFilter_mutable_value(envoy_config_accesslog_v3_ComparisonFilter *msg, upb_arena *arena) {
@@ -403,15 +424,22 @@ UPB_INLINE envoy_config_accesslog_v3_StatusCodeFilter *envoy_config_accesslog_v3
envoy_config_accesslog_v3_StatusCodeFilter *ret = envoy_config_accesslog_v3_StatusCodeFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_StatusCodeFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_StatusCodeFilter *envoy_config_accesslog_v3_StatusCodeFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_StatusCodeFilter *ret = envoy_config_accesslog_v3_StatusCodeFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_StatusCodeFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_StatusCodeFilter_serialize(const envoy_config_accesslog_v3_StatusCodeFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_StatusCodeFilter_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_accesslog_v3_StatusCodeFilter_has_comparison(const envoy_config_accesslog_v3_StatusCodeFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_accesslog_v3_ComparisonFilter* envoy_config_accesslog_v3_StatusCodeFilter_comparison(const envoy_config_accesslog_v3_StatusCodeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_accesslog_v3_ComparisonFilter*); }
+UPB_INLINE bool envoy_config_accesslog_v3_StatusCodeFilter_has_comparison(const envoy_config_accesslog_v3_StatusCodeFilter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_accesslog_v3_ComparisonFilter* envoy_config_accesslog_v3_StatusCodeFilter_comparison(const envoy_config_accesslog_v3_StatusCodeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_accesslog_v3_ComparisonFilter*); }
UPB_INLINE void envoy_config_accesslog_v3_StatusCodeFilter_set_comparison(envoy_config_accesslog_v3_StatusCodeFilter *msg, envoy_config_accesslog_v3_ComparisonFilter* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_accesslog_v3_ComparisonFilter*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_accesslog_v3_ComparisonFilter*) = value;
}
UPB_INLINE struct envoy_config_accesslog_v3_ComparisonFilter* envoy_config_accesslog_v3_StatusCodeFilter_mutable_comparison(envoy_config_accesslog_v3_StatusCodeFilter *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_ComparisonFilter* sub = (struct envoy_config_accesslog_v3_ComparisonFilter*)envoy_config_accesslog_v3_StatusCodeFilter_comparison(msg);
@@ -433,15 +461,22 @@ UPB_INLINE envoy_config_accesslog_v3_DurationFilter *envoy_config_accesslog_v3_D
envoy_config_accesslog_v3_DurationFilter *ret = envoy_config_accesslog_v3_DurationFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_DurationFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_DurationFilter *envoy_config_accesslog_v3_DurationFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_DurationFilter *ret = envoy_config_accesslog_v3_DurationFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_DurationFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_DurationFilter_serialize(const envoy_config_accesslog_v3_DurationFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_DurationFilter_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_accesslog_v3_DurationFilter_has_comparison(const envoy_config_accesslog_v3_DurationFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_accesslog_v3_ComparisonFilter* envoy_config_accesslog_v3_DurationFilter_comparison(const envoy_config_accesslog_v3_DurationFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_accesslog_v3_ComparisonFilter*); }
+UPB_INLINE bool envoy_config_accesslog_v3_DurationFilter_has_comparison(const envoy_config_accesslog_v3_DurationFilter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_accesslog_v3_ComparisonFilter* envoy_config_accesslog_v3_DurationFilter_comparison(const envoy_config_accesslog_v3_DurationFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_accesslog_v3_ComparisonFilter*); }
UPB_INLINE void envoy_config_accesslog_v3_DurationFilter_set_comparison(envoy_config_accesslog_v3_DurationFilter *msg, envoy_config_accesslog_v3_ComparisonFilter* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_accesslog_v3_ComparisonFilter*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_accesslog_v3_ComparisonFilter*) = value;
}
UPB_INLINE struct envoy_config_accesslog_v3_ComparisonFilter* envoy_config_accesslog_v3_DurationFilter_mutable_comparison(envoy_config_accesslog_v3_DurationFilter *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_ComparisonFilter* sub = (struct envoy_config_accesslog_v3_ComparisonFilter*)envoy_config_accesslog_v3_DurationFilter_comparison(msg);
@@ -463,6 +498,12 @@ UPB_INLINE envoy_config_accesslog_v3_NotHealthCheckFilter *envoy_config_accesslo
envoy_config_accesslog_v3_NotHealthCheckFilter *ret = envoy_config_accesslog_v3_NotHealthCheckFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_NotHealthCheckFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_NotHealthCheckFilter *envoy_config_accesslog_v3_NotHealthCheckFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_NotHealthCheckFilter *ret = envoy_config_accesslog_v3_NotHealthCheckFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_NotHealthCheckFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_NotHealthCheckFilter_serialize(const envoy_config_accesslog_v3_NotHealthCheckFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_NotHealthCheckFilter_msginit, arena, len);
}
@@ -479,6 +520,12 @@ UPB_INLINE envoy_config_accesslog_v3_TraceableFilter *envoy_config_accesslog_v3_
envoy_config_accesslog_v3_TraceableFilter *ret = envoy_config_accesslog_v3_TraceableFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_TraceableFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_TraceableFilter *envoy_config_accesslog_v3_TraceableFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_TraceableFilter *ret = envoy_config_accesslog_v3_TraceableFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_TraceableFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_TraceableFilter_serialize(const envoy_config_accesslog_v3_TraceableFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_TraceableFilter_msginit, arena, len);
}
@@ -495,19 +542,26 @@ UPB_INLINE envoy_config_accesslog_v3_RuntimeFilter *envoy_config_accesslog_v3_Ru
envoy_config_accesslog_v3_RuntimeFilter *ret = envoy_config_accesslog_v3_RuntimeFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_RuntimeFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_RuntimeFilter *envoy_config_accesslog_v3_RuntimeFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_RuntimeFilter *ret = envoy_config_accesslog_v3_RuntimeFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_RuntimeFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_RuntimeFilter_serialize(const envoy_config_accesslog_v3_RuntimeFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_RuntimeFilter_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_config_accesslog_v3_RuntimeFilter_runtime_key(const envoy_config_accesslog_v3_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool envoy_config_accesslog_v3_RuntimeFilter_has_percent_sampled(const envoy_config_accesslog_v3_RuntimeFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_config_accesslog_v3_RuntimeFilter_has_percent_sampled(const envoy_config_accesslog_v3_RuntimeFilter *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_accesslog_v3_RuntimeFilter_percent_sampled(const envoy_config_accesslog_v3_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_FractionalPercent*); }
-UPB_INLINE bool envoy_config_accesslog_v3_RuntimeFilter_use_independent_randomness(const envoy_config_accesslog_v3_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_accesslog_v3_RuntimeFilter_use_independent_randomness(const envoy_config_accesslog_v3_RuntimeFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_accesslog_v3_RuntimeFilter_set_runtime_key(envoy_config_accesslog_v3_RuntimeFilter *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_accesslog_v3_RuntimeFilter_set_percent_sampled(envoy_config_accesslog_v3_RuntimeFilter *msg, struct envoy_type_v3_FractionalPercent* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_accesslog_v3_RuntimeFilter_mutable_percent_sampled(envoy_config_accesslog_v3_RuntimeFilter *msg, upb_arena *arena) {
@@ -520,7 +574,7 @@ UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_accesslog_v3_Run
return sub;
}
UPB_INLINE void envoy_config_accesslog_v3_RuntimeFilter_set_use_independent_randomness(envoy_config_accesslog_v3_RuntimeFilter *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* envoy.config.accesslog.v3.AndFilter */
@@ -533,6 +587,12 @@ UPB_INLINE envoy_config_accesslog_v3_AndFilter *envoy_config_accesslog_v3_AndFil
envoy_config_accesslog_v3_AndFilter *ret = envoy_config_accesslog_v3_AndFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_AndFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_AndFilter *envoy_config_accesslog_v3_AndFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_AndFilter *ret = envoy_config_accesslog_v3_AndFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_AndFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_AndFilter_serialize(const envoy_config_accesslog_v3_AndFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_AndFilter_msginit, arena, len);
}
@@ -544,12 +604,12 @@ UPB_INLINE envoy_config_accesslog_v3_AccessLogFilter** envoy_config_accesslog_v3
return (envoy_config_accesslog_v3_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_accesslog_v3_AccessLogFilter** envoy_config_accesslog_v3_AndFilter_resize_filters(envoy_config_accesslog_v3_AndFilter *msg, size_t len, upb_arena *arena) {
- return (envoy_config_accesslog_v3_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_accesslog_v3_AccessLogFilter**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLogFilter* envoy_config_accesslog_v3_AndFilter_add_filters(envoy_config_accesslog_v3_AndFilter *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_AccessLogFilter* sub = (struct envoy_config_accesslog_v3_AccessLogFilter*)_upb_msg_new(&envoy_config_accesslog_v3_AccessLogFilter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -564,6 +624,12 @@ UPB_INLINE envoy_config_accesslog_v3_OrFilter *envoy_config_accesslog_v3_OrFilte
envoy_config_accesslog_v3_OrFilter *ret = envoy_config_accesslog_v3_OrFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_OrFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_OrFilter *envoy_config_accesslog_v3_OrFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_OrFilter *ret = envoy_config_accesslog_v3_OrFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_OrFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_OrFilter_serialize(const envoy_config_accesslog_v3_OrFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_OrFilter_msginit, arena, len);
}
@@ -575,12 +641,12 @@ UPB_INLINE envoy_config_accesslog_v3_AccessLogFilter** envoy_config_accesslog_v3
return (envoy_config_accesslog_v3_AccessLogFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_accesslog_v3_AccessLogFilter** envoy_config_accesslog_v3_OrFilter_resize_filters(envoy_config_accesslog_v3_OrFilter *msg, size_t len, upb_arena *arena) {
- return (envoy_config_accesslog_v3_AccessLogFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_accesslog_v3_AccessLogFilter**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLogFilter* envoy_config_accesslog_v3_OrFilter_add_filters(envoy_config_accesslog_v3_OrFilter *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_AccessLogFilter* sub = (struct envoy_config_accesslog_v3_AccessLogFilter*)_upb_msg_new(&envoy_config_accesslog_v3_AccessLogFilter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -595,15 +661,22 @@ UPB_INLINE envoy_config_accesslog_v3_HeaderFilter *envoy_config_accesslog_v3_Hea
envoy_config_accesslog_v3_HeaderFilter *ret = envoy_config_accesslog_v3_HeaderFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_HeaderFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_HeaderFilter *envoy_config_accesslog_v3_HeaderFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_HeaderFilter *ret = envoy_config_accesslog_v3_HeaderFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_HeaderFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_HeaderFilter_serialize(const envoy_config_accesslog_v3_HeaderFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_HeaderFilter_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_accesslog_v3_HeaderFilter_has_header(const envoy_config_accesslog_v3_HeaderFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* envoy_config_accesslog_v3_HeaderFilter_header(const envoy_config_accesslog_v3_HeaderFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_route_v3_HeaderMatcher*); }
+UPB_INLINE bool envoy_config_accesslog_v3_HeaderFilter_has_header(const envoy_config_accesslog_v3_HeaderFilter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* envoy_config_accesslog_v3_HeaderFilter_header(const envoy_config_accesslog_v3_HeaderFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_route_v3_HeaderMatcher*); }
UPB_INLINE void envoy_config_accesslog_v3_HeaderFilter_set_header(envoy_config_accesslog_v3_HeaderFilter *msg, struct envoy_config_route_v3_HeaderMatcher* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_route_v3_HeaderMatcher*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_route_v3_HeaderMatcher*) = value;
}
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_accesslog_v3_HeaderFilter_mutable_header(envoy_config_accesslog_v3_HeaderFilter *msg, upb_arena *arena) {
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)envoy_config_accesslog_v3_HeaderFilter_header(msg);
@@ -625,6 +698,12 @@ UPB_INLINE envoy_config_accesslog_v3_ResponseFlagFilter *envoy_config_accesslog_
envoy_config_accesslog_v3_ResponseFlagFilter *ret = envoy_config_accesslog_v3_ResponseFlagFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_ResponseFlagFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_ResponseFlagFilter *envoy_config_accesslog_v3_ResponseFlagFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_ResponseFlagFilter *ret = envoy_config_accesslog_v3_ResponseFlagFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_ResponseFlagFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_ResponseFlagFilter_serialize(const envoy_config_accesslog_v3_ResponseFlagFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_ResponseFlagFilter_msginit, arena, len);
}
@@ -635,10 +714,10 @@ UPB_INLINE upb_strview* envoy_config_accesslog_v3_ResponseFlagFilter_mutable_fla
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE upb_strview* envoy_config_accesslog_v3_ResponseFlagFilter_resize_flags(envoy_config_accesslog_v3_ResponseFlagFilter *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_accesslog_v3_ResponseFlagFilter_add_flags(envoy_config_accesslog_v3_ResponseFlagFilter *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
arena);
}
@@ -652,6 +731,12 @@ UPB_INLINE envoy_config_accesslog_v3_GrpcStatusFilter *envoy_config_accesslog_v3
envoy_config_accesslog_v3_GrpcStatusFilter *ret = envoy_config_accesslog_v3_GrpcStatusFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_GrpcStatusFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_GrpcStatusFilter *envoy_config_accesslog_v3_GrpcStatusFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_GrpcStatusFilter *ret = envoy_config_accesslog_v3_GrpcStatusFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_GrpcStatusFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_GrpcStatusFilter_serialize(const envoy_config_accesslog_v3_GrpcStatusFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_GrpcStatusFilter_msginit, arena, len);
}
@@ -663,10 +748,10 @@ UPB_INLINE int32_t* envoy_config_accesslog_v3_GrpcStatusFilter_mutable_statuses(
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE int32_t* envoy_config_accesslog_v3_GrpcStatusFilter_resize_statuses(envoy_config_accesslog_v3_GrpcStatusFilter *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_ENUM, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, 2, arena);
}
UPB_INLINE bool envoy_config_accesslog_v3_GrpcStatusFilter_add_statuses(envoy_config_accesslog_v3_GrpcStatusFilter *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(4, 8), UPB_SIZE(8, 8), UPB_TYPE_ENUM, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(4, 8), 2, &val,
arena);
}
UPB_INLINE void envoy_config_accesslog_v3_GrpcStatusFilter_set_exclude(envoy_config_accesslog_v3_GrpcStatusFilter *msg, bool value) {
@@ -683,17 +768,24 @@ UPB_INLINE envoy_config_accesslog_v3_MetadataFilter *envoy_config_accesslog_v3_M
envoy_config_accesslog_v3_MetadataFilter *ret = envoy_config_accesslog_v3_MetadataFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_MetadataFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_MetadataFilter *envoy_config_accesslog_v3_MetadataFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_MetadataFilter *ret = envoy_config_accesslog_v3_MetadataFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_MetadataFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_MetadataFilter_serialize(const envoy_config_accesslog_v3_MetadataFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_MetadataFilter_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_accesslog_v3_MetadataFilter_has_matcher(const envoy_config_accesslog_v3_MetadataFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_accesslog_v3_MetadataFilter_matcher(const envoy_config_accesslog_v3_MetadataFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_matcher_v3_MetadataMatcher*); }
-UPB_INLINE bool envoy_config_accesslog_v3_MetadataFilter_has_match_if_key_not_found(const envoy_config_accesslog_v3_MetadataFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_accesslog_v3_MetadataFilter_match_if_key_not_found(const envoy_config_accesslog_v3_MetadataFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_accesslog_v3_MetadataFilter_has_matcher(const envoy_config_accesslog_v3_MetadataFilter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_accesslog_v3_MetadataFilter_matcher(const envoy_config_accesslog_v3_MetadataFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_MetadataMatcher*); }
+UPB_INLINE bool envoy_config_accesslog_v3_MetadataFilter_has_match_if_key_not_found(const envoy_config_accesslog_v3_MetadataFilter *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_accesslog_v3_MetadataFilter_match_if_key_not_found(const envoy_config_accesslog_v3_MetadataFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_accesslog_v3_MetadataFilter_set_matcher(envoy_config_accesslog_v3_MetadataFilter *msg, struct envoy_type_matcher_v3_MetadataMatcher* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_matcher_v3_MetadataMatcher*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_MetadataMatcher*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_accesslog_v3_MetadataFilter_mutable_matcher(envoy_config_accesslog_v3_MetadataFilter *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_MetadataMatcher* sub = (struct envoy_type_matcher_v3_MetadataMatcher*)envoy_config_accesslog_v3_MetadataFilter_matcher(msg);
@@ -705,7 +797,8 @@ UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher* envoy_config_accesslog_
return sub;
}
UPB_INLINE void envoy_config_accesslog_v3_MetadataFilter_set_match_if_key_not_found(envoy_config_accesslog_v3_MetadataFilter *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_accesslog_v3_MetadataFilter_mutable_match_if_key_not_found(envoy_config_accesslog_v3_MetadataFilter *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_accesslog_v3_MetadataFilter_match_if_key_not_found(msg);
@@ -727,6 +820,12 @@ UPB_INLINE envoy_config_accesslog_v3_ExtensionFilter *envoy_config_accesslog_v3_
envoy_config_accesslog_v3_ExtensionFilter *ret = envoy_config_accesslog_v3_ExtensionFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_accesslog_v3_ExtensionFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_accesslog_v3_ExtensionFilter *envoy_config_accesslog_v3_ExtensionFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_accesslog_v3_ExtensionFilter *ret = envoy_config_accesslog_v3_ExtensionFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_accesslog_v3_ExtensionFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_accesslog_v3_ExtensionFilter_serialize(const envoy_config_accesslog_v3_ExtensionFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_accesslog_v3_ExtensionFilter_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c
new file mode 100644
index 00000000000..b7f9387b242
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c
@@ -0,0 +1,350 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/bootstrap/v3/bootstrap.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/config/bootstrap/v3/bootstrap.upb.h"
+#include "envoy/config/cluster/v3/cluster.upb.h"
+#include "envoy/config/core/v3/address.upb.h"
+#include "envoy/config/core/v3/base.upb.h"
+#include "envoy/config/core/v3/config_source.upb.h"
+#include "envoy/config/core/v3/event_service_config.upb.h"
+#include "envoy/config/core/v3/extension.upb.h"
+#include "envoy/config/core/v3/socket_option.upb.h"
+#include "envoy/config/listener/v3/listener.upb.h"
+#include "envoy/config/metrics/v3/stats.upb.h"
+#include "envoy/config/overload/v3/overload.upb.h"
+#include "envoy/config/trace/v3/http_tracer.upb.h"
+#include "envoy/extensions/transport_sockets/tls/v3/secret.upb.h"
+#include "envoy/type/v3/percent.upb.h"
+#include "google/protobuf/duration.upb.h"
+#include "google/protobuf/struct.upb.h"
+#include "google/protobuf/wrappers.upb.h"
+#include "udpa/annotations/migrate.upb.h"
+#include "udpa/annotations/security.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Bootstrap_submsgs[19] = {
+ &envoy_config_bootstrap_v3_Admin_msginit,
+ &envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_msginit,
+ &envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit,
+ &envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit,
+ &envoy_config_bootstrap_v3_ClusterManager_msginit,
+ &envoy_config_bootstrap_v3_FatalAction_msginit,
+ &envoy_config_bootstrap_v3_LayeredRuntime_msginit,
+ &envoy_config_bootstrap_v3_Watchdog_msginit,
+ &envoy_config_bootstrap_v3_Watchdogs_msginit,
+ &envoy_config_core_v3_ApiConfigSource_msginit,
+ &envoy_config_core_v3_ConfigSource_msginit,
+ &envoy_config_core_v3_Node_msginit,
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
+ &envoy_config_metrics_v3_StatsConfig_msginit,
+ &envoy_config_metrics_v3_StatsSink_msginit,
+ &envoy_config_overload_v3_OverloadManager_msginit,
+ &envoy_config_trace_v3_Tracing_msginit,
+ &google_protobuf_Duration_msginit,
+ &google_protobuf_UInt64Value_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Bootstrap__fields[27] = {
+ {1, UPB_SIZE(28, 56), 1, 11, 11, 1},
+ {2, UPB_SIZE(32, 64), 2, 3, 11, 1},
+ {3, UPB_SIZE(36, 72), 3, 2, 11, 1},
+ {4, UPB_SIZE(40, 80), 4, 4, 11, 1},
+ {5, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {6, UPB_SIZE(88, 176), 0, 14, 11, 3},
+ {7, UPB_SIZE(44, 88), 5, 17, 11, 1},
+ {8, UPB_SIZE(48, 96), 6, 7, 11, 1},
+ {9, UPB_SIZE(52, 104), 7, 16, 11, 1},
+ {12, UPB_SIZE(56, 112), 8, 0, 11, 1},
+ {13, UPB_SIZE(60, 120), 9, 13, 11, 1},
+ {14, UPB_SIZE(64, 128), 10, 9, 11, 1},
+ {15, UPB_SIZE(68, 136), 11, 15, 11, 1},
+ {16, UPB_SIZE(2, 2), 0, 0, 8, 1},
+ {17, UPB_SIZE(72, 144), 12, 6, 11, 1},
+ {18, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {19, UPB_SIZE(76, 152), 13, 18, 11, 1},
+ {20, UPB_SIZE(3, 3), 0, 0, 8, 1},
+ {21, UPB_SIZE(92, 184), 0, 12, 11, 3},
+ {22, UPB_SIZE(96, 192), 0, 10, 11, 3},
+ {23, UPB_SIZE(80, 160), 14, 10, 11, 1},
+ {24, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {25, UPB_SIZE(100, 200), 0, 1, 11, _UPB_LABEL_MAP},
+ {26, UPB_SIZE(104, 208), 0, 0, 9, 3},
+ {27, UPB_SIZE(84, 168), 15, 8, 11, 1},
+ {28, UPB_SIZE(108, 216), 0, 5, 11, 3},
+ {29, UPB_SIZE(112, 224), UPB_SIZE(-117, -229), 0, 8, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_msginit = {
+ &envoy_config_bootstrap_v3_Bootstrap_submsgs[0],
+ &envoy_config_bootstrap_v3_Bootstrap__fields[0],
+ UPB_SIZE(120, 240), 27, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Bootstrap_StaticResources_submsgs[3] = {
+ &envoy_config_cluster_v3_Cluster_msginit,
+ &envoy_config_listener_v3_Listener_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_Secret_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Bootstrap_StaticResources__fields[3] = {
+ {1, UPB_SIZE(0, 0), 0, 1, 11, 3},
+ {2, UPB_SIZE(4, 8), 0, 0, 11, 3},
+ {3, UPB_SIZE(8, 16), 0, 2, 11, 3},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit = {
+ &envoy_config_bootstrap_v3_Bootstrap_StaticResources_submsgs[0],
+ &envoy_config_bootstrap_v3_Bootstrap_StaticResources__fields[0],
+ UPB_SIZE(16, 24), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Bootstrap_DynamicResources_submsgs[2] = {
+ &envoy_config_core_v3_ApiConfigSource_msginit,
+ &envoy_config_core_v3_ConfigSource_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Bootstrap_DynamicResources__fields[5] = {
+ {1, UPB_SIZE(20, 40), 1, 1, 11, 1},
+ {2, UPB_SIZE(24, 48), 2, 1, 11, 1},
+ {3, UPB_SIZE(28, 56), 3, 0, 11, 1},
+ {5, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {6, UPB_SIZE(12, 24), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit = {
+ &envoy_config_bootstrap_v3_Bootstrap_DynamicResources_submsgs[0],
+ &envoy_config_bootstrap_v3_Bootstrap_DynamicResources__fields[0],
+ UPB_SIZE(32, 64), 5, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_submsgs[1] = {
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_msginit = {
+ &envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_submsgs[0],
+ &envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Admin_submsgs[2] = {
+ &envoy_config_core_v3_Address_msginit,
+ &envoy_config_core_v3_SocketOption_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Admin__fields[4] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {4, UPB_SIZE(24, 48), 0, 1, 11, 3},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Admin_msginit = {
+ &envoy_config_bootstrap_v3_Admin_submsgs[0],
+ &envoy_config_bootstrap_v3_Admin__fields[0],
+ UPB_SIZE(32, 64), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_ClusterManager_submsgs[3] = {
+ &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit,
+ &envoy_config_core_v3_ApiConfigSource_msginit,
+ &envoy_config_core_v3_BindConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_ClusterManager__fields[4] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 2, 11, 1},
+ {4, UPB_SIZE(20, 40), 3, 1, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_ClusterManager_msginit = {
+ &envoy_config_bootstrap_v3_ClusterManager_submsgs[0],
+ &envoy_config_bootstrap_v3_ClusterManager__fields[0],
+ UPB_SIZE(24, 48), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_submsgs[1] = {
+ &envoy_config_core_v3_EventServiceConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_ClusterManager_OutlierDetection__fields[2] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit = {
+ &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_submsgs[0],
+ &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Watchdogs_submsgs[1] = {
+ &envoy_config_bootstrap_v3_Watchdog_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Watchdogs__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Watchdogs_msginit = {
+ &envoy_config_bootstrap_v3_Watchdogs_submsgs[0],
+ &envoy_config_bootstrap_v3_Watchdogs__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Watchdog_submsgs[3] = {
+ &envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit,
+ &envoy_type_v3_Percent_msginit,
+ &google_protobuf_Duration_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Watchdog__fields[7] = {
+ {1, UPB_SIZE(4, 8), 1, 2, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 2, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 2, 11, 1},
+ {4, UPB_SIZE(16, 32), 4, 2, 11, 1},
+ {5, UPB_SIZE(20, 40), 5, 1, 11, 1},
+ {6, UPB_SIZE(24, 48), 6, 2, 11, 1},
+ {7, UPB_SIZE(28, 56), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Watchdog_msginit = {
+ &envoy_config_bootstrap_v3_Watchdog_submsgs[0],
+ &envoy_config_bootstrap_v3_Watchdog__fields[0],
+ UPB_SIZE(32, 64), 7, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Watchdog_WatchdogAction_submsgs[1] = {
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Watchdog_WatchdogAction__fields[2] = {
+ {1, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit = {
+ &envoy_config_bootstrap_v3_Watchdog_WatchdogAction_submsgs[0],
+ &envoy_config_bootstrap_v3_Watchdog_WatchdogAction__fields[0],
+ UPB_SIZE(16, 16), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_FatalAction_submsgs[1] = {
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_FatalAction__fields[1] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_FatalAction_msginit = {
+ &envoy_config_bootstrap_v3_FatalAction_submsgs[0],
+ &envoy_config_bootstrap_v3_FatalAction__fields[0],
+ UPB_SIZE(8, 16), 1, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_Runtime_submsgs[1] = {
+ &google_protobuf_Struct_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_Runtime__fields[4] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {4, UPB_SIZE(28, 56), 1, 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_Runtime_msginit = {
+ &envoy_config_bootstrap_v3_Runtime_submsgs[0],
+ &envoy_config_bootstrap_v3_Runtime__fields[0],
+ UPB_SIZE(32, 64), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_RuntimeLayer_submsgs[4] = {
+ &envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit,
+ &envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit,
+ &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit,
+ &google_protobuf_Struct_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_RuntimeLayer__fields[5] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 3, 11, 1},
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
+ {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+ {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_msginit = {
+ &envoy_config_bootstrap_v3_RuntimeLayer_submsgs[0],
+ &envoy_config_bootstrap_v3_RuntimeLayer__fields[0],
+ UPB_SIZE(16, 32), 5, false, 255,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer__fields[3] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit = {
+ NULL,
+ &envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit = {
+ NULL,
+ NULL,
+ UPB_SIZE(0, 0), 0, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_submsgs[1] = {
+ &envoy_config_core_v3_ConfigSource_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer__fields[2] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit = {
+ &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_submsgs[0],
+ &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_bootstrap_v3_LayeredRuntime_submsgs[1] = {
+ &envoy_config_bootstrap_v3_RuntimeLayer_msginit,
+};
+
+static const upb_msglayout_field envoy_config_bootstrap_v3_LayeredRuntime__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_config_bootstrap_v3_LayeredRuntime_msginit = {
+ &envoy_config_bootstrap_v3_LayeredRuntime_submsgs[0],
+ &envoy_config_bootstrap_v3_LayeredRuntime__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h
new file mode 100644
index 00000000000..42e4c8583d9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h
@@ -0,0 +1,1348 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/bootstrap/v3/bootstrap.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_BOOTSTRAP_V3_BOOTSTRAP_PROTO_UPB_H_
+#define ENVOY_CONFIG_BOOTSTRAP_V3_BOOTSTRAP_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_config_bootstrap_v3_Bootstrap;
+struct envoy_config_bootstrap_v3_Bootstrap_StaticResources;
+struct envoy_config_bootstrap_v3_Bootstrap_DynamicResources;
+struct envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry;
+struct envoy_config_bootstrap_v3_Admin;
+struct envoy_config_bootstrap_v3_ClusterManager;
+struct envoy_config_bootstrap_v3_ClusterManager_OutlierDetection;
+struct envoy_config_bootstrap_v3_Watchdogs;
+struct envoy_config_bootstrap_v3_Watchdog;
+struct envoy_config_bootstrap_v3_Watchdog_WatchdogAction;
+struct envoy_config_bootstrap_v3_FatalAction;
+struct envoy_config_bootstrap_v3_Runtime;
+struct envoy_config_bootstrap_v3_RuntimeLayer;
+struct envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer;
+struct envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer;
+struct envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer;
+struct envoy_config_bootstrap_v3_LayeredRuntime;
+typedef struct envoy_config_bootstrap_v3_Bootstrap envoy_config_bootstrap_v3_Bootstrap;
+typedef struct envoy_config_bootstrap_v3_Bootstrap_StaticResources envoy_config_bootstrap_v3_Bootstrap_StaticResources;
+typedef struct envoy_config_bootstrap_v3_Bootstrap_DynamicResources envoy_config_bootstrap_v3_Bootstrap_DynamicResources;
+typedef struct envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry;
+typedef struct envoy_config_bootstrap_v3_Admin envoy_config_bootstrap_v3_Admin;
+typedef struct envoy_config_bootstrap_v3_ClusterManager envoy_config_bootstrap_v3_ClusterManager;
+typedef struct envoy_config_bootstrap_v3_ClusterManager_OutlierDetection envoy_config_bootstrap_v3_ClusterManager_OutlierDetection;
+typedef struct envoy_config_bootstrap_v3_Watchdogs envoy_config_bootstrap_v3_Watchdogs;
+typedef struct envoy_config_bootstrap_v3_Watchdog envoy_config_bootstrap_v3_Watchdog;
+typedef struct envoy_config_bootstrap_v3_Watchdog_WatchdogAction envoy_config_bootstrap_v3_Watchdog_WatchdogAction;
+typedef struct envoy_config_bootstrap_v3_FatalAction envoy_config_bootstrap_v3_FatalAction;
+typedef struct envoy_config_bootstrap_v3_Runtime envoy_config_bootstrap_v3_Runtime;
+typedef struct envoy_config_bootstrap_v3_RuntimeLayer envoy_config_bootstrap_v3_RuntimeLayer;
+typedef struct envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer;
+typedef struct envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer;
+typedef struct envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer;
+typedef struct envoy_config_bootstrap_v3_LayeredRuntime envoy_config_bootstrap_v3_LayeredRuntime;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Admin_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_ClusterManager_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Watchdogs_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Watchdog_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_FatalAction_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Runtime_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_LayeredRuntime_msginit;
+struct envoy_config_cluster_v3_Cluster;
+struct envoy_config_core_v3_Address;
+struct envoy_config_core_v3_ApiConfigSource;
+struct envoy_config_core_v3_BindConfig;
+struct envoy_config_core_v3_ConfigSource;
+struct envoy_config_core_v3_EventServiceConfig;
+struct envoy_config_core_v3_Node;
+struct envoy_config_core_v3_SocketOption;
+struct envoy_config_core_v3_TypedExtensionConfig;
+struct envoy_config_listener_v3_Listener;
+struct envoy_config_metrics_v3_StatsConfig;
+struct envoy_config_metrics_v3_StatsSink;
+struct envoy_config_overload_v3_OverloadManager;
+struct envoy_config_trace_v3_Tracing;
+struct envoy_extensions_transport_sockets_tls_v3_Secret;
+struct envoy_type_v3_Percent;
+struct google_protobuf_Duration;
+struct google_protobuf_Struct;
+struct google_protobuf_UInt64Value;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_msginit;
+extern const upb_msglayout envoy_config_core_v3_Address_msginit;
+extern const upb_msglayout envoy_config_core_v3_ApiConfigSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_BindConfig_msginit;
+extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_EventServiceConfig_msginit;
+extern const upb_msglayout envoy_config_core_v3_Node_msginit;
+extern const upb_msglayout envoy_config_core_v3_SocketOption_msginit;
+extern const upb_msglayout envoy_config_core_v3_TypedExtensionConfig_msginit;
+extern const upb_msglayout envoy_config_listener_v3_Listener_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsConfig_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsSink_msginit;
+extern const upb_msglayout envoy_config_overload_v3_OverloadManager_msginit;
+extern const upb_msglayout envoy_config_trace_v3_Tracing_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_Secret_msginit;
+extern const upb_msglayout envoy_type_v3_Percent_msginit;
+extern const upb_msglayout google_protobuf_Duration_msginit;
+extern const upb_msglayout google_protobuf_Struct_msginit;
+extern const upb_msglayout google_protobuf_UInt64Value_msginit;
+
+typedef enum {
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction_UNKNOWN = 0,
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction_KILL = 1,
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction_MULTIKILL = 2,
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction_MEGAMISS = 3,
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction_MISS = 4
+} envoy_config_bootstrap_v3_Watchdog_WatchdogAction_WatchdogEvent;
+
+
+/* envoy.config.bootstrap.v3.Bootstrap */
+
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap *envoy_config_bootstrap_v3_Bootstrap_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Bootstrap *)_upb_msg_new(&envoy_config_bootstrap_v3_Bootstrap_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap *envoy_config_bootstrap_v3_Bootstrap_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Bootstrap *ret = envoy_config_bootstrap_v3_Bootstrap_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Bootstrap_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap *envoy_config_bootstrap_v3_Bootstrap_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Bootstrap *ret = envoy_config_bootstrap_v3_Bootstrap_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Bootstrap_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Bootstrap_serialize(const envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Bootstrap_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_bootstrap_v3_Bootstrap_stats_flush_stats_flush_on_admin = 29,
+ envoy_config_bootstrap_v3_Bootstrap_stats_flush_NOT_SET = 0
+} envoy_config_bootstrap_v3_Bootstrap_stats_flush_oneofcases;
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_stats_flush_oneofcases envoy_config_bootstrap_v3_Bootstrap_stats_flush_case(const envoy_config_bootstrap_v3_Bootstrap* msg) { return (envoy_config_bootstrap_v3_Bootstrap_stats_flush_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(116, 228), int32_t); }
+
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_node(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Node* envoy_config_bootstrap_v3_Bootstrap_node(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_config_core_v3_Node*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_static_resources(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_bootstrap_v3_Bootstrap_StaticResources* envoy_config_bootstrap_v3_Bootstrap_static_resources(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const envoy_config_bootstrap_v3_Bootstrap_StaticResources*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_dynamic_resources(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_config_bootstrap_v3_Bootstrap_DynamicResources* envoy_config_bootstrap_v3_Bootstrap_dynamic_resources(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const envoy_config_bootstrap_v3_Bootstrap_DynamicResources*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_cluster_manager(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_config_bootstrap_v3_ClusterManager* envoy_config_bootstrap_v3_Bootstrap_cluster_manager(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const envoy_config_bootstrap_v3_ClusterManager*); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Bootstrap_flags_path(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_stats_sinks(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 176)); }
+UPB_INLINE const struct envoy_config_metrics_v3_StatsSink* const* envoy_config_bootstrap_v3_Bootstrap_stats_sinks(const envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) { return (const struct envoy_config_metrics_v3_StatsSink* const*)_upb_array_accessor(msg, UPB_SIZE(88, 176), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_stats_flush_interval(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_bootstrap_v3_Bootstrap_stats_flush_interval(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_watchdog(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const envoy_config_bootstrap_v3_Watchdog* envoy_config_bootstrap_v3_Bootstrap_watchdog(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 96), const envoy_config_bootstrap_v3_Watchdog*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_tracing(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE const struct envoy_config_trace_v3_Tracing* envoy_config_bootstrap_v3_Bootstrap_tracing(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 104), const struct envoy_config_trace_v3_Tracing*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_admin(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const envoy_config_bootstrap_v3_Admin* envoy_config_bootstrap_v3_Bootstrap_admin(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 112), const envoy_config_bootstrap_v3_Admin*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_stats_config(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE const struct envoy_config_metrics_v3_StatsConfig* envoy_config_bootstrap_v3_Bootstrap_stats_config(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 120), const struct envoy_config_metrics_v3_StatsConfig*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_hds_config(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE const struct envoy_config_core_v3_ApiConfigSource* envoy_config_bootstrap_v3_Bootstrap_hds_config(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 128), const struct envoy_config_core_v3_ApiConfigSource*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_overload_manager(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE const struct envoy_config_overload_v3_OverloadManager* envoy_config_bootstrap_v3_Bootstrap_overload_manager(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 136), const struct envoy_config_overload_v3_OverloadManager*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_enable_dispatcher_stats(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_layered_runtime(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE const envoy_config_bootstrap_v3_LayeredRuntime* envoy_config_bootstrap_v3_Bootstrap_layered_runtime(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 144), const envoy_config_bootstrap_v3_LayeredRuntime*); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Bootstrap_header_prefix(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_stats_server_version_override(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_bootstrap_v3_Bootstrap_stats_server_version_override(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 152), const struct google_protobuf_UInt64Value*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_use_tcp_for_dns_lookups(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_bootstrap_extensions(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 184)); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* const* envoy_config_bootstrap_v3_Bootstrap_bootstrap_extensions(const envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) { return (const struct envoy_config_core_v3_TypedExtensionConfig* const*)_upb_array_accessor(msg, UPB_SIZE(92, 184), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_config_sources(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 192)); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* const* envoy_config_bootstrap_v3_Bootstrap_config_sources(const envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) { return (const struct envoy_config_core_v3_ConfigSource* const*)_upb_array_accessor(msg, UPB_SIZE(96, 192), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_default_config_source(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 14); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_default_config_source(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 160), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Bootstrap_default_socket_interface(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_certificate_provider_instances(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 200)); }
+UPB_INLINE size_t envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_size(const envoy_config_bootstrap_v3_Bootstrap *msg) {return _upb_msg_map_size(msg, UPB_SIZE(100, 200)); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_get(const envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview key, struct envoy_config_core_v3_TypedExtensionConfig* *val) { return _upb_msg_map_get(msg, UPB_SIZE(100, 200), &key, 0, val, sizeof(*val)); }
+UPB_INLINE const envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry* envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_next(const envoy_config_bootstrap_v3_Bootstrap *msg, size_t* iter) { return (const envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry*)_upb_msg_map_next(msg, UPB_SIZE(100, 200), iter); }
+UPB_INLINE upb_strview const* envoy_config_bootstrap_v3_Bootstrap_node_context_params(const envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(104, 208), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_watchdogs(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_hasbit(msg, 15); }
+UPB_INLINE const envoy_config_bootstrap_v3_Watchdogs* envoy_config_bootstrap_v3_Bootstrap_watchdogs(const envoy_config_bootstrap_v3_Bootstrap *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 168), const envoy_config_bootstrap_v3_Watchdogs*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_fatal_actions(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 216)); }
+UPB_INLINE const envoy_config_bootstrap_v3_FatalAction* const* envoy_config_bootstrap_v3_Bootstrap_fatal_actions(const envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) { return (const envoy_config_bootstrap_v3_FatalAction* const*)_upb_array_accessor(msg, UPB_SIZE(108, 216), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_has_stats_flush_on_admin(const envoy_config_bootstrap_v3_Bootstrap *msg) { return _upb_getoneofcase(msg, UPB_SIZE(116, 228)) == 29; }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_stats_flush_on_admin(const envoy_config_bootstrap_v3_Bootstrap *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(112, 224), UPB_SIZE(116, 228), 29, false); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_node(envoy_config_bootstrap_v3_Bootstrap *msg, struct envoy_config_core_v3_Node* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_config_core_v3_Node*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_Node* envoy_config_bootstrap_v3_Bootstrap_mutable_node(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_Node* sub = (struct envoy_config_core_v3_Node*)envoy_config_bootstrap_v3_Bootstrap_node(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_Node*)_upb_msg_new(&envoy_config_core_v3_Node_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_node(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_static_resources(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_Bootstrap_StaticResources* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 64), envoy_config_bootstrap_v3_Bootstrap_StaticResources*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Bootstrap_StaticResources* envoy_config_bootstrap_v3_Bootstrap_mutable_static_resources(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Bootstrap_StaticResources* sub = (struct envoy_config_bootstrap_v3_Bootstrap_StaticResources*)envoy_config_bootstrap_v3_Bootstrap_static_resources(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Bootstrap_StaticResources*)_upb_msg_new(&envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_static_resources(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_dynamic_resources(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_Bootstrap_DynamicResources* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 72), envoy_config_bootstrap_v3_Bootstrap_DynamicResources*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Bootstrap_DynamicResources* envoy_config_bootstrap_v3_Bootstrap_mutable_dynamic_resources(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Bootstrap_DynamicResources* sub = (struct envoy_config_bootstrap_v3_Bootstrap_DynamicResources*)envoy_config_bootstrap_v3_Bootstrap_dynamic_resources(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Bootstrap_DynamicResources*)_upb_msg_new(&envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_dynamic_resources(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_cluster_manager(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_ClusterManager* value) {
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 80), envoy_config_bootstrap_v3_ClusterManager*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_ClusterManager* envoy_config_bootstrap_v3_Bootstrap_mutable_cluster_manager(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_ClusterManager* sub = (struct envoy_config_bootstrap_v3_ClusterManager*)envoy_config_bootstrap_v3_Bootstrap_cluster_manager(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_ClusterManager*)_upb_msg_new(&envoy_config_bootstrap_v3_ClusterManager_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_cluster_manager(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_flags_path(envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE struct envoy_config_metrics_v3_StatsSink** envoy_config_bootstrap_v3_Bootstrap_mutable_stats_sinks(envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) {
+ return (struct envoy_config_metrics_v3_StatsSink**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 176), len);
+}
+UPB_INLINE struct envoy_config_metrics_v3_StatsSink** envoy_config_bootstrap_v3_Bootstrap_resize_stats_sinks(envoy_config_bootstrap_v3_Bootstrap *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_metrics_v3_StatsSink**)_upb_array_resize_accessor2(msg, UPB_SIZE(88, 176), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_metrics_v3_StatsSink* envoy_config_bootstrap_v3_Bootstrap_add_stats_sinks(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_metrics_v3_StatsSink* sub = (struct envoy_config_metrics_v3_StatsSink*)_upb_msg_new(&envoy_config_metrics_v3_StatsSink_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(88, 176), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_stats_flush_interval(envoy_config_bootstrap_v3_Bootstrap *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 88), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_bootstrap_v3_Bootstrap_mutable_stats_flush_interval(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_bootstrap_v3_Bootstrap_stats_flush_interval(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_stats_flush_interval(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_watchdog(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_Watchdog* value) {
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(48, 96), envoy_config_bootstrap_v3_Watchdog*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Watchdog* envoy_config_bootstrap_v3_Bootstrap_mutable_watchdog(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Watchdog* sub = (struct envoy_config_bootstrap_v3_Watchdog*)envoy_config_bootstrap_v3_Bootstrap_watchdog(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Watchdog*)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdog_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_watchdog(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_tracing(envoy_config_bootstrap_v3_Bootstrap *msg, struct envoy_config_trace_v3_Tracing* value) {
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 104), struct envoy_config_trace_v3_Tracing*) = value;
+}
+UPB_INLINE struct envoy_config_trace_v3_Tracing* envoy_config_bootstrap_v3_Bootstrap_mutable_tracing(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_trace_v3_Tracing* sub = (struct envoy_config_trace_v3_Tracing*)envoy_config_bootstrap_v3_Bootstrap_tracing(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_trace_v3_Tracing*)_upb_msg_new(&envoy_config_trace_v3_Tracing_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_tracing(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_admin(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_Admin* value) {
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(56, 112), envoy_config_bootstrap_v3_Admin*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Admin* envoy_config_bootstrap_v3_Bootstrap_mutable_admin(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Admin* sub = (struct envoy_config_bootstrap_v3_Admin*)envoy_config_bootstrap_v3_Bootstrap_admin(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Admin*)_upb_msg_new(&envoy_config_bootstrap_v3_Admin_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_admin(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_stats_config(envoy_config_bootstrap_v3_Bootstrap *msg, struct envoy_config_metrics_v3_StatsConfig* value) {
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 120), struct envoy_config_metrics_v3_StatsConfig*) = value;
+}
+UPB_INLINE struct envoy_config_metrics_v3_StatsConfig* envoy_config_bootstrap_v3_Bootstrap_mutable_stats_config(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_metrics_v3_StatsConfig* sub = (struct envoy_config_metrics_v3_StatsConfig*)envoy_config_bootstrap_v3_Bootstrap_stats_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_metrics_v3_StatsConfig*)_upb_msg_new(&envoy_config_metrics_v3_StatsConfig_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_stats_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_hds_config(envoy_config_bootstrap_v3_Bootstrap *msg, struct envoy_config_core_v3_ApiConfigSource* value) {
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(64, 128), struct envoy_config_core_v3_ApiConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ApiConfigSource* envoy_config_bootstrap_v3_Bootstrap_mutable_hds_config(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ApiConfigSource* sub = (struct envoy_config_core_v3_ApiConfigSource*)envoy_config_bootstrap_v3_Bootstrap_hds_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ApiConfigSource*)_upb_msg_new(&envoy_config_core_v3_ApiConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_hds_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_overload_manager(envoy_config_bootstrap_v3_Bootstrap *msg, struct envoy_config_overload_v3_OverloadManager* value) {
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 136), struct envoy_config_overload_v3_OverloadManager*) = value;
+}
+UPB_INLINE struct envoy_config_overload_v3_OverloadManager* envoy_config_bootstrap_v3_Bootstrap_mutable_overload_manager(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_OverloadManager* sub = (struct envoy_config_overload_v3_OverloadManager*)envoy_config_bootstrap_v3_Bootstrap_overload_manager(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_overload_v3_OverloadManager*)_upb_msg_new(&envoy_config_overload_v3_OverloadManager_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_overload_manager(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_enable_dispatcher_stats(envoy_config_bootstrap_v3_Bootstrap *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_layered_runtime(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_LayeredRuntime* value) {
+ _upb_sethas(msg, 12);
+ *UPB_PTR_AT(msg, UPB_SIZE(72, 144), envoy_config_bootstrap_v3_LayeredRuntime*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_LayeredRuntime* envoy_config_bootstrap_v3_Bootstrap_mutable_layered_runtime(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_LayeredRuntime* sub = (struct envoy_config_bootstrap_v3_LayeredRuntime*)envoy_config_bootstrap_v3_Bootstrap_layered_runtime(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_LayeredRuntime*)_upb_msg_new(&envoy_config_bootstrap_v3_LayeredRuntime_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_layered_runtime(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_header_prefix(envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_stats_server_version_override(envoy_config_bootstrap_v3_Bootstrap *msg, struct google_protobuf_UInt64Value* value) {
+ _upb_sethas(msg, 13);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 152), struct google_protobuf_UInt64Value*) = value;
+}
+UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_bootstrap_v3_Bootstrap_mutable_stats_server_version_override(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_config_bootstrap_v3_Bootstrap_stats_server_version_override(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_UInt64Value*)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_stats_server_version_override(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_use_tcp_for_dns_lookups(envoy_config_bootstrap_v3_Bootstrap *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig** envoy_config_bootstrap_v3_Bootstrap_mutable_bootstrap_extensions(envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) {
+ return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(92, 184), len);
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig** envoy_config_bootstrap_v3_Bootstrap_resize_bootstrap_extensions(envoy_config_bootstrap_v3_Bootstrap *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(92, 184), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_bootstrap_v3_Bootstrap_add_bootstrap_extensions(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(92, 184), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource** envoy_config_bootstrap_v3_Bootstrap_mutable_config_sources(envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) {
+ return (struct envoy_config_core_v3_ConfigSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(96, 192), len);
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource** envoy_config_bootstrap_v3_Bootstrap_resize_config_sources(envoy_config_bootstrap_v3_Bootstrap *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_core_v3_ConfigSource**)_upb_array_resize_accessor2(msg, UPB_SIZE(96, 192), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_add_config_sources(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(96, 192), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_default_config_source(envoy_config_bootstrap_v3_Bootstrap *msg, struct envoy_config_core_v3_ConfigSource* value) {
+ _upb_sethas(msg, 14);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 160), struct envoy_config_core_v3_ConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_mutable_default_config_source(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_bootstrap_v3_Bootstrap_default_config_source(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ConfigSource*)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_default_config_source(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_default_socket_interface(envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_clear(envoy_config_bootstrap_v3_Bootstrap *msg) { _upb_msg_map_clear(msg, UPB_SIZE(100, 200)); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_set(envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview key, struct envoy_config_core_v3_TypedExtensionConfig* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(100, 200), &key, 0, &val, sizeof(val), a); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_delete(envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(100, 200), &key, 0); }
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry* envoy_config_bootstrap_v3_Bootstrap_certificate_provider_instances_nextmutable(envoy_config_bootstrap_v3_Bootstrap *msg, size_t* iter) { return (envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry*)_upb_msg_map_next(msg, UPB_SIZE(100, 200), iter); }
+UPB_INLINE upb_strview* envoy_config_bootstrap_v3_Bootstrap_mutable_node_context_params(envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) {
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(104, 208), len);
+}
+UPB_INLINE upb_strview* envoy_config_bootstrap_v3_Bootstrap_resize_node_context_params(envoy_config_bootstrap_v3_Bootstrap *msg, size_t len, upb_arena *arena) {
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(104, 208), len, UPB_SIZE(3, 4), arena);
+}
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_add_node_context_params(envoy_config_bootstrap_v3_Bootstrap *msg, upb_strview val, upb_arena *arena) {
+ return _upb_array_append_accessor2(msg, UPB_SIZE(104, 208), UPB_SIZE(3, 4), &val,
+ arena);
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_watchdogs(envoy_config_bootstrap_v3_Bootstrap *msg, envoy_config_bootstrap_v3_Watchdogs* value) {
+ _upb_sethas(msg, 15);
+ *UPB_PTR_AT(msg, UPB_SIZE(84, 168), envoy_config_bootstrap_v3_Watchdogs*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Watchdogs* envoy_config_bootstrap_v3_Bootstrap_mutable_watchdogs(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Watchdogs* sub = (struct envoy_config_bootstrap_v3_Watchdogs*)envoy_config_bootstrap_v3_Bootstrap_watchdogs(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Watchdogs*)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdogs_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_set_watchdogs(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE envoy_config_bootstrap_v3_FatalAction** envoy_config_bootstrap_v3_Bootstrap_mutable_fatal_actions(envoy_config_bootstrap_v3_Bootstrap *msg, size_t *len) {
+ return (envoy_config_bootstrap_v3_FatalAction**)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 216), len);
+}
+UPB_INLINE envoy_config_bootstrap_v3_FatalAction** envoy_config_bootstrap_v3_Bootstrap_resize_fatal_actions(envoy_config_bootstrap_v3_Bootstrap *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_FatalAction**)_upb_array_resize_accessor2(msg, UPB_SIZE(108, 216), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_FatalAction* envoy_config_bootstrap_v3_Bootstrap_add_fatal_actions(envoy_config_bootstrap_v3_Bootstrap *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_FatalAction* sub = (struct envoy_config_bootstrap_v3_FatalAction*)_upb_msg_new(&envoy_config_bootstrap_v3_FatalAction_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(108, 216), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_set_stats_flush_on_admin(envoy_config_bootstrap_v3_Bootstrap *msg, bool value) {
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(112, 224), value, UPB_SIZE(116, 228), 29);
+}
+
+/* envoy.config.bootstrap.v3.Bootstrap.StaticResources */
+
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_StaticResources *envoy_config_bootstrap_v3_Bootstrap_StaticResources_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Bootstrap_StaticResources *)_upb_msg_new(&envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_StaticResources *envoy_config_bootstrap_v3_Bootstrap_StaticResources_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Bootstrap_StaticResources *ret = envoy_config_bootstrap_v3_Bootstrap_StaticResources_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_StaticResources *envoy_config_bootstrap_v3_Bootstrap_StaticResources_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Bootstrap_StaticResources *ret = envoy_config_bootstrap_v3_Bootstrap_StaticResources_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Bootstrap_StaticResources_serialize(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_StaticResources_has_listeners(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const struct envoy_config_listener_v3_Listener* const* envoy_config_bootstrap_v3_Bootstrap_StaticResources_listeners(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t *len) { return (const struct envoy_config_listener_v3_Listener* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_StaticResources_has_clusters(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE const struct envoy_config_cluster_v3_Cluster* const* envoy_config_bootstrap_v3_Bootstrap_StaticResources_clusters(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t *len) { return (const struct envoy_config_cluster_v3_Cluster* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_StaticResources_has_secrets(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_Secret* const* envoy_config_bootstrap_v3_Bootstrap_StaticResources_secrets(const envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t *len) { return (const struct envoy_extensions_transport_sockets_tls_v3_Secret* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+
+UPB_INLINE struct envoy_config_listener_v3_Listener** envoy_config_bootstrap_v3_Bootstrap_StaticResources_mutable_listeners(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t *len) {
+ return (struct envoy_config_listener_v3_Listener**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE struct envoy_config_listener_v3_Listener** envoy_config_bootstrap_v3_Bootstrap_StaticResources_resize_listeners(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_listener_v3_Listener**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_listener_v3_Listener* envoy_config_bootstrap_v3_Bootstrap_StaticResources_add_listeners(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, upb_arena *arena) {
+ struct envoy_config_listener_v3_Listener* sub = (struct envoy_config_listener_v3_Listener*)_upb_msg_new(&envoy_config_listener_v3_Listener_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE struct envoy_config_cluster_v3_Cluster** envoy_config_bootstrap_v3_Bootstrap_StaticResources_mutable_clusters(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t *len) {
+ return (struct envoy_config_cluster_v3_Cluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+}
+UPB_INLINE struct envoy_config_cluster_v3_Cluster** envoy_config_bootstrap_v3_Bootstrap_StaticResources_resize_clusters(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_cluster_v3_Cluster**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_cluster_v3_Cluster* envoy_config_bootstrap_v3_Bootstrap_StaticResources_add_clusters(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, upb_arena *arena) {
+ struct envoy_config_cluster_v3_Cluster* sub = (struct envoy_config_cluster_v3_Cluster*)_upb_msg_new(&envoy_config_cluster_v3_Cluster_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_Secret** envoy_config_bootstrap_v3_Bootstrap_StaticResources_mutable_secrets(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t *len) {
+ return (struct envoy_extensions_transport_sockets_tls_v3_Secret**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_Secret** envoy_config_bootstrap_v3_Bootstrap_StaticResources_resize_secrets(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_extensions_transport_sockets_tls_v3_Secret**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_Secret* envoy_config_bootstrap_v3_Bootstrap_StaticResources_add_secrets(envoy_config_bootstrap_v3_Bootstrap_StaticResources *msg, upb_arena *arena) {
+ struct envoy_extensions_transport_sockets_tls_v3_Secret* sub = (struct envoy_extensions_transport_sockets_tls_v3_Secret*)_upb_msg_new(&envoy_extensions_transport_sockets_tls_v3_Secret_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;
+}
+
+/* envoy.config.bootstrap.v3.Bootstrap.DynamicResources */
+
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_DynamicResources *envoy_config_bootstrap_v3_Bootstrap_DynamicResources_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Bootstrap_DynamicResources *)_upb_msg_new(&envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_DynamicResources *envoy_config_bootstrap_v3_Bootstrap_DynamicResources_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Bootstrap_DynamicResources *ret = envoy_config_bootstrap_v3_Bootstrap_DynamicResources_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Bootstrap_DynamicResources *envoy_config_bootstrap_v3_Bootstrap_DynamicResources_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Bootstrap_DynamicResources *ret = envoy_config_bootstrap_v3_Bootstrap_DynamicResources_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Bootstrap_DynamicResources_serialize(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_DynamicResources_has_lds_config(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_DynamicResources_lds_config(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_DynamicResources_has_cds_config(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_DynamicResources_cds_config(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_DynamicResources_has_ads_config(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_ApiConfigSource* envoy_config_bootstrap_v3_Bootstrap_DynamicResources_ads_config(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_config_core_v3_ApiConfigSource*); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Bootstrap_DynamicResources_lds_resources_locator(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Bootstrap_DynamicResources_cds_resources_locator(const envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_lds_config(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, struct envoy_config_core_v3_ConfigSource* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_core_v3_ConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_DynamicResources_mutable_lds_config(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_bootstrap_v3_Bootstrap_DynamicResources_lds_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ConfigSource*)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_lds_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_cds_config(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, struct envoy_config_core_v3_ConfigSource* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_config_core_v3_ConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_Bootstrap_DynamicResources_mutable_cds_config(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_bootstrap_v3_Bootstrap_DynamicResources_cds_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ConfigSource*)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_cds_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_ads_config(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, struct envoy_config_core_v3_ApiConfigSource* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_config_core_v3_ApiConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ApiConfigSource* envoy_config_bootstrap_v3_Bootstrap_DynamicResources_mutable_ads_config(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ApiConfigSource* sub = (struct envoy_config_core_v3_ApiConfigSource*)envoy_config_bootstrap_v3_Bootstrap_DynamicResources_ads_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ApiConfigSource*)_upb_msg_new(&envoy_config_core_v3_ApiConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_ads_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_lds_resources_locator(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_DynamicResources_set_cds_resources_locator(envoy_config_bootstrap_v3_Bootstrap_DynamicResources *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+
+/* envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry */
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_key(const envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry *msg) {
+ upb_strview ret;
+ _upb_msg_map_key(msg, &ret, 0);
+ return ret;
+}
+UPB_INLINE bool envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_has_value(const envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_value(const envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry *msg) {
+ struct envoy_config_core_v3_TypedExtensionConfig* ret;
+ _upb_msg_map_value(msg, &ret, sizeof(ret));
+ return ret;
+}
+
+UPB_INLINE void envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_set_value(envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
+ _upb_msg_map_set_value(msg, &value, sizeof(struct envoy_config_core_v3_TypedExtensionConfig*));
+}
+
+/* envoy.config.bootstrap.v3.Admin */
+
+UPB_INLINE envoy_config_bootstrap_v3_Admin *envoy_config_bootstrap_v3_Admin_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Admin *)_upb_msg_new(&envoy_config_bootstrap_v3_Admin_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Admin *envoy_config_bootstrap_v3_Admin_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Admin *ret = envoy_config_bootstrap_v3_Admin_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Admin_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Admin *envoy_config_bootstrap_v3_Admin_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Admin *ret = envoy_config_bootstrap_v3_Admin_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Admin_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Admin_serialize(const envoy_config_bootstrap_v3_Admin *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Admin_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Admin_access_log_path(const envoy_config_bootstrap_v3_Admin *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Admin_profile_path(const envoy_config_bootstrap_v3_Admin *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Admin_has_address(const envoy_config_bootstrap_v3_Admin *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_bootstrap_v3_Admin_address(const envoy_config_bootstrap_v3_Admin *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_core_v3_Address*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Admin_has_socket_options(const envoy_config_bootstrap_v3_Admin *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE const struct envoy_config_core_v3_SocketOption* const* envoy_config_bootstrap_v3_Admin_socket_options(const envoy_config_bootstrap_v3_Admin *msg, size_t *len) { return (const struct envoy_config_core_v3_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Admin_set_access_log_path(envoy_config_bootstrap_v3_Admin *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Admin_set_profile_path(envoy_config_bootstrap_v3_Admin *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Admin_set_address(envoy_config_bootstrap_v3_Admin *msg, struct envoy_config_core_v3_Address* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_core_v3_Address*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_bootstrap_v3_Admin_mutable_address(envoy_config_bootstrap_v3_Admin *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_bootstrap_v3_Admin_address(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_Address*)_upb_msg_new(&envoy_config_core_v3_Address_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Admin_set_address(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_bootstrap_v3_Admin_mutable_socket_options(envoy_config_bootstrap_v3_Admin *msg, size_t *len) {
+ return (struct envoy_config_core_v3_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+}
+UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_bootstrap_v3_Admin_resize_socket_options(envoy_config_bootstrap_v3_Admin *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_core_v3_SocketOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_core_v3_SocketOption* envoy_config_bootstrap_v3_Admin_add_socket_options(envoy_config_bootstrap_v3_Admin *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_SocketOption* sub = (struct envoy_config_core_v3_SocketOption*)_upb_msg_new(&envoy_config_core_v3_SocketOption_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.ClusterManager */
+
+UPB_INLINE envoy_config_bootstrap_v3_ClusterManager *envoy_config_bootstrap_v3_ClusterManager_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_ClusterManager *)_upb_msg_new(&envoy_config_bootstrap_v3_ClusterManager_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_ClusterManager *envoy_config_bootstrap_v3_ClusterManager_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_ClusterManager *ret = envoy_config_bootstrap_v3_ClusterManager_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_ClusterManager_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_ClusterManager *envoy_config_bootstrap_v3_ClusterManager_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_ClusterManager *ret = envoy_config_bootstrap_v3_ClusterManager_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_ClusterManager_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_ClusterManager_serialize(const envoy_config_bootstrap_v3_ClusterManager *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_ClusterManager_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_ClusterManager_local_cluster_name(const envoy_config_bootstrap_v3_ClusterManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_ClusterManager_has_outlier_detection(const envoy_config_bootstrap_v3_ClusterManager *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection* envoy_config_bootstrap_v3_ClusterManager_outlier_detection(const envoy_config_bootstrap_v3_ClusterManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_ClusterManager_has_upstream_bind_config(const envoy_config_bootstrap_v3_ClusterManager *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_BindConfig* envoy_config_bootstrap_v3_ClusterManager_upstream_bind_config(const envoy_config_bootstrap_v3_ClusterManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_BindConfig*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_ClusterManager_has_load_stats_config(const envoy_config_bootstrap_v3_ClusterManager *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_ApiConfigSource* envoy_config_bootstrap_v3_ClusterManager_load_stats_config(const envoy_config_bootstrap_v3_ClusterManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_core_v3_ApiConfigSource*); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_ClusterManager_set_local_cluster_name(envoy_config_bootstrap_v3_ClusterManager *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_ClusterManager_set_outlier_detection(envoy_config_bootstrap_v3_ClusterManager *msg, envoy_config_bootstrap_v3_ClusterManager_OutlierDetection* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_bootstrap_v3_ClusterManager_OutlierDetection*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_ClusterManager_OutlierDetection* envoy_config_bootstrap_v3_ClusterManager_mutable_outlier_detection(envoy_config_bootstrap_v3_ClusterManager *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_ClusterManager_OutlierDetection* sub = (struct envoy_config_bootstrap_v3_ClusterManager_OutlierDetection*)envoy_config_bootstrap_v3_ClusterManager_outlier_detection(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_ClusterManager_OutlierDetection*)_upb_msg_new(&envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_ClusterManager_set_outlier_detection(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_ClusterManager_set_upstream_bind_config(envoy_config_bootstrap_v3_ClusterManager *msg, struct envoy_config_core_v3_BindConfig* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_BindConfig*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_BindConfig* envoy_config_bootstrap_v3_ClusterManager_mutable_upstream_bind_config(envoy_config_bootstrap_v3_ClusterManager *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_BindConfig* sub = (struct envoy_config_core_v3_BindConfig*)envoy_config_bootstrap_v3_ClusterManager_upstream_bind_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_BindConfig*)_upb_msg_new(&envoy_config_core_v3_BindConfig_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_ClusterManager_set_upstream_bind_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_ClusterManager_set_load_stats_config(envoy_config_bootstrap_v3_ClusterManager *msg, struct envoy_config_core_v3_ApiConfigSource* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_core_v3_ApiConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ApiConfigSource* envoy_config_bootstrap_v3_ClusterManager_mutable_load_stats_config(envoy_config_bootstrap_v3_ClusterManager *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ApiConfigSource* sub = (struct envoy_config_core_v3_ApiConfigSource*)envoy_config_bootstrap_v3_ClusterManager_load_stats_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ApiConfigSource*)_upb_msg_new(&envoy_config_core_v3_ApiConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_ClusterManager_set_load_stats_config(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.ClusterManager.OutlierDetection */
+
+UPB_INLINE envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *)_upb_msg_new(&envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *ret = envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *ret = envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_serialize(const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_event_log_path(const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_has_event_service(const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_EventServiceConfig* envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_event_service(const envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_EventServiceConfig*); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_set_event_log_path(envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_set_event_service(envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg, struct envoy_config_core_v3_EventServiceConfig* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_EventServiceConfig*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_EventServiceConfig* envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_mutable_event_service(envoy_config_bootstrap_v3_ClusterManager_OutlierDetection *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_EventServiceConfig* sub = (struct envoy_config_core_v3_EventServiceConfig*)envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_event_service(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_EventServiceConfig*)_upb_msg_new(&envoy_config_core_v3_EventServiceConfig_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_set_event_service(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.Watchdogs */
+
+UPB_INLINE envoy_config_bootstrap_v3_Watchdogs *envoy_config_bootstrap_v3_Watchdogs_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Watchdogs *)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdogs_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdogs *envoy_config_bootstrap_v3_Watchdogs_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Watchdogs *ret = envoy_config_bootstrap_v3_Watchdogs_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Watchdogs_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdogs *envoy_config_bootstrap_v3_Watchdogs_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Watchdogs *ret = envoy_config_bootstrap_v3_Watchdogs_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Watchdogs_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Watchdogs_serialize(const envoy_config_bootstrap_v3_Watchdogs *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Watchdogs_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdogs_has_main_thread_watchdog(const envoy_config_bootstrap_v3_Watchdogs *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_bootstrap_v3_Watchdog* envoy_config_bootstrap_v3_Watchdogs_main_thread_watchdog(const envoy_config_bootstrap_v3_Watchdogs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_bootstrap_v3_Watchdog*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdogs_has_worker_watchdog(const envoy_config_bootstrap_v3_Watchdogs *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_bootstrap_v3_Watchdog* envoy_config_bootstrap_v3_Watchdogs_worker_watchdog(const envoy_config_bootstrap_v3_Watchdogs *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_bootstrap_v3_Watchdog*); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdogs_set_main_thread_watchdog(envoy_config_bootstrap_v3_Watchdogs *msg, envoy_config_bootstrap_v3_Watchdog* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_bootstrap_v3_Watchdog*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Watchdog* envoy_config_bootstrap_v3_Watchdogs_mutable_main_thread_watchdog(envoy_config_bootstrap_v3_Watchdogs *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Watchdog* sub = (struct envoy_config_bootstrap_v3_Watchdog*)envoy_config_bootstrap_v3_Watchdogs_main_thread_watchdog(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Watchdog*)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdog_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdogs_set_main_thread_watchdog(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdogs_set_worker_watchdog(envoy_config_bootstrap_v3_Watchdogs *msg, envoy_config_bootstrap_v3_Watchdog* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_bootstrap_v3_Watchdog*) = value;
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Watchdog* envoy_config_bootstrap_v3_Watchdogs_mutable_worker_watchdog(envoy_config_bootstrap_v3_Watchdogs *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Watchdog* sub = (struct envoy_config_bootstrap_v3_Watchdog*)envoy_config_bootstrap_v3_Watchdogs_worker_watchdog(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_Watchdog*)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdog_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdogs_set_worker_watchdog(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.Watchdog */
+
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog *envoy_config_bootstrap_v3_Watchdog_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Watchdog *)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdog_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog *envoy_config_bootstrap_v3_Watchdog_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Watchdog *ret = envoy_config_bootstrap_v3_Watchdog_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Watchdog_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog *envoy_config_bootstrap_v3_Watchdog_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Watchdog *ret = envoy_config_bootstrap_v3_Watchdog_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Watchdog_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Watchdog_serialize(const envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Watchdog_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_miss_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_miss_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_megamiss_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_megamiss_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_kill_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_kill_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_multikill_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_multikill_timeout(const envoy_config_bootstrap_v3_Watchdog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_multikill_threshold(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_bootstrap_v3_Watchdog_multikill_threshold(const envoy_config_bootstrap_v3_Watchdog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_type_v3_Percent*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_max_kill_timeout_jitter(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_max_kill_timeout_jitter(const envoy_config_bootstrap_v3_Watchdog *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_has_actions(const envoy_config_bootstrap_v3_Watchdog *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE const envoy_config_bootstrap_v3_Watchdog_WatchdogAction* const* envoy_config_bootstrap_v3_Watchdog_actions(const envoy_config_bootstrap_v3_Watchdog *msg, size_t *len) { return (const envoy_config_bootstrap_v3_Watchdog_WatchdogAction* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_set_miss_timeout(envoy_config_bootstrap_v3_Watchdog *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_mutable_miss_timeout(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_bootstrap_v3_Watchdog_miss_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_set_miss_timeout(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_set_megamiss_timeout(envoy_config_bootstrap_v3_Watchdog *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_mutable_megamiss_timeout(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_bootstrap_v3_Watchdog_megamiss_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_set_megamiss_timeout(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_set_kill_timeout(envoy_config_bootstrap_v3_Watchdog *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_mutable_kill_timeout(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_bootstrap_v3_Watchdog_kill_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_set_kill_timeout(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_set_multikill_timeout(envoy_config_bootstrap_v3_Watchdog *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_mutable_multikill_timeout(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_bootstrap_v3_Watchdog_multikill_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_set_multikill_timeout(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_set_multikill_threshold(envoy_config_bootstrap_v3_Watchdog *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_type_v3_Percent*) = value;
+}
+UPB_INLINE struct envoy_type_v3_Percent* envoy_config_bootstrap_v3_Watchdog_mutable_multikill_threshold(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct envoy_type_v3_Percent* sub = (struct envoy_type_v3_Percent*)envoy_config_bootstrap_v3_Watchdog_multikill_threshold(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_v3_Percent*)_upb_msg_new(&envoy_type_v3_Percent_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_set_multikill_threshold(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_set_max_kill_timeout_jitter(envoy_config_bootstrap_v3_Watchdog *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_bootstrap_v3_Watchdog_mutable_max_kill_timeout_jitter(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_bootstrap_v3_Watchdog_max_kill_timeout_jitter(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_set_max_kill_timeout_jitter(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog_WatchdogAction** envoy_config_bootstrap_v3_Watchdog_mutable_actions(envoy_config_bootstrap_v3_Watchdog *msg, size_t *len) {
+ return (envoy_config_bootstrap_v3_Watchdog_WatchdogAction**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog_WatchdogAction** envoy_config_bootstrap_v3_Watchdog_resize_actions(envoy_config_bootstrap_v3_Watchdog *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Watchdog_WatchdogAction**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_Watchdog_WatchdogAction* envoy_config_bootstrap_v3_Watchdog_add_actions(envoy_config_bootstrap_v3_Watchdog *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_Watchdog_WatchdogAction* sub = (struct envoy_config_bootstrap_v3_Watchdog_WatchdogAction*)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.Watchdog.WatchdogAction */
+
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog_WatchdogAction *envoy_config_bootstrap_v3_Watchdog_WatchdogAction_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Watchdog_WatchdogAction *)_upb_msg_new(&envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog_WatchdogAction *envoy_config_bootstrap_v3_Watchdog_WatchdogAction_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction *ret = envoy_config_bootstrap_v3_Watchdog_WatchdogAction_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Watchdog_WatchdogAction *envoy_config_bootstrap_v3_Watchdog_WatchdogAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction *ret = envoy_config_bootstrap_v3_Watchdog_WatchdogAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Watchdog_WatchdogAction_serialize(const envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_Watchdog_WatchdogAction_has_config(const envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_bootstrap_v3_Watchdog_WatchdogAction_config(const envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_config_core_v3_TypedExtensionConfig*); }
+UPB_INLINE int32_t envoy_config_bootstrap_v3_Watchdog_WatchdogAction_event(const envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_WatchdogAction_set_config(envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_bootstrap_v3_Watchdog_WatchdogAction_mutable_config(envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_config_bootstrap_v3_Watchdog_WatchdogAction_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Watchdog_WatchdogAction_set_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Watchdog_WatchdogAction_set_event(envoy_config_bootstrap_v3_Watchdog_WatchdogAction *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.config.bootstrap.v3.FatalAction */
+
+UPB_INLINE envoy_config_bootstrap_v3_FatalAction *envoy_config_bootstrap_v3_FatalAction_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_FatalAction *)_upb_msg_new(&envoy_config_bootstrap_v3_FatalAction_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_FatalAction *envoy_config_bootstrap_v3_FatalAction_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_FatalAction *ret = envoy_config_bootstrap_v3_FatalAction_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_FatalAction_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_FatalAction *envoy_config_bootstrap_v3_FatalAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_FatalAction *ret = envoy_config_bootstrap_v3_FatalAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_FatalAction_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_FatalAction_serialize(const envoy_config_bootstrap_v3_FatalAction *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_FatalAction_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_FatalAction_has_config(const envoy_config_bootstrap_v3_FatalAction *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_bootstrap_v3_FatalAction_config(const envoy_config_bootstrap_v3_FatalAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_TypedExtensionConfig*); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_FatalAction_set_config(envoy_config_bootstrap_v3_FatalAction *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_bootstrap_v3_FatalAction_mutable_config(envoy_config_bootstrap_v3_FatalAction *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_config_bootstrap_v3_FatalAction_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_FatalAction_set_config(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.Runtime */
+
+UPB_INLINE envoy_config_bootstrap_v3_Runtime *envoy_config_bootstrap_v3_Runtime_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_Runtime *)_upb_msg_new(&envoy_config_bootstrap_v3_Runtime_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_Runtime *envoy_config_bootstrap_v3_Runtime_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_Runtime *ret = envoy_config_bootstrap_v3_Runtime_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Runtime_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_Runtime *envoy_config_bootstrap_v3_Runtime_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_Runtime *ret = envoy_config_bootstrap_v3_Runtime_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_Runtime_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_Runtime_serialize(const envoy_config_bootstrap_v3_Runtime *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_Runtime_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Runtime_symlink_root(const envoy_config_bootstrap_v3_Runtime *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Runtime_subdirectory(const envoy_config_bootstrap_v3_Runtime *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_Runtime_override_subdirectory(const envoy_config_bootstrap_v3_Runtime *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_Runtime_has_base(const envoy_config_bootstrap_v3_Runtime *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_bootstrap_v3_Runtime_base(const envoy_config_bootstrap_v3_Runtime *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_Struct*); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_Runtime_set_symlink_root(envoy_config_bootstrap_v3_Runtime *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Runtime_set_subdirectory(envoy_config_bootstrap_v3_Runtime *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Runtime_set_override_subdirectory(envoy_config_bootstrap_v3_Runtime *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_Runtime_set_base(envoy_config_bootstrap_v3_Runtime *msg, struct google_protobuf_Struct* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_Struct*) = value;
+}
+UPB_INLINE struct google_protobuf_Struct* envoy_config_bootstrap_v3_Runtime_mutable_base(envoy_config_bootstrap_v3_Runtime *msg, upb_arena *arena) {
+ struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_bootstrap_v3_Runtime_base(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_Runtime_set_base(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.RuntimeLayer */
+
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer *envoy_config_bootstrap_v3_RuntimeLayer_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_RuntimeLayer *)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer *envoy_config_bootstrap_v3_RuntimeLayer_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_RuntimeLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer *envoy_config_bootstrap_v3_RuntimeLayer_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_RuntimeLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_RuntimeLayer_serialize(const envoy_config_bootstrap_v3_RuntimeLayer *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_RuntimeLayer_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_static_layer = 2,
+ envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_disk_layer = 3,
+ envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_admin_layer = 4,
+ envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_rtds_layer = 5,
+ envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_NOT_SET = 0
+} envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_oneofcases;
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_oneofcases envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_case(const envoy_config_bootstrap_v3_RuntimeLayer* msg) { return (envoy_config_bootstrap_v3_RuntimeLayer_layer_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_RuntimeLayer_name(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_RuntimeLayer_has_static_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_bootstrap_v3_RuntimeLayer_static_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
+UPB_INLINE bool envoy_config_bootstrap_v3_RuntimeLayer_has_disk_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
+UPB_INLINE const envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer* envoy_config_bootstrap_v3_RuntimeLayer_disk_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return UPB_READ_ONEOF(msg, const envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
+UPB_INLINE bool envoy_config_bootstrap_v3_RuntimeLayer_has_admin_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; }
+UPB_INLINE const envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer* envoy_config_bootstrap_v3_RuntimeLayer_admin_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return UPB_READ_ONEOF(msg, const envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
+UPB_INLINE bool envoy_config_bootstrap_v3_RuntimeLayer_has_rtds_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; }
+UPB_INLINE const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer* envoy_config_bootstrap_v3_RuntimeLayer_rtds_layer(const envoy_config_bootstrap_v3_RuntimeLayer *msg) { return UPB_READ_ONEOF(msg, const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_set_name(envoy_config_bootstrap_v3_RuntimeLayer *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_set_static_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, struct google_protobuf_Struct* value) {
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
+}
+UPB_INLINE struct google_protobuf_Struct* envoy_config_bootstrap_v3_RuntimeLayer_mutable_static_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, upb_arena *arena) {
+ struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_bootstrap_v3_RuntimeLayer_static_layer(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_RuntimeLayer_set_static_layer(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_set_disk_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer* value) {
+ UPB_WRITE_ONEOF(msg, envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer* envoy_config_bootstrap_v3_RuntimeLayer_mutable_disk_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer* sub = (struct envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer*)envoy_config_bootstrap_v3_RuntimeLayer_disk_layer(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer*)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_RuntimeLayer_set_disk_layer(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_set_admin_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer* value) {
+ UPB_WRITE_ONEOF(msg, envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4);
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer* envoy_config_bootstrap_v3_RuntimeLayer_mutable_admin_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer* sub = (struct envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer*)envoy_config_bootstrap_v3_RuntimeLayer_admin_layer(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer*)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_RuntimeLayer_set_admin_layer(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_set_rtds_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer* value) {
+ UPB_WRITE_ONEOF(msg, envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer* envoy_config_bootstrap_v3_RuntimeLayer_mutable_rtds_layer(envoy_config_bootstrap_v3_RuntimeLayer *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer* sub = (struct envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer*)envoy_config_bootstrap_v3_RuntimeLayer_rtds_layer(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer*)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_RuntimeLayer_set_rtds_layer(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer */
+
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_serialize(const envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_symlink_root(const envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_append_service_cluster(const envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_subdirectory(const envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_set_symlink_root(envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_set_append_service_cluster(envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_set_subdirectory(envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+
+/* envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer */
+
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_serialize(const envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit, arena, len);
+}
+
+
+
+/* envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer */
+
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *ret = envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_serialize(const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_name(const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_has_rtds_config(const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_rtds_config(const envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_ConfigSource*); }
+
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_set_name(envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_set_rtds_config(envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg, struct envoy_config_core_v3_ConfigSource* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_ConfigSource*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_mutable_rtds_config(envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_rtds_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ConfigSource*)_upb_msg_new(&envoy_config_core_v3_ConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_set_rtds_config(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.bootstrap.v3.LayeredRuntime */
+
+UPB_INLINE envoy_config_bootstrap_v3_LayeredRuntime *envoy_config_bootstrap_v3_LayeredRuntime_new(upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_LayeredRuntime *)_upb_msg_new(&envoy_config_bootstrap_v3_LayeredRuntime_msginit, arena);
+}
+UPB_INLINE envoy_config_bootstrap_v3_LayeredRuntime *envoy_config_bootstrap_v3_LayeredRuntime_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_bootstrap_v3_LayeredRuntime *ret = envoy_config_bootstrap_v3_LayeredRuntime_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_LayeredRuntime_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_bootstrap_v3_LayeredRuntime *envoy_config_bootstrap_v3_LayeredRuntime_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_bootstrap_v3_LayeredRuntime *ret = envoy_config_bootstrap_v3_LayeredRuntime_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_bootstrap_v3_LayeredRuntime_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_bootstrap_v3_LayeredRuntime_serialize(const envoy_config_bootstrap_v3_LayeredRuntime *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_bootstrap_v3_LayeredRuntime_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_bootstrap_v3_LayeredRuntime_has_layers(const envoy_config_bootstrap_v3_LayeredRuntime *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_config_bootstrap_v3_RuntimeLayer* const* envoy_config_bootstrap_v3_LayeredRuntime_layers(const envoy_config_bootstrap_v3_LayeredRuntime *msg, size_t *len) { return (const envoy_config_bootstrap_v3_RuntimeLayer* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer** envoy_config_bootstrap_v3_LayeredRuntime_mutable_layers(envoy_config_bootstrap_v3_LayeredRuntime *msg, size_t *len) {
+ return (envoy_config_bootstrap_v3_RuntimeLayer**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_config_bootstrap_v3_RuntimeLayer** envoy_config_bootstrap_v3_LayeredRuntime_resize_layers(envoy_config_bootstrap_v3_LayeredRuntime *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_bootstrap_v3_RuntimeLayer**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_bootstrap_v3_RuntimeLayer* envoy_config_bootstrap_v3_LayeredRuntime_add_layers(envoy_config_bootstrap_v3_LayeredRuntime *msg, upb_arena *arena) {
+ struct envoy_config_bootstrap_v3_RuntimeLayer* sub = (struct envoy_config_bootstrap_v3_RuntimeLayer*)_upb_msg_new(&envoy_config_bootstrap_v3_RuntimeLayer_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_BOOTSTRAP_V3_BOOTSTRAP_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c
index 26304e42b9d..b3f086de190 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c
@@ -29,29 +29,29 @@ static const upb_msglayout_field envoy_config_cluster_v3_CircuitBreakers__fields
const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_msginit = {
&envoy_config_cluster_v3_CircuitBreakers_submsgs[0],
&envoy_config_cluster_v3_CircuitBreakers__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
-static const upb_msglayout *const envoy_config_cluster_v3_CircuitBreakers_Thresholds_submsgs[6] = {
+static const upb_msglayout *const envoy_config_cluster_v3_CircuitBreakers_Thresholds_submsgs[2] = {
&envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_cluster_v3_CircuitBreakers_Thresholds__fields[8] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(12, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(16, 24), 0, 1, 11, 1},
- {4, UPB_SIZE(20, 32), 0, 1, 11, 1},
- {5, UPB_SIZE(24, 40), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {2, UPB_SIZE(12, 16), 1, 1, 11, 1},
+ {3, UPB_SIZE(16, 24), 2, 1, 11, 1},
+ {4, UPB_SIZE(20, 32), 3, 1, 11, 1},
+ {5, UPB_SIZE(24, 40), 4, 1, 11, 1},
{6, UPB_SIZE(8, 8), 0, 0, 8, 1},
- {7, UPB_SIZE(28, 48), 0, 1, 11, 1},
- {8, UPB_SIZE(32, 56), 0, 0, 11, 1},
+ {7, UPB_SIZE(28, 48), 5, 1, 11, 1},
+ {8, UPB_SIZE(32, 56), 6, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit = {
&envoy_config_cluster_v3_CircuitBreakers_Thresholds_submsgs[0],
&envoy_config_cluster_v3_CircuitBreakers_Thresholds__fields[0],
- UPB_SIZE(40, 64), 8, false,
+ UPB_SIZE(40, 64), 8, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_submsgs[2] = {
@@ -60,14 +60,14 @@ static const upb_msglayout *const envoy_config_cluster_v3_CircuitBreakers_Thresh
};
static const upb_msglayout_field envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit = {
&envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_submsgs[0],
&envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h
index c2da177f210..8d6099603de 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -44,6 +45,12 @@ UPB_INLINE envoy_config_cluster_v3_CircuitBreakers *envoy_config_cluster_v3_Circ
envoy_config_cluster_v3_CircuitBreakers *ret = envoy_config_cluster_v3_CircuitBreakers_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_CircuitBreakers *envoy_config_cluster_v3_CircuitBreakers_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_CircuitBreakers *ret = envoy_config_cluster_v3_CircuitBreakers_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_CircuitBreakers_serialize(const envoy_config_cluster_v3_CircuitBreakers *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_CircuitBreakers_msginit, arena, len);
}
@@ -55,12 +62,12 @@ UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds** envoy_config_clu
return (envoy_config_cluster_v3_CircuitBreakers_Thresholds**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds** envoy_config_cluster_v3_CircuitBreakers_resize_thresholds(envoy_config_cluster_v3_CircuitBreakers *msg, size_t len, upb_arena *arena) {
- return (envoy_config_cluster_v3_CircuitBreakers_Thresholds**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_cluster_v3_CircuitBreakers_Thresholds**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_cluster_v3_CircuitBreakers_Thresholds* envoy_config_cluster_v3_CircuitBreakers_add_thresholds(envoy_config_cluster_v3_CircuitBreakers *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_CircuitBreakers_Thresholds* sub = (struct envoy_config_cluster_v3_CircuitBreakers_Thresholds*)_upb_msg_new(&envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -75,29 +82,36 @@ UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds *envoy_config_clus
envoy_config_cluster_v3_CircuitBreakers_Thresholds *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds *envoy_config_cluster_v3_CircuitBreakers_Thresholds_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_CircuitBreakers_Thresholds *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_CircuitBreakers_Thresholds_serialize(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit, arena, len);
}
-UPB_INLINE int32_t envoy_config_cluster_v3_CircuitBreakers_Thresholds_priority(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE int32_t envoy_config_cluster_v3_CircuitBreakers_Thresholds_priority(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connections(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_pending_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_requests(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_retries(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); }
UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_track_remaining(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_max_connection_pools(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_has_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* envoy_config_cluster_v3_CircuitBreakers_Thresholds_retry_budget(const envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget*); }
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_priority(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connections(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_connections(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
@@ -110,6 +124,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBr
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_pending_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_pending_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
@@ -122,6 +137,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBr
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_requests(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
@@ -134,6 +150,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBr
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_retries(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_retries(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
@@ -149,6 +166,7 @@ UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_track_rem
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_max_connection_pools(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_max_connection_pools(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
@@ -161,6 +179,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBr
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_set_retry_budget(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* value) {
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget* envoy_config_cluster_v3_CircuitBreakers_Thresholds_mutable_retry_budget(envoy_config_cluster_v3_CircuitBreakers_Thresholds *msg, upb_arena *arena) {
@@ -183,17 +202,24 @@ UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *envoy
envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *ret = envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_serialize(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_v3_Percent*); }
-UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_budget_percent(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_Percent*); }
+UPB_INLINE bool envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_has_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(const envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_budget_percent(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, struct envoy_type_v3_Percent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_v3_Percent*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_mutable_budget_percent(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena) {
struct envoy_type_v3_Percent* sub = (struct envoy_type_v3_Percent*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_budget_percent(msg);
@@ -205,7 +231,8 @@ UPB_INLINE struct envoy_type_v3_Percent* envoy_config_cluster_v3_CircuitBreakers
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_set_min_retry_concurrency(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_mutable_min_retry_concurrency(envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_min_retry_concurrency(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c
index 3add43b0159..8854ed024e3 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c
@@ -24,10 +24,7 @@
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
-#include "udpa/core/v1/collection_entry.upb.h"
-#include "udpa/core/v1/resource_locator.upb.h"
-#include "envoy/annotations/deprecation.upb.h"
-#include "udpa/annotations/migrate.upb.h"
+#include "xds/core/v3/collection_entry.upb.h"
#include "udpa/annotations/security.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -36,20 +33,20 @@
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_config_cluster_v3_ClusterCollection_submsgs[1] = {
- &udpa_core_v1_CollectionEntry_msginit,
+ &xds_core_v3_CollectionEntry_msginit,
};
static const upb_msglayout_field envoy_config_cluster_v3_ClusterCollection__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_ClusterCollection_msginit = {
&envoy_config_cluster_v3_ClusterCollection_submsgs[0],
&envoy_config_cluster_v3_ClusterCollection__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
-static const upb_msglayout *const envoy_config_cluster_v3_Cluster_submsgs[35] = {
+static const upb_msglayout *const envoy_config_cluster_v3_Cluster_submsgs[32] = {
&envoy_config_cluster_v3_CircuitBreakers_msginit,
&envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit,
&envoy_config_cluster_v3_Cluster_CustomClusterType_msginit,
@@ -58,7 +55,7 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_submsgs[35] =
&envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit,
&envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit,
&envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit,
- &envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit,
+ &envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit,
&envoy_config_cluster_v3_Cluster_RefreshRate_msginit,
&envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit,
&envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit,
@@ -85,59 +82,59 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_submsgs[35] =
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster__fields[47] = {
- {1, UPB_SIZE(32, 32), 0, 0, 9, 1},
- {2, UPB_SIZE(168, 304), UPB_SIZE(-177, -313), 0, 14, 1},
- {3, UPB_SIZE(48, 64), 0, 3, 11, 1},
- {4, UPB_SIZE(52, 72), 0, 30, 11, 1},
- {5, UPB_SIZE(56, 80), 0, 31, 11, 1},
- {6, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {8, UPB_SIZE(148, 264), 0, 21, 11, 3},
- {9, UPB_SIZE(60, 88), 0, 31, 11, 1},
- {10, UPB_SIZE(64, 96), 0, 0, 11, 1},
- {13, UPB_SIZE(68, 104), 0, 22, 11, 1},
- {14, UPB_SIZE(72, 112), 0, 23, 11, 1},
- {16, UPB_SIZE(76, 120), 0, 30, 11, 1},
+ {1, UPB_SIZE(24, 24), 0, 0, 9, 1},
+ {2, UPB_SIZE(160, 296), UPB_SIZE(-165, -305), 0, 14, 1},
+ {3, UPB_SIZE(40, 56), 1, 3, 11, 1},
+ {4, UPB_SIZE(44, 64), 2, 30, 11, 1},
+ {5, UPB_SIZE(48, 72), 3, 31, 11, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {8, UPB_SIZE(140, 256), 0, 21, 11, 3},
+ {9, UPB_SIZE(52, 80), 4, 31, 11, 1},
+ {10, UPB_SIZE(56, 88), 5, 0, 11, 1},
+ {13, UPB_SIZE(60, 96), 6, 22, 11, 1},
+ {14, UPB_SIZE(64, 104), 7, 23, 11, 1},
+ {16, UPB_SIZE(68, 112), 8, 30, 11, 1},
{17, UPB_SIZE(8, 8), 0, 0, 14, 1},
- {18, UPB_SIZE(152, 272), 0, 18, 11, 3},
- {19, UPB_SIZE(80, 128), 0, 15, 11, 1},
- {20, UPB_SIZE(84, 136), 0, 30, 11, 1},
- {21, UPB_SIZE(88, 144), 0, 19, 11, 1},
- {22, UPB_SIZE(92, 152), 0, 4, 11, 1},
- {23, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 10, 11, 1},
- {24, UPB_SIZE(96, 160), 0, 26, 11, 1},
- {25, UPB_SIZE(100, 168), 0, 25, 11, 1},
- {26, UPB_SIZE(16, 16), 0, 0, 14, 1},
- {27, UPB_SIZE(104, 176), 0, 1, 11, 1},
- {28, UPB_SIZE(40, 48), 0, 0, 9, 1},
- {29, UPB_SIZE(108, 184), 0, 24, 11, 1},
- {30, UPB_SIZE(112, 192), 0, 17, 11, 1},
- {31, UPB_SIZE(24, 24), 0, 0, 8, 1},
- {32, UPB_SIZE(25, 25), 0, 0, 8, 1},
- {33, UPB_SIZE(116, 200), 0, 29, 11, 1},
- {34, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 7, 11, 1},
- {36, UPB_SIZE(156, 280), 0, 12, 11, _UPB_LABEL_MAP},
- {37, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 5, 11, 1},
- {38, UPB_SIZE(168, 304), UPB_SIZE(-177, -313), 2, 11, 1},
- {39, UPB_SIZE(26, 26), 0, 0, 8, 1},
- {40, UPB_SIZE(160, 288), 0, 13, 11, 3},
- {41, UPB_SIZE(120, 208), 0, 14, 11, 1},
- {42, UPB_SIZE(124, 216), 0, 20, 11, 1},
- {43, UPB_SIZE(164, 296), 0, 11, 11, 3},
- {44, UPB_SIZE(128, 224), 0, 9, 11, 1},
- {45, UPB_SIZE(27, 27), 0, 0, 8, 1},
- {46, UPB_SIZE(132, 232), 0, 28, 11, 1},
- {47, UPB_SIZE(28, 28), 0, 0, 8, 1},
- {48, UPB_SIZE(136, 240), 0, 27, 11, 1},
- {49, UPB_SIZE(140, 248), 0, 16, 11, 1},
- {50, UPB_SIZE(144, 256), 0, 8, 11, 1},
- {51, UPB_SIZE(29, 29), 0, 0, 8, 1},
- {52, UPB_SIZE(180, 320), UPB_SIZE(-185, -329), 6, 11, 1},
+ {18, UPB_SIZE(144, 264), 0, 18, 11, 3},
+ {19, UPB_SIZE(72, 120), 9, 15, 11, 1},
+ {20, UPB_SIZE(76, 128), 10, 30, 11, 1},
+ {21, UPB_SIZE(80, 136), 11, 19, 11, 1},
+ {22, UPB_SIZE(84, 144), 12, 4, 11, 1},
+ {23, UPB_SIZE(168, 312), UPB_SIZE(-173, -321), 10, 11, 1},
+ {24, UPB_SIZE(88, 152), 13, 26, 11, 1},
+ {25, UPB_SIZE(92, 160), 14, 25, 11, 1},
+ {26, UPB_SIZE(12, 12), 0, 0, 14, 1},
+ {27, UPB_SIZE(96, 168), 15, 1, 11, 1},
+ {28, UPB_SIZE(32, 40), 0, 0, 9, 1},
+ {29, UPB_SIZE(100, 176), 16, 24, 11, 1},
+ {30, UPB_SIZE(104, 184), 17, 17, 11, 1},
+ {31, UPB_SIZE(16, 16), 0, 0, 8, 1},
+ {32, UPB_SIZE(17, 17), 0, 0, 8, 1},
+ {33, UPB_SIZE(108, 192), 18, 29, 11, 1},
+ {34, UPB_SIZE(168, 312), UPB_SIZE(-173, -321), 7, 11, 1},
+ {36, UPB_SIZE(148, 272), 0, 12, 11, _UPB_LABEL_MAP},
+ {37, UPB_SIZE(168, 312), UPB_SIZE(-173, -321), 5, 11, 1},
+ {38, UPB_SIZE(160, 296), UPB_SIZE(-165, -305), 2, 11, 1},
+ {39, UPB_SIZE(18, 18), 0, 0, 8, 1},
+ {40, UPB_SIZE(152, 280), 0, 13, 11, 3},
+ {41, UPB_SIZE(112, 200), 19, 14, 11, 1},
+ {42, UPB_SIZE(116, 208), 20, 20, 11, 1},
+ {43, UPB_SIZE(156, 288), 0, 11, 11, 3},
+ {44, UPB_SIZE(120, 216), 21, 9, 11, 1},
+ {45, UPB_SIZE(19, 19), 0, 0, 8, 1},
+ {46, UPB_SIZE(124, 224), 22, 28, 11, 1},
+ {47, UPB_SIZE(20, 20), 0, 0, 8, 1},
+ {48, UPB_SIZE(128, 232), 23, 27, 11, 1},
+ {49, UPB_SIZE(132, 240), 24, 16, 11, 1},
+ {50, UPB_SIZE(136, 248), 25, 8, 11, 1},
+ {51, UPB_SIZE(21, 21), 0, 0, 8, 1},
+ {52, UPB_SIZE(168, 312), UPB_SIZE(-173, -321), 6, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_msginit = {
&envoy_config_cluster_v3_Cluster_submsgs[0],
&envoy_config_cluster_v3_Cluster__fields[0],
- UPB_SIZE(192, 336), 47, false,
+ UPB_SIZE(176, 336), 47, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_TransportSocketMatch_submsgs[2] = {
@@ -146,15 +143,15 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_TransportSocke
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_TransportSocketMatch__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit = {
&envoy_config_cluster_v3_Cluster_TransportSocketMatch_submsgs[0],
&envoy_config_cluster_v3_Cluster_TransportSocketMatch__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CustomClusterType_submsgs[1] = {
@@ -162,31 +159,29 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CustomClusterT
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_CustomClusterType__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_CustomClusterType_msginit = {
&envoy_config_cluster_v3_Cluster_CustomClusterType_submsgs[0],
&envoy_config_cluster_v3_Cluster_CustomClusterType__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_cluster_v3_Cluster_EdsClusterConfig_submsgs[2] = {
+static const upb_msglayout *const envoy_config_cluster_v3_Cluster_EdsClusterConfig_submsgs[1] = {
&envoy_config_core_v3_ConfigSource_msginit,
- &udpa_core_v1_ResourceLocator_msginit,
};
-static const upb_msglayout_field envoy_config_cluster_v3_Cluster_EdsClusterConfig__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), 0, 1, 11, 1},
+static const upb_msglayout_field envoy_config_cluster_v3_Cluster_EdsClusterConfig__fields[2] = {
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_EdsClusterConfig_msginit = {
&envoy_config_cluster_v3_Cluster_EdsClusterConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_EdsClusterConfig__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_LbSubsetConfig_submsgs[2] = {
@@ -195,8 +190,8 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_LbSubsetConfig
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_LbSubsetConfig__fields[7] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(12, 16), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {2, UPB_SIZE(12, 16), 1, 1, 11, 1},
{3, UPB_SIZE(16, 24), 0, 0, 11, 3},
{4, UPB_SIZE(8, 8), 0, 0, 8, 1},
{5, UPB_SIZE(9, 9), 0, 0, 8, 1},
@@ -207,20 +202,20 @@ static const upb_msglayout_field envoy_config_cluster_v3_Cluster_LbSubsetConfig_
const upb_msglayout envoy_config_cluster_v3_Cluster_LbSubsetConfig_msginit = {
&envoy_config_cluster_v3_Cluster_LbSubsetConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_LbSubsetConfig__fields[0],
- UPB_SIZE(24, 32), 7, false,
+ UPB_SIZE(24, 32), 7, false, 255,
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector__fields[4] = {
- {1, UPB_SIZE(12, 16), 0, 0, 9, 3},
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 3},
{2, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {3, UPB_SIZE(16, 24), 0, 0, 9, 3},
- {4, UPB_SIZE(8, 8), 0, 0, 8, 1},
+ {3, UPB_SIZE(12, 16), 0, 0, 9, 3},
+ {4, UPB_SIZE(4, 4), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit = {
NULL,
&envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector__fields[0],
- UPB_SIZE(24, 32), 4, false,
+ UPB_SIZE(16, 24), 4, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_submsgs[2] = {
@@ -229,30 +224,30 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_LeastRequestLb
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_LeastRequestLbConfig__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 1, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit = {
&envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_LeastRequestLbConfig__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_cluster_v3_Cluster_RingHashLbConfig_submsgs[2] = {
+static const upb_msglayout *const envoy_config_cluster_v3_Cluster_RingHashLbConfig_submsgs[1] = {
&google_protobuf_UInt64Value_msginit,
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_RingHashLbConfig__fields[3] = {
- {1, UPB_SIZE(8, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {4, UPB_SIZE(12, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {3, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {4, UPB_SIZE(12, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit = {
&envoy_config_cluster_v3_Cluster_RingHashLbConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_RingHashLbConfig__fields[0],
- UPB_SIZE(16, 24), 3, false,
+ UPB_SIZE(16, 24), 3, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_MaglevLbConfig_submsgs[1] = {
@@ -260,13 +255,13 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_MaglevLbConfig
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_MaglevLbConfig__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit = {
&envoy_config_cluster_v3_Cluster_MaglevLbConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_MaglevLbConfig__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_OriginalDstLbConfig__fields[1] = {
@@ -276,7 +271,7 @@ static const upb_msglayout_field envoy_config_cluster_v3_Cluster_OriginalDstLbCo
const upb_msglayout envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit = {
NULL,
&envoy_config_cluster_v3_Cluster_OriginalDstLbConfig__fields[0],
- UPB_SIZE(1, 1), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CommonLbConfig_submsgs[5] = {
@@ -288,19 +283,19 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CommonLbConfig
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_CommonLbConfig__fields[7] = {
- {1, UPB_SIZE(4, 8), 0, 3, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 3, 11, 1},
{2, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1},
{3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1},
- {4, UPB_SIZE(8, 16), 0, 4, 11, 1},
- {5, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {6, UPB_SIZE(1, 1), 0, 0, 8, 1},
- {7, UPB_SIZE(12, 24), 0, 0, 11, 1},
+ {4, UPB_SIZE(8, 16), 2, 4, 11, 1},
+ {5, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {6, UPB_SIZE(2, 2), 0, 0, 8, 1},
+ {7, UPB_SIZE(12, 24), 3, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit = {
&envoy_config_cluster_v3_Cluster_CommonLbConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_CommonLbConfig__fields[0],
- UPB_SIZE(24, 48), 7, false,
+ UPB_SIZE(24, 48), 7, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[2] = {
@@ -309,21 +304,21 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CommonLbConfig
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig__fields[3] = {
- {1, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {2, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit = {
&envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 24), 3, false, 255,
};
const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_submsgs[1] = {
@@ -331,44 +326,44 @@ static const upb_msglayout *const envoy_config_cluster_v3_Cluster_CommonLbConfig
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {2, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit = {
&envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_submsgs[0],
&envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_cluster_v3_Cluster_RefreshRate_submsgs[2] = {
+static const upb_msglayout *const envoy_config_cluster_v3_Cluster_RefreshRate_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_config_cluster_v3_Cluster_RefreshRate__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Cluster_RefreshRate_msginit = {
&envoy_config_cluster_v3_Cluster_RefreshRate_submsgs[0],
&envoy_config_cluster_v3_Cluster_RefreshRate__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_cluster_v3_Cluster_PrefetchPolicy_submsgs[2] = {
+static const upb_msglayout *const envoy_config_cluster_v3_Cluster_PreconnectPolicy_submsgs[1] = {
&google_protobuf_DoubleValue_msginit,
};
-static const upb_msglayout_field envoy_config_cluster_v3_Cluster_PrefetchPolicy__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+static const upb_msglayout_field envoy_config_cluster_v3_Cluster_PreconnectPolicy__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
-const upb_msglayout envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit = {
- &envoy_config_cluster_v3_Cluster_PrefetchPolicy_submsgs[0],
- &envoy_config_cluster_v3_Cluster_PrefetchPolicy__fields[0],
- UPB_SIZE(8, 16), 2, false,
+const upb_msglayout envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit = {
+ &envoy_config_cluster_v3_Cluster_PreconnectPolicy_submsgs[0],
+ &envoy_config_cluster_v3_Cluster_PreconnectPolicy__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_submsgs[1] = {
@@ -383,7 +378,7 @@ static const upb_msglayout_field envoy_config_cluster_v3_Cluster_TypedExtensionP
const upb_msglayout envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_msginit = {
&envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_submsgs[0],
&envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_LoadBalancingPolicy_submsgs[1] = {
@@ -397,7 +392,7 @@ static const upb_msglayout_field envoy_config_cluster_v3_LoadBalancingPolicy__fi
const upb_msglayout envoy_config_cluster_v3_LoadBalancingPolicy_msginit = {
&envoy_config_cluster_v3_LoadBalancingPolicy_submsgs[0],
&envoy_config_cluster_v3_LoadBalancingPolicy__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_LoadBalancingPolicy_Policy_submsgs[1] = {
@@ -405,14 +400,14 @@ static const upb_msglayout *const envoy_config_cluster_v3_LoadBalancingPolicy_Po
};
static const upb_msglayout_field envoy_config_cluster_v3_LoadBalancingPolicy_Policy__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit = {
&envoy_config_cluster_v3_LoadBalancingPolicy_Policy_submsgs[0],
&envoy_config_cluster_v3_LoadBalancingPolicy_Policy__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_UpstreamBindConfig_submsgs[1] = {
@@ -420,13 +415,13 @@ static const upb_msglayout *const envoy_config_cluster_v3_UpstreamBindConfig_sub
};
static const upb_msglayout_field envoy_config_cluster_v3_UpstreamBindConfig__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_UpstreamBindConfig_msginit = {
&envoy_config_cluster_v3_UpstreamBindConfig_submsgs[0],
&envoy_config_cluster_v3_UpstreamBindConfig__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_cluster_v3_UpstreamConnectionOptions_submsgs[1] = {
@@ -434,13 +429,13 @@ static const upb_msglayout *const envoy_config_cluster_v3_UpstreamConnectionOpti
};
static const upb_msglayout_field envoy_config_cluster_v3_UpstreamConnectionOptions__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_UpstreamConnectionOptions_msginit = {
&envoy_config_cluster_v3_UpstreamConnectionOptions_submsgs[0],
&envoy_config_cluster_v3_UpstreamConnectionOptions__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_config_cluster_v3_TrackClusterStats__fields[2] = {
@@ -451,7 +446,7 @@ static const upb_msglayout_field envoy_config_cluster_v3_TrackClusterStats__fiel
const upb_msglayout envoy_config_cluster_v3_TrackClusterStats_msginit = {
NULL,
&envoy_config_cluster_v3_TrackClusterStats__fields[0],
- UPB_SIZE(2, 2), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h
index 2108fd61ae1..da4d62066ab 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -35,7 +36,7 @@ struct envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig;
struct envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig;
struct envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig;
struct envoy_config_cluster_v3_Cluster_RefreshRate;
-struct envoy_config_cluster_v3_Cluster_PrefetchPolicy;
+struct envoy_config_cluster_v3_Cluster_PreconnectPolicy;
struct envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry;
struct envoy_config_cluster_v3_LoadBalancingPolicy;
struct envoy_config_cluster_v3_LoadBalancingPolicy_Policy;
@@ -58,7 +59,7 @@ typedef struct envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig
typedef struct envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig;
typedef struct envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig;
typedef struct envoy_config_cluster_v3_Cluster_RefreshRate envoy_config_cluster_v3_Cluster_RefreshRate;
-typedef struct envoy_config_cluster_v3_Cluster_PrefetchPolicy envoy_config_cluster_v3_Cluster_PrefetchPolicy;
+typedef struct envoy_config_cluster_v3_Cluster_PreconnectPolicy envoy_config_cluster_v3_Cluster_PreconnectPolicy;
typedef struct envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry;
typedef struct envoy_config_cluster_v3_LoadBalancingPolicy envoy_config_cluster_v3_LoadBalancingPolicy;
typedef struct envoy_config_cluster_v3_LoadBalancingPolicy_Policy envoy_config_cluster_v3_LoadBalancingPolicy_Policy;
@@ -81,7 +82,7 @@ extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAw
extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit;
extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit;
extern const upb_msglayout envoy_config_cluster_v3_Cluster_RefreshRate_msginit;
-extern const upb_msglayout envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit;
extern const upb_msglayout envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_msginit;
extern const upb_msglayout envoy_config_cluster_v3_LoadBalancingPolicy_msginit;
extern const upb_msglayout envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit;
@@ -112,8 +113,7 @@ struct google_protobuf_Duration;
struct google_protobuf_Struct;
struct google_protobuf_UInt32Value;
struct google_protobuf_UInt64Value;
-struct udpa_core_v1_CollectionEntry;
-struct udpa_core_v1_ResourceLocator;
+struct xds_core_v3_CollectionEntry;
extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_msginit;
extern const upb_msglayout envoy_config_cluster_v3_Filter_msginit;
extern const upb_msglayout envoy_config_cluster_v3_OutlierDetection_msginit;
@@ -138,8 +138,7 @@ extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_protobuf_Struct_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
extern const upb_msglayout google_protobuf_UInt64Value_msginit;
-extern const upb_msglayout udpa_core_v1_CollectionEntry_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
+extern const upb_msglayout xds_core_v3_CollectionEntry_msginit;
typedef enum {
envoy_config_cluster_v3_Cluster_USE_CONFIGURED_PROTOCOL = 0,
@@ -200,20 +199,27 @@ UPB_INLINE envoy_config_cluster_v3_ClusterCollection *envoy_config_cluster_v3_Cl
envoy_config_cluster_v3_ClusterCollection *ret = envoy_config_cluster_v3_ClusterCollection_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_ClusterCollection_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_ClusterCollection *envoy_config_cluster_v3_ClusterCollection_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_ClusterCollection *ret = envoy_config_cluster_v3_ClusterCollection_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_ClusterCollection_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_ClusterCollection_serialize(const envoy_config_cluster_v3_ClusterCollection *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_ClusterCollection_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_ClusterCollection_has_entries(const envoy_config_cluster_v3_ClusterCollection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct udpa_core_v1_CollectionEntry* envoy_config_cluster_v3_ClusterCollection_entries(const envoy_config_cluster_v3_ClusterCollection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct udpa_core_v1_CollectionEntry*); }
+UPB_INLINE bool envoy_config_cluster_v3_ClusterCollection_has_entries(const envoy_config_cluster_v3_ClusterCollection *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct xds_core_v3_CollectionEntry* envoy_config_cluster_v3_ClusterCollection_entries(const envoy_config_cluster_v3_ClusterCollection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct xds_core_v3_CollectionEntry*); }
-UPB_INLINE void envoy_config_cluster_v3_ClusterCollection_set_entries(envoy_config_cluster_v3_ClusterCollection *msg, struct udpa_core_v1_CollectionEntry* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct udpa_core_v1_CollectionEntry*) = value;
+UPB_INLINE void envoy_config_cluster_v3_ClusterCollection_set_entries(envoy_config_cluster_v3_ClusterCollection *msg, struct xds_core_v3_CollectionEntry* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct xds_core_v3_CollectionEntry*) = value;
}
-UPB_INLINE struct udpa_core_v1_CollectionEntry* envoy_config_cluster_v3_ClusterCollection_mutable_entries(envoy_config_cluster_v3_ClusterCollection *msg, upb_arena *arena) {
- struct udpa_core_v1_CollectionEntry* sub = (struct udpa_core_v1_CollectionEntry*)envoy_config_cluster_v3_ClusterCollection_entries(msg);
+UPB_INLINE struct xds_core_v3_CollectionEntry* envoy_config_cluster_v3_ClusterCollection_mutable_entries(envoy_config_cluster_v3_ClusterCollection *msg, upb_arena *arena) {
+ struct xds_core_v3_CollectionEntry* sub = (struct xds_core_v3_CollectionEntry*)envoy_config_cluster_v3_ClusterCollection_entries(msg);
if (sub == NULL) {
- sub = (struct udpa_core_v1_CollectionEntry*)_upb_msg_new(&udpa_core_v1_CollectionEntry_msginit, arena);
+ sub = (struct xds_core_v3_CollectionEntry*)_upb_msg_new(&xds_core_v3_CollectionEntry_msginit, arena);
if (!sub) return NULL;
envoy_config_cluster_v3_ClusterCollection_set_entries(msg, sub);
}
@@ -230,6 +236,12 @@ UPB_INLINE envoy_config_cluster_v3_Cluster *envoy_config_cluster_v3_Cluster_pars
envoy_config_cluster_v3_Cluster *ret = envoy_config_cluster_v3_Cluster_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster *envoy_config_cluster_v3_Cluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster *ret = envoy_config_cluster_v3_Cluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_serialize(const envoy_config_cluster_v3_Cluster *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_msginit, arena, len);
}
@@ -239,7 +251,7 @@ typedef enum {
envoy_config_cluster_v3_Cluster_cluster_discovery_type_cluster_type = 38,
envoy_config_cluster_v3_Cluster_cluster_discovery_type_NOT_SET = 0
} envoy_config_cluster_v3_Cluster_cluster_discovery_type_oneofcases;
-UPB_INLINE envoy_config_cluster_v3_Cluster_cluster_discovery_type_oneofcases envoy_config_cluster_v3_Cluster_cluster_discovery_type_case(const envoy_config_cluster_v3_Cluster* msg) { return (envoy_config_cluster_v3_Cluster_cluster_discovery_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(176, 312), int32_t); }
+UPB_INLINE envoy_config_cluster_v3_Cluster_cluster_discovery_type_oneofcases envoy_config_cluster_v3_Cluster_cluster_discovery_type_case(const envoy_config_cluster_v3_Cluster* msg) { return (envoy_config_cluster_v3_Cluster_cluster_discovery_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(164, 304), int32_t); }
typedef enum {
envoy_config_cluster_v3_Cluster_lb_config_ring_hash_lb_config = 23,
@@ -248,102 +260,103 @@ typedef enum {
envoy_config_cluster_v3_Cluster_lb_config_least_request_lb_config = 37,
envoy_config_cluster_v3_Cluster_lb_config_NOT_SET = 0
} envoy_config_cluster_v3_Cluster_lb_config_oneofcases;
-UPB_INLINE envoy_config_cluster_v3_Cluster_lb_config_oneofcases envoy_config_cluster_v3_Cluster_lb_config_case(const envoy_config_cluster_v3_Cluster* msg) { return (envoy_config_cluster_v3_Cluster_lb_config_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(184, 328), int32_t); }
-
-UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_name(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_type(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(176, 312)) == 2; }
-UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_type(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(168, 304), UPB_SIZE(176, 312), 2, 0); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_eds_cluster_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 64)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_EdsClusterConfig* envoy_config_cluster_v3_Cluster_eds_cluster_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), const envoy_config_cluster_v3_Cluster_EdsClusterConfig*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_connect_timeout(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 72)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_connect_timeout(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_per_connection_buffer_limit_bytes(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_per_connection_buffer_limit_bytes(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 80), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_lb_policy(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_health_checks(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(148, 264)); }
-UPB_INLINE const struct envoy_config_core_v3_HealthCheck* const* envoy_config_cluster_v3_Cluster_health_checks(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const struct envoy_config_core_v3_HealthCheck* const*)_upb_array_accessor(msg, UPB_SIZE(148, 264), len); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_max_requests_per_connection(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 88)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_max_requests_per_connection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_circuit_breakers(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 96)); }
-UPB_INLINE const struct envoy_config_cluster_v3_CircuitBreakers* envoy_config_cluster_v3_Cluster_circuit_breakers(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), const struct envoy_config_cluster_v3_CircuitBreakers*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 104)); }
-UPB_INLINE const struct envoy_config_core_v3_Http1ProtocolOptions* envoy_config_cluster_v3_Cluster_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), const struct envoy_config_core_v3_Http1ProtocolOptions*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_http2_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 112)); }
-UPB_INLINE const struct envoy_config_core_v3_Http2ProtocolOptions* envoy_config_cluster_v3_Cluster_http2_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 112), const struct envoy_config_core_v3_Http2ProtocolOptions*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_dns_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 120)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_dns_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const struct google_protobuf_Duration*); }
+UPB_INLINE envoy_config_cluster_v3_Cluster_lb_config_oneofcases envoy_config_cluster_v3_Cluster_lb_config_case(const envoy_config_cluster_v3_Cluster* msg) { return (envoy_config_cluster_v3_Cluster_lb_config_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(172, 320), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_name(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_type(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(164, 304)) == 2; }
+UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_type(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(160, 296), UPB_SIZE(164, 304), 2, 0); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_eds_cluster_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_EdsClusterConfig* envoy_config_cluster_v3_Cluster_eds_cluster_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), const envoy_config_cluster_v3_Cluster_EdsClusterConfig*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_connect_timeout(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_connect_timeout(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_per_connection_buffer_limit_bytes(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_per_connection_buffer_limit_bytes(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_lb_policy(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_health_checks(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(140, 256)); }
+UPB_INLINE const struct envoy_config_core_v3_HealthCheck* const* envoy_config_cluster_v3_Cluster_health_checks(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const struct envoy_config_core_v3_HealthCheck* const*)_upb_array_accessor(msg, UPB_SIZE(140, 256), len); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_max_requests_per_connection(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_max_requests_per_connection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_circuit_breakers(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct envoy_config_cluster_v3_CircuitBreakers* envoy_config_cluster_v3_Cluster_circuit_breakers(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const struct envoy_config_cluster_v3_CircuitBreakers*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct envoy_config_core_v3_Http1ProtocolOptions* envoy_config_cluster_v3_Cluster_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), const struct envoy_config_core_v3_Http1ProtocolOptions*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_http2_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE const struct envoy_config_core_v3_Http2ProtocolOptions* envoy_config_cluster_v3_Cluster_http2_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const struct envoy_config_core_v3_Http2ProtocolOptions*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_dns_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_dns_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), const struct google_protobuf_Duration*); }
UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_dns_lookup_family(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_dns_resolvers(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(152, 272)); }
-UPB_INLINE const struct envoy_config_core_v3_Address* const* envoy_config_cluster_v3_Cluster_dns_resolvers(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const struct envoy_config_core_v3_Address* const*)_upb_array_accessor(msg, UPB_SIZE(152, 272), len); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_outlier_detection(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 128)); }
-UPB_INLINE const struct envoy_config_cluster_v3_OutlierDetection* envoy_config_cluster_v3_Cluster_outlier_detection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 128), const struct envoy_config_cluster_v3_OutlierDetection*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_cleanup_interval(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 136)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_cleanup_interval(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 136), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_bind_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 144)); }
-UPB_INLINE const struct envoy_config_core_v3_BindConfig* envoy_config_cluster_v3_Cluster_upstream_bind_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(88, 144), const struct envoy_config_core_v3_BindConfig*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_lb_subset_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 152)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_LbSubsetConfig* envoy_config_cluster_v3_Cluster_lb_subset_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 152), const envoy_config_cluster_v3_Cluster_LbSubsetConfig*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_ring_hash_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 23; }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_RingHashLbConfig* envoy_config_cluster_v3_Cluster_ring_hash_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_RingHashLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 23, NULL); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_transport_socket(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 160)); }
-UPB_INLINE const struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_Cluster_transport_socket(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 160), const struct envoy_config_core_v3_TransportSocket*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_metadata(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 168)); }
-UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_cluster_v3_Cluster_metadata(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 168), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_protocol_selection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_common_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(104, 176)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_CommonLbConfig* envoy_config_cluster_v3_Cluster_common_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(104, 176), const envoy_config_cluster_v3_Cluster_CommonLbConfig*); }
-UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_alt_stat_name(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_common_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 184)); }
-UPB_INLINE const struct envoy_config_core_v3_HttpProtocolOptions* envoy_config_cluster_v3_Cluster_common_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(108, 184), const struct envoy_config_core_v3_HttpProtocolOptions*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_connection_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(112, 192)); }
-UPB_INLINE const envoy_config_cluster_v3_UpstreamConnectionOptions* envoy_config_cluster_v3_Cluster_upstream_connection_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 192), const envoy_config_cluster_v3_UpstreamConnectionOptions*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_close_connections_on_host_health_failure(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_ignore_health_on_host_removal(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_load_assignment(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(116, 200)); }
-UPB_INLINE const struct envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_cluster_v3_Cluster_load_assignment(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 200), const struct envoy_config_endpoint_v3_ClusterLoadAssignment*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_original_dst_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 34; }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_OriginalDstLbConfig* envoy_config_cluster_v3_Cluster_original_dst_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_OriginalDstLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 34, NULL); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_typed_extension_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(156, 280)); }
-UPB_INLINE size_t envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_size(const envoy_config_cluster_v3_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(156, 280)); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_get(const envoy_config_cluster_v3_Cluster *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(156, 280), &key, 0, val, sizeof(*val)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry* envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_next(const envoy_config_cluster_v3_Cluster *msg, size_t* iter) { return (const envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(156, 280), iter); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_least_request_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 37; }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig* envoy_config_cluster_v3_Cluster_least_request_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 37, NULL); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_cluster_type(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(176, 312)) == 38; }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_CustomClusterType* envoy_config_cluster_v3_Cluster_cluster_type(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_CustomClusterType*, UPB_SIZE(168, 304), UPB_SIZE(176, 312), 38, NULL); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_respect_dns_ttl(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_filters(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(160, 288)); }
-UPB_INLINE const struct envoy_config_cluster_v3_Filter* const* envoy_config_cluster_v3_Cluster_filters(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const struct envoy_config_cluster_v3_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(160, 288), len); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_load_balancing_policy(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(120, 208)); }
-UPB_INLINE const envoy_config_cluster_v3_LoadBalancingPolicy* envoy_config_cluster_v3_Cluster_load_balancing_policy(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 208), const envoy_config_cluster_v3_LoadBalancingPolicy*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_lrs_server(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(124, 216)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Cluster_lrs_server(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(124, 216), const struct envoy_config_core_v3_ConfigSource*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_transport_socket_matches(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(164, 296)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_TransportSocketMatch* const* envoy_config_cluster_v3_Cluster_transport_socket_matches(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const envoy_config_cluster_v3_Cluster_TransportSocketMatch* const*)_upb_array_accessor(msg, UPB_SIZE(164, 296), len); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_dns_failure_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(128, 224)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_RefreshRate* envoy_config_cluster_v3_Cluster_dns_failure_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(128, 224), const envoy_config_cluster_v3_Cluster_RefreshRate*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_use_tcp_for_dns_lookups(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(132, 232)); }
-UPB_INLINE const struct envoy_config_core_v3_UpstreamHttpProtocolOptions* envoy_config_cluster_v3_Cluster_upstream_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(132, 232), const struct envoy_config_core_v3_UpstreamHttpProtocolOptions*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_track_timeout_budgets(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(136, 240)); }
-UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_cluster_v3_Cluster_upstream_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(136, 240), const struct envoy_config_core_v3_TypedExtensionConfig*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_track_cluster_stats(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(140, 248)); }
-UPB_INLINE const envoy_config_cluster_v3_TrackClusterStats* envoy_config_cluster_v3_Cluster_track_cluster_stats(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(140, 248), const envoy_config_cluster_v3_TrackClusterStats*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_prefetch_policy(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(144, 256)); }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_PrefetchPolicy* envoy_config_cluster_v3_Cluster_prefetch_policy(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(144, 256), const envoy_config_cluster_v3_Cluster_PrefetchPolicy*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_connection_pool_per_downstream_connection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(29, 29), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_maglev_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(184, 328)) == 52; }
-UPB_INLINE const envoy_config_cluster_v3_Cluster_MaglevLbConfig* envoy_config_cluster_v3_Cluster_maglev_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_MaglevLbConfig*, UPB_SIZE(180, 320), UPB_SIZE(184, 328), 52, NULL); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_dns_resolvers(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(144, 264)); }
+UPB_INLINE const struct envoy_config_core_v3_Address* const* envoy_config_cluster_v3_Cluster_dns_resolvers(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const struct envoy_config_core_v3_Address* const*)_upb_array_accessor(msg, UPB_SIZE(144, 264), len); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_outlier_detection(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE const struct envoy_config_cluster_v3_OutlierDetection* envoy_config_cluster_v3_Cluster_outlier_detection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 120), const struct envoy_config_cluster_v3_OutlierDetection*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_cleanup_interval(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_cleanup_interval(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_bind_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE const struct envoy_config_core_v3_BindConfig* envoy_config_cluster_v3_Cluster_upstream_bind_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 136), const struct envoy_config_core_v3_BindConfig*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_lb_subset_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_LbSubsetConfig* envoy_config_cluster_v3_Cluster_lb_subset_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), const envoy_config_cluster_v3_Cluster_LbSubsetConfig*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_ring_hash_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(172, 320)) == 23; }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_RingHashLbConfig* envoy_config_cluster_v3_Cluster_ring_hash_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_RingHashLbConfig*, UPB_SIZE(168, 312), UPB_SIZE(172, 320), 23, NULL); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_transport_socket(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE const struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_Cluster_transport_socket(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(88, 152), const struct envoy_config_core_v3_TransportSocket*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_metadata(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 14); }
+UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_cluster_v3_Cluster_metadata(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), const struct envoy_config_core_v3_Metadata*); }
+UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_protocol_selection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_common_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 15); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_CommonLbConfig* envoy_config_cluster_v3_Cluster_common_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 168), const envoy_config_cluster_v3_Cluster_CommonLbConfig*); }
+UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_alt_stat_name(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_strview); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_common_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 16); }
+UPB_INLINE const struct envoy_config_core_v3_HttpProtocolOptions* envoy_config_cluster_v3_Cluster_common_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), const struct envoy_config_core_v3_HttpProtocolOptions*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_connection_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 17); }
+UPB_INLINE const envoy_config_cluster_v3_UpstreamConnectionOptions* envoy_config_cluster_v3_Cluster_upstream_connection_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(104, 184), const envoy_config_cluster_v3_UpstreamConnectionOptions*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_close_connections_on_host_health_failure(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_ignore_health_on_host_removal(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_load_assignment(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 18); }
+UPB_INLINE const struct envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_cluster_v3_Cluster_load_assignment(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(108, 192), const struct envoy_config_endpoint_v3_ClusterLoadAssignment*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_original_dst_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(172, 320)) == 34; }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_OriginalDstLbConfig* envoy_config_cluster_v3_Cluster_original_dst_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_OriginalDstLbConfig*, UPB_SIZE(168, 312), UPB_SIZE(172, 320), 34, NULL); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_typed_extension_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(148, 272)); }
+UPB_INLINE size_t envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_size(const envoy_config_cluster_v3_Cluster *msg) {return _upb_msg_map_size(msg, UPB_SIZE(148, 272)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_get(const envoy_config_cluster_v3_Cluster *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(148, 272), &key, 0, val, sizeof(*val)); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry* envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_next(const envoy_config_cluster_v3_Cluster *msg, size_t* iter) { return (const envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(148, 272), iter); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_least_request_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(172, 320)) == 37; }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig* envoy_config_cluster_v3_Cluster_least_request_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig*, UPB_SIZE(168, 312), UPB_SIZE(172, 320), 37, NULL); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_cluster_type(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(164, 304)) == 38; }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_CustomClusterType* envoy_config_cluster_v3_Cluster_cluster_type(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_CustomClusterType*, UPB_SIZE(160, 296), UPB_SIZE(164, 304), 38, NULL); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_respect_dns_ttl(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_filters(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(152, 280)); }
+UPB_INLINE const struct envoy_config_cluster_v3_Filter* const* envoy_config_cluster_v3_Cluster_filters(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const struct envoy_config_cluster_v3_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(152, 280), len); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_load_balancing_policy(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 19); }
+UPB_INLINE const envoy_config_cluster_v3_LoadBalancingPolicy* envoy_config_cluster_v3_Cluster_load_balancing_policy(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 200), const envoy_config_cluster_v3_LoadBalancingPolicy*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_lrs_server(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 20); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Cluster_lrs_server(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 208), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_transport_socket_matches(const envoy_config_cluster_v3_Cluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(156, 288)); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_TransportSocketMatch* const* envoy_config_cluster_v3_Cluster_transport_socket_matches(const envoy_config_cluster_v3_Cluster *msg, size_t *len) { return (const envoy_config_cluster_v3_Cluster_TransportSocketMatch* const*)_upb_array_accessor(msg, UPB_SIZE(156, 288), len); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_dns_failure_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 21); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_RefreshRate* envoy_config_cluster_v3_Cluster_dns_failure_refresh_rate(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 216), const envoy_config_cluster_v3_Cluster_RefreshRate*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_use_tcp_for_dns_lookups(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 22); }
+UPB_INLINE const struct envoy_config_core_v3_UpstreamHttpProtocolOptions* envoy_config_cluster_v3_Cluster_upstream_http_protocol_options(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(124, 224), const struct envoy_config_core_v3_UpstreamHttpProtocolOptions*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_track_timeout_budgets(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_upstream_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 23); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_cluster_v3_Cluster_upstream_config(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(128, 232), const struct envoy_config_core_v3_TypedExtensionConfig*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_track_cluster_stats(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 24); }
+UPB_INLINE const envoy_config_cluster_v3_TrackClusterStats* envoy_config_cluster_v3_Cluster_track_cluster_stats(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(132, 240), const envoy_config_cluster_v3_TrackClusterStats*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_preconnect_policy(const envoy_config_cluster_v3_Cluster *msg) { return _upb_hasbit(msg, 25); }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_PreconnectPolicy* envoy_config_cluster_v3_Cluster_preconnect_policy(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(136, 248), const envoy_config_cluster_v3_Cluster_PreconnectPolicy*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_connection_pool_per_downstream_connection(const envoy_config_cluster_v3_Cluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_has_maglev_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return _upb_getoneofcase(msg, UPB_SIZE(172, 320)) == 52; }
+UPB_INLINE const envoy_config_cluster_v3_Cluster_MaglevLbConfig* envoy_config_cluster_v3_Cluster_maglev_lb_config(const envoy_config_cluster_v3_Cluster *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_MaglevLbConfig*, UPB_SIZE(168, 312), UPB_SIZE(172, 320), 52, NULL); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_name(envoy_config_cluster_v3_Cluster *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_type(envoy_config_cluster_v3_Cluster *msg, int32_t value) {
- UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(168, 304), value, UPB_SIZE(176, 312), 2);
+ UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(160, 296), value, UPB_SIZE(164, 304), 2);
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_eds_cluster_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_EdsClusterConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(48, 64), envoy_config_cluster_v3_Cluster_EdsClusterConfig*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 56), envoy_config_cluster_v3_Cluster_EdsClusterConfig*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_EdsClusterConfig* envoy_config_cluster_v3_Cluster_mutable_eds_cluster_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_EdsClusterConfig* sub = (struct envoy_config_cluster_v3_Cluster_EdsClusterConfig*)envoy_config_cluster_v3_Cluster_eds_cluster_config(msg);
@@ -355,7 +368,8 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_EdsClusterConfig* envoy_config
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_connect_timeout(envoy_config_cluster_v3_Cluster *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(52, 72), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 64), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_mutable_connect_timeout(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_cluster_v3_Cluster_connect_timeout(msg);
@@ -367,7 +381,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_muta
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_per_connection_buffer_limit_bytes(envoy_config_cluster_v3_Cluster *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(56, 80), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(48, 72), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_mutable_per_connection_buffer_limit_bytes(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_Cluster_per_connection_buffer_limit_bytes(msg);
@@ -379,23 +394,24 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_m
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_lb_policy(envoy_config_cluster_v3_Cluster *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck** envoy_config_cluster_v3_Cluster_mutable_health_checks(envoy_config_cluster_v3_Cluster *msg, size_t *len) {
- return (struct envoy_config_core_v3_HealthCheck**)_upb_array_mutable_accessor(msg, UPB_SIZE(148, 264), len);
+ return (struct envoy_config_core_v3_HealthCheck**)_upb_array_mutable_accessor(msg, UPB_SIZE(140, 256), len);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck** envoy_config_cluster_v3_Cluster_resize_health_checks(envoy_config_cluster_v3_Cluster *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HealthCheck**)_upb_array_resize_accessor(msg, UPB_SIZE(148, 264), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HealthCheck**)_upb_array_resize_accessor2(msg, UPB_SIZE(140, 256), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck* envoy_config_cluster_v3_Cluster_add_health_checks(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck* sub = (struct envoy_config_core_v3_HealthCheck*)_upb_msg_new(&envoy_config_core_v3_HealthCheck_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(148, 264), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(140, 256), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_max_requests_per_connection(envoy_config_cluster_v3_Cluster *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(60, 88), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 80), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_mutable_max_requests_per_connection(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_Cluster_max_requests_per_connection(msg);
@@ -407,7 +423,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_m
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_circuit_breakers(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_cluster_v3_CircuitBreakers* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(64, 96), struct envoy_config_cluster_v3_CircuitBreakers*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(56, 88), struct envoy_config_cluster_v3_CircuitBreakers*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_CircuitBreakers* envoy_config_cluster_v3_Cluster_mutable_circuit_breakers(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_CircuitBreakers* sub = (struct envoy_config_cluster_v3_CircuitBreakers*)envoy_config_cluster_v3_Cluster_circuit_breakers(msg);
@@ -419,7 +436,8 @@ UPB_INLINE struct envoy_config_cluster_v3_CircuitBreakers* envoy_config_cluster_
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_http_protocol_options(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_Http1ProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(68, 104), struct envoy_config_core_v3_Http1ProtocolOptions*) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 96), struct envoy_config_core_v3_Http1ProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Http1ProtocolOptions* envoy_config_cluster_v3_Cluster_mutable_http_protocol_options(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_Http1ProtocolOptions* sub = (struct envoy_config_core_v3_Http1ProtocolOptions*)envoy_config_cluster_v3_Cluster_http_protocol_options(msg);
@@ -431,7 +449,8 @@ UPB_INLINE struct envoy_config_core_v3_Http1ProtocolOptions* envoy_config_cluste
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_http2_protocol_options(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_Http2ProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(72, 112), struct envoy_config_core_v3_Http2ProtocolOptions*) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(64, 104), struct envoy_config_core_v3_Http2ProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions* envoy_config_cluster_v3_Cluster_mutable_http2_protocol_options(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_Http2ProtocolOptions* sub = (struct envoy_config_core_v3_Http2ProtocolOptions*)envoy_config_cluster_v3_Cluster_http2_protocol_options(msg);
@@ -443,7 +462,8 @@ UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions* envoy_config_cluste
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_dns_refresh_rate(envoy_config_cluster_v3_Cluster *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(76, 120), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 112), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_mutable_dns_refresh_rate(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_cluster_v3_Cluster_dns_refresh_rate(msg);
@@ -458,20 +478,21 @@ UPB_INLINE void envoy_config_cluster_v3_Cluster_set_dns_lookup_family(envoy_conf
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE struct envoy_config_core_v3_Address** envoy_config_cluster_v3_Cluster_mutable_dns_resolvers(envoy_config_cluster_v3_Cluster *msg, size_t *len) {
- return (struct envoy_config_core_v3_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(152, 272), len);
+ return (struct envoy_config_core_v3_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(144, 264), len);
}
UPB_INLINE struct envoy_config_core_v3_Address** envoy_config_cluster_v3_Cluster_resize_dns_resolvers(envoy_config_cluster_v3_Cluster *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_Address**)_upb_array_resize_accessor(msg, UPB_SIZE(152, 272), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_Address**)_upb_array_resize_accessor2(msg, UPB_SIZE(144, 264), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_cluster_v3_Cluster_add_dns_resolvers(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)_upb_msg_new(&envoy_config_core_v3_Address_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(152, 272), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(144, 264), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_outlier_detection(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_cluster_v3_OutlierDetection* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(80, 128), struct envoy_config_cluster_v3_OutlierDetection*) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(72, 120), struct envoy_config_cluster_v3_OutlierDetection*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_OutlierDetection* envoy_config_cluster_v3_Cluster_mutable_outlier_detection(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_OutlierDetection* sub = (struct envoy_config_cluster_v3_OutlierDetection*)envoy_config_cluster_v3_Cluster_outlier_detection(msg);
@@ -483,7 +504,8 @@ UPB_INLINE struct envoy_config_cluster_v3_OutlierDetection* envoy_config_cluster
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_cleanup_interval(envoy_config_cluster_v3_Cluster *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(84, 136), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 128), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_mutable_cleanup_interval(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_cluster_v3_Cluster_cleanup_interval(msg);
@@ -495,7 +517,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_muta
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_upstream_bind_config(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_BindConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(88, 144), struct envoy_config_core_v3_BindConfig*) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 136), struct envoy_config_core_v3_BindConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_BindConfig* envoy_config_cluster_v3_Cluster_mutable_upstream_bind_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_BindConfig* sub = (struct envoy_config_core_v3_BindConfig*)envoy_config_cluster_v3_Cluster_upstream_bind_config(msg);
@@ -507,7 +530,8 @@ UPB_INLINE struct envoy_config_core_v3_BindConfig* envoy_config_cluster_v3_Clust
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_lb_subset_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_LbSubsetConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(92, 152), envoy_config_cluster_v3_Cluster_LbSubsetConfig*) = value;
+ _upb_sethas(msg, 12);
+ *UPB_PTR_AT(msg, UPB_SIZE(84, 144), envoy_config_cluster_v3_Cluster_LbSubsetConfig*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_LbSubsetConfig* envoy_config_cluster_v3_Cluster_mutable_lb_subset_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_LbSubsetConfig* sub = (struct envoy_config_cluster_v3_Cluster_LbSubsetConfig*)envoy_config_cluster_v3_Cluster_lb_subset_config(msg);
@@ -519,7 +543,7 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_LbSubsetConfig* envoy_config_c
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_ring_hash_lb_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_RingHashLbConfig* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_RingHashLbConfig*, UPB_SIZE(180, 320), value, UPB_SIZE(184, 328), 23);
+ UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_RingHashLbConfig*, UPB_SIZE(168, 312), value, UPB_SIZE(172, 320), 23);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_RingHashLbConfig* envoy_config_cluster_v3_Cluster_mutable_ring_hash_lb_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_RingHashLbConfig* sub = (struct envoy_config_cluster_v3_Cluster_RingHashLbConfig*)envoy_config_cluster_v3_Cluster_ring_hash_lb_config(msg);
@@ -531,7 +555,8 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_RingHashLbConfig* envoy_config
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_transport_socket(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_TransportSocket* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(96, 160), struct envoy_config_core_v3_TransportSocket*) = value;
+ _upb_sethas(msg, 13);
+ *UPB_PTR_AT(msg, UPB_SIZE(88, 152), struct envoy_config_core_v3_TransportSocket*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_Cluster_mutable_transport_socket(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_TransportSocket* sub = (struct envoy_config_core_v3_TransportSocket*)envoy_config_cluster_v3_Cluster_transport_socket(msg);
@@ -543,7 +568,8 @@ UPB_INLINE struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_metadata(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_Metadata* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(100, 168), struct envoy_config_core_v3_Metadata*) = value;
+ _upb_sethas(msg, 14);
+ *UPB_PTR_AT(msg, UPB_SIZE(92, 160), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_cluster_v3_Cluster_mutable_metadata(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_Metadata* sub = (struct envoy_config_core_v3_Metadata*)envoy_config_cluster_v3_Cluster_metadata(msg);
@@ -555,10 +581,11 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_cluster_v3_Cluster
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_protocol_selection(envoy_config_cluster_v3_Cluster *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_common_lb_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_CommonLbConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(104, 176), envoy_config_cluster_v3_Cluster_CommonLbConfig*) = value;
+ _upb_sethas(msg, 15);
+ *UPB_PTR_AT(msg, UPB_SIZE(96, 168), envoy_config_cluster_v3_Cluster_CommonLbConfig*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_CommonLbConfig* envoy_config_cluster_v3_Cluster_mutable_common_lb_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_CommonLbConfig* sub = (struct envoy_config_cluster_v3_Cluster_CommonLbConfig*)envoy_config_cluster_v3_Cluster_common_lb_config(msg);
@@ -570,10 +597,11 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_CommonLbConfig* envoy_config_c
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_alt_stat_name(envoy_config_cluster_v3_Cluster *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_strview) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_common_http_protocol_options(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_HttpProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(108, 184), struct envoy_config_core_v3_HttpProtocolOptions*) = value;
+ _upb_sethas(msg, 16);
+ *UPB_PTR_AT(msg, UPB_SIZE(100, 176), struct envoy_config_core_v3_HttpProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HttpProtocolOptions* envoy_config_cluster_v3_Cluster_mutable_common_http_protocol_options(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_HttpProtocolOptions* sub = (struct envoy_config_core_v3_HttpProtocolOptions*)envoy_config_cluster_v3_Cluster_common_http_protocol_options(msg);
@@ -585,7 +613,8 @@ UPB_INLINE struct envoy_config_core_v3_HttpProtocolOptions* envoy_config_cluster
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_upstream_connection_options(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_UpstreamConnectionOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(112, 192), envoy_config_cluster_v3_UpstreamConnectionOptions*) = value;
+ _upb_sethas(msg, 17);
+ *UPB_PTR_AT(msg, UPB_SIZE(104, 184), envoy_config_cluster_v3_UpstreamConnectionOptions*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_UpstreamConnectionOptions* envoy_config_cluster_v3_Cluster_mutable_upstream_connection_options(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_UpstreamConnectionOptions* sub = (struct envoy_config_cluster_v3_UpstreamConnectionOptions*)envoy_config_cluster_v3_Cluster_upstream_connection_options(msg);
@@ -597,13 +626,14 @@ UPB_INLINE struct envoy_config_cluster_v3_UpstreamConnectionOptions* envoy_confi
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_close_connections_on_host_health_failure(envoy_config_cluster_v3_Cluster *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_ignore_health_on_host_removal(envoy_config_cluster_v3_Cluster *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_load_assignment(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_endpoint_v3_ClusterLoadAssignment* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(116, 200), struct envoy_config_endpoint_v3_ClusterLoadAssignment*) = value;
+ _upb_sethas(msg, 18);
+ *UPB_PTR_AT(msg, UPB_SIZE(108, 192), struct envoy_config_endpoint_v3_ClusterLoadAssignment*) = value;
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_cluster_v3_Cluster_mutable_load_assignment(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_ClusterLoadAssignment* sub = (struct envoy_config_endpoint_v3_ClusterLoadAssignment*)envoy_config_cluster_v3_Cluster_load_assignment(msg);
@@ -615,7 +645,7 @@ UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment* envoy_config_c
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_original_dst_lb_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_OriginalDstLbConfig* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_OriginalDstLbConfig*, UPB_SIZE(180, 320), value, UPB_SIZE(184, 328), 34);
+ UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_OriginalDstLbConfig*, UPB_SIZE(168, 312), value, UPB_SIZE(172, 320), 34);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_OriginalDstLbConfig* envoy_config_cluster_v3_Cluster_mutable_original_dst_lb_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_OriginalDstLbConfig* sub = (struct envoy_config_cluster_v3_Cluster_OriginalDstLbConfig*)envoy_config_cluster_v3_Cluster_original_dst_lb_config(msg);
@@ -626,12 +656,12 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_OriginalDstLbConfig* envoy_con
}
return sub;
}
-UPB_INLINE void envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_clear(envoy_config_cluster_v3_Cluster *msg) { _upb_msg_map_clear(msg, UPB_SIZE(156, 280)); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_set(envoy_config_cluster_v3_Cluster *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(156, 280), &key, 0, &val, sizeof(val), a); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_delete(envoy_config_cluster_v3_Cluster *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(156, 280), &key, 0); }
-UPB_INLINE envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry* envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_nextmutable(envoy_config_cluster_v3_Cluster *msg, size_t* iter) { return (envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(156, 280), iter); }
+UPB_INLINE void envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_clear(envoy_config_cluster_v3_Cluster *msg) { _upb_msg_map_clear(msg, UPB_SIZE(148, 272)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_set(envoy_config_cluster_v3_Cluster *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(148, 272), &key, 0, &val, sizeof(val), a); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_delete(envoy_config_cluster_v3_Cluster *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(148, 272), &key, 0); }
+UPB_INLINE envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry* envoy_config_cluster_v3_Cluster_typed_extension_protocol_options_nextmutable(envoy_config_cluster_v3_Cluster *msg, size_t* iter) { return (envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(148, 272), iter); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_least_request_lb_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_LeastRequestLbConfig* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_LeastRequestLbConfig*, UPB_SIZE(180, 320), value, UPB_SIZE(184, 328), 37);
+ UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_LeastRequestLbConfig*, UPB_SIZE(168, 312), value, UPB_SIZE(172, 320), 37);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_LeastRequestLbConfig* envoy_config_cluster_v3_Cluster_mutable_least_request_lb_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_LeastRequestLbConfig* sub = (struct envoy_config_cluster_v3_Cluster_LeastRequestLbConfig*)envoy_config_cluster_v3_Cluster_least_request_lb_config(msg);
@@ -643,7 +673,7 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_LeastRequestLbConfig* envoy_co
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_cluster_type(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_CustomClusterType* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_CustomClusterType*, UPB_SIZE(168, 304), value, UPB_SIZE(176, 312), 38);
+ UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_CustomClusterType*, UPB_SIZE(160, 296), value, UPB_SIZE(164, 304), 38);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_CustomClusterType* envoy_config_cluster_v3_Cluster_mutable_cluster_type(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_CustomClusterType* sub = (struct envoy_config_cluster_v3_Cluster_CustomClusterType*)envoy_config_cluster_v3_Cluster_cluster_type(msg);
@@ -655,23 +685,24 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_CustomClusterType* envoy_confi
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_respect_dns_ttl(envoy_config_cluster_v3_Cluster *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_Filter** envoy_config_cluster_v3_Cluster_mutable_filters(envoy_config_cluster_v3_Cluster *msg, size_t *len) {
- return (struct envoy_config_cluster_v3_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(160, 288), len);
+ return (struct envoy_config_cluster_v3_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(152, 280), len);
}
UPB_INLINE struct envoy_config_cluster_v3_Filter** envoy_config_cluster_v3_Cluster_resize_filters(envoy_config_cluster_v3_Cluster *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_cluster_v3_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(160, 288), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_cluster_v3_Filter**)_upb_array_resize_accessor2(msg, UPB_SIZE(152, 280), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_cluster_v3_Filter* envoy_config_cluster_v3_Cluster_add_filters(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Filter* sub = (struct envoy_config_cluster_v3_Filter*)_upb_msg_new(&envoy_config_cluster_v3_Filter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(160, 288), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(152, 280), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_load_balancing_policy(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_LoadBalancingPolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(120, 208), envoy_config_cluster_v3_LoadBalancingPolicy*) = value;
+ _upb_sethas(msg, 19);
+ *UPB_PTR_AT(msg, UPB_SIZE(112, 200), envoy_config_cluster_v3_LoadBalancingPolicy*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_LoadBalancingPolicy* envoy_config_cluster_v3_Cluster_mutable_load_balancing_policy(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_LoadBalancingPolicy* sub = (struct envoy_config_cluster_v3_LoadBalancingPolicy*)envoy_config_cluster_v3_Cluster_load_balancing_policy(msg);
@@ -683,7 +714,8 @@ UPB_INLINE struct envoy_config_cluster_v3_LoadBalancingPolicy* envoy_config_clus
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_lrs_server(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(124, 216), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 20);
+ *UPB_PTR_AT(msg, UPB_SIZE(116, 208), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Cluster_mutable_lrs_server(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_cluster_v3_Cluster_lrs_server(msg);
@@ -695,20 +727,21 @@ UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Clu
return sub;
}
UPB_INLINE envoy_config_cluster_v3_Cluster_TransportSocketMatch** envoy_config_cluster_v3_Cluster_mutable_transport_socket_matches(envoy_config_cluster_v3_Cluster *msg, size_t *len) {
- return (envoy_config_cluster_v3_Cluster_TransportSocketMatch**)_upb_array_mutable_accessor(msg, UPB_SIZE(164, 296), len);
+ return (envoy_config_cluster_v3_Cluster_TransportSocketMatch**)_upb_array_mutable_accessor(msg, UPB_SIZE(156, 288), len);
}
UPB_INLINE envoy_config_cluster_v3_Cluster_TransportSocketMatch** envoy_config_cluster_v3_Cluster_resize_transport_socket_matches(envoy_config_cluster_v3_Cluster *msg, size_t len, upb_arena *arena) {
- return (envoy_config_cluster_v3_Cluster_TransportSocketMatch**)_upb_array_resize_accessor(msg, UPB_SIZE(164, 296), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_cluster_v3_Cluster_TransportSocketMatch**)_upb_array_resize_accessor2(msg, UPB_SIZE(156, 288), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_TransportSocketMatch* envoy_config_cluster_v3_Cluster_add_transport_socket_matches(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_TransportSocketMatch* sub = (struct envoy_config_cluster_v3_Cluster_TransportSocketMatch*)_upb_msg_new(&envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(164, 296), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(156, 288), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_dns_failure_refresh_rate(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_RefreshRate* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(128, 224), envoy_config_cluster_v3_Cluster_RefreshRate*) = value;
+ _upb_sethas(msg, 21);
+ *UPB_PTR_AT(msg, UPB_SIZE(120, 216), envoy_config_cluster_v3_Cluster_RefreshRate*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_RefreshRate* envoy_config_cluster_v3_Cluster_mutable_dns_failure_refresh_rate(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_RefreshRate* sub = (struct envoy_config_cluster_v3_Cluster_RefreshRate*)envoy_config_cluster_v3_Cluster_dns_failure_refresh_rate(msg);
@@ -720,10 +753,11 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_RefreshRate* envoy_config_clus
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_use_tcp_for_dns_lookups(envoy_config_cluster_v3_Cluster *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_upstream_http_protocol_options(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_UpstreamHttpProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(132, 232), struct envoy_config_core_v3_UpstreamHttpProtocolOptions*) = value;
+ _upb_sethas(msg, 22);
+ *UPB_PTR_AT(msg, UPB_SIZE(124, 224), struct envoy_config_core_v3_UpstreamHttpProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_UpstreamHttpProtocolOptions* envoy_config_cluster_v3_Cluster_mutable_upstream_http_protocol_options(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_UpstreamHttpProtocolOptions* sub = (struct envoy_config_core_v3_UpstreamHttpProtocolOptions*)envoy_config_cluster_v3_Cluster_upstream_http_protocol_options(msg);
@@ -735,10 +769,11 @@ UPB_INLINE struct envoy_config_core_v3_UpstreamHttpProtocolOptions* envoy_config
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_track_timeout_budgets(envoy_config_cluster_v3_Cluster *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_upstream_config(envoy_config_cluster_v3_Cluster *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(136, 240), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
+ _upb_sethas(msg, 23);
+ *UPB_PTR_AT(msg, UPB_SIZE(128, 232), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_cluster_v3_Cluster_mutable_upstream_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_config_cluster_v3_Cluster_upstream_config(msg);
@@ -750,7 +785,8 @@ UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_cluste
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_track_cluster_stats(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_TrackClusterStats* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(140, 248), envoy_config_cluster_v3_TrackClusterStats*) = value;
+ _upb_sethas(msg, 24);
+ *UPB_PTR_AT(msg, UPB_SIZE(132, 240), envoy_config_cluster_v3_TrackClusterStats*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_TrackClusterStats* envoy_config_cluster_v3_Cluster_mutable_track_cluster_stats(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_TrackClusterStats* sub = (struct envoy_config_cluster_v3_TrackClusterStats*)envoy_config_cluster_v3_Cluster_track_cluster_stats(msg);
@@ -761,23 +797,24 @@ UPB_INLINE struct envoy_config_cluster_v3_TrackClusterStats* envoy_config_cluste
}
return sub;
}
-UPB_INLINE void envoy_config_cluster_v3_Cluster_set_prefetch_policy(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_PrefetchPolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(144, 256), envoy_config_cluster_v3_Cluster_PrefetchPolicy*) = value;
+UPB_INLINE void envoy_config_cluster_v3_Cluster_set_preconnect_policy(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_PreconnectPolicy* value) {
+ _upb_sethas(msg, 25);
+ *UPB_PTR_AT(msg, UPB_SIZE(136, 248), envoy_config_cluster_v3_Cluster_PreconnectPolicy*) = value;
}
-UPB_INLINE struct envoy_config_cluster_v3_Cluster_PrefetchPolicy* envoy_config_cluster_v3_Cluster_mutable_prefetch_policy(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
- struct envoy_config_cluster_v3_Cluster_PrefetchPolicy* sub = (struct envoy_config_cluster_v3_Cluster_PrefetchPolicy*)envoy_config_cluster_v3_Cluster_prefetch_policy(msg);
+UPB_INLINE struct envoy_config_cluster_v3_Cluster_PreconnectPolicy* envoy_config_cluster_v3_Cluster_mutable_preconnect_policy(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
+ struct envoy_config_cluster_v3_Cluster_PreconnectPolicy* sub = (struct envoy_config_cluster_v3_Cluster_PreconnectPolicy*)envoy_config_cluster_v3_Cluster_preconnect_policy(msg);
if (sub == NULL) {
- sub = (struct envoy_config_cluster_v3_Cluster_PrefetchPolicy*)_upb_msg_new(&envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit, arena);
+ sub = (struct envoy_config_cluster_v3_Cluster_PreconnectPolicy*)_upb_msg_new(&envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit, arena);
if (!sub) return NULL;
- envoy_config_cluster_v3_Cluster_set_prefetch_policy(msg, sub);
+ envoy_config_cluster_v3_Cluster_set_preconnect_policy(msg, sub);
}
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_connection_pool_per_downstream_connection(envoy_config_cluster_v3_Cluster *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(29, 29), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_set_maglev_lb_config(envoy_config_cluster_v3_Cluster *msg, envoy_config_cluster_v3_Cluster_MaglevLbConfig* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_MaglevLbConfig*, UPB_SIZE(180, 320), value, UPB_SIZE(184, 328), 52);
+ UPB_WRITE_ONEOF(msg, envoy_config_cluster_v3_Cluster_MaglevLbConfig*, UPB_SIZE(168, 312), value, UPB_SIZE(172, 320), 52);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_MaglevLbConfig* envoy_config_cluster_v3_Cluster_mutable_maglev_lb_config(envoy_config_cluster_v3_Cluster *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_MaglevLbConfig* sub = (struct envoy_config_cluster_v3_Cluster_MaglevLbConfig*)envoy_config_cluster_v3_Cluster_maglev_lb_config(msg);
@@ -799,21 +836,28 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_TransportSocketMatch *envoy_config_cl
envoy_config_cluster_v3_Cluster_TransportSocketMatch *ret = envoy_config_cluster_v3_Cluster_TransportSocketMatch_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_TransportSocketMatch *envoy_config_cluster_v3_Cluster_TransportSocketMatch_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_TransportSocketMatch *ret = envoy_config_cluster_v3_Cluster_TransportSocketMatch_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_TransportSocketMatch_serialize(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_TransportSocketMatch_name(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_TransportSocketMatch_has_match(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_cluster_v3_Cluster_TransportSocketMatch_match(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Struct*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_TransportSocketMatch_has_transport_socket(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_Cluster_TransportSocketMatch_transport_socket(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_TransportSocket*); }
+UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_TransportSocketMatch_name(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_TransportSocketMatch_has_match(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_cluster_v3_Cluster_TransportSocketMatch_match(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Struct*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_TransportSocketMatch_has_transport_socket(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_Cluster_TransportSocketMatch_transport_socket(const envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_TransportSocket*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_TransportSocketMatch_set_name(envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_TransportSocketMatch_set_match(envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg, struct google_protobuf_Struct* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Struct*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_cluster_v3_Cluster_TransportSocketMatch_mutable_match(envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_cluster_v3_Cluster_TransportSocketMatch_match(msg);
@@ -825,7 +869,8 @@ UPB_INLINE struct google_protobuf_Struct* envoy_config_cluster_v3_Cluster_Transp
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_TransportSocketMatch_set_transport_socket(envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg, struct envoy_config_core_v3_TransportSocket* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_TransportSocket*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_TransportSocket*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TransportSocket* envoy_config_cluster_v3_Cluster_TransportSocketMatch_mutable_transport_socket(envoy_config_cluster_v3_Cluster_TransportSocketMatch *msg, upb_arena *arena) {
struct envoy_config_core_v3_TransportSocket* sub = (struct envoy_config_core_v3_TransportSocket*)envoy_config_cluster_v3_Cluster_TransportSocketMatch_transport_socket(msg);
@@ -847,19 +892,26 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_CustomClusterType *envoy_config_clust
envoy_config_cluster_v3_Cluster_CustomClusterType *ret = envoy_config_cluster_v3_Cluster_CustomClusterType_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CustomClusterType_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_CustomClusterType *envoy_config_cluster_v3_Cluster_CustomClusterType_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_CustomClusterType *ret = envoy_config_cluster_v3_Cluster_CustomClusterType_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CustomClusterType_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_CustomClusterType_serialize(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_CustomClusterType_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_CustomClusterType_name(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CustomClusterType_has_typed_config(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_Cluster_CustomClusterType_typed_config(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); }
+UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_CustomClusterType_name(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CustomClusterType_has_typed_config(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_Cluster_CustomClusterType_typed_config(const envoy_config_cluster_v3_Cluster_CustomClusterType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_CustomClusterType_set_name(envoy_config_cluster_v3_Cluster_CustomClusterType *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CustomClusterType_set_typed_config(envoy_config_cluster_v3_Cluster_CustomClusterType *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_cluster_v3_Cluster_CustomClusterType_mutable_typed_config(envoy_config_cluster_v3_Cluster_CustomClusterType *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_cluster_v3_Cluster_CustomClusterType_typed_config(msg);
@@ -881,18 +933,23 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_EdsClusterConfig *envoy_config_cluste
envoy_config_cluster_v3_Cluster_EdsClusterConfig *ret = envoy_config_cluster_v3_Cluster_EdsClusterConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_EdsClusterConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_EdsClusterConfig *envoy_config_cluster_v3_Cluster_EdsClusterConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_EdsClusterConfig *ret = envoy_config_cluster_v3_Cluster_EdsClusterConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_EdsClusterConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_EdsClusterConfig_serialize(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_EdsClusterConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_EdsClusterConfig_has_eds_config(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_ConfigSource*); }
-UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_EdsClusterConfig_has_eds_resource_locator(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct udpa_core_v1_ResourceLocator* envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_resource_locator(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct udpa_core_v1_ResourceLocator*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_EdsClusterConfig_has_eds_config(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE upb_strview envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name(const envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_EdsClusterConfig_set_eds_config(envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Cluster_EdsClusterConfig_mutable_eds_config(envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(msg);
@@ -904,19 +961,7 @@ UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_cluster_v3_Clu
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_EdsClusterConfig_set_service_name(envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
-}
-UPB_INLINE void envoy_config_cluster_v3_Cluster_EdsClusterConfig_set_eds_resource_locator(envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg, struct udpa_core_v1_ResourceLocator* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct udpa_core_v1_ResourceLocator*) = value;
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* envoy_config_cluster_v3_Cluster_EdsClusterConfig_mutable_eds_resource_locator(envoy_config_cluster_v3_Cluster_EdsClusterConfig *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_resource_locator(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- if (!sub) return NULL;
- envoy_config_cluster_v3_Cluster_EdsClusterConfig_set_eds_resource_locator(msg, sub);
- }
- return sub;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
/* envoy.config.cluster.v3.Cluster.LbSubsetConfig */
@@ -929,12 +974,18 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_LbSubsetConfig *envoy_config_cluster_
envoy_config_cluster_v3_Cluster_LbSubsetConfig *ret = envoy_config_cluster_v3_Cluster_LbSubsetConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_LbSubsetConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_LbSubsetConfig *envoy_config_cluster_v3_Cluster_LbSubsetConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_LbSubsetConfig *ret = envoy_config_cluster_v3_Cluster_LbSubsetConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_LbSubsetConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_LbSubsetConfig_serialize(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_LbSubsetConfig_msginit, arena, len);
}
-UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_LbSubsetConfig_fallback_policy(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_has_default_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_LbSubsetConfig_fallback_policy(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_has_default_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_Struct* envoy_config_cluster_v3_Cluster_LbSubsetConfig_default_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_Struct*); }
UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_has_subset_selectors(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
UPB_INLINE const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector* const* envoy_config_cluster_v3_Cluster_LbSubsetConfig_subset_selectors(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, size_t *len) { return (const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector* const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len); }
@@ -944,9 +995,10 @@ UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_panic_mode_any(co
UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_list_as_any(const envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_LbSubsetConfig_set_fallback_policy(envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_LbSubsetConfig_set_default_subset(envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, struct google_protobuf_Struct* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_cluster_v3_Cluster_LbSubsetConfig_mutable_default_subset(envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, upb_arena *arena) {
@@ -962,12 +1014,12 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector** env
return (envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len);
}
UPB_INLINE envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector** envoy_config_cluster_v3_Cluster_LbSubsetConfig_resize_subset_selectors(envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, size_t len, upb_arena *arena) {
- return (envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 24), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector* envoy_config_cluster_v3_Cluster_LbSubsetConfig_add_subset_selectors(envoy_config_cluster_v3_Cluster_LbSubsetConfig *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector* sub = (struct envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector*)_upb_msg_new(&envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 24), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -994,40 +1046,46 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *envo
envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *ret = envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *ret = envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_serialize(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit, arena, len);
}
-UPB_INLINE upb_strview const* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
+UPB_INLINE upb_strview const* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_keys(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); }
UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_policy(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE upb_strview const* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_keys_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_single_host_per_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE upb_strview const* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_fallback_keys_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_single_host_per_subset(const envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE upb_strview* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_keys(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE upb_strview* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_resize_keys(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_add_keys(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(12, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(8, 8), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_set_fallback_policy(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}
UPB_INLINE upb_strview* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_mutable_fallback_keys_subset(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE upb_strview* envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_resize_fallback_keys_subset(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_add_fallback_keys_subset(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(16, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(12, 16), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_set_single_host_per_subset(envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
/* envoy.config.cluster.v3.Cluster.LeastRequestLbConfig */
@@ -1040,17 +1098,24 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *envoy_config_cl
envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *ret = envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *ret = envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_serialize(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_has_choice_count(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_choice_count(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_has_active_request_bias(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_core_v3_RuntimeDouble* envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_active_request_bias(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_RuntimeDouble*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_has_choice_count(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_choice_count(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_has_active_request_bias(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_RuntimeDouble* envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_active_request_bias(const envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_RuntimeDouble*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_set_choice_count(envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_mutable_choice_count(envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_choice_count(msg);
@@ -1062,7 +1127,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_L
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_set_active_request_bias(envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg, struct envoy_config_core_v3_RuntimeDouble* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_RuntimeDouble*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_RuntimeDouble*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RuntimeDouble* envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_mutable_active_request_bias(envoy_config_cluster_v3_Cluster_LeastRequestLbConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_RuntimeDouble* sub = (struct envoy_config_core_v3_RuntimeDouble*)envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_active_request_bias(msg);
@@ -1084,17 +1150,24 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_RingHashLbConfig *envoy_config_cluste
envoy_config_cluster_v3_Cluster_RingHashLbConfig *ret = envoy_config_cluster_v3_Cluster_RingHashLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_RingHashLbConfig *envoy_config_cluster_v3_Cluster_RingHashLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_RingHashLbConfig *ret = envoy_config_cluster_v3_Cluster_RingHashLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_RingHashLbConfig_serialize(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_RingHashLbConfig_has_minimum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_RingHashLbConfig_has_minimum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_RingHashLbConfig_minimum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_UInt64Value*); }
-UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_RingHashLbConfig_hash_function(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_RingHashLbConfig_has_maximum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE int32_t envoy_config_cluster_v3_Cluster_RingHashLbConfig_hash_function(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_RingHashLbConfig_has_maximum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_RingHashLbConfig_maximum_ring_size(const envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt64Value*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_RingHashLbConfig_set_minimum_ring_size(envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg, struct google_protobuf_UInt64Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_UInt64Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_RingHashLbConfig_mutable_minimum_ring_size(envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg, upb_arena *arena) {
@@ -1107,9 +1180,10 @@ UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_R
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_RingHashLbConfig_set_hash_function(envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_RingHashLbConfig_set_maximum_ring_size(envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg, struct google_protobuf_UInt64Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt64Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_RingHashLbConfig_mutable_maximum_ring_size(envoy_config_cluster_v3_Cluster_RingHashLbConfig *msg, upb_arena *arena) {
@@ -1132,15 +1206,22 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_MaglevLbConfig *envoy_config_cluster_
envoy_config_cluster_v3_Cluster_MaglevLbConfig *ret = envoy_config_cluster_v3_Cluster_MaglevLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_MaglevLbConfig *envoy_config_cluster_v3_Cluster_MaglevLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_MaglevLbConfig *ret = envoy_config_cluster_v3_Cluster_MaglevLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_MaglevLbConfig_serialize(const envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_MaglevLbConfig_has_table_size(const envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_MaglevLbConfig_table_size(const envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt64Value*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_MaglevLbConfig_has_table_size(const envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_MaglevLbConfig_table_size(const envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt64Value*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_MaglevLbConfig_set_table_size(envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg, struct google_protobuf_UInt64Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt64Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt64Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_MaglevLbConfig_mutable_table_size(envoy_config_cluster_v3_Cluster_MaglevLbConfig *msg, upb_arena *arena) {
struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_config_cluster_v3_Cluster_MaglevLbConfig_table_size(msg);
@@ -1162,6 +1243,12 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_OriginalDstLbConfig *envoy_config_clu
envoy_config_cluster_v3_Cluster_OriginalDstLbConfig *ret = envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_OriginalDstLbConfig *envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_OriginalDstLbConfig *ret = envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_serialize(const envoy_config_cluster_v3_Cluster_OriginalDstLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit, arena, len);
}
@@ -1182,6 +1269,12 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig *envoy_config_cluster_
envoy_config_cluster_v3_Cluster_CommonLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig *envoy_config_cluster_v3_Cluster_CommonLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_CommonLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_CommonLbConfig_serialize(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit, arena, len);
}
@@ -1193,20 +1286,21 @@ typedef enum {
} envoy_config_cluster_v3_Cluster_CommonLbConfig_locality_config_specifier_oneofcases;
UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_locality_config_specifier_oneofcases envoy_config_cluster_v3_Cluster_CommonLbConfig_locality_config_specifier_case(const envoy_config_cluster_v3_Cluster_CommonLbConfig* msg) { return (envoy_config_cluster_v3_Cluster_CommonLbConfig_locality_config_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_healthy_panic_threshold(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_healthy_panic_threshold(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_cluster_v3_Cluster_CommonLbConfig_healthy_panic_threshold(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_Percent*); }
UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_zone_aware_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 2; }
UPB_INLINE const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig* envoy_config_cluster_v3_Cluster_CommonLbConfig_zone_aware_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 2, NULL); }
UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_locality_weighted_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 3; }
UPB_INLINE const envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig* envoy_config_cluster_v3_Cluster_CommonLbConfig_locality_weighted_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return UPB_READ_ONEOF(msg, const envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, NULL); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_update_merge_window(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_update_merge_window(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_CommonLbConfig_update_merge_window(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ignore_new_hosts_until_first_hc(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_close_connections_on_host_set_change(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_consistent_hashing_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ignore_new_hosts_until_first_hc(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_close_connections_on_host_set_change(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_has_consistent_hashing_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig* envoy_config_cluster_v3_Cluster_CommonLbConfig_consistent_hashing_lb_config(const envoy_config_cluster_v3_Cluster_CommonLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_set_healthy_panic_threshold(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_config_cluster_v3_Cluster_CommonLbConfig_mutable_healthy_panic_threshold(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, upb_arena *arena) {
@@ -1243,6 +1337,7 @@ UPB_INLINE struct envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeighte
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_set_update_merge_window(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_CommonLbConfig_mutable_update_merge_window(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, upb_arena *arena) {
@@ -1255,12 +1350,13 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_Comm
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_set_ignore_new_hosts_until_first_hc(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_set_close_connections_on_host_set_change(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_set_consistent_hashing_lb_config(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig*) = value;
}
UPB_INLINE struct envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig* envoy_config_cluster_v3_Cluster_CommonLbConfig_mutable_consistent_hashing_lb_config(envoy_config_cluster_v3_Cluster_CommonLbConfig *msg, upb_arena *arena) {
@@ -1283,17 +1379,24 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *env
envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_serialize(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_has_routing_enabled(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_has_routing_enabled(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_routing_enabled(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_Percent*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_has_min_cluster_size(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_has_min_cluster_size(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_min_cluster_size(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt64Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_fail_traffic_on_panic(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_fail_traffic_on_panic(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_routing_enabled(envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_mutable_routing_enabled(envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena) {
@@ -1306,6 +1409,7 @@ UPB_INLINE struct envoy_type_v3_Percent* envoy_config_cluster_v3_Cluster_CommonL
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_min_cluster_size(envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, struct google_protobuf_UInt64Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt64Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_mutable_min_cluster_size(envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, upb_arena *arena) {
@@ -1318,7 +1422,7 @@ UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_cluster_v3_Cluster_C
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_set_fail_traffic_on_panic(envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig */
@@ -1331,6 +1435,12 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConf
envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig *envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_serialize(const envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit, arena, len);
}
@@ -1347,18 +1457,25 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbCon
envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *ret = envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_serialize(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_use_hostname_for_hashing(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_has_hash_balance_factor(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_use_hostname_for_hashing(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_has_hash_balance_factor(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_hash_balance_factor(const envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_set_use_hostname_for_hashing(envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_set_hash_balance_factor(envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_mutable_hash_balance_factor(envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig *msg, upb_arena *arena) {
@@ -1381,17 +1498,24 @@ UPB_INLINE envoy_config_cluster_v3_Cluster_RefreshRate *envoy_config_cluster_v3_
envoy_config_cluster_v3_Cluster_RefreshRate *ret = envoy_config_cluster_v3_Cluster_RefreshRate_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_RefreshRate_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Cluster_RefreshRate *envoy_config_cluster_v3_Cluster_RefreshRate_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_RefreshRate *ret = envoy_config_cluster_v3_Cluster_RefreshRate_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_RefreshRate_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Cluster_RefreshRate_serialize(const envoy_config_cluster_v3_Cluster_RefreshRate *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Cluster_RefreshRate_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_RefreshRate_has_base_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_RefreshRate_base_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_RefreshRate_has_max_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_RefreshRate_max_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_RefreshRate_has_base_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_RefreshRate_base_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_RefreshRate_has_max_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_RefreshRate_max_interval(const envoy_config_cluster_v3_Cluster_RefreshRate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_cluster_v3_Cluster_RefreshRate_set_base_interval(envoy_config_cluster_v3_Cluster_RefreshRate *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_RefreshRate_mutable_base_interval(envoy_config_cluster_v3_Cluster_RefreshRate *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_cluster_v3_Cluster_RefreshRate_base_interval(msg);
@@ -1403,7 +1527,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_Refr
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_Cluster_RefreshRate_set_max_interval(envoy_config_cluster_v3_Cluster_RefreshRate *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_RefreshRate_mutable_max_interval(envoy_config_cluster_v3_Cluster_RefreshRate *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_cluster_v3_Cluster_RefreshRate_max_interval(msg);
@@ -1415,46 +1540,54 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_Cluster_Refr
return sub;
}
-/* envoy.config.cluster.v3.Cluster.PrefetchPolicy */
+/* envoy.config.cluster.v3.Cluster.PreconnectPolicy */
-UPB_INLINE envoy_config_cluster_v3_Cluster_PrefetchPolicy *envoy_config_cluster_v3_Cluster_PrefetchPolicy_new(upb_arena *arena) {
- return (envoy_config_cluster_v3_Cluster_PrefetchPolicy *)_upb_msg_new(&envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit, arena);
+UPB_INLINE envoy_config_cluster_v3_Cluster_PreconnectPolicy *envoy_config_cluster_v3_Cluster_PreconnectPolicy_new(upb_arena *arena) {
+ return (envoy_config_cluster_v3_Cluster_PreconnectPolicy *)_upb_msg_new(&envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit, arena);
}
-UPB_INLINE envoy_config_cluster_v3_Cluster_PrefetchPolicy *envoy_config_cluster_v3_Cluster_PrefetchPolicy_parse(const char *buf, size_t size,
+UPB_INLINE envoy_config_cluster_v3_Cluster_PreconnectPolicy *envoy_config_cluster_v3_Cluster_PreconnectPolicy_parse(const char *buf, size_t size,
upb_arena *arena) {
- envoy_config_cluster_v3_Cluster_PrefetchPolicy *ret = envoy_config_cluster_v3_Cluster_PrefetchPolicy_new(arena);
- return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit, arena)) ? ret : NULL;
+ envoy_config_cluster_v3_Cluster_PreconnectPolicy *ret = envoy_config_cluster_v3_Cluster_PreconnectPolicy_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_cluster_v3_Cluster_PreconnectPolicy *envoy_config_cluster_v3_Cluster_PreconnectPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Cluster_PreconnectPolicy *ret = envoy_config_cluster_v3_Cluster_PreconnectPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit, arena, options))
+ ? ret : NULL;
}
-UPB_INLINE char *envoy_config_cluster_v3_Cluster_PrefetchPolicy_serialize(const envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &envoy_config_cluster_v3_Cluster_PrefetchPolicy_msginit, arena, len);
+UPB_INLINE char *envoy_config_cluster_v3_Cluster_PreconnectPolicy_serialize(const envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_PrefetchPolicy_has_per_upstream_prefetch_ratio(const envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PrefetchPolicy_per_upstream_prefetch_ratio(const envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_DoubleValue*); }
-UPB_INLINE bool envoy_config_cluster_v3_Cluster_PrefetchPolicy_has_predictive_prefetch_ratio(const envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PrefetchPolicy_predictive_prefetch_ratio(const envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_DoubleValue*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_PreconnectPolicy_has_per_upstream_preconnect_ratio(const envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PreconnectPolicy_per_upstream_preconnect_ratio(const envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_DoubleValue*); }
+UPB_INLINE bool envoy_config_cluster_v3_Cluster_PreconnectPolicy_has_predictive_preconnect_ratio(const envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PreconnectPolicy_predictive_preconnect_ratio(const envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_DoubleValue*); }
-UPB_INLINE void envoy_config_cluster_v3_Cluster_PrefetchPolicy_set_per_upstream_prefetch_ratio(envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg, struct google_protobuf_DoubleValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_DoubleValue*) = value;
+UPB_INLINE void envoy_config_cluster_v3_Cluster_PreconnectPolicy_set_per_upstream_preconnect_ratio(envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg, struct google_protobuf_DoubleValue* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_DoubleValue*) = value;
}
-UPB_INLINE struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PrefetchPolicy_mutable_per_upstream_prefetch_ratio(envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg, upb_arena *arena) {
- struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_config_cluster_v3_Cluster_PrefetchPolicy_per_upstream_prefetch_ratio(msg);
+UPB_INLINE struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PreconnectPolicy_mutable_per_upstream_preconnect_ratio(envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg, upb_arena *arena) {
+ struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_config_cluster_v3_Cluster_PreconnectPolicy_per_upstream_preconnect_ratio(msg);
if (sub == NULL) {
sub = (struct google_protobuf_DoubleValue*)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
if (!sub) return NULL;
- envoy_config_cluster_v3_Cluster_PrefetchPolicy_set_per_upstream_prefetch_ratio(msg, sub);
+ envoy_config_cluster_v3_Cluster_PreconnectPolicy_set_per_upstream_preconnect_ratio(msg, sub);
}
return sub;
}
-UPB_INLINE void envoy_config_cluster_v3_Cluster_PrefetchPolicy_set_predictive_prefetch_ratio(envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg, struct google_protobuf_DoubleValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_DoubleValue*) = value;
+UPB_INLINE void envoy_config_cluster_v3_Cluster_PreconnectPolicy_set_predictive_preconnect_ratio(envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg, struct google_protobuf_DoubleValue* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_DoubleValue*) = value;
}
-UPB_INLINE struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PrefetchPolicy_mutable_predictive_prefetch_ratio(envoy_config_cluster_v3_Cluster_PrefetchPolicy *msg, upb_arena *arena) {
- struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_config_cluster_v3_Cluster_PrefetchPolicy_predictive_prefetch_ratio(msg);
+UPB_INLINE struct google_protobuf_DoubleValue* envoy_config_cluster_v3_Cluster_PreconnectPolicy_mutable_predictive_preconnect_ratio(envoy_config_cluster_v3_Cluster_PreconnectPolicy *msg, upb_arena *arena) {
+ struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_config_cluster_v3_Cluster_PreconnectPolicy_predictive_preconnect_ratio(msg);
if (sub == NULL) {
sub = (struct google_protobuf_DoubleValue*)_upb_msg_new(&google_protobuf_DoubleValue_msginit, arena);
if (!sub) return NULL;
- envoy_config_cluster_v3_Cluster_PrefetchPolicy_set_predictive_prefetch_ratio(msg, sub);
+ envoy_config_cluster_v3_Cluster_PreconnectPolicy_set_predictive_preconnect_ratio(msg, sub);
}
return sub;
}
@@ -1487,6 +1620,12 @@ UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy *envoy_config_cluster_v3_
envoy_config_cluster_v3_LoadBalancingPolicy *ret = envoy_config_cluster_v3_LoadBalancingPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_LoadBalancingPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy *envoy_config_cluster_v3_LoadBalancingPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_LoadBalancingPolicy *ret = envoy_config_cluster_v3_LoadBalancingPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_LoadBalancingPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_LoadBalancingPolicy_serialize(const envoy_config_cluster_v3_LoadBalancingPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_LoadBalancingPolicy_msginit, arena, len);
}
@@ -1498,12 +1637,12 @@ UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy_Policy** envoy_config_clu
return (envoy_config_cluster_v3_LoadBalancingPolicy_Policy**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy_Policy** envoy_config_cluster_v3_LoadBalancingPolicy_resize_policies(envoy_config_cluster_v3_LoadBalancingPolicy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_cluster_v3_LoadBalancingPolicy_Policy**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_cluster_v3_LoadBalancingPolicy_Policy**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_cluster_v3_LoadBalancingPolicy_Policy* envoy_config_cluster_v3_LoadBalancingPolicy_add_policies(envoy_config_cluster_v3_LoadBalancingPolicy *msg, upb_arena *arena) {
struct envoy_config_cluster_v3_LoadBalancingPolicy_Policy* sub = (struct envoy_config_cluster_v3_LoadBalancingPolicy_Policy*)_upb_msg_new(&envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1518,19 +1657,26 @@ UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy_Policy *envoy_config_clus
envoy_config_cluster_v3_LoadBalancingPolicy_Policy *ret = envoy_config_cluster_v3_LoadBalancingPolicy_Policy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_LoadBalancingPolicy_Policy *envoy_config_cluster_v3_LoadBalancingPolicy_Policy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_LoadBalancingPolicy_Policy *ret = envoy_config_cluster_v3_LoadBalancingPolicy_Policy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_LoadBalancingPolicy_Policy_serialize(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_cluster_v3_LoadBalancingPolicy_Policy_name(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_LoadBalancingPolicy_Policy_has_typed_config(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_LoadBalancingPolicy_Policy_typed_config(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); }
+UPB_INLINE upb_strview envoy_config_cluster_v3_LoadBalancingPolicy_Policy_name(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_cluster_v3_LoadBalancingPolicy_Policy_has_typed_config(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_LoadBalancingPolicy_Policy_typed_config(const envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_cluster_v3_LoadBalancingPolicy_Policy_set_name(envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_cluster_v3_LoadBalancingPolicy_Policy_set_typed_config(envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_cluster_v3_LoadBalancingPolicy_Policy_mutable_typed_config(envoy_config_cluster_v3_LoadBalancingPolicy_Policy *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_cluster_v3_LoadBalancingPolicy_Policy_typed_config(msg);
@@ -1552,15 +1698,22 @@ UPB_INLINE envoy_config_cluster_v3_UpstreamBindConfig *envoy_config_cluster_v3_U
envoy_config_cluster_v3_UpstreamBindConfig *ret = envoy_config_cluster_v3_UpstreamBindConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_UpstreamBindConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_UpstreamBindConfig *envoy_config_cluster_v3_UpstreamBindConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_UpstreamBindConfig *ret = envoy_config_cluster_v3_UpstreamBindConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_UpstreamBindConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_UpstreamBindConfig_serialize(const envoy_config_cluster_v3_UpstreamBindConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_UpstreamBindConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_UpstreamBindConfig_has_source_address(const envoy_config_cluster_v3_UpstreamBindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_cluster_v3_UpstreamBindConfig_source_address(const envoy_config_cluster_v3_UpstreamBindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_Address*); }
+UPB_INLINE bool envoy_config_cluster_v3_UpstreamBindConfig_has_source_address(const envoy_config_cluster_v3_UpstreamBindConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_cluster_v3_UpstreamBindConfig_source_address(const envoy_config_cluster_v3_UpstreamBindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_Address*); }
UPB_INLINE void envoy_config_cluster_v3_UpstreamBindConfig_set_source_address(envoy_config_cluster_v3_UpstreamBindConfig *msg, struct envoy_config_core_v3_Address* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_Address*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_Address*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_cluster_v3_UpstreamBindConfig_mutable_source_address(envoy_config_cluster_v3_UpstreamBindConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_cluster_v3_UpstreamBindConfig_source_address(msg);
@@ -1582,15 +1735,22 @@ UPB_INLINE envoy_config_cluster_v3_UpstreamConnectionOptions *envoy_config_clust
envoy_config_cluster_v3_UpstreamConnectionOptions *ret = envoy_config_cluster_v3_UpstreamConnectionOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_UpstreamConnectionOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_UpstreamConnectionOptions *envoy_config_cluster_v3_UpstreamConnectionOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_UpstreamConnectionOptions *ret = envoy_config_cluster_v3_UpstreamConnectionOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_UpstreamConnectionOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_UpstreamConnectionOptions_serialize(const envoy_config_cluster_v3_UpstreamConnectionOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_UpstreamConnectionOptions_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_UpstreamConnectionOptions_has_tcp_keepalive(const envoy_config_cluster_v3_UpstreamConnectionOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_TcpKeepalive* envoy_config_cluster_v3_UpstreamConnectionOptions_tcp_keepalive(const envoy_config_cluster_v3_UpstreamConnectionOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_TcpKeepalive*); }
+UPB_INLINE bool envoy_config_cluster_v3_UpstreamConnectionOptions_has_tcp_keepalive(const envoy_config_cluster_v3_UpstreamConnectionOptions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_TcpKeepalive* envoy_config_cluster_v3_UpstreamConnectionOptions_tcp_keepalive(const envoy_config_cluster_v3_UpstreamConnectionOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_TcpKeepalive*); }
UPB_INLINE void envoy_config_cluster_v3_UpstreamConnectionOptions_set_tcp_keepalive(envoy_config_cluster_v3_UpstreamConnectionOptions *msg, struct envoy_config_core_v3_TcpKeepalive* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_TcpKeepalive*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_TcpKeepalive*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TcpKeepalive* envoy_config_cluster_v3_UpstreamConnectionOptions_mutable_tcp_keepalive(envoy_config_cluster_v3_UpstreamConnectionOptions *msg, upb_arena *arena) {
struct envoy_config_core_v3_TcpKeepalive* sub = (struct envoy_config_core_v3_TcpKeepalive*)envoy_config_cluster_v3_UpstreamConnectionOptions_tcp_keepalive(msg);
@@ -1612,6 +1772,12 @@ UPB_INLINE envoy_config_cluster_v3_TrackClusterStats *envoy_config_cluster_v3_Tr
envoy_config_cluster_v3_TrackClusterStats *ret = envoy_config_cluster_v3_TrackClusterStats_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_TrackClusterStats_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_TrackClusterStats *envoy_config_cluster_v3_TrackClusterStats_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_TrackClusterStats *ret = envoy_config_cluster_v3_TrackClusterStats_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_TrackClusterStats_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_TrackClusterStats_serialize(const envoy_config_cluster_v3_TrackClusterStats *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_TrackClusterStats_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c
index 8dfe234f39d..14230149e51 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c
@@ -21,14 +21,14 @@ static const upb_msglayout *const envoy_config_cluster_v3_Filter_submsgs[1] = {
};
static const upb_msglayout_field envoy_config_cluster_v3_Filter__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_Filter_msginit = {
&envoy_config_cluster_v3_Filter_submsgs[0],
&envoy_config_cluster_v3_Filter__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h
index 016bb950679..1850b2a5504 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,19 +37,26 @@ UPB_INLINE envoy_config_cluster_v3_Filter *envoy_config_cluster_v3_Filter_parse(
envoy_config_cluster_v3_Filter *ret = envoy_config_cluster_v3_Filter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_Filter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_Filter *envoy_config_cluster_v3_Filter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_Filter *ret = envoy_config_cluster_v3_Filter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_Filter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_Filter_serialize(const envoy_config_cluster_v3_Filter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_Filter_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_cluster_v3_Filter_name(const envoy_config_cluster_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_cluster_v3_Filter_has_typed_config(const envoy_config_cluster_v3_Filter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_Filter_typed_config(const envoy_config_cluster_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); }
+UPB_INLINE upb_strview envoy_config_cluster_v3_Filter_name(const envoy_config_cluster_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_cluster_v3_Filter_has_typed_config(const envoy_config_cluster_v3_Filter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_cluster_v3_Filter_typed_config(const envoy_config_cluster_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_cluster_v3_Filter_set_name(envoy_config_cluster_v3_Filter *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_cluster_v3_Filter_set_typed_config(envoy_config_cluster_v3_Filter *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_cluster_v3_Filter_mutable_typed_config(envoy_config_cluster_v3_Filter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_cluster_v3_Filter_typed_config(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c
index a6af66cd6d3..f90563f1e70 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c
@@ -17,38 +17,39 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_cluster_v3_OutlierDetection_submsgs[19] = {
+static const upb_msglayout *const envoy_config_cluster_v3_OutlierDetection_submsgs[2] = {
&google_protobuf_Duration_msginit,
&google_protobuf_UInt32Value_msginit,
};
-static const upb_msglayout_field envoy_config_cluster_v3_OutlierDetection__fields[20] = {
- {1, UPB_SIZE(4, 8), 0, 1, 11, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {4, UPB_SIZE(16, 32), 0, 1, 11, 1},
- {5, UPB_SIZE(20, 40), 0, 1, 11, 1},
- {6, UPB_SIZE(24, 48), 0, 1, 11, 1},
- {7, UPB_SIZE(28, 56), 0, 1, 11, 1},
- {8, UPB_SIZE(32, 64), 0, 1, 11, 1},
- {9, UPB_SIZE(36, 72), 0, 1, 11, 1},
- {10, UPB_SIZE(40, 80), 0, 1, 11, 1},
- {11, UPB_SIZE(44, 88), 0, 1, 11, 1},
- {12, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {13, UPB_SIZE(48, 96), 0, 1, 11, 1},
- {14, UPB_SIZE(52, 104), 0, 1, 11, 1},
- {15, UPB_SIZE(56, 112), 0, 1, 11, 1},
- {16, UPB_SIZE(60, 120), 0, 1, 11, 1},
- {17, UPB_SIZE(64, 128), 0, 1, 11, 1},
- {18, UPB_SIZE(68, 136), 0, 1, 11, 1},
- {19, UPB_SIZE(72, 144), 0, 1, 11, 1},
- {20, UPB_SIZE(76, 152), 0, 1, 11, 1},
+static const upb_msglayout_field envoy_config_cluster_v3_OutlierDetection__fields[21] = {
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 0, 11, 1},
+ {4, UPB_SIZE(16, 32), 4, 1, 11, 1},
+ {5, UPB_SIZE(20, 40), 5, 1, 11, 1},
+ {6, UPB_SIZE(24, 48), 6, 1, 11, 1},
+ {7, UPB_SIZE(28, 56), 7, 1, 11, 1},
+ {8, UPB_SIZE(32, 64), 8, 1, 11, 1},
+ {9, UPB_SIZE(36, 72), 9, 1, 11, 1},
+ {10, UPB_SIZE(40, 80), 10, 1, 11, 1},
+ {11, UPB_SIZE(44, 88), 11, 1, 11, 1},
+ {12, UPB_SIZE(3, 3), 0, 0, 8, 1},
+ {13, UPB_SIZE(48, 96), 12, 1, 11, 1},
+ {14, UPB_SIZE(52, 104), 13, 1, 11, 1},
+ {15, UPB_SIZE(56, 112), 14, 1, 11, 1},
+ {16, UPB_SIZE(60, 120), 15, 1, 11, 1},
+ {17, UPB_SIZE(64, 128), 16, 1, 11, 1},
+ {18, UPB_SIZE(68, 136), 17, 1, 11, 1},
+ {19, UPB_SIZE(72, 144), 18, 1, 11, 1},
+ {20, UPB_SIZE(76, 152), 19, 1, 11, 1},
+ {21, UPB_SIZE(80, 160), 20, 0, 11, 1},
};
const upb_msglayout envoy_config_cluster_v3_OutlierDetection_msginit = {
&envoy_config_cluster_v3_OutlierDetection_submsgs[0],
&envoy_config_cluster_v3_OutlierDetection__fields[0],
- UPB_SIZE(80, 160), 20, false,
+ UPB_SIZE(88, 168), 21, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h
index d8b03a80079..70b76232628 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -38,51 +39,60 @@ UPB_INLINE envoy_config_cluster_v3_OutlierDetection *envoy_config_cluster_v3_Out
envoy_config_cluster_v3_OutlierDetection *ret = envoy_config_cluster_v3_OutlierDetection_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_cluster_v3_OutlierDetection_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_cluster_v3_OutlierDetection *envoy_config_cluster_v3_OutlierDetection_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_cluster_v3_OutlierDetection *ret = envoy_config_cluster_v3_OutlierDetection_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_cluster_v3_OutlierDetection_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_cluster_v3_OutlierDetection_serialize(const envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_cluster_v3_OutlierDetection_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_consecutive_5xx(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_consecutive_5xx(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_consecutive_5xx(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_interval(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_interval(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetection_interval(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_base_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_base_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetection_base_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_max_ejection_percent(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_max_ejection_percent(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_max_ejection_percent(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_consecutive_5xx(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_consecutive_5xx(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_consecutive_5xx(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_success_rate_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_success_rate_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_success_rate_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_success_rate_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_success_rate_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_success_rate_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_success_rate_stdev_factor(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_success_rate_stdev_factor(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 9); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_success_rate_stdev_factor(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_consecutive_gateway_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_consecutive_gateway_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 10); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_consecutive_gateway_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_consecutive_gateway_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_consecutive_gateway_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 11); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_consecutive_gateway_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_split_external_local_origin_errors(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_consecutive_local_origin_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_split_external_local_origin_errors(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_consecutive_local_origin_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 12); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_consecutive_local_origin_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 96), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_consecutive_local_origin_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_consecutive_local_origin_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 13); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_consecutive_local_origin_failure(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 104), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_local_origin_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 112)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_local_origin_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 14); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_local_origin_success_rate(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 112), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_failure_percentage_threshold(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 120)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_failure_percentage_threshold(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 15); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_failure_percentage_threshold(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 120), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_failure_percentage(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 128)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_failure_percentage(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 16); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_failure_percentage(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 128), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_failure_percentage_local_origin(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 136)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_enforcing_failure_percentage_local_origin(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 17); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_enforcing_failure_percentage_local_origin(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 136), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_failure_percentage_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 144)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_failure_percentage_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 18); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_failure_percentage_minimum_hosts(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 144), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_failure_percentage_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 152)); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_failure_percentage_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 19); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_failure_percentage_request_volume(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 152), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_cluster_v3_OutlierDetection_has_max_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg) { return _upb_hasbit(msg, 20); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetection_max_ejection_time(const envoy_config_cluster_v3_OutlierDetection *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 160), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_consecutive_5xx(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_consecutive_5xx(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -95,6 +105,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_interval(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetection_mutable_interval(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -107,6 +118,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetec
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_base_ejection_time(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetection_mutable_base_ejection_time(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -119,6 +131,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetec
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_max_ejection_percent(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_max_ejection_percent(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -131,6 +144,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_consecutive_5xx(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_consecutive_5xx(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -143,6 +157,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_success_rate(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_success_rate(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -155,6 +170,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_success_rate_minimum_hosts(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_success_rate_minimum_hosts(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -167,6 +183,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_success_rate_request_volume(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_success_rate_request_volume(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -179,6 +196,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_success_rate_stdev_factor(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 9);
*UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_success_rate_stdev_factor(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -191,6 +209,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_consecutive_gateway_failure(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 10);
*UPB_PTR_AT(msg, UPB_SIZE(40, 80), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_consecutive_gateway_failure(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -203,6 +222,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_consecutive_gateway_failure(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 11);
*UPB_PTR_AT(msg, UPB_SIZE(44, 88), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_consecutive_gateway_failure(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -215,9 +235,10 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_split_external_local_origin_errors(envoy_config_cluster_v3_OutlierDetection *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_consecutive_local_origin_failure(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 12);
*UPB_PTR_AT(msg, UPB_SIZE(48, 96), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_consecutive_local_origin_failure(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -230,6 +251,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_consecutive_local_origin_failure(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 13);
*UPB_PTR_AT(msg, UPB_SIZE(52, 104), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_consecutive_local_origin_failure(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -242,6 +264,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_local_origin_success_rate(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 14);
*UPB_PTR_AT(msg, UPB_SIZE(56, 112), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_local_origin_success_rate(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -254,6 +277,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_failure_percentage_threshold(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 15);
*UPB_PTR_AT(msg, UPB_SIZE(60, 120), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_failure_percentage_threshold(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -266,6 +290,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_failure_percentage(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 16);
*UPB_PTR_AT(msg, UPB_SIZE(64, 128), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_failure_percentage(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -278,6 +303,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_enforcing_failure_percentage_local_origin(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 17);
*UPB_PTR_AT(msg, UPB_SIZE(68, 136), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_enforcing_failure_percentage_local_origin(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -290,6 +316,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_failure_percentage_minimum_hosts(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 18);
*UPB_PTR_AT(msg, UPB_SIZE(72, 144), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_failure_percentage_minimum_hosts(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -302,6 +329,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
return sub;
}
UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_failure_percentage_request_volume(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 19);
*UPB_PTR_AT(msg, UPB_SIZE(76, 152), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDetection_mutable_failure_percentage_request_volume(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
@@ -313,6 +341,19 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_cluster_v3_OutlierDe
}
return sub;
}
+UPB_INLINE void envoy_config_cluster_v3_OutlierDetection_set_max_ejection_time(envoy_config_cluster_v3_OutlierDetection *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 20);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 160), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_cluster_v3_OutlierDetection_mutable_max_ejection_time(envoy_config_cluster_v3_OutlierDetection *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_cluster_v3_OutlierDetection_max_ejection_time(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_cluster_v3_OutlierDetection_set_max_ejection_time(msg, sub);
+ }
+ return sub;
+}
#ifdef __cplusplus
} /* extern "C" */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c
index d381efa2270..048fc05035d 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c
@@ -25,7 +25,7 @@ static const upb_msglayout_field envoy_config_core_v3_Pipe__fields[2] = {
const upb_msglayout envoy_config_core_v3_Pipe_msginit = {
NULL,
&envoy_config_core_v3_Pipe__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_EnvoyInternalAddress__fields[1] = {
@@ -35,38 +35,38 @@ static const upb_msglayout_field envoy_config_core_v3_EnvoyInternalAddress__fiel
const upb_msglayout envoy_config_core_v3_EnvoyInternalAddress_msginit = {
NULL,
&envoy_config_core_v3_EnvoyInternalAddress__fields[0],
- UPB_SIZE(16, 32), 1, false,
+ UPB_SIZE(16, 32), 1, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_SocketAddress__fields[6] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(12, 16), 0, 0, 9, 1},
- {3, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 13, 1},
- {4, UPB_SIZE(28, 48), UPB_SIZE(-37, -65), 0, 9, 1},
- {5, UPB_SIZE(20, 32), 0, 0, 9, 1},
- {6, UPB_SIZE(8, 8), 0, 0, 8, 1},
+ {2, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(24, 40), UPB_SIZE(-33, -57), 0, 13, 1},
+ {4, UPB_SIZE(24, 40), UPB_SIZE(-33, -57), 0, 9, 1},
+ {5, UPB_SIZE(16, 24), 0, 0, 9, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_core_v3_SocketAddress_msginit = {
NULL,
&envoy_config_core_v3_SocketAddress__fields[0],
- UPB_SIZE(40, 80), 6, false,
+ UPB_SIZE(40, 64), 6, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_TcpKeepalive_submsgs[3] = {
+static const upb_msglayout *const envoy_config_core_v3_TcpKeepalive_submsgs[1] = {
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_TcpKeepalive__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_TcpKeepalive_msginit = {
&envoy_config_core_v3_TcpKeepalive_submsgs[0],
&envoy_config_core_v3_TcpKeepalive__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_BindConfig_submsgs[3] = {
@@ -76,15 +76,15 @@ static const upb_msglayout *const envoy_config_core_v3_BindConfig_submsgs[3] = {
};
static const upb_msglayout_field envoy_config_core_v3_BindConfig__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 2, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 3},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 2, 11, 1},
+ {3, UPB_SIZE(12, 24), 0, 1, 11, 3},
};
const upb_msglayout envoy_config_core_v3_BindConfig_msginit = {
&envoy_config_core_v3_BindConfig_submsgs[0],
&envoy_config_core_v3_BindConfig__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_Address_submsgs[3] = {
@@ -102,7 +102,7 @@ static const upb_msglayout_field envoy_config_core_v3_Address__fields[3] = {
const upb_msglayout envoy_config_core_v3_Address_msginit = {
&envoy_config_core_v3_Address_submsgs[0],
&envoy_config_core_v3_Address__fields[0],
- UPB_SIZE(8, 16), 3, false,
+ UPB_SIZE(8, 16), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_CidrRange_submsgs[1] = {
@@ -110,14 +110,14 @@ static const upb_msglayout *const envoy_config_core_v3_CidrRange_submsgs[1] = {
};
static const upb_msglayout_field envoy_config_core_v3_CidrRange__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_CidrRange_msginit = {
&envoy_config_core_v3_CidrRange_submsgs[0],
&envoy_config_core_v3_CidrRange__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h
index e4ccd72a63c..c8fdbee29ee 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -63,6 +64,12 @@ UPB_INLINE envoy_config_core_v3_Pipe *envoy_config_core_v3_Pipe_parse(const char
envoy_config_core_v3_Pipe *ret = envoy_config_core_v3_Pipe_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Pipe_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Pipe *envoy_config_core_v3_Pipe_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Pipe *ret = envoy_config_core_v3_Pipe_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Pipe_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Pipe_serialize(const envoy_config_core_v3_Pipe *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Pipe_msginit, arena, len);
}
@@ -87,6 +94,12 @@ UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress *envoy_config_core_v3_Envoy
envoy_config_core_v3_EnvoyInternalAddress *ret = envoy_config_core_v3_EnvoyInternalAddress_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_EnvoyInternalAddress_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_EnvoyInternalAddress *envoy_config_core_v3_EnvoyInternalAddress_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_EnvoyInternalAddress *ret = envoy_config_core_v3_EnvoyInternalAddress_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_EnvoyInternalAddress_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_EnvoyInternalAddress_serialize(const envoy_config_core_v3_EnvoyInternalAddress *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_EnvoyInternalAddress_msginit, arena, len);
}
@@ -114,6 +127,12 @@ UPB_INLINE envoy_config_core_v3_SocketAddress *envoy_config_core_v3_SocketAddres
envoy_config_core_v3_SocketAddress *ret = envoy_config_core_v3_SocketAddress_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_SocketAddress_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_SocketAddress *envoy_config_core_v3_SocketAddress_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_SocketAddress *ret = envoy_config_core_v3_SocketAddress_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_SocketAddress_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_SocketAddress_serialize(const envoy_config_core_v3_SocketAddress *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_SocketAddress_msginit, arena, len);
}
@@ -123,34 +142,34 @@ typedef enum {
envoy_config_core_v3_SocketAddress_port_specifier_named_port = 4,
envoy_config_core_v3_SocketAddress_port_specifier_NOT_SET = 0
} envoy_config_core_v3_SocketAddress_port_specifier_oneofcases;
-UPB_INLINE envoy_config_core_v3_SocketAddress_port_specifier_oneofcases envoy_config_core_v3_SocketAddress_port_specifier_case(const envoy_config_core_v3_SocketAddress* msg) { return (envoy_config_core_v3_SocketAddress_port_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 64), int32_t); }
+UPB_INLINE envoy_config_core_v3_SocketAddress_port_specifier_oneofcases envoy_config_core_v3_SocketAddress_port_specifier_case(const envoy_config_core_v3_SocketAddress* msg) { return (envoy_config_core_v3_SocketAddress_port_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 56), int32_t); }
UPB_INLINE int32_t envoy_config_core_v3_SocketAddress_protocol(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_address(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_port_value(const envoy_config_core_v3_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 3; }
-UPB_INLINE uint32_t envoy_config_core_v3_SocketAddress_port_value(const envoy_config_core_v3_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 3, 0); }
-UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_named_port(const envoy_config_core_v3_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 4; }
-UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_named_port(const envoy_config_core_v3_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), UPB_SIZE(36, 64), 4, upb_strview_make("", strlen(""))); }
-UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_resolver_name(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_SocketAddress_ipv4_compat(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_address(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_port_value(const envoy_config_core_v3_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 56)) == 3; }
+UPB_INLINE uint32_t envoy_config_core_v3_SocketAddress_port_value(const envoy_config_core_v3_SocketAddress *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(24, 40), UPB_SIZE(32, 56), 3, 0); }
+UPB_INLINE bool envoy_config_core_v3_SocketAddress_has_named_port(const envoy_config_core_v3_SocketAddress *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 56)) == 4; }
+UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_named_port(const envoy_config_core_v3_SocketAddress *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 40), UPB_SIZE(32, 56), 4, upb_strview_make("", strlen(""))); }
+UPB_INLINE upb_strview envoy_config_core_v3_SocketAddress_resolver_name(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_SocketAddress_ipv4_compat(const envoy_config_core_v3_SocketAddress *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE void envoy_config_core_v3_SocketAddress_set_protocol(envoy_config_core_v3_SocketAddress *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}
UPB_INLINE void envoy_config_core_v3_SocketAddress_set_address(envoy_config_core_v3_SocketAddress *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_SocketAddress_set_port_value(envoy_config_core_v3_SocketAddress *msg, uint32_t value) {
- UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 3);
+ UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(24, 40), value, UPB_SIZE(32, 56), 3);
}
UPB_INLINE void envoy_config_core_v3_SocketAddress_set_named_port(envoy_config_core_v3_SocketAddress *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 48), value, UPB_SIZE(36, 64), 4);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 40), value, UPB_SIZE(32, 56), 4);
}
UPB_INLINE void envoy_config_core_v3_SocketAddress_set_resolver_name(envoy_config_core_v3_SocketAddress *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_SocketAddress_set_ipv4_compat(envoy_config_core_v3_SocketAddress *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
/* envoy.config.core.v3.TcpKeepalive */
@@ -163,19 +182,26 @@ UPB_INLINE envoy_config_core_v3_TcpKeepalive *envoy_config_core_v3_TcpKeepalive_
envoy_config_core_v3_TcpKeepalive *ret = envoy_config_core_v3_TcpKeepalive_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_TcpKeepalive_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_TcpKeepalive *envoy_config_core_v3_TcpKeepalive_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_TcpKeepalive *ret = envoy_config_core_v3_TcpKeepalive_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_TcpKeepalive_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_TcpKeepalive_serialize(const envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_TcpKeepalive_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_probes(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_probes(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_time(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_time(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_interval(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_interval(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_probes(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_probes(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_time(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_time(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_TcpKeepalive_has_keepalive_interval(const envoy_config_core_v3_TcpKeepalive *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_keepalive_interval(const envoy_config_core_v3_TcpKeepalive *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_probes(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_mutable_keepalive_probes(envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_TcpKeepalive_keepalive_probes(msg);
@@ -187,7 +213,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive
return sub;
}
UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_time(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_mutable_keepalive_time(envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_TcpKeepalive_keepalive_time(msg);
@@ -199,7 +226,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive
return sub;
}
UPB_INLINE void envoy_config_core_v3_TcpKeepalive_set_keepalive_interval(envoy_config_core_v3_TcpKeepalive *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_TcpKeepalive_mutable_keepalive_interval(envoy_config_core_v3_TcpKeepalive *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_TcpKeepalive_keepalive_interval(msg);
@@ -221,19 +249,26 @@ UPB_INLINE envoy_config_core_v3_BindConfig *envoy_config_core_v3_BindConfig_pars
envoy_config_core_v3_BindConfig *ret = envoy_config_core_v3_BindConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_BindConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_BindConfig *envoy_config_core_v3_BindConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_BindConfig *ret = envoy_config_core_v3_BindConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_BindConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_BindConfig_serialize(const envoy_config_core_v3_BindConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_BindConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_BindConfig_has_source_address(const envoy_config_core_v3_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_core_v3_SocketAddress* envoy_config_core_v3_BindConfig_source_address(const envoy_config_core_v3_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_core_v3_SocketAddress*); }
-UPB_INLINE bool envoy_config_core_v3_BindConfig_has_freebind(const envoy_config_core_v3_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_BindConfig_freebind(const envoy_config_core_v3_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_core_v3_BindConfig_has_socket_options(const envoy_config_core_v3_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_SocketOption* const* envoy_config_core_v3_BindConfig_socket_options(const envoy_config_core_v3_BindConfig *msg, size_t *len) { return (const struct envoy_config_core_v3_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_config_core_v3_BindConfig_has_source_address(const envoy_config_core_v3_BindConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_core_v3_SocketAddress* envoy_config_core_v3_BindConfig_source_address(const envoy_config_core_v3_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_core_v3_SocketAddress*); }
+UPB_INLINE bool envoy_config_core_v3_BindConfig_has_freebind(const envoy_config_core_v3_BindConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_BindConfig_freebind(const envoy_config_core_v3_BindConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_core_v3_BindConfig_has_socket_options(const envoy_config_core_v3_BindConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const struct envoy_config_core_v3_SocketOption* const* envoy_config_core_v3_BindConfig_socket_options(const envoy_config_core_v3_BindConfig *msg, size_t *len) { return (const struct envoy_config_core_v3_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
UPB_INLINE void envoy_config_core_v3_BindConfig_set_source_address(envoy_config_core_v3_BindConfig *msg, envoy_config_core_v3_SocketAddress* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_core_v3_SocketAddress*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_core_v3_SocketAddress*) = value;
}
UPB_INLINE struct envoy_config_core_v3_SocketAddress* envoy_config_core_v3_BindConfig_mutable_source_address(envoy_config_core_v3_BindConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_SocketAddress* sub = (struct envoy_config_core_v3_SocketAddress*)envoy_config_core_v3_BindConfig_source_address(msg);
@@ -245,7 +280,8 @@ UPB_INLINE struct envoy_config_core_v3_SocketAddress* envoy_config_core_v3_BindC
return sub;
}
UPB_INLINE void envoy_config_core_v3_BindConfig_set_freebind(envoy_config_core_v3_BindConfig *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_BindConfig_mutable_freebind(envoy_config_core_v3_BindConfig *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_core_v3_BindConfig_freebind(msg);
@@ -257,15 +293,15 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_BindConfig_mut
return sub;
}
UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_core_v3_BindConfig_mutable_socket_options(envoy_config_core_v3_BindConfig *msg, size_t *len) {
- return (struct envoy_config_core_v3_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+ return (struct envoy_config_core_v3_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
}
UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_core_v3_BindConfig_resize_socket_options(envoy_config_core_v3_BindConfig *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_SocketOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_SocketOption* envoy_config_core_v3_BindConfig_add_socket_options(envoy_config_core_v3_BindConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_SocketOption* sub = (struct envoy_config_core_v3_SocketOption*)_upb_msg_new(&envoy_config_core_v3_SocketOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -280,6 +316,12 @@ UPB_INLINE envoy_config_core_v3_Address *envoy_config_core_v3_Address_parse(cons
envoy_config_core_v3_Address *ret = envoy_config_core_v3_Address_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Address_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Address *envoy_config_core_v3_Address_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Address *ret = envoy_config_core_v3_Address_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Address_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Address_serialize(const envoy_config_core_v3_Address *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Address_msginit, arena, len);
}
@@ -346,19 +388,26 @@ UPB_INLINE envoy_config_core_v3_CidrRange *envoy_config_core_v3_CidrRange_parse(
envoy_config_core_v3_CidrRange *ret = envoy_config_core_v3_CidrRange_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_CidrRange_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_CidrRange *envoy_config_core_v3_CidrRange_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_CidrRange *ret = envoy_config_core_v3_CidrRange_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_CidrRange_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_CidrRange_serialize(const envoy_config_core_v3_CidrRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_CidrRange_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_core_v3_CidrRange_address_prefix(const envoy_config_core_v3_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_CidrRange_has_prefix_len(const envoy_config_core_v3_CidrRange *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_CidrRange_prefix_len(const envoy_config_core_v3_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE upb_strview envoy_config_core_v3_CidrRange_address_prefix(const envoy_config_core_v3_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_CidrRange_has_prefix_len(const envoy_config_core_v3_CidrRange *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_CidrRange_prefix_len(const envoy_config_core_v3_CidrRange *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_core_v3_CidrRange_set_address_prefix(envoy_config_core_v3_CidrRange *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_CidrRange_set_prefix_len(envoy_config_core_v3_CidrRange *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_CidrRange_mutable_prefix_len(envoy_config_core_v3_CidrRange *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_CidrRange_prefix_len(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c
index f564f333621..8e1174d7a9f 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c
@@ -16,19 +16,19 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_core_v3_BackoffStrategy_submsgs[2] = {
+static const upb_msglayout *const envoy_config_core_v3_BackoffStrategy_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_BackoffStrategy__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_BackoffStrategy_msginit = {
&envoy_config_core_v3_BackoffStrategy_submsgs[0],
&envoy_config_core_v3_BackoffStrategy__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h
index 0f843e20562..3601c66cf9d 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,17 +37,24 @@ UPB_INLINE envoy_config_core_v3_BackoffStrategy *envoy_config_core_v3_BackoffStr
envoy_config_core_v3_BackoffStrategy *ret = envoy_config_core_v3_BackoffStrategy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_BackoffStrategy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_BackoffStrategy *envoy_config_core_v3_BackoffStrategy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_BackoffStrategy *ret = envoy_config_core_v3_BackoffStrategy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_BackoffStrategy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_BackoffStrategy_serialize(const envoy_config_core_v3_BackoffStrategy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_BackoffStrategy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_BackoffStrategy_has_base_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_base_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_BackoffStrategy_has_max_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_max_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_BackoffStrategy_has_base_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_base_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_BackoffStrategy_has_max_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_max_interval(const envoy_config_core_v3_BackoffStrategy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_core_v3_BackoffStrategy_set_base_interval(envoy_config_core_v3_BackoffStrategy *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_mutable_base_interval(envoy_config_core_v3_BackoffStrategy *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_BackoffStrategy_base_interval(msg);
@@ -58,7 +66,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy
return sub;
}
UPB_INLINE void envoy_config_core_v3_BackoffStrategy_set_max_interval(envoy_config_core_v3_BackoffStrategy *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_BackoffStrategy_mutable_max_interval(envoy_config_core_v3_BackoffStrategy *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_BackoffStrategy_max_interval(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c
index a651c67d939..0baf9e98b6f 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c
@@ -15,7 +15,6 @@
#include "envoy/type/v3/percent.upb.h"
#include "envoy/type/v3/semantic_version.upb.h"
#include "google/protobuf/any.upb.h"
-#include "google/protobuf/duration.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "udpa/annotations/migrate.upb.h"
@@ -34,7 +33,7 @@ static const upb_msglayout_field envoy_config_core_v3_Locality__fields[3] = {
const upb_msglayout envoy_config_core_v3_Locality_msginit = {
NULL,
&envoy_config_core_v3_Locality__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_BuildVersion_submsgs[2] = {
@@ -43,14 +42,14 @@ static const upb_msglayout *const envoy_config_core_v3_BuildVersion_submsgs[2] =
};
static const upb_msglayout_field envoy_config_core_v3_BuildVersion__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_BuildVersion_msginit = {
&envoy_config_core_v3_BuildVersion_submsgs[0],
&envoy_config_core_v3_BuildVersion__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_Extension_submsgs[1] = {
@@ -61,14 +60,14 @@ static const upb_msglayout_field envoy_config_core_v3_Extension__fields[5] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(12, 24), 0, 0, 9, 1},
{3, UPB_SIZE(20, 40), 0, 0, 9, 1},
- {4, UPB_SIZE(28, 56), 0, 0, 11, 1},
- {5, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {4, UPB_SIZE(28, 56), 1, 0, 11, 1},
+ {5, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_core_v3_Extension_msginit = {
&envoy_config_core_v3_Extension_submsgs[0],
&envoy_config_core_v3_Extension__fields[0],
- UPB_SIZE(32, 64), 5, false,
+ UPB_SIZE(32, 64), 5, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_Node_submsgs[5] = {
@@ -80,22 +79,22 @@ static const upb_msglayout *const envoy_config_core_v3_Node_submsgs[5] = {
};
static const upb_msglayout_field envoy_config_core_v3_Node__fields[10] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {3, UPB_SIZE(24, 48), 0, 4, 11, 1},
- {4, UPB_SIZE(28, 56), 0, 3, 11, 1},
- {6, UPB_SIZE(16, 32), 0, 0, 9, 1},
- {7, UPB_SIZE(44, 88), UPB_SIZE(-53, -105), 0, 9, 1},
- {8, UPB_SIZE(44, 88), UPB_SIZE(-53, -105), 1, 11, 1},
- {9, UPB_SIZE(32, 64), 0, 2, 11, 3},
- {10, UPB_SIZE(36, 72), 0, 0, 9, 3},
- {11, UPB_SIZE(40, 80), 0, 0, 11, 3},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(28, 56), 1, 4, 11, 1},
+ {4, UPB_SIZE(32, 64), 2, 3, 11, 1},
+ {6, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {7, UPB_SIZE(48, 96), UPB_SIZE(-57, -113), 0, 9, 1},
+ {8, UPB_SIZE(48, 96), UPB_SIZE(-57, -113), 1, 11, 1},
+ {9, UPB_SIZE(36, 72), 0, 2, 11, 3},
+ {10, UPB_SIZE(40, 80), 0, 0, 9, 3},
+ {11, UPB_SIZE(44, 88), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_core_v3_Node_msginit = {
&envoy_config_core_v3_Node_submsgs[0],
&envoy_config_core_v3_Node__fields[0],
- UPB_SIZE(56, 112), 10, false,
+ UPB_SIZE(64, 128), 10, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_Metadata_submsgs[1] = {
@@ -109,7 +108,7 @@ static const upb_msglayout_field envoy_config_core_v3_Metadata__fields[1] = {
const upb_msglayout envoy_config_core_v3_Metadata_msginit = {
&envoy_config_core_v3_Metadata_submsgs[0],
&envoy_config_core_v3_Metadata__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_Metadata_FilterMetadataEntry_submsgs[1] = {
@@ -124,7 +123,7 @@ static const upb_msglayout_field envoy_config_core_v3_Metadata_FilterMetadataEnt
const upb_msglayout envoy_config_core_v3_Metadata_FilterMetadataEntry_msginit = {
&envoy_config_core_v3_Metadata_FilterMetadataEntry_submsgs[0],
&envoy_config_core_v3_Metadata_FilterMetadataEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_RuntimeUInt32__fields[2] = {
@@ -135,7 +134,22 @@ static const upb_msglayout_field envoy_config_core_v3_RuntimeUInt32__fields[2] =
const upb_msglayout envoy_config_core_v3_RuntimeUInt32_msginit = {
NULL,
&envoy_config_core_v3_RuntimeUInt32__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_core_v3_RuntimePercent_submsgs[1] = {
+ &envoy_type_v3_Percent_msginit,
+};
+
+static const upb_msglayout_field envoy_config_core_v3_RuntimePercent__fields[2] = {
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_config_core_v3_RuntimePercent_msginit = {
+ &envoy_config_core_v3_RuntimePercent_submsgs[0],
+ &envoy_config_core_v3_RuntimePercent__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_RuntimeDouble__fields[2] = {
@@ -146,7 +160,7 @@ static const upb_msglayout_field envoy_config_core_v3_RuntimeDouble__fields[2] =
const upb_msglayout envoy_config_core_v3_RuntimeDouble_msginit = {
NULL,
&envoy_config_core_v3_RuntimeDouble__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_RuntimeFeatureFlag_submsgs[1] = {
@@ -154,14 +168,14 @@ static const upb_msglayout *const envoy_config_core_v3_RuntimeFeatureFlag_submsg
};
static const upb_msglayout_field envoy_config_core_v3_RuntimeFeatureFlag__fields[2] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_core_v3_RuntimeFeatureFlag_msginit = {
&envoy_config_core_v3_RuntimeFeatureFlag_submsgs[0],
&envoy_config_core_v3_RuntimeFeatureFlag__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_HeaderValue__fields[2] = {
@@ -172,7 +186,7 @@ static const upb_msglayout_field envoy_config_core_v3_HeaderValue__fields[2] = {
const upb_msglayout envoy_config_core_v3_HeaderValue_msginit = {
NULL,
&envoy_config_core_v3_HeaderValue__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_HeaderValueOption_submsgs[2] = {
@@ -181,14 +195,14 @@ static const upb_msglayout *const envoy_config_core_v3_HeaderValueOption_submsgs
};
static const upb_msglayout_field envoy_config_core_v3_HeaderValueOption__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_HeaderValueOption_msginit = {
&envoy_config_core_v3_HeaderValueOption_submsgs[0],
&envoy_config_core_v3_HeaderValueOption__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_HeaderMap_submsgs[1] = {
@@ -202,7 +216,17 @@ static const upb_msglayout_field envoy_config_core_v3_HeaderMap__fields[1] = {
const upb_msglayout envoy_config_core_v3_HeaderMap_msginit = {
&envoy_config_core_v3_HeaderMap_submsgs[0],
&envoy_config_core_v3_HeaderMap__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+static const upb_msglayout_field envoy_config_core_v3_WatchedDirectory__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_config_core_v3_WatchedDirectory_msginit = {
+ NULL,
+ &envoy_config_core_v3_WatchedDirectory__fields[0],
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_DataSource__fields[3] = {
@@ -214,7 +238,7 @@ static const upb_msglayout_field envoy_config_core_v3_DataSource__fields[3] = {
const upb_msglayout envoy_config_core_v3_DataSource_msginit = {
NULL,
&envoy_config_core_v3_DataSource__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_RetryPolicy_submsgs[2] = {
@@ -223,14 +247,14 @@ static const upb_msglayout *const envoy_config_core_v3_RetryPolicy_submsgs[2] =
};
static const upb_msglayout_field envoy_config_core_v3_RetryPolicy__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_RetryPolicy_msginit = {
&envoy_config_core_v3_RetryPolicy_submsgs[0],
&envoy_config_core_v3_RetryPolicy__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_RemoteDataSource_submsgs[2] = {
@@ -239,15 +263,15 @@ static const upb_msglayout *const envoy_config_core_v3_RemoteDataSource_submsgs[
};
static const upb_msglayout_field envoy_config_core_v3_RemoteDataSource__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), 0, 1, 11, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(16, 32), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_RemoteDataSource_msginit = {
&envoy_config_core_v3_RemoteDataSource_submsgs[0],
&envoy_config_core_v3_RemoteDataSource__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_AsyncDataSource_submsgs[2] = {
@@ -263,7 +287,7 @@ static const upb_msglayout_field envoy_config_core_v3_AsyncDataSource__fields[2]
const upb_msglayout envoy_config_core_v3_AsyncDataSource_msginit = {
&envoy_config_core_v3_AsyncDataSource_submsgs[0],
&envoy_config_core_v3_AsyncDataSource__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_TransportSocket_submsgs[1] = {
@@ -278,7 +302,7 @@ static const upb_msglayout_field envoy_config_core_v3_TransportSocket__fields[2]
const upb_msglayout envoy_config_core_v3_TransportSocket_msginit = {
&envoy_config_core_v3_TransportSocket_submsgs[0],
&envoy_config_core_v3_TransportSocket__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_RuntimeFractionalPercent_submsgs[1] = {
@@ -286,14 +310,14 @@ static const upb_msglayout *const envoy_config_core_v3_RuntimeFractionalPercent_
};
static const upb_msglayout_field envoy_config_core_v3_RuntimeFractionalPercent__fields[2] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_core_v3_RuntimeFractionalPercent_msginit = {
&envoy_config_core_v3_RuntimeFractionalPercent_submsgs[0],
&envoy_config_core_v3_RuntimeFractionalPercent__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_ControlPlane__fields[1] = {
@@ -303,7 +327,7 @@ static const upb_msglayout_field envoy_config_core_v3_ControlPlane__fields[1] =
const upb_msglayout envoy_config_core_v3_ControlPlane_msginit = {
NULL,
&envoy_config_core_v3_ControlPlane__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h
index 21852d78c29..bfb4fd4d58f 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -26,11 +27,13 @@ struct envoy_config_core_v3_Node;
struct envoy_config_core_v3_Metadata;
struct envoy_config_core_v3_Metadata_FilterMetadataEntry;
struct envoy_config_core_v3_RuntimeUInt32;
+struct envoy_config_core_v3_RuntimePercent;
struct envoy_config_core_v3_RuntimeDouble;
struct envoy_config_core_v3_RuntimeFeatureFlag;
struct envoy_config_core_v3_HeaderValue;
struct envoy_config_core_v3_HeaderValueOption;
struct envoy_config_core_v3_HeaderMap;
+struct envoy_config_core_v3_WatchedDirectory;
struct envoy_config_core_v3_DataSource;
struct envoy_config_core_v3_RetryPolicy;
struct envoy_config_core_v3_RemoteDataSource;
@@ -45,11 +48,13 @@ typedef struct envoy_config_core_v3_Node envoy_config_core_v3_Node;
typedef struct envoy_config_core_v3_Metadata envoy_config_core_v3_Metadata;
typedef struct envoy_config_core_v3_Metadata_FilterMetadataEntry envoy_config_core_v3_Metadata_FilterMetadataEntry;
typedef struct envoy_config_core_v3_RuntimeUInt32 envoy_config_core_v3_RuntimeUInt32;
+typedef struct envoy_config_core_v3_RuntimePercent envoy_config_core_v3_RuntimePercent;
typedef struct envoy_config_core_v3_RuntimeDouble envoy_config_core_v3_RuntimeDouble;
typedef struct envoy_config_core_v3_RuntimeFeatureFlag envoy_config_core_v3_RuntimeFeatureFlag;
typedef struct envoy_config_core_v3_HeaderValue envoy_config_core_v3_HeaderValue;
typedef struct envoy_config_core_v3_HeaderValueOption envoy_config_core_v3_HeaderValueOption;
typedef struct envoy_config_core_v3_HeaderMap envoy_config_core_v3_HeaderMap;
+typedef struct envoy_config_core_v3_WatchedDirectory envoy_config_core_v3_WatchedDirectory;
typedef struct envoy_config_core_v3_DataSource envoy_config_core_v3_DataSource;
typedef struct envoy_config_core_v3_RetryPolicy envoy_config_core_v3_RetryPolicy;
typedef struct envoy_config_core_v3_RemoteDataSource envoy_config_core_v3_RemoteDataSource;
@@ -64,11 +69,13 @@ extern const upb_msglayout envoy_config_core_v3_Node_msginit;
extern const upb_msglayout envoy_config_core_v3_Metadata_msginit;
extern const upb_msglayout envoy_config_core_v3_Metadata_FilterMetadataEntry_msginit;
extern const upb_msglayout envoy_config_core_v3_RuntimeUInt32_msginit;
+extern const upb_msglayout envoy_config_core_v3_RuntimePercent_msginit;
extern const upb_msglayout envoy_config_core_v3_RuntimeDouble_msginit;
extern const upb_msglayout envoy_config_core_v3_RuntimeFeatureFlag_msginit;
extern const upb_msglayout envoy_config_core_v3_HeaderValue_msginit;
extern const upb_msglayout envoy_config_core_v3_HeaderValueOption_msginit;
extern const upb_msglayout envoy_config_core_v3_HeaderMap_msginit;
+extern const upb_msglayout envoy_config_core_v3_WatchedDirectory_msginit;
extern const upb_msglayout envoy_config_core_v3_DataSource_msginit;
extern const upb_msglayout envoy_config_core_v3_RetryPolicy_msginit;
extern const upb_msglayout envoy_config_core_v3_RemoteDataSource_msginit;
@@ -80,6 +87,7 @@ struct envoy_config_core_v3_Address;
struct envoy_config_core_v3_BackoffStrategy;
struct envoy_config_core_v3_HttpUri;
struct envoy_type_v3_FractionalPercent;
+struct envoy_type_v3_Percent;
struct envoy_type_v3_SemanticVersion;
struct google_protobuf_Any;
struct google_protobuf_BoolValue;
@@ -89,6 +97,7 @@ extern const upb_msglayout envoy_config_core_v3_Address_msginit;
extern const upb_msglayout envoy_config_core_v3_BackoffStrategy_msginit;
extern const upb_msglayout envoy_config_core_v3_HttpUri_msginit;
extern const upb_msglayout envoy_type_v3_FractionalPercent_msginit;
+extern const upb_msglayout envoy_type_v3_Percent_msginit;
extern const upb_msglayout envoy_type_v3_SemanticVersion_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
@@ -130,6 +139,12 @@ UPB_INLINE envoy_config_core_v3_Locality *envoy_config_core_v3_Locality_parse(co
envoy_config_core_v3_Locality *ret = envoy_config_core_v3_Locality_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Locality_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Locality *envoy_config_core_v3_Locality_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Locality *ret = envoy_config_core_v3_Locality_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Locality_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Locality_serialize(const envoy_config_core_v3_Locality *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Locality_msginit, arena, len);
}
@@ -158,17 +173,24 @@ UPB_INLINE envoy_config_core_v3_BuildVersion *envoy_config_core_v3_BuildVersion_
envoy_config_core_v3_BuildVersion *ret = envoy_config_core_v3_BuildVersion_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_BuildVersion_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_BuildVersion *envoy_config_core_v3_BuildVersion_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_BuildVersion *ret = envoy_config_core_v3_BuildVersion_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_BuildVersion_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_BuildVersion_serialize(const envoy_config_core_v3_BuildVersion *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_BuildVersion_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_BuildVersion_has_version(const envoy_config_core_v3_BuildVersion *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_type_v3_SemanticVersion* envoy_config_core_v3_BuildVersion_version(const envoy_config_core_v3_BuildVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_v3_SemanticVersion*); }
-UPB_INLINE bool envoy_config_core_v3_BuildVersion_has_metadata(const envoy_config_core_v3_BuildVersion *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_BuildVersion_metadata(const envoy_config_core_v3_BuildVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Struct*); }
+UPB_INLINE bool envoy_config_core_v3_BuildVersion_has_version(const envoy_config_core_v3_BuildVersion *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_SemanticVersion* envoy_config_core_v3_BuildVersion_version(const envoy_config_core_v3_BuildVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_SemanticVersion*); }
+UPB_INLINE bool envoy_config_core_v3_BuildVersion_has_metadata(const envoy_config_core_v3_BuildVersion *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_BuildVersion_metadata(const envoy_config_core_v3_BuildVersion *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Struct*); }
UPB_INLINE void envoy_config_core_v3_BuildVersion_set_version(envoy_config_core_v3_BuildVersion *msg, struct envoy_type_v3_SemanticVersion* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_v3_SemanticVersion*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_SemanticVersion*) = value;
}
UPB_INLINE struct envoy_type_v3_SemanticVersion* envoy_config_core_v3_BuildVersion_mutable_version(envoy_config_core_v3_BuildVersion *msg, upb_arena *arena) {
struct envoy_type_v3_SemanticVersion* sub = (struct envoy_type_v3_SemanticVersion*)envoy_config_core_v3_BuildVersion_version(msg);
@@ -180,7 +202,8 @@ UPB_INLINE struct envoy_type_v3_SemanticVersion* envoy_config_core_v3_BuildVersi
return sub;
}
UPB_INLINE void envoy_config_core_v3_BuildVersion_set_metadata(envoy_config_core_v3_BuildVersion *msg, struct google_protobuf_Struct* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Struct*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_BuildVersion_mutable_metadata(envoy_config_core_v3_BuildVersion *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_core_v3_BuildVersion_metadata(msg);
@@ -202,6 +225,12 @@ UPB_INLINE envoy_config_core_v3_Extension *envoy_config_core_v3_Extension_parse(
envoy_config_core_v3_Extension *ret = envoy_config_core_v3_Extension_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Extension_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Extension *envoy_config_core_v3_Extension_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Extension *ret = envoy_config_core_v3_Extension_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Extension_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Extension_serialize(const envoy_config_core_v3_Extension *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Extension_msginit, arena, len);
}
@@ -209,9 +238,9 @@ UPB_INLINE char *envoy_config_core_v3_Extension_serialize(const envoy_config_cor
UPB_INLINE upb_strview envoy_config_core_v3_Extension_name(const envoy_config_core_v3_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE upb_strview envoy_config_core_v3_Extension_category(const envoy_config_core_v3_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE upb_strview envoy_config_core_v3_Extension_type_descriptor(const envoy_config_core_v3_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_Extension_has_version(const envoy_config_core_v3_Extension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE bool envoy_config_core_v3_Extension_has_version(const envoy_config_core_v3_Extension *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Extension_version(const envoy_config_core_v3_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const envoy_config_core_v3_BuildVersion*); }
-UPB_INLINE bool envoy_config_core_v3_Extension_disabled(const envoy_config_core_v3_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_core_v3_Extension_disabled(const envoy_config_core_v3_Extension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_core_v3_Extension_set_name(envoy_config_core_v3_Extension *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
@@ -223,6 +252,7 @@ UPB_INLINE void envoy_config_core_v3_Extension_set_type_descriptor(envoy_config_
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_Extension_set_version(envoy_config_core_v3_Extension *msg, envoy_config_core_v3_BuildVersion* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), envoy_config_core_v3_BuildVersion*) = value;
}
UPB_INLINE struct envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Extension_mutable_version(envoy_config_core_v3_Extension *msg, upb_arena *arena) {
@@ -235,7 +265,7 @@ UPB_INLINE struct envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Extens
return sub;
}
UPB_INLINE void envoy_config_core_v3_Extension_set_disabled(envoy_config_core_v3_Extension *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* envoy.config.core.v3.Node */
@@ -248,6 +278,12 @@ UPB_INLINE envoy_config_core_v3_Node *envoy_config_core_v3_Node_parse(const char
envoy_config_core_v3_Node *ret = envoy_config_core_v3_Node_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Node_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Node *envoy_config_core_v3_Node_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Node *ret = envoy_config_core_v3_Node_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Node_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Node_serialize(const envoy_config_core_v3_Node *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Node_msginit, arena, len);
}
@@ -257,33 +293,34 @@ typedef enum {
envoy_config_core_v3_Node_user_agent_version_type_user_agent_build_version = 8,
envoy_config_core_v3_Node_user_agent_version_type_NOT_SET = 0
} envoy_config_core_v3_Node_user_agent_version_type_oneofcases;
-UPB_INLINE envoy_config_core_v3_Node_user_agent_version_type_oneofcases envoy_config_core_v3_Node_user_agent_version_type_case(const envoy_config_core_v3_Node* msg) { return (envoy_config_core_v3_Node_user_agent_version_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(52, 104), int32_t); }
-
-UPB_INLINE upb_strview envoy_config_core_v3_Node_id(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE upb_strview envoy_config_core_v3_Node_cluster(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_Node_has_metadata(const envoy_config_core_v3_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_Node_metadata(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_Struct*); }
-UPB_INLINE bool envoy_config_core_v3_Node_has_locality(const envoy_config_core_v3_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const envoy_config_core_v3_Locality* envoy_config_core_v3_Node_locality(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const envoy_config_core_v3_Locality*); }
-UPB_INLINE upb_strview envoy_config_core_v3_Node_user_agent_name(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_Node_has_user_agent_version(const envoy_config_core_v3_Node *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 7; }
-UPB_INLINE upb_strview envoy_config_core_v3_Node_user_agent_version(const envoy_config_core_v3_Node *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(44, 88), UPB_SIZE(52, 104), 7, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_core_v3_Node_has_user_agent_build_version(const envoy_config_core_v3_Node *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 8; }
-UPB_INLINE const envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Node_user_agent_build_version(const envoy_config_core_v3_Node *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_BuildVersion*, UPB_SIZE(44, 88), UPB_SIZE(52, 104), 8, NULL); }
-UPB_INLINE bool envoy_config_core_v3_Node_has_extensions(const envoy_config_core_v3_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const envoy_config_core_v3_Extension* const* envoy_config_core_v3_Node_extensions(const envoy_config_core_v3_Node *msg, size_t *len) { return (const envoy_config_core_v3_Extension* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
-UPB_INLINE upb_strview const* envoy_config_core_v3_Node_client_features(const envoy_config_core_v3_Node *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
-UPB_INLINE bool envoy_config_core_v3_Node_has_listening_addresses(const envoy_config_core_v3_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
-UPB_INLINE const struct envoy_config_core_v3_Address* const* envoy_config_core_v3_Node_listening_addresses(const envoy_config_core_v3_Node *msg, size_t *len) { return (const struct envoy_config_core_v3_Address* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
+UPB_INLINE envoy_config_core_v3_Node_user_agent_version_type_oneofcases envoy_config_core_v3_Node_user_agent_version_type_case(const envoy_config_core_v3_Node* msg) { return (envoy_config_core_v3_Node_user_agent_version_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(56, 112), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_core_v3_Node_id(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_config_core_v3_Node_cluster(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_Node_has_metadata(const envoy_config_core_v3_Node *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_Node_metadata(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_Struct*); }
+UPB_INLINE bool envoy_config_core_v3_Node_has_locality(const envoy_config_core_v3_Node *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_core_v3_Locality* envoy_config_core_v3_Node_locality(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const envoy_config_core_v3_Locality*); }
+UPB_INLINE upb_strview envoy_config_core_v3_Node_user_agent_name(const envoy_config_core_v3_Node *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_Node_has_user_agent_version(const envoy_config_core_v3_Node *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 7; }
+UPB_INLINE upb_strview envoy_config_core_v3_Node_user_agent_version(const envoy_config_core_v3_Node *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(48, 96), UPB_SIZE(56, 112), 7, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_core_v3_Node_has_user_agent_build_version(const envoy_config_core_v3_Node *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 8; }
+UPB_INLINE const envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Node_user_agent_build_version(const envoy_config_core_v3_Node *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_BuildVersion*, UPB_SIZE(48, 96), UPB_SIZE(56, 112), 8, NULL); }
+UPB_INLINE bool envoy_config_core_v3_Node_has_extensions(const envoy_config_core_v3_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE const envoy_config_core_v3_Extension* const* envoy_config_core_v3_Node_extensions(const envoy_config_core_v3_Node *msg, size_t *len) { return (const envoy_config_core_v3_Extension* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
+UPB_INLINE upb_strview const* envoy_config_core_v3_Node_client_features(const envoy_config_core_v3_Node *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
+UPB_INLINE bool envoy_config_core_v3_Node_has_listening_addresses(const envoy_config_core_v3_Node *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
+UPB_INLINE const struct envoy_config_core_v3_Address* const* envoy_config_core_v3_Node_listening_addresses(const envoy_config_core_v3_Node *msg, size_t *len) { return (const struct envoy_config_core_v3_Address* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
UPB_INLINE void envoy_config_core_v3_Node_set_id(envoy_config_core_v3_Node *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_Node_set_cluster(envoy_config_core_v3_Node *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_Node_set_metadata(envoy_config_core_v3_Node *msg, struct google_protobuf_Struct* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_Struct*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_Node_mutable_metadata(envoy_config_core_v3_Node *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_core_v3_Node_metadata(msg);
@@ -295,7 +332,8 @@ UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_Node_mutable_meta
return sub;
}
UPB_INLINE void envoy_config_core_v3_Node_set_locality(envoy_config_core_v3_Node *msg, envoy_config_core_v3_Locality* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 56), envoy_config_core_v3_Locality*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 64), envoy_config_core_v3_Locality*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_core_v3_Node_mutable_locality(envoy_config_core_v3_Node *msg, upb_arena *arena) {
struct envoy_config_core_v3_Locality* sub = (struct envoy_config_core_v3_Locality*)envoy_config_core_v3_Node_locality(msg);
@@ -307,13 +345,13 @@ UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_core_v3_Node_mutab
return sub;
}
UPB_INLINE void envoy_config_core_v3_Node_set_user_agent_name(envoy_config_core_v3_Node *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_Node_set_user_agent_version(envoy_config_core_v3_Node *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(44, 88), value, UPB_SIZE(52, 104), 7);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(48, 96), value, UPB_SIZE(56, 112), 7);
}
UPB_INLINE void envoy_config_core_v3_Node_set_user_agent_build_version(envoy_config_core_v3_Node *msg, envoy_config_core_v3_BuildVersion* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_BuildVersion*, UPB_SIZE(44, 88), value, UPB_SIZE(52, 104), 8);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_BuildVersion*, UPB_SIZE(48, 96), value, UPB_SIZE(56, 112), 8);
}
UPB_INLINE struct envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Node_mutable_user_agent_build_version(envoy_config_core_v3_Node *msg, upb_arena *arena) {
struct envoy_config_core_v3_BuildVersion* sub = (struct envoy_config_core_v3_BuildVersion*)envoy_config_core_v3_Node_user_agent_build_version(msg);
@@ -325,38 +363,38 @@ UPB_INLINE struct envoy_config_core_v3_BuildVersion* envoy_config_core_v3_Node_m
return sub;
}
UPB_INLINE envoy_config_core_v3_Extension** envoy_config_core_v3_Node_mutable_extensions(envoy_config_core_v3_Node *msg, size_t *len) {
- return (envoy_config_core_v3_Extension**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
+ return (envoy_config_core_v3_Extension**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE envoy_config_core_v3_Extension** envoy_config_core_v3_Node_resize_extensions(envoy_config_core_v3_Node *msg, size_t len, upb_arena *arena) {
- return (envoy_config_core_v3_Extension**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_core_v3_Extension**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_Extension* envoy_config_core_v3_Node_add_extensions(envoy_config_core_v3_Node *msg, upb_arena *arena) {
struct envoy_config_core_v3_Extension* sub = (struct envoy_config_core_v3_Extension*)_upb_msg_new(&envoy_config_core_v3_Extension_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_config_core_v3_Node_mutable_client_features(envoy_config_core_v3_Node *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
}
UPB_INLINE upb_strview* envoy_config_core_v3_Node_resize_client_features(envoy_config_core_v3_Node *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_core_v3_Node_add_client_features(envoy_config_core_v3_Node *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(40, 80), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE struct envoy_config_core_v3_Address** envoy_config_core_v3_Node_mutable_listening_addresses(envoy_config_core_v3_Node *msg, size_t *len) {
- return (struct envoy_config_core_v3_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
+ return (struct envoy_config_core_v3_Address**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE struct envoy_config_core_v3_Address** envoy_config_core_v3_Node_resize_listening_addresses(envoy_config_core_v3_Node *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_Address**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_Address**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_core_v3_Node_add_listening_addresses(envoy_config_core_v3_Node *msg, upb_arena *arena) {
struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)_upb_msg_new(&envoy_config_core_v3_Address_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 88), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -371,6 +409,12 @@ UPB_INLINE envoy_config_core_v3_Metadata *envoy_config_core_v3_Metadata_parse(co
envoy_config_core_v3_Metadata *ret = envoy_config_core_v3_Metadata_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Metadata_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Metadata *envoy_config_core_v3_Metadata_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Metadata *ret = envoy_config_core_v3_Metadata_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Metadata_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Metadata_serialize(const envoy_config_core_v3_Metadata *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Metadata_msginit, arena, len);
}
@@ -413,6 +457,12 @@ UPB_INLINE envoy_config_core_v3_RuntimeUInt32 *envoy_config_core_v3_RuntimeUInt3
envoy_config_core_v3_RuntimeUInt32 *ret = envoy_config_core_v3_RuntimeUInt32_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeUInt32_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RuntimeUInt32 *envoy_config_core_v3_RuntimeUInt32_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RuntimeUInt32 *ret = envoy_config_core_v3_RuntimeUInt32_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeUInt32_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RuntimeUInt32_serialize(const envoy_config_core_v3_RuntimeUInt32 *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RuntimeUInt32_msginit, arena, len);
}
@@ -427,6 +477,47 @@ UPB_INLINE void envoy_config_core_v3_RuntimeUInt32_set_runtime_key(envoy_config_
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
+/* envoy.config.core.v3.RuntimePercent */
+
+UPB_INLINE envoy_config_core_v3_RuntimePercent *envoy_config_core_v3_RuntimePercent_new(upb_arena *arena) {
+ return (envoy_config_core_v3_RuntimePercent *)_upb_msg_new(&envoy_config_core_v3_RuntimePercent_msginit, arena);
+}
+UPB_INLINE envoy_config_core_v3_RuntimePercent *envoy_config_core_v3_RuntimePercent_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_core_v3_RuntimePercent *ret = envoy_config_core_v3_RuntimePercent_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimePercent_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_core_v3_RuntimePercent *envoy_config_core_v3_RuntimePercent_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RuntimePercent *ret = envoy_config_core_v3_RuntimePercent_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimePercent_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_core_v3_RuntimePercent_serialize(const envoy_config_core_v3_RuntimePercent *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_core_v3_RuntimePercent_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_core_v3_RuntimePercent_has_default_value(const envoy_config_core_v3_RuntimePercent *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_core_v3_RuntimePercent_default_value(const envoy_config_core_v3_RuntimePercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_Percent*); }
+UPB_INLINE upb_strview envoy_config_core_v3_RuntimePercent_runtime_key(const envoy_config_core_v3_RuntimePercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+
+UPB_INLINE void envoy_config_core_v3_RuntimePercent_set_default_value(envoy_config_core_v3_RuntimePercent *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_Percent*) = value;
+}
+UPB_INLINE struct envoy_type_v3_Percent* envoy_config_core_v3_RuntimePercent_mutable_default_value(envoy_config_core_v3_RuntimePercent *msg, upb_arena *arena) {
+ struct envoy_type_v3_Percent* sub = (struct envoy_type_v3_Percent*)envoy_config_core_v3_RuntimePercent_default_value(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_v3_Percent*)_upb_msg_new(&envoy_type_v3_Percent_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_core_v3_RuntimePercent_set_default_value(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_core_v3_RuntimePercent_set_runtime_key(envoy_config_core_v3_RuntimePercent *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+
/* envoy.config.core.v3.RuntimeDouble */
UPB_INLINE envoy_config_core_v3_RuntimeDouble *envoy_config_core_v3_RuntimeDouble_new(upb_arena *arena) {
@@ -437,6 +528,12 @@ UPB_INLINE envoy_config_core_v3_RuntimeDouble *envoy_config_core_v3_RuntimeDoubl
envoy_config_core_v3_RuntimeDouble *ret = envoy_config_core_v3_RuntimeDouble_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeDouble_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RuntimeDouble *envoy_config_core_v3_RuntimeDouble_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RuntimeDouble *ret = envoy_config_core_v3_RuntimeDouble_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeDouble_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RuntimeDouble_serialize(const envoy_config_core_v3_RuntimeDouble *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RuntimeDouble_msginit, arena, len);
}
@@ -461,16 +558,23 @@ UPB_INLINE envoy_config_core_v3_RuntimeFeatureFlag *envoy_config_core_v3_Runtime
envoy_config_core_v3_RuntimeFeatureFlag *ret = envoy_config_core_v3_RuntimeFeatureFlag_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeFeatureFlag_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RuntimeFeatureFlag *envoy_config_core_v3_RuntimeFeatureFlag_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RuntimeFeatureFlag *ret = envoy_config_core_v3_RuntimeFeatureFlag_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeFeatureFlag_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RuntimeFeatureFlag_serialize(const envoy_config_core_v3_RuntimeFeatureFlag *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RuntimeFeatureFlag_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_RuntimeFeatureFlag_has_default_value(const envoy_config_core_v3_RuntimeFeatureFlag *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_RuntimeFeatureFlag_default_value(const envoy_config_core_v3_RuntimeFeatureFlag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
-UPB_INLINE upb_strview envoy_config_core_v3_RuntimeFeatureFlag_runtime_key(const envoy_config_core_v3_RuntimeFeatureFlag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_RuntimeFeatureFlag_has_default_value(const envoy_config_core_v3_RuntimeFeatureFlag *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_RuntimeFeatureFlag_default_value(const envoy_config_core_v3_RuntimeFeatureFlag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
+UPB_INLINE upb_strview envoy_config_core_v3_RuntimeFeatureFlag_runtime_key(const envoy_config_core_v3_RuntimeFeatureFlag *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_config_core_v3_RuntimeFeatureFlag_set_default_value(envoy_config_core_v3_RuntimeFeatureFlag *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_RuntimeFeatureFlag_mutable_default_value(envoy_config_core_v3_RuntimeFeatureFlag *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_core_v3_RuntimeFeatureFlag_default_value(msg);
@@ -482,7 +586,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_RuntimeFeature
return sub;
}
UPB_INLINE void envoy_config_core_v3_RuntimeFeatureFlag_set_runtime_key(envoy_config_core_v3_RuntimeFeatureFlag *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
/* envoy.config.core.v3.HeaderValue */
@@ -495,6 +599,12 @@ UPB_INLINE envoy_config_core_v3_HeaderValue *envoy_config_core_v3_HeaderValue_pa
envoy_config_core_v3_HeaderValue *ret = envoy_config_core_v3_HeaderValue_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HeaderValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HeaderValue *envoy_config_core_v3_HeaderValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HeaderValue *ret = envoy_config_core_v3_HeaderValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HeaderValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HeaderValue_serialize(const envoy_config_core_v3_HeaderValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HeaderValue_msginit, arena, len);
}
@@ -519,17 +629,24 @@ UPB_INLINE envoy_config_core_v3_HeaderValueOption *envoy_config_core_v3_HeaderVa
envoy_config_core_v3_HeaderValueOption *ret = envoy_config_core_v3_HeaderValueOption_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HeaderValueOption_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HeaderValueOption *envoy_config_core_v3_HeaderValueOption_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HeaderValueOption *ret = envoy_config_core_v3_HeaderValueOption_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HeaderValueOption_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HeaderValueOption_serialize(const envoy_config_core_v3_HeaderValueOption *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HeaderValueOption_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_HeaderValueOption_has_header(const envoy_config_core_v3_HeaderValueOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_core_v3_HeaderValue* envoy_config_core_v3_HeaderValueOption_header(const envoy_config_core_v3_HeaderValueOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_core_v3_HeaderValue*); }
-UPB_INLINE bool envoy_config_core_v3_HeaderValueOption_has_append(const envoy_config_core_v3_HeaderValueOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_HeaderValueOption_append(const envoy_config_core_v3_HeaderValueOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_core_v3_HeaderValueOption_has_header(const envoy_config_core_v3_HeaderValueOption *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_core_v3_HeaderValue* envoy_config_core_v3_HeaderValueOption_header(const envoy_config_core_v3_HeaderValueOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_core_v3_HeaderValue*); }
+UPB_INLINE bool envoy_config_core_v3_HeaderValueOption_has_append(const envoy_config_core_v3_HeaderValueOption *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_HeaderValueOption_append(const envoy_config_core_v3_HeaderValueOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_core_v3_HeaderValueOption_set_header(envoy_config_core_v3_HeaderValueOption *msg, envoy_config_core_v3_HeaderValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_core_v3_HeaderValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_core_v3_HeaderValue*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValue* envoy_config_core_v3_HeaderValueOption_mutable_header(envoy_config_core_v3_HeaderValueOption *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValue* sub = (struct envoy_config_core_v3_HeaderValue*)envoy_config_core_v3_HeaderValueOption_header(msg);
@@ -541,7 +658,8 @@ UPB_INLINE struct envoy_config_core_v3_HeaderValue* envoy_config_core_v3_HeaderV
return sub;
}
UPB_INLINE void envoy_config_core_v3_HeaderValueOption_set_append(envoy_config_core_v3_HeaderValueOption *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_HeaderValueOption_mutable_append(envoy_config_core_v3_HeaderValueOption *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_core_v3_HeaderValueOption_append(msg);
@@ -563,6 +681,12 @@ UPB_INLINE envoy_config_core_v3_HeaderMap *envoy_config_core_v3_HeaderMap_parse(
envoy_config_core_v3_HeaderMap *ret = envoy_config_core_v3_HeaderMap_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HeaderMap_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HeaderMap *envoy_config_core_v3_HeaderMap_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HeaderMap *ret = envoy_config_core_v3_HeaderMap_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HeaderMap_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HeaderMap_serialize(const envoy_config_core_v3_HeaderMap *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HeaderMap_msginit, arena, len);
}
@@ -574,16 +698,42 @@ UPB_INLINE envoy_config_core_v3_HeaderValue** envoy_config_core_v3_HeaderMap_mut
return (envoy_config_core_v3_HeaderValue**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_core_v3_HeaderValue** envoy_config_core_v3_HeaderMap_resize_headers(envoy_config_core_v3_HeaderMap *msg, size_t len, upb_arena *arena) {
- return (envoy_config_core_v3_HeaderValue**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_core_v3_HeaderValue**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValue* envoy_config_core_v3_HeaderMap_add_headers(envoy_config_core_v3_HeaderMap *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValue* sub = (struct envoy_config_core_v3_HeaderValue*)_upb_msg_new(&envoy_config_core_v3_HeaderValue_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
+/* envoy.config.core.v3.WatchedDirectory */
+
+UPB_INLINE envoy_config_core_v3_WatchedDirectory *envoy_config_core_v3_WatchedDirectory_new(upb_arena *arena) {
+ return (envoy_config_core_v3_WatchedDirectory *)_upb_msg_new(&envoy_config_core_v3_WatchedDirectory_msginit, arena);
+}
+UPB_INLINE envoy_config_core_v3_WatchedDirectory *envoy_config_core_v3_WatchedDirectory_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_core_v3_WatchedDirectory *ret = envoy_config_core_v3_WatchedDirectory_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_WatchedDirectory_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_core_v3_WatchedDirectory *envoy_config_core_v3_WatchedDirectory_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_WatchedDirectory *ret = envoy_config_core_v3_WatchedDirectory_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_WatchedDirectory_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_core_v3_WatchedDirectory_serialize(const envoy_config_core_v3_WatchedDirectory *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_core_v3_WatchedDirectory_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_core_v3_WatchedDirectory_path(const envoy_config_core_v3_WatchedDirectory *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+
+UPB_INLINE void envoy_config_core_v3_WatchedDirectory_set_path(envoy_config_core_v3_WatchedDirectory *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+
/* envoy.config.core.v3.DataSource */
UPB_INLINE envoy_config_core_v3_DataSource *envoy_config_core_v3_DataSource_new(upb_arena *arena) {
@@ -594,6 +744,12 @@ UPB_INLINE envoy_config_core_v3_DataSource *envoy_config_core_v3_DataSource_pars
envoy_config_core_v3_DataSource *ret = envoy_config_core_v3_DataSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_DataSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_DataSource *envoy_config_core_v3_DataSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_DataSource *ret = envoy_config_core_v3_DataSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_DataSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_DataSource_serialize(const envoy_config_core_v3_DataSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_DataSource_msginit, arena, len);
}
@@ -633,17 +789,24 @@ UPB_INLINE envoy_config_core_v3_RetryPolicy *envoy_config_core_v3_RetryPolicy_pa
envoy_config_core_v3_RetryPolicy *ret = envoy_config_core_v3_RetryPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RetryPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RetryPolicy *envoy_config_core_v3_RetryPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RetryPolicy *ret = envoy_config_core_v3_RetryPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RetryPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RetryPolicy_serialize(const envoy_config_core_v3_RetryPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RetryPolicy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_RetryPolicy_has_retry_back_off(const envoy_config_core_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_BackoffStrategy* envoy_config_core_v3_RetryPolicy_retry_back_off(const envoy_config_core_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_BackoffStrategy*); }
-UPB_INLINE bool envoy_config_core_v3_RetryPolicy_has_num_retries(const envoy_config_core_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_RetryPolicy_num_retries(const envoy_config_core_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_RetryPolicy_has_retry_back_off(const envoy_config_core_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_BackoffStrategy* envoy_config_core_v3_RetryPolicy_retry_back_off(const envoy_config_core_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_BackoffStrategy*); }
+UPB_INLINE bool envoy_config_core_v3_RetryPolicy_has_num_retries(const envoy_config_core_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_RetryPolicy_num_retries(const envoy_config_core_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_core_v3_RetryPolicy_set_retry_back_off(envoy_config_core_v3_RetryPolicy *msg, struct envoy_config_core_v3_BackoffStrategy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_BackoffStrategy*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_BackoffStrategy*) = value;
}
UPB_INLINE struct envoy_config_core_v3_BackoffStrategy* envoy_config_core_v3_RetryPolicy_mutable_retry_back_off(envoy_config_core_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_core_v3_BackoffStrategy* sub = (struct envoy_config_core_v3_BackoffStrategy*)envoy_config_core_v3_RetryPolicy_retry_back_off(msg);
@@ -655,7 +818,8 @@ UPB_INLINE struct envoy_config_core_v3_BackoffStrategy* envoy_config_core_v3_Ret
return sub;
}
UPB_INLINE void envoy_config_core_v3_RetryPolicy_set_num_retries(envoy_config_core_v3_RetryPolicy *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_RetryPolicy_mutable_num_retries(envoy_config_core_v3_RetryPolicy *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_RetryPolicy_num_retries(msg);
@@ -677,18 +841,25 @@ UPB_INLINE envoy_config_core_v3_RemoteDataSource *envoy_config_core_v3_RemoteDat
envoy_config_core_v3_RemoteDataSource *ret = envoy_config_core_v3_RemoteDataSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RemoteDataSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RemoteDataSource *envoy_config_core_v3_RemoteDataSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RemoteDataSource *ret = envoy_config_core_v3_RemoteDataSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RemoteDataSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RemoteDataSource_serialize(const envoy_config_core_v3_RemoteDataSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RemoteDataSource_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_RemoteDataSource_has_http_uri(const envoy_config_core_v3_RemoteDataSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_HttpUri* envoy_config_core_v3_RemoteDataSource_http_uri(const envoy_config_core_v3_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_HttpUri*); }
-UPB_INLINE upb_strview envoy_config_core_v3_RemoteDataSource_sha256(const envoy_config_core_v3_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_RemoteDataSource_has_retry_policy(const envoy_config_core_v3_RemoteDataSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_core_v3_RetryPolicy* envoy_config_core_v3_RemoteDataSource_retry_policy(const envoy_config_core_v3_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_core_v3_RetryPolicy*); }
+UPB_INLINE bool envoy_config_core_v3_RemoteDataSource_has_http_uri(const envoy_config_core_v3_RemoteDataSource *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_HttpUri* envoy_config_core_v3_RemoteDataSource_http_uri(const envoy_config_core_v3_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_HttpUri*); }
+UPB_INLINE upb_strview envoy_config_core_v3_RemoteDataSource_sha256(const envoy_config_core_v3_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_RemoteDataSource_has_retry_policy(const envoy_config_core_v3_RemoteDataSource *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_core_v3_RetryPolicy* envoy_config_core_v3_RemoteDataSource_retry_policy(const envoy_config_core_v3_RemoteDataSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_core_v3_RetryPolicy*); }
UPB_INLINE void envoy_config_core_v3_RemoteDataSource_set_http_uri(envoy_config_core_v3_RemoteDataSource *msg, struct envoy_config_core_v3_HttpUri* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_HttpUri*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_HttpUri*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HttpUri* envoy_config_core_v3_RemoteDataSource_mutable_http_uri(envoy_config_core_v3_RemoteDataSource *msg, upb_arena *arena) {
struct envoy_config_core_v3_HttpUri* sub = (struct envoy_config_core_v3_HttpUri*)envoy_config_core_v3_RemoteDataSource_http_uri(msg);
@@ -700,10 +871,11 @@ UPB_INLINE struct envoy_config_core_v3_HttpUri* envoy_config_core_v3_RemoteDataS
return sub;
}
UPB_INLINE void envoy_config_core_v3_RemoteDataSource_set_sha256(envoy_config_core_v3_RemoteDataSource *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_RemoteDataSource_set_retry_policy(envoy_config_core_v3_RemoteDataSource *msg, envoy_config_core_v3_RetryPolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_core_v3_RetryPolicy*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_core_v3_RetryPolicy*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RetryPolicy* envoy_config_core_v3_RemoteDataSource_mutable_retry_policy(envoy_config_core_v3_RemoteDataSource *msg, upb_arena *arena) {
struct envoy_config_core_v3_RetryPolicy* sub = (struct envoy_config_core_v3_RetryPolicy*)envoy_config_core_v3_RemoteDataSource_retry_policy(msg);
@@ -725,6 +897,12 @@ UPB_INLINE envoy_config_core_v3_AsyncDataSource *envoy_config_core_v3_AsyncDataS
envoy_config_core_v3_AsyncDataSource *ret = envoy_config_core_v3_AsyncDataSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_AsyncDataSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_AsyncDataSource *envoy_config_core_v3_AsyncDataSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_AsyncDataSource *ret = envoy_config_core_v3_AsyncDataSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_AsyncDataSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_AsyncDataSource_serialize(const envoy_config_core_v3_AsyncDataSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_AsyncDataSource_msginit, arena, len);
}
@@ -776,6 +954,12 @@ UPB_INLINE envoy_config_core_v3_TransportSocket *envoy_config_core_v3_TransportS
envoy_config_core_v3_TransportSocket *ret = envoy_config_core_v3_TransportSocket_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_TransportSocket_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_TransportSocket *envoy_config_core_v3_TransportSocket_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_TransportSocket *ret = envoy_config_core_v3_TransportSocket_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_TransportSocket_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_TransportSocket_serialize(const envoy_config_core_v3_TransportSocket *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_TransportSocket_msginit, arena, len);
}
@@ -816,16 +1000,23 @@ UPB_INLINE envoy_config_core_v3_RuntimeFractionalPercent *envoy_config_core_v3_R
envoy_config_core_v3_RuntimeFractionalPercent *ret = envoy_config_core_v3_RuntimeFractionalPercent_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeFractionalPercent_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RuntimeFractionalPercent *envoy_config_core_v3_RuntimeFractionalPercent_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RuntimeFractionalPercent *ret = envoy_config_core_v3_RuntimeFractionalPercent_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RuntimeFractionalPercent_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RuntimeFractionalPercent_serialize(const envoy_config_core_v3_RuntimeFractionalPercent *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RuntimeFractionalPercent_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_RuntimeFractionalPercent_has_default_value(const envoy_config_core_v3_RuntimeFractionalPercent *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_core_v3_RuntimeFractionalPercent_default_value(const envoy_config_core_v3_RuntimeFractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_FractionalPercent*); }
-UPB_INLINE upb_strview envoy_config_core_v3_RuntimeFractionalPercent_runtime_key(const envoy_config_core_v3_RuntimeFractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_RuntimeFractionalPercent_has_default_value(const envoy_config_core_v3_RuntimeFractionalPercent *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_core_v3_RuntimeFractionalPercent_default_value(const envoy_config_core_v3_RuntimeFractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE upb_strview envoy_config_core_v3_RuntimeFractionalPercent_runtime_key(const envoy_config_core_v3_RuntimeFractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_config_core_v3_RuntimeFractionalPercent_set_default_value(envoy_config_core_v3_RuntimeFractionalPercent *msg, struct envoy_type_v3_FractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_FractionalPercent*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_core_v3_RuntimeFractionalPercent_mutable_default_value(envoy_config_core_v3_RuntimeFractionalPercent *msg, upb_arena *arena) {
struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_config_core_v3_RuntimeFractionalPercent_default_value(msg);
@@ -837,7 +1028,7 @@ UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_core_v3_RuntimeF
return sub;
}
UPB_INLINE void envoy_config_core_v3_RuntimeFractionalPercent_set_runtime_key(envoy_config_core_v3_RuntimeFractionalPercent *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
/* envoy.config.core.v3.ControlPlane */
@@ -850,6 +1041,12 @@ UPB_INLINE envoy_config_core_v3_ControlPlane *envoy_config_core_v3_ControlPlane_
envoy_config_core_v3_ControlPlane *ret = envoy_config_core_v3_ControlPlane_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ControlPlane_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_ControlPlane *envoy_config_core_v3_ControlPlane_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_ControlPlane *ret = envoy_config_core_v3_ControlPlane_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ControlPlane_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_ControlPlane_serialize(const envoy_config_core_v3_ControlPlane *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_ControlPlane_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c
index 668869d5efc..30a2e754e92 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c
@@ -12,7 +12,7 @@
#include "envoy/config/core/v3/grpc_service.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/wrappers.upb.h"
-#include "udpa/core/v1/authority.upb.h"
+#include "xds/core/v3/authority.upb.h"
#include "envoy/annotations/deprecation.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -20,33 +20,33 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_core_v3_ApiConfigSource_submsgs[4] = {
+static const upb_msglayout *const envoy_config_core_v3_ApiConfigSource_submsgs[3] = {
&envoy_config_core_v3_GrpcService_msginit,
&envoy_config_core_v3_RateLimitSettings_msginit,
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_ApiConfigSource__fields[8] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(32, 48), 0, 0, 9, 3},
- {3, UPB_SIZE(20, 24), 0, 2, 11, 1},
- {4, UPB_SIZE(36, 56), 0, 0, 11, 3},
- {5, UPB_SIZE(24, 32), 0, 2, 11, 1},
- {6, UPB_SIZE(28, 40), 0, 1, 11, 1},
- {7, UPB_SIZE(16, 16), 0, 0, 8, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {2, UPB_SIZE(28, 40), 0, 0, 9, 3},
+ {3, UPB_SIZE(16, 16), 1, 2, 11, 1},
+ {4, UPB_SIZE(32, 48), 0, 0, 11, 3},
+ {5, UPB_SIZE(20, 24), 2, 2, 11, 1},
+ {6, UPB_SIZE(24, 32), 3, 1, 11, 1},
+ {7, UPB_SIZE(12, 12), 0, 0, 8, 1},
{8, UPB_SIZE(8, 8), 0, 0, 14, 1},
};
const upb_msglayout envoy_config_core_v3_ApiConfigSource_msginit = {
&envoy_config_core_v3_ApiConfigSource_submsgs[0],
&envoy_config_core_v3_ApiConfigSource__fields[0],
- UPB_SIZE(40, 64), 8, false,
+ UPB_SIZE(40, 56), 8, false, 255,
};
const upb_msglayout envoy_config_core_v3_AggregatedConfigSource_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_SelfConfigSource__fields[1] = {
@@ -56,7 +56,7 @@ static const upb_msglayout_field envoy_config_core_v3_SelfConfigSource__fields[1
const upb_msglayout envoy_config_core_v3_SelfConfigSource_msginit = {
NULL,
&envoy_config_core_v3_SelfConfigSource__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_RateLimitSettings_submsgs[2] = {
@@ -65,14 +65,14 @@ static const upb_msglayout *const envoy_config_core_v3_RateLimitSettings_submsgs
};
static const upb_msglayout_field envoy_config_core_v3_RateLimitSettings__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 1, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_RateLimitSettings_msginit = {
&envoy_config_core_v3_RateLimitSettings_submsgs[0],
&envoy_config_core_v3_RateLimitSettings__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_ConfigSource_submsgs[5] = {
@@ -80,23 +80,23 @@ static const upb_msglayout *const envoy_config_core_v3_ConfigSource_submsgs[5] =
&envoy_config_core_v3_ApiConfigSource_msginit,
&envoy_config_core_v3_SelfConfigSource_msginit,
&google_protobuf_Duration_msginit,
- &udpa_core_v1_Authority_msginit,
+ &xds_core_v3_Authority_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_ConfigSource__fields[7] = {
{1, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 0, 9, 1},
{2, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 1, 11, 1},
{3, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 0, 11, 1},
- {4, UPB_SIZE(8, 8), 0, 3, 11, 1},
+ {4, UPB_SIZE(8, 8), 1, 3, 11, 1},
{5, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 2, 11, 1},
- {6, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 14, 1},
{7, UPB_SIZE(12, 16), 0, 4, 11, 3},
};
const upb_msglayout envoy_config_core_v3_ConfigSource_msginit = {
&envoy_config_core_v3_ConfigSource_submsgs[0],
&envoy_config_core_v3_ConfigSource__fields[0],
- UPB_SIZE(32, 48), 7, false,
+ UPB_SIZE(32, 48), 7, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h
index f57c563fc37..1fc85348903 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -38,12 +39,12 @@ struct envoy_config_core_v3_GrpcService;
struct google_protobuf_DoubleValue;
struct google_protobuf_Duration;
struct google_protobuf_UInt32Value;
-struct udpa_core_v1_Authority;
+struct xds_core_v3_Authority;
extern const upb_msglayout envoy_config_core_v3_GrpcService_msginit;
extern const upb_msglayout google_protobuf_DoubleValue_msginit;
extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
-extern const upb_msglayout udpa_core_v1_Authority_msginit;
+extern const upb_msglayout xds_core_v3_Authority_msginit;
typedef enum {
envoy_config_core_v3_ApiConfigSource_DEPRECATED_AND_UNAVAILABLE_DO_NOT_USE = 0,
@@ -71,38 +72,45 @@ UPB_INLINE envoy_config_core_v3_ApiConfigSource *envoy_config_core_v3_ApiConfigS
envoy_config_core_v3_ApiConfigSource *ret = envoy_config_core_v3_ApiConfigSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ApiConfigSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_ApiConfigSource *envoy_config_core_v3_ApiConfigSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_ApiConfigSource *ret = envoy_config_core_v3_ApiConfigSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ApiConfigSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_ApiConfigSource_serialize(const envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_ApiConfigSource_msginit, arena, len);
}
-UPB_INLINE int32_t envoy_config_core_v3_ApiConfigSource_api_type(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE upb_strview const* envoy_config_core_v3_ApiConfigSource_cluster_names(const envoy_config_core_v3_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 48), len); }
-UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_refresh_delay(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_refresh_delay(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_grpc_services(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 56)); }
-UPB_INLINE const struct envoy_config_core_v3_GrpcService* const* envoy_config_core_v3_ApiConfigSource_grpc_services(const envoy_config_core_v3_ApiConfigSource *msg, size_t *len) { return (const struct envoy_config_core_v3_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(36, 56), len); }
-UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_request_timeout(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 32)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_request_timeout(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 40)); }
-UPB_INLINE const envoy_config_core_v3_RateLimitSettings* envoy_config_core_v3_ApiConfigSource_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const envoy_config_core_v3_RateLimitSettings*); }
-UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_set_node_on_first_message_only(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
+UPB_INLINE int32_t envoy_config_core_v3_ApiConfigSource_api_type(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE upb_strview const* envoy_config_core_v3_ApiConfigSource_cluster_names(const envoy_config_core_v3_ApiConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 40), len); }
+UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_refresh_delay(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_refresh_delay(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_grpc_services(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 48)); }
+UPB_INLINE const struct envoy_config_core_v3_GrpcService* const* envoy_config_core_v3_ApiConfigSource_grpc_services(const envoy_config_core_v3_ApiConfigSource *msg, size_t *len) { return (const struct envoy_config_core_v3_GrpcService* const*)_upb_array_accessor(msg, UPB_SIZE(32, 48), len); }
+UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_request_timeout(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_request_timeout(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_has_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_config_core_v3_RateLimitSettings* envoy_config_core_v3_ApiConfigSource_rate_limit_settings(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const envoy_config_core_v3_RateLimitSettings*); }
+UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_set_node_on_first_message_only(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
UPB_INLINE int32_t envoy_config_core_v3_ApiConfigSource_transport_api_version(const envoy_config_core_v3_ApiConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_api_type(envoy_config_core_v3_ApiConfigSource *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE upb_strview* envoy_config_core_v3_ApiConfigSource_mutable_cluster_names(envoy_config_core_v3_ApiConfigSource *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 40), len);
}
UPB_INLINE upb_strview* envoy_config_core_v3_ApiConfigSource_resize_cluster_names(envoy_config_core_v3_ApiConfigSource *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 40), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_core_v3_ApiConfigSource_add_cluster_names(envoy_config_core_v3_ApiConfigSource *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(32, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 40), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_refresh_delay(envoy_config_core_v3_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 24), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_mutable_refresh_delay(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_ApiConfigSource_refresh_delay(msg);
@@ -114,20 +122,21 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource
return sub;
}
UPB_INLINE struct envoy_config_core_v3_GrpcService** envoy_config_core_v3_ApiConfigSource_mutable_grpc_services(envoy_config_core_v3_ApiConfigSource *msg, size_t *len) {
- return (struct envoy_config_core_v3_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 56), len);
+ return (struct envoy_config_core_v3_GrpcService**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 48), len);
}
UPB_INLINE struct envoy_config_core_v3_GrpcService** envoy_config_core_v3_ApiConfigSource_resize_grpc_services(envoy_config_core_v3_ApiConfigSource *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_GrpcService**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_GrpcService**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_GrpcService* envoy_config_core_v3_ApiConfigSource_add_grpc_services(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
struct envoy_config_core_v3_GrpcService* sub = (struct envoy_config_core_v3_GrpcService*)_upb_msg_new(&envoy_config_core_v3_GrpcService_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_request_timeout(envoy_config_core_v3_ApiConfigSource *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 32), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 24), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource_mutable_request_timeout(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_ApiConfigSource_request_timeout(msg);
@@ -139,7 +148,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ApiConfigSource
return sub;
}
UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_rate_limit_settings(envoy_config_core_v3_ApiConfigSource *msg, envoy_config_core_v3_RateLimitSettings* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 40), envoy_config_core_v3_RateLimitSettings*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 32), envoy_config_core_v3_RateLimitSettings*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RateLimitSettings* envoy_config_core_v3_ApiConfigSource_mutable_rate_limit_settings(envoy_config_core_v3_ApiConfigSource *msg, upb_arena *arena) {
struct envoy_config_core_v3_RateLimitSettings* sub = (struct envoy_config_core_v3_RateLimitSettings*)envoy_config_core_v3_ApiConfigSource_rate_limit_settings(msg);
@@ -151,7 +161,7 @@ UPB_INLINE struct envoy_config_core_v3_RateLimitSettings* envoy_config_core_v3_A
return sub;
}
UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_set_node_on_first_message_only(envoy_config_core_v3_ApiConfigSource *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_ApiConfigSource_set_transport_api_version(envoy_config_core_v3_ApiConfigSource *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
@@ -167,6 +177,12 @@ UPB_INLINE envoy_config_core_v3_AggregatedConfigSource *envoy_config_core_v3_Agg
envoy_config_core_v3_AggregatedConfigSource *ret = envoy_config_core_v3_AggregatedConfigSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_AggregatedConfigSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_AggregatedConfigSource *envoy_config_core_v3_AggregatedConfigSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_AggregatedConfigSource *ret = envoy_config_core_v3_AggregatedConfigSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_AggregatedConfigSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_AggregatedConfigSource_serialize(const envoy_config_core_v3_AggregatedConfigSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_AggregatedConfigSource_msginit, arena, len);
}
@@ -183,6 +199,12 @@ UPB_INLINE envoy_config_core_v3_SelfConfigSource *envoy_config_core_v3_SelfConfi
envoy_config_core_v3_SelfConfigSource *ret = envoy_config_core_v3_SelfConfigSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_SelfConfigSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_SelfConfigSource *envoy_config_core_v3_SelfConfigSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_SelfConfigSource *ret = envoy_config_core_v3_SelfConfigSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_SelfConfigSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_SelfConfigSource_serialize(const envoy_config_core_v3_SelfConfigSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_SelfConfigSource_msginit, arena, len);
}
@@ -203,17 +225,24 @@ UPB_INLINE envoy_config_core_v3_RateLimitSettings *envoy_config_core_v3_RateLimi
envoy_config_core_v3_RateLimitSettings *ret = envoy_config_core_v3_RateLimitSettings_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_RateLimitSettings_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_RateLimitSettings *envoy_config_core_v3_RateLimitSettings_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_RateLimitSettings *ret = envoy_config_core_v3_RateLimitSettings_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_RateLimitSettings_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_RateLimitSettings_serialize(const envoy_config_core_v3_RateLimitSettings *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_RateLimitSettings_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_RateLimitSettings_has_max_tokens(const envoy_config_core_v3_RateLimitSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_RateLimitSettings_max_tokens(const envoy_config_core_v3_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_RateLimitSettings_has_fill_rate(const envoy_config_core_v3_RateLimitSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_core_v3_RateLimitSettings_fill_rate(const envoy_config_core_v3_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_DoubleValue*); }
+UPB_INLINE bool envoy_config_core_v3_RateLimitSettings_has_max_tokens(const envoy_config_core_v3_RateLimitSettings *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_RateLimitSettings_max_tokens(const envoy_config_core_v3_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_RateLimitSettings_has_fill_rate(const envoy_config_core_v3_RateLimitSettings *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_DoubleValue* envoy_config_core_v3_RateLimitSettings_fill_rate(const envoy_config_core_v3_RateLimitSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_DoubleValue*); }
UPB_INLINE void envoy_config_core_v3_RateLimitSettings_set_max_tokens(envoy_config_core_v3_RateLimitSettings *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_RateLimitSettings_mutable_max_tokens(envoy_config_core_v3_RateLimitSettings *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_RateLimitSettings_max_tokens(msg);
@@ -225,7 +254,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_RateLimitSet
return sub;
}
UPB_INLINE void envoy_config_core_v3_RateLimitSettings_set_fill_rate(envoy_config_core_v3_RateLimitSettings *msg, struct google_protobuf_DoubleValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_DoubleValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_DoubleValue*) = value;
}
UPB_INLINE struct google_protobuf_DoubleValue* envoy_config_core_v3_RateLimitSettings_mutable_fill_rate(envoy_config_core_v3_RateLimitSettings *msg, upb_arena *arena) {
struct google_protobuf_DoubleValue* sub = (struct google_protobuf_DoubleValue*)envoy_config_core_v3_RateLimitSettings_fill_rate(msg);
@@ -247,6 +277,12 @@ UPB_INLINE envoy_config_core_v3_ConfigSource *envoy_config_core_v3_ConfigSource_
envoy_config_core_v3_ConfigSource *ret = envoy_config_core_v3_ConfigSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ConfigSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_ConfigSource *envoy_config_core_v3_ConfigSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_ConfigSource *ret = envoy_config_core_v3_ConfigSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ConfigSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_ConfigSource_serialize(const envoy_config_core_v3_ConfigSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_ConfigSource_msginit, arena, len);
}
@@ -266,13 +302,13 @@ UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_api_config_source(const en
UPB_INLINE const envoy_config_core_v3_ApiConfigSource* envoy_config_core_v3_ConfigSource_api_config_source(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_ApiConfigSource*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 2, NULL); }
UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_ads(const envoy_config_core_v3_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 3; }
UPB_INLINE const envoy_config_core_v3_AggregatedConfigSource* envoy_config_core_v3_ConfigSource_ads(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_AggregatedConfigSource*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 3, NULL); }
-UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
+UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_ConfigSource_initial_fetch_timeout(const envoy_config_core_v3_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); }
UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_self(const envoy_config_core_v3_ConfigSource *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 5; }
UPB_INLINE const envoy_config_core_v3_SelfConfigSource* envoy_config_core_v3_ConfigSource_self(const envoy_config_core_v3_ConfigSource *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_SelfConfigSource*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 5, NULL); }
-UPB_INLINE int32_t envoy_config_core_v3_ConfigSource_resource_api_version(const envoy_config_core_v3_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t envoy_config_core_v3_ConfigSource_resource_api_version(const envoy_config_core_v3_ConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool envoy_config_core_v3_ConfigSource_has_authorities(const envoy_config_core_v3_ConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
-UPB_INLINE const struct udpa_core_v1_Authority* const* envoy_config_core_v3_ConfigSource_authorities(const envoy_config_core_v3_ConfigSource *msg, size_t *len) { return (const struct udpa_core_v1_Authority* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
+UPB_INLINE const struct xds_core_v3_Authority* const* envoy_config_core_v3_ConfigSource_authorities(const envoy_config_core_v3_ConfigSource *msg, size_t *len) { return (const struct xds_core_v3_Authority* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
UPB_INLINE void envoy_config_core_v3_ConfigSource_set_path(envoy_config_core_v3_ConfigSource *msg, upb_strview value) {
UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), value, UPB_SIZE(24, 40), 1);
@@ -302,6 +338,7 @@ UPB_INLINE struct envoy_config_core_v3_AggregatedConfigSource* envoy_config_core
return sub;
}
UPB_INLINE void envoy_config_core_v3_ConfigSource_set_initial_fetch_timeout(envoy_config_core_v3_ConfigSource *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_ConfigSource_mutable_initial_fetch_timeout(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
@@ -326,18 +363,18 @@ UPB_INLINE struct envoy_config_core_v3_SelfConfigSource* envoy_config_core_v3_Co
return sub;
}
UPB_INLINE void envoy_config_core_v3_ConfigSource_set_resource_api_version(envoy_config_core_v3_ConfigSource *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
-UPB_INLINE struct udpa_core_v1_Authority** envoy_config_core_v3_ConfigSource_mutable_authorities(envoy_config_core_v3_ConfigSource *msg, size_t *len) {
- return (struct udpa_core_v1_Authority**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
+UPB_INLINE struct xds_core_v3_Authority** envoy_config_core_v3_ConfigSource_mutable_authorities(envoy_config_core_v3_ConfigSource *msg, size_t *len) {
+ return (struct xds_core_v3_Authority**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
-UPB_INLINE struct udpa_core_v1_Authority** envoy_config_core_v3_ConfigSource_resize_authorities(envoy_config_core_v3_ConfigSource *msg, size_t len, upb_arena *arena) {
- return (struct udpa_core_v1_Authority**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_TYPE_MESSAGE, arena);
+UPB_INLINE struct xds_core_v3_Authority** envoy_config_core_v3_ConfigSource_resize_authorities(envoy_config_core_v3_ConfigSource *msg, size_t len, upb_arena *arena) {
+ return (struct xds_core_v3_Authority**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(2, 3), arena);
}
-UPB_INLINE struct udpa_core_v1_Authority* envoy_config_core_v3_ConfigSource_add_authorities(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
- struct udpa_core_v1_Authority* sub = (struct udpa_core_v1_Authority*)_upb_msg_new(&udpa_core_v1_Authority_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+UPB_INLINE struct xds_core_v3_Authority* envoy_config_core_v3_ConfigSource_add_authorities(envoy_config_core_v3_ConfigSource *msg, upb_arena *arena) {
+ struct xds_core_v3_Authority* sub = (struct xds_core_v3_Authority*)_upb_msg_new(&xds_core_v3_Authority_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(12, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c
index 1d02920ee9a..3f89247a7a5 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c
@@ -27,7 +27,7 @@ static const upb_msglayout_field envoy_config_core_v3_EventServiceConfig__fields
const upb_msglayout envoy_config_core_v3_EventServiceConfig_msginit = {
&envoy_config_core_v3_EventServiceConfig_submsgs[0],
&envoy_config_core_v3_EventServiceConfig__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h
index 3d7bb0ad547..3069f4c3c77 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,6 +37,12 @@ UPB_INLINE envoy_config_core_v3_EventServiceConfig *envoy_config_core_v3_EventSe
envoy_config_core_v3_EventServiceConfig *ret = envoy_config_core_v3_EventServiceConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_EventServiceConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_EventServiceConfig *envoy_config_core_v3_EventServiceConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_EventServiceConfig *ret = envoy_config_core_v3_EventServiceConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_EventServiceConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_EventServiceConfig_serialize(const envoy_config_core_v3_EventServiceConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_EventServiceConfig_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c
index 0fe1d608ddc..47b8b32ecbd 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c
@@ -21,14 +21,14 @@ static const upb_msglayout *const envoy_config_core_v3_TypedExtensionConfig_subm
};
static const upb_msglayout_field envoy_config_core_v3_TypedExtensionConfig__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_TypedExtensionConfig_msginit = {
&envoy_config_core_v3_TypedExtensionConfig_submsgs[0],
&envoy_config_core_v3_TypedExtensionConfig__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_ExtensionConfigSource_submsgs[2] = {
@@ -37,16 +37,16 @@ static const upb_msglayout *const envoy_config_core_v3_ExtensionConfigSource_sub
};
static const upb_msglayout_field envoy_config_core_v3_ExtensionConfigSource__fields[4] = {
- {1, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {2, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
{4, UPB_SIZE(12, 24), 0, 0, 9, 3},
};
const upb_msglayout envoy_config_core_v3_ExtensionConfigSource_msginit = {
&envoy_config_core_v3_ExtensionConfigSource_submsgs[0],
&envoy_config_core_v3_ExtensionConfigSource__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(16, 32), 4, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h
index d70b5bc8c65..8499bfc26ce 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -41,19 +42,26 @@ UPB_INLINE envoy_config_core_v3_TypedExtensionConfig *envoy_config_core_v3_Typed
envoy_config_core_v3_TypedExtensionConfig *ret = envoy_config_core_v3_TypedExtensionConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_TypedExtensionConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_TypedExtensionConfig *envoy_config_core_v3_TypedExtensionConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_TypedExtensionConfig *ret = envoy_config_core_v3_TypedExtensionConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_TypedExtensionConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_TypedExtensionConfig_serialize(const envoy_config_core_v3_TypedExtensionConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_TypedExtensionConfig_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_core_v3_TypedExtensionConfig_name(const envoy_config_core_v3_TypedExtensionConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_TypedExtensionConfig_has_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_core_v3_TypedExtensionConfig_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); }
+UPB_INLINE upb_strview envoy_config_core_v3_TypedExtensionConfig_name(const envoy_config_core_v3_TypedExtensionConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_TypedExtensionConfig_has_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_core_v3_TypedExtensionConfig_typed_config(const envoy_config_core_v3_TypedExtensionConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_core_v3_TypedExtensionConfig_set_name(envoy_config_core_v3_TypedExtensionConfig *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_TypedExtensionConfig_set_typed_config(envoy_config_core_v3_TypedExtensionConfig *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_core_v3_TypedExtensionConfig_mutable_typed_config(envoy_config_core_v3_TypedExtensionConfig *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_core_v3_TypedExtensionConfig_typed_config(msg);
@@ -75,18 +83,25 @@ UPB_INLINE envoy_config_core_v3_ExtensionConfigSource *envoy_config_core_v3_Exte
envoy_config_core_v3_ExtensionConfigSource *ret = envoy_config_core_v3_ExtensionConfigSource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ExtensionConfigSource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_ExtensionConfigSource *envoy_config_core_v3_ExtensionConfigSource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_ExtensionConfigSource *ret = envoy_config_core_v3_ExtensionConfigSource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ExtensionConfigSource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_ExtensionConfigSource_serialize(const envoy_config_core_v3_ExtensionConfigSource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_ExtensionConfigSource_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_has_config_source(const envoy_config_core_v3_ExtensionConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_has_config_source(const envoy_config_core_v3_ExtensionConfigSource *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_core_v3_ExtensionConfigSource_config_source(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_ConfigSource*); }
-UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_has_default_config(const envoy_config_core_v3_ExtensionConfigSource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_has_default_config(const envoy_config_core_v3_ExtensionConfigSource *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_Any* envoy_config_core_v3_ExtensionConfigSource_default_config(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Any*); }
-UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_apply_default_config_without_warming(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_apply_default_config_without_warming(const envoy_config_core_v3_ExtensionConfigSource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE upb_strview const* envoy_config_core_v3_ExtensionConfigSource_type_urls(const envoy_config_core_v3_ExtensionConfigSource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
UPB_INLINE void envoy_config_core_v3_ExtensionConfigSource_set_config_source(envoy_config_core_v3_ExtensionConfigSource *msg, struct envoy_config_core_v3_ConfigSource* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_core_v3_ExtensionConfigSource_mutable_config_source(envoy_config_core_v3_ExtensionConfigSource *msg, upb_arena *arena) {
@@ -99,6 +114,7 @@ UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_core_v3_Extens
return sub;
}
UPB_INLINE void envoy_config_core_v3_ExtensionConfigSource_set_default_config(envoy_config_core_v3_ExtensionConfigSource *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_core_v3_ExtensionConfigSource_mutable_default_config(envoy_config_core_v3_ExtensionConfigSource *msg, upb_arena *arena) {
@@ -111,16 +127,16 @@ UPB_INLINE struct google_protobuf_Any* envoy_config_core_v3_ExtensionConfigSourc
return sub;
}
UPB_INLINE void envoy_config_core_v3_ExtensionConfigSource_set_apply_default_config_without_warming(envoy_config_core_v3_ExtensionConfigSource *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE upb_strview* envoy_config_core_v3_ExtensionConfigSource_mutable_type_urls(envoy_config_core_v3_ExtensionConfigSource *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
}
UPB_INLINE upb_strview* envoy_config_core_v3_ExtensionConfigSource_resize_type_urls(envoy_config_core_v3_ExtensionConfigSource *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_core_v3_ExtensionConfigSource_add_type_urls(envoy_config_core_v3_ExtensionConfigSource *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(12, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(3, 4), &val,
arena);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c
index f956bb44eea..b2e99df0649 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c
@@ -30,16 +30,16 @@ static const upb_msglayout *const envoy_config_core_v3_GrpcService_submsgs[4] =
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService__fields[4] = {
- {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
- {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 3, 11, 1},
- {5, UPB_SIZE(4, 8), 0, 2, 11, 3},
+ {1, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 0, 11, 1},
+ {2, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1},
+ {3, UPB_SIZE(4, 8), 1, 3, 11, 1},
+ {5, UPB_SIZE(8, 16), 0, 2, 11, 3},
};
const upb_msglayout envoy_config_core_v3_GrpcService_msginit = {
&envoy_config_core_v3_GrpcService_submsgs[0],
&envoy_config_core_v3_GrpcService__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(24, 40), 4, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_EnvoyGrpc__fields[2] = {
@@ -50,7 +50,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_EnvoyGrpc__fie
const upb_msglayout envoy_config_core_v3_GrpcService_EnvoyGrpc_msginit = {
NULL,
&envoy_config_core_v3_GrpcService_EnvoyGrpc__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_submsgs[5] = {
@@ -62,42 +62,42 @@ static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_su
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc__fields[8] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(24, 48), 0, 2, 11, 1},
- {3, UPB_SIZE(40, 80), 0, 0, 11, 3},
- {4, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {5, UPB_SIZE(16, 32), 0, 0, 9, 1},
- {6, UPB_SIZE(28, 56), 0, 3, 11, 1},
- {7, UPB_SIZE(32, 64), 0, 4, 11, 1},
- {8, UPB_SIZE(36, 72), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(28, 56), 1, 2, 11, 1},
+ {3, UPB_SIZE(44, 88), 0, 0, 11, 3},
+ {4, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {5, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {6, UPB_SIZE(32, 64), 2, 3, 11, 1},
+ {7, UPB_SIZE(36, 72), 3, 4, 11, 1},
+ {8, UPB_SIZE(40, 80), 4, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc__fields[0],
- UPB_SIZE(48, 96), 8, false,
+ UPB_SIZE(48, 96), 8, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_submsgs[3] = {
+static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_submsgs[1] = {
&envoy_config_core_v3_DataSource_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_submsgs[3] = {
@@ -115,7 +115,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cha
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials__fields[0],
- UPB_SIZE(8, 16), 3, false,
+ UPB_SIZE(8, 16), 3, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_submsgs[5] = {
@@ -139,7 +139,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cal
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials__fields[0],
- UPB_SIZE(16, 32), 7, false,
+ UPB_SIZE(16, 32), 7, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials__fields[2] = {
@@ -150,7 +150,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cal
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit = {
NULL,
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials__fields[2] = {
@@ -161,7 +161,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cal
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit = {
NULL,
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_submsgs[1] = {
@@ -176,7 +176,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cal
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService__fields[9] = {
@@ -194,7 +194,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cal
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit = {
NULL,
&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService__fields[0],
- UPB_SIZE(72, 144), 9, false,
+ UPB_SIZE(72, 144), 9, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_submsgs[1] = {
@@ -208,7 +208,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cha
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value__fields[2] = {
@@ -219,7 +219,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cha
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_msginit = {
NULL,
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry_submsgs[1] = {
@@ -234,7 +234,7 @@ static const upb_msglayout_field envoy_config_core_v3_GrpcService_GoogleGrpc_Cha
const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry_msginit = {
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry_submsgs[0],
&envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h
index 0f8accaaaa0..dd9913debf3 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -87,6 +88,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService *envoy_config_core_v3_GrpcService_pa
envoy_config_core_v3_GrpcService *ret = envoy_config_core_v3_GrpcService_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService *envoy_config_core_v3_GrpcService_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService *ret = envoy_config_core_v3_GrpcService_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_serialize(const envoy_config_core_v3_GrpcService *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_msginit, arena, len);
}
@@ -96,19 +103,19 @@ typedef enum {
envoy_config_core_v3_GrpcService_target_specifier_google_grpc = 2,
envoy_config_core_v3_GrpcService_target_specifier_NOT_SET = 0
} envoy_config_core_v3_GrpcService_target_specifier_oneofcases;
-UPB_INLINE envoy_config_core_v3_GrpcService_target_specifier_oneofcases envoy_config_core_v3_GrpcService_target_specifier_case(const envoy_config_core_v3_GrpcService* msg) { return (envoy_config_core_v3_GrpcService_target_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+UPB_INLINE envoy_config_core_v3_GrpcService_target_specifier_oneofcases envoy_config_core_v3_GrpcService_target_specifier_case(const envoy_config_core_v3_GrpcService* msg) { return (envoy_config_core_v3_GrpcService_target_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_has_envoy_grpc(const envoy_config_core_v3_GrpcService *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; }
-UPB_INLINE const envoy_config_core_v3_GrpcService_EnvoyGrpc* envoy_config_core_v3_GrpcService_envoy_grpc(const envoy_config_core_v3_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_GrpcService_EnvoyGrpc*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_has_google_grpc(const envoy_config_core_v3_GrpcService *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
-UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc* envoy_config_core_v3_GrpcService_google_grpc(const envoy_config_core_v3_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_GrpcService_GoogleGrpc*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_has_timeout(const envoy_config_core_v3_GrpcService *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_GrpcService_timeout(const envoy_config_core_v3_GrpcService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_has_initial_metadata(const envoy_config_core_v3_GrpcService *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValue* const* envoy_config_core_v3_GrpcService_initial_metadata(const envoy_config_core_v3_GrpcService *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValue* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_has_envoy_grpc(const envoy_config_core_v3_GrpcService *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 1; }
+UPB_INLINE const envoy_config_core_v3_GrpcService_EnvoyGrpc* envoy_config_core_v3_GrpcService_envoy_grpc(const envoy_config_core_v3_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_GrpcService_EnvoyGrpc*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 1, NULL); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_has_google_grpc(const envoy_config_core_v3_GrpcService *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 2; }
+UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc* envoy_config_core_v3_GrpcService_google_grpc(const envoy_config_core_v3_GrpcService *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_GrpcService_GoogleGrpc*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 2, NULL); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_has_timeout(const envoy_config_core_v3_GrpcService *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_GrpcService_timeout(const envoy_config_core_v3_GrpcService *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_has_initial_metadata(const envoy_config_core_v3_GrpcService *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValue* const* envoy_config_core_v3_GrpcService_initial_metadata(const envoy_config_core_v3_GrpcService *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValue* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
UPB_INLINE void envoy_config_core_v3_GrpcService_set_envoy_grpc(envoy_config_core_v3_GrpcService *msg, envoy_config_core_v3_GrpcService_EnvoyGrpc* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_GrpcService_EnvoyGrpc*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_GrpcService_EnvoyGrpc*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 1);
}
UPB_INLINE struct envoy_config_core_v3_GrpcService_EnvoyGrpc* envoy_config_core_v3_GrpcService_mutable_envoy_grpc(envoy_config_core_v3_GrpcService *msg, upb_arena *arena) {
struct envoy_config_core_v3_GrpcService_EnvoyGrpc* sub = (struct envoy_config_core_v3_GrpcService_EnvoyGrpc*)envoy_config_core_v3_GrpcService_envoy_grpc(msg);
@@ -120,7 +127,7 @@ UPB_INLINE struct envoy_config_core_v3_GrpcService_EnvoyGrpc* envoy_config_core_
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_set_google_grpc(envoy_config_core_v3_GrpcService *msg, envoy_config_core_v3_GrpcService_GoogleGrpc* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_GrpcService_GoogleGrpc*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_GrpcService_GoogleGrpc*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 2);
}
UPB_INLINE struct envoy_config_core_v3_GrpcService_GoogleGrpc* envoy_config_core_v3_GrpcService_mutable_google_grpc(envoy_config_core_v3_GrpcService *msg, upb_arena *arena) {
struct envoy_config_core_v3_GrpcService_GoogleGrpc* sub = (struct envoy_config_core_v3_GrpcService_GoogleGrpc*)envoy_config_core_v3_GrpcService_google_grpc(msg);
@@ -132,7 +139,8 @@ UPB_INLINE struct envoy_config_core_v3_GrpcService_GoogleGrpc* envoy_config_core
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_set_timeout(envoy_config_core_v3_GrpcService *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_GrpcService_mutable_timeout(envoy_config_core_v3_GrpcService *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_GrpcService_timeout(msg);
@@ -144,15 +152,15 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_GrpcService_mut
return sub;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValue** envoy_config_core_v3_GrpcService_mutable_initial_metadata(envoy_config_core_v3_GrpcService *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValue**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+ return (struct envoy_config_core_v3_HeaderValue**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValue** envoy_config_core_v3_GrpcService_resize_initial_metadata(envoy_config_core_v3_GrpcService *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValue**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValue**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValue* envoy_config_core_v3_GrpcService_add_initial_metadata(envoy_config_core_v3_GrpcService *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValue* sub = (struct envoy_config_core_v3_HeaderValue*)_upb_msg_new(&envoy_config_core_v3_HeaderValue_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -167,6 +175,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_EnvoyGrpc *envoy_config_core_v3_Grpc
envoy_config_core_v3_GrpcService_EnvoyGrpc *ret = envoy_config_core_v3_GrpcService_EnvoyGrpc_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_EnvoyGrpc_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_EnvoyGrpc *envoy_config_core_v3_GrpcService_EnvoyGrpc_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_EnvoyGrpc *ret = envoy_config_core_v3_GrpcService_EnvoyGrpc_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_EnvoyGrpc_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_EnvoyGrpc_serialize(const envoy_config_core_v3_GrpcService_EnvoyGrpc *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_EnvoyGrpc_msginit, arena, len);
}
@@ -191,29 +205,36 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc *envoy_config_core_v3_Grp
envoy_config_core_v3_GrpcService_GoogleGrpc *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc *envoy_config_core_v3_GrpcService_GoogleGrpc_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_core_v3_GrpcService_GoogleGrpc_target_uri(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_channel_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials* envoy_config_core_v3_GrpcService_GoogleGrpc_channel_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials*); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_call_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
-UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials* const* envoy_config_core_v3_GrpcService_GoogleGrpc_call_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg, size_t *len) { return (const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
-UPB_INLINE upb_strview envoy_config_core_v3_GrpcService_GoogleGrpc_stat_prefix(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE upb_strview envoy_config_core_v3_GrpcService_GoogleGrpc_credentials_factory_name(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_config(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_GrpcService_GoogleGrpc_config(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_Struct*); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_per_stream_buffer_limit_bytes(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_GrpcService_GoogleGrpc_per_stream_buffer_limit_bytes(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_channel_args(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
-UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs* envoy_config_core_v3_GrpcService_GoogleGrpc_channel_args(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs*); }
+UPB_INLINE upb_strview envoy_config_core_v3_GrpcService_GoogleGrpc_target_uri(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_channel_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials* envoy_config_core_v3_GrpcService_GoogleGrpc_channel_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_call_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
+UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials* const* envoy_config_core_v3_GrpcService_GoogleGrpc_call_credentials(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg, size_t *len) { return (const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
+UPB_INLINE upb_strview envoy_config_core_v3_GrpcService_GoogleGrpc_stat_prefix(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_config_core_v3_GrpcService_GoogleGrpc_credentials_factory_name(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_config(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_GrpcService_GoogleGrpc_config(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_Struct*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_per_stream_buffer_limit_bytes(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_GrpcService_GoogleGrpc_per_stream_buffer_limit_bytes(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_has_channel_args(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs* envoy_config_core_v3_GrpcService_GoogleGrpc_channel_args(const envoy_config_core_v3_GrpcService_GoogleGrpc *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs*); }
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_target_uri(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_channel_credentials(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials*) = value;
}
UPB_INLINE struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials* envoy_config_core_v3_GrpcService_GoogleGrpc_mutable_channel_credentials(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_arena *arena) {
struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials* sub = (struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials*)envoy_config_core_v3_GrpcService_GoogleGrpc_channel_credentials(msg);
@@ -225,26 +246,27 @@ UPB_INLINE struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials
return sub;
}
UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials** envoy_config_core_v3_GrpcService_GoogleGrpc_mutable_call_credentials(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, size_t *len) {
- return (envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
+ return (envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials** envoy_config_core_v3_GrpcService_GoogleGrpc_resize_call_credentials(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, size_t len, upb_arena *arena) {
- return (envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials* envoy_config_core_v3_GrpcService_GoogleGrpc_add_call_credentials(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_arena *arena) {
struct envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials* sub = (struct envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials*)_upb_msg_new(&envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 88), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_stat_prefix(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_credentials_factory_name(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_config(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, struct google_protobuf_Struct* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_Struct*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_GrpcService_GoogleGrpc_mutable_config(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_core_v3_GrpcService_GoogleGrpc_config(msg);
@@ -256,7 +278,8 @@ UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_GrpcService_Googl
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_per_stream_buffer_limit_bytes(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_GrpcService_GoogleGrpc_mutable_per_stream_buffer_limit_bytes(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_GrpcService_GoogleGrpc_per_stream_buffer_limit_bytes(msg);
@@ -268,7 +291,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_GrpcService_
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_set_channel_args(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 72), envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 80), envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs*) = value;
}
UPB_INLINE struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs* envoy_config_core_v3_GrpcService_GoogleGrpc_mutable_channel_args(envoy_config_core_v3_GrpcService_GoogleGrpc *msg, upb_arena *arena) {
struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs* sub = (struct envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs*)envoy_config_core_v3_GrpcService_GoogleGrpc_channel_args(msg);
@@ -290,19 +314,26 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *envoy_con
envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_has_root_certs(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_root_certs(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_has_private_key(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_private_key(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_has_cert_chain(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_cert_chain(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_has_root_certs(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_root_certs(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_has_private_key(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_private_key(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_has_cert_chain(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_cert_chain(const envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_DataSource*); }
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_set_root_certs(envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_mutable_root_certs(envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_root_certs(msg);
@@ -314,7 +345,8 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcServ
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_set_private_key(envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_mutable_private_key(envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_private_key(msg);
@@ -326,7 +358,8 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcServ
return sub;
}
UPB_INLINE void envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_set_cert_chain(envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_mutable_cert_chain(envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_cert_chain(msg);
@@ -348,6 +381,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials *e
envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials *envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit, arena, len);
}
@@ -364,6 +403,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials *envoy
envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_msginit, arena, len);
}
@@ -430,6 +475,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials *envoy_co
envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit, arena, len);
}
@@ -538,6 +589,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAc
envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit, arena, len);
}
@@ -562,6 +619,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAM
envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit, arena, len);
}
@@ -586,6 +649,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataC
envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit, arena, len);
}
@@ -626,6 +695,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsServic
envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit, arena, len);
}
@@ -678,6 +753,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs *envoy_config
envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_msginit, arena, len);
}
@@ -702,6 +783,12 @@ UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value *envoy_
envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value *ret = envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_serialize(const envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c
index ce69337c5d7..b0a5a642885 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c
@@ -18,14 +18,13 @@
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
-#include "envoy/annotations/deprecation.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_core_v3_HealthCheck_submsgs[19] = {
+static const upb_msglayout *const envoy_config_core_v3_HealthCheck_submsgs[10] = {
&envoy_config_core_v3_EventServiceConfig_msginit,
&envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit,
&envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit,
@@ -38,35 +37,36 @@ static const upb_msglayout *const envoy_config_core_v3_HealthCheck_submsgs[19] =
&google_protobuf_UInt32Value_msginit,
};
-static const upb_msglayout_field envoy_config_core_v3_HealthCheck__fields[22] = {
- {1, UPB_SIZE(16, 24), 0, 7, 11, 1},
- {2, UPB_SIZE(20, 32), 0, 7, 11, 1},
- {3, UPB_SIZE(24, 40), 0, 7, 11, 1},
- {4, UPB_SIZE(28, 48), 0, 9, 11, 1},
- {5, UPB_SIZE(32, 56), 0, 9, 11, 1},
- {6, UPB_SIZE(36, 64), 0, 9, 11, 1},
- {7, UPB_SIZE(40, 72), 0, 6, 11, 1},
- {8, UPB_SIZE(76, 144), UPB_SIZE(-81, -153), 3, 11, 1},
- {9, UPB_SIZE(76, 144), UPB_SIZE(-81, -153), 4, 11, 1},
- {11, UPB_SIZE(76, 144), UPB_SIZE(-81, -153), 2, 11, 1},
- {12, UPB_SIZE(44, 80), 0, 7, 11, 1},
- {13, UPB_SIZE(76, 144), UPB_SIZE(-81, -153), 1, 11, 1},
- {14, UPB_SIZE(48, 88), 0, 7, 11, 1},
- {15, UPB_SIZE(52, 96), 0, 7, 11, 1},
- {16, UPB_SIZE(56, 104), 0, 7, 11, 1},
- {17, UPB_SIZE(8, 8), 0, 0, 9, 1},
- {18, UPB_SIZE(0, 0), 0, 0, 13, 1},
- {19, UPB_SIZE(4, 4), 0, 0, 8, 1},
- {20, UPB_SIZE(60, 112), 0, 7, 11, 1},
- {21, UPB_SIZE(64, 120), 0, 5, 11, 1},
- {22, UPB_SIZE(68, 128), 0, 0, 11, 1},
- {23, UPB_SIZE(72, 136), 0, 8, 11, 1},
+static const upb_msglayout_field envoy_config_core_v3_HealthCheck__fields[23] = {
+ {1, UPB_SIZE(20, 32), 1, 7, 11, 1},
+ {2, UPB_SIZE(24, 40), 2, 7, 11, 1},
+ {3, UPB_SIZE(28, 48), 3, 7, 11, 1},
+ {4, UPB_SIZE(32, 56), 4, 9, 11, 1},
+ {5, UPB_SIZE(36, 64), 5, 9, 11, 1},
+ {6, UPB_SIZE(40, 72), 6, 9, 11, 1},
+ {7, UPB_SIZE(44, 80), 7, 6, 11, 1},
+ {8, UPB_SIZE(84, 160), UPB_SIZE(-89, -169), 3, 11, 1},
+ {9, UPB_SIZE(84, 160), UPB_SIZE(-89, -169), 4, 11, 1},
+ {11, UPB_SIZE(84, 160), UPB_SIZE(-89, -169), 2, 11, 1},
+ {12, UPB_SIZE(48, 88), 8, 7, 11, 1},
+ {13, UPB_SIZE(84, 160), UPB_SIZE(-89, -169), 1, 11, 1},
+ {14, UPB_SIZE(52, 96), 9, 7, 11, 1},
+ {15, UPB_SIZE(56, 104), 10, 7, 11, 1},
+ {16, UPB_SIZE(60, 112), 11, 7, 11, 1},
+ {17, UPB_SIZE(12, 16), 0, 0, 9, 1},
+ {18, UPB_SIZE(4, 4), 0, 0, 13, 1},
+ {19, UPB_SIZE(8, 8), 0, 0, 8, 1},
+ {20, UPB_SIZE(64, 120), 12, 7, 11, 1},
+ {21, UPB_SIZE(68, 128), 13, 5, 11, 1},
+ {22, UPB_SIZE(72, 136), 14, 0, 11, 1},
+ {23, UPB_SIZE(76, 144), 15, 8, 11, 1},
+ {24, UPB_SIZE(80, 152), 16, 7, 11, 1},
};
const upb_msglayout envoy_config_core_v3_HealthCheck_msginit = {
&envoy_config_core_v3_HealthCheck_submsgs[0],
&envoy_config_core_v3_HealthCheck__fields[0],
- UPB_SIZE(88, 160), 22, false,
+ UPB_SIZE(96, 176), 23, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_HealthCheck_Payload__fields[2] = {
@@ -77,10 +77,10 @@ static const upb_msglayout_field envoy_config_core_v3_HealthCheck_Payload__field
const upb_msglayout envoy_config_core_v3_HealthCheck_Payload_msginit = {
NULL,
&envoy_config_core_v3_HealthCheck_Payload__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_HealthCheck_HttpHealthCheck_submsgs[5] = {
+static const upb_msglayout *const envoy_config_core_v3_HealthCheck_HttpHealthCheck_submsgs[4] = {
&envoy_config_core_v3_HeaderValueOption_msginit,
&envoy_config_core_v3_HealthCheck_Payload_msginit,
&envoy_type_matcher_v3_StringMatcher_msginit,
@@ -90,34 +90,34 @@ static const upb_msglayout *const envoy_config_core_v3_HealthCheck_HttpHealthChe
static const upb_msglayout_field envoy_config_core_v3_HealthCheck_HttpHealthCheck__fields[9] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
{2, UPB_SIZE(16, 24), 0, 0, 9, 1},
- {3, UPB_SIZE(24, 40), 0, 1, 11, 1},
- {4, UPB_SIZE(28, 48), 0, 1, 11, 1},
+ {3, UPB_SIZE(24, 40), 1, 1, 11, 1},
+ {4, UPB_SIZE(28, 48), 2, 1, 11, 1},
{6, UPB_SIZE(36, 64), 0, 0, 11, 3},
{8, UPB_SIZE(40, 72), 0, 0, 9, 3},
{9, UPB_SIZE(44, 80), 0, 3, 11, 3},
- {10, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {11, UPB_SIZE(32, 56), 0, 2, 11, 1},
+ {10, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {11, UPB_SIZE(32, 56), 3, 2, 11, 1},
};
const upb_msglayout envoy_config_core_v3_HealthCheck_HttpHealthCheck_msginit = {
&envoy_config_core_v3_HealthCheck_HttpHealthCheck_submsgs[0],
&envoy_config_core_v3_HealthCheck_HttpHealthCheck__fields[0],
- UPB_SIZE(48, 96), 9, false,
+ UPB_SIZE(48, 96), 9, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_HealthCheck_TcpHealthCheck_submsgs[2] = {
+static const upb_msglayout *const envoy_config_core_v3_HealthCheck_TcpHealthCheck_submsgs[1] = {
&envoy_config_core_v3_HealthCheck_Payload_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_HealthCheck_TcpHealthCheck__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 3},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_core_v3_HealthCheck_TcpHealthCheck_msginit = {
&envoy_config_core_v3_HealthCheck_TcpHealthCheck_submsgs[0],
&envoy_config_core_v3_HealthCheck_TcpHealthCheck__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_HealthCheck_RedisHealthCheck__fields[1] = {
@@ -127,7 +127,7 @@ static const upb_msglayout_field envoy_config_core_v3_HealthCheck_RedisHealthChe
const upb_msglayout envoy_config_core_v3_HealthCheck_RedisHealthCheck_msginit = {
NULL,
&envoy_config_core_v3_HealthCheck_RedisHealthCheck__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_HealthCheck_GrpcHealthCheck__fields[2] = {
@@ -138,7 +138,7 @@ static const upb_msglayout_field envoy_config_core_v3_HealthCheck_GrpcHealthChec
const upb_msglayout envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit = {
NULL,
&envoy_config_core_v3_HealthCheck_GrpcHealthCheck__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_HealthCheck_CustomHealthCheck_submsgs[1] = {
@@ -153,7 +153,7 @@ static const upb_msglayout_field envoy_config_core_v3_HealthCheck_CustomHealthCh
const upb_msglayout envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit = {
&envoy_config_core_v3_HealthCheck_CustomHealthCheck_submsgs[0],
&envoy_config_core_v3_HealthCheck_CustomHealthCheck__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_HealthCheck_TlsOptions__fields[1] = {
@@ -163,7 +163,7 @@ static const upb_msglayout_field envoy_config_core_v3_HealthCheck_TlsOptions__fi
const upb_msglayout envoy_config_core_v3_HealthCheck_TlsOptions_msginit = {
NULL,
&envoy_config_core_v3_HealthCheck_TlsOptions__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h
index aa8c7d3ab8d..e4a803ab253 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -82,6 +83,12 @@ UPB_INLINE envoy_config_core_v3_HealthCheck *envoy_config_core_v3_HealthCheck_pa
envoy_config_core_v3_HealthCheck *ret = envoy_config_core_v3_HealthCheck_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck *envoy_config_core_v3_HealthCheck_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck *ret = envoy_config_core_v3_HealthCheck_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_serialize(const envoy_config_core_v3_HealthCheck *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_msginit, arena, len);
}
@@ -93,52 +100,55 @@ typedef enum {
envoy_config_core_v3_HealthCheck_health_checker_custom_health_check = 13,
envoy_config_core_v3_HealthCheck_health_checker_NOT_SET = 0
} envoy_config_core_v3_HealthCheck_health_checker_oneofcases;
-UPB_INLINE envoy_config_core_v3_HealthCheck_health_checker_oneofcases envoy_config_core_v3_HealthCheck_health_checker_case(const envoy_config_core_v3_HealthCheck* msg) { return (envoy_config_core_v3_HealthCheck_health_checker_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(80, 152), int32_t); }
-
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_timeout(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_timeout(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_interval_jitter(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_interval_jitter(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_unhealthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_unhealthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_healthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_healthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_alt_port(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_alt_port(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_reuse_connection(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_HealthCheck_reuse_connection(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_http_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(80, 152)) == 8; }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_HttpHealthCheck* envoy_config_core_v3_HealthCheck_http_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_HttpHealthCheck*, UPB_SIZE(76, 144), UPB_SIZE(80, 152), 8, NULL); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_tcp_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(80, 152)) == 9; }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_TcpHealthCheck* envoy_config_core_v3_HealthCheck_tcp_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_TcpHealthCheck*, UPB_SIZE(76, 144), UPB_SIZE(80, 152), 9, NULL); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_grpc_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(80, 152)) == 11; }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_GrpcHealthCheck* envoy_config_core_v3_HealthCheck_grpc_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_GrpcHealthCheck*, UPB_SIZE(76, 144), UPB_SIZE(80, 152), 11, NULL); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_no_traffic_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_no_traffic_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_custom_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(80, 152)) == 13; }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_CustomHealthCheck* envoy_config_core_v3_HealthCheck_custom_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_CustomHealthCheck*, UPB_SIZE(76, 144), UPB_SIZE(80, 152), 13, NULL); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_unhealthy_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_unhealthy_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 88), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_unhealthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 96)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_unhealthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 96), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_healthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 104)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_healthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 104), const struct google_protobuf_Duration*); }
-UPB_INLINE upb_strview envoy_config_core_v3_HealthCheck_event_log_path(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE uint32_t envoy_config_core_v3_HealthCheck_interval_jitter_percent(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_always_log_health_check_failures(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_initial_jitter(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 112)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_initial_jitter(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 112), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_tls_options(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 120)); }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_TlsOptions* envoy_config_core_v3_HealthCheck_tls_options(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 120), const envoy_config_core_v3_HealthCheck_TlsOptions*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_event_service(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 128)); }
-UPB_INLINE const struct envoy_config_core_v3_EventServiceConfig* envoy_config_core_v3_HealthCheck_event_service(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 128), const struct envoy_config_core_v3_EventServiceConfig*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_transport_socket_match_criteria(const envoy_config_core_v3_HealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 136)); }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_HealthCheck_transport_socket_match_criteria(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 136), const struct google_protobuf_Struct*); }
+UPB_INLINE envoy_config_core_v3_HealthCheck_health_checker_oneofcases envoy_config_core_v3_HealthCheck_health_checker_case(const envoy_config_core_v3_HealthCheck* msg) { return (envoy_config_core_v3_HealthCheck_health_checker_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(88, 168), int32_t); }
+
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_timeout(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_timeout(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_interval_jitter(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_interval_jitter(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_unhealthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_unhealthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_healthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_healthy_threshold(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_alt_port(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_alt_port(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_reuse_connection(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_HealthCheck_reuse_connection(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_http_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(88, 168)) == 8; }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_HttpHealthCheck* envoy_config_core_v3_HealthCheck_http_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_HttpHealthCheck*, UPB_SIZE(84, 160), UPB_SIZE(88, 168), 8, NULL); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_tcp_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(88, 168)) == 9; }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_TcpHealthCheck* envoy_config_core_v3_HealthCheck_tcp_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_TcpHealthCheck*, UPB_SIZE(84, 160), UPB_SIZE(88, 168), 9, NULL); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_grpc_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(88, 168)) == 11; }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_GrpcHealthCheck* envoy_config_core_v3_HealthCheck_grpc_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_GrpcHealthCheck*, UPB_SIZE(84, 160), UPB_SIZE(88, 168), 11, NULL); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_no_traffic_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_no_traffic_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 88), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_custom_health_check(const envoy_config_core_v3_HealthCheck *msg) { return _upb_getoneofcase(msg, UPB_SIZE(88, 168)) == 13; }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_CustomHealthCheck* envoy_config_core_v3_HealthCheck_custom_health_check(const envoy_config_core_v3_HealthCheck *msg) { return UPB_READ_ONEOF(msg, const envoy_config_core_v3_HealthCheck_CustomHealthCheck*, UPB_SIZE(84, 160), UPB_SIZE(88, 168), 13, NULL); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_unhealthy_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_unhealthy_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 96), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_unhealthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_unhealthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 104), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_healthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_healthy_edge_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 112), const struct google_protobuf_Duration*); }
+UPB_INLINE upb_strview envoy_config_core_v3_HealthCheck_event_log_path(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
+UPB_INLINE uint32_t envoy_config_core_v3_HealthCheck_interval_jitter_percent(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_always_log_health_check_failures(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_initial_jitter(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_initial_jitter(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 120), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_tls_options(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_TlsOptions* envoy_config_core_v3_HealthCheck_tls_options(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 128), const envoy_config_core_v3_HealthCheck_TlsOptions*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_event_service(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 14); }
+UPB_INLINE const struct envoy_config_core_v3_EventServiceConfig* envoy_config_core_v3_HealthCheck_event_service(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 136), const struct envoy_config_core_v3_EventServiceConfig*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_transport_socket_match_criteria(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 15); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_HealthCheck_transport_socket_match_criteria(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 144), const struct google_protobuf_Struct*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_has_no_traffic_healthy_interval(const envoy_config_core_v3_HealthCheck *msg) { return _upb_hasbit(msg, 16); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_no_traffic_healthy_interval(const envoy_config_core_v3_HealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 152), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_timeout(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_timeout(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_timeout(msg);
@@ -150,7 +160,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_interval(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_interval(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_interval(msg);
@@ -162,7 +173,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_interval_jitter(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_interval_jitter(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_interval_jitter(msg);
@@ -174,7 +186,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_unhealthy_threshold(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_mutable_unhealthy_threshold(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_HealthCheck_unhealthy_threshold(msg);
@@ -186,7 +199,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_healthy_threshold(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_mutable_healthy_threshold(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_HealthCheck_healthy_threshold(msg);
@@ -198,7 +212,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_alt_port(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_mutable_alt_port(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_HealthCheck_alt_port(msg);
@@ -210,7 +225,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HealthCheck_
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_reuse_connection(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_HealthCheck_mutable_reuse_connection(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_core_v3_HealthCheck_reuse_connection(msg);
@@ -222,7 +238,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_HealthCheck_mu
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_http_health_check(envoy_config_core_v3_HealthCheck *msg, envoy_config_core_v3_HealthCheck_HttpHealthCheck* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_HttpHealthCheck*, UPB_SIZE(76, 144), value, UPB_SIZE(80, 152), 8);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_HttpHealthCheck*, UPB_SIZE(84, 160), value, UPB_SIZE(88, 168), 8);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_HttpHealthCheck* envoy_config_core_v3_HealthCheck_mutable_http_health_check(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_HttpHealthCheck* sub = (struct envoy_config_core_v3_HealthCheck_HttpHealthCheck*)envoy_config_core_v3_HealthCheck_http_health_check(msg);
@@ -234,7 +250,7 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_HttpHealthCheck* envoy_config
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_tcp_health_check(envoy_config_core_v3_HealthCheck *msg, envoy_config_core_v3_HealthCheck_TcpHealthCheck* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_TcpHealthCheck*, UPB_SIZE(76, 144), value, UPB_SIZE(80, 152), 9);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_TcpHealthCheck*, UPB_SIZE(84, 160), value, UPB_SIZE(88, 168), 9);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_TcpHealthCheck* envoy_config_core_v3_HealthCheck_mutable_tcp_health_check(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_TcpHealthCheck* sub = (struct envoy_config_core_v3_HealthCheck_TcpHealthCheck*)envoy_config_core_v3_HealthCheck_tcp_health_check(msg);
@@ -246,7 +262,7 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_TcpHealthCheck* envoy_config_
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_grpc_health_check(envoy_config_core_v3_HealthCheck *msg, envoy_config_core_v3_HealthCheck_GrpcHealthCheck* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_GrpcHealthCheck*, UPB_SIZE(76, 144), value, UPB_SIZE(80, 152), 11);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_GrpcHealthCheck*, UPB_SIZE(84, 160), value, UPB_SIZE(88, 168), 11);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_GrpcHealthCheck* envoy_config_core_v3_HealthCheck_mutable_grpc_health_check(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_GrpcHealthCheck* sub = (struct envoy_config_core_v3_HealthCheck_GrpcHealthCheck*)envoy_config_core_v3_HealthCheck_grpc_health_check(msg);
@@ -258,7 +274,8 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_GrpcHealthCheck* envoy_config
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_no_traffic_interval(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(48, 88), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_no_traffic_interval(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_no_traffic_interval(msg);
@@ -270,7 +287,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_custom_health_check(envoy_config_core_v3_HealthCheck *msg, envoy_config_core_v3_HealthCheck_CustomHealthCheck* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_CustomHealthCheck*, UPB_SIZE(76, 144), value, UPB_SIZE(80, 152), 13);
+ UPB_WRITE_ONEOF(msg, envoy_config_core_v3_HealthCheck_CustomHealthCheck*, UPB_SIZE(84, 160), value, UPB_SIZE(88, 168), 13);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_CustomHealthCheck* envoy_config_core_v3_HealthCheck_mutable_custom_health_check(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_CustomHealthCheck* sub = (struct envoy_config_core_v3_HealthCheck_CustomHealthCheck*)envoy_config_core_v3_HealthCheck_custom_health_check(msg);
@@ -282,7 +299,8 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_CustomHealthCheck* envoy_conf
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_unhealthy_interval(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(48, 88), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 96), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_unhealthy_interval(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_unhealthy_interval(msg);
@@ -294,7 +312,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_unhealthy_edge_interval(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(52, 96), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(56, 104), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_unhealthy_edge_interval(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_unhealthy_edge_interval(msg);
@@ -306,7 +325,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_healthy_edge_interval(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(56, 104), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 112), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_healthy_edge_interval(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_healthy_edge_interval(msg);
@@ -318,16 +338,17 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_event_log_path(envoy_config_core_v3_HealthCheck *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_interval_jitter_percent(envoy_config_core_v3_HealthCheck *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_always_log_health_check_failures(envoy_config_core_v3_HealthCheck *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_initial_jitter(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(60, 112), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 12);
+ *UPB_PTR_AT(msg, UPB_SIZE(64, 120), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_initial_jitter(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_initial_jitter(msg);
@@ -339,7 +360,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mut
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_tls_options(envoy_config_core_v3_HealthCheck *msg, envoy_config_core_v3_HealthCheck_TlsOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(64, 120), envoy_config_core_v3_HealthCheck_TlsOptions*) = value;
+ _upb_sethas(msg, 13);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 128), envoy_config_core_v3_HealthCheck_TlsOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_TlsOptions* envoy_config_core_v3_HealthCheck_mutable_tls_options(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_TlsOptions* sub = (struct envoy_config_core_v3_HealthCheck_TlsOptions*)envoy_config_core_v3_HealthCheck_tls_options(msg);
@@ -351,7 +373,8 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_TlsOptions* envoy_config_core
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_event_service(envoy_config_core_v3_HealthCheck *msg, struct envoy_config_core_v3_EventServiceConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(68, 128), struct envoy_config_core_v3_EventServiceConfig*) = value;
+ _upb_sethas(msg, 14);
+ *UPB_PTR_AT(msg, UPB_SIZE(72, 136), struct envoy_config_core_v3_EventServiceConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_EventServiceConfig* envoy_config_core_v3_HealthCheck_mutable_event_service(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_EventServiceConfig* sub = (struct envoy_config_core_v3_EventServiceConfig*)envoy_config_core_v3_HealthCheck_event_service(msg);
@@ -363,7 +386,8 @@ UPB_INLINE struct envoy_config_core_v3_EventServiceConfig* envoy_config_core_v3_
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_set_transport_socket_match_criteria(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Struct* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(72, 136), struct google_protobuf_Struct*) = value;
+ _upb_sethas(msg, 15);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 144), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_HealthCheck_mutable_transport_socket_match_criteria(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_core_v3_HealthCheck_transport_socket_match_criteria(msg);
@@ -374,6 +398,19 @@ UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_HealthCheck_mutab
}
return sub;
}
+UPB_INLINE void envoy_config_core_v3_HealthCheck_set_no_traffic_healthy_interval(envoy_config_core_v3_HealthCheck *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 16);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 152), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HealthCheck_mutable_no_traffic_healthy_interval(envoy_config_core_v3_HealthCheck *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HealthCheck_no_traffic_healthy_interval(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_core_v3_HealthCheck_set_no_traffic_healthy_interval(msg, sub);
+ }
+ return sub;
+}
/* envoy.config.core.v3.HealthCheck.Payload */
@@ -385,6 +422,12 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_Payload *envoy_config_core_v3_Health
envoy_config_core_v3_HealthCheck_Payload *ret = envoy_config_core_v3_HealthCheck_Payload_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_Payload_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_Payload *envoy_config_core_v3_HealthCheck_Payload_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_Payload *ret = envoy_config_core_v3_HealthCheck_Payload_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_Payload_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_Payload_serialize(const envoy_config_core_v3_HealthCheck_Payload *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_Payload_msginit, arena, len);
}
@@ -418,23 +461,29 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_HttpHealthCheck *envoy_config_core_v
envoy_config_core_v3_HealthCheck_HttpHealthCheck *ret = envoy_config_core_v3_HealthCheck_HttpHealthCheck_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_HttpHealthCheck_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_HttpHealthCheck *envoy_config_core_v3_HealthCheck_HttpHealthCheck_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_HttpHealthCheck *ret = envoy_config_core_v3_HealthCheck_HttpHealthCheck_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_HttpHealthCheck_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_HttpHealthCheck_serialize(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_HttpHealthCheck_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_config_core_v3_HealthCheck_HttpHealthCheck_host(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
UPB_INLINE upb_strview envoy_config_core_v3_HealthCheck_HttpHealthCheck_path(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_send(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_send(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_HttpHealthCheck_send(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_config_core_v3_HealthCheck_Payload*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_receive(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_receive(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_HttpHealthCheck_receive(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_config_core_v3_HealthCheck_Payload*); }
UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_request_headers_to_add(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_core_v3_HealthCheck_HttpHealthCheck_request_headers_to_add(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
UPB_INLINE upb_strview const* envoy_config_core_v3_HealthCheck_HttpHealthCheck_request_headers_to_remove(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_expected_statuses(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
UPB_INLINE const struct envoy_type_v3_Int64Range* const* envoy_config_core_v3_HealthCheck_HttpHealthCheck_expected_statuses(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t *len) { return (const struct envoy_type_v3_Int64Range* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
-UPB_INLINE int32_t envoy_config_core_v3_HealthCheck_HttpHealthCheck_codec_client_type(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_service_name_matcher(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE int32_t envoy_config_core_v3_HealthCheck_HttpHealthCheck_codec_client_type(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_has_service_name_matcher(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_core_v3_HealthCheck_HttpHealthCheck_service_name_matcher(const envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct envoy_type_matcher_v3_StringMatcher*); }
UPB_INLINE void envoy_config_core_v3_HealthCheck_HttpHealthCheck_set_host(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_strview value) {
@@ -444,6 +493,7 @@ UPB_INLINE void envoy_config_core_v3_HealthCheck_HttpHealthCheck_set_path(envoy_
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_HttpHealthCheck_set_send(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, envoy_config_core_v3_HealthCheck_Payload* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_config_core_v3_HealthCheck_Payload*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_HttpHealthCheck_mutable_send(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) {
@@ -456,6 +506,7 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_HttpHealthCheck_set_receive(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, envoy_config_core_v3_HealthCheck_Payload* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_config_core_v3_HealthCheck_Payload*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_HttpHealthCheck_mutable_receive(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) {
@@ -471,12 +522,12 @@ UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_core_v3_
return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_core_v3_HealthCheck_HttpHealthCheck_resize_request_headers_to_add(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_core_v3_HealthCheck_HttpHealthCheck_add_request_headers_to_add(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -484,29 +535,30 @@ UPB_INLINE upb_strview* envoy_config_core_v3_HealthCheck_HttpHealthCheck_mutable
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
}
UPB_INLINE upb_strview* envoy_config_core_v3_HealthCheck_HttpHealthCheck_resize_request_headers_to_remove(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_core_v3_HealthCheck_HttpHealthCheck_add_request_headers_to_remove(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(40, 72), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE struct envoy_type_v3_Int64Range** envoy_config_core_v3_HealthCheck_HttpHealthCheck_mutable_expected_statuses(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t *len) {
return (struct envoy_type_v3_Int64Range**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
}
UPB_INLINE struct envoy_type_v3_Int64Range** envoy_config_core_v3_HealthCheck_HttpHealthCheck_resize_expected_statuses(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, size_t len, upb_arena *arena) {
- return (struct envoy_type_v3_Int64Range**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_type_v3_Int64Range**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_v3_Int64Range* envoy_config_core_v3_HealthCheck_HttpHealthCheck_add_expected_statuses(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) {
struct envoy_type_v3_Int64Range* sub = (struct envoy_type_v3_Int64Range*)_upb_msg_new(&envoy_type_v3_Int64Range_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_HttpHealthCheck_set_codec_client_type(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_config_core_v3_HealthCheck_HttpHealthCheck_set_service_name_matcher(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, struct envoy_type_matcher_v3_StringMatcher* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct envoy_type_matcher_v3_StringMatcher*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_core_v3_HealthCheck_HttpHealthCheck_mutable_service_name_matcher(envoy_config_core_v3_HealthCheck_HttpHealthCheck *msg, upb_arena *arena) {
@@ -529,17 +581,24 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_TcpHealthCheck *envoy_config_core_v3
envoy_config_core_v3_HealthCheck_TcpHealthCheck *ret = envoy_config_core_v3_HealthCheck_TcpHealthCheck_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_TcpHealthCheck_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_TcpHealthCheck *envoy_config_core_v3_HealthCheck_TcpHealthCheck_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_TcpHealthCheck *ret = envoy_config_core_v3_HealthCheck_TcpHealthCheck_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_TcpHealthCheck_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_TcpHealthCheck_serialize(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_TcpHealthCheck_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_TcpHealthCheck_has_send(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_TcpHealthCheck_send(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_core_v3_HealthCheck_Payload*); }
-UPB_INLINE bool envoy_config_core_v3_HealthCheck_TcpHealthCheck_has_receive(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const envoy_config_core_v3_HealthCheck_Payload* const* envoy_config_core_v3_HealthCheck_TcpHealthCheck_receive(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, size_t *len) { return (const envoy_config_core_v3_HealthCheck_Payload* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_TcpHealthCheck_has_send(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_TcpHealthCheck_send(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_core_v3_HealthCheck_Payload*); }
+UPB_INLINE bool envoy_config_core_v3_HealthCheck_TcpHealthCheck_has_receive(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_config_core_v3_HealthCheck_Payload* const* envoy_config_core_v3_HealthCheck_TcpHealthCheck_receive(const envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, size_t *len) { return (const envoy_config_core_v3_HealthCheck_Payload* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
UPB_INLINE void envoy_config_core_v3_HealthCheck_TcpHealthCheck_set_send(envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, envoy_config_core_v3_HealthCheck_Payload* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_core_v3_HealthCheck_Payload*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_core_v3_HealthCheck_Payload*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_TcpHealthCheck_mutable_send(envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_Payload* sub = (struct envoy_config_core_v3_HealthCheck_Payload*)envoy_config_core_v3_HealthCheck_TcpHealthCheck_send(msg);
@@ -551,15 +610,15 @@ UPB_INLINE struct envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3
return sub;
}
UPB_INLINE envoy_config_core_v3_HealthCheck_Payload** envoy_config_core_v3_HealthCheck_TcpHealthCheck_mutable_receive(envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, size_t *len) {
- return (envoy_config_core_v3_HealthCheck_Payload**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+ return (envoy_config_core_v3_HealthCheck_Payload**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE envoy_config_core_v3_HealthCheck_Payload** envoy_config_core_v3_HealthCheck_TcpHealthCheck_resize_receive(envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, size_t len, upb_arena *arena) {
- return (envoy_config_core_v3_HealthCheck_Payload**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_core_v3_HealthCheck_Payload**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HealthCheck_Payload* envoy_config_core_v3_HealthCheck_TcpHealthCheck_add_receive(envoy_config_core_v3_HealthCheck_TcpHealthCheck *msg, upb_arena *arena) {
struct envoy_config_core_v3_HealthCheck_Payload* sub = (struct envoy_config_core_v3_HealthCheck_Payload*)_upb_msg_new(&envoy_config_core_v3_HealthCheck_Payload_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -574,6 +633,12 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_RedisHealthCheck *envoy_config_core_
envoy_config_core_v3_HealthCheck_RedisHealthCheck *ret = envoy_config_core_v3_HealthCheck_RedisHealthCheck_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_RedisHealthCheck_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_RedisHealthCheck *envoy_config_core_v3_HealthCheck_RedisHealthCheck_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_RedisHealthCheck *ret = envoy_config_core_v3_HealthCheck_RedisHealthCheck_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_RedisHealthCheck_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_RedisHealthCheck_serialize(const envoy_config_core_v3_HealthCheck_RedisHealthCheck *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_RedisHealthCheck_msginit, arena, len);
}
@@ -594,6 +659,12 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_GrpcHealthCheck *envoy_config_core_v
envoy_config_core_v3_HealthCheck_GrpcHealthCheck *ret = envoy_config_core_v3_HealthCheck_GrpcHealthCheck_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_GrpcHealthCheck *envoy_config_core_v3_HealthCheck_GrpcHealthCheck_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_GrpcHealthCheck *ret = envoy_config_core_v3_HealthCheck_GrpcHealthCheck_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_GrpcHealthCheck_serialize(const envoy_config_core_v3_HealthCheck_GrpcHealthCheck *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit, arena, len);
}
@@ -618,6 +689,12 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_CustomHealthCheck *envoy_config_core
envoy_config_core_v3_HealthCheck_CustomHealthCheck *ret = envoy_config_core_v3_HealthCheck_CustomHealthCheck_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_CustomHealthCheck *envoy_config_core_v3_HealthCheck_CustomHealthCheck_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_CustomHealthCheck *ret = envoy_config_core_v3_HealthCheck_CustomHealthCheck_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_CustomHealthCheck_serialize(const envoy_config_core_v3_HealthCheck_CustomHealthCheck *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit, arena, len);
}
@@ -658,6 +735,12 @@ UPB_INLINE envoy_config_core_v3_HealthCheck_TlsOptions *envoy_config_core_v3_Hea
envoy_config_core_v3_HealthCheck_TlsOptions *ret = envoy_config_core_v3_HealthCheck_TlsOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_TlsOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HealthCheck_TlsOptions *envoy_config_core_v3_HealthCheck_TlsOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HealthCheck_TlsOptions *ret = envoy_config_core_v3_HealthCheck_TlsOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HealthCheck_TlsOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HealthCheck_TlsOptions_serialize(const envoy_config_core_v3_HealthCheck_TlsOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HealthCheck_TlsOptions_msginit, arena, len);
}
@@ -668,10 +751,10 @@ UPB_INLINE upb_strview* envoy_config_core_v3_HealthCheck_TlsOptions_mutable_alpn
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE upb_strview* envoy_config_core_v3_HealthCheck_TlsOptions_resize_alpn_protocols(envoy_config_core_v3_HealthCheck_TlsOptions *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_core_v3_HealthCheck_TlsOptions_add_alpn_protocols(envoy_config_core_v3_HealthCheck_TlsOptions *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
arena);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c
index b8ac727fea6..c39ebef4c8c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c
@@ -21,15 +21,15 @@ static const upb_msglayout *const envoy_config_core_v3_HttpUri_submsgs[1] = {
};
static const upb_msglayout_field envoy_config_core_v3_HttpUri__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 32), UPB_SIZE(-25, -49), 0, 9, 1},
+ {3, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_HttpUri_msginit = {
&envoy_config_core_v3_HttpUri_submsgs[0],
&envoy_config_core_v3_HttpUri__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(32, 64), 3, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h
index 8682067e283..c49eec1f998 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,6 +37,12 @@ UPB_INLINE envoy_config_core_v3_HttpUri *envoy_config_core_v3_HttpUri_parse(cons
envoy_config_core_v3_HttpUri *ret = envoy_config_core_v3_HttpUri_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HttpUri_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HttpUri *envoy_config_core_v3_HttpUri_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HttpUri *ret = envoy_config_core_v3_HttpUri_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HttpUri_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HttpUri_serialize(const envoy_config_core_v3_HttpUri *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HttpUri_msginit, arena, len);
}
@@ -44,22 +51,23 @@ typedef enum {
envoy_config_core_v3_HttpUri_http_upstream_type_cluster = 2,
envoy_config_core_v3_HttpUri_http_upstream_type_NOT_SET = 0
} envoy_config_core_v3_HttpUri_http_upstream_type_oneofcases;
-UPB_INLINE envoy_config_core_v3_HttpUri_http_upstream_type_oneofcases envoy_config_core_v3_HttpUri_http_upstream_type_case(const envoy_config_core_v3_HttpUri* msg) { return (envoy_config_core_v3_HttpUri_http_upstream_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
+UPB_INLINE envoy_config_core_v3_HttpUri_http_upstream_type_oneofcases envoy_config_core_v3_HttpUri_http_upstream_type_case(const envoy_config_core_v3_HttpUri* msg) { return (envoy_config_core_v3_HttpUri_http_upstream_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 48), int32_t); }
-UPB_INLINE upb_strview envoy_config_core_v3_HttpUri_uri(const envoy_config_core_v3_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_HttpUri_has_cluster(const envoy_config_core_v3_HttpUri *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 2; }
-UPB_INLINE upb_strview envoy_config_core_v3_HttpUri_cluster(const envoy_config_core_v3_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_core_v3_HttpUri_has_timeout(const envoy_config_core_v3_HttpUri *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HttpUri_timeout(const envoy_config_core_v3_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE upb_strview envoy_config_core_v3_HttpUri_uri(const envoy_config_core_v3_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_HttpUri_has_cluster(const envoy_config_core_v3_HttpUri *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 2; }
+UPB_INLINE upb_strview envoy_config_core_v3_HttpUri_cluster(const envoy_config_core_v3_HttpUri *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(16, 32), UPB_SIZE(24, 48), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_core_v3_HttpUri_has_timeout(const envoy_config_core_v3_HttpUri *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HttpUri_timeout(const envoy_config_core_v3_HttpUri *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_core_v3_HttpUri_set_uri(envoy_config_core_v3_HttpUri *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_HttpUri_set_cluster(envoy_config_core_v3_HttpUri *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 2);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(16, 32), value, UPB_SIZE(24, 48), 2);
}
UPB_INLINE void envoy_config_core_v3_HttpUri_set_timeout(envoy_config_core_v3_HttpUri *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpUri_mutable_timeout(envoy_config_core_v3_HttpUri *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_HttpUri_timeout(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c
index 000be1039c7..67c9b102b48 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c
@@ -21,7 +21,7 @@
const upb_msglayout envoy_config_core_v3_TcpProtocolOptions_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout_field envoy_config_core_v3_UpstreamHttpProtocolOptions__fields[2] = {
@@ -32,47 +32,47 @@ static const upb_msglayout_field envoy_config_core_v3_UpstreamHttpProtocolOption
const upb_msglayout envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit = {
NULL,
&envoy_config_core_v3_UpstreamHttpProtocolOptions__fields[0],
- UPB_SIZE(2, 2), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_HttpProtocolOptions_submsgs[4] = {
+static const upb_msglayout *const envoy_config_core_v3_HttpProtocolOptions_submsgs[2] = {
&google_protobuf_Duration_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_HttpProtocolOptions__fields[5] = {
- {1, UPB_SIZE(8, 8), 0, 0, 11, 1},
- {2, UPB_SIZE(12, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(16, 24), 0, 0, 11, 1},
- {4, UPB_SIZE(20, 32), 0, 0, 11, 1},
- {5, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {1, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(12, 16), 2, 1, 11, 1},
+ {3, UPB_SIZE(16, 24), 3, 0, 11, 1},
+ {4, UPB_SIZE(20, 32), 4, 0, 11, 1},
+ {5, UPB_SIZE(4, 4), 0, 0, 14, 1},
};
const upb_msglayout envoy_config_core_v3_HttpProtocolOptions_msginit = {
&envoy_config_core_v3_HttpProtocolOptions_submsgs[0],
&envoy_config_core_v3_HttpProtocolOptions__fields[0],
- UPB_SIZE(24, 40), 5, false,
+ UPB_SIZE(24, 40), 5, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_Http1ProtocolOptions_submsgs[3] = {
+static const upb_msglayout *const envoy_config_core_v3_Http1ProtocolOptions_submsgs[2] = {
&envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_Http1ProtocolOptions__fields[7] = {
- {1, UPB_SIZE(12, 24), 0, 1, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {1, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {2, UPB_SIZE(1, 1), 0, 0, 8, 1},
{3, UPB_SIZE(4, 8), 0, 0, 9, 1},
- {4, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {5, UPB_SIZE(1, 1), 0, 0, 8, 1},
- {6, UPB_SIZE(2, 2), 0, 0, 8, 1},
- {7, UPB_SIZE(20, 40), 0, 1, 11, 1},
+ {4, UPB_SIZE(16, 32), 2, 0, 11, 1},
+ {5, UPB_SIZE(2, 2), 0, 0, 8, 1},
+ {6, UPB_SIZE(3, 3), 0, 0, 8, 1},
+ {7, UPB_SIZE(20, 40), 3, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_Http1ProtocolOptions_msginit = {
&envoy_config_core_v3_Http1ProtocolOptions_submsgs[0],
&envoy_config_core_v3_Http1ProtocolOptions__fields[0],
- UPB_SIZE(24, 48), 7, false,
+ UPB_SIZE(24, 48), 7, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_submsgs[1] = {
@@ -86,33 +86,33 @@ static const upb_msglayout_field envoy_config_core_v3_Http1ProtocolOptions_Heade
const upb_msglayout envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit = {
&envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_submsgs[0],
&envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
const upb_msglayout envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_KeepaliveSettings_submsgs[3] = {
+static const upb_msglayout *const envoy_config_core_v3_KeepaliveSettings_submsgs[2] = {
&envoy_type_v3_Percent_msginit,
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_KeepaliveSettings__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 1, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_KeepaliveSettings_msginit = {
&envoy_config_core_v3_KeepaliveSettings_submsgs[0],
&envoy_config_core_v3_KeepaliveSettings__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_Http2ProtocolOptions_submsgs[12] = {
+static const upb_msglayout *const envoy_config_core_v3_Http2ProtocolOptions_submsgs[4] = {
&envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit,
&envoy_config_core_v3_KeepaliveSettings_msginit,
&google_protobuf_BoolValue_msginit,
@@ -120,42 +120,42 @@ static const upb_msglayout *const envoy_config_core_v3_Http2ProtocolOptions_subm
};
static const upb_msglayout_field envoy_config_core_v3_Http2ProtocolOptions__fields[15] = {
- {1, UPB_SIZE(4, 8), 0, 3, 11, 1},
- {2, UPB_SIZE(8, 16), 0, 3, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 3, 11, 1},
- {4, UPB_SIZE(16, 32), 0, 3, 11, 1},
- {5, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {6, UPB_SIZE(1, 1), 0, 0, 8, 1},
- {7, UPB_SIZE(20, 40), 0, 3, 11, 1},
- {8, UPB_SIZE(24, 48), 0, 3, 11, 1},
- {9, UPB_SIZE(28, 56), 0, 3, 11, 1},
- {10, UPB_SIZE(32, 64), 0, 3, 11, 1},
- {11, UPB_SIZE(36, 72), 0, 3, 11, 1},
- {12, UPB_SIZE(2, 2), 0, 0, 8, 1},
- {13, UPB_SIZE(48, 96), 0, 0, 11, 3},
- {14, UPB_SIZE(40, 80), 0, 2, 11, 1},
- {15, UPB_SIZE(44, 88), 0, 1, 11, 1},
+ {1, UPB_SIZE(8, 8), 1, 3, 11, 1},
+ {2, UPB_SIZE(12, 16), 2, 3, 11, 1},
+ {3, UPB_SIZE(16, 24), 3, 3, 11, 1},
+ {4, UPB_SIZE(20, 32), 4, 3, 11, 1},
+ {5, UPB_SIZE(2, 2), 0, 0, 8, 1},
+ {6, UPB_SIZE(3, 3), 0, 0, 8, 1},
+ {7, UPB_SIZE(24, 40), 5, 3, 11, 1},
+ {8, UPB_SIZE(28, 48), 6, 3, 11, 1},
+ {9, UPB_SIZE(32, 56), 7, 3, 11, 1},
+ {10, UPB_SIZE(36, 64), 8, 3, 11, 1},
+ {11, UPB_SIZE(40, 72), 9, 3, 11, 1},
+ {12, UPB_SIZE(4, 4), 0, 0, 8, 1},
+ {13, UPB_SIZE(52, 96), 0, 0, 11, 3},
+ {14, UPB_SIZE(44, 80), 10, 2, 11, 1},
+ {15, UPB_SIZE(48, 88), 11, 1, 11, 1},
};
const upb_msglayout envoy_config_core_v3_Http2ProtocolOptions_msginit = {
&envoy_config_core_v3_Http2ProtocolOptions_submsgs[0],
&envoy_config_core_v3_Http2ProtocolOptions__fields[0],
- UPB_SIZE(52, 104), 15, false,
+ UPB_SIZE(56, 104), 15, false, 255,
};
-static const upb_msglayout *const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_submsgs[2] = {
+static const upb_msglayout *const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_submsgs[1] = {
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit = {
&envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_submsgs[0],
&envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_core_v3_GrpcProtocolOptions_submsgs[1] = {
@@ -163,13 +163,19 @@ static const upb_msglayout *const envoy_config_core_v3_GrpcProtocolOptions_subms
};
static const upb_msglayout_field envoy_config_core_v3_GrpcProtocolOptions__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_core_v3_GrpcProtocolOptions_msginit = {
&envoy_config_core_v3_GrpcProtocolOptions_submsgs[0],
&envoy_config_core_v3_GrpcProtocolOptions__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
+};
+
+const upb_msglayout envoy_config_core_v3_Http3ProtocolOptions_msginit = {
+ NULL,
+ NULL,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h
index d895036236a..8bfcae6c317 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -29,6 +30,7 @@ struct envoy_config_core_v3_KeepaliveSettings;
struct envoy_config_core_v3_Http2ProtocolOptions;
struct envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter;
struct envoy_config_core_v3_GrpcProtocolOptions;
+struct envoy_config_core_v3_Http3ProtocolOptions;
typedef struct envoy_config_core_v3_TcpProtocolOptions envoy_config_core_v3_TcpProtocolOptions;
typedef struct envoy_config_core_v3_UpstreamHttpProtocolOptions envoy_config_core_v3_UpstreamHttpProtocolOptions;
typedef struct envoy_config_core_v3_HttpProtocolOptions envoy_config_core_v3_HttpProtocolOptions;
@@ -39,6 +41,7 @@ typedef struct envoy_config_core_v3_KeepaliveSettings envoy_config_core_v3_Keepa
typedef struct envoy_config_core_v3_Http2ProtocolOptions envoy_config_core_v3_Http2ProtocolOptions;
typedef struct envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter;
typedef struct envoy_config_core_v3_GrpcProtocolOptions envoy_config_core_v3_GrpcProtocolOptions;
+typedef struct envoy_config_core_v3_Http3ProtocolOptions envoy_config_core_v3_Http3ProtocolOptions;
extern const upb_msglayout envoy_config_core_v3_TcpProtocolOptions_msginit;
extern const upb_msglayout envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit;
extern const upb_msglayout envoy_config_core_v3_HttpProtocolOptions_msginit;
@@ -49,6 +52,7 @@ extern const upb_msglayout envoy_config_core_v3_KeepaliveSettings_msginit;
extern const upb_msglayout envoy_config_core_v3_Http2ProtocolOptions_msginit;
extern const upb_msglayout envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit;
extern const upb_msglayout envoy_config_core_v3_GrpcProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http3ProtocolOptions_msginit;
struct envoy_type_v3_Percent;
struct google_protobuf_BoolValue;
struct google_protobuf_Duration;
@@ -75,6 +79,12 @@ UPB_INLINE envoy_config_core_v3_TcpProtocolOptions *envoy_config_core_v3_TcpProt
envoy_config_core_v3_TcpProtocolOptions *ret = envoy_config_core_v3_TcpProtocolOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_TcpProtocolOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_TcpProtocolOptions *envoy_config_core_v3_TcpProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_TcpProtocolOptions *ret = envoy_config_core_v3_TcpProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_TcpProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_TcpProtocolOptions_serialize(const envoy_config_core_v3_TcpProtocolOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_TcpProtocolOptions_msginit, arena, len);
}
@@ -91,6 +101,12 @@ UPB_INLINE envoy_config_core_v3_UpstreamHttpProtocolOptions *envoy_config_core_v
envoy_config_core_v3_UpstreamHttpProtocolOptions *ret = envoy_config_core_v3_UpstreamHttpProtocolOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_UpstreamHttpProtocolOptions *envoy_config_core_v3_UpstreamHttpProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_UpstreamHttpProtocolOptions *ret = envoy_config_core_v3_UpstreamHttpProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_UpstreamHttpProtocolOptions_serialize(const envoy_config_core_v3_UpstreamHttpProtocolOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit, arena, len);
}
@@ -115,21 +131,28 @@ UPB_INLINE envoy_config_core_v3_HttpProtocolOptions *envoy_config_core_v3_HttpPr
envoy_config_core_v3_HttpProtocolOptions *ret = envoy_config_core_v3_HttpProtocolOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_HttpProtocolOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_HttpProtocolOptions *envoy_config_core_v3_HttpProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_HttpProtocolOptions *ret = envoy_config_core_v3_HttpProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_HttpProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_HttpProtocolOptions_serialize(const envoy_config_core_v3_HttpProtocolOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_HttpProtocolOptions_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_idle_timeout(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
+UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_idle_timeout(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOptions_idle_timeout(const envoy_config_core_v3_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_max_headers_count(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_max_headers_count(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_HttpProtocolOptions_max_headers_count(const envoy_config_core_v3_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_max_connection_duration(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
+UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_max_connection_duration(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOptions_max_connection_duration(const envoy_config_core_v3_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_max_stream_duration(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE bool envoy_config_core_v3_HttpProtocolOptions_has_max_stream_duration(const envoy_config_core_v3_HttpProtocolOptions *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOptions_max_stream_duration(const envoy_config_core_v3_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); }
-UPB_INLINE int32_t envoy_config_core_v3_HttpProtocolOptions_headers_with_underscores_action(const envoy_config_core_v3_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t envoy_config_core_v3_HttpProtocolOptions_headers_with_underscores_action(const envoy_config_core_v3_HttpProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE void envoy_config_core_v3_HttpProtocolOptions_set_idle_timeout(envoy_config_core_v3_HttpProtocolOptions *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOptions_mutable_idle_timeout(envoy_config_core_v3_HttpProtocolOptions *msg, upb_arena *arena) {
@@ -142,6 +165,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOpt
return sub;
}
UPB_INLINE void envoy_config_core_v3_HttpProtocolOptions_set_max_headers_count(envoy_config_core_v3_HttpProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HttpProtocolOptions_mutable_max_headers_count(envoy_config_core_v3_HttpProtocolOptions *msg, upb_arena *arena) {
@@ -154,6 +178,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_HttpProtocol
return sub;
}
UPB_INLINE void envoy_config_core_v3_HttpProtocolOptions_set_max_connection_duration(envoy_config_core_v3_HttpProtocolOptions *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOptions_mutable_max_connection_duration(envoy_config_core_v3_HttpProtocolOptions *msg, upb_arena *arena) {
@@ -166,6 +191,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOpt
return sub;
}
UPB_INLINE void envoy_config_core_v3_HttpProtocolOptions_set_max_stream_duration(envoy_config_core_v3_HttpProtocolOptions *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOptions_mutable_max_stream_duration(envoy_config_core_v3_HttpProtocolOptions *msg, upb_arena *arena) {
@@ -178,7 +204,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_HttpProtocolOpt
return sub;
}
UPB_INLINE void envoy_config_core_v3_HttpProtocolOptions_set_headers_with_underscores_action(envoy_config_core_v3_HttpProtocolOptions *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
/* envoy.config.core.v3.Http1ProtocolOptions */
@@ -191,22 +217,29 @@ UPB_INLINE envoy_config_core_v3_Http1ProtocolOptions *envoy_config_core_v3_Http1
envoy_config_core_v3_Http1ProtocolOptions *ret = envoy_config_core_v3_Http1ProtocolOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Http1ProtocolOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Http1ProtocolOptions *envoy_config_core_v3_Http1ProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Http1ProtocolOptions *ret = envoy_config_core_v3_Http1ProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Http1ProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Http1ProtocolOptions_serialize(const envoy_config_core_v3_Http1ProtocolOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Http1ProtocolOptions_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_has_allow_absolute_url(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_has_allow_absolute_url(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_Http1ProtocolOptions_allow_absolute_url(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_accept_http_10(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_accept_http_10(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE upb_strview envoy_config_core_v3_Http1ProtocolOptions_default_host_for_http_10(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_has_header_key_format(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_has_header_key_format(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat* envoy_config_core_v3_Http1ProtocolOptions_header_key_format(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat*); }
-UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_enable_trailers(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
-UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_allow_chunked_length(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
-UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_has_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_enable_trailers(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
+UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_allow_chunked_length(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+UPB_INLINE bool envoy_config_core_v3_Http1ProtocolOptions_has_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_Http1ProtocolOptions_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http1ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_allow_absolute_url(envoy_config_core_v3_Http1ProtocolOptions *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_Http1ProtocolOptions_mutable_allow_absolute_url(envoy_config_core_v3_Http1ProtocolOptions *msg, upb_arena *arena) {
@@ -219,12 +252,13 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_Http1ProtocolO
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_accept_http_10(envoy_config_core_v3_Http1ProtocolOptions *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_default_host_for_http_10(envoy_config_core_v3_Http1ProtocolOptions *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_header_key_format(envoy_config_core_v3_Http1ProtocolOptions *msg, envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat* envoy_config_core_v3_Http1ProtocolOptions_mutable_header_key_format(envoy_config_core_v3_Http1ProtocolOptions *msg, upb_arena *arena) {
@@ -237,12 +271,13 @@ UPB_INLINE struct envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat* env
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_enable_trailers(envoy_config_core_v3_Http1ProtocolOptions *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_allow_chunked_length(envoy_config_core_v3_Http1ProtocolOptions *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_Http1ProtocolOptions_set_override_stream_error_on_invalid_http_message(envoy_config_core_v3_Http1ProtocolOptions *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_Http1ProtocolOptions_mutable_override_stream_error_on_invalid_http_message(envoy_config_core_v3_Http1ProtocolOptions *msg, upb_arena *arena) {
@@ -265,6 +300,12 @@ UPB_INLINE envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat *envoy_conf
envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat *ret = envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat *envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat *ret = envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_serialize(const envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit, arena, len);
}
@@ -301,6 +342,12 @@ UPB_INLINE envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseW
envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *ret = envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *ret = envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_serialize(const envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit, arena, len);
}
@@ -317,19 +364,26 @@ UPB_INLINE envoy_config_core_v3_KeepaliveSettings *envoy_config_core_v3_Keepaliv
envoy_config_core_v3_KeepaliveSettings *ret = envoy_config_core_v3_KeepaliveSettings_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_KeepaliveSettings_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_KeepaliveSettings *envoy_config_core_v3_KeepaliveSettings_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_KeepaliveSettings *ret = envoy_config_core_v3_KeepaliveSettings_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_KeepaliveSettings_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_KeepaliveSettings_serialize(const envoy_config_core_v3_KeepaliveSettings *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_KeepaliveSettings_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_KeepaliveSettings_has_interval(const envoy_config_core_v3_KeepaliveSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettings_interval(const envoy_config_core_v3_KeepaliveSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_KeepaliveSettings_has_timeout(const envoy_config_core_v3_KeepaliveSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettings_timeout(const envoy_config_core_v3_KeepaliveSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_core_v3_KeepaliveSettings_has_interval_jitter(const envoy_config_core_v3_KeepaliveSettings *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_core_v3_KeepaliveSettings_interval_jitter(const envoy_config_core_v3_KeepaliveSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_Percent*); }
+UPB_INLINE bool envoy_config_core_v3_KeepaliveSettings_has_interval(const envoy_config_core_v3_KeepaliveSettings *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettings_interval(const envoy_config_core_v3_KeepaliveSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_KeepaliveSettings_has_timeout(const envoy_config_core_v3_KeepaliveSettings *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettings_timeout(const envoy_config_core_v3_KeepaliveSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_core_v3_KeepaliveSettings_has_interval_jitter(const envoy_config_core_v3_KeepaliveSettings *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_core_v3_KeepaliveSettings_interval_jitter(const envoy_config_core_v3_KeepaliveSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_Percent*); }
UPB_INLINE void envoy_config_core_v3_KeepaliveSettings_set_interval(envoy_config_core_v3_KeepaliveSettings *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettings_mutable_interval(envoy_config_core_v3_KeepaliveSettings *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_KeepaliveSettings_interval(msg);
@@ -341,7 +395,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettin
return sub;
}
UPB_INLINE void envoy_config_core_v3_KeepaliveSettings_set_timeout(envoy_config_core_v3_KeepaliveSettings *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettings_mutable_timeout(envoy_config_core_v3_KeepaliveSettings *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_core_v3_KeepaliveSettings_timeout(msg);
@@ -353,7 +408,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_core_v3_KeepaliveSettin
return sub;
}
UPB_INLINE void envoy_config_core_v3_KeepaliveSettings_set_interval_jitter(envoy_config_core_v3_KeepaliveSettings *msg, struct envoy_type_v3_Percent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_Percent*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_config_core_v3_KeepaliveSettings_mutable_interval_jitter(envoy_config_core_v3_KeepaliveSettings *msg, upb_arena *arena) {
struct envoy_type_v3_Percent* sub = (struct envoy_type_v3_Percent*)envoy_config_core_v3_KeepaliveSettings_interval_jitter(msg);
@@ -375,40 +431,47 @@ UPB_INLINE envoy_config_core_v3_Http2ProtocolOptions *envoy_config_core_v3_Http2
envoy_config_core_v3_Http2ProtocolOptions *ret = envoy_config_core_v3_Http2ProtocolOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Http2ProtocolOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Http2ProtocolOptions *envoy_config_core_v3_Http2ProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Http2ProtocolOptions *ret = envoy_config_core_v3_Http2ProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Http2ProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Http2ProtocolOptions_serialize(const envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Http2ProtocolOptions_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_hpack_table_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_hpack_table_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_concurrent_streams(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_concurrent_streams(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_initial_stream_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_initial_stream_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_initial_connection_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_initial_connection_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_allow_connect(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_allow_metadata(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_outbound_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_outbound_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_outbound_control_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_outbound_control_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_consecutive_inbound_frames_with_empty_payload(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_inbound_priority_frames_per_stream(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_inbound_window_update_frames_per_data_frame_sent(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_stream_error_on_invalid_http_messaging(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_custom_settings_parameters(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); }
-UPB_INLINE const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter* const* envoy_config_core_v3_Http2ProtocolOptions_custom_settings_parameters(const envoy_config_core_v3_Http2ProtocolOptions *msg, size_t *len) { return (const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_Http2ProtocolOptions_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_connection_keepalive(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
-UPB_INLINE const envoy_config_core_v3_KeepaliveSettings* envoy_config_core_v3_Http2ProtocolOptions_connection_keepalive(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), const envoy_config_core_v3_KeepaliveSettings*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_hpack_table_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_hpack_table_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_concurrent_streams(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_concurrent_streams(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_initial_stream_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_initial_stream_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_initial_connection_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_initial_connection_window_size(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_allow_connect(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_allow_metadata(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_outbound_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_outbound_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_outbound_control_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_outbound_control_frames(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_consecutive_inbound_frames_with_empty_payload(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_inbound_priority_frames_per_stream(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_max_inbound_window_update_frames_per_data_frame_sent(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_stream_error_on_invalid_http_messaging(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_custom_settings_parameters(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 96)); }
+UPB_INLINE const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter* const* envoy_config_core_v3_Http2ProtocolOptions_custom_settings_parameters(const envoy_config_core_v3_Http2ProtocolOptions *msg, size_t *len) { return (const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter* const*)_upb_array_accessor(msg, UPB_SIZE(52, 96), len); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_core_v3_Http2ProtocolOptions_override_stream_error_on_invalid_http_message(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_has_connection_keepalive(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE const envoy_config_core_v3_KeepaliveSettings* envoy_config_core_v3_Http2ProtocolOptions_connection_keepalive(const envoy_config_core_v3_Http2ProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 88), const envoy_config_core_v3_KeepaliveSettings*); }
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_hpack_table_size(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_hpack_table_size(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_hpack_table_size(msg);
@@ -420,7 +483,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_max_concurrent_streams(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_max_concurrent_streams(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_max_concurrent_streams(msg);
@@ -432,7 +496,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_initial_stream_window_size(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_initial_stream_window_size(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_initial_stream_window_size(msg);
@@ -444,7 +509,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_initial_connection_window_size(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_initial_connection_window_size(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_initial_connection_window_size(msg);
@@ -456,13 +522,14 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_allow_connect(envoy_config_core_v3_Http2ProtocolOptions *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_allow_metadata(envoy_config_core_v3_Http2ProtocolOptions *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_max_outbound_frames(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_max_outbound_frames(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_max_outbound_frames(msg);
@@ -474,7 +541,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_max_outbound_control_frames(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_max_outbound_control_frames(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_max_outbound_control_frames(msg);
@@ -486,7 +554,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_max_consecutive_inbound_frames_with_empty_payload(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_max_consecutive_inbound_frames_with_empty_payload(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_max_consecutive_inbound_frames_with_empty_payload(msg);
@@ -498,7 +567,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_max_inbound_priority_frames_per_stream(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_max_inbound_priority_frames_per_stream(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_max_inbound_priority_frames_per_stream(msg);
@@ -510,7 +580,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_max_inbound_window_update_frames_per_data_frame_sent(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_mutable_max_inbound_window_update_frames_per_data_frame_sent(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_max_inbound_window_update_frames_per_data_frame_sent(msg);
@@ -522,23 +593,24 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_stream_error_on_invalid_http_messaging(envoy_config_core_v3_Http2ProtocolOptions *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
UPB_INLINE envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter** envoy_config_core_v3_Http2ProtocolOptions_mutable_custom_settings_parameters(envoy_config_core_v3_Http2ProtocolOptions *msg, size_t *len) {
- return (envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len);
+ return (envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 96), len);
}
UPB_INLINE envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter** envoy_config_core_v3_Http2ProtocolOptions_resize_custom_settings_parameters(envoy_config_core_v3_Http2ProtocolOptions *msg, size_t len, upb_arena *arena) {
- return (envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter**)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 96), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter* envoy_config_core_v3_Http2ProtocolOptions_add_custom_settings_parameters(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter* sub = (struct envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter*)_upb_msg_new(&envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(52, 96), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_override_stream_error_on_invalid_http_message(envoy_config_core_v3_Http2ProtocolOptions *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(40, 80), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_Http2ProtocolOptions_mutable_override_stream_error_on_invalid_http_message(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_core_v3_Http2ProtocolOptions_override_stream_error_on_invalid_http_message(msg);
@@ -550,7 +622,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_core_v3_Http2ProtocolO
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_set_connection_keepalive(envoy_config_core_v3_Http2ProtocolOptions *msg, envoy_config_core_v3_KeepaliveSettings* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(44, 88), envoy_config_core_v3_KeepaliveSettings*) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(48, 88), envoy_config_core_v3_KeepaliveSettings*) = value;
}
UPB_INLINE struct envoy_config_core_v3_KeepaliveSettings* envoy_config_core_v3_Http2ProtocolOptions_mutable_connection_keepalive(envoy_config_core_v3_Http2ProtocolOptions *msg, upb_arena *arena) {
struct envoy_config_core_v3_KeepaliveSettings* sub = (struct envoy_config_core_v3_KeepaliveSettings*)envoy_config_core_v3_Http2ProtocolOptions_connection_keepalive(msg);
@@ -572,17 +645,24 @@ UPB_INLINE envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *envoy_co
envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *ret = envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *ret = envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_serialize(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_has_identifier(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_identifier(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_has_value(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_value(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_has_identifier(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_identifier(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_has_value(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_value(const envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_set_identifier(envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_mutable_identifier(envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_identifier(msg);
@@ -594,7 +674,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2Protoco
return sub;
}
UPB_INLINE void envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_set_value(envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_mutable_value(envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_value(msg);
@@ -616,15 +697,22 @@ UPB_INLINE envoy_config_core_v3_GrpcProtocolOptions *envoy_config_core_v3_GrpcPr
envoy_config_core_v3_GrpcProtocolOptions *ret = envoy_config_core_v3_GrpcProtocolOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcProtocolOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_GrpcProtocolOptions *envoy_config_core_v3_GrpcProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_GrpcProtocolOptions *ret = envoy_config_core_v3_GrpcProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_GrpcProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_GrpcProtocolOptions_serialize(const envoy_config_core_v3_GrpcProtocolOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_GrpcProtocolOptions_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_core_v3_GrpcProtocolOptions_has_http2_protocol_options(const envoy_config_core_v3_GrpcProtocolOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_core_v3_Http2ProtocolOptions* envoy_config_core_v3_GrpcProtocolOptions_http2_protocol_options(const envoy_config_core_v3_GrpcProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_core_v3_Http2ProtocolOptions*); }
+UPB_INLINE bool envoy_config_core_v3_GrpcProtocolOptions_has_http2_protocol_options(const envoy_config_core_v3_GrpcProtocolOptions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_core_v3_Http2ProtocolOptions* envoy_config_core_v3_GrpcProtocolOptions_http2_protocol_options(const envoy_config_core_v3_GrpcProtocolOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_core_v3_Http2ProtocolOptions*); }
UPB_INLINE void envoy_config_core_v3_GrpcProtocolOptions_set_http2_protocol_options(envoy_config_core_v3_GrpcProtocolOptions *msg, envoy_config_core_v3_Http2ProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_core_v3_Http2ProtocolOptions*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_core_v3_Http2ProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions* envoy_config_core_v3_GrpcProtocolOptions_mutable_http2_protocol_options(envoy_config_core_v3_GrpcProtocolOptions *msg, upb_arena *arena) {
struct envoy_config_core_v3_Http2ProtocolOptions* sub = (struct envoy_config_core_v3_Http2ProtocolOptions*)envoy_config_core_v3_GrpcProtocolOptions_http2_protocol_options(msg);
@@ -636,6 +724,28 @@ UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions* envoy_config_core_v
return sub;
}
+/* envoy.config.core.v3.Http3ProtocolOptions */
+
+UPB_INLINE envoy_config_core_v3_Http3ProtocolOptions *envoy_config_core_v3_Http3ProtocolOptions_new(upb_arena *arena) {
+ return (envoy_config_core_v3_Http3ProtocolOptions *)_upb_msg_new(&envoy_config_core_v3_Http3ProtocolOptions_msginit, arena);
+}
+UPB_INLINE envoy_config_core_v3_Http3ProtocolOptions *envoy_config_core_v3_Http3ProtocolOptions_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_core_v3_Http3ProtocolOptions *ret = envoy_config_core_v3_Http3ProtocolOptions_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_Http3ProtocolOptions_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_core_v3_Http3ProtocolOptions *envoy_config_core_v3_Http3ProtocolOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_Http3ProtocolOptions *ret = envoy_config_core_v3_Http3ProtocolOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_Http3ProtocolOptions_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_core_v3_Http3ProtocolOptions_serialize(const envoy_config_core_v3_Http3ProtocolOptions *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_core_v3_Http3ProtocolOptions_msginit, arena, len);
+}
+
+
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c
index 7ac6d144b6d..4c56e07b7f1 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c
@@ -10,7 +10,6 @@
#include "upb/msg.h"
#include "envoy/config/core/v3/proxy_protocol.upb.h"
#include "udpa/annotations/status.upb.h"
-#include "validate/validate.upb.h"
#include "upb/port_def.inc"
@@ -21,7 +20,7 @@ static const upb_msglayout_field envoy_config_core_v3_ProxyProtocolConfig__field
const upb_msglayout envoy_config_core_v3_ProxyProtocolConfig_msginit = {
NULL,
&envoy_config_core_v3_ProxyProtocolConfig__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h
index 9eebc0ea108..bd56a644def 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -39,6 +40,12 @@ UPB_INLINE envoy_config_core_v3_ProxyProtocolConfig *envoy_config_core_v3_ProxyP
envoy_config_core_v3_ProxyProtocolConfig *ret = envoy_config_core_v3_ProxyProtocolConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_ProxyProtocolConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_ProxyProtocolConfig *envoy_config_core_v3_ProxyProtocolConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_ProxyProtocolConfig *ret = envoy_config_core_v3_ProxyProtocolConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_ProxyProtocolConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_ProxyProtocolConfig_serialize(const envoy_config_core_v3_ProxyProtocolConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_ProxyProtocolConfig_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c
index d723cd644c4..d4c2ea14006 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.c
@@ -16,7 +16,7 @@
#include "upb/port_def.inc"
static const upb_msglayout_field envoy_config_core_v3_SocketOption__fields[6] = {
- {1, UPB_SIZE(24, 24), 0, 0, 9, 1},
+ {1, UPB_SIZE(20, 24), 0, 0, 9, 1},
{2, UPB_SIZE(0, 0), 0, 0, 3, 1},
{3, UPB_SIZE(8, 8), 0, 0, 3, 1},
{4, UPB_SIZE(32, 40), UPB_SIZE(-41, -57), 0, 3, 1},
@@ -27,7 +27,7 @@ static const upb_msglayout_field envoy_config_core_v3_SocketOption__fields[6] =
const upb_msglayout envoy_config_core_v3_SocketOption_msginit = {
NULL,
&envoy_config_core_v3_SocketOption__fields[0],
- UPB_SIZE(48, 64), 6, false,
+ UPB_SIZE(48, 64), 6, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h
index 55baf60c04f..0347443069d 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -40,6 +41,12 @@ UPB_INLINE envoy_config_core_v3_SocketOption *envoy_config_core_v3_SocketOption_
envoy_config_core_v3_SocketOption *ret = envoy_config_core_v3_SocketOption_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_SocketOption_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_SocketOption *envoy_config_core_v3_SocketOption_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_SocketOption *ret = envoy_config_core_v3_SocketOption_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_SocketOption_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_SocketOption_serialize(const envoy_config_core_v3_SocketOption *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_SocketOption_msginit, arena, len);
}
@@ -51,7 +58,7 @@ typedef enum {
} envoy_config_core_v3_SocketOption_value_oneofcases;
UPB_INLINE envoy_config_core_v3_SocketOption_value_oneofcases envoy_config_core_v3_SocketOption_value_case(const envoy_config_core_v3_SocketOption* msg) { return (envoy_config_core_v3_SocketOption_value_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(40, 56), int32_t); }
-UPB_INLINE upb_strview envoy_config_core_v3_SocketOption_description(const envoy_config_core_v3_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_config_core_v3_SocketOption_description(const envoy_config_core_v3_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview); }
UPB_INLINE int64_t envoy_config_core_v3_SocketOption_level(const envoy_config_core_v3_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
UPB_INLINE int64_t envoy_config_core_v3_SocketOption_name(const envoy_config_core_v3_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
UPB_INLINE bool envoy_config_core_v3_SocketOption_has_int_value(const envoy_config_core_v3_SocketOption *msg) { return _upb_getoneofcase(msg, UPB_SIZE(40, 56)) == 4; }
@@ -61,7 +68,7 @@ UPB_INLINE upb_strview envoy_config_core_v3_SocketOption_buf_value(const envoy_c
UPB_INLINE int32_t envoy_config_core_v3_SocketOption_state(const envoy_config_core_v3_SocketOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
UPB_INLINE void envoy_config_core_v3_SocketOption_set_description(envoy_config_core_v3_SocketOption *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_core_v3_SocketOption_set_level(envoy_config_core_v3_SocketOption *msg, int64_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c
index 9a85f056180..71781640be7 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c
@@ -9,27 +9,33 @@
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/config/core/v3/substitution_format_string.upb.h"
+#include "envoy/config/core/v3/base.upb.h"
+#include "envoy/config/core/v3/extension.upb.h"
#include "google/protobuf/struct.upb.h"
#include "udpa/annotations/status.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_core_v3_SubstitutionFormatString_submsgs[1] = {
+static const upb_msglayout *const envoy_config_core_v3_SubstitutionFormatString_submsgs[3] = {
+ &envoy_config_core_v3_DataSource_msginit,
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
&google_protobuf_Struct_msginit,
};
-static const upb_msglayout_field envoy_config_core_v3_SubstitutionFormatString__fields[4] = {
- {1, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 9, 1},
- {2, UPB_SIZE(12, 24), UPB_SIZE(-21, -41), 0, 11, 1},
+static const upb_msglayout_field envoy_config_core_v3_SubstitutionFormatString__fields[6] = {
+ {1, UPB_SIZE(16, 32), UPB_SIZE(-25, -49), 0, 9, 1},
+ {2, UPB_SIZE(16, 32), UPB_SIZE(-25, -49), 2, 11, 1},
{3, UPB_SIZE(0, 0), 0, 0, 8, 1},
{4, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {5, UPB_SIZE(16, 32), UPB_SIZE(-25, -49), 0, 11, 1},
+ {6, UPB_SIZE(12, 24), 0, 1, 11, 3},
};
const upb_msglayout envoy_config_core_v3_SubstitutionFormatString_msginit = {
&envoy_config_core_v3_SubstitutionFormatString_submsgs[0],
&envoy_config_core_v3_SubstitutionFormatString__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(32, 64), 6, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h
index 3f78910b63d..3f450e9ad17 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -22,7 +23,11 @@ extern "C" {
struct envoy_config_core_v3_SubstitutionFormatString;
typedef struct envoy_config_core_v3_SubstitutionFormatString envoy_config_core_v3_SubstitutionFormatString;
extern const upb_msglayout envoy_config_core_v3_SubstitutionFormatString_msginit;
+struct envoy_config_core_v3_DataSource;
+struct envoy_config_core_v3_TypedExtensionConfig;
struct google_protobuf_Struct;
+extern const upb_msglayout envoy_config_core_v3_DataSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_TypedExtensionConfig_msginit;
extern const upb_msglayout google_protobuf_Struct_msginit;
@@ -36,6 +41,12 @@ UPB_INLINE envoy_config_core_v3_SubstitutionFormatString *envoy_config_core_v3_S
envoy_config_core_v3_SubstitutionFormatString *ret = envoy_config_core_v3_SubstitutionFormatString_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_core_v3_SubstitutionFormatString_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_core_v3_SubstitutionFormatString *envoy_config_core_v3_SubstitutionFormatString_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_core_v3_SubstitutionFormatString *ret = envoy_config_core_v3_SubstitutionFormatString_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_core_v3_SubstitutionFormatString_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_core_v3_SubstitutionFormatString_serialize(const envoy_config_core_v3_SubstitutionFormatString *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_core_v3_SubstitutionFormatString_msginit, arena, len);
}
@@ -43,22 +54,27 @@ UPB_INLINE char *envoy_config_core_v3_SubstitutionFormatString_serialize(const e
typedef enum {
envoy_config_core_v3_SubstitutionFormatString_format_text_format = 1,
envoy_config_core_v3_SubstitutionFormatString_format_json_format = 2,
+ envoy_config_core_v3_SubstitutionFormatString_format_text_format_source = 5,
envoy_config_core_v3_SubstitutionFormatString_format_NOT_SET = 0
} envoy_config_core_v3_SubstitutionFormatString_format_oneofcases;
-UPB_INLINE envoy_config_core_v3_SubstitutionFormatString_format_oneofcases envoy_config_core_v3_SubstitutionFormatString_format_case(const envoy_config_core_v3_SubstitutionFormatString* msg) { return (envoy_config_core_v3_SubstitutionFormatString_format_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
+UPB_INLINE envoy_config_core_v3_SubstitutionFormatString_format_oneofcases envoy_config_core_v3_SubstitutionFormatString_format_case(const envoy_config_core_v3_SubstitutionFormatString* msg) { return (envoy_config_core_v3_SubstitutionFormatString_format_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 48), int32_t); }
-UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_has_text_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 1; }
-UPB_INLINE upb_strview envoy_config_core_v3_SubstitutionFormatString_text_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 1, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_has_json_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 2; }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_SubstitutionFormatString_json_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(12, 24), UPB_SIZE(20, 40), 2, NULL); }
+UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_has_text_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 1; }
+UPB_INLINE upb_strview envoy_config_core_v3_SubstitutionFormatString_text_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(16, 32), UPB_SIZE(24, 48), 1, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_has_json_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 2; }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_core_v3_SubstitutionFormatString_json_format(const envoy_config_core_v3_SubstitutionFormatString *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Struct*, UPB_SIZE(16, 32), UPB_SIZE(24, 48), 2, NULL); }
UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_omit_empty_values(const envoy_config_core_v3_SubstitutionFormatString *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
UPB_INLINE upb_strview envoy_config_core_v3_SubstitutionFormatString_content_type(const envoy_config_core_v3_SubstitutionFormatString *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_has_text_format_source(const envoy_config_core_v3_SubstitutionFormatString *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 5; }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_core_v3_SubstitutionFormatString_text_format_source(const envoy_config_core_v3_SubstitutionFormatString *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_DataSource*, UPB_SIZE(16, 32), UPB_SIZE(24, 48), 5, NULL); }
+UPB_INLINE bool envoy_config_core_v3_SubstitutionFormatString_has_formatters(const envoy_config_core_v3_SubstitutionFormatString *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* const* envoy_config_core_v3_SubstitutionFormatString_formatters(const envoy_config_core_v3_SubstitutionFormatString *msg, size_t *len) { return (const struct envoy_config_core_v3_TypedExtensionConfig* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
UPB_INLINE void envoy_config_core_v3_SubstitutionFormatString_set_text_format(envoy_config_core_v3_SubstitutionFormatString *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 1);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(16, 32), value, UPB_SIZE(24, 48), 1);
}
UPB_INLINE void envoy_config_core_v3_SubstitutionFormatString_set_json_format(envoy_config_core_v3_SubstitutionFormatString *msg, struct google_protobuf_Struct* value) {
- UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(12, 24), value, UPB_SIZE(20, 40), 2);
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Struct*, UPB_SIZE(16, 32), value, UPB_SIZE(24, 48), 2);
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_core_v3_SubstitutionFormatString_mutable_json_format(envoy_config_core_v3_SubstitutionFormatString *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_core_v3_SubstitutionFormatString_json_format(msg);
@@ -75,6 +91,31 @@ UPB_INLINE void envoy_config_core_v3_SubstitutionFormatString_set_omit_empty_val
UPB_INLINE void envoy_config_core_v3_SubstitutionFormatString_set_content_type(envoy_config_core_v3_SubstitutionFormatString *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
+UPB_INLINE void envoy_config_core_v3_SubstitutionFormatString_set_text_format_source(envoy_config_core_v3_SubstitutionFormatString *msg, struct envoy_config_core_v3_DataSource* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_DataSource*, UPB_SIZE(16, 32), value, UPB_SIZE(24, 48), 5);
+}
+UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_core_v3_SubstitutionFormatString_mutable_text_format_source(envoy_config_core_v3_SubstitutionFormatString *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_config_core_v3_SubstitutionFormatString_text_format_source(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_DataSource*)_upb_msg_new(&envoy_config_core_v3_DataSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_core_v3_SubstitutionFormatString_set_text_format_source(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig** envoy_config_core_v3_SubstitutionFormatString_mutable_formatters(envoy_config_core_v3_SubstitutionFormatString *msg, size_t *len) {
+ return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig** envoy_config_core_v3_SubstitutionFormatString_resize_formatters(envoy_config_core_v3_SubstitutionFormatString *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_core_v3_SubstitutionFormatString_add_formatters(envoy_config_core_v3_SubstitutionFormatString *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_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;
+}
#ifdef __cplusplus
} /* extern "C" */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c
index 58fbccdbc6e..3f9c789bf8d 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c
@@ -11,7 +11,6 @@
#include "envoy/config/endpoint/v3/endpoint.upb.h"
#include "envoy/config/endpoint/v3/endpoint_components.upb.h"
#include "envoy/type/v3/percent.upb.h"
-#include "google/api/annotations.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "udpa/annotations/status.upb.h"
@@ -27,16 +26,16 @@ static const upb_msglayout *const envoy_config_endpoint_v3_ClusterLoadAssignment
};
static const upb_msglayout_field envoy_config_endpoint_v3_ClusterLoadAssignment__fields[4] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(12, 24), 0, 2, 11, 3},
- {4, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {5, UPB_SIZE(16, 32), 0, 0, 11, _UPB_LABEL_MAP},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 32), 0, 2, 11, 3},
+ {4, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {5, UPB_SIZE(20, 40), 0, 0, 11, _UPB_LABEL_MAP},
};
const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_msginit = {
&envoy_config_endpoint_v3_ClusterLoadAssignment_submsgs[0],
&envoy_config_endpoint_v3_ClusterLoadAssignment__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
static const upb_msglayout *const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_submsgs[3] = {
@@ -46,15 +45,15 @@ static const upb_msglayout *const envoy_config_endpoint_v3_ClusterLoadAssignment
};
static const upb_msglayout_field envoy_config_endpoint_v3_ClusterLoadAssignment_Policy__fields[3] = {
- {2, UPB_SIZE(8, 16), 0, 0, 11, 3},
- {3, UPB_SIZE(0, 0), 0, 2, 11, 1},
- {4, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 11, 3},
+ {3, UPB_SIZE(4, 8), 1, 2, 11, 1},
+ {4, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit = {
&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_submsgs[0],
&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_submsgs[1] = {
@@ -62,14 +61,14 @@ static const upb_msglayout *const envoy_config_endpoint_v3_ClusterLoadAssignment
};
static const upb_msglayout_field envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit = {
&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_submsgs[0],
&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_submsgs[1] = {
@@ -84,7 +83,7 @@ static const upb_msglayout_field envoy_config_endpoint_v3_ClusterLoadAssignment_
const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_msginit = {
&envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_submsgs[0],
&envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h
index be00783f59f..c89e4a45721 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -53,38 +54,45 @@ UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment *envoy_config_endpoint
envoy_config_endpoint_v3_ClusterLoadAssignment *ret = envoy_config_endpoint_v3_ClusterLoadAssignment_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment *envoy_config_endpoint_v3_ClusterLoadAssignment_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_ClusterLoadAssignment *ret = envoy_config_endpoint_v3_ClusterLoadAssignment_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_ClusterLoadAssignment_serialize(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterLoadAssignment_cluster_name(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const* envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t *len) { return (const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_named_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE size_t envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_size(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_get(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview key, struct envoy_config_endpoint_v3_Endpoint* *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, 0, val, sizeof(*val)); }
-UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_next(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t* iter) { return (const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); }
+UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterLoadAssignment_cluster_name(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const* envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t *len) { return (const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_policy(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_has_named_endpoints(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE size_t envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_size(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg) {return _upb_msg_map_size(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_get(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview key, struct envoy_config_endpoint_v3_Endpoint* *val) { return _upb_msg_map_get(msg, UPB_SIZE(20, 40), &key, 0, val, sizeof(*val)); }
+UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_next(const envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t* iter) { return (const envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); }
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_set_cluster_name(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints** envoy_config_endpoint_v3_ClusterLoadAssignment_mutable_endpoints(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t *len) {
- return (struct envoy_config_endpoint_v3_LocalityLbEndpoints**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (struct envoy_config_endpoint_v3_LocalityLbEndpoints**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints** envoy_config_endpoint_v3_ClusterLoadAssignment_resize_endpoints(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_endpoint_v3_LocalityLbEndpoints**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_endpoint_v3_LocalityLbEndpoints**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_LocalityLbEndpoints* envoy_config_endpoint_v3_ClusterLoadAssignment_add_endpoints(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_LocalityLbEndpoints* sub = (struct envoy_config_endpoint_v3_LocalityLbEndpoints*)_upb_msg_new(&envoy_config_endpoint_v3_LocalityLbEndpoints_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_set_policy(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*) = value;
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_config_endpoint_v3_ClusterLoadAssignment_mutable_policy(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* sub = (struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy*)envoy_config_endpoint_v3_ClusterLoadAssignment_policy(msg);
@@ -95,10 +103,10 @@ UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* envoy_c
}
return sub;
}
-UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_clear(envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_set(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview key, struct envoy_config_endpoint_v3_Endpoint* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, 0, &val, sizeof(val), a); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_delete(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, 0); }
-UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_nextmutable(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t* iter) { return (envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); }
+UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_clear(envoy_config_endpoint_v3_ClusterLoadAssignment *msg) { _upb_msg_map_clear(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_set(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview key, struct envoy_config_endpoint_v3_Endpoint* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(20, 40), &key, 0, &val, sizeof(val), a); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_delete(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(20, 40), &key, 0); }
+UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry* envoy_config_endpoint_v3_ClusterLoadAssignment_named_endpoints_nextmutable(envoy_config_endpoint_v3_ClusterLoadAssignment *msg, size_t* iter) { return (envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); }
/* envoy.config.endpoint.v3.ClusterLoadAssignment.Policy */
@@ -110,32 +118,39 @@ UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *envoy_config_e
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_serialize(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, size_t *len) { return (const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_drop_overloads(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, size_t *len) { return (const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_overprovisioning_factor(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_has_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_endpoint_stale_after(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload** envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_mutable_drop_overloads(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, size_t *len) {
- return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+ return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
}
UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload** envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_resize_drop_overloads(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_add_drop_overloads(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* sub = (struct envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload*)_upb_msg_new(&envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, 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 envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_set_overprovisioning_factor(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_mutable_overprovisioning_factor(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_overprovisioning_factor(msg);
@@ -147,7 +162,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_ClusterL
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_set_endpoint_stale_after(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_mutable_endpoint_stale_after(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_endpoint_stale_after(msg);
@@ -169,19 +185,26 @@ UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *e
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *ret = envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_serialize(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_category(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_has_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_category(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_has_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_FractionalPercent*); }
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_set_category(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_set_drop_percentage(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg, struct envoy_type_v3_FractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_FractionalPercent*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_mutable_drop_percentage(envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload *msg, upb_arena *arena) {
struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c
index fbd0ce86273..f12e49bdafc 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c
@@ -25,15 +25,15 @@ static const upb_msglayout *const envoy_config_endpoint_v3_Endpoint_submsgs[2] =
};
static const upb_msglayout_field envoy_config_endpoint_v3_Endpoint__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(12, 24), 0, 1, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(16, 32), 2, 1, 11, 1},
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_endpoint_v3_Endpoint_msginit = {
&envoy_config_endpoint_v3_Endpoint_submsgs[0],
&envoy_config_endpoint_v3_Endpoint__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout_field envoy_config_endpoint_v3_Endpoint_HealthCheckConfig__fields[2] = {
@@ -44,7 +44,7 @@ static const upb_msglayout_field envoy_config_endpoint_v3_Endpoint_HealthCheckCo
const upb_msglayout envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msginit = {
NULL,
&envoy_config_endpoint_v3_Endpoint_HealthCheckConfig__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_endpoint_v3_LbEndpoint_submsgs[3] = {
@@ -55,36 +55,36 @@ static const upb_msglayout *const envoy_config_endpoint_v3_LbEndpoint_submsgs[3]
static const upb_msglayout_field envoy_config_endpoint_v3_LbEndpoint__fields[5] = {
{1, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 1, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {3, UPB_SIZE(8, 8), 0, 0, 11, 1},
- {4, UPB_SIZE(12, 16), 0, 2, 11, 1},
+ {2, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {3, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {4, UPB_SIZE(12, 16), 2, 2, 11, 1},
{5, UPB_SIZE(16, 24), UPB_SIZE(-25, -41), 0, 9, 1},
};
const upb_msglayout envoy_config_endpoint_v3_LbEndpoint_msginit = {
&envoy_config_endpoint_v3_LbEndpoint_submsgs[0],
&envoy_config_endpoint_v3_LbEndpoint__fields[0],
- UPB_SIZE(32, 48), 5, false,
+ UPB_SIZE(32, 48), 5, false, 255,
};
-static const upb_msglayout *const envoy_config_endpoint_v3_LocalityLbEndpoints_submsgs[4] = {
+static const upb_msglayout *const envoy_config_endpoint_v3_LocalityLbEndpoints_submsgs[3] = {
&envoy_config_core_v3_Locality_msginit,
&envoy_config_endpoint_v3_LbEndpoint_msginit,
&google_protobuf_UInt32Value_msginit,
};
static const upb_msglayout_field envoy_config_endpoint_v3_LocalityLbEndpoints__fields[5] = {
- {1, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {2, UPB_SIZE(16, 32), 0, 1, 11, 3},
- {3, UPB_SIZE(8, 16), 0, 2, 11, 1},
- {5, UPB_SIZE(0, 0), 0, 0, 13, 1},
- {6, UPB_SIZE(12, 24), 0, 2, 11, 1},
+ {1, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(20, 32), 0, 1, 11, 3},
+ {3, UPB_SIZE(12, 16), 2, 2, 11, 1},
+ {5, UPB_SIZE(4, 4), 0, 0, 13, 1},
+ {6, UPB_SIZE(16, 24), 3, 2, 11, 1},
};
const upb_msglayout envoy_config_endpoint_v3_LocalityLbEndpoints_msginit = {
&envoy_config_endpoint_v3_LocalityLbEndpoints_submsgs[0],
&envoy_config_endpoint_v3_LocalityLbEndpoints__fields[0],
- UPB_SIZE(20, 40), 5, false,
+ UPB_SIZE(24, 40), 5, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h
index 56d20024b0b..b6ad981cacc 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -51,18 +52,25 @@ UPB_INLINE envoy_config_endpoint_v3_Endpoint *envoy_config_endpoint_v3_Endpoint_
envoy_config_endpoint_v3_Endpoint *ret = envoy_config_endpoint_v3_Endpoint_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_Endpoint *envoy_config_endpoint_v3_Endpoint_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_Endpoint *ret = envoy_config_endpoint_v3_Endpoint_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_Endpoint_serialize(const envoy_config_endpoint_v3_Endpoint *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_Endpoint_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_has_address(const envoy_config_endpoint_v3_Endpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_address(const envoy_config_endpoint_v3_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_Address*); }
-UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_has_health_check_config(const envoy_config_endpoint_v3_Endpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_health_check_config(const envoy_config_endpoint_v3_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*); }
-UPB_INLINE upb_strview envoy_config_endpoint_v3_Endpoint_hostname(const envoy_config_endpoint_v3_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_has_address(const envoy_config_endpoint_v3_Endpoint *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_address(const envoy_config_endpoint_v3_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_Address*); }
+UPB_INLINE bool envoy_config_endpoint_v3_Endpoint_has_health_check_config(const envoy_config_endpoint_v3_Endpoint *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_health_check_config(const envoy_config_endpoint_v3_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*); }
+UPB_INLINE upb_strview envoy_config_endpoint_v3_Endpoint_hostname(const envoy_config_endpoint_v3_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_config_endpoint_v3_Endpoint_set_address(envoy_config_endpoint_v3_Endpoint *msg, struct envoy_config_core_v3_Address* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_Address*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_Address*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoint_mutable_address(envoy_config_endpoint_v3_Endpoint *msg, upb_arena *arena) {
struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_endpoint_v3_Endpoint_address(msg);
@@ -74,7 +82,8 @@ UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Endpoin
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_Endpoint_set_health_check_config(envoy_config_endpoint_v3_Endpoint *msg, envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*) = value;
}
UPB_INLINE struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_config_endpoint_v3_Endpoint_mutable_health_check_config(envoy_config_endpoint_v3_Endpoint *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* sub = (struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig*)envoy_config_endpoint_v3_Endpoint_health_check_config(msg);
@@ -86,7 +95,7 @@ UPB_INLINE struct envoy_config_endpoint_v3_Endpoint_HealthCheckConfig* envoy_con
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_Endpoint_set_hostname(envoy_config_endpoint_v3_Endpoint *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
/* envoy.config.endpoint.v3.Endpoint.HealthCheckConfig */
@@ -99,6 +108,12 @@ UPB_INLINE envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *envoy_config_end
envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *ret = envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *ret = envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_serialize(const envoy_config_endpoint_v3_Endpoint_HealthCheckConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msginit, arena, len);
}
@@ -123,6 +138,12 @@ UPB_INLINE envoy_config_endpoint_v3_LbEndpoint *envoy_config_endpoint_v3_LbEndpo
envoy_config_endpoint_v3_LbEndpoint *ret = envoy_config_endpoint_v3_LbEndpoint_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_LbEndpoint_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_LbEndpoint *envoy_config_endpoint_v3_LbEndpoint_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_LbEndpoint *ret = envoy_config_endpoint_v3_LbEndpoint_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_LbEndpoint_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_LbEndpoint_serialize(const envoy_config_endpoint_v3_LbEndpoint *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_LbEndpoint_msginit, arena, len);
}
@@ -136,10 +157,10 @@ UPB_INLINE envoy_config_endpoint_v3_LbEndpoint_host_identifier_oneofcases envoy_
UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_endpoint(const envoy_config_endpoint_v3_LbEndpoint *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 1; }
UPB_INLINE const envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_LbEndpoint_endpoint(const envoy_config_endpoint_v3_LbEndpoint *msg) { return UPB_READ_ONEOF(msg, const envoy_config_endpoint_v3_Endpoint*, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 1, NULL); }
-UPB_INLINE int32_t envoy_config_endpoint_v3_LbEndpoint_health_status(const envoy_config_endpoint_v3_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_metadata(const envoy_config_endpoint_v3_LbEndpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
+UPB_INLINE int32_t envoy_config_endpoint_v3_LbEndpoint_health_status(const envoy_config_endpoint_v3_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_metadata(const envoy_config_endpoint_v3_LbEndpoint *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_endpoint_v3_LbEndpoint_metadata(const envoy_config_endpoint_v3_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LbEndpoint_load_balancing_weight(const envoy_config_endpoint_v3_LbEndpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); }
UPB_INLINE bool envoy_config_endpoint_v3_LbEndpoint_has_endpoint_name(const envoy_config_endpoint_v3_LbEndpoint *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 40)) == 5; }
UPB_INLINE upb_strview envoy_config_endpoint_v3_LbEndpoint_endpoint_name(const envoy_config_endpoint_v3_LbEndpoint *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(16, 24), UPB_SIZE(24, 40), 5, upb_strview_make("", strlen(""))); }
@@ -157,9 +178,10 @@ UPB_INLINE struct envoy_config_endpoint_v3_Endpoint* envoy_config_endpoint_v3_Lb
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_health_status(envoy_config_endpoint_v3_LbEndpoint *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_metadata(envoy_config_endpoint_v3_LbEndpoint *msg, struct envoy_config_core_v3_Metadata* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_endpoint_v3_LbEndpoint_mutable_metadata(envoy_config_endpoint_v3_LbEndpoint *msg, upb_arena *arena) {
@@ -172,6 +194,7 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_endpoint_v3_LbEndp
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_LbEndpoint_set_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LbEndpoint_mutable_load_balancing_weight(envoy_config_endpoint_v3_LbEndpoint *msg, upb_arena *arena) {
@@ -197,22 +220,29 @@ UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints *envoy_config_endpoint_v
envoy_config_endpoint_v3_LocalityLbEndpoints *ret = envoy_config_endpoint_v3_LocalityLbEndpoints_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_LocalityLbEndpoints_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_LocalityLbEndpoints *envoy_config_endpoint_v3_LocalityLbEndpoints_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_LocalityLbEndpoints *ret = envoy_config_endpoint_v3_LocalityLbEndpoints_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_LocalityLbEndpoints_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_LocalityLbEndpoints_serialize(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_LocalityLbEndpoints_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_LocalityLbEndpoints_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_Locality*); }
-UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const envoy_config_endpoint_v3_LbEndpoint* const* envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg, size_t *len) { return (const envoy_config_endpoint_v3_LbEndpoint* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
-UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE uint32_t envoy_config_endpoint_v3_LocalityLbEndpoints_priority(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
-UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_LocalityLbEndpoints_locality(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_config_core_v3_Locality*); }
+UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE const envoy_config_endpoint_v3_LbEndpoint* const* envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg, size_t *len) { return (const envoy_config_endpoint_v3_LbEndpoint* const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); }
+UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE uint32_t envoy_config_endpoint_v3_LocalityLbEndpoints_priority(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_LocalityLbEndpoints_has_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_proximity(const envoy_config_endpoint_v3_LocalityLbEndpoints *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_locality(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, struct envoy_config_core_v3_Locality* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_Locality*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_config_core_v3_Locality*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_locality(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, upb_arena *arena) {
struct envoy_config_core_v3_Locality* sub = (struct envoy_config_core_v3_Locality*)envoy_config_endpoint_v3_LocalityLbEndpoints_locality(msg);
@@ -224,20 +254,21 @@ UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_Locali
return sub;
}
UPB_INLINE envoy_config_endpoint_v3_LbEndpoint** envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, size_t *len) {
- return (envoy_config_endpoint_v3_LbEndpoint**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+ return (envoy_config_endpoint_v3_LbEndpoint**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
}
UPB_INLINE envoy_config_endpoint_v3_LbEndpoint** envoy_config_endpoint_v3_LocalityLbEndpoints_resize_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_LbEndpoint**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_LbEndpoint**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_LbEndpoint* envoy_config_endpoint_v3_LocalityLbEndpoints_add_lb_endpoints(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_LbEndpoint* sub = (struct envoy_config_endpoint_v3_LbEndpoint*)_upb_msg_new(&envoy_config_endpoint_v3_LbEndpoint_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_load_balancing_weight(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(msg);
@@ -249,10 +280,11 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_Locality
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_priority(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_LocalityLbEndpoints_set_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_endpoint_v3_LocalityLbEndpoints_mutable_proximity(envoy_config_endpoint_v3_LocalityLbEndpoints *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_endpoint_v3_LocalityLbEndpoints_proximity(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c
index 9bb6385e9de..560826ed31b 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c
@@ -26,20 +26,20 @@ static const upb_msglayout *const envoy_config_endpoint_v3_UpstreamLocalityStats
};
static const upb_msglayout_field envoy_config_endpoint_v3_UpstreamLocalityStats__fields[8] = {
- {1, UPB_SIZE(36, 40), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 4, 1},
- {3, UPB_SIZE(8, 8), 0, 0, 4, 1},
- {4, UPB_SIZE(16, 16), 0, 0, 4, 1},
- {5, UPB_SIZE(40, 48), 0, 1, 11, 3},
- {6, UPB_SIZE(32, 32), 0, 0, 13, 1},
- {7, UPB_SIZE(44, 56), 0, 2, 11, 3},
- {8, UPB_SIZE(24, 24), 0, 0, 4, 1},
+ {1, UPB_SIZE(44, 48), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 8), 0, 0, 4, 1},
+ {3, UPB_SIZE(16, 16), 0, 0, 4, 1},
+ {4, UPB_SIZE(24, 24), 0, 0, 4, 1},
+ {5, UPB_SIZE(48, 56), 0, 1, 11, 3},
+ {6, UPB_SIZE(40, 40), 0, 0, 13, 1},
+ {7, UPB_SIZE(52, 64), 0, 2, 11, 3},
+ {8, UPB_SIZE(32, 32), 0, 0, 4, 1},
};
const upb_msglayout envoy_config_endpoint_v3_UpstreamLocalityStats_msginit = {
&envoy_config_endpoint_v3_UpstreamLocalityStats_submsgs[0],
&envoy_config_endpoint_v3_UpstreamLocalityStats__fields[0],
- UPB_SIZE(48, 64), 8, false,
+ UPB_SIZE(56, 72), 8, false, 255,
};
static const upb_msglayout *const envoy_config_endpoint_v3_UpstreamEndpointStats_submsgs[3] = {
@@ -49,19 +49,19 @@ static const upb_msglayout *const envoy_config_endpoint_v3_UpstreamEndpointStats
};
static const upb_msglayout_field envoy_config_endpoint_v3_UpstreamEndpointStats__fields[7] = {
- {1, UPB_SIZE(32, 32), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 4, 1},
- {3, UPB_SIZE(8, 8), 0, 0, 4, 1},
- {4, UPB_SIZE(16, 16), 0, 0, 4, 1},
- {5, UPB_SIZE(40, 48), 0, 1, 11, 3},
- {6, UPB_SIZE(36, 40), 0, 2, 11, 1},
- {7, UPB_SIZE(24, 24), 0, 0, 4, 1},
+ {1, UPB_SIZE(40, 40), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 8), 0, 0, 4, 1},
+ {3, UPB_SIZE(16, 16), 0, 0, 4, 1},
+ {4, UPB_SIZE(24, 24), 0, 0, 4, 1},
+ {5, UPB_SIZE(48, 56), 0, 1, 11, 3},
+ {6, UPB_SIZE(44, 48), 2, 2, 11, 1},
+ {7, UPB_SIZE(32, 32), 0, 0, 4, 1},
};
const upb_msglayout envoy_config_endpoint_v3_UpstreamEndpointStats_msginit = {
&envoy_config_endpoint_v3_UpstreamEndpointStats_submsgs[0],
&envoy_config_endpoint_v3_UpstreamEndpointStats__fields[0],
- UPB_SIZE(48, 56), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field envoy_config_endpoint_v3_EndpointLoadMetricStats__fields[3] = {
@@ -73,7 +73,7 @@ static const upb_msglayout_field envoy_config_endpoint_v3_EndpointLoadMetricStat
const upb_msglayout envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit = {
NULL,
&envoy_config_endpoint_v3_EndpointLoadMetricStats__fields[0],
- UPB_SIZE(24, 32), 3, false,
+ UPB_SIZE(24, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_endpoint_v3_ClusterStats_submsgs[3] = {
@@ -83,18 +83,18 @@ static const upb_msglayout *const envoy_config_endpoint_v3_ClusterStats_submsgs[
};
static const upb_msglayout_field envoy_config_endpoint_v3_ClusterStats__fields[6] = {
- {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
- {2, UPB_SIZE(28, 48), 0, 1, 11, 3},
- {3, UPB_SIZE(0, 0), 0, 0, 4, 1},
- {4, UPB_SIZE(24, 40), 0, 2, 11, 1},
- {5, UPB_SIZE(32, 56), 0, 0, 11, 3},
- {6, UPB_SIZE(16, 24), 0, 0, 9, 1},
+ {1, UPB_SIZE(16, 16), 0, 0, 9, 1},
+ {2, UPB_SIZE(36, 56), 0, 1, 11, 3},
+ {3, UPB_SIZE(8, 8), 0, 0, 4, 1},
+ {4, UPB_SIZE(32, 48), 1, 2, 11, 1},
+ {5, UPB_SIZE(40, 64), 0, 0, 11, 3},
+ {6, UPB_SIZE(24, 32), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_endpoint_v3_ClusterStats_msginit = {
&envoy_config_endpoint_v3_ClusterStats_submsgs[0],
&envoy_config_endpoint_v3_ClusterStats__fields[0],
- UPB_SIZE(40, 64), 6, false,
+ UPB_SIZE(48, 80), 6, false, 255,
};
static const upb_msglayout_field envoy_config_endpoint_v3_ClusterStats_DroppedRequests__fields[2] = {
@@ -105,7 +105,7 @@ static const upb_msglayout_field envoy_config_endpoint_v3_ClusterStats_DroppedRe
const upb_msglayout envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit = {
NULL,
&envoy_config_endpoint_v3_ClusterStats_DroppedRequests__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h
index 65c11a9bddc..d986e182407 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -54,24 +55,31 @@ UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats *envoy_config_endpoint
envoy_config_endpoint_v3_UpstreamLocalityStats *ret = envoy_config_endpoint_v3_UpstreamLocalityStats_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamLocalityStats_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats *envoy_config_endpoint_v3_UpstreamLocalityStats_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_UpstreamLocalityStats *ret = envoy_config_endpoint_v3_UpstreamLocalityStats_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamLocalityStats_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_UpstreamLocalityStats_serialize(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_UpstreamLocalityStats_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 40)); }
-UPB_INLINE const struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_UpstreamLocalityStats_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), const struct envoy_config_core_v3_Locality*); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
-UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 48)); }
-UPB_INLINE const envoy_config_endpoint_v3_EndpointLoadMetricStats* const* envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_EndpointLoadMetricStats* const*)_upb_array_accessor(msg, UPB_SIZE(40, 48), len); }
-UPB_INLINE uint32_t envoy_config_endpoint_v3_UpstreamLocalityStats_priority(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint32_t); }
-UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 56)); }
-UPB_INLINE const envoy_config_endpoint_v3_UpstreamEndpointStats* const* envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_UpstreamEndpointStats* const*)_upb_array_accessor(msg, UPB_SIZE(44, 56), len); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_UpstreamLocalityStats_locality(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 48), const struct envoy_config_core_v3_Locality*); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 56)); }
+UPB_INLINE const envoy_config_endpoint_v3_EndpointLoadMetricStats* const* envoy_config_endpoint_v3_UpstreamLocalityStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_EndpointLoadMetricStats* const*)_upb_array_accessor(msg, UPB_SIZE(48, 56), len); }
+UPB_INLINE uint32_t envoy_config_endpoint_v3_UpstreamLocalityStats_priority(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint32_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_UpstreamLocalityStats_has_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 64)); }
+UPB_INLINE const envoy_config_endpoint_v3_UpstreamEndpointStats* const* envoy_config_endpoint_v3_UpstreamLocalityStats_upstream_endpoint_stats(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_UpstreamEndpointStats* const*)_upb_array_accessor(msg, UPB_SIZE(52, 64), len); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamLocalityStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamLocalityStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); }
UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_locality(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, struct envoy_config_core_v3_Locality* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 40), struct envoy_config_core_v3_Locality*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 48), struct envoy_config_core_v3_Locality*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, upb_arena *arena) {
struct envoy_config_core_v3_Locality* sub = (struct envoy_config_core_v3_Locality*)envoy_config_endpoint_v3_UpstreamLocalityStats_locality(msg);
@@ -83,45 +91,45 @@ UPB_INLINE struct envoy_config_core_v3_Locality* envoy_config_endpoint_v3_Upstre
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_successful_requests(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_error_requests(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
}
UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t *len) {
- return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 48), len);
+ return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 56), len);
}
UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamLocalityStats_resize_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_UpstreamLocalityStats_add_load_metric_stats(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_EndpointLoadMetricStats* sub = (struct envoy_config_endpoint_v3_EndpointLoadMetricStats*)_upb_msg_new(&envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(48, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_priority(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint32_t) = value;
}
UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats** envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t *len) {
- return (envoy_config_endpoint_v3_UpstreamEndpointStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 56), len);
+ return (envoy_config_endpoint_v3_UpstreamEndpointStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 64), len);
}
UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats** envoy_config_endpoint_v3_UpstreamLocalityStats_resize_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_UpstreamEndpointStats**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_UpstreamEndpointStats**)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_UpstreamEndpointStats* envoy_config_endpoint_v3_UpstreamLocalityStats_add_upstream_endpoint_stats(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_UpstreamEndpointStats* sub = (struct envoy_config_endpoint_v3_UpstreamEndpointStats*)_upb_msg_new(&envoy_config_endpoint_v3_UpstreamEndpointStats_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(44, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(52, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamLocalityStats_set_total_issued_requests(envoy_config_endpoint_v3_UpstreamLocalityStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value;
}
/* envoy.config.endpoint.v3.UpstreamEndpointStats */
@@ -134,23 +142,30 @@ UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats *envoy_config_endpoint
envoy_config_endpoint_v3_UpstreamEndpointStats *ret = envoy_config_endpoint_v3_UpstreamEndpointStats_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamEndpointStats_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_UpstreamEndpointStats *envoy_config_endpoint_v3_UpstreamEndpointStats_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_UpstreamEndpointStats *ret = envoy_config_endpoint_v3_UpstreamEndpointStats_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_UpstreamEndpointStats_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_UpstreamEndpointStats_serialize(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_UpstreamEndpointStats_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_address(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 32)); }
-UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_UpstreamEndpointStats_address(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), const struct envoy_config_core_v3_Address*); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
-UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 48)); }
-UPB_INLINE const envoy_config_endpoint_v3_EndpointLoadMetricStats* const* envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_EndpointLoadMetricStats* const*)_upb_array_accessor(msg, UPB_SIZE(40, 48), len); }
-UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 40)); }
-UPB_INLINE const struct google_protobuf_Struct* envoy_config_endpoint_v3_UpstreamEndpointStats_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), const struct google_protobuf_Struct*); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_address(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_UpstreamEndpointStats_address(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), const struct envoy_config_core_v3_Address*); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_successful_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_requests_in_progress(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_error_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 56)); }
+UPB_INLINE const envoy_config_endpoint_v3_EndpointLoadMetricStats* const* envoy_config_endpoint_v3_UpstreamEndpointStats_load_metric_stats(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_EndpointLoadMetricStats* const*)_upb_array_accessor(msg, UPB_SIZE(48, 56), len); }
+UPB_INLINE bool envoy_config_endpoint_v3_UpstreamEndpointStats_has_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Struct* envoy_config_endpoint_v3_UpstreamEndpointStats_metadata(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 48), const struct google_protobuf_Struct*); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_UpstreamEndpointStats_total_issued_requests(const envoy_config_endpoint_v3_UpstreamEndpointStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); }
UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_address(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, struct envoy_config_core_v3_Address* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 32), struct envoy_config_core_v3_Address*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 40), struct envoy_config_core_v3_Address*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_address(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, upb_arena *arena) {
struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_endpoint_v3_UpstreamEndpointStats_address(msg);
@@ -162,29 +177,30 @@ UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_endpoint_v3_Upstrea
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_successful_requests(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_requests_in_progress(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_error_requests(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
}
UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, size_t *len) {
- return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 48), len);
+ return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 56), len);
}
UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats** envoy_config_endpoint_v3_UpstreamEndpointStats_resize_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_EndpointLoadMetricStats**)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_EndpointLoadMetricStats* envoy_config_endpoint_v3_UpstreamEndpointStats_add_load_metric_stats(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_EndpointLoadMetricStats* sub = (struct envoy_config_endpoint_v3_EndpointLoadMetricStats*)_upb_msg_new(&envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(48, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, struct google_protobuf_Struct* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 40), struct google_protobuf_Struct*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 48), struct google_protobuf_Struct*) = value;
}
UPB_INLINE struct google_protobuf_Struct* envoy_config_endpoint_v3_UpstreamEndpointStats_mutable_metadata(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, upb_arena *arena) {
struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)envoy_config_endpoint_v3_UpstreamEndpointStats_metadata(msg);
@@ -196,7 +212,7 @@ UPB_INLINE struct google_protobuf_Struct* envoy_config_endpoint_v3_UpstreamEndpo
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_UpstreamEndpointStats_set_total_issued_requests(envoy_config_endpoint_v3_UpstreamEndpointStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value;
}
/* envoy.config.endpoint.v3.EndpointLoadMetricStats */
@@ -209,6 +225,12 @@ UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats *envoy_config_endpoi
envoy_config_endpoint_v3_EndpointLoadMetricStats *ret = envoy_config_endpoint_v3_EndpointLoadMetricStats_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_EndpointLoadMetricStats *envoy_config_endpoint_v3_EndpointLoadMetricStats_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_EndpointLoadMetricStats *ret = envoy_config_endpoint_v3_EndpointLoadMetricStats_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_EndpointLoadMetricStats_serialize(const envoy_config_endpoint_v3_EndpointLoadMetricStats *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit, arena, len);
}
@@ -237,41 +259,48 @@ UPB_INLINE envoy_config_endpoint_v3_ClusterStats *envoy_config_endpoint_v3_Clust
envoy_config_endpoint_v3_ClusterStats *ret = envoy_config_endpoint_v3_ClusterStats_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_ClusterStats *envoy_config_endpoint_v3_ClusterStats_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_ClusterStats *ret = envoy_config_endpoint_v3_ClusterStats_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_ClusterStats_serialize(const envoy_config_endpoint_v3_ClusterStats *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_ClusterStats_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterStats_cluster_name(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
-UPB_INLINE const envoy_config_endpoint_v3_UpstreamLocalityStats* const* envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_UpstreamLocalityStats* const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
-UPB_INLINE uint64_t envoy_config_endpoint_v3_ClusterStats_total_dropped_requests(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_load_report_interval(const envoy_config_endpoint_v3_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterStats_load_report_interval(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_dropped_requests(const envoy_config_endpoint_v3_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
-UPB_INLINE const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const* envoy_config_endpoint_v3_ClusterStats_dropped_requests(const envoy_config_endpoint_v3_ClusterStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); }
-UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterStats_cluster_service_name(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterStats_cluster_name(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 56)); }
+UPB_INLINE const envoy_config_endpoint_v3_UpstreamLocalityStats* const* envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats(const envoy_config_endpoint_v3_ClusterStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_UpstreamLocalityStats* const*)_upb_array_accessor(msg, UPB_SIZE(36, 56), len); }
+UPB_INLINE uint64_t envoy_config_endpoint_v3_ClusterStats_total_dropped_requests(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_load_report_interval(const envoy_config_endpoint_v3_ClusterStats *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterStats_load_report_interval(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_endpoint_v3_ClusterStats_has_dropped_requests(const envoy_config_endpoint_v3_ClusterStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 64)); }
+UPB_INLINE const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const* envoy_config_endpoint_v3_ClusterStats_dropped_requests(const envoy_config_endpoint_v3_ClusterStats *msg, size_t *len) { return (const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const*)_upb_array_accessor(msg, UPB_SIZE(40, 64), len); }
+UPB_INLINE upb_strview envoy_config_endpoint_v3_ClusterStats_cluster_service_name(const envoy_config_endpoint_v3_ClusterStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), upb_strview); }
UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_cluster_name(envoy_config_endpoint_v3_ClusterStats *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value;
}
UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats** envoy_config_endpoint_v3_ClusterStats_mutable_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats *msg, size_t *len) {
- return (envoy_config_endpoint_v3_UpstreamLocalityStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
+ return (envoy_config_endpoint_v3_UpstreamLocalityStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 56), len);
}
UPB_INLINE envoy_config_endpoint_v3_UpstreamLocalityStats** envoy_config_endpoint_v3_ClusterStats_resize_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_UpstreamLocalityStats**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_UpstreamLocalityStats**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_UpstreamLocalityStats* envoy_config_endpoint_v3_ClusterStats_add_upstream_locality_stats(envoy_config_endpoint_v3_ClusterStats *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_UpstreamLocalityStats* sub = (struct envoy_config_endpoint_v3_UpstreamLocalityStats*)_upb_msg_new(&envoy_config_endpoint_v3_UpstreamLocalityStats_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_total_dropped_requests(envoy_config_endpoint_v3_ClusterStats *msg, uint64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_load_report_interval(envoy_config_endpoint_v3_ClusterStats *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 40), 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* envoy_config_endpoint_v3_ClusterStats_mutable_load_report_interval(envoy_config_endpoint_v3_ClusterStats *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_endpoint_v3_ClusterStats_load_report_interval(msg);
@@ -283,20 +312,20 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_endpoint_v3_ClusterStat
return sub;
}
UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests** envoy_config_endpoint_v3_ClusterStats_mutable_dropped_requests(envoy_config_endpoint_v3_ClusterStats *msg, size_t *len) {
- return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
+ return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 64), len);
}
UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests** envoy_config_endpoint_v3_ClusterStats_resize_dropped_requests(envoy_config_endpoint_v3_ClusterStats *msg, size_t len, upb_arena *arena) {
- return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_endpoint_v3_ClusterStats_DroppedRequests**)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests* envoy_config_endpoint_v3_ClusterStats_add_dropped_requests(envoy_config_endpoint_v3_ClusterStats *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests* sub = (struct envoy_config_endpoint_v3_ClusterStats_DroppedRequests*)_upb_msg_new(&envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(40, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_endpoint_v3_ClusterStats_set_cluster_service_name(envoy_config_endpoint_v3_ClusterStats *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 32), upb_strview) = value;
}
/* envoy.config.endpoint.v3.ClusterStats.DroppedRequests */
@@ -309,6 +338,12 @@ UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests *envoy_config_e
envoy_config_endpoint_v3_ClusterStats_DroppedRequests *ret = envoy_config_endpoint_v3_ClusterStats_DroppedRequests_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_endpoint_v3_ClusterStats_DroppedRequests *envoy_config_endpoint_v3_ClusterStats_DroppedRequests_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_endpoint_v3_ClusterStats_DroppedRequests *ret = envoy_config_endpoint_v3_ClusterStats_DroppedRequests_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_endpoint_v3_ClusterStats_DroppedRequests_serialize(const envoy_config_endpoint_v3_ClusterStats_DroppedRequests *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c
index 7d0a105b95a..e016fffa22a 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c
@@ -20,13 +20,13 @@ static const upb_msglayout *const envoy_config_listener_v3_ApiListener_submsgs[1
};
static const upb_msglayout_field envoy_config_listener_v3_ApiListener__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_ApiListener_msginit = {
&envoy_config_listener_v3_ApiListener_submsgs[0],
&envoy_config_listener_v3_ApiListener__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h
index 81fbf6b7041..9d1372b4e82 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,15 +37,22 @@ UPB_INLINE envoy_config_listener_v3_ApiListener *envoy_config_listener_v3_ApiLis
envoy_config_listener_v3_ApiListener *ret = envoy_config_listener_v3_ApiListener_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ApiListener_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_ApiListener *envoy_config_listener_v3_ApiListener_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_ApiListener *ret = envoy_config_listener_v3_ApiListener_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ApiListener_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_ApiListener_serialize(const envoy_config_listener_v3_ApiListener *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_ApiListener_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_listener_v3_ApiListener_has_api_listener(const envoy_config_listener_v3_ApiListener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_ApiListener_api_listener(const envoy_config_listener_v3_ApiListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_config_listener_v3_ApiListener_has_api_listener(const envoy_config_listener_v3_ApiListener *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_ApiListener_api_listener(const envoy_config_listener_v3_ApiListener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_listener_v3_ApiListener_set_api_listener(envoy_config_listener_v3_ApiListener *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v3_ApiListener_mutable_api_listener(envoy_config_listener_v3_ApiListener *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v3_ApiListener_api_listener(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c
index 4fe3ca748a7..e7e0cad8756 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c
@@ -17,10 +17,9 @@
#include "envoy/config/listener/v3/api_listener.upb.h"
#include "envoy/config/listener/v3/listener_components.upb.h"
#include "envoy/config/listener/v3/udp_listener_config.upb.h"
-#include "google/api/annotations.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/wrappers.upb.h"
-#include "udpa/core/v1/collection_entry.upb.h"
+#include "xds/core/v3/collection_entry.upb.h"
#include "udpa/annotations/security.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -29,7 +28,7 @@
#include "upb/port_def.inc"
static const upb_msglayout *const envoy_config_listener_v3_ListenerCollection_submsgs[1] = {
- &udpa_core_v1_CollectionEntry_msginit,
+ &xds_core_v3_CollectionEntry_msginit,
};
static const upb_msglayout_field envoy_config_listener_v3_ListenerCollection__fields[1] = {
@@ -39,10 +38,10 @@ static const upb_msglayout_field envoy_config_listener_v3_ListenerCollection__fi
const upb_msglayout envoy_config_listener_v3_ListenerCollection_msginit = {
&envoy_config_listener_v3_ListenerCollection_submsgs[0],
&envoy_config_listener_v3_ListenerCollection__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
-static const upb_msglayout *const envoy_config_listener_v3_Listener_submsgs[17] = {
+static const upb_msglayout *const envoy_config_listener_v3_Listener_submsgs[14] = {
&envoy_config_accesslog_v3_AccessLog_msginit,
&envoy_config_core_v3_Address_msginit,
&envoy_config_core_v3_Metadata_msginit,
@@ -59,35 +58,38 @@ static const upb_msglayout *const envoy_config_listener_v3_Listener_submsgs[17]
&google_protobuf_UInt32Value_msginit,
};
-static const upb_msglayout_field envoy_config_listener_v3_Listener__fields[22] = {
- {1, UPB_SIZE(20, 24), 0, 0, 9, 1},
- {2, UPB_SIZE(28, 40), 0, 1, 11, 1},
- {3, UPB_SIZE(80, 144), 0, 6, 11, 3},
- {5, UPB_SIZE(32, 48), 0, 13, 11, 1},
- {6, UPB_SIZE(36, 56), 0, 2, 11, 1},
- {7, UPB_SIZE(40, 64), 0, 8, 11, 1},
- {8, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {9, UPB_SIZE(84, 152), 0, 9, 11, 3},
- {10, UPB_SIZE(44, 72), 0, 11, 11, 1},
- {11, UPB_SIZE(48, 80), 0, 11, 11, 1},
- {12, UPB_SIZE(52, 88), 0, 13, 11, 1},
- {13, UPB_SIZE(88, 160), 0, 3, 11, 3},
- {15, UPB_SIZE(56, 96), 0, 12, 11, 1},
+static const upb_msglayout_field envoy_config_listener_v3_Listener__fields[25] = {
+ {1, UPB_SIZE(16, 16), 0, 0, 9, 1},
+ {2, UPB_SIZE(24, 32), 1, 1, 11, 1},
+ {3, UPB_SIZE(88, 160), 0, 6, 11, 3},
+ {4, UPB_SIZE(28, 40), 2, 11, 11, 1},
+ {5, UPB_SIZE(32, 48), 3, 13, 11, 1},
+ {6, UPB_SIZE(36, 56), 4, 2, 11, 1},
+ {7, UPB_SIZE(40, 64), 5, 8, 11, 1},
+ {8, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {9, UPB_SIZE(92, 168), 0, 9, 11, 3},
+ {10, UPB_SIZE(44, 72), 6, 11, 11, 1},
+ {11, UPB_SIZE(48, 80), 7, 11, 11, 1},
+ {12, UPB_SIZE(52, 88), 8, 13, 11, 1},
+ {13, UPB_SIZE(96, 176), 0, 3, 11, 3},
+ {15, UPB_SIZE(56, 96), 9, 12, 11, 1},
{16, UPB_SIZE(8, 8), 0, 0, 14, 1},
- {17, UPB_SIZE(16, 16), 0, 0, 8, 1},
- {18, UPB_SIZE(60, 104), 0, 10, 11, 1},
- {19, UPB_SIZE(64, 112), 0, 5, 11, 1},
- {20, UPB_SIZE(68, 120), 0, 7, 11, 1},
- {21, UPB_SIZE(17, 17), 0, 0, 8, 1},
- {22, UPB_SIZE(92, 168), 0, 0, 11, 3},
- {23, UPB_SIZE(72, 128), 0, 4, 11, 1},
- {24, UPB_SIZE(76, 136), 0, 13, 11, 1},
+ {17, UPB_SIZE(12, 12), 0, 0, 8, 1},
+ {18, UPB_SIZE(60, 104), 10, 10, 11, 1},
+ {19, UPB_SIZE(64, 112), 11, 5, 11, 1},
+ {20, UPB_SIZE(68, 120), 12, 7, 11, 1},
+ {21, UPB_SIZE(13, 13), 0, 0, 8, 1},
+ {22, UPB_SIZE(100, 184), 0, 0, 11, 3},
+ {23, UPB_SIZE(72, 128), 13, 4, 11, 1},
+ {24, UPB_SIZE(76, 136), 14, 13, 11, 1},
+ {25, UPB_SIZE(80, 144), 15, 6, 11, 1},
+ {26, UPB_SIZE(84, 152), 16, 11, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_Listener_msginit = {
&envoy_config_listener_v3_Listener_submsgs[0],
&envoy_config_listener_v3_Listener__fields[0],
- UPB_SIZE(96, 176), 22, false,
+ UPB_SIZE(104, 192), 25, false, 255,
};
static const upb_msglayout *const envoy_config_listener_v3_Listener_DeprecatedV1_submsgs[1] = {
@@ -95,13 +97,13 @@ static const upb_msglayout *const envoy_config_listener_v3_Listener_DeprecatedV1
};
static const upb_msglayout_field envoy_config_listener_v3_Listener_DeprecatedV1__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_Listener_DeprecatedV1_msginit = {
&envoy_config_listener_v3_Listener_DeprecatedV1_submsgs[0],
&envoy_config_listener_v3_Listener_DeprecatedV1__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_listener_v3_Listener_ConnectionBalanceConfig_submsgs[1] = {
@@ -115,13 +117,13 @@ static const upb_msglayout_field envoy_config_listener_v3_Listener_ConnectionBal
const upb_msglayout envoy_config_listener_v3_Listener_ConnectionBalanceConfig_msginit = {
&envoy_config_listener_v3_Listener_ConnectionBalanceConfig_submsgs[0],
&envoy_config_listener_v3_Listener_ConnectionBalanceConfig__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
const upb_msglayout envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h
index 0bc3ca36990..1d133733cba 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -46,7 +47,7 @@ struct envoy_config_listener_v3_UdpListenerConfig;
struct google_protobuf_BoolValue;
struct google_protobuf_Duration;
struct google_protobuf_UInt32Value;
-struct udpa_core_v1_CollectionEntry;
+struct xds_core_v3_CollectionEntry;
extern const upb_msglayout envoy_config_accesslog_v3_AccessLog_msginit;
extern const upb_msglayout envoy_config_core_v3_Address_msginit;
extern const upb_msglayout envoy_config_core_v3_Metadata_msginit;
@@ -59,7 +60,7 @@ extern const upb_msglayout envoy_config_listener_v3_UdpListenerConfig_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
-extern const upb_msglayout udpa_core_v1_CollectionEntry_msginit;
+extern const upb_msglayout xds_core_v3_CollectionEntry_msginit;
typedef enum {
envoy_config_listener_v3_Listener_DEFAULT = 0,
@@ -77,23 +78,29 @@ UPB_INLINE envoy_config_listener_v3_ListenerCollection *envoy_config_listener_v3
envoy_config_listener_v3_ListenerCollection *ret = envoy_config_listener_v3_ListenerCollection_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerCollection_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_ListenerCollection *envoy_config_listener_v3_ListenerCollection_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_ListenerCollection *ret = envoy_config_listener_v3_ListenerCollection_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerCollection_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_ListenerCollection_serialize(const envoy_config_listener_v3_ListenerCollection *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_ListenerCollection_msginit, arena, len);
}
UPB_INLINE bool envoy_config_listener_v3_ListenerCollection_has_entries(const envoy_config_listener_v3_ListenerCollection *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct udpa_core_v1_CollectionEntry* const* envoy_config_listener_v3_ListenerCollection_entries(const envoy_config_listener_v3_ListenerCollection *msg, size_t *len) { return (const struct udpa_core_v1_CollectionEntry* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+UPB_INLINE const struct xds_core_v3_CollectionEntry* const* envoy_config_listener_v3_ListenerCollection_entries(const envoy_config_listener_v3_ListenerCollection *msg, size_t *len) { return (const struct xds_core_v3_CollectionEntry* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
-UPB_INLINE struct udpa_core_v1_CollectionEntry** envoy_config_listener_v3_ListenerCollection_mutable_entries(envoy_config_listener_v3_ListenerCollection *msg, size_t *len) {
- return (struct udpa_core_v1_CollectionEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+UPB_INLINE struct xds_core_v3_CollectionEntry** envoy_config_listener_v3_ListenerCollection_mutable_entries(envoy_config_listener_v3_ListenerCollection *msg, size_t *len) {
+ return (struct xds_core_v3_CollectionEntry**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
-UPB_INLINE struct udpa_core_v1_CollectionEntry** envoy_config_listener_v3_ListenerCollection_resize_entries(envoy_config_listener_v3_ListenerCollection *msg, size_t len, upb_arena *arena) {
- return (struct udpa_core_v1_CollectionEntry**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+UPB_INLINE struct xds_core_v3_CollectionEntry** envoy_config_listener_v3_ListenerCollection_resize_entries(envoy_config_listener_v3_ListenerCollection *msg, size_t len, upb_arena *arena) {
+ return (struct xds_core_v3_CollectionEntry**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
-UPB_INLINE struct udpa_core_v1_CollectionEntry* envoy_config_listener_v3_ListenerCollection_add_entries(envoy_config_listener_v3_ListenerCollection *msg, upb_arena *arena) {
- struct udpa_core_v1_CollectionEntry* sub = (struct udpa_core_v1_CollectionEntry*)_upb_msg_new(&udpa_core_v1_CollectionEntry_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+UPB_INLINE struct xds_core_v3_CollectionEntry* envoy_config_listener_v3_ListenerCollection_add_entries(envoy_config_listener_v3_ListenerCollection *msg, upb_arena *arena) {
+ struct xds_core_v3_CollectionEntry* sub = (struct xds_core_v3_CollectionEntry*)_upb_msg_new(&xds_core_v3_CollectionEntry_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -108,55 +115,68 @@ UPB_INLINE envoy_config_listener_v3_Listener *envoy_config_listener_v3_Listener_
envoy_config_listener_v3_Listener *ret = envoy_config_listener_v3_Listener_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_Listener *envoy_config_listener_v3_Listener_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_Listener *ret = envoy_config_listener_v3_Listener_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_Listener_serialize(const envoy_config_listener_v3_Listener *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_Listener_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_listener_v3_Listener_name(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_address(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 40)); }
-UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_listener_v3_Listener_address(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const struct envoy_config_core_v3_Address*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_filter_chains(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 144)); }
-UPB_INLINE const struct envoy_config_listener_v3_FilterChain* const* envoy_config_listener_v3_Listener_filter_chains(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_listener_v3_FilterChain* const*)_upb_array_accessor(msg, UPB_SIZE(80, 144), len); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_per_connection_buffer_limit_bytes(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 48)); }
+UPB_INLINE upb_strview envoy_config_listener_v3_Listener_name(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_address(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_listener_v3_Listener_address(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const struct envoy_config_core_v3_Address*); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_filter_chains(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 160)); }
+UPB_INLINE const struct envoy_config_listener_v3_FilterChain* const* envoy_config_listener_v3_Listener_filter_chains(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_listener_v3_FilterChain* const*)_upb_array_accessor(msg, UPB_SIZE(88, 160), len); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_use_original_dst(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_use_original_dst(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_per_connection_buffer_limit_bytes(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener_per_connection_buffer_limit_bytes(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_metadata(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 56)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_metadata(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_Listener_metadata(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_deprecated_v1(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 64)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_deprecated_v1(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE const envoy_config_listener_v3_Listener_DeprecatedV1* envoy_config_listener_v3_Listener_deprecated_v1(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 64), const envoy_config_listener_v3_Listener_DeprecatedV1*); }
-UPB_INLINE int32_t envoy_config_listener_v3_Listener_drain_type(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_listener_filters(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 152)); }
-UPB_INLINE const struct envoy_config_listener_v3_ListenerFilter* const* envoy_config_listener_v3_Listener_listener_filters(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_listener_v3_ListenerFilter* const*)_upb_array_accessor(msg, UPB_SIZE(84, 152), len); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_transparent(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 72)); }
+UPB_INLINE int32_t envoy_config_listener_v3_Listener_drain_type(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_listener_filters(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 168)); }
+UPB_INLINE const struct envoy_config_listener_v3_ListenerFilter* const* envoy_config_listener_v3_Listener_listener_filters(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_listener_v3_ListenerFilter* const*)_upb_array_accessor(msg, UPB_SIZE(92, 168), len); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_transparent(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_transparent(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_freebind(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 80)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_freebind(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_freebind(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 80), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_tcp_fast_open_queue_length(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 88)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_tcp_fast_open_queue_length(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener_tcp_fast_open_queue_length(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_socket_options(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 160)); }
-UPB_INLINE const struct envoy_config_core_v3_SocketOption* const* envoy_config_listener_v3_Listener_socket_options(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_core_v3_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(88, 160), len); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_listener_filters_timeout(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 96)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_socket_options(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 176)); }
+UPB_INLINE const struct envoy_config_core_v3_SocketOption* const* envoy_config_listener_v3_Listener_socket_options(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_core_v3_SocketOption* const*)_upb_array_accessor(msg, UPB_SIZE(96, 176), len); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_listener_filters_timeout(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 9); }
UPB_INLINE const struct google_protobuf_Duration* envoy_config_listener_v3_Listener_listener_filters_timeout(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 96), const struct google_protobuf_Duration*); }
UPB_INLINE int32_t envoy_config_listener_v3_Listener_traffic_direction(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_continue_on_listener_filters_timeout(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_udp_listener_config(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 104)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_continue_on_listener_filters_timeout(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_udp_listener_config(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 10); }
UPB_INLINE const struct envoy_config_listener_v3_UdpListenerConfig* envoy_config_listener_v3_Listener_udp_listener_config(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), const struct envoy_config_listener_v3_UdpListenerConfig*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_api_listener(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 112)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_api_listener(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 11); }
UPB_INLINE const struct envoy_config_listener_v3_ApiListener* envoy_config_listener_v3_Listener_api_listener(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 112), const struct envoy_config_listener_v3_ApiListener*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_connection_balance_config(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 120)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_connection_balance_config(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 12); }
UPB_INLINE const envoy_config_listener_v3_Listener_ConnectionBalanceConfig* envoy_config_listener_v3_Listener_connection_balance_config(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), const envoy_config_listener_v3_Listener_ConnectionBalanceConfig*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_reuse_port(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_access_log(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 168)); }
-UPB_INLINE const struct envoy_config_accesslog_v3_AccessLog* const* envoy_config_listener_v3_Listener_access_log(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_accesslog_v3_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(92, 168), len); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_udp_writer_config(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 128)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_reuse_port(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_access_log(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 184)); }
+UPB_INLINE const struct envoy_config_accesslog_v3_AccessLog* const* envoy_config_listener_v3_Listener_access_log(const envoy_config_listener_v3_Listener *msg, size_t *len) { return (const struct envoy_config_accesslog_v3_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(100, 184), len); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_udp_writer_config(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 13); }
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_listener_v3_Listener_udp_writer_config(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 128), const struct envoy_config_core_v3_TypedExtensionConfig*); }
-UPB_INLINE bool envoy_config_listener_v3_Listener_has_tcp_backlog_size(const envoy_config_listener_v3_Listener *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 136)); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_tcp_backlog_size(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 14); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener_tcp_backlog_size(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_default_filter_chain(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 15); }
+UPB_INLINE const struct envoy_config_listener_v3_FilterChain* envoy_config_listener_v3_Listener_default_filter_chain(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 144), const struct envoy_config_listener_v3_FilterChain*); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_has_bind_to_port(const envoy_config_listener_v3_Listener *msg) { return _upb_hasbit(msg, 16); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_bind_to_port(const envoy_config_listener_v3_Listener *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 152), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_listener_v3_Listener_set_name(envoy_config_listener_v3_Listener *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_address(envoy_config_listener_v3_Listener *msg, struct envoy_config_core_v3_Address* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 40), struct envoy_config_core_v3_Address*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 32), struct envoy_config_core_v3_Address*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_listener_v3_Listener_mutable_address(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_listener_v3_Listener_address(msg);
@@ -168,19 +188,33 @@ UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_listener_v3_Listene
return sub;
}
UPB_INLINE struct envoy_config_listener_v3_FilterChain** envoy_config_listener_v3_Listener_mutable_filter_chains(envoy_config_listener_v3_Listener *msg, size_t *len) {
- return (struct envoy_config_listener_v3_FilterChain**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 144), len);
+ return (struct envoy_config_listener_v3_FilterChain**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 160), len);
}
UPB_INLINE struct envoy_config_listener_v3_FilterChain** envoy_config_listener_v3_Listener_resize_filter_chains(envoy_config_listener_v3_Listener *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_listener_v3_FilterChain**)_upb_array_resize_accessor(msg, UPB_SIZE(80, 144), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_listener_v3_FilterChain**)_upb_array_resize_accessor2(msg, UPB_SIZE(88, 160), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_listener_v3_FilterChain* envoy_config_listener_v3_Listener_add_filter_chains(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
struct envoy_config_listener_v3_FilterChain* sub = (struct envoy_config_listener_v3_FilterChain*)_upb_msg_new(&envoy_config_listener_v3_FilterChain_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(80, 144), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(88, 160), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
+UPB_INLINE void envoy_config_listener_v3_Listener_set_use_original_dst(envoy_config_listener_v3_Listener *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 40), struct google_protobuf_BoolValue*) = value;
+}
+UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_mutable_use_original_dst(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
+ struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_listener_v3_Listener_use_original_dst(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_listener_v3_Listener_set_use_original_dst(msg, sub);
+ }
+ return sub;
+}
UPB_INLINE void envoy_config_listener_v3_Listener_set_per_connection_buffer_limit_bytes(envoy_config_listener_v3_Listener *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(32, 48), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener_mutable_per_connection_buffer_limit_bytes(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -193,6 +227,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_metadata(envoy_config_listener_v3_Listener *msg, struct envoy_config_core_v3_Metadata* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(36, 56), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_Listener_mutable_metadata(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -205,6 +240,7 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_Listen
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_deprecated_v1(envoy_config_listener_v3_Listener *msg, envoy_config_listener_v3_Listener_DeprecatedV1* value) {
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(40, 64), envoy_config_listener_v3_Listener_DeprecatedV1*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_Listener_DeprecatedV1* envoy_config_listener_v3_Listener_mutable_deprecated_v1(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -217,22 +253,23 @@ UPB_INLINE struct envoy_config_listener_v3_Listener_DeprecatedV1* envoy_config_l
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_drain_type(envoy_config_listener_v3_Listener *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE struct envoy_config_listener_v3_ListenerFilter** envoy_config_listener_v3_Listener_mutable_listener_filters(envoy_config_listener_v3_Listener *msg, size_t *len) {
- return (struct envoy_config_listener_v3_ListenerFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 152), len);
+ return (struct envoy_config_listener_v3_ListenerFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(92, 168), len);
}
UPB_INLINE struct envoy_config_listener_v3_ListenerFilter** envoy_config_listener_v3_Listener_resize_listener_filters(envoy_config_listener_v3_Listener *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_listener_v3_ListenerFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(84, 152), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_listener_v3_ListenerFilter**)_upb_array_resize_accessor2(msg, UPB_SIZE(92, 168), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_listener_v3_ListenerFilter* envoy_config_listener_v3_Listener_add_listener_filters(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
struct envoy_config_listener_v3_ListenerFilter* sub = (struct envoy_config_listener_v3_ListenerFilter*)_upb_msg_new(&envoy_config_listener_v3_ListenerFilter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(84, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(92, 168), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_transparent(envoy_config_listener_v3_Listener *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(44, 72), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_mutable_transparent(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -245,6 +282,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_m
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_freebind(envoy_config_listener_v3_Listener *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(48, 80), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_mutable_freebind(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -257,6 +295,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_m
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_tcp_fast_open_queue_length(envoy_config_listener_v3_Listener *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(52, 88), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener_mutable_tcp_fast_open_queue_length(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -269,19 +308,20 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener
return sub;
}
UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_listener_v3_Listener_mutable_socket_options(envoy_config_listener_v3_Listener *msg, size_t *len) {
- return (struct envoy_config_core_v3_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 160), len);
+ return (struct envoy_config_core_v3_SocketOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(96, 176), len);
}
UPB_INLINE struct envoy_config_core_v3_SocketOption** envoy_config_listener_v3_Listener_resize_socket_options(envoy_config_listener_v3_Listener *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_SocketOption**)_upb_array_resize_accessor(msg, UPB_SIZE(88, 160), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_SocketOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(96, 176), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_SocketOption* envoy_config_listener_v3_Listener_add_socket_options(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
struct envoy_config_core_v3_SocketOption* sub = (struct envoy_config_core_v3_SocketOption*)_upb_msg_new(&envoy_config_core_v3_SocketOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(88, 160), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(96, 176), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_listener_filters_timeout(envoy_config_listener_v3_Listener *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 9);
*UPB_PTR_AT(msg, UPB_SIZE(56, 96), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_listener_v3_Listener_mutable_listener_filters_timeout(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -297,9 +337,10 @@ UPB_INLINE void envoy_config_listener_v3_Listener_set_traffic_direction(envoy_co
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_continue_on_listener_filters_timeout(envoy_config_listener_v3_Listener *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_udp_listener_config(envoy_config_listener_v3_Listener *msg, struct envoy_config_listener_v3_UdpListenerConfig* value) {
+ _upb_sethas(msg, 10);
*UPB_PTR_AT(msg, UPB_SIZE(60, 104), struct envoy_config_listener_v3_UdpListenerConfig*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_UdpListenerConfig* envoy_config_listener_v3_Listener_mutable_udp_listener_config(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -312,6 +353,7 @@ UPB_INLINE struct envoy_config_listener_v3_UdpListenerConfig* envoy_config_liste
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_api_listener(envoy_config_listener_v3_Listener *msg, struct envoy_config_listener_v3_ApiListener* value) {
+ _upb_sethas(msg, 11);
*UPB_PTR_AT(msg, UPB_SIZE(64, 112), struct envoy_config_listener_v3_ApiListener*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_ApiListener* envoy_config_listener_v3_Listener_mutable_api_listener(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -324,6 +366,7 @@ UPB_INLINE struct envoy_config_listener_v3_ApiListener* envoy_config_listener_v3
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_connection_balance_config(envoy_config_listener_v3_Listener *msg, envoy_config_listener_v3_Listener_ConnectionBalanceConfig* value) {
+ _upb_sethas(msg, 12);
*UPB_PTR_AT(msg, UPB_SIZE(68, 120), envoy_config_listener_v3_Listener_ConnectionBalanceConfig*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_Listener_ConnectionBalanceConfig* envoy_config_listener_v3_Listener_mutable_connection_balance_config(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -336,22 +379,23 @@ UPB_INLINE struct envoy_config_listener_v3_Listener_ConnectionBalanceConfig* env
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_reuse_port(envoy_config_listener_v3_Listener *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_config_listener_v3_Listener_mutable_access_log(envoy_config_listener_v3_Listener *msg, size_t *len) {
- return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(92, 168), len);
+ return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 184), len);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_config_listener_v3_Listener_resize_access_log(envoy_config_listener_v3_Listener *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_resize_accessor(msg, UPB_SIZE(92, 168), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_resize_accessor2(msg, UPB_SIZE(100, 184), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog* envoy_config_listener_v3_Listener_add_access_log(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_AccessLog* sub = (struct envoy_config_accesslog_v3_AccessLog*)_upb_msg_new(&envoy_config_accesslog_v3_AccessLog_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(92, 168), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(100, 184), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_udp_writer_config(envoy_config_listener_v3_Listener *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
+ _upb_sethas(msg, 13);
*UPB_PTR_AT(msg, UPB_SIZE(72, 128), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_listener_v3_Listener_mutable_udp_writer_config(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -364,6 +408,7 @@ UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_listen
return sub;
}
UPB_INLINE void envoy_config_listener_v3_Listener_set_tcp_backlog_size(envoy_config_listener_v3_Listener *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 14);
*UPB_PTR_AT(msg, UPB_SIZE(76, 136), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener_mutable_tcp_backlog_size(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
@@ -375,6 +420,32 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_Listener
}
return sub;
}
+UPB_INLINE void envoy_config_listener_v3_Listener_set_default_filter_chain(envoy_config_listener_v3_Listener *msg, struct envoy_config_listener_v3_FilterChain* value) {
+ _upb_sethas(msg, 15);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 144), struct envoy_config_listener_v3_FilterChain*) = value;
+}
+UPB_INLINE struct envoy_config_listener_v3_FilterChain* envoy_config_listener_v3_Listener_mutable_default_filter_chain(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
+ struct envoy_config_listener_v3_FilterChain* sub = (struct envoy_config_listener_v3_FilterChain*)envoy_config_listener_v3_Listener_default_filter_chain(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_listener_v3_FilterChain*)_upb_msg_new(&envoy_config_listener_v3_FilterChain_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_listener_v3_Listener_set_default_filter_chain(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_listener_v3_Listener_set_bind_to_port(envoy_config_listener_v3_Listener *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 16);
+ *UPB_PTR_AT(msg, UPB_SIZE(84, 152), struct google_protobuf_BoolValue*) = value;
+}
+UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_mutable_bind_to_port(envoy_config_listener_v3_Listener *msg, upb_arena *arena) {
+ struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_listener_v3_Listener_bind_to_port(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_listener_v3_Listener_set_bind_to_port(msg, sub);
+ }
+ return sub;
+}
/* envoy.config.listener.v3.Listener.DeprecatedV1 */
@@ -386,15 +457,22 @@ UPB_INLINE envoy_config_listener_v3_Listener_DeprecatedV1 *envoy_config_listener
envoy_config_listener_v3_Listener_DeprecatedV1 *ret = envoy_config_listener_v3_Listener_DeprecatedV1_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_DeprecatedV1_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_Listener_DeprecatedV1 *envoy_config_listener_v3_Listener_DeprecatedV1_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_Listener_DeprecatedV1 *ret = envoy_config_listener_v3_Listener_DeprecatedV1_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_DeprecatedV1_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_Listener_DeprecatedV1_serialize(const envoy_config_listener_v3_Listener_DeprecatedV1 *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_Listener_DeprecatedV1_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_listener_v3_Listener_DeprecatedV1_has_bind_to_port(const envoy_config_listener_v3_Listener_DeprecatedV1 *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_DeprecatedV1_bind_to_port(const envoy_config_listener_v3_Listener_DeprecatedV1 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_listener_v3_Listener_DeprecatedV1_has_bind_to_port(const envoy_config_listener_v3_Listener_DeprecatedV1 *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_DeprecatedV1_bind_to_port(const envoy_config_listener_v3_Listener_DeprecatedV1 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_listener_v3_Listener_DeprecatedV1_set_bind_to_port(envoy_config_listener_v3_Listener_DeprecatedV1 *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_Listener_DeprecatedV1_mutable_bind_to_port(envoy_config_listener_v3_Listener_DeprecatedV1 *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_listener_v3_Listener_DeprecatedV1_bind_to_port(msg);
@@ -416,6 +494,12 @@ UPB_INLINE envoy_config_listener_v3_Listener_ConnectionBalanceConfig *envoy_conf
envoy_config_listener_v3_Listener_ConnectionBalanceConfig *ret = envoy_config_listener_v3_Listener_ConnectionBalanceConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_Listener_ConnectionBalanceConfig *envoy_config_listener_v3_Listener_ConnectionBalanceConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_Listener_ConnectionBalanceConfig *ret = envoy_config_listener_v3_Listener_ConnectionBalanceConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_Listener_ConnectionBalanceConfig_serialize(const envoy_config_listener_v3_Listener_ConnectionBalanceConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_msginit, arena, len);
}
@@ -452,6 +536,12 @@ UPB_INLINE envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalanc
envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance *ret = envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance *envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance *ret = envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_serialize(const envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c
index c303dabab3f..303b6ab7410 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c
@@ -11,10 +11,10 @@
#include "envoy/config/listener/v3/listener_components.upb.h"
#include "envoy/config/core/v3/address.upb.h"
#include "envoy/config/core/v3/base.upb.h"
+#include "envoy/config/core/v3/extension.upb.h"
#include "envoy/type/v3/range.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -22,22 +22,24 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_listener_v3_Filter_submsgs[1] = {
+static const upb_msglayout *const envoy_config_listener_v3_Filter_submsgs[2] = {
+ &envoy_config_core_v3_ExtensionConfigSource_msginit,
&google_protobuf_Any_msginit,
};
-static const upb_msglayout_field envoy_config_listener_v3_Filter__fields[2] = {
+static const upb_msglayout_field envoy_config_listener_v3_Filter__fields[3] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+ {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
+ {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_Filter_msginit = {
&envoy_config_listener_v3_Filter_submsgs[0],
&envoy_config_listener_v3_Filter__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
-static const upb_msglayout *const envoy_config_listener_v3_FilterChainMatch_submsgs[4] = {
+static const upb_msglayout *const envoy_config_listener_v3_FilterChainMatch_submsgs[2] = {
&envoy_config_core_v3_CidrRange_msginit,
&google_protobuf_UInt32Value_msginit,
};
@@ -45,45 +47,47 @@ static const upb_msglayout *const envoy_config_listener_v3_FilterChainMatch_subm
static const upb_msglayout_field envoy_config_listener_v3_FilterChainMatch__fields[10] = {
{3, UPB_SIZE(32, 56), 0, 0, 11, 3},
{4, UPB_SIZE(8, 8), 0, 0, 9, 1},
- {5, UPB_SIZE(24, 40), 0, 1, 11, 1},
+ {5, UPB_SIZE(24, 40), 1, 1, 11, 1},
{6, UPB_SIZE(36, 64), 0, 0, 11, 3},
{7, UPB_SIZE(40, 72), 0, 0, 13, _UPB_LABEL_PACKED},
- {8, UPB_SIZE(28, 48), 0, 1, 11, 1},
+ {8, UPB_SIZE(28, 48), 2, 1, 11, 1},
{9, UPB_SIZE(16, 24), 0, 0, 9, 1},
{10, UPB_SIZE(44, 80), 0, 0, 9, 3},
{11, UPB_SIZE(48, 88), 0, 0, 9, 3},
- {12, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {12, UPB_SIZE(4, 4), 0, 0, 14, 1},
};
const upb_msglayout envoy_config_listener_v3_FilterChainMatch_msginit = {
&envoy_config_listener_v3_FilterChainMatch_submsgs[0],
&envoy_config_listener_v3_FilterChainMatch__fields[0],
- UPB_SIZE(56, 96), 10, false,
+ UPB_SIZE(56, 96), 10, false, 255,
};
-static const upb_msglayout *const envoy_config_listener_v3_FilterChain_submsgs[6] = {
+static const upb_msglayout *const envoy_config_listener_v3_FilterChain_submsgs[7] = {
&envoy_config_core_v3_Metadata_msginit,
&envoy_config_core_v3_TransportSocket_msginit,
&envoy_config_listener_v3_Filter_msginit,
&envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit,
&envoy_config_listener_v3_FilterChainMatch_msginit,
&google_protobuf_BoolValue_msginit,
+ &google_protobuf_Duration_msginit,
};
-static const upb_msglayout_field envoy_config_listener_v3_FilterChain__fields[7] = {
- {1, UPB_SIZE(8, 16), 0, 4, 11, 1},
- {3, UPB_SIZE(28, 56), 0, 2, 11, 3},
- {4, UPB_SIZE(12, 24), 0, 5, 11, 1},
- {5, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {6, UPB_SIZE(20, 40), 0, 1, 11, 1},
- {7, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {8, UPB_SIZE(24, 48), 0, 3, 11, 1},
+static const upb_msglayout_field envoy_config_listener_v3_FilterChain__fields[8] = {
+ {1, UPB_SIZE(12, 24), 1, 4, 11, 1},
+ {3, UPB_SIZE(36, 72), 0, 2, 11, 3},
+ {4, UPB_SIZE(16, 32), 2, 5, 11, 1},
+ {5, UPB_SIZE(20, 40), 3, 0, 11, 1},
+ {6, UPB_SIZE(24, 48), 4, 1, 11, 1},
+ {7, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {8, UPB_SIZE(28, 56), 5, 3, 11, 1},
+ {9, UPB_SIZE(32, 64), 6, 6, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_FilterChain_msginit = {
&envoy_config_listener_v3_FilterChain_submsgs[0],
&envoy_config_listener_v3_FilterChain__fields[0],
- UPB_SIZE(32, 64), 7, false,
+ UPB_SIZE(40, 80), 8, false, 255,
};
static const upb_msglayout *const envoy_config_listener_v3_FilterChain_OnDemandConfiguration_submsgs[1] = {
@@ -91,16 +95,16 @@ static const upb_msglayout *const envoy_config_listener_v3_FilterChain_OnDemandC
};
static const upb_msglayout_field envoy_config_listener_v3_FilterChain_OnDemandConfiguration__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit = {
&envoy_config_listener_v3_FilterChain_OnDemandConfiguration_submsgs[0],
&envoy_config_listener_v3_FilterChain_OnDemandConfiguration__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
-static const upb_msglayout *const envoy_config_listener_v3_ListenerFilterChainMatchPredicate_submsgs[4] = {
+static const upb_msglayout *const envoy_config_listener_v3_ListenerFilterChainMatchPredicate_submsgs[3] = {
&envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit,
&envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit,
&envoy_type_v3_Int32Range_msginit,
@@ -117,7 +121,7 @@ static const upb_msglayout_field envoy_config_listener_v3_ListenerFilterChainMat
const upb_msglayout envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit = {
&envoy_config_listener_v3_ListenerFilterChainMatchPredicate_submsgs[0],
&envoy_config_listener_v3_ListenerFilterChainMatchPredicate__fields[0],
- UPB_SIZE(8, 16), 5, false,
+ UPB_SIZE(8, 16), 5, false, 255,
};
static const upb_msglayout *const envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_submsgs[1] = {
@@ -131,7 +135,7 @@ static const upb_msglayout_field envoy_config_listener_v3_ListenerFilterChainMat
const upb_msglayout envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit = {
&envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_submsgs[0],
&envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_listener_v3_ListenerFilter_submsgs[2] = {
@@ -140,15 +144,15 @@ static const upb_msglayout *const envoy_config_listener_v3_ListenerFilter_submsg
};
static const upb_msglayout_field envoy_config_listener_v3_ListenerFilter__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1},
- {4, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1},
+ {4, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_listener_v3_ListenerFilter_msginit = {
&envoy_config_listener_v3_ListenerFilter_submsgs[0],
&envoy_config_listener_v3_ListenerFilter__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h
index 626f53c3192..b8ef3826e3c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -41,6 +42,7 @@ extern const upb_msglayout envoy_config_listener_v3_ListenerFilterChainMatchPred
extern const upb_msglayout envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit;
extern const upb_msglayout envoy_config_listener_v3_ListenerFilter_msginit;
struct envoy_config_core_v3_CidrRange;
+struct envoy_config_core_v3_ExtensionConfigSource;
struct envoy_config_core_v3_Metadata;
struct envoy_config_core_v3_TransportSocket;
struct envoy_type_v3_Int32Range;
@@ -49,6 +51,7 @@ struct google_protobuf_BoolValue;
struct google_protobuf_Duration;
struct google_protobuf_UInt32Value;
extern const upb_msglayout envoy_config_core_v3_CidrRange_msginit;
+extern const upb_msglayout envoy_config_core_v3_ExtensionConfigSource_msginit;
extern const upb_msglayout envoy_config_core_v3_Metadata_msginit;
extern const upb_msglayout envoy_config_core_v3_TransportSocket_msginit;
extern const upb_msglayout envoy_type_v3_Int32Range_msginit;
@@ -74,12 +77,19 @@ UPB_INLINE envoy_config_listener_v3_Filter *envoy_config_listener_v3_Filter_pars
envoy_config_listener_v3_Filter *ret = envoy_config_listener_v3_Filter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_Filter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_Filter *envoy_config_listener_v3_Filter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_Filter *ret = envoy_config_listener_v3_Filter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_Filter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_Filter_serialize(const envoy_config_listener_v3_Filter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_Filter_msginit, arena, len);
}
typedef enum {
envoy_config_listener_v3_Filter_config_type_typed_config = 4,
+ envoy_config_listener_v3_Filter_config_type_config_discovery = 5,
envoy_config_listener_v3_Filter_config_type_NOT_SET = 0
} envoy_config_listener_v3_Filter_config_type_oneofcases;
UPB_INLINE envoy_config_listener_v3_Filter_config_type_oneofcases envoy_config_listener_v3_Filter_config_type_case(const envoy_config_listener_v3_Filter* msg) { return (envoy_config_listener_v3_Filter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
@@ -87,6 +97,8 @@ UPB_INLINE envoy_config_listener_v3_Filter_config_type_oneofcases envoy_config_l
UPB_INLINE upb_strview envoy_config_listener_v3_Filter_name(const envoy_config_listener_v3_Filter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
UPB_INLINE bool envoy_config_listener_v3_Filter_has_typed_config(const envoy_config_listener_v3_Filter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; }
UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_Filter_typed_config(const envoy_config_listener_v3_Filter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
+UPB_INLINE bool envoy_config_listener_v3_Filter_has_config_discovery(const envoy_config_listener_v3_Filter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; }
+UPB_INLINE const struct envoy_config_core_v3_ExtensionConfigSource* envoy_config_listener_v3_Filter_config_discovery(const envoy_config_listener_v3_Filter *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_ExtensionConfigSource*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); }
UPB_INLINE void envoy_config_listener_v3_Filter_set_name(envoy_config_listener_v3_Filter *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
@@ -103,6 +115,18 @@ UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v3_Filter_mutable_t
}
return sub;
}
+UPB_INLINE void envoy_config_listener_v3_Filter_set_config_discovery(envoy_config_listener_v3_Filter *msg, struct envoy_config_core_v3_ExtensionConfigSource* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_ExtensionConfigSource*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
+}
+UPB_INLINE struct envoy_config_core_v3_ExtensionConfigSource* envoy_config_listener_v3_Filter_mutable_config_discovery(envoy_config_listener_v3_Filter *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ExtensionConfigSource* sub = (struct envoy_config_core_v3_ExtensionConfigSource*)envoy_config_listener_v3_Filter_config_discovery(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ExtensionConfigSource*)_upb_msg_new(&envoy_config_core_v3_ExtensionConfigSource_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_listener_v3_Filter_set_config_discovery(msg, sub);
+ }
+ return sub;
+}
/* envoy.config.listener.v3.FilterChainMatch */
@@ -114,6 +138,12 @@ UPB_INLINE envoy_config_listener_v3_FilterChainMatch *envoy_config_listener_v3_F
envoy_config_listener_v3_FilterChainMatch *ret = envoy_config_listener_v3_FilterChainMatch_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_FilterChainMatch_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_FilterChainMatch *envoy_config_listener_v3_FilterChainMatch_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_FilterChainMatch *ret = envoy_config_listener_v3_FilterChainMatch_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_FilterChainMatch_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_FilterChainMatch_serialize(const envoy_config_listener_v3_FilterChainMatch *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_FilterChainMatch_msginit, arena, len);
}
@@ -121,28 +151,28 @@ UPB_INLINE char *envoy_config_listener_v3_FilterChainMatch_serialize(const envoy
UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_has_prefix_ranges(const envoy_config_listener_v3_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
UPB_INLINE const struct envoy_config_core_v3_CidrRange* const* envoy_config_listener_v3_FilterChainMatch_prefix_ranges(const envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) { return (const struct envoy_config_core_v3_CidrRange* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); }
UPB_INLINE upb_strview envoy_config_listener_v3_FilterChainMatch_address_suffix(const envoy_config_listener_v3_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_has_suffix_len(const envoy_config_listener_v3_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_has_suffix_len(const envoy_config_listener_v3_FilterChainMatch *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_listener_v3_FilterChainMatch_suffix_len(const envoy_config_listener_v3_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_UInt32Value*); }
UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_has_source_prefix_ranges(const envoy_config_listener_v3_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
UPB_INLINE const struct envoy_config_core_v3_CidrRange* const* envoy_config_listener_v3_FilterChainMatch_source_prefix_ranges(const envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) { return (const struct envoy_config_core_v3_CidrRange* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
UPB_INLINE uint32_t const* envoy_config_listener_v3_FilterChainMatch_source_ports(const envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_has_destination_port(const envoy_config_listener_v3_FilterChainMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_has_destination_port(const envoy_config_listener_v3_FilterChainMatch *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_listener_v3_FilterChainMatch_destination_port(const envoy_config_listener_v3_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_UInt32Value*); }
UPB_INLINE upb_strview envoy_config_listener_v3_FilterChainMatch_transport_protocol(const envoy_config_listener_v3_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
UPB_INLINE upb_strview const* envoy_config_listener_v3_FilterChainMatch_application_protocols(const envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
UPB_INLINE upb_strview const* envoy_config_listener_v3_FilterChainMatch_server_names(const envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); }
-UPB_INLINE int32_t envoy_config_listener_v3_FilterChainMatch_source_type(const envoy_config_listener_v3_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t envoy_config_listener_v3_FilterChainMatch_source_type(const envoy_config_listener_v3_FilterChainMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE struct envoy_config_core_v3_CidrRange** envoy_config_listener_v3_FilterChainMatch_mutable_prefix_ranges(envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) {
return (struct envoy_config_core_v3_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
}
UPB_INLINE struct envoy_config_core_v3_CidrRange** envoy_config_listener_v3_FilterChainMatch_resize_prefix_ranges(envoy_config_listener_v3_FilterChainMatch *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_CidrRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_CidrRange* envoy_config_listener_v3_FilterChainMatch_add_prefix_ranges(envoy_config_listener_v3_FilterChainMatch *msg, upb_arena *arena) {
struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -150,6 +180,7 @@ UPB_INLINE void envoy_config_listener_v3_FilterChainMatch_set_address_suffix(env
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_listener_v3_FilterChainMatch_set_suffix_len(envoy_config_listener_v3_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_FilterChainMatch_mutable_suffix_len(envoy_config_listener_v3_FilterChainMatch *msg, upb_arena *arena) {
@@ -165,12 +196,12 @@ UPB_INLINE struct envoy_config_core_v3_CidrRange** envoy_config_listener_v3_Filt
return (struct envoy_config_core_v3_CidrRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
}
UPB_INLINE struct envoy_config_core_v3_CidrRange** envoy_config_listener_v3_FilterChainMatch_resize_source_prefix_ranges(envoy_config_listener_v3_FilterChainMatch *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_CidrRange**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_CidrRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_CidrRange* envoy_config_listener_v3_FilterChainMatch_add_source_prefix_ranges(envoy_config_listener_v3_FilterChainMatch *msg, upb_arena *arena) {
struct envoy_config_core_v3_CidrRange* sub = (struct envoy_config_core_v3_CidrRange*)_upb_msg_new(&envoy_config_core_v3_CidrRange_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -178,13 +209,14 @@ UPB_INLINE uint32_t* envoy_config_listener_v3_FilterChainMatch_mutable_source_po
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
}
UPB_INLINE uint32_t* envoy_config_listener_v3_FilterChainMatch_resize_source_ports(envoy_config_listener_v3_FilterChainMatch *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 72), len, 2, arena);
}
UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_add_source_ports(envoy_config_listener_v3_FilterChainMatch *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(40, 72), 2, &val,
arena);
}
UPB_INLINE void envoy_config_listener_v3_FilterChainMatch_set_destination_port(envoy_config_listener_v3_FilterChainMatch *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_listener_v3_FilterChainMatch_mutable_destination_port(envoy_config_listener_v3_FilterChainMatch *msg, upb_arena *arena) {
@@ -203,24 +235,24 @@ UPB_INLINE upb_strview* envoy_config_listener_v3_FilterChainMatch_mutable_applic
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
}
UPB_INLINE upb_strview* envoy_config_listener_v3_FilterChainMatch_resize_application_protocols(envoy_config_listener_v3_FilterChainMatch *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 80), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_add_application_protocols(envoy_config_listener_v3_FilterChainMatch *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(44, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(44, 80), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_config_listener_v3_FilterChainMatch_mutable_server_names(envoy_config_listener_v3_FilterChainMatch *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len);
}
UPB_INLINE upb_strview* envoy_config_listener_v3_FilterChainMatch_resize_server_names(envoy_config_listener_v3_FilterChainMatch *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 88), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_listener_v3_FilterChainMatch_add_server_names(envoy_config_listener_v3_FilterChainMatch *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 88), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_config_listener_v3_FilterChainMatch_set_source_type(envoy_config_listener_v3_FilterChainMatch *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
/* envoy.config.listener.v3.FilterChain */
@@ -233,26 +265,35 @@ UPB_INLINE envoy_config_listener_v3_FilterChain *envoy_config_listener_v3_Filter
envoy_config_listener_v3_FilterChain *ret = envoy_config_listener_v3_FilterChain_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_FilterChain_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_FilterChain *envoy_config_listener_v3_FilterChain_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_FilterChain *ret = envoy_config_listener_v3_FilterChain_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_FilterChain_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_FilterChain_serialize(const envoy_config_listener_v3_FilterChain *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_FilterChain_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_filter_chain_match(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_listener_v3_FilterChainMatch* envoy_config_listener_v3_FilterChain_filter_chain_match(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_listener_v3_FilterChainMatch*); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_filters(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const envoy_config_listener_v3_Filter* const* envoy_config_listener_v3_FilterChain_filters(const envoy_config_listener_v3_FilterChain *msg, size_t *len) { return (const envoy_config_listener_v3_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_use_proxy_proto(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_FilterChain_use_proxy_proto(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_metadata(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_FilterChain_metadata(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_transport_socket(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct envoy_config_core_v3_TransportSocket* envoy_config_listener_v3_FilterChain_transport_socket(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_core_v3_TransportSocket*); }
-UPB_INLINE upb_strview envoy_config_listener_v3_FilterChain_name(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_on_demand_configuration(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const envoy_config_listener_v3_FilterChain_OnDemandConfiguration* envoy_config_listener_v3_FilterChain_on_demand_configuration(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const envoy_config_listener_v3_FilterChain_OnDemandConfiguration*); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_filter_chain_match(const envoy_config_listener_v3_FilterChain *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_listener_v3_FilterChainMatch* envoy_config_listener_v3_FilterChain_filter_chain_match(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_listener_v3_FilterChainMatch*); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_filters(const envoy_config_listener_v3_FilterChain *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE const envoy_config_listener_v3_Filter* const* envoy_config_listener_v3_FilterChain_filters(const envoy_config_listener_v3_FilterChain *msg, size_t *len) { return (const envoy_config_listener_v3_Filter* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_use_proxy_proto(const envoy_config_listener_v3_FilterChain *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_listener_v3_FilterChain_use_proxy_proto(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_metadata(const envoy_config_listener_v3_FilterChain *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_FilterChain_metadata(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_core_v3_Metadata*); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_transport_socket(const envoy_config_listener_v3_FilterChain *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_config_core_v3_TransportSocket* envoy_config_listener_v3_FilterChain_transport_socket(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_config_core_v3_TransportSocket*); }
+UPB_INLINE upb_strview envoy_config_listener_v3_FilterChain_name(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_on_demand_configuration(const envoy_config_listener_v3_FilterChain *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const envoy_config_listener_v3_FilterChain_OnDemandConfiguration* envoy_config_listener_v3_FilterChain_on_demand_configuration(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const envoy_config_listener_v3_FilterChain_OnDemandConfiguration*); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_has_transport_socket_connect_timeout(const envoy_config_listener_v3_FilterChain *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_listener_v3_FilterChain_transport_socket_connect_timeout(const envoy_config_listener_v3_FilterChain *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_listener_v3_FilterChain_set_filter_chain_match(envoy_config_listener_v3_FilterChain *msg, envoy_config_listener_v3_FilterChainMatch* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_listener_v3_FilterChainMatch*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_listener_v3_FilterChainMatch*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_FilterChainMatch* envoy_config_listener_v3_FilterChain_mutable_filter_chain_match(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
struct envoy_config_listener_v3_FilterChainMatch* sub = (struct envoy_config_listener_v3_FilterChainMatch*)envoy_config_listener_v3_FilterChain_filter_chain_match(msg);
@@ -264,20 +305,21 @@ UPB_INLINE struct envoy_config_listener_v3_FilterChainMatch* envoy_config_listen
return sub;
}
UPB_INLINE envoy_config_listener_v3_Filter** envoy_config_listener_v3_FilterChain_mutable_filters(envoy_config_listener_v3_FilterChain *msg, size_t *len) {
- return (envoy_config_listener_v3_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+ return (envoy_config_listener_v3_Filter**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE envoy_config_listener_v3_Filter** envoy_config_listener_v3_FilterChain_resize_filters(envoy_config_listener_v3_FilterChain *msg, size_t len, upb_arena *arena) {
- return (envoy_config_listener_v3_Filter**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_listener_v3_Filter**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_listener_v3_Filter* envoy_config_listener_v3_FilterChain_add_filters(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
struct envoy_config_listener_v3_Filter* sub = (struct envoy_config_listener_v3_Filter*)_upb_msg_new(&envoy_config_listener_v3_Filter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_listener_v3_FilterChain_set_use_proxy_proto(envoy_config_listener_v3_FilterChain *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_FilterChain_mutable_use_proxy_proto(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_listener_v3_FilterChain_use_proxy_proto(msg);
@@ -289,7 +331,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_listener_v3_FilterChai
return sub;
}
UPB_INLINE void envoy_config_listener_v3_FilterChain_set_metadata(envoy_config_listener_v3_FilterChain *msg, struct envoy_config_core_v3_Metadata* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_Metadata*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_FilterChain_mutable_metadata(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
struct envoy_config_core_v3_Metadata* sub = (struct envoy_config_core_v3_Metadata*)envoy_config_listener_v3_FilterChain_metadata(msg);
@@ -301,7 +344,8 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_listener_v3_Filter
return sub;
}
UPB_INLINE void envoy_config_listener_v3_FilterChain_set_transport_socket(envoy_config_listener_v3_FilterChain *msg, struct envoy_config_core_v3_TransportSocket* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_core_v3_TransportSocket*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_config_core_v3_TransportSocket*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TransportSocket* envoy_config_listener_v3_FilterChain_mutable_transport_socket(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
struct envoy_config_core_v3_TransportSocket* sub = (struct envoy_config_core_v3_TransportSocket*)envoy_config_listener_v3_FilterChain_transport_socket(msg);
@@ -313,10 +357,11 @@ UPB_INLINE struct envoy_config_core_v3_TransportSocket* envoy_config_listener_v3
return sub;
}
UPB_INLINE void envoy_config_listener_v3_FilterChain_set_name(envoy_config_listener_v3_FilterChain *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_listener_v3_FilterChain_set_on_demand_configuration(envoy_config_listener_v3_FilterChain *msg, envoy_config_listener_v3_FilterChain_OnDemandConfiguration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), envoy_config_listener_v3_FilterChain_OnDemandConfiguration*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), envoy_config_listener_v3_FilterChain_OnDemandConfiguration*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_FilterChain_OnDemandConfiguration* envoy_config_listener_v3_FilterChain_mutable_on_demand_configuration(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
struct envoy_config_listener_v3_FilterChain_OnDemandConfiguration* sub = (struct envoy_config_listener_v3_FilterChain_OnDemandConfiguration*)envoy_config_listener_v3_FilterChain_on_demand_configuration(msg);
@@ -327,6 +372,19 @@ UPB_INLINE struct envoy_config_listener_v3_FilterChain_OnDemandConfiguration* en
}
return sub;
}
+UPB_INLINE void envoy_config_listener_v3_FilterChain_set_transport_socket_connect_timeout(envoy_config_listener_v3_FilterChain *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_listener_v3_FilterChain_mutable_transport_socket_connect_timeout(envoy_config_listener_v3_FilterChain *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_listener_v3_FilterChain_transport_socket_connect_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_listener_v3_FilterChain_set_transport_socket_connect_timeout(msg, sub);
+ }
+ return sub;
+}
/* envoy.config.listener.v3.FilterChain.OnDemandConfiguration */
@@ -338,15 +396,22 @@ UPB_INLINE envoy_config_listener_v3_FilterChain_OnDemandConfiguration *envoy_con
envoy_config_listener_v3_FilterChain_OnDemandConfiguration *ret = envoy_config_listener_v3_FilterChain_OnDemandConfiguration_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_FilterChain_OnDemandConfiguration *envoy_config_listener_v3_FilterChain_OnDemandConfiguration_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_FilterChain_OnDemandConfiguration *ret = envoy_config_listener_v3_FilterChain_OnDemandConfiguration_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_FilterChain_OnDemandConfiguration_serialize(const envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_listener_v3_FilterChain_OnDemandConfiguration_has_rebuild_timeout(const envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_listener_v3_FilterChain_OnDemandConfiguration_rebuild_timeout(const envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_listener_v3_FilterChain_OnDemandConfiguration_has_rebuild_timeout(const envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_listener_v3_FilterChain_OnDemandConfiguration_rebuild_timeout(const envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_listener_v3_FilterChain_OnDemandConfiguration_set_rebuild_timeout(envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_listener_v3_FilterChain_OnDemandConfiguration_mutable_rebuild_timeout(envoy_config_listener_v3_FilterChain_OnDemandConfiguration *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_listener_v3_FilterChain_OnDemandConfiguration_rebuild_timeout(msg);
@@ -368,6 +433,12 @@ UPB_INLINE envoy_config_listener_v3_ListenerFilterChainMatchPredicate *envoy_con
envoy_config_listener_v3_ListenerFilterChainMatchPredicate *ret = envoy_config_listener_v3_ListenerFilterChainMatchPredicate_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_ListenerFilterChainMatchPredicate *envoy_config_listener_v3_ListenerFilterChainMatchPredicate_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_ListenerFilterChainMatchPredicate *ret = envoy_config_listener_v3_ListenerFilterChainMatchPredicate_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_ListenerFilterChainMatchPredicate_serialize(const envoy_config_listener_v3_ListenerFilterChainMatchPredicate *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit, arena, len);
}
@@ -455,6 +526,12 @@ UPB_INLINE envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *
envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *ret = envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *ret = envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_serialize(const envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit, arena, len);
}
@@ -466,12 +543,12 @@ UPB_INLINE envoy_config_listener_v3_ListenerFilterChainMatchPredicate** envoy_co
return (envoy_config_listener_v3_ListenerFilterChainMatchPredicate**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_listener_v3_ListenerFilterChainMatchPredicate** envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_resize_rules(envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *msg, size_t len, upb_arena *arena) {
- return (envoy_config_listener_v3_ListenerFilterChainMatchPredicate**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_listener_v3_ListenerFilterChainMatchPredicate**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_listener_v3_ListenerFilterChainMatchPredicate* envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_add_rules(envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet *msg, upb_arena *arena) {
struct envoy_config_listener_v3_ListenerFilterChainMatchPredicate* sub = (struct envoy_config_listener_v3_ListenerFilterChainMatchPredicate*)_upb_msg_new(&envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -486,6 +563,12 @@ UPB_INLINE envoy_config_listener_v3_ListenerFilter *envoy_config_listener_v3_Lis
envoy_config_listener_v3_ListenerFilter *ret = envoy_config_listener_v3_ListenerFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_ListenerFilter *envoy_config_listener_v3_ListenerFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_ListenerFilter *ret = envoy_config_listener_v3_ListenerFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ListenerFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_ListenerFilter_serialize(const envoy_config_listener_v3_ListenerFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_ListenerFilter_msginit, arena, len);
}
@@ -494,19 +577,19 @@ typedef enum {
envoy_config_listener_v3_ListenerFilter_config_type_typed_config = 3,
envoy_config_listener_v3_ListenerFilter_config_type_NOT_SET = 0
} envoy_config_listener_v3_ListenerFilter_config_type_oneofcases;
-UPB_INLINE envoy_config_listener_v3_ListenerFilter_config_type_oneofcases envoy_config_listener_v3_ListenerFilter_config_type_case(const envoy_config_listener_v3_ListenerFilter* msg) { return (envoy_config_listener_v3_ListenerFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); }
+UPB_INLINE envoy_config_listener_v3_ListenerFilter_config_type_oneofcases envoy_config_listener_v3_ListenerFilter_config_type_case(const envoy_config_listener_v3_ListenerFilter* msg) { return (envoy_config_listener_v3_ListenerFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
-UPB_INLINE upb_strview envoy_config_listener_v3_ListenerFilter_name(const envoy_config_listener_v3_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_listener_v3_ListenerFilter_has_typed_config(const envoy_config_listener_v3_ListenerFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 3; }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_ListenerFilter_typed_config(const envoy_config_listener_v3_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 3, NULL); }
-UPB_INLINE bool envoy_config_listener_v3_ListenerFilter_has_filter_disabled(const envoy_config_listener_v3_ListenerFilter *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_listener_v3_ListenerFilterChainMatchPredicate* envoy_config_listener_v3_ListenerFilter_filter_disabled(const envoy_config_listener_v3_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_listener_v3_ListenerFilterChainMatchPredicate*); }
+UPB_INLINE upb_strview envoy_config_listener_v3_ListenerFilter_name(const envoy_config_listener_v3_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_listener_v3_ListenerFilter_has_typed_config(const envoy_config_listener_v3_ListenerFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 3; }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_listener_v3_ListenerFilter_typed_config(const envoy_config_listener_v3_ListenerFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 3, NULL); }
+UPB_INLINE bool envoy_config_listener_v3_ListenerFilter_has_filter_disabled(const envoy_config_listener_v3_ListenerFilter *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_listener_v3_ListenerFilterChainMatchPredicate* envoy_config_listener_v3_ListenerFilter_filter_disabled(const envoy_config_listener_v3_ListenerFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_listener_v3_ListenerFilterChainMatchPredicate*); }
UPB_INLINE void envoy_config_listener_v3_ListenerFilter_set_name(envoy_config_listener_v3_ListenerFilter *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_listener_v3_ListenerFilter_set_typed_config(envoy_config_listener_v3_ListenerFilter *msg, struct google_protobuf_Any* value) {
- UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 3);
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 3);
}
UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v3_ListenerFilter_mutable_typed_config(envoy_config_listener_v3_ListenerFilter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_listener_v3_ListenerFilter_typed_config(msg);
@@ -518,7 +601,8 @@ UPB_INLINE struct google_protobuf_Any* envoy_config_listener_v3_ListenerFilter_m
return sub;
}
UPB_INLINE void envoy_config_listener_v3_ListenerFilter_set_filter_disabled(envoy_config_listener_v3_ListenerFilter *msg, envoy_config_listener_v3_ListenerFilterChainMatchPredicate* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_listener_v3_ListenerFilterChainMatchPredicate*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_listener_v3_ListenerFilterChainMatchPredicate*) = value;
}
UPB_INLINE struct envoy_config_listener_v3_ListenerFilterChainMatchPredicate* envoy_config_listener_v3_ListenerFilter_mutable_filter_disabled(envoy_config_listener_v3_ListenerFilter *msg, upb_arena *arena) {
struct envoy_config_listener_v3_ListenerFilterChainMatchPredicate* sub = (struct envoy_config_listener_v3_ListenerFilterChainMatchPredicate*)envoy_config_listener_v3_ListenerFilter_filter_disabled(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c
index 67a5dded23a..34696f6c0a4 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c
@@ -10,7 +10,6 @@
#include "upb/msg.h"
#include "envoy/config/listener/v3/udp_listener_config.upb.h"
#include "google/protobuf/any.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -28,13 +27,13 @@ static const upb_msglayout_field envoy_config_listener_v3_UdpListenerConfig__fie
const upb_msglayout envoy_config_listener_v3_UdpListenerConfig_msginit = {
&envoy_config_listener_v3_UdpListenerConfig_submsgs[0],
&envoy_config_listener_v3_UdpListenerConfig__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
const upb_msglayout envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h
index e7fe65a5e26..3de7e08d3b5 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -39,6 +40,12 @@ UPB_INLINE envoy_config_listener_v3_UdpListenerConfig *envoy_config_listener_v3_
envoy_config_listener_v3_UdpListenerConfig *ret = envoy_config_listener_v3_UdpListenerConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_UdpListenerConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_UdpListenerConfig *envoy_config_listener_v3_UdpListenerConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_UdpListenerConfig *ret = envoy_config_listener_v3_UdpListenerConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_UdpListenerConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_UdpListenerConfig_serialize(const envoy_config_listener_v3_UdpListenerConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_UdpListenerConfig_msginit, arena, len);
}
@@ -79,6 +86,12 @@ UPB_INLINE envoy_config_listener_v3_ActiveRawUdpListenerConfig *envoy_config_lis
envoy_config_listener_v3_ActiveRawUdpListenerConfig *ret = envoy_config_listener_v3_ActiveRawUdpListenerConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_listener_v3_ActiveRawUdpListenerConfig *envoy_config_listener_v3_ActiveRawUdpListenerConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_listener_v3_ActiveRawUdpListenerConfig *ret = envoy_config_listener_v3_ActiveRawUdpListenerConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_listener_v3_ActiveRawUdpListenerConfig_serialize(const envoy_config_listener_v3_ActiveRawUdpListenerConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c
new file mode 100644
index 00000000000..26d00f14ea8
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c
@@ -0,0 +1,144 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/metrics/v3/stats.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/config/metrics/v3/stats.upb.h"
+#include "envoy/config/core/v3/address.upb.h"
+#include "envoy/type/matcher/v3/string.upb.h"
+#include "google/protobuf/any.upb.h"
+#include "google/protobuf/wrappers.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_config_metrics_v3_StatsSink_submsgs[1] = {
+ &google_protobuf_Any_msginit,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_StatsSink__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_metrics_v3_StatsSink_msginit = {
+ &envoy_config_metrics_v3_StatsSink_submsgs[0],
+ &envoy_config_metrics_v3_StatsSink__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_metrics_v3_StatsConfig_submsgs[4] = {
+ &envoy_config_metrics_v3_HistogramBucketSettings_msginit,
+ &envoy_config_metrics_v3_StatsMatcher_msginit,
+ &envoy_config_metrics_v3_TagSpecifier_msginit,
+ &google_protobuf_BoolValue_msginit,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_StatsConfig__fields[4] = {
+ {1, UPB_SIZE(12, 24), 0, 2, 11, 3},
+ {2, UPB_SIZE(4, 8), 1, 3, 11, 1},
+ {3, UPB_SIZE(8, 16), 2, 1, 11, 1},
+ {4, UPB_SIZE(16, 32), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_config_metrics_v3_StatsConfig_msginit = {
+ &envoy_config_metrics_v3_StatsConfig_submsgs[0],
+ &envoy_config_metrics_v3_StatsConfig__fields[0],
+ UPB_SIZE(24, 40), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_metrics_v3_StatsMatcher_submsgs[1] = {
+ &envoy_type_matcher_v3_ListStringMatcher_msginit,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_StatsMatcher__fields[3] = {
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 8, 1},
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
+ {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_metrics_v3_StatsMatcher_msginit = {
+ &envoy_config_metrics_v3_StatsMatcher_submsgs[0],
+ &envoy_config_metrics_v3_StatsMatcher__fields[0],
+ UPB_SIZE(8, 16), 3, false, 255,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_TagSpecifier__fields[3] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), UPB_SIZE(-17, -33), 0, 9, 1},
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-17, -33), 0, 9, 1},
+};
+
+const upb_msglayout envoy_config_metrics_v3_TagSpecifier_msginit = {
+ NULL,
+ &envoy_config_metrics_v3_TagSpecifier__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_metrics_v3_HistogramBucketSettings_submsgs[1] = {
+ &envoy_type_matcher_v3_StringMatcher_msginit,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_HistogramBucketSettings__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 0, 1, _UPB_LABEL_PACKED},
+};
+
+const upb_msglayout envoy_config_metrics_v3_HistogramBucketSettings_msginit = {
+ &envoy_config_metrics_v3_HistogramBucketSettings_submsgs[0],
+ &envoy_config_metrics_v3_HistogramBucketSettings__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_metrics_v3_StatsdSink_submsgs[1] = {
+ &envoy_config_core_v3_Address_msginit,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_StatsdSink__fields[3] = {
+ {1, UPB_SIZE(8, 16), UPB_SIZE(-17, -33), 0, 11, 1},
+ {2, UPB_SIZE(8, 16), UPB_SIZE(-17, -33), 0, 9, 1},
+ {3, UPB_SIZE(0, 0), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_config_metrics_v3_StatsdSink_msginit = {
+ &envoy_config_metrics_v3_StatsdSink_submsgs[0],
+ &envoy_config_metrics_v3_StatsdSink__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_metrics_v3_DogStatsdSink_submsgs[2] = {
+ &envoy_config_core_v3_Address_msginit,
+ &google_protobuf_UInt64Value_msginit,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_DogStatsdSink__fields[3] = {
+ {1, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 0, 11, 1},
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {4, UPB_SIZE(12, 24), 1, 1, 11, 1},
+};
+
+const upb_msglayout envoy_config_metrics_v3_DogStatsdSink_msginit = {
+ &envoy_config_metrics_v3_DogStatsdSink_submsgs[0],
+ &envoy_config_metrics_v3_DogStatsdSink__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout_field envoy_config_metrics_v3_HystrixSink__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 3, 1},
+};
+
+const upb_msglayout envoy_config_metrics_v3_HystrixSink_msginit = {
+ NULL,
+ &envoy_config_metrics_v3_HystrixSink__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h
new file mode 100644
index 00000000000..dab0415ed60
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h
@@ -0,0 +1,488 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/metrics/v3/stats.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPB_H_
+#define ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_config_metrics_v3_StatsSink;
+struct envoy_config_metrics_v3_StatsConfig;
+struct envoy_config_metrics_v3_StatsMatcher;
+struct envoy_config_metrics_v3_TagSpecifier;
+struct envoy_config_metrics_v3_HistogramBucketSettings;
+struct envoy_config_metrics_v3_StatsdSink;
+struct envoy_config_metrics_v3_DogStatsdSink;
+struct envoy_config_metrics_v3_HystrixSink;
+typedef struct envoy_config_metrics_v3_StatsSink envoy_config_metrics_v3_StatsSink;
+typedef struct envoy_config_metrics_v3_StatsConfig envoy_config_metrics_v3_StatsConfig;
+typedef struct envoy_config_metrics_v3_StatsMatcher envoy_config_metrics_v3_StatsMatcher;
+typedef struct envoy_config_metrics_v3_TagSpecifier envoy_config_metrics_v3_TagSpecifier;
+typedef struct envoy_config_metrics_v3_HistogramBucketSettings envoy_config_metrics_v3_HistogramBucketSettings;
+typedef struct envoy_config_metrics_v3_StatsdSink envoy_config_metrics_v3_StatsdSink;
+typedef struct envoy_config_metrics_v3_DogStatsdSink envoy_config_metrics_v3_DogStatsdSink;
+typedef struct envoy_config_metrics_v3_HystrixSink envoy_config_metrics_v3_HystrixSink;
+extern const upb_msglayout envoy_config_metrics_v3_StatsSink_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsConfig_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsMatcher_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_TagSpecifier_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_HistogramBucketSettings_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsdSink_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_DogStatsdSink_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_HystrixSink_msginit;
+struct envoy_config_core_v3_Address;
+struct envoy_type_matcher_v3_ListStringMatcher;
+struct envoy_type_matcher_v3_StringMatcher;
+struct google_protobuf_Any;
+struct google_protobuf_BoolValue;
+struct google_protobuf_UInt64Value;
+extern const upb_msglayout envoy_config_core_v3_Address_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_ListStringMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit;
+extern const upb_msglayout google_protobuf_Any_msginit;
+extern const upb_msglayout google_protobuf_BoolValue_msginit;
+extern const upb_msglayout google_protobuf_UInt64Value_msginit;
+
+
+/* envoy.config.metrics.v3.StatsSink */
+
+UPB_INLINE envoy_config_metrics_v3_StatsSink *envoy_config_metrics_v3_StatsSink_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_StatsSink *)_upb_msg_new(&envoy_config_metrics_v3_StatsSink_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_StatsSink *envoy_config_metrics_v3_StatsSink_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_StatsSink *ret = envoy_config_metrics_v3_StatsSink_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsSink_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_StatsSink *envoy_config_metrics_v3_StatsSink_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_StatsSink *ret = envoy_config_metrics_v3_StatsSink_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsSink_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_StatsSink_serialize(const envoy_config_metrics_v3_StatsSink *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_StatsSink_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_metrics_v3_StatsSink_config_type_typed_config = 3,
+ envoy_config_metrics_v3_StatsSink_config_type_NOT_SET = 0
+} envoy_config_metrics_v3_StatsSink_config_type_oneofcases;
+UPB_INLINE envoy_config_metrics_v3_StatsSink_config_type_oneofcases envoy_config_metrics_v3_StatsSink_config_type_case(const envoy_config_metrics_v3_StatsSink* msg) { return (envoy_config_metrics_v3_StatsSink_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_metrics_v3_StatsSink_name(const envoy_config_metrics_v3_StatsSink *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsSink_has_typed_config(const envoy_config_metrics_v3_StatsSink *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_metrics_v3_StatsSink_typed_config(const envoy_config_metrics_v3_StatsSink *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
+
+UPB_INLINE void envoy_config_metrics_v3_StatsSink_set_name(envoy_config_metrics_v3_StatsSink *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_metrics_v3_StatsSink_set_typed_config(envoy_config_metrics_v3_StatsSink *msg, struct google_protobuf_Any* value) {
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
+}
+UPB_INLINE struct google_protobuf_Any* envoy_config_metrics_v3_StatsSink_mutable_typed_config(envoy_config_metrics_v3_StatsSink *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_metrics_v3_StatsSink_typed_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_StatsSink_set_typed_config(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.metrics.v3.StatsConfig */
+
+UPB_INLINE envoy_config_metrics_v3_StatsConfig *envoy_config_metrics_v3_StatsConfig_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_StatsConfig *)_upb_msg_new(&envoy_config_metrics_v3_StatsConfig_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_StatsConfig *envoy_config_metrics_v3_StatsConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_StatsConfig *ret = envoy_config_metrics_v3_StatsConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_StatsConfig *envoy_config_metrics_v3_StatsConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_StatsConfig *ret = envoy_config_metrics_v3_StatsConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_StatsConfig_serialize(const envoy_config_metrics_v3_StatsConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_StatsConfig_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_stats_tags(const envoy_config_metrics_v3_StatsConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const envoy_config_metrics_v3_TagSpecifier* const* envoy_config_metrics_v3_StatsConfig_stats_tags(const envoy_config_metrics_v3_StatsConfig *msg, size_t *len) { return (const envoy_config_metrics_v3_TagSpecifier* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_use_all_default_tags(const envoy_config_metrics_v3_StatsConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_metrics_v3_StatsConfig_use_all_default_tags(const envoy_config_metrics_v3_StatsConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_stats_matcher(const envoy_config_metrics_v3_StatsConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsConfig_stats_matcher(const envoy_config_metrics_v3_StatsConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_metrics_v3_StatsMatcher*); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsConfig_has_histogram_bucket_settings(const envoy_config_metrics_v3_StatsConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_config_metrics_v3_HistogramBucketSettings* const* envoy_config_metrics_v3_StatsConfig_histogram_bucket_settings(const envoy_config_metrics_v3_StatsConfig *msg, size_t *len) { return (const envoy_config_metrics_v3_HistogramBucketSettings* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+
+UPB_INLINE envoy_config_metrics_v3_TagSpecifier** envoy_config_metrics_v3_StatsConfig_mutable_stats_tags(envoy_config_metrics_v3_StatsConfig *msg, size_t *len) {
+ return (envoy_config_metrics_v3_TagSpecifier**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+}
+UPB_INLINE envoy_config_metrics_v3_TagSpecifier** envoy_config_metrics_v3_StatsConfig_resize_stats_tags(envoy_config_metrics_v3_StatsConfig *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_metrics_v3_TagSpecifier**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_metrics_v3_TagSpecifier* envoy_config_metrics_v3_StatsConfig_add_stats_tags(envoy_config_metrics_v3_StatsConfig *msg, upb_arena *arena) {
+ struct envoy_config_metrics_v3_TagSpecifier* sub = (struct envoy_config_metrics_v3_TagSpecifier*)_upb_msg_new(&envoy_config_metrics_v3_TagSpecifier_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 envoy_config_metrics_v3_StatsConfig_set_use_all_default_tags(envoy_config_metrics_v3_StatsConfig *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+}
+UPB_INLINE struct google_protobuf_BoolValue* envoy_config_metrics_v3_StatsConfig_mutable_use_all_default_tags(envoy_config_metrics_v3_StatsConfig *msg, upb_arena *arena) {
+ struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_metrics_v3_StatsConfig_use_all_default_tags(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_StatsConfig_set_use_all_default_tags(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_metrics_v3_StatsConfig_set_stats_matcher(envoy_config_metrics_v3_StatsConfig *msg, envoy_config_metrics_v3_StatsMatcher* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_metrics_v3_StatsMatcher*) = value;
+}
+UPB_INLINE struct envoy_config_metrics_v3_StatsMatcher* envoy_config_metrics_v3_StatsConfig_mutable_stats_matcher(envoy_config_metrics_v3_StatsConfig *msg, upb_arena *arena) {
+ struct envoy_config_metrics_v3_StatsMatcher* sub = (struct envoy_config_metrics_v3_StatsMatcher*)envoy_config_metrics_v3_StatsConfig_stats_matcher(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_metrics_v3_StatsMatcher*)_upb_msg_new(&envoy_config_metrics_v3_StatsMatcher_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_StatsConfig_set_stats_matcher(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings** envoy_config_metrics_v3_StatsConfig_mutable_histogram_bucket_settings(envoy_config_metrics_v3_StatsConfig *msg, size_t *len) {
+ return (envoy_config_metrics_v3_HistogramBucketSettings**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+}
+UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings** envoy_config_metrics_v3_StatsConfig_resize_histogram_bucket_settings(envoy_config_metrics_v3_StatsConfig *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_metrics_v3_HistogramBucketSettings**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_metrics_v3_HistogramBucketSettings* envoy_config_metrics_v3_StatsConfig_add_histogram_bucket_settings(envoy_config_metrics_v3_StatsConfig *msg, upb_arena *arena) {
+ struct envoy_config_metrics_v3_HistogramBucketSettings* sub = (struct envoy_config_metrics_v3_HistogramBucketSettings*)_upb_msg_new(&envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.config.metrics.v3.StatsMatcher */
+
+UPB_INLINE envoy_config_metrics_v3_StatsMatcher *envoy_config_metrics_v3_StatsMatcher_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_StatsMatcher *)_upb_msg_new(&envoy_config_metrics_v3_StatsMatcher_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_StatsMatcher *envoy_config_metrics_v3_StatsMatcher_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_StatsMatcher *ret = envoy_config_metrics_v3_StatsMatcher_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsMatcher_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_StatsMatcher *envoy_config_metrics_v3_StatsMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_StatsMatcher *ret = envoy_config_metrics_v3_StatsMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_StatsMatcher_serialize(const envoy_config_metrics_v3_StatsMatcher *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_StatsMatcher_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_metrics_v3_StatsMatcher_stats_matcher_reject_all = 1,
+ envoy_config_metrics_v3_StatsMatcher_stats_matcher_exclusion_list = 2,
+ envoy_config_metrics_v3_StatsMatcher_stats_matcher_inclusion_list = 3,
+ envoy_config_metrics_v3_StatsMatcher_stats_matcher_NOT_SET = 0
+} envoy_config_metrics_v3_StatsMatcher_stats_matcher_oneofcases;
+UPB_INLINE envoy_config_metrics_v3_StatsMatcher_stats_matcher_oneofcases envoy_config_metrics_v3_StatsMatcher_stats_matcher_case(const envoy_config_metrics_v3_StatsMatcher* msg) { return (envoy_config_metrics_v3_StatsMatcher_stats_matcher_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
+
+UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_has_reject_all(const envoy_config_metrics_v3_StatsMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
+UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_reject_all(const envoy_config_metrics_v3_StatsMatcher *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, false); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_has_exclusion_list(const envoy_config_metrics_v3_StatsMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
+UPB_INLINE const struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_exclusion_list(const envoy_config_metrics_v3_StatsMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsMatcher_has_inclusion_list(const envoy_config_metrics_v3_StatsMatcher *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
+UPB_INLINE const struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_inclusion_list(const envoy_config_metrics_v3_StatsMatcher *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }
+
+UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_set_reject_all(envoy_config_metrics_v3_StatsMatcher *msg, bool value) {
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
+}
+UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_set_exclusion_list(envoy_config_metrics_v3_StatsMatcher *msg, struct envoy_type_matcher_v3_ListStringMatcher* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
+}
+UPB_INLINE struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_mutable_exclusion_list(envoy_config_metrics_v3_StatsMatcher *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_ListStringMatcher* sub = (struct envoy_type_matcher_v3_ListStringMatcher*)envoy_config_metrics_v3_StatsMatcher_exclusion_list(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_matcher_v3_ListStringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_ListStringMatcher_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_StatsMatcher_set_exclusion_list(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_metrics_v3_StatsMatcher_set_inclusion_list(envoy_config_metrics_v3_StatsMatcher *msg, struct envoy_type_matcher_v3_ListStringMatcher* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_ListStringMatcher*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
+}
+UPB_INLINE struct envoy_type_matcher_v3_ListStringMatcher* envoy_config_metrics_v3_StatsMatcher_mutable_inclusion_list(envoy_config_metrics_v3_StatsMatcher *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_ListStringMatcher* sub = (struct envoy_type_matcher_v3_ListStringMatcher*)envoy_config_metrics_v3_StatsMatcher_inclusion_list(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_matcher_v3_ListStringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_ListStringMatcher_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_StatsMatcher_set_inclusion_list(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.metrics.v3.TagSpecifier */
+
+UPB_INLINE envoy_config_metrics_v3_TagSpecifier *envoy_config_metrics_v3_TagSpecifier_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_TagSpecifier *)_upb_msg_new(&envoy_config_metrics_v3_TagSpecifier_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_TagSpecifier *envoy_config_metrics_v3_TagSpecifier_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_TagSpecifier *ret = envoy_config_metrics_v3_TagSpecifier_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_TagSpecifier_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_TagSpecifier *envoy_config_metrics_v3_TagSpecifier_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_TagSpecifier *ret = envoy_config_metrics_v3_TagSpecifier_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_TagSpecifier_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_TagSpecifier_serialize(const envoy_config_metrics_v3_TagSpecifier *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_TagSpecifier_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_metrics_v3_TagSpecifier_tag_value_regex = 2,
+ envoy_config_metrics_v3_TagSpecifier_tag_value_fixed_value = 3,
+ envoy_config_metrics_v3_TagSpecifier_tag_value_NOT_SET = 0
+} envoy_config_metrics_v3_TagSpecifier_tag_value_oneofcases;
+UPB_INLINE envoy_config_metrics_v3_TagSpecifier_tag_value_oneofcases envoy_config_metrics_v3_TagSpecifier_tag_value_case(const envoy_config_metrics_v3_TagSpecifier* msg) { return (envoy_config_metrics_v3_TagSpecifier_tag_value_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_metrics_v3_TagSpecifier_tag_name(const envoy_config_metrics_v3_TagSpecifier *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_metrics_v3_TagSpecifier_has_regex(const envoy_config_metrics_v3_TagSpecifier *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 2; }
+UPB_INLINE upb_strview envoy_config_metrics_v3_TagSpecifier_regex(const envoy_config_metrics_v3_TagSpecifier *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(8, 16), UPB_SIZE(16, 32), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_metrics_v3_TagSpecifier_has_fixed_value(const envoy_config_metrics_v3_TagSpecifier *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 3; }
+UPB_INLINE upb_strview envoy_config_metrics_v3_TagSpecifier_fixed_value(const envoy_config_metrics_v3_TagSpecifier *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(8, 16), UPB_SIZE(16, 32), 3, upb_strview_make("", strlen(""))); }
+
+UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_set_tag_name(envoy_config_metrics_v3_TagSpecifier *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_set_regex(envoy_config_metrics_v3_TagSpecifier *msg, upb_strview value) {
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(8, 16), value, UPB_SIZE(16, 32), 2);
+}
+UPB_INLINE void envoy_config_metrics_v3_TagSpecifier_set_fixed_value(envoy_config_metrics_v3_TagSpecifier *msg, upb_strview value) {
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(8, 16), value, UPB_SIZE(16, 32), 3);
+}
+
+/* envoy.config.metrics.v3.HistogramBucketSettings */
+
+UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings *envoy_config_metrics_v3_HistogramBucketSettings_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_HistogramBucketSettings *)_upb_msg_new(&envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings *envoy_config_metrics_v3_HistogramBucketSettings_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_HistogramBucketSettings *ret = envoy_config_metrics_v3_HistogramBucketSettings_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_HistogramBucketSettings *envoy_config_metrics_v3_HistogramBucketSettings_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_HistogramBucketSettings *ret = envoy_config_metrics_v3_HistogramBucketSettings_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_HistogramBucketSettings_serialize(const envoy_config_metrics_v3_HistogramBucketSettings *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_HistogramBucketSettings_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_metrics_v3_HistogramBucketSettings_has_match(const envoy_config_metrics_v3_HistogramBucketSettings *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_metrics_v3_HistogramBucketSettings_match(const envoy_config_metrics_v3_HistogramBucketSettings *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_StringMatcher*); }
+UPB_INLINE double const* envoy_config_metrics_v3_HistogramBucketSettings_buckets(const envoy_config_metrics_v3_HistogramBucketSettings *msg, size_t *len) { return (double const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+
+UPB_INLINE void envoy_config_metrics_v3_HistogramBucketSettings_set_match(envoy_config_metrics_v3_HistogramBucketSettings *msg, struct envoy_type_matcher_v3_StringMatcher* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_StringMatcher*) = value;
+}
+UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_metrics_v3_HistogramBucketSettings_mutable_match(envoy_config_metrics_v3_HistogramBucketSettings *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_metrics_v3_HistogramBucketSettings_match(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_HistogramBucketSettings_set_match(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE double* envoy_config_metrics_v3_HistogramBucketSettings_mutable_buckets(envoy_config_metrics_v3_HistogramBucketSettings *msg, size_t *len) {
+ return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE double* envoy_config_metrics_v3_HistogramBucketSettings_resize_buckets(envoy_config_metrics_v3_HistogramBucketSettings *msg, size_t len, upb_arena *arena) {
+ return (double*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, 3, arena);
+}
+UPB_INLINE bool envoy_config_metrics_v3_HistogramBucketSettings_add_buckets(envoy_config_metrics_v3_HistogramBucketSettings *msg, double val, upb_arena *arena) {
+ return _upb_array_append_accessor2(msg, UPB_SIZE(8, 16), 3, &val,
+ arena);
+}
+
+/* envoy.config.metrics.v3.StatsdSink */
+
+UPB_INLINE envoy_config_metrics_v3_StatsdSink *envoy_config_metrics_v3_StatsdSink_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_StatsdSink *)_upb_msg_new(&envoy_config_metrics_v3_StatsdSink_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_StatsdSink *envoy_config_metrics_v3_StatsdSink_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_StatsdSink *ret = envoy_config_metrics_v3_StatsdSink_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsdSink_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_StatsdSink *envoy_config_metrics_v3_StatsdSink_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_StatsdSink *ret = envoy_config_metrics_v3_StatsdSink_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_StatsdSink_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_StatsdSink_serialize(const envoy_config_metrics_v3_StatsdSink *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_StatsdSink_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_metrics_v3_StatsdSink_statsd_specifier_address = 1,
+ envoy_config_metrics_v3_StatsdSink_statsd_specifier_tcp_cluster_name = 2,
+ envoy_config_metrics_v3_StatsdSink_statsd_specifier_NOT_SET = 0
+} envoy_config_metrics_v3_StatsdSink_statsd_specifier_oneofcases;
+UPB_INLINE envoy_config_metrics_v3_StatsdSink_statsd_specifier_oneofcases envoy_config_metrics_v3_StatsdSink_statsd_specifier_case(const envoy_config_metrics_v3_StatsdSink* msg) { return (envoy_config_metrics_v3_StatsdSink_statsd_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); }
+
+UPB_INLINE bool envoy_config_metrics_v3_StatsdSink_has_address(const envoy_config_metrics_v3_StatsdSink *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 1; }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_metrics_v3_StatsdSink_address(const envoy_config_metrics_v3_StatsdSink *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_Address*, UPB_SIZE(8, 16), UPB_SIZE(16, 32), 1, NULL); }
+UPB_INLINE bool envoy_config_metrics_v3_StatsdSink_has_tcp_cluster_name(const envoy_config_metrics_v3_StatsdSink *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 2; }
+UPB_INLINE upb_strview envoy_config_metrics_v3_StatsdSink_tcp_cluster_name(const envoy_config_metrics_v3_StatsdSink *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(8, 16), UPB_SIZE(16, 32), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE upb_strview envoy_config_metrics_v3_StatsdSink_prefix(const envoy_config_metrics_v3_StatsdSink *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+
+UPB_INLINE void envoy_config_metrics_v3_StatsdSink_set_address(envoy_config_metrics_v3_StatsdSink *msg, struct envoy_config_core_v3_Address* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_Address*, UPB_SIZE(8, 16), value, UPB_SIZE(16, 32), 1);
+}
+UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_metrics_v3_StatsdSink_mutable_address(envoy_config_metrics_v3_StatsdSink *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_metrics_v3_StatsdSink_address(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_Address*)_upb_msg_new(&envoy_config_core_v3_Address_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_StatsdSink_set_address(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_metrics_v3_StatsdSink_set_tcp_cluster_name(envoy_config_metrics_v3_StatsdSink *msg, upb_strview value) {
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(8, 16), value, UPB_SIZE(16, 32), 2);
+}
+UPB_INLINE void envoy_config_metrics_v3_StatsdSink_set_prefix(envoy_config_metrics_v3_StatsdSink *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+
+/* envoy.config.metrics.v3.DogStatsdSink */
+
+UPB_INLINE envoy_config_metrics_v3_DogStatsdSink *envoy_config_metrics_v3_DogStatsdSink_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_DogStatsdSink *)_upb_msg_new(&envoy_config_metrics_v3_DogStatsdSink_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_DogStatsdSink *envoy_config_metrics_v3_DogStatsdSink_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_DogStatsdSink *ret = envoy_config_metrics_v3_DogStatsdSink_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_DogStatsdSink_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_DogStatsdSink *envoy_config_metrics_v3_DogStatsdSink_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_DogStatsdSink *ret = envoy_config_metrics_v3_DogStatsdSink_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_DogStatsdSink_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_DogStatsdSink_serialize(const envoy_config_metrics_v3_DogStatsdSink *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_DogStatsdSink_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_address = 1,
+ envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_NOT_SET = 0
+} envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_oneofcases;
+UPB_INLINE envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_oneofcases envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_case(const envoy_config_metrics_v3_DogStatsdSink* msg) { return (envoy_config_metrics_v3_DogStatsdSink_dog_statsd_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
+
+UPB_INLINE bool envoy_config_metrics_v3_DogStatsdSink_has_address(const envoy_config_metrics_v3_DogStatsdSink *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 1; }
+UPB_INLINE const struct envoy_config_core_v3_Address* envoy_config_metrics_v3_DogStatsdSink_address(const envoy_config_metrics_v3_DogStatsdSink *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_Address*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 1, NULL); }
+UPB_INLINE upb_strview envoy_config_metrics_v3_DogStatsdSink_prefix(const envoy_config_metrics_v3_DogStatsdSink *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_metrics_v3_DogStatsdSink_has_max_bytes_per_datagram(const envoy_config_metrics_v3_DogStatsdSink *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt64Value* envoy_config_metrics_v3_DogStatsdSink_max_bytes_per_datagram(const envoy_config_metrics_v3_DogStatsdSink *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt64Value*); }
+
+UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_set_address(envoy_config_metrics_v3_DogStatsdSink *msg, struct envoy_config_core_v3_Address* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_Address*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 1);
+}
+UPB_INLINE struct envoy_config_core_v3_Address* envoy_config_metrics_v3_DogStatsdSink_mutable_address(envoy_config_metrics_v3_DogStatsdSink *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_Address* sub = (struct envoy_config_core_v3_Address*)envoy_config_metrics_v3_DogStatsdSink_address(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_Address*)_upb_msg_new(&envoy_config_core_v3_Address_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_DogStatsdSink_set_address(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_set_prefix(envoy_config_metrics_v3_DogStatsdSink *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_metrics_v3_DogStatsdSink_set_max_bytes_per_datagram(envoy_config_metrics_v3_DogStatsdSink *msg, struct google_protobuf_UInt64Value* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt64Value*) = value;
+}
+UPB_INLINE struct google_protobuf_UInt64Value* envoy_config_metrics_v3_DogStatsdSink_mutable_max_bytes_per_datagram(envoy_config_metrics_v3_DogStatsdSink *msg, upb_arena *arena) {
+ struct google_protobuf_UInt64Value* sub = (struct google_protobuf_UInt64Value*)envoy_config_metrics_v3_DogStatsdSink_max_bytes_per_datagram(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_UInt64Value*)_upb_msg_new(&google_protobuf_UInt64Value_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_metrics_v3_DogStatsdSink_set_max_bytes_per_datagram(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.metrics.v3.HystrixSink */
+
+UPB_INLINE envoy_config_metrics_v3_HystrixSink *envoy_config_metrics_v3_HystrixSink_new(upb_arena *arena) {
+ return (envoy_config_metrics_v3_HystrixSink *)_upb_msg_new(&envoy_config_metrics_v3_HystrixSink_msginit, arena);
+}
+UPB_INLINE envoy_config_metrics_v3_HystrixSink *envoy_config_metrics_v3_HystrixSink_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_metrics_v3_HystrixSink *ret = envoy_config_metrics_v3_HystrixSink_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_metrics_v3_HystrixSink_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_metrics_v3_HystrixSink *envoy_config_metrics_v3_HystrixSink_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_metrics_v3_HystrixSink *ret = envoy_config_metrics_v3_HystrixSink_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_metrics_v3_HystrixSink_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_metrics_v3_HystrixSink_serialize(const envoy_config_metrics_v3_HystrixSink *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_metrics_v3_HystrixSink_msginit, arena, len);
+}
+
+UPB_INLINE int64_t envoy_config_metrics_v3_HystrixSink_num_buckets(const envoy_config_metrics_v3_HystrixSink *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
+
+UPB_INLINE void envoy_config_metrics_v3_HystrixSink_set_num_buckets(envoy_config_metrics_v3_HystrixSink *msg, int64_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c
new file mode 100644
index 00000000000..a306e71e8ac
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c
@@ -0,0 +1,141 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/overload/v3/overload.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/config/overload/v3/overload.upb.h"
+#include "envoy/type/v3/percent.upb.h"
+#include "google/protobuf/any.upb.h"
+#include "google/protobuf/duration.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_config_overload_v3_ResourceMonitor_submsgs[1] = {
+ &google_protobuf_Any_msginit,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_ResourceMonitor__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_overload_v3_ResourceMonitor_msginit = {
+ &envoy_config_overload_v3_ResourceMonitor_submsgs[0],
+ &envoy_config_overload_v3_ResourceMonitor__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_ThresholdTrigger__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 1, 1},
+};
+
+const upb_msglayout envoy_config_overload_v3_ThresholdTrigger_msginit = {
+ NULL,
+ &envoy_config_overload_v3_ThresholdTrigger__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_ScaledTrigger__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 1, 1},
+ {2, UPB_SIZE(8, 8), 0, 0, 1, 1},
+};
+
+const upb_msglayout envoy_config_overload_v3_ScaledTrigger_msginit = {
+ NULL,
+ &envoy_config_overload_v3_ScaledTrigger__fields[0],
+ UPB_SIZE(16, 16), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_overload_v3_Trigger_submsgs[2] = {
+ &envoy_config_overload_v3_ScaledTrigger_msginit,
+ &envoy_config_overload_v3_ThresholdTrigger_msginit,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_Trigger__fields[3] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_overload_v3_Trigger_msginit = {
+ &envoy_config_overload_v3_Trigger_submsgs[0],
+ &envoy_config_overload_v3_Trigger__fields[0],
+ UPB_SIZE(16, 32), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_submsgs[1] = {
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_ScaleTimersOverloadActionConfig__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit = {
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_submsgs[0],
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_submsgs[2] = {
+ &envoy_type_v3_Percent_msginit,
+ &google_protobuf_Duration_msginit,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer__fields[3] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {2, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 1, 11, 1},
+ {3, UPB_SIZE(4, 8), UPB_SIZE(-9, -17), 0, 11, 1},
+};
+
+const upb_msglayout envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit = {
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_submsgs[0],
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer__fields[0],
+ UPB_SIZE(16, 24), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_overload_v3_OverloadAction_submsgs[2] = {
+ &envoy_config_overload_v3_Trigger_msginit,
+ &google_protobuf_Any_msginit,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_OverloadAction__fields[3] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 32), 0, 0, 11, 3},
+ {3, UPB_SIZE(12, 24), 1, 1, 11, 1},
+};
+
+const upb_msglayout envoy_config_overload_v3_OverloadAction_msginit = {
+ &envoy_config_overload_v3_OverloadAction_submsgs[0],
+ &envoy_config_overload_v3_OverloadAction__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_overload_v3_OverloadManager_submsgs[3] = {
+ &envoy_config_overload_v3_OverloadAction_msginit,
+ &envoy_config_overload_v3_ResourceMonitor_msginit,
+ &google_protobuf_Duration_msginit,
+};
+
+static const upb_msglayout_field envoy_config_overload_v3_OverloadManager__fields[3] = {
+ {1, UPB_SIZE(4, 8), 1, 2, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 1, 11, 3},
+ {3, UPB_SIZE(12, 24), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_config_overload_v3_OverloadManager_msginit = {
+ &envoy_config_overload_v3_OverloadManager_submsgs[0],
+ &envoy_config_overload_v3_OverloadManager__fields[0],
+ UPB_SIZE(16, 32), 3, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h
new file mode 100644
index 00000000000..d800aa9736f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h
@@ -0,0 +1,452 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/overload/v3/overload.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_OVERLOAD_V3_OVERLOAD_PROTO_UPB_H_
+#define ENVOY_CONFIG_OVERLOAD_V3_OVERLOAD_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_config_overload_v3_ResourceMonitor;
+struct envoy_config_overload_v3_ThresholdTrigger;
+struct envoy_config_overload_v3_ScaledTrigger;
+struct envoy_config_overload_v3_Trigger;
+struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig;
+struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer;
+struct envoy_config_overload_v3_OverloadAction;
+struct envoy_config_overload_v3_OverloadManager;
+typedef struct envoy_config_overload_v3_ResourceMonitor envoy_config_overload_v3_ResourceMonitor;
+typedef struct envoy_config_overload_v3_ThresholdTrigger envoy_config_overload_v3_ThresholdTrigger;
+typedef struct envoy_config_overload_v3_ScaledTrigger envoy_config_overload_v3_ScaledTrigger;
+typedef struct envoy_config_overload_v3_Trigger envoy_config_overload_v3_Trigger;
+typedef struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig envoy_config_overload_v3_ScaleTimersOverloadActionConfig;
+typedef struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer;
+typedef struct envoy_config_overload_v3_OverloadAction envoy_config_overload_v3_OverloadAction;
+typedef struct envoy_config_overload_v3_OverloadManager envoy_config_overload_v3_OverloadManager;
+extern const upb_msglayout envoy_config_overload_v3_ResourceMonitor_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ThresholdTrigger_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ScaledTrigger_msginit;
+extern const upb_msglayout envoy_config_overload_v3_Trigger_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit;
+extern const upb_msglayout envoy_config_overload_v3_OverloadAction_msginit;
+extern const upb_msglayout envoy_config_overload_v3_OverloadManager_msginit;
+struct envoy_type_v3_Percent;
+struct google_protobuf_Any;
+struct google_protobuf_Duration;
+extern const upb_msglayout envoy_type_v3_Percent_msginit;
+extern const upb_msglayout google_protobuf_Any_msginit;
+extern const upb_msglayout google_protobuf_Duration_msginit;
+
+typedef enum {
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_UNSPECIFIED = 0,
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_HTTP_DOWNSTREAM_CONNECTION_IDLE = 1,
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_HTTP_DOWNSTREAM_STREAM_IDLE = 2,
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_TRANSPORT_SOCKET_CONNECT = 3
+} envoy_config_overload_v3_ScaleTimersOverloadActionConfig_TimerType;
+
+
+/* envoy.config.overload.v3.ResourceMonitor */
+
+UPB_INLINE envoy_config_overload_v3_ResourceMonitor *envoy_config_overload_v3_ResourceMonitor_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_ResourceMonitor *)_upb_msg_new(&envoy_config_overload_v3_ResourceMonitor_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_ResourceMonitor *envoy_config_overload_v3_ResourceMonitor_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_ResourceMonitor *ret = envoy_config_overload_v3_ResourceMonitor_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_ResourceMonitor_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_ResourceMonitor *envoy_config_overload_v3_ResourceMonitor_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_ResourceMonitor *ret = envoy_config_overload_v3_ResourceMonitor_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_ResourceMonitor_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_ResourceMonitor_serialize(const envoy_config_overload_v3_ResourceMonitor *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_ResourceMonitor_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_overload_v3_ResourceMonitor_config_type_typed_config = 3,
+ envoy_config_overload_v3_ResourceMonitor_config_type_NOT_SET = 0
+} envoy_config_overload_v3_ResourceMonitor_config_type_oneofcases;
+UPB_INLINE envoy_config_overload_v3_ResourceMonitor_config_type_oneofcases envoy_config_overload_v3_ResourceMonitor_config_type_case(const envoy_config_overload_v3_ResourceMonitor* msg) { return (envoy_config_overload_v3_ResourceMonitor_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_overload_v3_ResourceMonitor_name(const envoy_config_overload_v3_ResourceMonitor *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_overload_v3_ResourceMonitor_has_typed_config(const envoy_config_overload_v3_ResourceMonitor *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_overload_v3_ResourceMonitor_typed_config(const envoy_config_overload_v3_ResourceMonitor *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
+
+UPB_INLINE void envoy_config_overload_v3_ResourceMonitor_set_name(envoy_config_overload_v3_ResourceMonitor *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_overload_v3_ResourceMonitor_set_typed_config(envoy_config_overload_v3_ResourceMonitor *msg, struct google_protobuf_Any* value) {
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
+}
+UPB_INLINE struct google_protobuf_Any* envoy_config_overload_v3_ResourceMonitor_mutable_typed_config(envoy_config_overload_v3_ResourceMonitor *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_overload_v3_ResourceMonitor_typed_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_ResourceMonitor_set_typed_config(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.overload.v3.ThresholdTrigger */
+
+UPB_INLINE envoy_config_overload_v3_ThresholdTrigger *envoy_config_overload_v3_ThresholdTrigger_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_ThresholdTrigger *)_upb_msg_new(&envoy_config_overload_v3_ThresholdTrigger_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_ThresholdTrigger *envoy_config_overload_v3_ThresholdTrigger_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_ThresholdTrigger *ret = envoy_config_overload_v3_ThresholdTrigger_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_ThresholdTrigger_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_ThresholdTrigger *envoy_config_overload_v3_ThresholdTrigger_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_ThresholdTrigger *ret = envoy_config_overload_v3_ThresholdTrigger_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_ThresholdTrigger_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_ThresholdTrigger_serialize(const envoy_config_overload_v3_ThresholdTrigger *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_ThresholdTrigger_msginit, arena, len);
+}
+
+UPB_INLINE double envoy_config_overload_v3_ThresholdTrigger_value(const envoy_config_overload_v3_ThresholdTrigger *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); }
+
+UPB_INLINE void envoy_config_overload_v3_ThresholdTrigger_set_value(envoy_config_overload_v3_ThresholdTrigger *msg, double value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value;
+}
+
+/* envoy.config.overload.v3.ScaledTrigger */
+
+UPB_INLINE envoy_config_overload_v3_ScaledTrigger *envoy_config_overload_v3_ScaledTrigger_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_ScaledTrigger *)_upb_msg_new(&envoy_config_overload_v3_ScaledTrigger_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_ScaledTrigger *envoy_config_overload_v3_ScaledTrigger_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_ScaledTrigger *ret = envoy_config_overload_v3_ScaledTrigger_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_ScaledTrigger_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_ScaledTrigger *envoy_config_overload_v3_ScaledTrigger_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_ScaledTrigger *ret = envoy_config_overload_v3_ScaledTrigger_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_ScaledTrigger_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_ScaledTrigger_serialize(const envoy_config_overload_v3_ScaledTrigger *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_ScaledTrigger_msginit, arena, len);
+}
+
+UPB_INLINE double envoy_config_overload_v3_ScaledTrigger_scaling_threshold(const envoy_config_overload_v3_ScaledTrigger *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double); }
+UPB_INLINE double envoy_config_overload_v3_ScaledTrigger_saturation_threshold(const envoy_config_overload_v3_ScaledTrigger *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double); }
+
+UPB_INLINE void envoy_config_overload_v3_ScaledTrigger_set_scaling_threshold(envoy_config_overload_v3_ScaledTrigger *msg, double value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), double) = value;
+}
+UPB_INLINE void envoy_config_overload_v3_ScaledTrigger_set_saturation_threshold(envoy_config_overload_v3_ScaledTrigger *msg, double value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), double) = value;
+}
+
+/* envoy.config.overload.v3.Trigger */
+
+UPB_INLINE envoy_config_overload_v3_Trigger *envoy_config_overload_v3_Trigger_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_Trigger *)_upb_msg_new(&envoy_config_overload_v3_Trigger_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_Trigger *envoy_config_overload_v3_Trigger_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_Trigger *ret = envoy_config_overload_v3_Trigger_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_Trigger_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_Trigger *envoy_config_overload_v3_Trigger_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_Trigger *ret = envoy_config_overload_v3_Trigger_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_Trigger_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_Trigger_serialize(const envoy_config_overload_v3_Trigger *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_Trigger_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_overload_v3_Trigger_trigger_oneof_threshold = 2,
+ envoy_config_overload_v3_Trigger_trigger_oneof_scaled = 3,
+ envoy_config_overload_v3_Trigger_trigger_oneof_NOT_SET = 0
+} envoy_config_overload_v3_Trigger_trigger_oneof_oneofcases;
+UPB_INLINE envoy_config_overload_v3_Trigger_trigger_oneof_oneofcases envoy_config_overload_v3_Trigger_trigger_oneof_case(const envoy_config_overload_v3_Trigger* msg) { return (envoy_config_overload_v3_Trigger_trigger_oneof_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_overload_v3_Trigger_name(const envoy_config_overload_v3_Trigger *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_config_overload_v3_Trigger_has_threshold(const envoy_config_overload_v3_Trigger *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
+UPB_INLINE const envoy_config_overload_v3_ThresholdTrigger* envoy_config_overload_v3_Trigger_threshold(const envoy_config_overload_v3_Trigger *msg) { return UPB_READ_ONEOF(msg, const envoy_config_overload_v3_ThresholdTrigger*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, NULL); }
+UPB_INLINE bool envoy_config_overload_v3_Trigger_has_scaled(const envoy_config_overload_v3_Trigger *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
+UPB_INLINE const envoy_config_overload_v3_ScaledTrigger* envoy_config_overload_v3_Trigger_scaled(const envoy_config_overload_v3_Trigger *msg) { return UPB_READ_ONEOF(msg, const envoy_config_overload_v3_ScaledTrigger*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
+
+UPB_INLINE void envoy_config_overload_v3_Trigger_set_name(envoy_config_overload_v3_Trigger *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_overload_v3_Trigger_set_threshold(envoy_config_overload_v3_Trigger *msg, envoy_config_overload_v3_ThresholdTrigger* value) {
+ UPB_WRITE_ONEOF(msg, envoy_config_overload_v3_ThresholdTrigger*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
+}
+UPB_INLINE struct envoy_config_overload_v3_ThresholdTrigger* envoy_config_overload_v3_Trigger_mutable_threshold(envoy_config_overload_v3_Trigger *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_ThresholdTrigger* sub = (struct envoy_config_overload_v3_ThresholdTrigger*)envoy_config_overload_v3_Trigger_threshold(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_overload_v3_ThresholdTrigger*)_upb_msg_new(&envoy_config_overload_v3_ThresholdTrigger_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_Trigger_set_threshold(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_overload_v3_Trigger_set_scaled(envoy_config_overload_v3_Trigger *msg, envoy_config_overload_v3_ScaledTrigger* value) {
+ UPB_WRITE_ONEOF(msg, envoy_config_overload_v3_ScaledTrigger*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
+}
+UPB_INLINE struct envoy_config_overload_v3_ScaledTrigger* envoy_config_overload_v3_Trigger_mutable_scaled(envoy_config_overload_v3_Trigger *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_ScaledTrigger* sub = (struct envoy_config_overload_v3_ScaledTrigger*)envoy_config_overload_v3_Trigger_scaled(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_overload_v3_ScaledTrigger*)_upb_msg_new(&envoy_config_overload_v3_ScaledTrigger_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_Trigger_set_scaled(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.overload.v3.ScaleTimersOverloadActionConfig */
+
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_ScaleTimersOverloadActionConfig *)_upb_msg_new(&envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig *ret = envoy_config_overload_v3_ScaleTimersOverloadActionConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig *ret = envoy_config_overload_v3_ScaleTimersOverloadActionConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_serialize(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_overload_v3_ScaleTimersOverloadActionConfig_has_timer_scale_factors(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer* const* envoy_config_overload_v3_ScaleTimersOverloadActionConfig_timer_scale_factors(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig *msg, size_t *len) { return (const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer** envoy_config_overload_v3_ScaleTimersOverloadActionConfig_mutable_timer_scale_factors(envoy_config_overload_v3_ScaleTimersOverloadActionConfig *msg, size_t *len) {
+ return (envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer** envoy_config_overload_v3_ScaleTimersOverloadActionConfig_resize_timer_scale_factors(envoy_config_overload_v3_ScaleTimersOverloadActionConfig *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer* envoy_config_overload_v3_ScaleTimersOverloadActionConfig_add_timer_scale_factors(envoy_config_overload_v3_ScaleTimersOverloadActionConfig *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer* sub = (struct envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer*)_upb_msg_new(&envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer */
+
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *)_upb_msg_new(&envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *ret = envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *ret = envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_serialize(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_min_timeout = 2,
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_min_scale = 3,
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_NOT_SET = 0
+} envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_oneofcases;
+UPB_INLINE envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_oneofcases envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_case(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer* msg) { return (envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_overload_adjust_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
+
+UPB_INLINE int32_t envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_timer(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE bool envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_has_min_timeout(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_min_timeout(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Duration*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 2, NULL); }
+UPB_INLINE bool envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_has_min_scale(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 3; }
+UPB_INLINE const struct envoy_type_v3_Percent* envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_min_scale(const envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_v3_Percent*, UPB_SIZE(4, 8), UPB_SIZE(8, 16), 3, NULL); }
+
+UPB_INLINE void envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_set_timer(envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+}
+UPB_INLINE void envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_set_min_timeout(envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg, struct google_protobuf_Duration* value) {
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Duration*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 2);
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_mutable_min_timeout(envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_min_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_set_min_timeout(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_set_min_scale(envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg, struct envoy_type_v3_Percent* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_type_v3_Percent*, UPB_SIZE(4, 8), value, UPB_SIZE(8, 16), 3);
+}
+UPB_INLINE struct envoy_type_v3_Percent* envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_mutable_min_scale(envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer *msg, upb_arena *arena) {
+ struct envoy_type_v3_Percent* sub = (struct envoy_type_v3_Percent*)envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_min_scale(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_v3_Percent*)_upb_msg_new(&envoy_type_v3_Percent_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_set_min_scale(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.overload.v3.OverloadAction */
+
+UPB_INLINE envoy_config_overload_v3_OverloadAction *envoy_config_overload_v3_OverloadAction_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_OverloadAction *)_upb_msg_new(&envoy_config_overload_v3_OverloadAction_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_OverloadAction *envoy_config_overload_v3_OverloadAction_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_OverloadAction *ret = envoy_config_overload_v3_OverloadAction_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_OverloadAction_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_OverloadAction *envoy_config_overload_v3_OverloadAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_OverloadAction *ret = envoy_config_overload_v3_OverloadAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_OverloadAction_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_OverloadAction_serialize(const envoy_config_overload_v3_OverloadAction *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_OverloadAction_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_overload_v3_OverloadAction_name(const envoy_config_overload_v3_OverloadAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_overload_v3_OverloadAction_has_triggers(const envoy_config_overload_v3_OverloadAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_config_overload_v3_Trigger* const* envoy_config_overload_v3_OverloadAction_triggers(const envoy_config_overload_v3_OverloadAction *msg, size_t *len) { return (const envoy_config_overload_v3_Trigger* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_config_overload_v3_OverloadAction_has_typed_config(const envoy_config_overload_v3_OverloadAction *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_overload_v3_OverloadAction_typed_config(const envoy_config_overload_v3_OverloadAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
+
+UPB_INLINE void envoy_config_overload_v3_OverloadAction_set_name(envoy_config_overload_v3_OverloadAction *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE envoy_config_overload_v3_Trigger** envoy_config_overload_v3_OverloadAction_mutable_triggers(envoy_config_overload_v3_OverloadAction *msg, size_t *len) {
+ return (envoy_config_overload_v3_Trigger**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+}
+UPB_INLINE envoy_config_overload_v3_Trigger** envoy_config_overload_v3_OverloadAction_resize_triggers(envoy_config_overload_v3_OverloadAction *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_overload_v3_Trigger**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_overload_v3_Trigger* envoy_config_overload_v3_OverloadAction_add_triggers(envoy_config_overload_v3_OverloadAction *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_Trigger* sub = (struct envoy_config_overload_v3_Trigger*)_upb_msg_new(&envoy_config_overload_v3_Trigger_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE void envoy_config_overload_v3_OverloadAction_set_typed_config(envoy_config_overload_v3_OverloadAction *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_config_overload_v3_OverloadAction_mutable_typed_config(envoy_config_overload_v3_OverloadAction *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_overload_v3_OverloadAction_typed_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_OverloadAction_set_typed_config(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.config.overload.v3.OverloadManager */
+
+UPB_INLINE envoy_config_overload_v3_OverloadManager *envoy_config_overload_v3_OverloadManager_new(upb_arena *arena) {
+ return (envoy_config_overload_v3_OverloadManager *)_upb_msg_new(&envoy_config_overload_v3_OverloadManager_msginit, arena);
+}
+UPB_INLINE envoy_config_overload_v3_OverloadManager *envoy_config_overload_v3_OverloadManager_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_overload_v3_OverloadManager *ret = envoy_config_overload_v3_OverloadManager_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_overload_v3_OverloadManager_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_overload_v3_OverloadManager *envoy_config_overload_v3_OverloadManager_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_overload_v3_OverloadManager *ret = envoy_config_overload_v3_OverloadManager_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_overload_v3_OverloadManager_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_overload_v3_OverloadManager_serialize(const envoy_config_overload_v3_OverloadManager *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_overload_v3_OverloadManager_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_overload_v3_OverloadManager_has_refresh_interval(const envoy_config_overload_v3_OverloadManager *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_overload_v3_OverloadManager_refresh_interval(const envoy_config_overload_v3_OverloadManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_overload_v3_OverloadManager_has_resource_monitors(const envoy_config_overload_v3_OverloadManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_config_overload_v3_ResourceMonitor* const* envoy_config_overload_v3_OverloadManager_resource_monitors(const envoy_config_overload_v3_OverloadManager *msg, size_t *len) { return (const envoy_config_overload_v3_ResourceMonitor* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_config_overload_v3_OverloadManager_has_actions(const envoy_config_overload_v3_OverloadManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const envoy_config_overload_v3_OverloadAction* const* envoy_config_overload_v3_OverloadManager_actions(const envoy_config_overload_v3_OverloadManager *msg, size_t *len) { return (const envoy_config_overload_v3_OverloadAction* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+
+UPB_INLINE void envoy_config_overload_v3_OverloadManager_set_refresh_interval(envoy_config_overload_v3_OverloadManager *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_config_overload_v3_OverloadManager_mutable_refresh_interval(envoy_config_overload_v3_OverloadManager *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_overload_v3_OverloadManager_refresh_interval(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_overload_v3_OverloadManager_set_refresh_interval(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE envoy_config_overload_v3_ResourceMonitor** envoy_config_overload_v3_OverloadManager_mutable_resource_monitors(envoy_config_overload_v3_OverloadManager *msg, size_t *len) {
+ return (envoy_config_overload_v3_ResourceMonitor**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE envoy_config_overload_v3_ResourceMonitor** envoy_config_overload_v3_OverloadManager_resize_resource_monitors(envoy_config_overload_v3_OverloadManager *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_overload_v3_ResourceMonitor**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_overload_v3_ResourceMonitor* envoy_config_overload_v3_OverloadManager_add_resource_monitors(envoy_config_overload_v3_OverloadManager *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_ResourceMonitor* sub = (struct envoy_config_overload_v3_ResourceMonitor*)_upb_msg_new(&envoy_config_overload_v3_ResourceMonitor_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 envoy_config_overload_v3_OverloadAction** envoy_config_overload_v3_OverloadManager_mutable_actions(envoy_config_overload_v3_OverloadManager *msg, size_t *len) {
+ return (envoy_config_overload_v3_OverloadAction**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+}
+UPB_INLINE envoy_config_overload_v3_OverloadAction** envoy_config_overload_v3_OverloadManager_resize_actions(envoy_config_overload_v3_OverloadManager *msg, size_t len, upb_arena *arena) {
+ return (envoy_config_overload_v3_OverloadAction**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_overload_v3_OverloadAction* envoy_config_overload_v3_OverloadManager_add_actions(envoy_config_overload_v3_OverloadManager *msg, upb_arena *arena) {
+ struct envoy_config_overload_v3_OverloadAction* sub = (struct envoy_config_overload_v3_OverloadAction*)_upb_msg_new(&envoy_config_overload_v3_OverloadAction_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;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_OVERLOAD_V3_OVERLOAD_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c
index bf4f865f8ea..f8ac2daa4fb 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c
@@ -29,13 +29,13 @@ static const upb_msglayout *const envoy_config_rbac_v3_RBAC_submsgs[1] = {
static const upb_msglayout_field envoy_config_rbac_v3_RBAC__fields[2] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(8, 8), 0, 0, 11, _UPB_LABEL_MAP},
+ {2, UPB_SIZE(4, 8), 0, 0, 11, _UPB_LABEL_MAP},
};
const upb_msglayout envoy_config_rbac_v3_RBAC_msginit = {
&envoy_config_rbac_v3_RBAC_submsgs[0],
&envoy_config_rbac_v3_RBAC__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout *const envoy_config_rbac_v3_RBAC_PoliciesEntry_submsgs[1] = {
@@ -50,7 +50,7 @@ static const upb_msglayout_field envoy_config_rbac_v3_RBAC_PoliciesEntry__fields
const upb_msglayout envoy_config_rbac_v3_RBAC_PoliciesEntry_msginit = {
&envoy_config_rbac_v3_RBAC_PoliciesEntry_submsgs[0],
&envoy_config_rbac_v3_RBAC_PoliciesEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_rbac_v3_Policy_submsgs[4] = {
@@ -61,19 +61,19 @@ static const upb_msglayout *const envoy_config_rbac_v3_Policy_submsgs[4] = {
};
static const upb_msglayout_field envoy_config_rbac_v3_Policy__fields[4] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 3},
- {2, UPB_SIZE(12, 24), 0, 1, 11, 3},
- {3, UPB_SIZE(0, 0), 0, 3, 11, 1},
- {4, UPB_SIZE(4, 8), 0, 2, 11, 1},
+ {1, UPB_SIZE(12, 24), 0, 0, 11, 3},
+ {2, UPB_SIZE(16, 32), 0, 1, 11, 3},
+ {3, UPB_SIZE(4, 8), 1, 3, 11, 1},
+ {4, UPB_SIZE(8, 16), 2, 2, 11, 1},
};
const upb_msglayout envoy_config_rbac_v3_Policy_msginit = {
&envoy_config_rbac_v3_Policy_submsgs[0],
&envoy_config_rbac_v3_Policy__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(24, 40), 4, false, 255,
};
-static const upb_msglayout *const envoy_config_rbac_v3_Permission_submsgs[8] = {
+static const upb_msglayout *const envoy_config_rbac_v3_Permission_submsgs[7] = {
&envoy_config_core_v3_CidrRange_msginit,
&envoy_config_rbac_v3_Permission_msginit,
&envoy_config_rbac_v3_Permission_Set_msginit,
@@ -99,7 +99,7 @@ static const upb_msglayout_field envoy_config_rbac_v3_Permission__fields[10] = {
const upb_msglayout envoy_config_rbac_v3_Permission_msginit = {
&envoy_config_rbac_v3_Permission_submsgs[0],
&envoy_config_rbac_v3_Permission__fields[0],
- UPB_SIZE(8, 16), 10, false,
+ UPB_SIZE(8, 16), 10, false, 255,
};
static const upb_msglayout *const envoy_config_rbac_v3_Permission_Set_submsgs[1] = {
@@ -113,10 +113,10 @@ static const upb_msglayout_field envoy_config_rbac_v3_Permission_Set__fields[1]
const upb_msglayout envoy_config_rbac_v3_Permission_Set_msginit = {
&envoy_config_rbac_v3_Permission_Set_submsgs[0],
&envoy_config_rbac_v3_Permission_Set__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
-static const upb_msglayout *const envoy_config_rbac_v3_Principal_submsgs[10] = {
+static const upb_msglayout *const envoy_config_rbac_v3_Principal_submsgs[7] = {
&envoy_config_core_v3_CidrRange_msginit,
&envoy_config_rbac_v3_Principal_msginit,
&envoy_config_rbac_v3_Principal_Authenticated_msginit,
@@ -143,7 +143,7 @@ static const upb_msglayout_field envoy_config_rbac_v3_Principal__fields[11] = {
const upb_msglayout envoy_config_rbac_v3_Principal_msginit = {
&envoy_config_rbac_v3_Principal_submsgs[0],
&envoy_config_rbac_v3_Principal__fields[0],
- UPB_SIZE(8, 16), 11, false,
+ UPB_SIZE(8, 16), 11, false, 255,
};
static const upb_msglayout *const envoy_config_rbac_v3_Principal_Set_submsgs[1] = {
@@ -157,7 +157,7 @@ static const upb_msglayout_field envoy_config_rbac_v3_Principal_Set__fields[1] =
const upb_msglayout envoy_config_rbac_v3_Principal_Set_msginit = {
&envoy_config_rbac_v3_Principal_Set_submsgs[0],
&envoy_config_rbac_v3_Principal_Set__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_config_rbac_v3_Principal_Authenticated_submsgs[1] = {
@@ -165,13 +165,13 @@ static const upb_msglayout *const envoy_config_rbac_v3_Principal_Authenticated_s
};
static const upb_msglayout_field envoy_config_rbac_v3_Principal_Authenticated__fields[1] = {
- {2, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_rbac_v3_Principal_Authenticated_msginit = {
&envoy_config_rbac_v3_Principal_Authenticated_submsgs[0],
&envoy_config_rbac_v3_Principal_Authenticated__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h
index b5a3c558d63..befa31f625e 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -75,23 +76,29 @@ UPB_INLINE envoy_config_rbac_v3_RBAC *envoy_config_rbac_v3_RBAC_parse(const char
envoy_config_rbac_v3_RBAC *ret = envoy_config_rbac_v3_RBAC_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_RBAC_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_RBAC *envoy_config_rbac_v3_RBAC_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_RBAC *ret = envoy_config_rbac_v3_RBAC_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_RBAC_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_RBAC_serialize(const envoy_config_rbac_v3_RBAC *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_RBAC_msginit, arena, len);
}
UPB_INLINE int32_t envoy_config_rbac_v3_RBAC_action(const envoy_config_rbac_v3_RBAC *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_rbac_v3_RBAC_has_policies(const envoy_config_rbac_v3_RBAC *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
-UPB_INLINE size_t envoy_config_rbac_v3_RBAC_policies_size(const envoy_config_rbac_v3_RBAC *msg) {return _upb_msg_map_size(msg, UPB_SIZE(8, 8)); }
-UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_get(const envoy_config_rbac_v3_RBAC *msg, upb_strview key, envoy_config_rbac_v3_Policy* *val) { return _upb_msg_map_get(msg, UPB_SIZE(8, 8), &key, 0, val, sizeof(*val)); }
-UPB_INLINE const envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_next(const envoy_config_rbac_v3_RBAC *msg, size_t* iter) { return (const envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 8), iter); }
+UPB_INLINE bool envoy_config_rbac_v3_RBAC_has_policies(const envoy_config_rbac_v3_RBAC *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE size_t envoy_config_rbac_v3_RBAC_policies_size(const envoy_config_rbac_v3_RBAC *msg) {return _upb_msg_map_size(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_get(const envoy_config_rbac_v3_RBAC *msg, upb_strview key, envoy_config_rbac_v3_Policy* *val) { return _upb_msg_map_get(msg, UPB_SIZE(4, 8), &key, 0, val, sizeof(*val)); }
+UPB_INLINE const envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_next(const envoy_config_rbac_v3_RBAC *msg, size_t* iter) { return (const envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); }
UPB_INLINE void envoy_config_rbac_v3_RBAC_set_action(envoy_config_rbac_v3_RBAC *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}
-UPB_INLINE void envoy_config_rbac_v3_RBAC_policies_clear(envoy_config_rbac_v3_RBAC *msg) { _upb_msg_map_clear(msg, UPB_SIZE(8, 8)); }
-UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_set(envoy_config_rbac_v3_RBAC *msg, upb_strview key, envoy_config_rbac_v3_Policy* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(8, 8), &key, 0, &val, sizeof(val), a); }
-UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_delete(envoy_config_rbac_v3_RBAC *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(8, 8), &key, 0); }
-UPB_INLINE envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_nextmutable(envoy_config_rbac_v3_RBAC *msg, size_t* iter) { return (envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 8), iter); }
+UPB_INLINE void envoy_config_rbac_v3_RBAC_policies_clear(envoy_config_rbac_v3_RBAC *msg) { _upb_msg_map_clear(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_set(envoy_config_rbac_v3_RBAC *msg, upb_strview key, envoy_config_rbac_v3_Policy* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(4, 8), &key, 0, &val, sizeof(val), a); }
+UPB_INLINE bool envoy_config_rbac_v3_RBAC_policies_delete(envoy_config_rbac_v3_RBAC *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(4, 8), &key, 0); }
+UPB_INLINE envoy_config_rbac_v3_RBAC_PoliciesEntry* envoy_config_rbac_v3_RBAC_policies_nextmutable(envoy_config_rbac_v3_RBAC *msg, size_t* iter) { return (envoy_config_rbac_v3_RBAC_PoliciesEntry*)_upb_msg_map_next(msg, UPB_SIZE(4, 8), iter); }
/* envoy.config.rbac.v3.RBAC.PoliciesEntry */
@@ -121,47 +128,54 @@ UPB_INLINE envoy_config_rbac_v3_Policy *envoy_config_rbac_v3_Policy_parse(const
envoy_config_rbac_v3_Policy *ret = envoy_config_rbac_v3_Policy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Policy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_Policy *envoy_config_rbac_v3_Policy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_Policy *ret = envoy_config_rbac_v3_Policy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Policy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_Policy_serialize(const envoy_config_rbac_v3_Policy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_Policy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_rbac_v3_Policy_has_permissions(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_rbac_v3_Permission* const* envoy_config_rbac_v3_Policy_permissions(const envoy_config_rbac_v3_Policy *msg, size_t *len) { return (const envoy_config_rbac_v3_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
-UPB_INLINE bool envoy_config_rbac_v3_Policy_has_principals(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_rbac_v3_Principal* const* envoy_config_rbac_v3_Policy_principals(const envoy_config_rbac_v3_Policy *msg, size_t *len) { return (const envoy_config_rbac_v3_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE bool envoy_config_rbac_v3_Policy_has_condition(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_condition(const envoy_config_rbac_v3_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE bool envoy_config_rbac_v3_Policy_has_checked_condition(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_api_expr_v1alpha1_CheckedExpr* envoy_config_rbac_v3_Policy_checked_condition(const envoy_config_rbac_v3_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_api_expr_v1alpha1_CheckedExpr*); }
+UPB_INLINE bool envoy_config_rbac_v3_Policy_has_permissions(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE const envoy_config_rbac_v3_Permission* const* envoy_config_rbac_v3_Policy_permissions(const envoy_config_rbac_v3_Policy *msg, size_t *len) { return (const envoy_config_rbac_v3_Permission* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool envoy_config_rbac_v3_Policy_has_principals(const envoy_config_rbac_v3_Policy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_config_rbac_v3_Principal* const* envoy_config_rbac_v3_Policy_principals(const envoy_config_rbac_v3_Policy *msg, size_t *len) { return (const envoy_config_rbac_v3_Principal* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_config_rbac_v3_Policy_has_condition(const envoy_config_rbac_v3_Policy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_condition(const envoy_config_rbac_v3_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE bool envoy_config_rbac_v3_Policy_has_checked_condition(const envoy_config_rbac_v3_Policy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_api_expr_v1alpha1_CheckedExpr* envoy_config_rbac_v3_Policy_checked_condition(const envoy_config_rbac_v3_Policy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_api_expr_v1alpha1_CheckedExpr*); }
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Policy_mutable_permissions(envoy_config_rbac_v3_Policy *msg, size_t *len) {
- return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+ return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
}
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Policy_resize_permissions(envoy_config_rbac_v3_Policy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_rbac_v3_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_rbac_v3_Permission**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Policy_add_permissions(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)_upb_msg_new(&envoy_config_rbac_v3_Permission_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, 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 envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Policy_mutable_principals(envoy_config_rbac_v3_Policy *msg, size_t *len) {
- return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Policy_resize_principals(envoy_config_rbac_v3_Policy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_rbac_v3_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_rbac_v3_Principal**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Policy_add_principals(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)_upb_msg_new(&envoy_config_rbac_v3_Principal_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_rbac_v3_Policy_set_condition(envoy_config_rbac_v3_Policy *msg, struct google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_mutable_condition(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)envoy_config_rbac_v3_Policy_condition(msg);
@@ -173,7 +187,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* envoy_config_rbac_v3_Policy_mut
return sub;
}
UPB_INLINE void envoy_config_rbac_v3_Policy_set_checked_condition(envoy_config_rbac_v3_Policy *msg, struct google_api_expr_v1alpha1_CheckedExpr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_api_expr_v1alpha1_CheckedExpr*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_api_expr_v1alpha1_CheckedExpr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_CheckedExpr* envoy_config_rbac_v3_Policy_mutable_checked_condition(envoy_config_rbac_v3_Policy *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_CheckedExpr* sub = (struct google_api_expr_v1alpha1_CheckedExpr*)envoy_config_rbac_v3_Policy_checked_condition(msg);
@@ -195,6 +210,12 @@ UPB_INLINE envoy_config_rbac_v3_Permission *envoy_config_rbac_v3_Permission_pars
envoy_config_rbac_v3_Permission *ret = envoy_config_rbac_v3_Permission_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_Permission *envoy_config_rbac_v3_Permission_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_Permission *ret = envoy_config_rbac_v3_Permission_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_Permission_serialize(const envoy_config_rbac_v3_Permission *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_Permission_msginit, arena, len);
}
@@ -348,6 +369,12 @@ UPB_INLINE envoy_config_rbac_v3_Permission_Set *envoy_config_rbac_v3_Permission_
envoy_config_rbac_v3_Permission_Set *ret = envoy_config_rbac_v3_Permission_Set_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_Set_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_Permission_Set *envoy_config_rbac_v3_Permission_Set_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_Permission_Set *ret = envoy_config_rbac_v3_Permission_Set_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Permission_Set_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_Permission_Set_serialize(const envoy_config_rbac_v3_Permission_Set *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_Permission_Set_msginit, arena, len);
}
@@ -359,12 +386,12 @@ UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Permission_Set
return (envoy_config_rbac_v3_Permission**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_rbac_v3_Permission** envoy_config_rbac_v3_Permission_Set_resize_rules(envoy_config_rbac_v3_Permission_Set *msg, size_t len, upb_arena *arena) {
- return (envoy_config_rbac_v3_Permission**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_rbac_v3_Permission**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_rbac_v3_Permission* envoy_config_rbac_v3_Permission_Set_add_rules(envoy_config_rbac_v3_Permission_Set *msg, upb_arena *arena) {
struct envoy_config_rbac_v3_Permission* sub = (struct envoy_config_rbac_v3_Permission*)_upb_msg_new(&envoy_config_rbac_v3_Permission_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -379,6 +406,12 @@ UPB_INLINE envoy_config_rbac_v3_Principal *envoy_config_rbac_v3_Principal_parse(
envoy_config_rbac_v3_Principal *ret = envoy_config_rbac_v3_Principal_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_Principal *envoy_config_rbac_v3_Principal_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_Principal *ret = envoy_config_rbac_v3_Principal_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_Principal_serialize(const envoy_config_rbac_v3_Principal *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_Principal_msginit, arena, len);
}
@@ -556,6 +589,12 @@ UPB_INLINE envoy_config_rbac_v3_Principal_Set *envoy_config_rbac_v3_Principal_Se
envoy_config_rbac_v3_Principal_Set *ret = envoy_config_rbac_v3_Principal_Set_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Set_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_Principal_Set *envoy_config_rbac_v3_Principal_Set_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_Principal_Set *ret = envoy_config_rbac_v3_Principal_Set_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Set_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_Principal_Set_serialize(const envoy_config_rbac_v3_Principal_Set *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_Principal_Set_msginit, arena, len);
}
@@ -567,12 +606,12 @@ UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Principal_Set_m
return (envoy_config_rbac_v3_Principal**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_rbac_v3_Principal** envoy_config_rbac_v3_Principal_Set_resize_ids(envoy_config_rbac_v3_Principal_Set *msg, size_t len, upb_arena *arena) {
- return (envoy_config_rbac_v3_Principal**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_rbac_v3_Principal**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_rbac_v3_Principal* envoy_config_rbac_v3_Principal_Set_add_ids(envoy_config_rbac_v3_Principal_Set *msg, upb_arena *arena) {
struct envoy_config_rbac_v3_Principal* sub = (struct envoy_config_rbac_v3_Principal*)_upb_msg_new(&envoy_config_rbac_v3_Principal_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -587,15 +626,22 @@ UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated *envoy_config_rbac_v3_Pr
envoy_config_rbac_v3_Principal_Authenticated *ret = envoy_config_rbac_v3_Principal_Authenticated_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Authenticated_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_rbac_v3_Principal_Authenticated *envoy_config_rbac_v3_Principal_Authenticated_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_rbac_v3_Principal_Authenticated *ret = envoy_config_rbac_v3_Principal_Authenticated_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_rbac_v3_Principal_Authenticated_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_rbac_v3_Principal_Authenticated_serialize(const envoy_config_rbac_v3_Principal_Authenticated *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_rbac_v3_Principal_Authenticated_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_rbac_v3_Principal_Authenticated_has_principal_name(const envoy_config_rbac_v3_Principal_Authenticated *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Principal_Authenticated_principal_name(const envoy_config_rbac_v3_Principal_Authenticated *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_matcher_v3_StringMatcher*); }
+UPB_INLINE bool envoy_config_rbac_v3_Principal_Authenticated_has_principal_name(const envoy_config_rbac_v3_Principal_Authenticated *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Principal_Authenticated_principal_name(const envoy_config_rbac_v3_Principal_Authenticated *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_StringMatcher*); }
UPB_INLINE void envoy_config_rbac_v3_Principal_Authenticated_set_principal_name(envoy_config_rbac_v3_Principal_Authenticated *msg, struct envoy_type_matcher_v3_StringMatcher* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_matcher_v3_StringMatcher*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_StringMatcher*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_rbac_v3_Principal_Authenticated_mutable_principal_name(envoy_config_rbac_v3_Principal_Authenticated *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_config_rbac_v3_Principal_Authenticated_principal_name(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c
index 6ad24422585..d34e1c50507 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c
@@ -24,25 +24,27 @@ static const upb_msglayout *const envoy_config_route_v3_RouteConfiguration_subms
&envoy_config_route_v3_Vhds_msginit,
&envoy_config_route_v3_VirtualHost_msginit,
&google_protobuf_BoolValue_msginit,
+ &google_protobuf_UInt32Value_msginit,
};
-static const upb_msglayout_field envoy_config_route_v3_RouteConfiguration__fields[10] = {
+static const upb_msglayout_field envoy_config_route_v3_RouteConfiguration__fields[11] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
- {2, UPB_SIZE(20, 40), 0, 2, 11, 3},
- {3, UPB_SIZE(24, 48), 0, 0, 9, 3},
- {4, UPB_SIZE(28, 56), 0, 0, 11, 3},
- {5, UPB_SIZE(32, 64), 0, 0, 9, 3},
- {6, UPB_SIZE(36, 72), 0, 0, 11, 3},
- {7, UPB_SIZE(12, 24), 0, 3, 11, 1},
- {8, UPB_SIZE(40, 80), 0, 0, 9, 3},
- {9, UPB_SIZE(16, 32), 0, 1, 11, 1},
- {10, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {2, UPB_SIZE(24, 48), 0, 2, 11, 3},
+ {3, UPB_SIZE(28, 56), 0, 0, 9, 3},
+ {4, UPB_SIZE(32, 64), 0, 0, 11, 3},
+ {5, UPB_SIZE(36, 72), 0, 0, 9, 3},
+ {6, UPB_SIZE(40, 80), 0, 0, 11, 3},
+ {7, UPB_SIZE(12, 24), 1, 3, 11, 1},
+ {8, UPB_SIZE(44, 88), 0, 0, 9, 3},
+ {9, UPB_SIZE(16, 32), 2, 1, 11, 1},
+ {10, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {11, UPB_SIZE(20, 40), 3, 4, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteConfiguration_msginit = {
&envoy_config_route_v3_RouteConfiguration_submsgs[0],
&envoy_config_route_v3_RouteConfiguration__fields[0],
- UPB_SIZE(48, 96), 10, false,
+ UPB_SIZE(48, 96), 11, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_Vhds_submsgs[1] = {
@@ -50,13 +52,13 @@ static const upb_msglayout *const envoy_config_route_v3_Vhds_submsgs[1] = {
};
static const upb_msglayout_field envoy_config_route_v3_Vhds__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_Vhds_msginit = {
&envoy_config_route_v3_Vhds_submsgs[0],
&envoy_config_route_v3_Vhds__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h
index 4e5adc0c34e..b8d009fdbc8 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -29,10 +30,12 @@ struct envoy_config_core_v3_ConfigSource;
struct envoy_config_core_v3_HeaderValueOption;
struct envoy_config_route_v3_VirtualHost;
struct google_protobuf_BoolValue;
+struct google_protobuf_UInt32Value;
extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
extern const upb_msglayout envoy_config_core_v3_HeaderValueOption_msginit;
extern const upb_msglayout envoy_config_route_v3_VirtualHost_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
+extern const upb_msglayout google_protobuf_UInt32Value_msginit;
/* envoy.config.route.v3.RouteConfiguration */
@@ -45,89 +48,98 @@ UPB_INLINE envoy_config_route_v3_RouteConfiguration *envoy_config_route_v3_Route
envoy_config_route_v3_RouteConfiguration *ret = envoy_config_route_v3_RouteConfiguration_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteConfiguration_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteConfiguration *envoy_config_route_v3_RouteConfiguration_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteConfiguration *ret = envoy_config_route_v3_RouteConfiguration_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteConfiguration_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteConfiguration_serialize(const envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteConfiguration_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_config_route_v3_RouteConfiguration_name(const envoy_config_route_v3_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_virtual_hosts(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct envoy_config_route_v3_VirtualHost* const* envoy_config_route_v3_RouteConfiguration_virtual_hosts(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (const struct envoy_config_route_v3_VirtualHost* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_RouteConfiguration_internal_only_headers(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_response_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_RouteConfiguration_response_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_RouteConfiguration_response_headers_to_remove(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_request_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_RouteConfiguration_request_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_validate_clusters(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_virtual_hosts(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE const struct envoy_config_route_v3_VirtualHost* const* envoy_config_route_v3_RouteConfiguration_virtual_hosts(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (const struct envoy_config_route_v3_VirtualHost* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_RouteConfiguration_internal_only_headers(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_response_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_RouteConfiguration_response_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_RouteConfiguration_response_headers_to_remove(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_request_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_RouteConfiguration_request_headers_to_add(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_validate_clusters(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteConfiguration_validate_clusters(const envoy_config_route_v3_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_RouteConfiguration_request_headers_to_remove(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_vhds(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_RouteConfiguration_request_headers_to_remove(const envoy_config_route_v3_RouteConfiguration *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_vhds(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const envoy_config_route_v3_Vhds* envoy_config_route_v3_RouteConfiguration_vhds(const envoy_config_route_v3_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_route_v3_Vhds*); }
-UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_most_specific_header_mutations_wins(const envoy_config_route_v3_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_most_specific_header_mutations_wins(const envoy_config_route_v3_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_has_max_direct_response_body_size_bytes(const envoy_config_route_v3_RouteConfiguration *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RouteConfiguration_max_direct_response_body_size_bytes(const envoy_config_route_v3_RouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_config_route_v3_RouteConfiguration_set_name(envoy_config_route_v3_RouteConfiguration *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE struct envoy_config_route_v3_VirtualHost** envoy_config_route_v3_RouteConfiguration_mutable_virtual_hosts(envoy_config_route_v3_RouteConfiguration *msg, size_t *len) {
- return (struct envoy_config_route_v3_VirtualHost**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
+ return (struct envoy_config_route_v3_VirtualHost**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE struct envoy_config_route_v3_VirtualHost** envoy_config_route_v3_RouteConfiguration_resize_virtual_hosts(envoy_config_route_v3_RouteConfiguration *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_route_v3_VirtualHost**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_route_v3_VirtualHost**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_VirtualHost* envoy_config_route_v3_RouteConfiguration_add_virtual_hosts(envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_config_route_v3_VirtualHost* sub = (struct envoy_config_route_v3_VirtualHost*)_upb_msg_new(&envoy_config_route_v3_VirtualHost_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_config_route_v3_RouteConfiguration_mutable_internal_only_headers(envoy_config_route_v3_RouteConfiguration *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_RouteConfiguration_resize_internal_only_headers(envoy_config_route_v3_RouteConfiguration *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_add_internal_only_headers(envoy_config_route_v3_RouteConfiguration *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_RouteConfiguration_mutable_response_headers_to_add(envoy_config_route_v3_RouteConfiguration *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_RouteConfiguration_resize_response_headers_to_add(envoy_config_route_v3_RouteConfiguration *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_RouteConfiguration_add_response_headers_to_add(envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_config_route_v3_RouteConfiguration_mutable_response_headers_to_remove(envoy_config_route_v3_RouteConfiguration *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_RouteConfiguration_resize_response_headers_to_remove(envoy_config_route_v3_RouteConfiguration *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_add_response_headers_to_remove(envoy_config_route_v3_RouteConfiguration *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_RouteConfiguration_mutable_request_headers_to_add(envoy_config_route_v3_RouteConfiguration *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_RouteConfiguration_resize_request_headers_to_add(envoy_config_route_v3_RouteConfiguration *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_RouteConfiguration_add_request_headers_to_add(envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteConfiguration_set_validate_clusters(envoy_config_route_v3_RouteConfiguration *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteConfiguration_mutable_validate_clusters(envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena) {
@@ -140,16 +152,17 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteConfigur
return sub;
}
UPB_INLINE upb_strview* envoy_config_route_v3_RouteConfiguration_mutable_request_headers_to_remove(envoy_config_route_v3_RouteConfiguration *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_RouteConfiguration_resize_request_headers_to_remove(envoy_config_route_v3_RouteConfiguration *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_RouteConfiguration_add_request_headers_to_remove(envoy_config_route_v3_RouteConfiguration *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_config_route_v3_RouteConfiguration_set_vhds(envoy_config_route_v3_RouteConfiguration *msg, envoy_config_route_v3_Vhds* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_route_v3_Vhds*) = value;
}
UPB_INLINE struct envoy_config_route_v3_Vhds* envoy_config_route_v3_RouteConfiguration_mutable_vhds(envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena) {
@@ -162,7 +175,20 @@ UPB_INLINE struct envoy_config_route_v3_Vhds* envoy_config_route_v3_RouteConfigu
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteConfiguration_set_most_specific_header_mutations_wins(envoy_config_route_v3_RouteConfiguration *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+}
+UPB_INLINE void envoy_config_route_v3_RouteConfiguration_set_max_direct_response_body_size_bytes(envoy_config_route_v3_RouteConfiguration *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_UInt32Value*) = value;
+}
+UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RouteConfiguration_mutable_max_direct_response_body_size_bytes(envoy_config_route_v3_RouteConfiguration *msg, upb_arena *arena) {
+ struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_RouteConfiguration_max_direct_response_body_size_bytes(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_route_v3_RouteConfiguration_set_max_direct_response_body_size_bytes(msg, sub);
+ }
+ return sub;
}
/* envoy.config.route.v3.Vhds */
@@ -175,15 +201,22 @@ UPB_INLINE envoy_config_route_v3_Vhds *envoy_config_route_v3_Vhds_parse(const ch
envoy_config_route_v3_Vhds *ret = envoy_config_route_v3_Vhds_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_Vhds_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_Vhds *envoy_config_route_v3_Vhds_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_Vhds *ret = envoy_config_route_v3_Vhds_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_Vhds_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_Vhds_serialize(const envoy_config_route_v3_Vhds *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_Vhds_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_Vhds_has_config_source(const envoy_config_route_v3_Vhds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_route_v3_Vhds_config_source(const envoy_config_route_v3_Vhds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE bool envoy_config_route_v3_Vhds_has_config_source(const envoy_config_route_v3_Vhds *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_config_route_v3_Vhds_config_source(const envoy_config_route_v3_Vhds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_ConfigSource*); }
UPB_INLINE void envoy_config_route_v3_Vhds_set_config_source(envoy_config_route_v3_Vhds *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_config_route_v3_Vhds_mutable_config_source(envoy_config_route_v3_Vhds *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_config_route_v3_Vhds_config_source(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c
index 8f1675c7e6e..a5c1d65da07 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c
@@ -20,7 +20,6 @@
#include "envoy/type/v3/range.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "envoy/annotations/deprecation.upb.h"
#include "udpa/annotations/migrate.upb.h"
@@ -30,7 +29,7 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_config_route_v3_VirtualHost_submsgs[11] = {
+static const upb_msglayout *const envoy_config_route_v3_VirtualHost_submsgs[10] = {
&envoy_config_core_v3_HeaderValueOption_msginit,
&envoy_config_route_v3_CorsPolicy_msginit,
&envoy_config_route_v3_HedgePolicy_msginit,
@@ -47,27 +46,27 @@ static const upb_msglayout_field envoy_config_route_v3_VirtualHost__fields[18] =
{1, UPB_SIZE(12, 16), 0, 0, 9, 1},
{2, UPB_SIZE(40, 72), 0, 0, 9, 3},
{3, UPB_SIZE(44, 80), 0, 5, 11, 3},
- {4, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {4, UPB_SIZE(4, 4), 0, 0, 14, 1},
{5, UPB_SIZE(48, 88), 0, 6, 11, 3},
{6, UPB_SIZE(52, 96), 0, 3, 11, 3},
{7, UPB_SIZE(56, 104), 0, 0, 11, 3},
- {8, UPB_SIZE(20, 32), 0, 1, 11, 1},
+ {8, UPB_SIZE(20, 32), 1, 1, 11, 1},
{10, UPB_SIZE(60, 112), 0, 0, 11, 3},
{11, UPB_SIZE(64, 120), 0, 0, 9, 3},
{13, UPB_SIZE(68, 128), 0, 0, 9, 3},
{14, UPB_SIZE(8, 8), 0, 0, 8, 1},
{15, UPB_SIZE(72, 136), 0, 7, 11, _UPB_LABEL_MAP},
- {16, UPB_SIZE(24, 40), 0, 4, 11, 1},
- {17, UPB_SIZE(28, 48), 0, 2, 11, 1},
- {18, UPB_SIZE(32, 56), 0, 9, 11, 1},
+ {16, UPB_SIZE(24, 40), 2, 4, 11, 1},
+ {17, UPB_SIZE(28, 48), 3, 2, 11, 1},
+ {18, UPB_SIZE(32, 56), 4, 9, 11, 1},
{19, UPB_SIZE(9, 9), 0, 0, 8, 1},
- {20, UPB_SIZE(36, 64), 0, 8, 11, 1},
+ {20, UPB_SIZE(36, 64), 5, 8, 11, 1},
};
const upb_msglayout envoy_config_route_v3_VirtualHost_msginit = {
&envoy_config_route_v3_VirtualHost_submsgs[0],
&envoy_config_route_v3_VirtualHost__fields[0],
- UPB_SIZE(80, 144), 18, false,
+ UPB_SIZE(80, 144), 18, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_submsgs[1] = {
@@ -82,7 +81,7 @@ static const upb_msglayout_field envoy_config_route_v3_VirtualHost_TypedPerFilte
const upb_msglayout envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_msginit = {
&envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_submsgs[0],
&envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_FilterAction_submsgs[1] = {
@@ -90,16 +89,16 @@ static const upb_msglayout *const envoy_config_route_v3_FilterAction_submsgs[1]
};
static const upb_msglayout_field envoy_config_route_v3_FilterAction__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_FilterAction_msginit = {
&envoy_config_route_v3_FilterAction_submsgs[0],
&envoy_config_route_v3_FilterAction__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_Route_submsgs[12] = {
+static const upb_msglayout *const envoy_config_route_v3_Route_submsgs[11] = {
&envoy_config_core_v3_HeaderValueOption_msginit,
&envoy_config_core_v3_Metadata_msginit,
&envoy_config_route_v3_Decorator_msginit,
@@ -114,27 +113,27 @@ static const upb_msglayout *const envoy_config_route_v3_Route_submsgs[12] = {
};
static const upb_msglayout_field envoy_config_route_v3_Route__fields[15] = {
- {1, UPB_SIZE(8, 16), 0, 8, 11, 1},
- {2, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 7, 11, 1},
- {3, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 5, 11, 1},
- {4, UPB_SIZE(12, 24), 0, 1, 11, 1},
- {5, UPB_SIZE(16, 32), 0, 2, 11, 1},
- {7, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 3, 11, 1},
- {9, UPB_SIZE(28, 56), 0, 0, 11, 3},
- {10, UPB_SIZE(32, 64), 0, 0, 11, 3},
- {11, UPB_SIZE(36, 72), 0, 0, 9, 3},
- {12, UPB_SIZE(40, 80), 0, 0, 9, 3},
- {13, UPB_SIZE(44, 88), 0, 6, 11, _UPB_LABEL_MAP},
- {14, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {15, UPB_SIZE(20, 40), 0, 9, 11, 1},
- {16, UPB_SIZE(24, 48), 0, 10, 11, 1},
- {17, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 4, 11, 1},
+ {1, UPB_SIZE(12, 24), 1, 8, 11, 1},
+ {2, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 7, 11, 1},
+ {3, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 5, 11, 1},
+ {4, UPB_SIZE(16, 32), 2, 1, 11, 1},
+ {5, UPB_SIZE(20, 40), 3, 2, 11, 1},
+ {7, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 3, 11, 1},
+ {9, UPB_SIZE(32, 64), 0, 0, 11, 3},
+ {10, UPB_SIZE(36, 72), 0, 0, 11, 3},
+ {11, UPB_SIZE(40, 80), 0, 0, 9, 3},
+ {12, UPB_SIZE(44, 88), 0, 0, 9, 3},
+ {13, UPB_SIZE(48, 96), 0, 6, 11, _UPB_LABEL_MAP},
+ {14, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {15, UPB_SIZE(24, 48), 4, 9, 11, 1},
+ {16, UPB_SIZE(28, 56), 5, 10, 11, 1},
+ {17, UPB_SIZE(52, 104), UPB_SIZE(-57, -113), 4, 11, 1},
};
const upb_msglayout envoy_config_route_v3_Route_msginit = {
&envoy_config_route_v3_Route_submsgs[0],
&envoy_config_route_v3_Route__fields[0],
- UPB_SIZE(56, 112), 15, false,
+ UPB_SIZE(64, 128), 15, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_Route_TypedPerFilterConfigEntry_submsgs[1] = {
@@ -149,7 +148,7 @@ static const upb_msglayout_field envoy_config_route_v3_Route_TypedPerFilterConfi
const upb_msglayout envoy_config_route_v3_Route_TypedPerFilterConfigEntry_msginit = {
&envoy_config_route_v3_Route_TypedPerFilterConfigEntry_submsgs[0],
&envoy_config_route_v3_Route_TypedPerFilterConfigEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_WeightedCluster_submsgs[2] = {
@@ -158,18 +157,18 @@ static const upb_msglayout *const envoy_config_route_v3_WeightedCluster_submsgs[
};
static const upb_msglayout_field envoy_config_route_v3_WeightedCluster__fields[3] = {
- {1, UPB_SIZE(12, 24), 0, 0, 11, 3},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 1},
+ {1, UPB_SIZE(16, 32), 0, 0, 11, 3},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(12, 24), 1, 1, 11, 1},
};
const upb_msglayout envoy_config_route_v3_WeightedCluster_msginit = {
&envoy_config_route_v3_WeightedCluster_submsgs[0],
&envoy_config_route_v3_WeightedCluster__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_WeightedCluster_ClusterWeight_submsgs[5] = {
+static const upb_msglayout *const envoy_config_route_v3_WeightedCluster_ClusterWeight_submsgs[4] = {
&envoy_config_core_v3_HeaderValueOption_msginit,
&envoy_config_core_v3_Metadata_msginit,
&envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit,
@@ -177,20 +176,20 @@ static const upb_msglayout *const envoy_config_route_v3_WeightedCluster_ClusterW
};
static const upb_msglayout_field envoy_config_route_v3_WeightedCluster_ClusterWeight__fields[8] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 3, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 1, 11, 1},
- {4, UPB_SIZE(16, 32), 0, 0, 11, 3},
- {5, UPB_SIZE(20, 40), 0, 0, 11, 3},
- {6, UPB_SIZE(24, 48), 0, 0, 9, 3},
- {9, UPB_SIZE(28, 56), 0, 0, 9, 3},
- {10, UPB_SIZE(32, 64), 0, 2, 11, _UPB_LABEL_MAP},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 3, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 1, 11, 1},
+ {4, UPB_SIZE(20, 40), 0, 0, 11, 3},
+ {5, UPB_SIZE(24, 48), 0, 0, 11, 3},
+ {6, UPB_SIZE(28, 56), 0, 0, 9, 3},
+ {9, UPB_SIZE(32, 64), 0, 0, 9, 3},
+ {10, UPB_SIZE(36, 72), 0, 2, 11, _UPB_LABEL_MAP},
};
const upb_msglayout envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit = {
&envoy_config_route_v3_WeightedCluster_ClusterWeight_submsgs[0],
&envoy_config_route_v3_WeightedCluster_ClusterWeight__fields[0],
- UPB_SIZE(40, 80), 8, false,
+ UPB_SIZE(40, 80), 8, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[1] = {
@@ -205,7 +204,7 @@ static const upb_msglayout_field envoy_config_route_v3_WeightedCluster_ClusterWe
const upb_msglayout envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit = {
&envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_submsgs[0],
&envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteMatch_submsgs[8] = {
@@ -220,75 +219,75 @@ static const upb_msglayout *const envoy_config_route_v3_RouteMatch_submsgs[8] =
};
static const upb_msglayout_field envoy_config_route_v3_RouteMatch__fields[10] = {
- {1, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1},
- {2, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 0, 9, 1},
- {4, UPB_SIZE(0, 0), 0, 7, 11, 1},
- {6, UPB_SIZE(16, 32), 0, 1, 11, 3},
- {7, UPB_SIZE(20, 40), 0, 2, 11, 3},
- {8, UPB_SIZE(4, 8), 0, 4, 11, 1},
- {9, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {10, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 6, 11, 1},
- {11, UPB_SIZE(12, 24), 0, 5, 11, 1},
- {12, UPB_SIZE(24, 48), UPB_SIZE(-33, -65), 3, 11, 1},
+ {1, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1},
+ {2, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 0, 9, 1},
+ {4, UPB_SIZE(4, 8), 1, 7, 11, 1},
+ {6, UPB_SIZE(20, 40), 0, 1, 11, 3},
+ {7, UPB_SIZE(24, 48), 0, 2, 11, 3},
+ {8, UPB_SIZE(8, 16), 2, 4, 11, 1},
+ {9, UPB_SIZE(12, 24), 3, 0, 11, 1},
+ {10, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 6, 11, 1},
+ {11, UPB_SIZE(16, 32), 4, 5, 11, 1},
+ {12, UPB_SIZE(28, 56), UPB_SIZE(-37, -73), 3, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteMatch_msginit = {
&envoy_config_route_v3_RouteMatch_submsgs[0],
&envoy_config_route_v3_RouteMatch__fields[0],
- UPB_SIZE(40, 80), 10, false,
+ UPB_SIZE(40, 80), 10, false, 255,
};
const upb_msglayout envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_submsgs[2] = {
+static const upb_msglayout *const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_submsgs[1] = {
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_config_route_v3_RouteMatch_TlsContextMatchOptions__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_msginit = {
&envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_submsgs[0],
&envoy_config_route_v3_RouteMatch_TlsContextMatchOptions__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
const upb_msglayout envoy_config_route_v3_RouteMatch_ConnectMatcher_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_CorsPolicy_submsgs[4] = {
+static const upb_msglayout *const envoy_config_route_v3_CorsPolicy_submsgs[3] = {
&envoy_config_core_v3_RuntimeFractionalPercent_msginit,
&envoy_type_matcher_v3_StringMatcher_msginit,
&google_protobuf_BoolValue_msginit,
};
static const upb_msglayout_field envoy_config_route_v3_CorsPolicy__fields[8] = {
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {4, UPB_SIZE(16, 32), 0, 0, 9, 1},
- {5, UPB_SIZE(24, 48), 0, 0, 9, 1},
- {6, UPB_SIZE(32, 64), 0, 2, 11, 1},
- {9, UPB_SIZE(44, 88), UPB_SIZE(-49, -97), 0, 11, 1},
- {10, UPB_SIZE(36, 72), 0, 0, 11, 1},
- {11, UPB_SIZE(40, 80), 0, 1, 11, 3},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {4, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {5, UPB_SIZE(28, 56), 0, 0, 9, 1},
+ {6, UPB_SIZE(36, 72), 1, 2, 11, 1},
+ {9, UPB_SIZE(48, 96), UPB_SIZE(-53, -105), 0, 11, 1},
+ {10, UPB_SIZE(40, 80), 2, 0, 11, 1},
+ {11, UPB_SIZE(44, 88), 0, 1, 11, 3},
};
const upb_msglayout envoy_config_route_v3_CorsPolicy_msginit = {
&envoy_config_route_v3_CorsPolicy_submsgs[0],
&envoy_config_route_v3_CorsPolicy__fields[0],
- UPB_SIZE(56, 112), 8, false,
+ UPB_SIZE(56, 112), 8, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_RouteAction_submsgs[21] = {
+static const upb_msglayout *const envoy_config_route_v3_RouteAction_submsgs[16] = {
&envoy_config_core_v3_Metadata_msginit,
&envoy_config_route_v3_CorsPolicy_msginit,
&envoy_config_route_v3_HedgePolicy_msginit,
@@ -308,41 +307,41 @@ static const upb_msglayout *const envoy_config_route_v3_RouteAction_submsgs[21]
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction__fields[29] = {
- {1, UPB_SIZE(104, 184), UPB_SIZE(-113, -201), 0, 9, 1},
- {2, UPB_SIZE(104, 184), UPB_SIZE(-113, -201), 0, 9, 1},
- {3, UPB_SIZE(104, 184), UPB_SIZE(-113, -201), 10, 11, 1},
- {4, UPB_SIZE(32, 40), 0, 0, 11, 1},
- {5, UPB_SIZE(24, 24), 0, 0, 9, 1},
- {6, UPB_SIZE(116, 208), UPB_SIZE(-125, -225), 0, 9, 1},
- {7, UPB_SIZE(116, 208), UPB_SIZE(-125, -225), 13, 11, 1},
- {8, UPB_SIZE(36, 48), 0, 14, 11, 1},
- {9, UPB_SIZE(40, 56), 0, 5, 11, 1},
- {11, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {13, UPB_SIZE(88, 152), 0, 4, 11, 3},
- {14, UPB_SIZE(44, 64), 0, 13, 11, 1},
- {15, UPB_SIZE(92, 160), 0, 6, 11, 3},
- {17, UPB_SIZE(48, 72), 0, 1, 11, 1},
+ {1, UPB_SIZE(96, 176), UPB_SIZE(-105, -193), 0, 9, 1},
+ {2, UPB_SIZE(96, 176), UPB_SIZE(-105, -193), 0, 9, 1},
+ {3, UPB_SIZE(96, 176), UPB_SIZE(-105, -193), 10, 11, 1},
+ {4, UPB_SIZE(24, 32), 1, 0, 11, 1},
+ {5, UPB_SIZE(16, 16), 0, 0, 9, 1},
+ {6, UPB_SIZE(108, 200), UPB_SIZE(-117, -217), 0, 9, 1},
+ {7, UPB_SIZE(108, 200), UPB_SIZE(-117, -217), 13, 11, 1},
+ {8, UPB_SIZE(28, 40), 2, 14, 11, 1},
+ {9, UPB_SIZE(32, 48), 3, 5, 11, 1},
+ {11, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {13, UPB_SIZE(80, 144), 0, 4, 11, 3},
+ {14, UPB_SIZE(36, 56), 4, 13, 11, 1},
+ {15, UPB_SIZE(84, 152), 0, 6, 11, 3},
+ {17, UPB_SIZE(40, 64), 5, 1, 11, 1},
{20, UPB_SIZE(8, 8), 0, 0, 14, 1},
- {23, UPB_SIZE(52, 80), 0, 14, 11, 1},
- {24, UPB_SIZE(56, 88), 0, 14, 11, 1},
- {25, UPB_SIZE(96, 168), 0, 9, 11, 3},
- {26, UPB_SIZE(16, 16), 0, 0, 14, 1},
- {27, UPB_SIZE(60, 96), 0, 2, 11, 1},
- {28, UPB_SIZE(64, 104), 0, 14, 11, 1},
- {29, UPB_SIZE(116, 208), UPB_SIZE(-125, -225), 0, 9, 1},
- {30, UPB_SIZE(100, 176), 0, 8, 11, 3},
- {31, UPB_SIZE(68, 112), 0, 15, 11, 1},
- {32, UPB_SIZE(72, 120), 0, 11, 11, 1},
- {33, UPB_SIZE(76, 128), 0, 12, 11, 1},
- {34, UPB_SIZE(80, 136), 0, 3, 11, 1},
- {35, UPB_SIZE(116, 208), UPB_SIZE(-125, -225), 11, 11, 1},
- {36, UPB_SIZE(84, 144), 0, 7, 11, 1},
+ {23, UPB_SIZE(44, 72), 6, 14, 11, 1},
+ {24, UPB_SIZE(48, 80), 7, 14, 11, 1},
+ {25, UPB_SIZE(88, 160), 0, 9, 11, 3},
+ {26, UPB_SIZE(12, 12), 0, 0, 14, 1},
+ {27, UPB_SIZE(52, 88), 8, 2, 11, 1},
+ {28, UPB_SIZE(56, 96), 9, 14, 11, 1},
+ {29, UPB_SIZE(108, 200), UPB_SIZE(-117, -217), 0, 9, 1},
+ {30, UPB_SIZE(92, 168), 0, 8, 11, 3},
+ {31, UPB_SIZE(60, 104), 10, 15, 11, 1},
+ {32, UPB_SIZE(64, 112), 11, 11, 11, 1},
+ {33, UPB_SIZE(68, 120), 12, 12, 11, 1},
+ {34, UPB_SIZE(72, 128), 13, 3, 11, 1},
+ {35, UPB_SIZE(108, 200), UPB_SIZE(-117, -217), 11, 11, 1},
+ {36, UPB_SIZE(76, 136), 14, 7, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_msginit = {
&envoy_config_route_v3_RouteAction_submsgs[0],
&envoy_config_route_v3_RouteAction__fields[0],
- UPB_SIZE(128, 240), 29, false,
+ UPB_SIZE(120, 224), 29, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteAction_RequestMirrorPolicy_submsgs[2] = {
@@ -351,15 +350,15 @@ static const upb_msglayout *const envoy_config_route_v3_RouteAction_RequestMirro
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_RequestMirrorPolicy__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {4, UPB_SIZE(12, 24), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {4, UPB_SIZE(16, 32), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit = {
&envoy_config_route_v3_RouteAction_RequestMirrorPolicy_submsgs[0],
&envoy_config_route_v3_RouteAction_RequestMirrorPolicy__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteAction_HashPolicy_submsgs[5] = {
@@ -382,7 +381,7 @@ static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy__f
const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_msginit = {
&envoy_config_route_v3_RouteAction_HashPolicy_submsgs[0],
&envoy_config_route_v3_RouteAction_HashPolicy__fields[0],
- UPB_SIZE(12, 24), 6, false,
+ UPB_SIZE(16, 24), 6, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteAction_HashPolicy_Header_submsgs[1] = {
@@ -390,14 +389,14 @@ static const upb_msglayout *const envoy_config_route_v3_RouteAction_HashPolicy_H
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_Header__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_Header_msginit = {
&envoy_config_route_v3_RouteAction_HashPolicy_Header_submsgs[0],
&envoy_config_route_v3_RouteAction_HashPolicy_Header__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteAction_HashPolicy_Cookie_submsgs[1] = {
@@ -405,15 +404,15 @@ static const upb_msglayout *const envoy_config_route_v3_RouteAction_HashPolicy_C
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_Cookie__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_Cookie_msginit = {
&envoy_config_route_v3_RouteAction_HashPolicy_Cookie_submsgs[0],
&envoy_config_route_v3_RouteAction_HashPolicy_Cookie__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties__fields[1] = {
@@ -423,7 +422,7 @@ static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_Co
const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_msginit = {
NULL,
&envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties__fields[0],
- UPB_SIZE(1, 1), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter__fields[1] = {
@@ -433,7 +432,7 @@ static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_Qu
const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_msginit = {
NULL,
&envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_FilterState__fields[1] = {
@@ -443,7 +442,7 @@ static const upb_msglayout_field envoy_config_route_v3_RouteAction_HashPolicy_Fi
const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_FilterState_msginit = {
NULL,
&envoy_config_route_v3_RouteAction_HashPolicy_FilterState__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteAction_UpgradeConfig_submsgs[2] = {
@@ -452,48 +451,49 @@ static const upb_msglayout *const envoy_config_route_v3_RouteAction_UpgradeConfi
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_UpgradeConfig__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_UpgradeConfig_msginit = {
&envoy_config_route_v3_RouteAction_UpgradeConfig_submsgs[0],
&envoy_config_route_v3_RouteAction_UpgradeConfig__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_submsgs[1] = {
&envoy_config_core_v3_ProxyProtocolConfig_msginit,
};
-static const upb_msglayout_field envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+static const upb_msglayout_field envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_msginit = {
&envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_submsgs[0],
&envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_RouteAction_MaxStreamDuration_submsgs[3] = {
+static const upb_msglayout *const envoy_config_route_v3_RouteAction_MaxStreamDuration_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_config_route_v3_RouteAction_MaxStreamDuration__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RouteAction_MaxStreamDuration_msginit = {
&envoy_config_route_v3_RouteAction_MaxStreamDuration_submsgs[0],
&envoy_config_route_v3_RouteAction_MaxStreamDuration__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_submsgs[8] = {
+static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_submsgs[7] = {
&envoy_config_route_v3_HeaderMatcher_msginit,
&envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit,
&envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit,
@@ -504,23 +504,23 @@ static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_submsgs[8] =
};
static const upb_msglayout_field envoy_config_route_v3_RetryPolicy__fields[11] = {
- {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
- {2, UPB_SIZE(16, 24), 0, 6, 11, 1},
- {3, UPB_SIZE(20, 32), 0, 5, 11, 1},
- {4, UPB_SIZE(24, 40), 0, 4, 11, 1},
- {5, UPB_SIZE(36, 64), 0, 3, 11, 3},
- {6, UPB_SIZE(0, 0), 0, 0, 3, 1},
- {7, UPB_SIZE(40, 72), 0, 0, 13, _UPB_LABEL_PACKED},
- {8, UPB_SIZE(28, 48), 0, 2, 11, 1},
- {9, UPB_SIZE(44, 80), 0, 0, 11, 3},
- {10, UPB_SIZE(48, 88), 0, 0, 11, 3},
- {11, UPB_SIZE(32, 56), 0, 1, 11, 1},
+ {1, UPB_SIZE(16, 16), 0, 0, 9, 1},
+ {2, UPB_SIZE(24, 32), 1, 6, 11, 1},
+ {3, UPB_SIZE(28, 40), 2, 5, 11, 1},
+ {4, UPB_SIZE(32, 48), 3, 4, 11, 1},
+ {5, UPB_SIZE(44, 72), 0, 3, 11, 3},
+ {6, UPB_SIZE(8, 8), 0, 0, 3, 1},
+ {7, UPB_SIZE(48, 80), 0, 0, 13, _UPB_LABEL_PACKED},
+ {8, UPB_SIZE(36, 56), 4, 2, 11, 1},
+ {9, UPB_SIZE(52, 88), 0, 0, 11, 3},
+ {10, UPB_SIZE(56, 96), 0, 0, 11, 3},
+ {11, UPB_SIZE(40, 64), 5, 1, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RetryPolicy_msginit = {
&envoy_config_route_v3_RetryPolicy_submsgs[0],
&envoy_config_route_v3_RetryPolicy__fields[0],
- UPB_SIZE(56, 96), 11, false,
+ UPB_SIZE(64, 112), 11, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_RetryPriority_submsgs[1] = {
@@ -535,7 +535,7 @@ static const upb_msglayout_field envoy_config_route_v3_RetryPolicy_RetryPriority
const upb_msglayout envoy_config_route_v3_RetryPolicy_RetryPriority_msginit = {
&envoy_config_route_v3_RetryPolicy_RetryPriority_submsgs[0],
&envoy_config_route_v3_RetryPolicy_RetryPriority__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_RetryHostPredicate_submsgs[1] = {
@@ -550,33 +550,33 @@ static const upb_msglayout_field envoy_config_route_v3_RetryPolicy_RetryHostPred
const upb_msglayout envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit = {
&envoy_config_route_v3_RetryPolicy_RetryHostPredicate_submsgs[0],
&envoy_config_route_v3_RetryPolicy_RetryHostPredicate__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_RetryBackOff_submsgs[2] = {
+static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_RetryBackOff_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
static const upb_msglayout_field envoy_config_route_v3_RetryPolicy_RetryBackOff__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit = {
&envoy_config_route_v3_RetryPolicy_RetryBackOff_submsgs[0],
&envoy_config_route_v3_RetryPolicy_RetryBackOff__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_RetryPolicy_ResetHeader__fields[2] = {
- {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(0, 0), 0, 0, 14, 1},
};
const upb_msglayout envoy_config_route_v3_RetryPolicy_ResetHeader_msginit = {
NULL,
&envoy_config_route_v3_RetryPolicy_ResetHeader__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_submsgs[2] = {
@@ -585,14 +585,14 @@ static const upb_msglayout *const envoy_config_route_v3_RetryPolicy_RateLimitedR
};
static const upb_msglayout_field envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff__fields[2] = {
- {1, UPB_SIZE(4, 8), 0, 0, 11, 3},
- {2, UPB_SIZE(0, 0), 0, 1, 11, 1},
+ {1, UPB_SIZE(8, 16), 0, 0, 11, 3},
+ {2, UPB_SIZE(4, 8), 1, 1, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit = {
&envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_submsgs[0],
&envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_HedgePolicy_submsgs[2] = {
@@ -601,32 +601,37 @@ static const upb_msglayout *const envoy_config_route_v3_HedgePolicy_submsgs[2] =
};
static const upb_msglayout_field envoy_config_route_v3_HedgePolicy__fields[3] = {
- {1, UPB_SIZE(4, 8), 0, 1, 11, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_route_v3_HedgePolicy_msginit = {
&envoy_config_route_v3_HedgePolicy_submsgs[0],
&envoy_config_route_v3_HedgePolicy__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 24), 3, false, 255,
};
-static const upb_msglayout_field envoy_config_route_v3_RedirectAction__fields[8] = {
- {1, UPB_SIZE(16, 16), 0, 0, 9, 1},
- {2, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1},
+static const upb_msglayout *const envoy_config_route_v3_RedirectAction_submsgs[1] = {
+ &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit,
+};
+
+static const upb_msglayout_field envoy_config_route_v3_RedirectAction__fields[9] = {
+ {1, UPB_SIZE(12, 16), 0, 0, 9, 1},
+ {2, UPB_SIZE(20, 32), UPB_SIZE(-29, -49), 0, 9, 1},
{3, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {4, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 8, 1},
- {5, UPB_SIZE(24, 32), UPB_SIZE(-33, -49), 0, 9, 1},
- {6, UPB_SIZE(12, 12), 0, 0, 8, 1},
- {7, UPB_SIZE(36, 56), UPB_SIZE(-45, -73), 0, 9, 1},
- {8, UPB_SIZE(8, 8), 0, 0, 13, 1},
+ {4, UPB_SIZE(32, 56), UPB_SIZE(-41, -73), 0, 8, 1},
+ {5, UPB_SIZE(20, 32), UPB_SIZE(-29, -49), 0, 9, 1},
+ {6, UPB_SIZE(8, 8), 0, 0, 8, 1},
+ {7, UPB_SIZE(32, 56), UPB_SIZE(-41, -73), 0, 9, 1},
+ {8, UPB_SIZE(4, 4), 0, 0, 13, 1},
+ {9, UPB_SIZE(20, 32), UPB_SIZE(-29, -49), 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RedirectAction_msginit = {
- NULL,
+ &envoy_config_route_v3_RedirectAction_submsgs[0],
&envoy_config_route_v3_RedirectAction__fields[0],
- UPB_SIZE(48, 80), 8, false,
+ UPB_SIZE(48, 80), 9, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_DirectResponseAction_submsgs[1] = {
@@ -634,14 +639,14 @@ static const upb_msglayout *const envoy_config_route_v3_DirectResponseAction_sub
};
static const upb_msglayout_field envoy_config_route_v3_DirectResponseAction__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 13, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 13, 1},
+ {2, UPB_SIZE(8, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_DirectResponseAction_msginit = {
&envoy_config_route_v3_DirectResponseAction_submsgs[0],
&envoy_config_route_v3_DirectResponseAction__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_Decorator_submsgs[1] = {
@@ -649,32 +654,32 @@ static const upb_msglayout *const envoy_config_route_v3_Decorator_submsgs[1] = {
};
static const upb_msglayout_field envoy_config_route_v3_Decorator__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_Decorator_msginit = {
&envoy_config_route_v3_Decorator_submsgs[0],
&envoy_config_route_v3_Decorator__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_Tracing_submsgs[4] = {
+static const upb_msglayout *const envoy_config_route_v3_Tracing_submsgs[2] = {
&envoy_type_tracing_v3_CustomTag_msginit,
&envoy_type_v3_FractionalPercent_msginit,
};
static const upb_msglayout_field envoy_config_route_v3_Tracing__fields[4] = {
- {1, UPB_SIZE(0, 0), 0, 1, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {4, UPB_SIZE(12, 24), 0, 0, 11, 3},
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 1, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 1, 11, 1},
+ {4, UPB_SIZE(16, 32), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_route_v3_Tracing_msginit = {
&envoy_config_route_v3_Tracing_submsgs[0],
&envoy_config_route_v3_Tracing__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(24, 40), 4, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_VirtualCluster_submsgs[1] = {
@@ -689,7 +694,7 @@ static const upb_msglayout_field envoy_config_route_v3_VirtualCluster__fields[2]
const upb_msglayout envoy_config_route_v3_VirtualCluster_msginit = {
&envoy_config_route_v3_VirtualCluster_submsgs[0],
&envoy_config_route_v3_VirtualCluster__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RateLimit_submsgs[3] = {
@@ -699,54 +704,58 @@ static const upb_msglayout *const envoy_config_route_v3_RateLimit_submsgs[3] = {
};
static const upb_msglayout_field envoy_config_route_v3_RateLimit__fields[4] = {
- {1, UPB_SIZE(8, 16), 0, 2, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(16, 32), 0, 0, 11, 3},
- {4, UPB_SIZE(12, 24), 0, 1, 11, 1},
+ {1, UPB_SIZE(12, 24), 1, 2, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(20, 40), 0, 0, 11, 3},
+ {4, UPB_SIZE(16, 32), 2, 1, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RateLimit_msginit = {
&envoy_config_route_v3_RateLimit_submsgs[0],
&envoy_config_route_v3_RateLimit__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
-static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_submsgs[7] = {
+static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_submsgs[9] = {
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
&envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit,
&envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit,
&envoy_config_route_v3_RateLimit_Action_GenericKey_msginit,
&envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit,
+ &envoy_config_route_v3_RateLimit_Action_MetaData_msginit,
&envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit,
&envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit,
&envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit,
};
-static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action__fields[7] = {
- {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1},
- {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
- {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1},
- {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1},
- {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1},
- {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1},
- {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
+static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action__fields[9] = {
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 8, 11, 1},
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
+ {3, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 7, 11, 1},
+ {4, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 6, 11, 1},
+ {5, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 3, 11, 1},
+ {6, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 4, 11, 1},
+ {7, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 2, 11, 1},
+ {8, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 5, 11, 1},
+ {9, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RateLimit_Action_msginit = {
&envoy_config_route_v3_RateLimit_Action_submsgs[0],
&envoy_config_route_v3_RateLimit_Action__fields[0],
- UPB_SIZE(8, 16), 7, false,
+ UPB_SIZE(8, 16), 9, false, 255,
};
const upb_msglayout envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
const upb_msglayout envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_RequestHeaders__fields[3] = {
@@ -758,13 +767,13 @@ static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_RequestH
const upb_msglayout envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit = {
NULL,
&envoy_config_route_v3_RateLimit_Action_RequestHeaders__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
const upb_msglayout envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_GenericKey__fields[2] = {
@@ -775,7 +784,7 @@ static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_GenericK
const upb_msglayout envoy_config_route_v3_RateLimit_Action_GenericKey_msginit = {
NULL,
&envoy_config_route_v3_RateLimit_Action_GenericKey__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_submsgs[2] = {
@@ -784,15 +793,15 @@ static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_HeaderV
};
static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_HeaderValueMatch__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 3},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {3, UPB_SIZE(16, 32), 0, 0, 11, 3},
};
const upb_msglayout envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit = {
&envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_submsgs[0],
&envoy_config_route_v3_RateLimit_Action_HeaderValueMatch__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_DynamicMetaData_submsgs[1] = {
@@ -800,15 +809,32 @@ static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_Dynamic
};
static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_DynamicMetaData__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
};
const upb_msglayout envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit = {
&envoy_config_route_v3_RateLimit_Action_DynamicMetaData_submsgs[0],
&envoy_config_route_v3_RateLimit_Action_DynamicMetaData__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_route_v3_RateLimit_Action_MetaData_submsgs[1] = {
+ &envoy_type_metadata_v3_MetadataKey_msginit,
+};
+
+static const upb_msglayout_field envoy_config_route_v3_RateLimit_Action_MetaData__fields[4] = {
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(24, 40), 1, 0, 11, 1},
+ {3, UPB_SIZE(16, 24), 0, 0, 9, 1},
+ {4, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_config_route_v3_RateLimit_Action_MetaData_msginit = {
+ &envoy_config_route_v3_RateLimit_Action_MetaData_submsgs[0],
+ &envoy_config_route_v3_RateLimit_Action_MetaData__fields[0],
+ UPB_SIZE(32, 48), 4, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RateLimit_Override_submsgs[1] = {
@@ -822,7 +848,7 @@ static const upb_msglayout_field envoy_config_route_v3_RateLimit_Override__field
const upb_msglayout envoy_config_route_v3_RateLimit_Override_msginit = {
&envoy_config_route_v3_RateLimit_Override_submsgs[0],
&envoy_config_route_v3_RateLimit_Override__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_RateLimit_Override_DynamicMetadata_submsgs[1] = {
@@ -830,13 +856,13 @@ static const upb_msglayout *const envoy_config_route_v3_RateLimit_Override_Dynam
};
static const upb_msglayout_field envoy_config_route_v3_RateLimit_Override_DynamicMetadata__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit = {
&envoy_config_route_v3_RateLimit_Override_DynamicMetadata_submsgs[0],
&envoy_config_route_v3_RateLimit_Override_DynamicMetadata__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_HeaderMatcher_submsgs[2] = {
@@ -859,7 +885,7 @@ static const upb_msglayout_field envoy_config_route_v3_HeaderMatcher__fields[9]
const upb_msglayout envoy_config_route_v3_HeaderMatcher_msginit = {
&envoy_config_route_v3_HeaderMatcher_submsgs[0],
&envoy_config_route_v3_HeaderMatcher__fields[0],
- UPB_SIZE(24, 48), 9, false,
+ UPB_SIZE(24, 48), 9, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_QueryParameterMatcher_submsgs[1] = {
@@ -875,7 +901,7 @@ static const upb_msglayout_field envoy_config_route_v3_QueryParameterMatcher__fi
const upb_msglayout envoy_config_route_v3_QueryParameterMatcher_msginit = {
&envoy_config_route_v3_QueryParameterMatcher_submsgs[0],
&envoy_config_route_v3_QueryParameterMatcher__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_InternalRedirectPolicy_submsgs[2] = {
@@ -884,16 +910,31 @@ static const upb_msglayout *const envoy_config_route_v3_InternalRedirectPolicy_s
};
static const upb_msglayout_field envoy_config_route_v3_InternalRedirectPolicy__fields[4] = {
- {1, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
{2, UPB_SIZE(8, 16), 0, 0, 13, _UPB_LABEL_PACKED},
{3, UPB_SIZE(12, 24), 0, 0, 11, 3},
- {4, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {4, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_route_v3_InternalRedirectPolicy_msginit = {
&envoy_config_route_v3_InternalRedirectPolicy_submsgs[0],
&envoy_config_route_v3_InternalRedirectPolicy__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(16, 32), 4, false, 255,
+};
+
+static const upb_msglayout *const envoy_config_route_v3_FilterConfig_submsgs[1] = {
+ &google_protobuf_Any_msginit,
+};
+
+static const upb_msglayout_field envoy_config_route_v3_FilterConfig__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(1, 1), 0, 0, 8, 1},
+};
+
+const upb_msglayout envoy_config_route_v3_FilterConfig_msginit = {
+ &envoy_config_route_v3_FilterConfig_submsgs[0],
+ &envoy_config_route_v3_FilterConfig__fields[0],
+ UPB_SIZE(8, 16), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h
index 863c7a6b6a4..4f98c01552c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -64,11 +65,13 @@ struct envoy_config_route_v3_RateLimit_Action_RemoteAddress;
struct envoy_config_route_v3_RateLimit_Action_GenericKey;
struct envoy_config_route_v3_RateLimit_Action_HeaderValueMatch;
struct envoy_config_route_v3_RateLimit_Action_DynamicMetaData;
+struct envoy_config_route_v3_RateLimit_Action_MetaData;
struct envoy_config_route_v3_RateLimit_Override;
struct envoy_config_route_v3_RateLimit_Override_DynamicMetadata;
struct envoy_config_route_v3_HeaderMatcher;
struct envoy_config_route_v3_QueryParameterMatcher;
struct envoy_config_route_v3_InternalRedirectPolicy;
+struct envoy_config_route_v3_FilterConfig;
typedef struct envoy_config_route_v3_VirtualHost envoy_config_route_v3_VirtualHost;
typedef struct envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry;
typedef struct envoy_config_route_v3_FilterAction envoy_config_route_v3_FilterAction;
@@ -114,11 +117,13 @@ typedef struct envoy_config_route_v3_RateLimit_Action_RemoteAddress envoy_config
typedef struct envoy_config_route_v3_RateLimit_Action_GenericKey envoy_config_route_v3_RateLimit_Action_GenericKey;
typedef struct envoy_config_route_v3_RateLimit_Action_HeaderValueMatch envoy_config_route_v3_RateLimit_Action_HeaderValueMatch;
typedef struct envoy_config_route_v3_RateLimit_Action_DynamicMetaData envoy_config_route_v3_RateLimit_Action_DynamicMetaData;
+typedef struct envoy_config_route_v3_RateLimit_Action_MetaData envoy_config_route_v3_RateLimit_Action_MetaData;
typedef struct envoy_config_route_v3_RateLimit_Override envoy_config_route_v3_RateLimit_Override;
typedef struct envoy_config_route_v3_RateLimit_Override_DynamicMetadata envoy_config_route_v3_RateLimit_Override_DynamicMetadata;
typedef struct envoy_config_route_v3_HeaderMatcher envoy_config_route_v3_HeaderMatcher;
typedef struct envoy_config_route_v3_QueryParameterMatcher envoy_config_route_v3_QueryParameterMatcher;
typedef struct envoy_config_route_v3_InternalRedirectPolicy envoy_config_route_v3_InternalRedirectPolicy;
+typedef struct envoy_config_route_v3_FilterConfig envoy_config_route_v3_FilterConfig;
extern const upb_msglayout envoy_config_route_v3_VirtualHost_msginit;
extern const upb_msglayout envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_msginit;
extern const upb_msglayout envoy_config_route_v3_FilterAction_msginit;
@@ -164,11 +169,13 @@ extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_RemoteAddress_
extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_GenericKey_msginit;
extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit;
extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_MetaData_msginit;
extern const upb_msglayout envoy_config_route_v3_RateLimit_Override_msginit;
extern const upb_msglayout envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit;
extern const upb_msglayout envoy_config_route_v3_HeaderMatcher_msginit;
extern const upb_msglayout envoy_config_route_v3_QueryParameterMatcher_msginit;
extern const upb_msglayout envoy_config_route_v3_InternalRedirectPolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_FilterConfig_msginit;
struct envoy_config_core_v3_DataSource;
struct envoy_config_core_v3_HeaderValueOption;
struct envoy_config_core_v3_Metadata;
@@ -205,6 +212,11 @@ extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
typedef enum {
+ envoy_config_route_v3_RateLimit_Action_MetaData_DYNAMIC = 0,
+ envoy_config_route_v3_RateLimit_Action_MetaData_ROUTE_ENTRY = 1
+} envoy_config_route_v3_RateLimit_Action_MetaData_Source;
+
+typedef enum {
envoy_config_route_v3_RedirectAction_MOVED_PERMANENTLY = 0,
envoy_config_route_v3_RedirectAction_FOUND = 1,
envoy_config_route_v3_RedirectAction_SEE_OTHER = 2,
@@ -244,6 +256,12 @@ UPB_INLINE envoy_config_route_v3_VirtualHost *envoy_config_route_v3_VirtualHost_
envoy_config_route_v3_VirtualHost *ret = envoy_config_route_v3_VirtualHost_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_VirtualHost_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_VirtualHost *envoy_config_route_v3_VirtualHost_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_VirtualHost *ret = envoy_config_route_v3_VirtualHost_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_VirtualHost_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_VirtualHost_serialize(const envoy_config_route_v3_VirtualHost *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_VirtualHost_msginit, arena, len);
}
@@ -252,14 +270,14 @@ UPB_INLINE upb_strview envoy_config_route_v3_VirtualHost_name(const envoy_config
UPB_INLINE upb_strview const* envoy_config_route_v3_VirtualHost_domains(const envoy_config_route_v3_VirtualHost *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_routes(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
UPB_INLINE const envoy_config_route_v3_Route* const* envoy_config_route_v3_VirtualHost_routes(const envoy_config_route_v3_VirtualHost *msg, size_t *len) { return (const envoy_config_route_v3_Route* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
-UPB_INLINE int32_t envoy_config_route_v3_VirtualHost_require_tls(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t envoy_config_route_v3_VirtualHost_require_tls(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_virtual_clusters(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); }
UPB_INLINE const envoy_config_route_v3_VirtualCluster* const* envoy_config_route_v3_VirtualHost_virtual_clusters(const envoy_config_route_v3_VirtualHost *msg, size_t *len) { return (const envoy_config_route_v3_VirtualCluster* const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_rate_limits(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 96)); }
UPB_INLINE const envoy_config_route_v3_RateLimit* const* envoy_config_route_v3_VirtualHost_rate_limits(const envoy_config_route_v3_VirtualHost *msg, size_t *len) { return (const envoy_config_route_v3_RateLimit* const*)_upb_array_accessor(msg, UPB_SIZE(52, 96), len); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_request_headers_to_add(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 104)); }
UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_VirtualHost_request_headers_to_add(const envoy_config_route_v3_VirtualHost *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(56, 104), len); }
-UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_cors(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_cors(const envoy_config_route_v3_VirtualHost *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const envoy_config_route_v3_CorsPolicy* envoy_config_route_v3_VirtualHost_cors(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const envoy_config_route_v3_CorsPolicy*); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_response_headers_to_add(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 112)); }
UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_VirtualHost_response_headers_to_add(const envoy_config_route_v3_VirtualHost *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(60, 112), len); }
@@ -270,14 +288,14 @@ UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_typed_per_filter_config(co
UPB_INLINE size_t envoy_config_route_v3_VirtualHost_typed_per_filter_config_size(const envoy_config_route_v3_VirtualHost *msg) {return _upb_msg_map_size(msg, UPB_SIZE(72, 136)); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_typed_per_filter_config_get(const envoy_config_route_v3_VirtualHost *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(72, 136), &key, 0, val, sizeof(*val)); }
UPB_INLINE const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry* envoy_config_route_v3_VirtualHost_typed_per_filter_config_next(const envoy_config_route_v3_VirtualHost *msg, size_t* iter) { return (const envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(72, 136), iter); }
-UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_retry_policy(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
+UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_retry_policy(const envoy_config_route_v3_VirtualHost *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_VirtualHost_retry_policy(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_config_route_v3_RetryPolicy*); }
-UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_hedge_policy(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
+UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_hedge_policy(const envoy_config_route_v3_VirtualHost *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_VirtualHost_hedge_policy(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_config_route_v3_HedgePolicy*); }
-UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_per_request_buffer_limit_bytes(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_per_request_buffer_limit_bytes(const envoy_config_route_v3_VirtualHost *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_VirtualHost_per_request_buffer_limit_bytes(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct google_protobuf_UInt32Value*); }
UPB_INLINE bool envoy_config_route_v3_VirtualHost_include_attempt_count_in_response(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); }
-UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_retry_policy_typed_config(const envoy_config_route_v3_VirtualHost *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
+UPB_INLINE bool envoy_config_route_v3_VirtualHost_has_retry_policy_typed_config(const envoy_config_route_v3_VirtualHost *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE const struct google_protobuf_Any* envoy_config_route_v3_VirtualHost_retry_policy_typed_config(const envoy_config_route_v3_VirtualHost *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_name(envoy_config_route_v3_VirtualHost *msg, upb_strview value) {
@@ -287,38 +305,38 @@ UPB_INLINE upb_strview* envoy_config_route_v3_VirtualHost_mutable_domains(envoy_
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_VirtualHost_resize_domains(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_VirtualHost_add_domains(envoy_config_route_v3_VirtualHost *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(40, 72), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE envoy_config_route_v3_Route** envoy_config_route_v3_VirtualHost_mutable_routes(envoy_config_route_v3_VirtualHost *msg, size_t *len) {
return (envoy_config_route_v3_Route**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
}
UPB_INLINE envoy_config_route_v3_Route** envoy_config_route_v3_VirtualHost_resize_routes(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_Route**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_Route**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_Route* envoy_config_route_v3_VirtualHost_add_routes(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
struct envoy_config_route_v3_Route* sub = (struct envoy_config_route_v3_Route*)_upb_msg_new(&envoy_config_route_v3_Route_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_require_tls(envoy_config_route_v3_VirtualHost *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE envoy_config_route_v3_VirtualCluster** envoy_config_route_v3_VirtualHost_mutable_virtual_clusters(envoy_config_route_v3_VirtualHost *msg, size_t *len) {
return (envoy_config_route_v3_VirtualCluster**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len);
}
UPB_INLINE envoy_config_route_v3_VirtualCluster** envoy_config_route_v3_VirtualHost_resize_virtual_clusters(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_VirtualCluster**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_VirtualCluster**)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_VirtualCluster* envoy_config_route_v3_VirtualHost_add_virtual_clusters(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
struct envoy_config_route_v3_VirtualCluster* sub = (struct envoy_config_route_v3_VirtualCluster*)_upb_msg_new(&envoy_config_route_v3_VirtualCluster_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(48, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(48, 88), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -326,12 +344,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit** envoy_config_route_v3_VirtualHost_m
return (envoy_config_route_v3_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 96), len);
}
UPB_INLINE envoy_config_route_v3_RateLimit** envoy_config_route_v3_VirtualHost_resize_rate_limits(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RateLimit**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 96), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RateLimit**)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 96), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RateLimit* envoy_config_route_v3_VirtualHost_add_rate_limits(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
struct envoy_config_route_v3_RateLimit* sub = (struct envoy_config_route_v3_RateLimit*)_upb_msg_new(&envoy_config_route_v3_RateLimit_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(52, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(52, 96), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -339,16 +357,17 @@ UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3
return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 104), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_VirtualHost_resize_request_headers_to_add(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 104), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(56, 104), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_VirtualHost_add_request_headers_to_add(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(56, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(56, 104), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_cors(envoy_config_route_v3_VirtualHost *msg, envoy_config_route_v3_CorsPolicy* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), envoy_config_route_v3_CorsPolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_CorsPolicy* envoy_config_route_v3_VirtualHost_mutable_cors(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
@@ -364,12 +383,12 @@ UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3
return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 112), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_VirtualHost_resize_response_headers_to_add(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(60, 112), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(60, 112), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_VirtualHost_add_response_headers_to_add(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(60, 112), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(60, 112), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -377,20 +396,20 @@ UPB_INLINE upb_strview* envoy_config_route_v3_VirtualHost_mutable_response_heade
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(64, 120), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_VirtualHost_resize_response_headers_to_remove(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(64, 120), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(64, 120), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_VirtualHost_add_response_headers_to_remove(envoy_config_route_v3_VirtualHost *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(64, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(64, 120), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_config_route_v3_VirtualHost_mutable_request_headers_to_remove(envoy_config_route_v3_VirtualHost *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(68, 128), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_VirtualHost_resize_request_headers_to_remove(envoy_config_route_v3_VirtualHost *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(68, 128), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(68, 128), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_VirtualHost_add_request_headers_to_remove(envoy_config_route_v3_VirtualHost *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(68, 128), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(68, 128), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_include_request_attempt_count(envoy_config_route_v3_VirtualHost *msg, bool value) {
@@ -401,6 +420,7 @@ UPB_INLINE bool envoy_config_route_v3_VirtualHost_typed_per_filter_config_set(en
UPB_INLINE bool envoy_config_route_v3_VirtualHost_typed_per_filter_config_delete(envoy_config_route_v3_VirtualHost *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(72, 136), &key, 0); }
UPB_INLINE envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry* envoy_config_route_v3_VirtualHost_typed_per_filter_config_nextmutable(envoy_config_route_v3_VirtualHost *msg, size_t* iter) { return (envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(72, 136), iter); }
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_retry_policy(envoy_config_route_v3_VirtualHost *msg, envoy_config_route_v3_RetryPolicy* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_config_route_v3_RetryPolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_VirtualHost_mutable_retry_policy(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
@@ -413,6 +433,7 @@ UPB_INLINE struct envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_Virtu
return sub;
}
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_hedge_policy(envoy_config_route_v3_VirtualHost *msg, envoy_config_route_v3_HedgePolicy* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_config_route_v3_HedgePolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_VirtualHost_mutable_hedge_policy(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
@@ -425,6 +446,7 @@ UPB_INLINE struct envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_Virtu
return sub;
}
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_per_request_buffer_limit_bytes(envoy_config_route_v3_VirtualHost *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_VirtualHost_mutable_per_request_buffer_limit_bytes(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
@@ -440,6 +462,7 @@ UPB_INLINE void envoy_config_route_v3_VirtualHost_set_include_attempt_count_in_r
*UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value;
}
UPB_INLINE void envoy_config_route_v3_VirtualHost_set_retry_policy_typed_config(envoy_config_route_v3_VirtualHost *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_route_v3_VirtualHost_mutable_retry_policy_typed_config(envoy_config_route_v3_VirtualHost *msg, upb_arena *arena) {
@@ -480,15 +503,22 @@ UPB_INLINE envoy_config_route_v3_FilterAction *envoy_config_route_v3_FilterActio
envoy_config_route_v3_FilterAction *ret = envoy_config_route_v3_FilterAction_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_FilterAction_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_FilterAction *envoy_config_route_v3_FilterAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_FilterAction *ret = envoy_config_route_v3_FilterAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_FilterAction_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_FilterAction_serialize(const envoy_config_route_v3_FilterAction *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_FilterAction_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_FilterAction_has_action(const envoy_config_route_v3_FilterAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_route_v3_FilterAction_action(const envoy_config_route_v3_FilterAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_config_route_v3_FilterAction_has_action(const envoy_config_route_v3_FilterAction *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_route_v3_FilterAction_action(const envoy_config_route_v3_FilterAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_config_route_v3_FilterAction_set_action(envoy_config_route_v3_FilterAction *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_route_v3_FilterAction_mutable_action(envoy_config_route_v3_FilterAction *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_route_v3_FilterAction_action(msg);
@@ -510,6 +540,12 @@ UPB_INLINE envoy_config_route_v3_Route *envoy_config_route_v3_Route_parse(const
envoy_config_route_v3_Route *ret = envoy_config_route_v3_Route_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_Route_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_Route *envoy_config_route_v3_Route_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_Route *ret = envoy_config_route_v3_Route_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_Route_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_Route_serialize(const envoy_config_route_v3_Route *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_Route_msginit, arena, len);
}
@@ -521,40 +557,41 @@ typedef enum {
envoy_config_route_v3_Route_action_filter_action = 17,
envoy_config_route_v3_Route_action_NOT_SET = 0
} envoy_config_route_v3_Route_action_oneofcases;
-UPB_INLINE envoy_config_route_v3_Route_action_oneofcases envoy_config_route_v3_Route_action_case(const envoy_config_route_v3_Route* msg) { return (envoy_config_route_v3_Route_action_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(52, 104), int32_t); }
-
-UPB_INLINE bool envoy_config_route_v3_Route_has_match(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_config_route_v3_RouteMatch* envoy_config_route_v3_Route_match(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_route_v3_RouteMatch*); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_route(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 2; }
-UPB_INLINE const envoy_config_route_v3_RouteAction* envoy_config_route_v3_Route_route(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RouteAction*, UPB_SIZE(48, 96), UPB_SIZE(52, 104), 2, NULL); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_redirect(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 3; }
-UPB_INLINE const envoy_config_route_v3_RedirectAction* envoy_config_route_v3_Route_redirect(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RedirectAction*, UPB_SIZE(48, 96), UPB_SIZE(52, 104), 3, NULL); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_metadata(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_route_v3_Route_metadata(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_decorator(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const envoy_config_route_v3_Decorator* envoy_config_route_v3_Route_decorator(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_route_v3_Decorator*); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_direct_response(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 7; }
-UPB_INLINE const envoy_config_route_v3_DirectResponseAction* envoy_config_route_v3_Route_direct_response(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_DirectResponseAction*, UPB_SIZE(48, 96), UPB_SIZE(52, 104), 7, NULL); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_request_headers_to_add(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_Route_request_headers_to_add(const envoy_config_route_v3_Route *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_response_headers_to_add(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_Route_response_headers_to_add(const envoy_config_route_v3_Route *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_Route_response_headers_to_remove(const envoy_config_route_v3_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_Route_request_headers_to_remove(const envoy_config_route_v3_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_typed_per_filter_config(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
-UPB_INLINE size_t envoy_config_route_v3_Route_typed_per_filter_config_size(const envoy_config_route_v3_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(44, 88)); }
-UPB_INLINE bool envoy_config_route_v3_Route_typed_per_filter_config_get(const envoy_config_route_v3_Route *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(44, 88), &key, 0, val, sizeof(*val)); }
-UPB_INLINE const envoy_config_route_v3_Route_TypedPerFilterConfigEntry* envoy_config_route_v3_Route_typed_per_filter_config_next(const envoy_config_route_v3_Route *msg, size_t* iter) { return (const envoy_config_route_v3_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 88), iter); }
-UPB_INLINE upb_strview envoy_config_route_v3_Route_name(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_tracing(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const envoy_config_route_v3_Tracing* envoy_config_route_v3_Route_tracing(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const envoy_config_route_v3_Tracing*); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_per_request_buffer_limit_bytes(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_Route_per_request_buffer_limit_bytes(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_route_v3_Route_has_filter_action(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 17; }
-UPB_INLINE const envoy_config_route_v3_FilterAction* envoy_config_route_v3_Route_filter_action(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_FilterAction*, UPB_SIZE(48, 96), UPB_SIZE(52, 104), 17, NULL); }
+UPB_INLINE envoy_config_route_v3_Route_action_oneofcases envoy_config_route_v3_Route_action_case(const envoy_config_route_v3_Route* msg) { return (envoy_config_route_v3_Route_action_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(56, 112), int32_t); }
+
+UPB_INLINE bool envoy_config_route_v3_Route_has_match(const envoy_config_route_v3_Route *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_route_v3_RouteMatch* envoy_config_route_v3_Route_match(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_route_v3_RouteMatch*); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_route(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 2; }
+UPB_INLINE const envoy_config_route_v3_RouteAction* envoy_config_route_v3_Route_route(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RouteAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 2, NULL); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_redirect(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 3; }
+UPB_INLINE const envoy_config_route_v3_RedirectAction* envoy_config_route_v3_Route_redirect(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RedirectAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 3, NULL); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_metadata(const envoy_config_route_v3_Route *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_route_v3_Route_metadata(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_Metadata*); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_decorator(const envoy_config_route_v3_Route *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_config_route_v3_Decorator* envoy_config_route_v3_Route_decorator(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const envoy_config_route_v3_Decorator*); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_direct_response(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 7; }
+UPB_INLINE const envoy_config_route_v3_DirectResponseAction* envoy_config_route_v3_Route_direct_response(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_DirectResponseAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 7, NULL); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_request_headers_to_add(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_Route_request_headers_to_add(const envoy_config_route_v3_Route *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_response_headers_to_add(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_Route_response_headers_to_add(const envoy_config_route_v3_Route *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_Route_response_headers_to_remove(const envoy_config_route_v3_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_Route_request_headers_to_remove(const envoy_config_route_v3_Route *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_typed_per_filter_config(const envoy_config_route_v3_Route *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 96)); }
+UPB_INLINE size_t envoy_config_route_v3_Route_typed_per_filter_config_size(const envoy_config_route_v3_Route *msg) {return _upb_msg_map_size(msg, UPB_SIZE(48, 96)); }
+UPB_INLINE bool envoy_config_route_v3_Route_typed_per_filter_config_get(const envoy_config_route_v3_Route *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(48, 96), &key, 0, val, sizeof(*val)); }
+UPB_INLINE const envoy_config_route_v3_Route_TypedPerFilterConfigEntry* envoy_config_route_v3_Route_typed_per_filter_config_next(const envoy_config_route_v3_Route *msg, size_t* iter) { return (const envoy_config_route_v3_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(48, 96), iter); }
+UPB_INLINE upb_strview envoy_config_route_v3_Route_name(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_tracing(const envoy_config_route_v3_Route *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_config_route_v3_Tracing* envoy_config_route_v3_Route_tracing(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const envoy_config_route_v3_Tracing*); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_per_request_buffer_limit_bytes(const envoy_config_route_v3_Route *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_Route_per_request_buffer_limit_bytes(const envoy_config_route_v3_Route *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_route_v3_Route_has_filter_action(const envoy_config_route_v3_Route *msg) { return _upb_getoneofcase(msg, UPB_SIZE(56, 112)) == 17; }
+UPB_INLINE const envoy_config_route_v3_FilterAction* envoy_config_route_v3_Route_filter_action(const envoy_config_route_v3_Route *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_FilterAction*, UPB_SIZE(52, 104), UPB_SIZE(56, 112), 17, NULL); }
UPB_INLINE void envoy_config_route_v3_Route_set_match(envoy_config_route_v3_Route *msg, envoy_config_route_v3_RouteMatch* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_route_v3_RouteMatch*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_route_v3_RouteMatch*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RouteMatch* envoy_config_route_v3_Route_mutable_match(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteMatch* sub = (struct envoy_config_route_v3_RouteMatch*)envoy_config_route_v3_Route_match(msg);
@@ -566,7 +603,7 @@ UPB_INLINE struct envoy_config_route_v3_RouteMatch* envoy_config_route_v3_Route_
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_route(envoy_config_route_v3_Route *msg, envoy_config_route_v3_RouteAction* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RouteAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 2);
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RouteAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 2);
}
UPB_INLINE struct envoy_config_route_v3_RouteAction* envoy_config_route_v3_Route_mutable_route(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteAction* sub = (struct envoy_config_route_v3_RouteAction*)envoy_config_route_v3_Route_route(msg);
@@ -578,7 +615,7 @@ UPB_INLINE struct envoy_config_route_v3_RouteAction* envoy_config_route_v3_Route
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_redirect(envoy_config_route_v3_Route *msg, envoy_config_route_v3_RedirectAction* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RedirectAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 3);
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RedirectAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 3);
}
UPB_INLINE struct envoy_config_route_v3_RedirectAction* envoy_config_route_v3_Route_mutable_redirect(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_RedirectAction* sub = (struct envoy_config_route_v3_RedirectAction*)envoy_config_route_v3_Route_redirect(msg);
@@ -590,7 +627,8 @@ UPB_INLINE struct envoy_config_route_v3_RedirectAction* envoy_config_route_v3_Ro
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_metadata(envoy_config_route_v3_Route *msg, struct envoy_config_core_v3_Metadata* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_Metadata*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_route_v3_Route_mutable_metadata(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_core_v3_Metadata* sub = (struct envoy_config_core_v3_Metadata*)envoy_config_route_v3_Route_metadata(msg);
@@ -602,7 +640,8 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_route_v3_Route_mut
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_decorator(envoy_config_route_v3_Route *msg, envoy_config_route_v3_Decorator* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_route_v3_Decorator*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), envoy_config_route_v3_Decorator*) = value;
}
UPB_INLINE struct envoy_config_route_v3_Decorator* envoy_config_route_v3_Route_mutable_decorator(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_Decorator* sub = (struct envoy_config_route_v3_Decorator*)envoy_config_route_v3_Route_decorator(msg);
@@ -614,7 +653,7 @@ UPB_INLINE struct envoy_config_route_v3_Decorator* envoy_config_route_v3_Route_m
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_direct_response(envoy_config_route_v3_Route *msg, envoy_config_route_v3_DirectResponseAction* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_route_v3_DirectResponseAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 7);
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_DirectResponseAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 7);
}
UPB_INLINE struct envoy_config_route_v3_DirectResponseAction* envoy_config_route_v3_Route_mutable_direct_response(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_DirectResponseAction* sub = (struct envoy_config_route_v3_DirectResponseAction*)envoy_config_route_v3_Route_direct_response(msg);
@@ -626,60 +665,61 @@ UPB_INLINE struct envoy_config_route_v3_DirectResponseAction* envoy_config_route
return sub;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_Route_mutable_request_headers_to_add(envoy_config_route_v3_Route *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_Route_resize_request_headers_to_add(envoy_config_route_v3_Route *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_Route_add_request_headers_to_add(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_Route_mutable_response_headers_to_add(envoy_config_route_v3_Route *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_Route_resize_response_headers_to_add(envoy_config_route_v3_Route *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_Route_add_response_headers_to_add(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_config_route_v3_Route_mutable_response_headers_to_remove(envoy_config_route_v3_Route *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_Route_resize_response_headers_to_remove(envoy_config_route_v3_Route *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_Route_add_response_headers_to_remove(envoy_config_route_v3_Route *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(40, 80), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_config_route_v3_Route_mutable_request_headers_to_remove(envoy_config_route_v3_Route *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_Route_resize_request_headers_to_remove(envoy_config_route_v3_Route *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_Route_add_request_headers_to_remove(envoy_config_route_v3_Route *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 80), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val,
arena);
}
-UPB_INLINE void envoy_config_route_v3_Route_typed_per_filter_config_clear(envoy_config_route_v3_Route *msg) { _upb_msg_map_clear(msg, UPB_SIZE(44, 88)); }
-UPB_INLINE bool envoy_config_route_v3_Route_typed_per_filter_config_set(envoy_config_route_v3_Route *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(44, 88), &key, 0, &val, sizeof(val), a); }
-UPB_INLINE bool envoy_config_route_v3_Route_typed_per_filter_config_delete(envoy_config_route_v3_Route *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(44, 88), &key, 0); }
-UPB_INLINE envoy_config_route_v3_Route_TypedPerFilterConfigEntry* envoy_config_route_v3_Route_typed_per_filter_config_nextmutable(envoy_config_route_v3_Route *msg, size_t* iter) { return (envoy_config_route_v3_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(44, 88), iter); }
+UPB_INLINE void envoy_config_route_v3_Route_typed_per_filter_config_clear(envoy_config_route_v3_Route *msg) { _upb_msg_map_clear(msg, UPB_SIZE(48, 96)); }
+UPB_INLINE bool envoy_config_route_v3_Route_typed_per_filter_config_set(envoy_config_route_v3_Route *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(48, 96), &key, 0, &val, sizeof(val), a); }
+UPB_INLINE bool envoy_config_route_v3_Route_typed_per_filter_config_delete(envoy_config_route_v3_Route *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(48, 96), &key, 0); }
+UPB_INLINE envoy_config_route_v3_Route_TypedPerFilterConfigEntry* envoy_config_route_v3_Route_typed_per_filter_config_nextmutable(envoy_config_route_v3_Route *msg, size_t* iter) { return (envoy_config_route_v3_Route_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(48, 96), iter); }
UPB_INLINE void envoy_config_route_v3_Route_set_name(envoy_config_route_v3_Route *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_Route_set_tracing(envoy_config_route_v3_Route *msg, envoy_config_route_v3_Tracing* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), envoy_config_route_v3_Tracing*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), envoy_config_route_v3_Tracing*) = value;
}
UPB_INLINE struct envoy_config_route_v3_Tracing* envoy_config_route_v3_Route_mutable_tracing(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_Tracing* sub = (struct envoy_config_route_v3_Tracing*)envoy_config_route_v3_Route_tracing(msg);
@@ -691,7 +731,8 @@ UPB_INLINE struct envoy_config_route_v3_Tracing* envoy_config_route_v3_Route_mut
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_per_request_buffer_limit_bytes(envoy_config_route_v3_Route *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_Route_mutable_per_request_buffer_limit_bytes(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_Route_per_request_buffer_limit_bytes(msg);
@@ -703,7 +744,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_Route_mutab
return sub;
}
UPB_INLINE void envoy_config_route_v3_Route_set_filter_action(envoy_config_route_v3_Route *msg, envoy_config_route_v3_FilterAction* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_route_v3_FilterAction*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 17);
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_FilterAction*, UPB_SIZE(52, 104), value, UPB_SIZE(56, 112), 17);
}
UPB_INLINE struct envoy_config_route_v3_FilterAction* envoy_config_route_v3_Route_mutable_filter_action(envoy_config_route_v3_Route *msg, upb_arena *arena) {
struct envoy_config_route_v3_FilterAction* sub = (struct envoy_config_route_v3_FilterAction*)envoy_config_route_v3_Route_filter_action(msg);
@@ -743,34 +784,41 @@ UPB_INLINE envoy_config_route_v3_WeightedCluster *envoy_config_route_v3_Weighted
envoy_config_route_v3_WeightedCluster *ret = envoy_config_route_v3_WeightedCluster_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_WeightedCluster_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_WeightedCluster *envoy_config_route_v3_WeightedCluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_WeightedCluster *ret = envoy_config_route_v3_WeightedCluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_WeightedCluster_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_WeightedCluster_serialize(const envoy_config_route_v3_WeightedCluster *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_WeightedCluster_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_has_clusters(const envoy_config_route_v3_WeightedCluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_route_v3_WeightedCluster_ClusterWeight* const* envoy_config_route_v3_WeightedCluster_clusters(const envoy_config_route_v3_WeightedCluster *msg, size_t *len) { return (const envoy_config_route_v3_WeightedCluster_ClusterWeight* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE upb_strview envoy_config_route_v3_WeightedCluster_runtime_key_prefix(const envoy_config_route_v3_WeightedCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_has_total_weight(const envoy_config_route_v3_WeightedCluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedCluster_total_weight(const envoy_config_route_v3_WeightedCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_has_clusters(const envoy_config_route_v3_WeightedCluster *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_config_route_v3_WeightedCluster_ClusterWeight* const* envoy_config_route_v3_WeightedCluster_clusters(const envoy_config_route_v3_WeightedCluster *msg, size_t *len) { return (const envoy_config_route_v3_WeightedCluster_ClusterWeight* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE upb_strview envoy_config_route_v3_WeightedCluster_runtime_key_prefix(const envoy_config_route_v3_WeightedCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_has_total_weight(const envoy_config_route_v3_WeightedCluster *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedCluster_total_weight(const envoy_config_route_v3_WeightedCluster *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight** envoy_config_route_v3_WeightedCluster_mutable_clusters(envoy_config_route_v3_WeightedCluster *msg, size_t *len) {
- return (envoy_config_route_v3_WeightedCluster_ClusterWeight**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (envoy_config_route_v3_WeightedCluster_ClusterWeight**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight** envoy_config_route_v3_WeightedCluster_resize_clusters(envoy_config_route_v3_WeightedCluster *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_WeightedCluster_ClusterWeight**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_WeightedCluster_ClusterWeight**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_WeightedCluster_ClusterWeight* envoy_config_route_v3_WeightedCluster_add_clusters(envoy_config_route_v3_WeightedCluster *msg, upb_arena *arena) {
struct envoy_config_route_v3_WeightedCluster_ClusterWeight* sub = (struct envoy_config_route_v3_WeightedCluster_ClusterWeight*)_upb_msg_new(&envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_WeightedCluster_set_runtime_key_prefix(envoy_config_route_v3_WeightedCluster *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_WeightedCluster_set_total_weight(envoy_config_route_v3_WeightedCluster *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedCluster_mutable_total_weight(envoy_config_route_v3_WeightedCluster *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_WeightedCluster_total_weight(msg);
@@ -792,31 +840,38 @@ UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight *envoy_config_rou
envoy_config_route_v3_WeightedCluster_ClusterWeight *ret = envoy_config_route_v3_WeightedCluster_ClusterWeight_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight *envoy_config_route_v3_WeightedCluster_ClusterWeight_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_WeightedCluster_ClusterWeight *ret = envoy_config_route_v3_WeightedCluster_ClusterWeight_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_WeightedCluster_ClusterWeight_serialize(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_WeightedCluster_ClusterWeight_name(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_weight(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedCluster_ClusterWeight_weight(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_metadata_match(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_route_v3_WeightedCluster_ClusterWeight_metadata_match(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_request_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_WeightedCluster_ClusterWeight_request_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_response_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_WeightedCluster_ClusterWeight_response_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_WeightedCluster_ClusterWeight_response_headers_to_remove(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE upb_strview const* envoy_config_route_v3_WeightedCluster_ClusterWeight_request_headers_to_remove(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_typed_per_filter_config(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE size_t envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_size(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) {return _upb_msg_map_size(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_get(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(32, 64), &key, 0, val, sizeof(*val)); }
-UPB_INLINE const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_next(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); }
+UPB_INLINE upb_strview envoy_config_route_v3_WeightedCluster_ClusterWeight_name(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_weight(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedCluster_ClusterWeight_weight(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_metadata_match(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_route_v3_WeightedCluster_ClusterWeight_metadata_match(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_Metadata*); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_request_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_WeightedCluster_ClusterWeight_request_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_response_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_config_route_v3_WeightedCluster_ClusterWeight_response_headers_to_add(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_WeightedCluster_ClusterWeight_response_headers_to_remove(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+UPB_INLINE upb_strview const* envoy_config_route_v3_WeightedCluster_ClusterWeight_request_headers_to_remove(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_has_typed_per_filter_config(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE size_t envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_size(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) {return _upb_msg_map_size(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_get(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* *val) { return _upb_msg_map_get(msg, UPB_SIZE(36, 72), &key, 0, val, sizeof(*val)); }
+UPB_INLINE const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_next(const envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (const envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); }
UPB_INLINE void envoy_config_route_v3_WeightedCluster_ClusterWeight_set_name(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_WeightedCluster_ClusterWeight_set_weight(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedCluster_ClusterWeight_mutable_weight(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_WeightedCluster_ClusterWeight_weight(msg);
@@ -828,7 +883,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_WeightedClu
return sub;
}
UPB_INLINE void envoy_config_route_v3_WeightedCluster_ClusterWeight_set_metadata_match(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, struct envoy_config_core_v3_Metadata* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_Metadata*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_route_v3_WeightedCluster_ClusterWeight_mutable_metadata_match(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_arena *arena) {
struct envoy_config_core_v3_Metadata* sub = (struct envoy_config_core_v3_Metadata*)envoy_config_route_v3_WeightedCluster_ClusterWeight_metadata_match(msg);
@@ -840,55 +896,55 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_route_v3_WeightedC
return sub;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_WeightedCluster_ClusterWeight_mutable_request_headers_to_add(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_WeightedCluster_ClusterWeight_resize_request_headers_to_add(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_WeightedCluster_ClusterWeight_add_request_headers_to_add(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_WeightedCluster_ClusterWeight_mutable_response_headers_to_add(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_config_route_v3_WeightedCluster_ClusterWeight_resize_response_headers_to_add(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_config_route_v3_WeightedCluster_ClusterWeight_add_response_headers_to_add(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE upb_strview* envoy_config_route_v3_WeightedCluster_ClusterWeight_mutable_response_headers_to_remove(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_WeightedCluster_ClusterWeight_resize_response_headers_to_remove(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_add_response_headers_to_remove(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_config_route_v3_WeightedCluster_ClusterWeight_mutable_request_headers_to_remove(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE upb_strview* envoy_config_route_v3_WeightedCluster_ClusterWeight_resize_request_headers_to_remove(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_add_request_headers_to_remove(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(32, 64), UPB_SIZE(3, 4), &val,
arena);
}
-UPB_INLINE void envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_clear(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { _upb_msg_map_clear(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_set(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(32, 64), &key, 0, &val, sizeof(val), a); }
-UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_delete(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(32, 64), &key, 0); }
-UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_nextmutable(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); }
+UPB_INLINE void envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_clear(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg) { _upb_msg_map_clear(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_set(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview key, struct google_protobuf_Any* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(36, 72), &key, 0, &val, sizeof(val), a); }
+UPB_INLINE bool envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_delete(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(36, 72), &key, 0); }
+UPB_INLINE envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry* envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_nextmutable(envoy_config_route_v3_WeightedCluster_ClusterWeight *msg, size_t* iter) { return (envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); }
/* envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry */
@@ -918,6 +974,12 @@ UPB_INLINE envoy_config_route_v3_RouteMatch *envoy_config_route_v3_RouteMatch_pa
envoy_config_route_v3_RouteMatch *ret = envoy_config_route_v3_RouteMatch_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteMatch *envoy_config_route_v3_RouteMatch_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteMatch *ret = envoy_config_route_v3_RouteMatch_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteMatch_serialize(const envoy_config_route_v3_RouteMatch *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteMatch_msginit, arena, len);
}
@@ -929,37 +991,38 @@ typedef enum {
envoy_config_route_v3_RouteMatch_path_specifier_connect_matcher = 12,
envoy_config_route_v3_RouteMatch_path_specifier_NOT_SET = 0
} envoy_config_route_v3_RouteMatch_path_specifier_oneofcases;
-UPB_INLINE envoy_config_route_v3_RouteMatch_path_specifier_oneofcases envoy_config_route_v3_RouteMatch_path_specifier_case(const envoy_config_route_v3_RouteMatch* msg) { return (envoy_config_route_v3_RouteMatch_path_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 64), int32_t); }
-
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_prefix(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 1; }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteMatch_prefix(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 1, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_path(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 2; }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteMatch_path(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 2, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_case_sensitive(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_case_sensitive(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_headers(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RouteMatch_headers(const envoy_config_route_v3_RouteMatch *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_query_parameters(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const envoy_config_route_v3_QueryParameterMatcher* const* envoy_config_route_v3_RouteMatch_query_parameters(const envoy_config_route_v3_RouteMatch *msg, size_t *len) { return (const envoy_config_route_v3_QueryParameterMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_grpc(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions* envoy_config_route_v3_RouteMatch_grpc(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions*); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_runtime_fraction(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_RouteMatch_runtime_fraction(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_RuntimeFractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_safe_regex(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 10; }
-UPB_INLINE const struct envoy_type_matcher_v3_RegexMatcher* envoy_config_route_v3_RouteMatch_safe_regex(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_RegexMatcher*, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 10, NULL); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_tls_context(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions* envoy_config_route_v3_RouteMatch_tls_context(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions*); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_connect_matcher(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 12; }
-UPB_INLINE const envoy_config_route_v3_RouteMatch_ConnectMatcher* envoy_config_route_v3_RouteMatch_connect_matcher(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RouteMatch_ConnectMatcher*, UPB_SIZE(24, 48), UPB_SIZE(32, 64), 12, NULL); }
+UPB_INLINE envoy_config_route_v3_RouteMatch_path_specifier_oneofcases envoy_config_route_v3_RouteMatch_path_specifier_case(const envoy_config_route_v3_RouteMatch* msg) { return (envoy_config_route_v3_RouteMatch_path_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 72), int32_t); }
+
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_prefix(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 1; }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteMatch_prefix(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 1, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_path(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 2; }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteMatch_path(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_case_sensitive(const envoy_config_route_v3_RouteMatch *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_case_sensitive(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_headers(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RouteMatch_headers(const envoy_config_route_v3_RouteMatch *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_query_parameters(const envoy_config_route_v3_RouteMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE const envoy_config_route_v3_QueryParameterMatcher* const* envoy_config_route_v3_RouteMatch_query_parameters(const envoy_config_route_v3_RouteMatch *msg, size_t *len) { return (const envoy_config_route_v3_QueryParameterMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_grpc(const envoy_config_route_v3_RouteMatch *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions* envoy_config_route_v3_RouteMatch_grpc(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions*); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_runtime_fraction(const envoy_config_route_v3_RouteMatch *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_RouteMatch_runtime_fraction(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_RuntimeFractionalPercent*); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_safe_regex(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 10; }
+UPB_INLINE const struct envoy_type_matcher_v3_RegexMatcher* envoy_config_route_v3_RouteMatch_safe_regex(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_RegexMatcher*, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 10, NULL); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_tls_context(const envoy_config_route_v3_RouteMatch *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions* envoy_config_route_v3_RouteMatch_tls_context(const envoy_config_route_v3_RouteMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions*); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_has_connect_matcher(const envoy_config_route_v3_RouteMatch *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 12; }
+UPB_INLINE const envoy_config_route_v3_RouteMatch_ConnectMatcher* envoy_config_route_v3_RouteMatch_connect_matcher(const envoy_config_route_v3_RouteMatch *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RouteMatch_ConnectMatcher*, UPB_SIZE(28, 56), UPB_SIZE(36, 72), 12, NULL); }
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_prefix(envoy_config_route_v3_RouteMatch *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 1);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 1);
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_path(envoy_config_route_v3_RouteMatch *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 2);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 2);
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_case_sensitive(envoy_config_route_v3_RouteMatch *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_mutable_case_sensitive(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteMatch_case_sensitive(msg);
@@ -971,33 +1034,34 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_mu
return sub;
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RouteMatch_mutable_headers(envoy_config_route_v3_RouteMatch *msg, size_t *len) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RouteMatch_resize_headers(envoy_config_route_v3_RouteMatch *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_route_v3_RouteMatch_add_headers(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE envoy_config_route_v3_QueryParameterMatcher** envoy_config_route_v3_RouteMatch_mutable_query_parameters(envoy_config_route_v3_RouteMatch *msg, size_t *len) {
- return (envoy_config_route_v3_QueryParameterMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
+ return (envoy_config_route_v3_QueryParameterMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE envoy_config_route_v3_QueryParameterMatcher** envoy_config_route_v3_RouteMatch_resize_query_parameters(envoy_config_route_v3_RouteMatch *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_QueryParameterMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_QueryParameterMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_QueryParameterMatcher* envoy_config_route_v3_RouteMatch_add_query_parameters(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_config_route_v3_QueryParameterMatcher* sub = (struct envoy_config_route_v3_QueryParameterMatcher*)_upb_msg_new(&envoy_config_route_v3_QueryParameterMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_grpc(envoy_config_route_v3_RouteMatch *msg, envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions* envoy_config_route_v3_RouteMatch_mutable_grpc(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions* sub = (struct envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions*)envoy_config_route_v3_RouteMatch_grpc(msg);
@@ -1009,7 +1073,8 @@ UPB_INLINE struct envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions* envoy_
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_runtime_fraction(envoy_config_route_v3_RouteMatch *msg, struct envoy_config_core_v3_RuntimeFractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_RuntimeFractionalPercent*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_RuntimeFractionalPercent*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_RouteMatch_mutable_runtime_fraction(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_config_core_v3_RuntimeFractionalPercent* sub = (struct envoy_config_core_v3_RuntimeFractionalPercent*)envoy_config_route_v3_RouteMatch_runtime_fraction(msg);
@@ -1021,7 +1086,7 @@ UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_ro
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_safe_regex(envoy_config_route_v3_RouteMatch *msg, struct envoy_type_matcher_v3_RegexMatcher* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_RegexMatcher*, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 10);
+ UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_RegexMatcher*, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 10);
}
UPB_INLINE struct envoy_type_matcher_v3_RegexMatcher* envoy_config_route_v3_RouteMatch_mutable_safe_regex(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_RegexMatcher* sub = (struct envoy_type_matcher_v3_RegexMatcher*)envoy_config_route_v3_RouteMatch_safe_regex(msg);
@@ -1033,7 +1098,8 @@ UPB_INLINE struct envoy_type_matcher_v3_RegexMatcher* envoy_config_route_v3_Rout
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_tls_context(envoy_config_route_v3_RouteMatch *msg, envoy_config_route_v3_RouteMatch_TlsContextMatchOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_route_v3_RouteMatch_TlsContextMatchOptions*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_route_v3_RouteMatch_TlsContextMatchOptions*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RouteMatch_TlsContextMatchOptions* envoy_config_route_v3_RouteMatch_mutable_tls_context(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteMatch_TlsContextMatchOptions* sub = (struct envoy_config_route_v3_RouteMatch_TlsContextMatchOptions*)envoy_config_route_v3_RouteMatch_tls_context(msg);
@@ -1045,7 +1111,7 @@ UPB_INLINE struct envoy_config_route_v3_RouteMatch_TlsContextMatchOptions* envoy
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_set_connect_matcher(envoy_config_route_v3_RouteMatch *msg, envoy_config_route_v3_RouteMatch_ConnectMatcher* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RouteMatch_ConnectMatcher*, UPB_SIZE(24, 48), value, UPB_SIZE(32, 64), 12);
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RouteMatch_ConnectMatcher*, UPB_SIZE(28, 56), value, UPB_SIZE(36, 72), 12);
}
UPB_INLINE struct envoy_config_route_v3_RouteMatch_ConnectMatcher* envoy_config_route_v3_RouteMatch_mutable_connect_matcher(envoy_config_route_v3_RouteMatch *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteMatch_ConnectMatcher* sub = (struct envoy_config_route_v3_RouteMatch_ConnectMatcher*)envoy_config_route_v3_RouteMatch_connect_matcher(msg);
@@ -1067,6 +1133,12 @@ UPB_INLINE envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions *envoy_config_
envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions *ret = envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions *envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions *ret = envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_serialize(const envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_msginit, arena, len);
}
@@ -1083,17 +1155,24 @@ UPB_INLINE envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *envoy_config
envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *ret = envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *ret = envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_serialize(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_has_presented(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_presented(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_has_validated(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_validated(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_has_presented(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_presented(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_has_validated(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_validated(const envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_set_presented(envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_mutable_presented(envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_presented(msg);
@@ -1105,7 +1184,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_Tl
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_set_validated(envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_mutable_validated(envoy_config_route_v3_RouteMatch_TlsContextMatchOptions *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_validated(msg);
@@ -1127,6 +1207,12 @@ UPB_INLINE envoy_config_route_v3_RouteMatch_ConnectMatcher *envoy_config_route_v
envoy_config_route_v3_RouteMatch_ConnectMatcher *ret = envoy_config_route_v3_RouteMatch_ConnectMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_ConnectMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteMatch_ConnectMatcher *envoy_config_route_v3_RouteMatch_ConnectMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteMatch_ConnectMatcher *ret = envoy_config_route_v3_RouteMatch_ConnectMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteMatch_ConnectMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteMatch_ConnectMatcher_serialize(const envoy_config_route_v3_RouteMatch_ConnectMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteMatch_ConnectMatcher_msginit, arena, len);
}
@@ -1143,6 +1229,12 @@ UPB_INLINE envoy_config_route_v3_CorsPolicy *envoy_config_route_v3_CorsPolicy_pa
envoy_config_route_v3_CorsPolicy *ret = envoy_config_route_v3_CorsPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_CorsPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_CorsPolicy *envoy_config_route_v3_CorsPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_CorsPolicy *ret = envoy_config_route_v3_CorsPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_CorsPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_CorsPolicy_serialize(const envoy_config_route_v3_CorsPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_CorsPolicy_msginit, arena, len);
}
@@ -1151,35 +1243,36 @@ typedef enum {
envoy_config_route_v3_CorsPolicy_enabled_specifier_filter_enabled = 9,
envoy_config_route_v3_CorsPolicy_enabled_specifier_NOT_SET = 0
} envoy_config_route_v3_CorsPolicy_enabled_specifier_oneofcases;
-UPB_INLINE envoy_config_route_v3_CorsPolicy_enabled_specifier_oneofcases envoy_config_route_v3_CorsPolicy_enabled_specifier_case(const envoy_config_route_v3_CorsPolicy* msg) { return (envoy_config_route_v3_CorsPolicy_enabled_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(48, 96), int32_t); }
-
-UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_allow_methods(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_allow_headers(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_expose_headers(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); }
-UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_max_age(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_allow_credentials(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_CorsPolicy_allow_credentials(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_filter_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(48, 96)) == 9; }
-UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_CorsPolicy_filter_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_RuntimeFractionalPercent*, UPB_SIZE(44, 88), UPB_SIZE(48, 96), 9, NULL); }
-UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_shadow_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
-UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_CorsPolicy_shadow_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct envoy_config_core_v3_RuntimeFractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_allow_origin_string_match(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
-UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* const* envoy_config_route_v3_CorsPolicy_allow_origin_string_match(const envoy_config_route_v3_CorsPolicy *msg, size_t *len) { return (const struct envoy_type_matcher_v3_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
+UPB_INLINE envoy_config_route_v3_CorsPolicy_enabled_specifier_oneofcases envoy_config_route_v3_CorsPolicy_enabled_specifier_case(const envoy_config_route_v3_CorsPolicy* msg) { return (envoy_config_route_v3_CorsPolicy_enabled_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(52, 104), int32_t); }
+
+UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_allow_methods(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_allow_headers(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_expose_headers(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE upb_strview envoy_config_route_v3_CorsPolicy_max_age(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_allow_credentials(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_CorsPolicy_allow_credentials(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_filter_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_getoneofcase(msg, UPB_SIZE(52, 104)) == 9; }
+UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_CorsPolicy_filter_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_RuntimeFractionalPercent*, UPB_SIZE(48, 96), UPB_SIZE(52, 104), 9, NULL); }
+UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_shadow_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_CorsPolicy_shadow_enabled(const envoy_config_route_v3_CorsPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 80), const struct envoy_config_core_v3_RuntimeFractionalPercent*); }
+UPB_INLINE bool envoy_config_route_v3_CorsPolicy_has_allow_origin_string_match(const envoy_config_route_v3_CorsPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 88)); }
+UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* const* envoy_config_route_v3_CorsPolicy_allow_origin_string_match(const envoy_config_route_v3_CorsPolicy *msg, size_t *len) { return (const struct envoy_type_matcher_v3_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(44, 88), len); }
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_allow_methods(envoy_config_route_v3_CorsPolicy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_allow_headers(envoy_config_route_v3_CorsPolicy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_expose_headers(envoy_config_route_v3_CorsPolicy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_max_age(envoy_config_route_v3_CorsPolicy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_allow_credentials(envoy_config_route_v3_CorsPolicy *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_CorsPolicy_mutable_allow_credentials(envoy_config_route_v3_CorsPolicy *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_CorsPolicy_allow_credentials(msg);
@@ -1191,7 +1284,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_CorsPolicy_mu
return sub;
}
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_filter_enabled(envoy_config_route_v3_CorsPolicy *msg, struct envoy_config_core_v3_RuntimeFractionalPercent* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_RuntimeFractionalPercent*, UPB_SIZE(44, 88), value, UPB_SIZE(48, 96), 9);
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_RuntimeFractionalPercent*, UPB_SIZE(48, 96), value, UPB_SIZE(52, 104), 9);
}
UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_CorsPolicy_mutable_filter_enabled(envoy_config_route_v3_CorsPolicy *msg, upb_arena *arena) {
struct envoy_config_core_v3_RuntimeFractionalPercent* sub = (struct envoy_config_core_v3_RuntimeFractionalPercent*)envoy_config_route_v3_CorsPolicy_filter_enabled(msg);
@@ -1203,7 +1296,8 @@ UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_ro
return sub;
}
UPB_INLINE void envoy_config_route_v3_CorsPolicy_set_shadow_enabled(envoy_config_route_v3_CorsPolicy *msg, struct envoy_config_core_v3_RuntimeFractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 72), struct envoy_config_core_v3_RuntimeFractionalPercent*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 80), struct envoy_config_core_v3_RuntimeFractionalPercent*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_CorsPolicy_mutable_shadow_enabled(envoy_config_route_v3_CorsPolicy *msg, upb_arena *arena) {
struct envoy_config_core_v3_RuntimeFractionalPercent* sub = (struct envoy_config_core_v3_RuntimeFractionalPercent*)envoy_config_route_v3_CorsPolicy_shadow_enabled(msg);
@@ -1215,15 +1309,15 @@ UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_ro
return sub;
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher** envoy_config_route_v3_CorsPolicy_mutable_allow_origin_string_match(envoy_config_route_v3_CorsPolicy *msg, size_t *len) {
- return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
+ return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher** envoy_config_route_v3_CorsPolicy_resize_allow_origin_string_match(envoy_config_route_v3_CorsPolicy *msg, size_t len, upb_arena *arena) {
- return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_config_route_v3_CorsPolicy_add_allow_origin_string_match(envoy_config_route_v3_CorsPolicy *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 88), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1238,6 +1332,12 @@ UPB_INLINE envoy_config_route_v3_RouteAction *envoy_config_route_v3_RouteAction_
envoy_config_route_v3_RouteAction *ret = envoy_config_route_v3_RouteAction_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction *envoy_config_route_v3_RouteAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction *ret = envoy_config_route_v3_RouteAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_serialize(const envoy_config_route_v3_RouteAction *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_msginit, arena, len);
}
@@ -1248,7 +1348,7 @@ typedef enum {
envoy_config_route_v3_RouteAction_cluster_specifier_weighted_clusters = 3,
envoy_config_route_v3_RouteAction_cluster_specifier_NOT_SET = 0
} envoy_config_route_v3_RouteAction_cluster_specifier_oneofcases;
-UPB_INLINE envoy_config_route_v3_RouteAction_cluster_specifier_oneofcases envoy_config_route_v3_RouteAction_cluster_specifier_case(const envoy_config_route_v3_RouteAction* msg) { return (envoy_config_route_v3_RouteAction_cluster_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(112, 200), int32_t); }
+UPB_INLINE envoy_config_route_v3_RouteAction_cluster_specifier_oneofcases envoy_config_route_v3_RouteAction_cluster_specifier_case(const envoy_config_route_v3_RouteAction* msg) { return (envoy_config_route_v3_RouteAction_cluster_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(104, 192), int32_t); }
typedef enum {
envoy_config_route_v3_RouteAction_host_rewrite_specifier_host_rewrite_literal = 6,
@@ -1257,71 +1357,71 @@ typedef enum {
envoy_config_route_v3_RouteAction_host_rewrite_specifier_host_rewrite_path_regex = 35,
envoy_config_route_v3_RouteAction_host_rewrite_specifier_NOT_SET = 0
} envoy_config_route_v3_RouteAction_host_rewrite_specifier_oneofcases;
-UPB_INLINE envoy_config_route_v3_RouteAction_host_rewrite_specifier_oneofcases envoy_config_route_v3_RouteAction_host_rewrite_specifier_case(const envoy_config_route_v3_RouteAction* msg) { return (envoy_config_route_v3_RouteAction_host_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(124, 224), int32_t); }
-
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(112, 200)) == 1; }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_cluster(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(104, 184), UPB_SIZE(112, 200), 1, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster_header(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(112, 200)) == 2; }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_cluster_header(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(104, 184), UPB_SIZE(112, 200), 2, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_weighted_clusters(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(112, 200)) == 3; }
-UPB_INLINE const envoy_config_route_v3_WeightedCluster* envoy_config_route_v3_RouteAction_weighted_clusters(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_WeightedCluster*, UPB_SIZE(104, 184), UPB_SIZE(112, 200), 3, NULL); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_metadata_match(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 40)); }
-UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_route_v3_RouteAction_metadata_match(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), const struct envoy_config_core_v3_Metadata*); }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_prefix_rewrite(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_host_rewrite_literal(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(124, 224)) == 6; }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_host_rewrite_literal(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(116, 208), UPB_SIZE(124, 224), 6, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_auto_host_rewrite(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(124, 224)) == 7; }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_auto_host_rewrite(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(116, 208), UPB_SIZE(124, 224), 7, NULL); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_timeout(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 48)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_timeout(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_retry_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 56)); }
-UPB_INLINE const envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_RouteAction_retry_policy(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), const envoy_config_route_v3_RetryPolicy*); }
-UPB_INLINE int32_t envoy_config_route_v3_RouteAction_priority(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_rate_limits(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 152)); }
-UPB_INLINE const envoy_config_route_v3_RateLimit* const* envoy_config_route_v3_RouteAction_rate_limits(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RateLimit* const*)_upb_array_accessor(msg, UPB_SIZE(88, 152), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_include_vh_rate_limits(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 64)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_include_vh_rate_limits(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_hash_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 160)); }
-UPB_INLINE const envoy_config_route_v3_RouteAction_HashPolicy* const* envoy_config_route_v3_RouteAction_hash_policy(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RouteAction_HashPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(92, 160), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cors(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 72)); }
-UPB_INLINE const envoy_config_route_v3_CorsPolicy* envoy_config_route_v3_RouteAction_cors(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), const envoy_config_route_v3_CorsPolicy*); }
+UPB_INLINE envoy_config_route_v3_RouteAction_host_rewrite_specifier_oneofcases envoy_config_route_v3_RouteAction_host_rewrite_specifier_case(const envoy_config_route_v3_RouteAction* msg) { return (envoy_config_route_v3_RouteAction_host_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(116, 216), int32_t); }
+
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(104, 192)) == 1; }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_cluster(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(96, 176), UPB_SIZE(104, 192), 1, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cluster_header(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(104, 192)) == 2; }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_cluster_header(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(96, 176), UPB_SIZE(104, 192), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_weighted_clusters(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(104, 192)) == 3; }
+UPB_INLINE const envoy_config_route_v3_WeightedCluster* envoy_config_route_v3_RouteAction_weighted_clusters(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_WeightedCluster*, UPB_SIZE(96, 176), UPB_SIZE(104, 192), 3, NULL); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_metadata_match(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Metadata* envoy_config_route_v3_RouteAction_metadata_match(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const struct envoy_config_core_v3_Metadata*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_prefix_rewrite(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_host_rewrite_literal(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(116, 216)) == 6; }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_host_rewrite_literal(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(108, 200), UPB_SIZE(116, 216), 6, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_auto_host_rewrite(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(116, 216)) == 7; }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_auto_host_rewrite(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_BoolValue*, UPB_SIZE(108, 200), UPB_SIZE(116, 216), 7, NULL); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_timeout(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_timeout(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_retry_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_RouteAction_retry_policy(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const envoy_config_route_v3_RetryPolicy*); }
+UPB_INLINE int32_t envoy_config_route_v3_RouteAction_priority(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_rate_limits(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 144)); }
+UPB_INLINE const envoy_config_route_v3_RateLimit* const* envoy_config_route_v3_RouteAction_rate_limits(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RateLimit* const*)_upb_array_accessor(msg, UPB_SIZE(80, 144), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_include_vh_rate_limits(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_include_vh_rate_limits(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_hash_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 152)); }
+UPB_INLINE const envoy_config_route_v3_RouteAction_HashPolicy* const* envoy_config_route_v3_RouteAction_hash_policy(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RouteAction_HashPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(84, 152), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_cors(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const envoy_config_route_v3_CorsPolicy* envoy_config_route_v3_RouteAction_cors(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 64), const envoy_config_route_v3_CorsPolicy*); }
UPB_INLINE int32_t envoy_config_route_v3_RouteAction_cluster_not_found_response_code(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_max_grpc_timeout(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 80)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_max_grpc_timeout(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_idle_timeout(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 88)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_idle_timeout(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_upgrade_configs(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 168)); }
-UPB_INLINE const envoy_config_route_v3_RouteAction_UpgradeConfig* const* envoy_config_route_v3_RouteAction_upgrade_configs(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RouteAction_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(96, 168), len); }
-UPB_INLINE int32_t envoy_config_route_v3_RouteAction_internal_redirect_action(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_hedge_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 96)); }
-UPB_INLINE const envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_RouteAction_hedge_policy(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), const envoy_config_route_v3_HedgePolicy*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_grpc_timeout_offset(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 104)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_grpc_timeout_offset(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_host_rewrite_header(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(124, 224)) == 29; }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_host_rewrite_header(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(116, 208), UPB_SIZE(124, 224), 29, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_request_mirror_policies(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 176)); }
-UPB_INLINE const envoy_config_route_v3_RouteAction_RequestMirrorPolicy* const* envoy_config_route_v3_RouteAction_request_mirror_policies(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RouteAction_RequestMirrorPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(100, 176), len); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_max_internal_redirects(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 112)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RouteAction_max_internal_redirects(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_regex_rewrite(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 120)); }
-UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_regex_rewrite(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 120), const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_retry_policy_typed_config(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 128)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_config_route_v3_RouteAction_retry_policy_typed_config(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), const struct google_protobuf_Any*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_internal_redirect_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 136)); }
-UPB_INLINE const envoy_config_route_v3_InternalRedirectPolicy* envoy_config_route_v3_RouteAction_internal_redirect_policy(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 136), const envoy_config_route_v3_InternalRedirectPolicy*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_host_rewrite_path_regex(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(124, 224)) == 35; }
-UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_host_rewrite_path_regex(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*, UPB_SIZE(116, 208), UPB_SIZE(124, 224), 35, NULL); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_has_max_stream_duration(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 144)); }
-UPB_INLINE const envoy_config_route_v3_RouteAction_MaxStreamDuration* envoy_config_route_v3_RouteAction_max_stream_duration(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), const envoy_config_route_v3_RouteAction_MaxStreamDuration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_max_grpc_timeout(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_max_grpc_timeout(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_idle_timeout(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_idle_timeout(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 80), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_upgrade_configs(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 160)); }
+UPB_INLINE const envoy_config_route_v3_RouteAction_UpgradeConfig* const* envoy_config_route_v3_RouteAction_upgrade_configs(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RouteAction_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(88, 160), len); }
+UPB_INLINE int32_t envoy_config_route_v3_RouteAction_internal_redirect_action(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_hedge_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_RouteAction_hedge_policy(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), const envoy_config_route_v3_HedgePolicy*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_grpc_timeout_offset(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_grpc_timeout_offset(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 96), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_host_rewrite_header(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(116, 216)) == 29; }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_host_rewrite_header(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(108, 200), UPB_SIZE(116, 216), 29, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_request_mirror_policies(const envoy_config_route_v3_RouteAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 168)); }
+UPB_INLINE const envoy_config_route_v3_RouteAction_RequestMirrorPolicy* const* envoy_config_route_v3_RouteAction_request_mirror_policies(const envoy_config_route_v3_RouteAction *msg, size_t *len) { return (const envoy_config_route_v3_RouteAction_RequestMirrorPolicy* const*)_upb_array_accessor(msg, UPB_SIZE(92, 168), len); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_max_internal_redirects(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RouteAction_max_internal_redirects(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_regex_rewrite(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_regex_rewrite(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 112), const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_retry_policy_typed_config(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_route_v3_RouteAction_retry_policy_typed_config(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_internal_redirect_policy(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE const envoy_config_route_v3_InternalRedirectPolicy* envoy_config_route_v3_RouteAction_internal_redirect_policy(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 128), const envoy_config_route_v3_InternalRedirectPolicy*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_host_rewrite_path_regex(const envoy_config_route_v3_RouteAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(116, 216)) == 35; }
+UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_host_rewrite_path_regex(const envoy_config_route_v3_RouteAction *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*, UPB_SIZE(108, 200), UPB_SIZE(116, 216), 35, NULL); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_has_max_stream_duration(const envoy_config_route_v3_RouteAction *msg) { return _upb_hasbit(msg, 14); }
+UPB_INLINE const envoy_config_route_v3_RouteAction_MaxStreamDuration* envoy_config_route_v3_RouteAction_max_stream_duration(const envoy_config_route_v3_RouteAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), const envoy_config_route_v3_RouteAction_MaxStreamDuration*); }
UPB_INLINE void envoy_config_route_v3_RouteAction_set_cluster(envoy_config_route_v3_RouteAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(104, 184), value, UPB_SIZE(112, 200), 1);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(96, 176), value, UPB_SIZE(104, 192), 1);
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_cluster_header(envoy_config_route_v3_RouteAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(104, 184), value, UPB_SIZE(112, 200), 2);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(96, 176), value, UPB_SIZE(104, 192), 2);
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_weighted_clusters(envoy_config_route_v3_RouteAction *msg, envoy_config_route_v3_WeightedCluster* value) {
- UPB_WRITE_ONEOF(msg, envoy_config_route_v3_WeightedCluster*, UPB_SIZE(104, 184), value, UPB_SIZE(112, 200), 3);
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_WeightedCluster*, UPB_SIZE(96, 176), value, UPB_SIZE(104, 192), 3);
}
UPB_INLINE struct envoy_config_route_v3_WeightedCluster* envoy_config_route_v3_RouteAction_mutable_weighted_clusters(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_WeightedCluster* sub = (struct envoy_config_route_v3_WeightedCluster*)envoy_config_route_v3_RouteAction_weighted_clusters(msg);
@@ -1333,7 +1433,8 @@ UPB_INLINE struct envoy_config_route_v3_WeightedCluster* envoy_config_route_v3_R
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_metadata_match(envoy_config_route_v3_RouteAction *msg, struct envoy_config_core_v3_Metadata* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 40), struct envoy_config_core_v3_Metadata*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 32), struct envoy_config_core_v3_Metadata*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_route_v3_RouteAction_mutable_metadata_match(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_core_v3_Metadata* sub = (struct envoy_config_core_v3_Metadata*)envoy_config_route_v3_RouteAction_metadata_match(msg);
@@ -1345,13 +1446,13 @@ UPB_INLINE struct envoy_config_core_v3_Metadata* envoy_config_route_v3_RouteActi
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_prefix_rewrite(envoy_config_route_v3_RouteAction *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_host_rewrite_literal(envoy_config_route_v3_RouteAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(116, 208), value, UPB_SIZE(124, 224), 6);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(108, 200), value, UPB_SIZE(116, 216), 6);
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_auto_host_rewrite(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_BoolValue* value) {
- UPB_WRITE_ONEOF(msg, struct google_protobuf_BoolValue*, UPB_SIZE(116, 208), value, UPB_SIZE(124, 224), 7);
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_BoolValue*, UPB_SIZE(108, 200), value, UPB_SIZE(116, 216), 7);
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_mutable_auto_host_rewrite(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteAction_auto_host_rewrite(msg);
@@ -1363,7 +1464,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_m
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_timeout(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 48), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 40), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mutable_timeout(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_timeout(msg);
@@ -1375,7 +1477,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mu
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_retry_policy(envoy_config_route_v3_RouteAction *msg, envoy_config_route_v3_RetryPolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(40, 56), envoy_config_route_v3_RetryPolicy*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 48), envoy_config_route_v3_RetryPolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_RouteAction_mutable_retry_policy(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_RetryPolicy* sub = (struct envoy_config_route_v3_RetryPolicy*)envoy_config_route_v3_RouteAction_retry_policy(msg);
@@ -1387,23 +1490,24 @@ UPB_INLINE struct envoy_config_route_v3_RetryPolicy* envoy_config_route_v3_Route
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_priority(envoy_config_route_v3_RouteAction *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE envoy_config_route_v3_RateLimit** envoy_config_route_v3_RouteAction_mutable_rate_limits(envoy_config_route_v3_RouteAction *msg, size_t *len) {
- return (envoy_config_route_v3_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 152), len);
+ return (envoy_config_route_v3_RateLimit**)_upb_array_mutable_accessor(msg, UPB_SIZE(80, 144), len);
}
UPB_INLINE envoy_config_route_v3_RateLimit** envoy_config_route_v3_RouteAction_resize_rate_limits(envoy_config_route_v3_RouteAction *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RateLimit**)_upb_array_resize_accessor(msg, UPB_SIZE(88, 152), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RateLimit**)_upb_array_resize_accessor2(msg, UPB_SIZE(80, 144), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RateLimit* envoy_config_route_v3_RouteAction_add_rate_limits(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_RateLimit* sub = (struct envoy_config_route_v3_RateLimit*)_upb_msg_new(&envoy_config_route_v3_RateLimit_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(88, 152), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(80, 144), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_include_vh_rate_limits(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(44, 64), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 56), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_mutable_include_vh_rate_limits(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteAction_include_vh_rate_limits(msg);
@@ -1415,20 +1519,21 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_m
return sub;
}
UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy** envoy_config_route_v3_RouteAction_mutable_hash_policy(envoy_config_route_v3_RouteAction *msg, size_t *len) {
- return (envoy_config_route_v3_RouteAction_HashPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(92, 160), len);
+ return (envoy_config_route_v3_RouteAction_HashPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 152), len);
}
UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy** envoy_config_route_v3_RouteAction_resize_hash_policy(envoy_config_route_v3_RouteAction *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RouteAction_HashPolicy**)_upb_array_resize_accessor(msg, UPB_SIZE(92, 160), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RouteAction_HashPolicy**)_upb_array_resize_accessor2(msg, UPB_SIZE(84, 152), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RouteAction_HashPolicy* envoy_config_route_v3_RouteAction_add_hash_policy(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteAction_HashPolicy* sub = (struct envoy_config_route_v3_RouteAction_HashPolicy*)_upb_msg_new(&envoy_config_route_v3_RouteAction_HashPolicy_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(92, 160), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(84, 152), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_cors(envoy_config_route_v3_RouteAction *msg, envoy_config_route_v3_CorsPolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(48, 72), envoy_config_route_v3_CorsPolicy*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 64), envoy_config_route_v3_CorsPolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_CorsPolicy* envoy_config_route_v3_RouteAction_mutable_cors(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_CorsPolicy* sub = (struct envoy_config_route_v3_CorsPolicy*)envoy_config_route_v3_RouteAction_cors(msg);
@@ -1443,7 +1548,8 @@ UPB_INLINE void envoy_config_route_v3_RouteAction_set_cluster_not_found_response
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_max_grpc_timeout(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(52, 80), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 72), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mutable_max_grpc_timeout(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_max_grpc_timeout(msg);
@@ -1455,7 +1561,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mu
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_idle_timeout(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(56, 88), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(48, 80), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mutable_idle_timeout(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_idle_timeout(msg);
@@ -1467,23 +1574,24 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mu
return sub;
}
UPB_INLINE envoy_config_route_v3_RouteAction_UpgradeConfig** envoy_config_route_v3_RouteAction_mutable_upgrade_configs(envoy_config_route_v3_RouteAction *msg, size_t *len) {
- return (envoy_config_route_v3_RouteAction_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(96, 168), len);
+ return (envoy_config_route_v3_RouteAction_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 160), len);
}
UPB_INLINE envoy_config_route_v3_RouteAction_UpgradeConfig** envoy_config_route_v3_RouteAction_resize_upgrade_configs(envoy_config_route_v3_RouteAction *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RouteAction_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(96, 168), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RouteAction_UpgradeConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(88, 160), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RouteAction_UpgradeConfig* envoy_config_route_v3_RouteAction_add_upgrade_configs(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteAction_UpgradeConfig* sub = (struct envoy_config_route_v3_RouteAction_UpgradeConfig*)_upb_msg_new(&envoy_config_route_v3_RouteAction_UpgradeConfig_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(96, 168), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(88, 160), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_internal_redirect_action(envoy_config_route_v3_RouteAction *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_hedge_policy(envoy_config_route_v3_RouteAction *msg, envoy_config_route_v3_HedgePolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(60, 96), envoy_config_route_v3_HedgePolicy*) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 88), envoy_config_route_v3_HedgePolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_RouteAction_mutable_hedge_policy(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_HedgePolicy* sub = (struct envoy_config_route_v3_HedgePolicy*)envoy_config_route_v3_RouteAction_hedge_policy(msg);
@@ -1495,7 +1603,8 @@ UPB_INLINE struct envoy_config_route_v3_HedgePolicy* envoy_config_route_v3_Route
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_grpc_timeout_offset(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(64, 104), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(56, 96), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mutable_grpc_timeout_offset(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_grpc_timeout_offset(msg);
@@ -1507,23 +1616,24 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_mu
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_host_rewrite_header(envoy_config_route_v3_RouteAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(116, 208), value, UPB_SIZE(124, 224), 29);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(108, 200), value, UPB_SIZE(116, 216), 29);
}
UPB_INLINE envoy_config_route_v3_RouteAction_RequestMirrorPolicy** envoy_config_route_v3_RouteAction_mutable_request_mirror_policies(envoy_config_route_v3_RouteAction *msg, size_t *len) {
- return (envoy_config_route_v3_RouteAction_RequestMirrorPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 176), len);
+ return (envoy_config_route_v3_RouteAction_RequestMirrorPolicy**)_upb_array_mutable_accessor(msg, UPB_SIZE(92, 168), len);
}
UPB_INLINE envoy_config_route_v3_RouteAction_RequestMirrorPolicy** envoy_config_route_v3_RouteAction_resize_request_mirror_policies(envoy_config_route_v3_RouteAction *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RouteAction_RequestMirrorPolicy**)_upb_array_resize_accessor(msg, UPB_SIZE(100, 176), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RouteAction_RequestMirrorPolicy**)_upb_array_resize_accessor2(msg, UPB_SIZE(92, 168), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RouteAction_RequestMirrorPolicy* envoy_config_route_v3_RouteAction_add_request_mirror_policies(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteAction_RequestMirrorPolicy* sub = (struct envoy_config_route_v3_RouteAction_RequestMirrorPolicy*)_upb_msg_new(&envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(100, 176), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(92, 168), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_max_internal_redirects(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(68, 112), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 104), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RouteAction_mutable_max_internal_redirects(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_RouteAction_max_internal_redirects(msg);
@@ -1535,7 +1645,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RouteAction
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_regex_rewrite(envoy_config_route_v3_RouteAction *msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(72, 120), struct envoy_type_matcher_v3_RegexMatchAndSubstitute*) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(64, 112), struct envoy_type_matcher_v3_RegexMatchAndSubstitute*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_mutable_regex_rewrite(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_RegexMatchAndSubstitute* sub = (struct envoy_type_matcher_v3_RegexMatchAndSubstitute*)envoy_config_route_v3_RouteAction_regex_rewrite(msg);
@@ -1547,7 +1658,8 @@ UPB_INLINE struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_ro
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_retry_policy_typed_config(envoy_config_route_v3_RouteAction *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(76, 128), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 12);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 120), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_config_route_v3_RouteAction_mutable_retry_policy_typed_config(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_route_v3_RouteAction_retry_policy_typed_config(msg);
@@ -1559,7 +1671,8 @@ UPB_INLINE struct google_protobuf_Any* envoy_config_route_v3_RouteAction_mutable
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_internal_redirect_policy(envoy_config_route_v3_RouteAction *msg, envoy_config_route_v3_InternalRedirectPolicy* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(80, 136), envoy_config_route_v3_InternalRedirectPolicy*) = value;
+ _upb_sethas(msg, 13);
+ *UPB_PTR_AT(msg, UPB_SIZE(72, 128), envoy_config_route_v3_InternalRedirectPolicy*) = value;
}
UPB_INLINE struct envoy_config_route_v3_InternalRedirectPolicy* envoy_config_route_v3_RouteAction_mutable_internal_redirect_policy(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_InternalRedirectPolicy* sub = (struct envoy_config_route_v3_InternalRedirectPolicy*)envoy_config_route_v3_RouteAction_internal_redirect_policy(msg);
@@ -1571,7 +1684,7 @@ UPB_INLINE struct envoy_config_route_v3_InternalRedirectPolicy* envoy_config_rou
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_host_rewrite_path_regex(envoy_config_route_v3_RouteAction *msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute*, UPB_SIZE(116, 208), value, UPB_SIZE(124, 224), 35);
+ UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute*, UPB_SIZE(108, 200), value, UPB_SIZE(116, 216), 35);
}
UPB_INLINE struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_mutable_host_rewrite_path_regex(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_RegexMatchAndSubstitute* sub = (struct envoy_type_matcher_v3_RegexMatchAndSubstitute*)envoy_config_route_v3_RouteAction_host_rewrite_path_regex(msg);
@@ -1583,7 +1696,8 @@ UPB_INLINE struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_ro
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_set_max_stream_duration(envoy_config_route_v3_RouteAction *msg, envoy_config_route_v3_RouteAction_MaxStreamDuration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(84, 144), envoy_config_route_v3_RouteAction_MaxStreamDuration*) = value;
+ _upb_sethas(msg, 14);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 136), envoy_config_route_v3_RouteAction_MaxStreamDuration*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RouteAction_MaxStreamDuration* envoy_config_route_v3_RouteAction_mutable_max_stream_duration(envoy_config_route_v3_RouteAction *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteAction_MaxStreamDuration* sub = (struct envoy_config_route_v3_RouteAction_MaxStreamDuration*)envoy_config_route_v3_RouteAction_max_stream_duration(msg);
@@ -1605,21 +1719,28 @@ UPB_INLINE envoy_config_route_v3_RouteAction_RequestMirrorPolicy *envoy_config_r
envoy_config_route_v3_RouteAction_RequestMirrorPolicy *ret = envoy_config_route_v3_RouteAction_RequestMirrorPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_RequestMirrorPolicy *envoy_config_route_v3_RouteAction_RequestMirrorPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_RequestMirrorPolicy *ret = envoy_config_route_v3_RouteAction_RequestMirrorPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_RequestMirrorPolicy_serialize(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_RequestMirrorPolicy_cluster(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_RequestMirrorPolicy_has_runtime_fraction(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_RouteAction_RequestMirrorPolicy_runtime_fraction(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_RuntimeFractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_RequestMirrorPolicy_has_trace_sampled(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_RequestMirrorPolicy_trace_sampled(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_RequestMirrorPolicy_cluster(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_RequestMirrorPolicy_has_runtime_fraction(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_RouteAction_RequestMirrorPolicy_runtime_fraction(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_RuntimeFractionalPercent*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_RequestMirrorPolicy_has_trace_sampled(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_RequestMirrorPolicy_trace_sampled(const envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_route_v3_RouteAction_RequestMirrorPolicy_set_cluster(envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_RequestMirrorPolicy_set_runtime_fraction(envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg, struct envoy_config_core_v3_RuntimeFractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_RuntimeFractionalPercent*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_RuntimeFractionalPercent*) = value;
}
UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_route_v3_RouteAction_RequestMirrorPolicy_mutable_runtime_fraction(envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena) {
struct envoy_config_core_v3_RuntimeFractionalPercent* sub = (struct envoy_config_core_v3_RuntimeFractionalPercent*)envoy_config_route_v3_RouteAction_RequestMirrorPolicy_runtime_fraction(msg);
@@ -1631,7 +1752,8 @@ UPB_INLINE struct envoy_config_core_v3_RuntimeFractionalPercent* envoy_config_ro
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_RequestMirrorPolicy_set_trace_sampled(envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_RequestMirrorPolicy_mutable_trace_sampled(envoy_config_route_v3_RouteAction_RequestMirrorPolicy *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteAction_RequestMirrorPolicy_trace_sampled(msg);
@@ -1653,6 +1775,12 @@ UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy *envoy_config_route_v3_R
envoy_config_route_v3_RouteAction_HashPolicy *ret = envoy_config_route_v3_RouteAction_HashPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy *envoy_config_route_v3_RouteAction_HashPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_HashPolicy *ret = envoy_config_route_v3_RouteAction_HashPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_HashPolicy_serialize(const envoy_config_route_v3_RouteAction_HashPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_HashPolicy_msginit, arena, len);
}
@@ -1753,19 +1881,26 @@ UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_Header *envoy_config_rou
envoy_config_route_v3_RouteAction_HashPolicy_Header *ret = envoy_config_route_v3_RouteAction_HashPolicy_Header_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_Header_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_Header *envoy_config_route_v3_RouteAction_HashPolicy_Header_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_HashPolicy_Header *ret = envoy_config_route_v3_RouteAction_HashPolicy_Header_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_Header_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_HashPolicy_Header_serialize(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_HashPolicy_Header_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_HashPolicy_Header_header_name(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_HashPolicy_Header_has_regex_rewrite(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_HashPolicy_Header_regex_rewrite(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_HashPolicy_Header_header_name(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_HashPolicy_Header_has_regex_rewrite(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_HashPolicy_Header_regex_rewrite(const envoy_config_route_v3_RouteAction_HashPolicy_Header *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*); }
UPB_INLINE void envoy_config_route_v3_RouteAction_HashPolicy_Header_set_header_name(envoy_config_route_v3_RouteAction_HashPolicy_Header *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_HashPolicy_Header_set_regex_rewrite(envoy_config_route_v3_RouteAction_HashPolicy_Header *msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_matcher_v3_RegexMatchAndSubstitute*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_matcher_v3_RegexMatchAndSubstitute*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RouteAction_HashPolicy_Header_mutable_regex_rewrite(envoy_config_route_v3_RouteAction_HashPolicy_Header *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_RegexMatchAndSubstitute* sub = (struct envoy_type_matcher_v3_RegexMatchAndSubstitute*)envoy_config_route_v3_RouteAction_HashPolicy_Header_regex_rewrite(msg);
@@ -1787,20 +1922,27 @@ UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_Cookie *envoy_config_rou
envoy_config_route_v3_RouteAction_HashPolicy_Cookie *ret = envoy_config_route_v3_RouteAction_HashPolicy_Cookie_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_Cookie_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_Cookie *envoy_config_route_v3_RouteAction_HashPolicy_Cookie_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_HashPolicy_Cookie *ret = envoy_config_route_v3_RouteAction_HashPolicy_Cookie_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_Cookie_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_HashPolicy_Cookie_serialize(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_HashPolicy_Cookie_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_HashPolicy_Cookie_name(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_HashPolicy_Cookie_has_ttl(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_HashPolicy_Cookie_ttl(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Duration*); }
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_HashPolicy_Cookie_path(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_HashPolicy_Cookie_name(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_HashPolicy_Cookie_has_ttl(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_HashPolicy_Cookie_ttl(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Duration*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_HashPolicy_Cookie_path(const envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE void envoy_config_route_v3_RouteAction_HashPolicy_Cookie_set_name(envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_HashPolicy_Cookie_set_ttl(envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_HashPolicy_Cookie_mutable_ttl(envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_HashPolicy_Cookie_ttl(msg);
@@ -1812,7 +1954,7 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_Ha
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_HashPolicy_Cookie_set_path(envoy_config_route_v3_RouteAction_HashPolicy_Cookie *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
/* envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties */
@@ -1825,6 +1967,12 @@ UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties *en
envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties *ret = envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties *envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties *ret = envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_serialize(const envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_msginit, arena, len);
}
@@ -1845,6 +1993,12 @@ UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter *envoy_co
envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter *ret = envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter *envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter *ret = envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_serialize(const envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_msginit, arena, len);
}
@@ -1865,6 +2019,12 @@ UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_FilterState *envoy_confi
envoy_config_route_v3_RouteAction_HashPolicy_FilterState *ret = envoy_config_route_v3_RouteAction_HashPolicy_FilterState_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_FilterState_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_HashPolicy_FilterState *envoy_config_route_v3_RouteAction_HashPolicy_FilterState_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_HashPolicy_FilterState *ret = envoy_config_route_v3_RouteAction_HashPolicy_FilterState_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_HashPolicy_FilterState_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_HashPolicy_FilterState_serialize(const envoy_config_route_v3_RouteAction_HashPolicy_FilterState *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_HashPolicy_FilterState_msginit, arena, len);
}
@@ -1885,21 +2045,28 @@ UPB_INLINE envoy_config_route_v3_RouteAction_UpgradeConfig *envoy_config_route_v
envoy_config_route_v3_RouteAction_UpgradeConfig *ret = envoy_config_route_v3_RouteAction_UpgradeConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_UpgradeConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_UpgradeConfig *envoy_config_route_v3_RouteAction_UpgradeConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_UpgradeConfig *ret = envoy_config_route_v3_RouteAction_UpgradeConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_UpgradeConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_UpgradeConfig_serialize(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_UpgradeConfig_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_UpgradeConfig_upgrade_type(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_has_enabled(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_UpgradeConfig_enabled(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_has_connect_config(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig* envoy_config_route_v3_RouteAction_UpgradeConfig_connect_config(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RouteAction_UpgradeConfig_upgrade_type(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_has_enabled(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_UpgradeConfig_enabled(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_has_connect_config(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig* envoy_config_route_v3_RouteAction_UpgradeConfig_connect_config(const envoy_config_route_v3_RouteAction_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig*); }
UPB_INLINE void envoy_config_route_v3_RouteAction_UpgradeConfig_set_upgrade_type(envoy_config_route_v3_RouteAction_UpgradeConfig *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_UpgradeConfig_set_enabled(envoy_config_route_v3_RouteAction_UpgradeConfig *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_UpgradeConfig_mutable_enabled(envoy_config_route_v3_RouteAction_UpgradeConfig *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RouteAction_UpgradeConfig_enabled(msg);
@@ -1911,7 +2078,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RouteAction_U
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_UpgradeConfig_set_connect_config(envoy_config_route_v3_RouteAction_UpgradeConfig *msg, envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig* envoy_config_route_v3_RouteAction_UpgradeConfig_mutable_connect_config(envoy_config_route_v3_RouteAction_UpgradeConfig *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig* sub = (struct envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig*)envoy_config_route_v3_RouteAction_UpgradeConfig_connect_config(msg);
@@ -1933,15 +2101,23 @@ UPB_INLINE envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *envoy_
envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *ret = envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *ret = envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_serialize(const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_has_proxy_protocol_config(const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_ProxyProtocolConfig* envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_proxy_protocol_config(const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_ProxyProtocolConfig*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_has_proxy_protocol_config(const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ProxyProtocolConfig* envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_proxy_protocol_config(const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_ProxyProtocolConfig*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_allow_post(const envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_set_proxy_protocol_config(envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg, struct envoy_config_core_v3_ProxyProtocolConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_ProxyProtocolConfig*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_ProxyProtocolConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ProxyProtocolConfig* envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_mutable_proxy_protocol_config(envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_ProxyProtocolConfig* sub = (struct envoy_config_core_v3_ProxyProtocolConfig*)envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_proxy_protocol_config(msg);
@@ -1952,6 +2128,9 @@ UPB_INLINE struct envoy_config_core_v3_ProxyProtocolConfig* envoy_config_route_v
}
return sub;
}
+UPB_INLINE void envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_set_allow_post(envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+}
/* envoy.config.route.v3.RouteAction.MaxStreamDuration */
@@ -1963,19 +2142,26 @@ UPB_INLINE envoy_config_route_v3_RouteAction_MaxStreamDuration *envoy_config_rou
envoy_config_route_v3_RouteAction_MaxStreamDuration *ret = envoy_config_route_v3_RouteAction_MaxStreamDuration_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_MaxStreamDuration_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RouteAction_MaxStreamDuration *envoy_config_route_v3_RouteAction_MaxStreamDuration_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RouteAction_MaxStreamDuration *ret = envoy_config_route_v3_RouteAction_MaxStreamDuration_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RouteAction_MaxStreamDuration_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RouteAction_MaxStreamDuration_serialize(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RouteAction_MaxStreamDuration_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RouteAction_MaxStreamDuration_has_max_stream_duration(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_MaxStreamDuration_has_grpc_timeout_header_max(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_max(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RouteAction_MaxStreamDuration_has_grpc_timeout_header_offset(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_offset(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_MaxStreamDuration_has_max_stream_duration(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_MaxStreamDuration_has_grpc_timeout_header_max(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_max(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RouteAction_MaxStreamDuration_has_grpc_timeout_header_offset(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_offset(const envoy_config_route_v3_RouteAction_MaxStreamDuration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_route_v3_RouteAction_MaxStreamDuration_set_max_stream_duration(envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_mutable_max_stream_duration(envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration(msg);
@@ -1987,7 +2173,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_Ma
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_MaxStreamDuration_set_grpc_timeout_header_max(envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_mutable_grpc_timeout_header_max(envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_max(msg);
@@ -1999,7 +2186,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_Ma
return sub;
}
UPB_INLINE void envoy_config_route_v3_RouteAction_MaxStreamDuration_set_grpc_timeout_header_offset(envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RouteAction_MaxStreamDuration_mutable_grpc_timeout_header_offset(envoy_config_route_v3_RouteAction_MaxStreamDuration *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_offset(msg);
@@ -2021,35 +2209,42 @@ UPB_INLINE envoy_config_route_v3_RetryPolicy *envoy_config_route_v3_RetryPolicy_
envoy_config_route_v3_RetryPolicy *ret = envoy_config_route_v3_RetryPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RetryPolicy *envoy_config_route_v3_RetryPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RetryPolicy *ret = envoy_config_route_v3_RetryPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RetryPolicy_serialize(const envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RetryPolicy_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RetryPolicy_retry_on(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_num_retries(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RetryPolicy_num_retries(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_per_try_timeout(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_per_try_timeout(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retry_priority(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
-UPB_INLINE const envoy_config_route_v3_RetryPolicy_RetryPriority* envoy_config_route_v3_RetryPolicy_retry_priority(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const envoy_config_route_v3_RetryPolicy_RetryPriority*); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retry_host_predicate(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
-UPB_INLINE const envoy_config_route_v3_RetryPolicy_RetryHostPredicate* const* envoy_config_route_v3_RetryPolicy_retry_host_predicate(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (const envoy_config_route_v3_RetryPolicy_RetryHostPredicate* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
-UPB_INLINE int64_t envoy_config_route_v3_RetryPolicy_host_selection_retry_max_attempts(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
-UPB_INLINE uint32_t const* envoy_config_route_v3_RetryPolicy_retriable_status_codes(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
-UPB_INLINE const envoy_config_route_v3_RetryPolicy_RetryBackOff* envoy_config_route_v3_RetryPolicy_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const envoy_config_route_v3_RetryPolicy_RetryBackOff*); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retriable_headers(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
-UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RetryPolicy_retriable_headers(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retriable_request_headers(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88)); }
-UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RetryPolicy_retriable_request_headers(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_rate_limited_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
-UPB_INLINE const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff* envoy_config_route_v3_RetryPolicy_rate_limited_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RetryPolicy_retry_on(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_num_retries(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RetryPolicy_num_retries(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 32), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_per_try_timeout(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_per_try_timeout(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retry_priority(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_config_route_v3_RetryPolicy_RetryPriority* envoy_config_route_v3_RetryPolicy_retry_priority(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 48), const envoy_config_route_v3_RetryPolicy_RetryPriority*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retry_host_predicate(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 72)); }
+UPB_INLINE const envoy_config_route_v3_RetryPolicy_RetryHostPredicate* const* envoy_config_route_v3_RetryPolicy_retry_host_predicate(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (const envoy_config_route_v3_RetryPolicy_RetryHostPredicate* const*)_upb_array_accessor(msg, UPB_SIZE(44, 72), len); }
+UPB_INLINE int64_t envoy_config_route_v3_RetryPolicy_host_selection_retry_max_attempts(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
+UPB_INLINE uint32_t const* envoy_config_route_v3_RetryPolicy_retriable_status_codes(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(48, 80), len); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_config_route_v3_RetryPolicy_RetryBackOff* envoy_config_route_v3_RetryPolicy_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), const envoy_config_route_v3_RetryPolicy_RetryBackOff*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retriable_headers(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 88)); }
+UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RetryPolicy_retriable_headers(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(52, 88), len); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_retriable_request_headers(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 96)); }
+UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RetryPolicy_retriable_request_headers(const envoy_config_route_v3_RetryPolicy *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(56, 96), len); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_has_rate_limited_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff* envoy_config_route_v3_RetryPolicy_rate_limited_retry_back_off(const envoy_config_route_v3_RetryPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 64), const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff*); }
UPB_INLINE void envoy_config_route_v3_RetryPolicy_set_retry_on(envoy_config_route_v3_RetryPolicy *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_set_num_retries(envoy_config_route_v3_RetryPolicy *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 32), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RetryPolicy_mutable_num_retries(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_RetryPolicy_num_retries(msg);
@@ -2061,7 +2256,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RetryPolicy
return sub;
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_set_per_try_timeout(envoy_config_route_v3_RetryPolicy *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 40), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_mutable_per_try_timeout(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RetryPolicy_per_try_timeout(msg);
@@ -2073,7 +2269,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_mu
return sub;
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_set_retry_priority(envoy_config_route_v3_RetryPolicy *msg, envoy_config_route_v3_RetryPolicy_RetryPriority* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 40), envoy_config_route_v3_RetryPolicy_RetryPriority*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 48), envoy_config_route_v3_RetryPolicy_RetryPriority*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy_RetryPriority* envoy_config_route_v3_RetryPolicy_mutable_retry_priority(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_route_v3_RetryPolicy_RetryPriority* sub = (struct envoy_config_route_v3_RetryPolicy_RetryPriority*)envoy_config_route_v3_RetryPolicy_retry_priority(msg);
@@ -2085,33 +2282,34 @@ UPB_INLINE struct envoy_config_route_v3_RetryPolicy_RetryPriority* envoy_config_
return sub;
}
UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryHostPredicate** envoy_config_route_v3_RetryPolicy_mutable_retry_host_predicate(envoy_config_route_v3_RetryPolicy *msg, size_t *len) {
- return (envoy_config_route_v3_RetryPolicy_RetryHostPredicate**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
+ return (envoy_config_route_v3_RetryPolicy_RetryHostPredicate**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 72), len);
}
UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryHostPredicate** envoy_config_route_v3_RetryPolicy_resize_retry_host_predicate(envoy_config_route_v3_RetryPolicy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RetryPolicy_RetryHostPredicate**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RetryPolicy_RetryHostPredicate**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 72), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy_RetryHostPredicate* envoy_config_route_v3_RetryPolicy_add_retry_host_predicate(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_route_v3_RetryPolicy_RetryHostPredicate* sub = (struct envoy_config_route_v3_RetryPolicy_RetryHostPredicate*)_upb_msg_new(&envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, 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 void envoy_config_route_v3_RetryPolicy_set_host_selection_retry_max_attempts(envoy_config_route_v3_RetryPolicy *msg, int64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
}
UPB_INLINE uint32_t* envoy_config_route_v3_RetryPolicy_mutable_retriable_status_codes(envoy_config_route_v3_RetryPolicy *msg, size_t *len) {
- return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
+ return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 80), len);
}
UPB_INLINE uint32_t* envoy_config_route_v3_RetryPolicy_resize_retriable_status_codes(envoy_config_route_v3_RetryPolicy *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 80), len, 2, arena);
}
UPB_INLINE bool envoy_config_route_v3_RetryPolicy_add_retriable_status_codes(envoy_config_route_v3_RetryPolicy *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 80), 2, &val,
arena);
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_set_retry_back_off(envoy_config_route_v3_RetryPolicy *msg, envoy_config_route_v3_RetryPolicy_RetryBackOff* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 48), envoy_config_route_v3_RetryPolicy_RetryBackOff*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 56), envoy_config_route_v3_RetryPolicy_RetryBackOff*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy_RetryBackOff* envoy_config_route_v3_RetryPolicy_mutable_retry_back_off(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_route_v3_RetryPolicy_RetryBackOff* sub = (struct envoy_config_route_v3_RetryPolicy_RetryBackOff*)envoy_config_route_v3_RetryPolicy_retry_back_off(msg);
@@ -2123,33 +2321,34 @@ UPB_INLINE struct envoy_config_route_v3_RetryPolicy_RetryBackOff* envoy_config_r
return sub;
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RetryPolicy_mutable_retriable_headers(envoy_config_route_v3_RetryPolicy *msg, size_t *len) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 88), len);
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RetryPolicy_resize_retriable_headers(envoy_config_route_v3_RetryPolicy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_route_v3_RetryPolicy_add_retriable_headers(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(52, 88), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RetryPolicy_mutable_retriable_request_headers(envoy_config_route_v3_RetryPolicy *msg, size_t *len) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 96), len);
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RetryPolicy_resize_retriable_request_headers(envoy_config_route_v3_RetryPolicy *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 88), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(56, 96), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_route_v3_RetryPolicy_add_retriable_request_headers(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(48, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(56, 96), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_set_rate_limited_retry_back_off(envoy_config_route_v3_RetryPolicy *msg, envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 56), envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 64), envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff* envoy_config_route_v3_RetryPolicy_mutable_rate_limited_retry_back_off(envoy_config_route_v3_RetryPolicy *msg, upb_arena *arena) {
struct envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff* sub = (struct envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff*)envoy_config_route_v3_RetryPolicy_rate_limited_retry_back_off(msg);
@@ -2171,6 +2370,12 @@ UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryPriority *envoy_config_route_v
envoy_config_route_v3_RetryPolicy_RetryPriority *ret = envoy_config_route_v3_RetryPolicy_RetryPriority_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RetryPriority_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryPriority *envoy_config_route_v3_RetryPolicy_RetryPriority_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RetryPolicy_RetryPriority *ret = envoy_config_route_v3_RetryPolicy_RetryPriority_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RetryPriority_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RetryPolicy_RetryPriority_serialize(const envoy_config_route_v3_RetryPolicy_RetryPriority *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RetryPolicy_RetryPriority_msginit, arena, len);
}
@@ -2211,6 +2416,12 @@ UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryHostPredicate *envoy_config_ro
envoy_config_route_v3_RetryPolicy_RetryHostPredicate *ret = envoy_config_route_v3_RetryPolicy_RetryHostPredicate_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryHostPredicate *envoy_config_route_v3_RetryPolicy_RetryHostPredicate_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RetryPolicy_RetryHostPredicate *ret = envoy_config_route_v3_RetryPolicy_RetryHostPredicate_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RetryPolicy_RetryHostPredicate_serialize(const envoy_config_route_v3_RetryPolicy_RetryHostPredicate *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit, arena, len);
}
@@ -2251,17 +2462,24 @@ UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryBackOff *envoy_config_route_v3
envoy_config_route_v3_RetryPolicy_RetryBackOff *ret = envoy_config_route_v3_RetryPolicy_RetryBackOff_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RetryPolicy_RetryBackOff *envoy_config_route_v3_RetryPolicy_RetryBackOff_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RetryPolicy_RetryBackOff *ret = envoy_config_route_v3_RetryPolicy_RetryBackOff_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RetryPolicy_RetryBackOff_serialize(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RetryBackOff_has_base_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RetryBackOff_base_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RetryBackOff_has_max_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RetryBackOff_max_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RetryBackOff_has_base_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RetryBackOff_base_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RetryBackOff_has_max_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RetryBackOff_max_interval(const envoy_config_route_v3_RetryPolicy_RetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
UPB_INLINE void envoy_config_route_v3_RetryPolicy_RetryBackOff_set_base_interval(envoy_config_route_v3_RetryPolicy_RetryBackOff *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RetryBackOff_mutable_base_interval(envoy_config_route_v3_RetryPolicy_RetryBackOff *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RetryPolicy_RetryBackOff_base_interval(msg);
@@ -2273,7 +2491,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_Re
return sub;
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_RetryBackOff_set_max_interval(envoy_config_route_v3_RetryPolicy_RetryBackOff *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RetryBackOff_mutable_max_interval(envoy_config_route_v3_RetryPolicy_RetryBackOff *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RetryPolicy_RetryBackOff_max_interval(msg);
@@ -2295,15 +2514,21 @@ UPB_INLINE envoy_config_route_v3_RetryPolicy_ResetHeader *envoy_config_route_v3_
envoy_config_route_v3_RetryPolicy_ResetHeader *ret = envoy_config_route_v3_RetryPolicy_ResetHeader_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_ResetHeader_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RetryPolicy_ResetHeader *envoy_config_route_v3_RetryPolicy_ResetHeader_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RetryPolicy_ResetHeader *ret = envoy_config_route_v3_RetryPolicy_ResetHeader_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_ResetHeader_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RetryPolicy_ResetHeader_serialize(const envoy_config_route_v3_RetryPolicy_ResetHeader *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RetryPolicy_ResetHeader_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RetryPolicy_ResetHeader_name(const envoy_config_route_v3_RetryPolicy_ResetHeader *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE upb_strview envoy_config_route_v3_RetryPolicy_ResetHeader_name(const envoy_config_route_v3_RetryPolicy_ResetHeader *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE int32_t envoy_config_route_v3_RetryPolicy_ResetHeader_format(const envoy_config_route_v3_RetryPolicy_ResetHeader *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
UPB_INLINE void envoy_config_route_v3_RetryPolicy_ResetHeader_set_name(envoy_config_route_v3_RetryPolicy_ResetHeader *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RetryPolicy_ResetHeader_set_format(envoy_config_route_v3_RetryPolicy_ResetHeader *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
@@ -2319,30 +2544,37 @@ UPB_INLINE envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *envoy_conf
envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *ret = envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *ret = envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_serialize(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_has_reset_headers(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const envoy_config_route_v3_RetryPolicy_ResetHeader* const* envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_reset_headers(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, size_t *len) { return (const envoy_config_route_v3_RetryPolicy_ResetHeader* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
-UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_has_max_interval(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_max_interval(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_has_reset_headers(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_config_route_v3_RetryPolicy_ResetHeader* const* envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_reset_headers(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, size_t *len) { return (const envoy_config_route_v3_RetryPolicy_ResetHeader* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_has_max_interval(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_max_interval(const envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
UPB_INLINE envoy_config_route_v3_RetryPolicy_ResetHeader** envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_mutable_reset_headers(envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, size_t *len) {
- return (envoy_config_route_v3_RetryPolicy_ResetHeader**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+ return (envoy_config_route_v3_RetryPolicy_ResetHeader**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE envoy_config_route_v3_RetryPolicy_ResetHeader** envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_resize_reset_headers(envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RetryPolicy_ResetHeader**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RetryPolicy_ResetHeader**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RetryPolicy_ResetHeader* envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_add_reset_headers(envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, upb_arena *arena) {
struct envoy_config_route_v3_RetryPolicy_ResetHeader* sub = (struct envoy_config_route_v3_RetryPolicy_ResetHeader*)_upb_msg_new(&envoy_config_route_v3_RetryPolicy_ResetHeader_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, 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 void envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_set_max_interval(envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_mutable_max_interval(envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_max_interval(msg);
@@ -2364,17 +2596,24 @@ UPB_INLINE envoy_config_route_v3_HedgePolicy *envoy_config_route_v3_HedgePolicy_
envoy_config_route_v3_HedgePolicy *ret = envoy_config_route_v3_HedgePolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_HedgePolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_HedgePolicy *envoy_config_route_v3_HedgePolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_HedgePolicy *ret = envoy_config_route_v3_HedgePolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_HedgePolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_HedgePolicy_serialize(const envoy_config_route_v3_HedgePolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_HedgePolicy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_HedgePolicy_has_initial_requests(const envoy_config_route_v3_HedgePolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_route_v3_HedgePolicy_has_initial_requests(const envoy_config_route_v3_HedgePolicy *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_HedgePolicy_initial_requests(const envoy_config_route_v3_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_config_route_v3_HedgePolicy_has_additional_request_chance(const envoy_config_route_v3_HedgePolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE bool envoy_config_route_v3_HedgePolicy_has_additional_request_chance(const envoy_config_route_v3_HedgePolicy *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_HedgePolicy_additional_request_chance(const envoy_config_route_v3_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_FractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_HedgePolicy_hedge_on_per_try_timeout(const envoy_config_route_v3_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_route_v3_HedgePolicy_hedge_on_per_try_timeout(const envoy_config_route_v3_HedgePolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_route_v3_HedgePolicy_set_initial_requests(envoy_config_route_v3_HedgePolicy *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_HedgePolicy_mutable_initial_requests(envoy_config_route_v3_HedgePolicy *msg, upb_arena *arena) {
@@ -2387,6 +2626,7 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_HedgePolicy
return sub;
}
UPB_INLINE void envoy_config_route_v3_HedgePolicy_set_additional_request_chance(envoy_config_route_v3_HedgePolicy *msg, struct envoy_type_v3_FractionalPercent* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_HedgePolicy_mutable_additional_request_chance(envoy_config_route_v3_HedgePolicy *msg, upb_arena *arena) {
@@ -2399,7 +2639,7 @@ UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_HedgePo
return sub;
}
UPB_INLINE void envoy_config_route_v3_HedgePolicy_set_hedge_on_per_try_timeout(envoy_config_route_v3_HedgePolicy *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* envoy.config.route.v3.RedirectAction */
@@ -2412,6 +2652,12 @@ UPB_INLINE envoy_config_route_v3_RedirectAction *envoy_config_route_v3_RedirectA
envoy_config_route_v3_RedirectAction *ret = envoy_config_route_v3_RedirectAction_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RedirectAction_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RedirectAction *envoy_config_route_v3_RedirectAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RedirectAction *ret = envoy_config_route_v3_RedirectAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RedirectAction_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RedirectAction_serialize(const envoy_config_route_v3_RedirectAction *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RedirectAction_msginit, arena, len);
}
@@ -2421,51 +2667,66 @@ typedef enum {
envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_scheme_redirect = 7,
envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_NOT_SET = 0
} envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_oneofcases;
-UPB_INLINE envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_oneofcases envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_case(const envoy_config_route_v3_RedirectAction* msg) { return (envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(44, 72), int32_t); }
+UPB_INLINE envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_oneofcases envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_case(const envoy_config_route_v3_RedirectAction* msg) { return (envoy_config_route_v3_RedirectAction_scheme_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(40, 72), int32_t); }
typedef enum {
envoy_config_route_v3_RedirectAction_path_rewrite_specifier_path_redirect = 2,
envoy_config_route_v3_RedirectAction_path_rewrite_specifier_prefix_rewrite = 5,
+ envoy_config_route_v3_RedirectAction_path_rewrite_specifier_regex_rewrite = 9,
envoy_config_route_v3_RedirectAction_path_rewrite_specifier_NOT_SET = 0
} envoy_config_route_v3_RedirectAction_path_rewrite_specifier_oneofcases;
-UPB_INLINE envoy_config_route_v3_RedirectAction_path_rewrite_specifier_oneofcases envoy_config_route_v3_RedirectAction_path_rewrite_specifier_case(const envoy_config_route_v3_RedirectAction* msg) { return (envoy_config_route_v3_RedirectAction_path_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 48), int32_t); }
+UPB_INLINE envoy_config_route_v3_RedirectAction_path_rewrite_specifier_oneofcases envoy_config_route_v3_RedirectAction_path_rewrite_specifier_case(const envoy_config_route_v3_RedirectAction* msg) { return (envoy_config_route_v3_RedirectAction_path_rewrite_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(28, 48), int32_t); }
-UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_host_redirect(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_path_redirect(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 48)) == 2; }
-UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_path_redirect(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), UPB_SIZE(32, 48), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_host_redirect(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_path_redirect(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 48)) == 2; }
+UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_path_redirect(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(20, 32), UPB_SIZE(28, 48), 2, upb_strview_make("", strlen(""))); }
UPB_INLINE int32_t envoy_config_route_v3_RedirectAction_response_code(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_https_redirect(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(44, 72)) == 4; }
-UPB_INLINE bool envoy_config_route_v3_RedirectAction_https_redirect(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(36, 56), UPB_SIZE(44, 72), 4, false); }
-UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_prefix_rewrite(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 48)) == 5; }
-UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_prefix_rewrite(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), UPB_SIZE(32, 48), 5, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool envoy_config_route_v3_RedirectAction_strip_query(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
-UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_scheme_redirect(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(44, 72)) == 7; }
-UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_scheme_redirect(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(36, 56), UPB_SIZE(44, 72), 7, upb_strview_make("", strlen(""))); }
-UPB_INLINE uint32_t envoy_config_route_v3_RedirectAction_port_redirect(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_https_redirect(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(40, 72)) == 4; }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_https_redirect(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(32, 56), UPB_SIZE(40, 72), 4, false); }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_prefix_rewrite(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 48)) == 5; }
+UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_prefix_rewrite(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(20, 32), UPB_SIZE(28, 48), 5, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_strip_query(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_scheme_redirect(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(40, 72)) == 7; }
+UPB_INLINE upb_strview envoy_config_route_v3_RedirectAction_scheme_redirect(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(32, 56), UPB_SIZE(40, 72), 7, upb_strview_make("", strlen(""))); }
+UPB_INLINE uint32_t envoy_config_route_v3_RedirectAction_port_redirect(const envoy_config_route_v3_RedirectAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
+UPB_INLINE bool envoy_config_route_v3_RedirectAction_has_regex_rewrite(const envoy_config_route_v3_RedirectAction *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 48)) == 9; }
+UPB_INLINE const struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RedirectAction_regex_rewrite(const envoy_config_route_v3_RedirectAction *msg) { return UPB_READ_ONEOF(msg, const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*, UPB_SIZE(20, 32), UPB_SIZE(28, 48), 9, NULL); }
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_host_redirect(envoy_config_route_v3_RedirectAction *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_path_redirect(envoy_config_route_v3_RedirectAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), value, UPB_SIZE(32, 48), 2);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(20, 32), value, UPB_SIZE(28, 48), 2);
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_response_code(envoy_config_route_v3_RedirectAction *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_https_redirect(envoy_config_route_v3_RedirectAction *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(36, 56), value, UPB_SIZE(44, 72), 4);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(32, 56), value, UPB_SIZE(40, 72), 4);
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_prefix_rewrite(envoy_config_route_v3_RedirectAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(24, 32), value, UPB_SIZE(32, 48), 5);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(20, 32), value, UPB_SIZE(28, 48), 5);
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_strip_query(envoy_config_route_v3_RedirectAction *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_scheme_redirect(envoy_config_route_v3_RedirectAction *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(36, 56), value, UPB_SIZE(44, 72), 7);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(32, 56), value, UPB_SIZE(40, 72), 7);
}
UPB_INLINE void envoy_config_route_v3_RedirectAction_set_port_redirect(envoy_config_route_v3_RedirectAction *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
+}
+UPB_INLINE void envoy_config_route_v3_RedirectAction_set_regex_rewrite(envoy_config_route_v3_RedirectAction *msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_type_matcher_v3_RegexMatchAndSubstitute*, UPB_SIZE(20, 32), value, UPB_SIZE(28, 48), 9);
+}
+UPB_INLINE struct envoy_type_matcher_v3_RegexMatchAndSubstitute* envoy_config_route_v3_RedirectAction_mutable_regex_rewrite(envoy_config_route_v3_RedirectAction *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_RegexMatchAndSubstitute* sub = (struct envoy_type_matcher_v3_RegexMatchAndSubstitute*)envoy_config_route_v3_RedirectAction_regex_rewrite(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_matcher_v3_RegexMatchAndSubstitute*)_upb_msg_new(&envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_route_v3_RedirectAction_set_regex_rewrite(msg, sub);
+ }
+ return sub;
}
/* envoy.config.route.v3.DirectResponseAction */
@@ -2478,19 +2739,26 @@ UPB_INLINE envoy_config_route_v3_DirectResponseAction *envoy_config_route_v3_Dir
envoy_config_route_v3_DirectResponseAction *ret = envoy_config_route_v3_DirectResponseAction_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_DirectResponseAction_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_DirectResponseAction *envoy_config_route_v3_DirectResponseAction_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_DirectResponseAction *ret = envoy_config_route_v3_DirectResponseAction_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_DirectResponseAction_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_DirectResponseAction_serialize(const envoy_config_route_v3_DirectResponseAction *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_DirectResponseAction_msginit, arena, len);
}
-UPB_INLINE uint32_t envoy_config_route_v3_DirectResponseAction_status(const envoy_config_route_v3_DirectResponseAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
-UPB_INLINE bool envoy_config_route_v3_DirectResponseAction_has_body(const envoy_config_route_v3_DirectResponseAction *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_route_v3_DirectResponseAction_body(const envoy_config_route_v3_DirectResponseAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE uint32_t envoy_config_route_v3_DirectResponseAction_status(const envoy_config_route_v3_DirectResponseAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
+UPB_INLINE bool envoy_config_route_v3_DirectResponseAction_has_body(const envoy_config_route_v3_DirectResponseAction *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_config_route_v3_DirectResponseAction_body(const envoy_config_route_v3_DirectResponseAction *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_config_core_v3_DataSource*); }
UPB_INLINE void envoy_config_route_v3_DirectResponseAction_set_status(envoy_config_route_v3_DirectResponseAction *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
UPB_INLINE void envoy_config_route_v3_DirectResponseAction_set_body(envoy_config_route_v3_DirectResponseAction *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_config_route_v3_DirectResponseAction_mutable_body(envoy_config_route_v3_DirectResponseAction *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_config_route_v3_DirectResponseAction_body(msg);
@@ -2512,19 +2780,26 @@ UPB_INLINE envoy_config_route_v3_Decorator *envoy_config_route_v3_Decorator_pars
envoy_config_route_v3_Decorator *ret = envoy_config_route_v3_Decorator_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_Decorator_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_Decorator *envoy_config_route_v3_Decorator_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_Decorator *ret = envoy_config_route_v3_Decorator_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_Decorator_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_Decorator_serialize(const envoy_config_route_v3_Decorator *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_Decorator_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_Decorator_operation(const envoy_config_route_v3_Decorator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_Decorator_has_propagate(const envoy_config_route_v3_Decorator *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_Decorator_propagate(const envoy_config_route_v3_Decorator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
+UPB_INLINE upb_strview envoy_config_route_v3_Decorator_operation(const envoy_config_route_v3_Decorator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_Decorator_has_propagate(const envoy_config_route_v3_Decorator *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_Decorator_propagate(const envoy_config_route_v3_Decorator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_config_route_v3_Decorator_set_operation(envoy_config_route_v3_Decorator *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_Decorator_set_propagate(envoy_config_route_v3_Decorator *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_Decorator_mutable_propagate(envoy_config_route_v3_Decorator *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_Decorator_propagate(msg);
@@ -2546,21 +2821,28 @@ UPB_INLINE envoy_config_route_v3_Tracing *envoy_config_route_v3_Tracing_parse(co
envoy_config_route_v3_Tracing *ret = envoy_config_route_v3_Tracing_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_Tracing_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_Tracing *envoy_config_route_v3_Tracing_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_Tracing *ret = envoy_config_route_v3_Tracing_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_Tracing_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_Tracing_serialize(const envoy_config_route_v3_Tracing *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_Tracing_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_Tracing_has_client_sampling(const envoy_config_route_v3_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_client_sampling(const envoy_config_route_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_v3_FractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_Tracing_has_random_sampling(const envoy_config_route_v3_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_random_sampling(const envoy_config_route_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_FractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_Tracing_has_overall_sampling(const envoy_config_route_v3_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_overall_sampling(const envoy_config_route_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_FractionalPercent*); }
-UPB_INLINE bool envoy_config_route_v3_Tracing_has_custom_tags(const envoy_config_route_v3_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_type_tracing_v3_CustomTag* const* envoy_config_route_v3_Tracing_custom_tags(const envoy_config_route_v3_Tracing *msg, size_t *len) { return (const struct envoy_type_tracing_v3_CustomTag* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool envoy_config_route_v3_Tracing_has_client_sampling(const envoy_config_route_v3_Tracing *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_client_sampling(const envoy_config_route_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE bool envoy_config_route_v3_Tracing_has_random_sampling(const envoy_config_route_v3_Tracing *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_random_sampling(const envoy_config_route_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE bool envoy_config_route_v3_Tracing_has_overall_sampling(const envoy_config_route_v3_Tracing *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_overall_sampling(const envoy_config_route_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE bool envoy_config_route_v3_Tracing_has_custom_tags(const envoy_config_route_v3_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const struct envoy_type_tracing_v3_CustomTag* const* envoy_config_route_v3_Tracing_custom_tags(const envoy_config_route_v3_Tracing *msg, size_t *len) { return (const struct envoy_type_tracing_v3_CustomTag* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
UPB_INLINE void envoy_config_route_v3_Tracing_set_client_sampling(envoy_config_route_v3_Tracing *msg, struct envoy_type_v3_FractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_v3_FractionalPercent*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_mutable_client_sampling(envoy_config_route_v3_Tracing *msg, upb_arena *arena) {
struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_config_route_v3_Tracing_client_sampling(msg);
@@ -2572,7 +2854,8 @@ UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing
return sub;
}
UPB_INLINE void envoy_config_route_v3_Tracing_set_random_sampling(envoy_config_route_v3_Tracing *msg, struct envoy_type_v3_FractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_FractionalPercent*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_mutable_random_sampling(envoy_config_route_v3_Tracing *msg, upb_arena *arena) {
struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_config_route_v3_Tracing_random_sampling(msg);
@@ -2584,7 +2867,8 @@ UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing
return sub;
}
UPB_INLINE void envoy_config_route_v3_Tracing_set_overall_sampling(envoy_config_route_v3_Tracing *msg, struct envoy_type_v3_FractionalPercent* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_FractionalPercent*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_FractionalPercent*) = value;
}
UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing_mutable_overall_sampling(envoy_config_route_v3_Tracing *msg, upb_arena *arena) {
struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_config_route_v3_Tracing_overall_sampling(msg);
@@ -2596,15 +2880,15 @@ UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_config_route_v3_Tracing
return sub;
}
UPB_INLINE struct envoy_type_tracing_v3_CustomTag** envoy_config_route_v3_Tracing_mutable_custom_tags(envoy_config_route_v3_Tracing *msg, size_t *len) {
- return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE struct envoy_type_tracing_v3_CustomTag** envoy_config_route_v3_Tracing_resize_custom_tags(envoy_config_route_v3_Tracing *msg, size_t len, upb_arena *arena) {
- return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_tracing_v3_CustomTag* envoy_config_route_v3_Tracing_add_custom_tags(envoy_config_route_v3_Tracing *msg, upb_arena *arena) {
struct envoy_type_tracing_v3_CustomTag* sub = (struct envoy_type_tracing_v3_CustomTag*)_upb_msg_new(&envoy_type_tracing_v3_CustomTag_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -2619,6 +2903,12 @@ UPB_INLINE envoy_config_route_v3_VirtualCluster *envoy_config_route_v3_VirtualCl
envoy_config_route_v3_VirtualCluster *ret = envoy_config_route_v3_VirtualCluster_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_VirtualCluster_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_VirtualCluster *envoy_config_route_v3_VirtualCluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_VirtualCluster *ret = envoy_config_route_v3_VirtualCluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_VirtualCluster_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_VirtualCluster_serialize(const envoy_config_route_v3_VirtualCluster *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_VirtualCluster_msginit, arena, len);
}
@@ -2634,12 +2924,12 @@ UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_VirtualCl
return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_VirtualCluster_resize_headers(envoy_config_route_v3_VirtualCluster *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_route_v3_VirtualCluster_add_headers(envoy_config_route_v3_VirtualCluster *msg, upb_arena *arena) {
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -2654,20 +2944,27 @@ UPB_INLINE envoy_config_route_v3_RateLimit *envoy_config_route_v3_RateLimit_pars
envoy_config_route_v3_RateLimit *ret = envoy_config_route_v3_RateLimit_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit *envoy_config_route_v3_RateLimit_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit *ret = envoy_config_route_v3_RateLimit_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_serialize(const envoy_config_route_v3_RateLimit *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RateLimit_has_stage(const envoy_config_route_v3_RateLimit *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RateLimit_stage(const envoy_config_route_v3_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_disable_key(const envoy_config_route_v3_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RateLimit_has_actions(const envoy_config_route_v3_RateLimit *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const envoy_config_route_v3_RateLimit_Action* const* envoy_config_route_v3_RateLimit_actions(const envoy_config_route_v3_RateLimit *msg, size_t *len) { return (const envoy_config_route_v3_RateLimit_Action* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
-UPB_INLINE bool envoy_config_route_v3_RateLimit_has_limit(const envoy_config_route_v3_RateLimit *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_route_v3_RateLimit_Override* envoy_config_route_v3_RateLimit_limit(const envoy_config_route_v3_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_config_route_v3_RateLimit_Override*); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_has_stage(const envoy_config_route_v3_RateLimit *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_RateLimit_stage(const envoy_config_route_v3_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_disable_key(const envoy_config_route_v3_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_has_actions(const envoy_config_route_v3_RateLimit *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE const envoy_config_route_v3_RateLimit_Action* const* envoy_config_route_v3_RateLimit_actions(const envoy_config_route_v3_RateLimit *msg, size_t *len) { return (const envoy_config_route_v3_RateLimit_Action* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_has_limit(const envoy_config_route_v3_RateLimit *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_config_route_v3_RateLimit_Override* envoy_config_route_v3_RateLimit_limit(const envoy_config_route_v3_RateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_config_route_v3_RateLimit_Override*); }
UPB_INLINE void envoy_config_route_v3_RateLimit_set_stage(envoy_config_route_v3_RateLimit *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RateLimit_mutable_stage(envoy_config_route_v3_RateLimit *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_config_route_v3_RateLimit_stage(msg);
@@ -2679,23 +2976,24 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_RateLimit_m
return sub;
}
UPB_INLINE void envoy_config_route_v3_RateLimit_set_disable_key(envoy_config_route_v3_RateLimit *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE envoy_config_route_v3_RateLimit_Action** envoy_config_route_v3_RateLimit_mutable_actions(envoy_config_route_v3_RateLimit *msg, size_t *len) {
- return (envoy_config_route_v3_RateLimit_Action**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+ return (envoy_config_route_v3_RateLimit_Action**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE envoy_config_route_v3_RateLimit_Action** envoy_config_route_v3_RateLimit_resize_actions(envoy_config_route_v3_RateLimit *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_RateLimit_Action**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_RateLimit_Action**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_RateLimit_Action* envoy_config_route_v3_RateLimit_add_actions(envoy_config_route_v3_RateLimit *msg, upb_arena *arena) {
struct envoy_config_route_v3_RateLimit_Action* sub = (struct envoy_config_route_v3_RateLimit_Action*)_upb_msg_new(&envoy_config_route_v3_RateLimit_Action_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_config_route_v3_RateLimit_set_limit(envoy_config_route_v3_RateLimit *msg, envoy_config_route_v3_RateLimit_Override* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_config_route_v3_RateLimit_Override*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_config_route_v3_RateLimit_Override*) = value;
}
UPB_INLINE struct envoy_config_route_v3_RateLimit_Override* envoy_config_route_v3_RateLimit_mutable_limit(envoy_config_route_v3_RateLimit *msg, upb_arena *arena) {
struct envoy_config_route_v3_RateLimit_Override* sub = (struct envoy_config_route_v3_RateLimit_Override*)envoy_config_route_v3_RateLimit_limit(msg);
@@ -2717,6 +3015,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action *envoy_config_route_v3_RateLim
envoy_config_route_v3_RateLimit_Action *ret = envoy_config_route_v3_RateLimit_Action_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action *envoy_config_route_v3_RateLimit_Action_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action *ret = envoy_config_route_v3_RateLimit_Action_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_serialize(const envoy_config_route_v3_RateLimit_Action *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_msginit, arena, len);
}
@@ -2729,6 +3033,8 @@ typedef enum {
envoy_config_route_v3_RateLimit_Action_action_specifier_generic_key = 5,
envoy_config_route_v3_RateLimit_Action_action_specifier_header_value_match = 6,
envoy_config_route_v3_RateLimit_Action_action_specifier_dynamic_metadata = 7,
+ envoy_config_route_v3_RateLimit_Action_action_specifier_metadata = 8,
+ envoy_config_route_v3_RateLimit_Action_action_specifier_extension = 9,
envoy_config_route_v3_RateLimit_Action_action_specifier_NOT_SET = 0
} envoy_config_route_v3_RateLimit_Action_action_specifier_oneofcases;
UPB_INLINE envoy_config_route_v3_RateLimit_Action_action_specifier_oneofcases envoy_config_route_v3_RateLimit_Action_action_specifier_case(const envoy_config_route_v3_RateLimit_Action* msg) { return (envoy_config_route_v3_RateLimit_Action_action_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
@@ -2747,6 +3053,10 @@ UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_has_header_value_match(co
UPB_INLINE const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch* envoy_config_route_v3_RateLimit_Action_header_value_match(const envoy_config_route_v3_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 6, NULL); }
UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_has_dynamic_metadata(const envoy_config_route_v3_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 7; }
UPB_INLINE const envoy_config_route_v3_RateLimit_Action_DynamicMetaData* envoy_config_route_v3_RateLimit_Action_dynamic_metadata(const envoy_config_route_v3_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RateLimit_Action_DynamicMetaData*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 7, NULL); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_has_metadata(const envoy_config_route_v3_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 8; }
+UPB_INLINE const envoy_config_route_v3_RateLimit_Action_MetaData* envoy_config_route_v3_RateLimit_Action_metadata(const envoy_config_route_v3_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const envoy_config_route_v3_RateLimit_Action_MetaData*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 8, NULL); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_has_extension(const envoy_config_route_v3_RateLimit_Action *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 9; }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_route_v3_RateLimit_Action_extension(const envoy_config_route_v3_RateLimit_Action *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_TypedExtensionConfig*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 9, NULL); }
UPB_INLINE void envoy_config_route_v3_RateLimit_Action_set_source_cluster(envoy_config_route_v3_RateLimit_Action *msg, envoy_config_route_v3_RateLimit_Action_SourceCluster* value) {
UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RateLimit_Action_SourceCluster*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
@@ -2832,6 +3142,30 @@ UPB_INLINE struct envoy_config_route_v3_RateLimit_Action_DynamicMetaData* envoy_
}
return sub;
}
+UPB_INLINE void envoy_config_route_v3_RateLimit_Action_set_metadata(envoy_config_route_v3_RateLimit_Action *msg, envoy_config_route_v3_RateLimit_Action_MetaData* value) {
+ UPB_WRITE_ONEOF(msg, envoy_config_route_v3_RateLimit_Action_MetaData*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 8);
+}
+UPB_INLINE struct envoy_config_route_v3_RateLimit_Action_MetaData* envoy_config_route_v3_RateLimit_Action_mutable_metadata(envoy_config_route_v3_RateLimit_Action *msg, upb_arena *arena) {
+ struct envoy_config_route_v3_RateLimit_Action_MetaData* sub = (struct envoy_config_route_v3_RateLimit_Action_MetaData*)envoy_config_route_v3_RateLimit_Action_metadata(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_route_v3_RateLimit_Action_MetaData*)_upb_msg_new(&envoy_config_route_v3_RateLimit_Action_MetaData_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_route_v3_RateLimit_Action_set_metadata(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_route_v3_RateLimit_Action_set_extension(envoy_config_route_v3_RateLimit_Action *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_TypedExtensionConfig*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 9);
+}
+UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_route_v3_RateLimit_Action_mutable_extension(envoy_config_route_v3_RateLimit_Action *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_config_route_v3_RateLimit_Action_extension(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_route_v3_RateLimit_Action_set_extension(msg, sub);
+ }
+ return sub;
+}
/* envoy.config.route.v3.RateLimit.Action.SourceCluster */
@@ -2843,6 +3177,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_SourceCluster *envoy_config_ro
envoy_config_route_v3_RateLimit_Action_SourceCluster *ret = envoy_config_route_v3_RateLimit_Action_SourceCluster_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_SourceCluster *envoy_config_route_v3_RateLimit_Action_SourceCluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_SourceCluster *ret = envoy_config_route_v3_RateLimit_Action_SourceCluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_SourceCluster_serialize(const envoy_config_route_v3_RateLimit_Action_SourceCluster *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit, arena, len);
}
@@ -2859,6 +3199,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_DestinationCluster *envoy_conf
envoy_config_route_v3_RateLimit_Action_DestinationCluster *ret = envoy_config_route_v3_RateLimit_Action_DestinationCluster_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_DestinationCluster *envoy_config_route_v3_RateLimit_Action_DestinationCluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_DestinationCluster *ret = envoy_config_route_v3_RateLimit_Action_DestinationCluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_DestinationCluster_serialize(const envoy_config_route_v3_RateLimit_Action_DestinationCluster *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit, arena, len);
}
@@ -2875,6 +3221,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_RequestHeaders *envoy_config_r
envoy_config_route_v3_RateLimit_Action_RequestHeaders *ret = envoy_config_route_v3_RateLimit_Action_RequestHeaders_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_RequestHeaders *envoy_config_route_v3_RateLimit_Action_RequestHeaders_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_RequestHeaders *ret = envoy_config_route_v3_RateLimit_Action_RequestHeaders_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_RequestHeaders_serialize(const envoy_config_route_v3_RateLimit_Action_RequestHeaders *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit, arena, len);
}
@@ -2903,6 +3255,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_RemoteAddress *envoy_config_ro
envoy_config_route_v3_RateLimit_Action_RemoteAddress *ret = envoy_config_route_v3_RateLimit_Action_RemoteAddress_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_RemoteAddress *envoy_config_route_v3_RateLimit_Action_RemoteAddress_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_RemoteAddress *ret = envoy_config_route_v3_RateLimit_Action_RemoteAddress_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_RemoteAddress_serialize(const envoy_config_route_v3_RateLimit_Action_RemoteAddress *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit, arena, len);
}
@@ -2919,6 +3277,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_GenericKey *envoy_config_route
envoy_config_route_v3_RateLimit_Action_GenericKey *ret = envoy_config_route_v3_RateLimit_Action_GenericKey_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_GenericKey_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_GenericKey *envoy_config_route_v3_RateLimit_Action_GenericKey_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_GenericKey *ret = envoy_config_route_v3_RateLimit_Action_GenericKey_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_GenericKey_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_GenericKey_serialize(const envoy_config_route_v3_RateLimit_Action_GenericKey *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_GenericKey_msginit, arena, len);
}
@@ -2943,21 +3307,28 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *envoy_config
envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *ret = envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *ret = envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_serialize(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_descriptor_value(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_has_expect_match(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_expect_match(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_has_headers(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_headers(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_descriptor_value(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_has_expect_match(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_expect_match(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_has_headers(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_config_route_v3_HeaderMatcher* const* envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_headers(const envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, size_t *len) { return (const envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
UPB_INLINE void envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_set_descriptor_value(envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_set_expect_match(envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_mutable_expect_match(envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_expect_match(msg);
@@ -2969,15 +3340,15 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_config_route_v3_RateLimit_Act
return sub;
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_mutable_headers(envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, size_t *len) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE envoy_config_route_v3_HeaderMatcher** envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_resize_headers(envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_add_headers(envoy_config_route_v3_RateLimit_Action_HeaderValueMatch *msg, upb_arena *arena) {
struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -2992,20 +3363,27 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Action_DynamicMetaData *envoy_config_
envoy_config_route_v3_RateLimit_Action_DynamicMetaData *ret = envoy_config_route_v3_RateLimit_Action_DynamicMetaData_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_DynamicMetaData *envoy_config_route_v3_RateLimit_Action_DynamicMetaData_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_DynamicMetaData *ret = envoy_config_route_v3_RateLimit_Action_DynamicMetaData_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_DynamicMetaData_serialize(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_DynamicMetaData_descriptor_key(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_DynamicMetaData_has_metadata_key(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Action_DynamicMetaData_metadata_key(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_type_metadata_v3_MetadataKey*); }
-UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_DynamicMetaData_default_value(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
+UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_DynamicMetaData_descriptor_key(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_DynamicMetaData_has_metadata_key(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Action_DynamicMetaData_metadata_key(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_type_metadata_v3_MetadataKey*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_DynamicMetaData_default_value(const envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE void envoy_config_route_v3_RateLimit_Action_DynamicMetaData_set_descriptor_key(envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_RateLimit_Action_DynamicMetaData_set_metadata_key(envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg, struct envoy_type_metadata_v3_MetadataKey* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_type_metadata_v3_MetadataKey*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_type_metadata_v3_MetadataKey*) = value;
}
UPB_INLINE struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Action_DynamicMetaData_mutable_metadata_key(envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg, upb_arena *arena) {
struct envoy_type_metadata_v3_MetadataKey* sub = (struct envoy_type_metadata_v3_MetadataKey*)envoy_config_route_v3_RateLimit_Action_DynamicMetaData_metadata_key(msg);
@@ -3017,7 +3395,56 @@ UPB_INLINE struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_Rate
return sub;
}
UPB_INLINE void envoy_config_route_v3_RateLimit_Action_DynamicMetaData_set_default_value(envoy_config_route_v3_RateLimit_Action_DynamicMetaData *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+
+/* envoy.config.route.v3.RateLimit.Action.MetaData */
+
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_MetaData *envoy_config_route_v3_RateLimit_Action_MetaData_new(upb_arena *arena) {
+ return (envoy_config_route_v3_RateLimit_Action_MetaData *)_upb_msg_new(&envoy_config_route_v3_RateLimit_Action_MetaData_msginit, arena);
+}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_MetaData *envoy_config_route_v3_RateLimit_Action_MetaData_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_route_v3_RateLimit_Action_MetaData *ret = envoy_config_route_v3_RateLimit_Action_MetaData_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_MetaData_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_route_v3_RateLimit_Action_MetaData *envoy_config_route_v3_RateLimit_Action_MetaData_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Action_MetaData *ret = envoy_config_route_v3_RateLimit_Action_MetaData_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Action_MetaData_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_route_v3_RateLimit_Action_MetaData_serialize(const envoy_config_route_v3_RateLimit_Action_MetaData *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_route_v3_RateLimit_Action_MetaData_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_MetaData_descriptor_key(const envoy_config_route_v3_RateLimit_Action_MetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Action_MetaData_has_metadata_key(const envoy_config_route_v3_RateLimit_Action_MetaData *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Action_MetaData_metadata_key(const envoy_config_route_v3_RateLimit_Action_MetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct envoy_type_metadata_v3_MetadataKey*); }
+UPB_INLINE upb_strview envoy_config_route_v3_RateLimit_Action_MetaData_default_value(const envoy_config_route_v3_RateLimit_Action_MetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
+UPB_INLINE int32_t envoy_config_route_v3_RateLimit_Action_MetaData_source(const envoy_config_route_v3_RateLimit_Action_MetaData *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_config_route_v3_RateLimit_Action_MetaData_set_descriptor_key(envoy_config_route_v3_RateLimit_Action_MetaData *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_route_v3_RateLimit_Action_MetaData_set_metadata_key(envoy_config_route_v3_RateLimit_Action_MetaData *msg, struct envoy_type_metadata_v3_MetadataKey* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct envoy_type_metadata_v3_MetadataKey*) = value;
+}
+UPB_INLINE struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Action_MetaData_mutable_metadata_key(envoy_config_route_v3_RateLimit_Action_MetaData *msg, upb_arena *arena) {
+ struct envoy_type_metadata_v3_MetadataKey* sub = (struct envoy_type_metadata_v3_MetadataKey*)envoy_config_route_v3_RateLimit_Action_MetaData_metadata_key(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_metadata_v3_MetadataKey*)_upb_msg_new(&envoy_type_metadata_v3_MetadataKey_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_route_v3_RateLimit_Action_MetaData_set_metadata_key(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_route_v3_RateLimit_Action_MetaData_set_default_value(envoy_config_route_v3_RateLimit_Action_MetaData *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
+}
+UPB_INLINE void envoy_config_route_v3_RateLimit_Action_MetaData_set_source(envoy_config_route_v3_RateLimit_Action_MetaData *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
/* envoy.config.route.v3.RateLimit.Override */
@@ -3030,6 +3457,12 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Override *envoy_config_route_v3_RateL
envoy_config_route_v3_RateLimit_Override *ret = envoy_config_route_v3_RateLimit_Override_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Override_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Override *envoy_config_route_v3_RateLimit_Override_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Override *ret = envoy_config_route_v3_RateLimit_Override_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Override_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Override_serialize(const envoy_config_route_v3_RateLimit_Override *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Override_msginit, arena, len);
}
@@ -3066,15 +3499,22 @@ UPB_INLINE envoy_config_route_v3_RateLimit_Override_DynamicMetadata *envoy_confi
envoy_config_route_v3_RateLimit_Override_DynamicMetadata *ret = envoy_config_route_v3_RateLimit_Override_DynamicMetadata_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_RateLimit_Override_DynamicMetadata *envoy_config_route_v3_RateLimit_Override_DynamicMetadata_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_RateLimit_Override_DynamicMetadata *ret = envoy_config_route_v3_RateLimit_Override_DynamicMetadata_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_RateLimit_Override_DynamicMetadata_serialize(const envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_RateLimit_Override_DynamicMetadata_has_metadata_key(const envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Override_DynamicMetadata_metadata_key(const envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_type_metadata_v3_MetadataKey*); }
+UPB_INLINE bool envoy_config_route_v3_RateLimit_Override_DynamicMetadata_has_metadata_key(const envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Override_DynamicMetadata_metadata_key(const envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_metadata_v3_MetadataKey*); }
UPB_INLINE void envoy_config_route_v3_RateLimit_Override_DynamicMetadata_set_metadata_key(envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg, struct envoy_type_metadata_v3_MetadataKey* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_type_metadata_v3_MetadataKey*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_metadata_v3_MetadataKey*) = value;
}
UPB_INLINE struct envoy_type_metadata_v3_MetadataKey* envoy_config_route_v3_RateLimit_Override_DynamicMetadata_mutable_metadata_key(envoy_config_route_v3_RateLimit_Override_DynamicMetadata *msg, upb_arena *arena) {
struct envoy_type_metadata_v3_MetadataKey* sub = (struct envoy_type_metadata_v3_MetadataKey*)envoy_config_route_v3_RateLimit_Override_DynamicMetadata_metadata_key(msg);
@@ -3096,6 +3536,12 @@ UPB_INLINE envoy_config_route_v3_HeaderMatcher *envoy_config_route_v3_HeaderMatc
envoy_config_route_v3_HeaderMatcher *ret = envoy_config_route_v3_HeaderMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_HeaderMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_HeaderMatcher *envoy_config_route_v3_HeaderMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_HeaderMatcher *ret = envoy_config_route_v3_HeaderMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_HeaderMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_HeaderMatcher_serialize(const envoy_config_route_v3_HeaderMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_HeaderMatcher_msginit, arena, len);
}
@@ -3185,6 +3631,12 @@ UPB_INLINE envoy_config_route_v3_QueryParameterMatcher *envoy_config_route_v3_Qu
envoy_config_route_v3_QueryParameterMatcher *ret = envoy_config_route_v3_QueryParameterMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_QueryParameterMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_QueryParameterMatcher *envoy_config_route_v3_QueryParameterMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_QueryParameterMatcher *ret = envoy_config_route_v3_QueryParameterMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_QueryParameterMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_QueryParameterMatcher_serialize(const envoy_config_route_v3_QueryParameterMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_QueryParameterMatcher_msginit, arena, len);
}
@@ -3231,18 +3683,25 @@ UPB_INLINE envoy_config_route_v3_InternalRedirectPolicy *envoy_config_route_v3_I
envoy_config_route_v3_InternalRedirectPolicy *ret = envoy_config_route_v3_InternalRedirectPolicy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_InternalRedirectPolicy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_InternalRedirectPolicy *envoy_config_route_v3_InternalRedirectPolicy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_InternalRedirectPolicy *ret = envoy_config_route_v3_InternalRedirectPolicy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_InternalRedirectPolicy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_InternalRedirectPolicy_serialize(const envoy_config_route_v3_InternalRedirectPolicy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_InternalRedirectPolicy_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_route_v3_InternalRedirectPolicy_has_max_internal_redirects(const envoy_config_route_v3_InternalRedirectPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_config_route_v3_InternalRedirectPolicy_has_max_internal_redirects(const envoy_config_route_v3_InternalRedirectPolicy *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_config_route_v3_InternalRedirectPolicy_max_internal_redirects(const envoy_config_route_v3_InternalRedirectPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
UPB_INLINE uint32_t const* envoy_config_route_v3_InternalRedirectPolicy_redirect_response_codes(const envoy_config_route_v3_InternalRedirectPolicy *msg, size_t *len) { return (uint32_t const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
UPB_INLINE bool envoy_config_route_v3_InternalRedirectPolicy_has_predicates(const envoy_config_route_v3_InternalRedirectPolicy *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* const* envoy_config_route_v3_InternalRedirectPolicy_predicates(const envoy_config_route_v3_InternalRedirectPolicy *msg, size_t *len) { return (const struct envoy_config_core_v3_TypedExtensionConfig* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE bool envoy_config_route_v3_InternalRedirectPolicy_allow_cross_scheme_redirect(const envoy_config_route_v3_InternalRedirectPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_route_v3_InternalRedirectPolicy_allow_cross_scheme_redirect(const envoy_config_route_v3_InternalRedirectPolicy *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_route_v3_InternalRedirectPolicy_set_max_internal_redirects(envoy_config_route_v3_InternalRedirectPolicy *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_config_route_v3_InternalRedirectPolicy_mutable_max_internal_redirects(envoy_config_route_v3_InternalRedirectPolicy *msg, upb_arena *arena) {
@@ -3258,27 +3717,68 @@ UPB_INLINE uint32_t* envoy_config_route_v3_InternalRedirectPolicy_mutable_redire
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE uint32_t* envoy_config_route_v3_InternalRedirectPolicy_resize_redirect_response_codes(envoy_config_route_v3_InternalRedirectPolicy *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, 2, arena);
}
UPB_INLINE bool envoy_config_route_v3_InternalRedirectPolicy_add_redirect_response_codes(envoy_config_route_v3_InternalRedirectPolicy *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(8, 16), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(8, 16), 2, &val,
arena);
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig** envoy_config_route_v3_InternalRedirectPolicy_mutable_predicates(envoy_config_route_v3_InternalRedirectPolicy *msg, size_t *len) {
return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig** envoy_config_route_v3_InternalRedirectPolicy_resize_predicates(envoy_config_route_v3_InternalRedirectPolicy *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_TypedExtensionConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_config_route_v3_InternalRedirectPolicy_add_predicates(envoy_config_route_v3_InternalRedirectPolicy *msg, upb_arena *arena) {
struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_msg_new(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, 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 envoy_config_route_v3_InternalRedirectPolicy_set_allow_cross_scheme_redirect(envoy_config_route_v3_InternalRedirectPolicy *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+}
+
+/* envoy.config.route.v3.FilterConfig */
+
+UPB_INLINE envoy_config_route_v3_FilterConfig *envoy_config_route_v3_FilterConfig_new(upb_arena *arena) {
+ return (envoy_config_route_v3_FilterConfig *)_upb_msg_new(&envoy_config_route_v3_FilterConfig_msginit, arena);
+}
+UPB_INLINE envoy_config_route_v3_FilterConfig *envoy_config_route_v3_FilterConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_config_route_v3_FilterConfig *ret = envoy_config_route_v3_FilterConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_FilterConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_config_route_v3_FilterConfig *envoy_config_route_v3_FilterConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_FilterConfig *ret = envoy_config_route_v3_FilterConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_FilterConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_config_route_v3_FilterConfig_serialize(const envoy_config_route_v3_FilterConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_config_route_v3_FilterConfig_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_config_route_v3_FilterConfig_has_config(const envoy_config_route_v3_FilterConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_config_route_v3_FilterConfig_config(const envoy_config_route_v3_FilterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_config_route_v3_FilterConfig_is_optional(const envoy_config_route_v3_FilterConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+
+UPB_INLINE void envoy_config_route_v3_FilterConfig_set_config(envoy_config_route_v3_FilterConfig *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* envoy_config_route_v3_FilterConfig_mutable_config(envoy_config_route_v3_FilterConfig *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_config_route_v3_FilterConfig_config(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ envoy_config_route_v3_FilterConfig_set_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_config_route_v3_FilterConfig_set_is_optional(envoy_config_route_v3_FilterConfig *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c
index 0dd0a7010ba..301441e3c42 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c
@@ -22,14 +22,14 @@ static const upb_msglayout *const envoy_config_route_v3_ScopedRouteConfiguration
static const upb_msglayout_field envoy_config_route_v3_ScopedRouteConfiguration__fields[4] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(12, 24), 0, 0, 9, 1},
- {3, UPB_SIZE(20, 40), 0, 0, 11, 1},
- {4, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {3, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {4, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout envoy_config_route_v3_ScopedRouteConfiguration_msginit = {
&envoy_config_route_v3_ScopedRouteConfiguration_submsgs[0],
&envoy_config_route_v3_ScopedRouteConfiguration__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
static const upb_msglayout *const envoy_config_route_v3_ScopedRouteConfiguration_Key_submsgs[1] = {
@@ -43,7 +43,7 @@ static const upb_msglayout_field envoy_config_route_v3_ScopedRouteConfiguration_
const upb_msglayout envoy_config_route_v3_ScopedRouteConfiguration_Key_msginit = {
&envoy_config_route_v3_ScopedRouteConfiguration_Key_submsgs[0],
&envoy_config_route_v3_ScopedRouteConfiguration_Key__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment__fields[1] = {
@@ -53,7 +53,7 @@ static const upb_msglayout_field envoy_config_route_v3_ScopedRouteConfiguration_
const upb_msglayout envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit = {
NULL,
&envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment__fields[0],
- UPB_SIZE(16, 32), 1, false,
+ UPB_SIZE(16, 32), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h
index 979510ecfd4..72d1622841f 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -40,15 +41,21 @@ UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration *envoy_config_route_v3
envoy_config_route_v3_ScopedRouteConfiguration *ret = envoy_config_route_v3_ScopedRouteConfiguration_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_ScopedRouteConfiguration_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration *envoy_config_route_v3_ScopedRouteConfiguration_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_ScopedRouteConfiguration *ret = envoy_config_route_v3_ScopedRouteConfiguration_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_ScopedRouteConfiguration_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_ScopedRouteConfiguration_serialize(const envoy_config_route_v3_ScopedRouteConfiguration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_ScopedRouteConfiguration_msginit, arena, len);
}
UPB_INLINE upb_strview envoy_config_route_v3_ScopedRouteConfiguration_name(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE upb_strview envoy_config_route_v3_ScopedRouteConfiguration_route_configuration_name(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
-UPB_INLINE bool envoy_config_route_v3_ScopedRouteConfiguration_has_key(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool envoy_config_route_v3_ScopedRouteConfiguration_has_key(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const envoy_config_route_v3_ScopedRouteConfiguration_Key* envoy_config_route_v3_ScopedRouteConfiguration_key(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const envoy_config_route_v3_ScopedRouteConfiguration_Key*); }
-UPB_INLINE bool envoy_config_route_v3_ScopedRouteConfiguration_on_demand(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_config_route_v3_ScopedRouteConfiguration_on_demand(const envoy_config_route_v3_ScopedRouteConfiguration *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void envoy_config_route_v3_ScopedRouteConfiguration_set_name(envoy_config_route_v3_ScopedRouteConfiguration *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
@@ -57,6 +64,7 @@ UPB_INLINE void envoy_config_route_v3_ScopedRouteConfiguration_set_route_configu
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_config_route_v3_ScopedRouteConfiguration_set_key(envoy_config_route_v3_ScopedRouteConfiguration *msg, envoy_config_route_v3_ScopedRouteConfiguration_Key* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), envoy_config_route_v3_ScopedRouteConfiguration_Key*) = value;
}
UPB_INLINE struct envoy_config_route_v3_ScopedRouteConfiguration_Key* envoy_config_route_v3_ScopedRouteConfiguration_mutable_key(envoy_config_route_v3_ScopedRouteConfiguration *msg, upb_arena *arena) {
@@ -69,7 +77,7 @@ UPB_INLINE struct envoy_config_route_v3_ScopedRouteConfiguration_Key* envoy_conf
return sub;
}
UPB_INLINE void envoy_config_route_v3_ScopedRouteConfiguration_set_on_demand(envoy_config_route_v3_ScopedRouteConfiguration *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* envoy.config.route.v3.ScopedRouteConfiguration.Key */
@@ -82,6 +90,12 @@ UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration_Key *envoy_config_rout
envoy_config_route_v3_ScopedRouteConfiguration_Key *ret = envoy_config_route_v3_ScopedRouteConfiguration_Key_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_ScopedRouteConfiguration_Key_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration_Key *envoy_config_route_v3_ScopedRouteConfiguration_Key_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_ScopedRouteConfiguration_Key *ret = envoy_config_route_v3_ScopedRouteConfiguration_Key_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_ScopedRouteConfiguration_Key_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_ScopedRouteConfiguration_Key_serialize(const envoy_config_route_v3_ScopedRouteConfiguration_Key *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_ScopedRouteConfiguration_Key_msginit, arena, len);
}
@@ -93,12 +107,12 @@ UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment** envoy_c
return (envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment** envoy_config_route_v3_ScopedRouteConfiguration_Key_resize_fragments(envoy_config_route_v3_ScopedRouteConfiguration_Key *msg, size_t len, upb_arena *arena) {
- return (envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment* envoy_config_route_v3_ScopedRouteConfiguration_Key_add_fragments(envoy_config_route_v3_ScopedRouteConfiguration_Key *msg, upb_arena *arena) {
struct envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment* sub = (struct envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment*)_upb_msg_new(&envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -113,6 +127,12 @@ UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment *envoy_co
envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment *ret = envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment *envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment *ret = envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_serialize(const envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c
index 8771e2c4d0d..52cb6b72ba0 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c
@@ -10,7 +10,6 @@
#include "upb/msg.h"
#include "envoy/config/trace/v3/http_tracer.upb.h"
#include "google/protobuf/any.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
#include "validate/validate.upb.h"
@@ -22,13 +21,13 @@ static const upb_msglayout *const envoy_config_trace_v3_Tracing_submsgs[1] = {
};
static const upb_msglayout_field envoy_config_trace_v3_Tracing__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_config_trace_v3_Tracing_msginit = {
&envoy_config_trace_v3_Tracing_submsgs[0],
&envoy_config_trace_v3_Tracing__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_config_trace_v3_Tracing_Http_submsgs[1] = {
@@ -43,7 +42,7 @@ static const upb_msglayout_field envoy_config_trace_v3_Tracing_Http__fields[2] =
const upb_msglayout envoy_config_trace_v3_Tracing_Http_msginit = {
&envoy_config_trace_v3_Tracing_Http_submsgs[0],
&envoy_config_trace_v3_Tracing_Http__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h
index 7f97caca7bf..21240fa0e48 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -39,15 +40,22 @@ UPB_INLINE envoy_config_trace_v3_Tracing *envoy_config_trace_v3_Tracing_parse(co
envoy_config_trace_v3_Tracing *ret = envoy_config_trace_v3_Tracing_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_trace_v3_Tracing *envoy_config_trace_v3_Tracing_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_trace_v3_Tracing *ret = envoy_config_trace_v3_Tracing_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_trace_v3_Tracing_serialize(const envoy_config_trace_v3_Tracing *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_trace_v3_Tracing_msginit, arena, len);
}
-UPB_INLINE bool envoy_config_trace_v3_Tracing_has_http(const envoy_config_trace_v3_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const envoy_config_trace_v3_Tracing_Http* envoy_config_trace_v3_Tracing_http(const envoy_config_trace_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const envoy_config_trace_v3_Tracing_Http*); }
+UPB_INLINE bool envoy_config_trace_v3_Tracing_has_http(const envoy_config_trace_v3_Tracing *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_config_trace_v3_Tracing_Http* envoy_config_trace_v3_Tracing_http(const envoy_config_trace_v3_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_config_trace_v3_Tracing_Http*); }
UPB_INLINE void envoy_config_trace_v3_Tracing_set_http(envoy_config_trace_v3_Tracing *msg, envoy_config_trace_v3_Tracing_Http* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), envoy_config_trace_v3_Tracing_Http*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_config_trace_v3_Tracing_Http*) = value;
}
UPB_INLINE struct envoy_config_trace_v3_Tracing_Http* envoy_config_trace_v3_Tracing_mutable_http(envoy_config_trace_v3_Tracing *msg, upb_arena *arena) {
struct envoy_config_trace_v3_Tracing_Http* sub = (struct envoy_config_trace_v3_Tracing_Http*)envoy_config_trace_v3_Tracing_http(msg);
@@ -69,6 +77,12 @@ UPB_INLINE envoy_config_trace_v3_Tracing_Http *envoy_config_trace_v3_Tracing_Htt
envoy_config_trace_v3_Tracing_Http *ret = envoy_config_trace_v3_Tracing_Http_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_Http_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_config_trace_v3_Tracing_Http *envoy_config_trace_v3_Tracing_Http_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_config_trace_v3_Tracing_Http *ret = envoy_config_trace_v3_Tracing_Http_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_config_trace_v3_Tracing_Http_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_config_trace_v3_Tracing_Http_serialize(const envoy_config_trace_v3_Tracing_Http *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_config_trace_v3_Tracing_Http_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c
new file mode 100644
index 00000000000..308e8b53388
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c
@@ -0,0 +1,29 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/clusters/aggregate/v3/cluster.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/extensions/clusters/aggregate/v3/cluster.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout_field envoy_extensions_clusters_aggregate_v3_ClusterConfig__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 3},
+};
+
+const upb_msglayout envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit = {
+ NULL,
+ &envoy_extensions_clusters_aggregate_v3_ClusterConfig__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h
new file mode 100644
index 00000000000..ffa4ccbca29
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h
@@ -0,0 +1,67 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/clusters/aggregate/v3/cluster.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_CLUSTERS_AGGREGATE_V3_CLUSTER_PROTO_UPB_H_
+#define ENVOY_EXTENSIONS_CLUSTERS_AGGREGATE_V3_CLUSTER_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_extensions_clusters_aggregate_v3_ClusterConfig;
+typedef struct envoy_extensions_clusters_aggregate_v3_ClusterConfig envoy_extensions_clusters_aggregate_v3_ClusterConfig;
+extern const upb_msglayout envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit;
+
+
+/* envoy.extensions.clusters.aggregate.v3.ClusterConfig */
+
+UPB_INLINE envoy_extensions_clusters_aggregate_v3_ClusterConfig *envoy_extensions_clusters_aggregate_v3_ClusterConfig_new(upb_arena *arena) {
+ return (envoy_extensions_clusters_aggregate_v3_ClusterConfig *)_upb_msg_new(&envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit, arena);
+}
+UPB_INLINE envoy_extensions_clusters_aggregate_v3_ClusterConfig *envoy_extensions_clusters_aggregate_v3_ClusterConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_clusters_aggregate_v3_ClusterConfig *ret = envoy_extensions_clusters_aggregate_v3_ClusterConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_clusters_aggregate_v3_ClusterConfig *envoy_extensions_clusters_aggregate_v3_ClusterConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_clusters_aggregate_v3_ClusterConfig *ret = envoy_extensions_clusters_aggregate_v3_ClusterConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_clusters_aggregate_v3_ClusterConfig_serialize(const envoy_extensions_clusters_aggregate_v3_ClusterConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview const* envoy_extensions_clusters_aggregate_v3_ClusterConfig_clusters(const envoy_extensions_clusters_aggregate_v3_ClusterConfig *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+
+UPB_INLINE upb_strview* envoy_extensions_clusters_aggregate_v3_ClusterConfig_mutable_clusters(envoy_extensions_clusters_aggregate_v3_ClusterConfig *msg, size_t *len) {
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE upb_strview* envoy_extensions_clusters_aggregate_v3_ClusterConfig_resize_clusters(envoy_extensions_clusters_aggregate_v3_ClusterConfig *msg, size_t len, upb_arena *arena) {
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
+}
+UPB_INLINE bool envoy_extensions_clusters_aggregate_v3_ClusterConfig_add_clusters(envoy_extensions_clusters_aggregate_v3_ClusterConfig *msg, upb_strview val, upb_arena *arena) {
+ return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
+ arena);
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_CLUSTERS_AGGREGATE_V3_CLUSTER_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c
new file mode 100644
index 00000000000..5f92b8d00b2
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c
@@ -0,0 +1,79 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/common/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/extensions/filters/common/fault/v3/fault.upb.h"
+#include "envoy/type/v3/percent.upb.h"
+#include "google/protobuf/duration.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_extensions_filters_common_fault_v3_FaultDelay_submsgs[3] = {
+ &envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit,
+ &envoy_type_v3_FractionalPercent_msginit,
+ &google_protobuf_Duration_msginit,
+};
+
+static const upb_msglayout_field envoy_extensions_filters_common_fault_v3_FaultDelay__fields[3] = {
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 2, 11, 1},
+ {4, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+};
+
+const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_msginit = {
+ &envoy_extensions_filters_common_fault_v3_FaultDelay_submsgs[0],
+ &envoy_extensions_filters_common_fault_v3_FaultDelay__fields[0],
+ UPB_SIZE(16, 32), 3, false, 255,
+};
+
+const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit = {
+ NULL,
+ NULL,
+ UPB_SIZE(0, 0), 0, false, 255,
+};
+
+static const upb_msglayout *const envoy_extensions_filters_common_fault_v3_FaultRateLimit_submsgs[3] = {
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit,
+ &envoy_type_v3_FractionalPercent_msginit,
+};
+
+static const upb_msglayout_field envoy_extensions_filters_common_fault_v3_FaultRateLimit__fields[3] = {
+ {1, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 1, 2, 11, 1},
+ {3, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
+};
+
+const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit = {
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_submsgs[0],
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit__fields[0],
+ UPB_SIZE(16, 32), 3, false, 255,
+};
+
+static const upb_msglayout_field envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 4, 1},
+};
+
+const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit = {
+ NULL,
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit = {
+ NULL,
+ NULL,
+ UPB_SIZE(0, 0), 0, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h
new file mode 100644
index 00000000000..8c609170d4e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h
@@ -0,0 +1,268 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/common/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_COMMON_FAULT_V3_FAULT_PROTO_UPB_H_
+#define ENVOY_EXTENSIONS_FILTERS_COMMON_FAULT_V3_FAULT_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_extensions_filters_common_fault_v3_FaultDelay;
+struct envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay;
+struct envoy_extensions_filters_common_fault_v3_FaultRateLimit;
+struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit;
+struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit;
+typedef struct envoy_extensions_filters_common_fault_v3_FaultDelay envoy_extensions_filters_common_fault_v3_FaultDelay;
+typedef struct envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay;
+typedef struct envoy_extensions_filters_common_fault_v3_FaultRateLimit envoy_extensions_filters_common_fault_v3_FaultRateLimit;
+typedef struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit;
+typedef struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit;
+struct envoy_type_v3_FractionalPercent;
+struct google_protobuf_Duration;
+extern const upb_msglayout envoy_type_v3_FractionalPercent_msginit;
+extern const upb_msglayout google_protobuf_Duration_msginit;
+
+typedef enum {
+ envoy_extensions_filters_common_fault_v3_FaultDelay_FIXED = 0
+} envoy_extensions_filters_common_fault_v3_FaultDelay_FaultDelayType;
+
+
+/* envoy.extensions.filters.common.fault.v3.FaultDelay */
+
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay *envoy_extensions_filters_common_fault_v3_FaultDelay_new(upb_arena *arena) {
+ return (envoy_extensions_filters_common_fault_v3_FaultDelay *)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultDelay_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay *envoy_extensions_filters_common_fault_v3_FaultDelay_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_common_fault_v3_FaultDelay *ret = envoy_extensions_filters_common_fault_v3_FaultDelay_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultDelay_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay *envoy_extensions_filters_common_fault_v3_FaultDelay_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_common_fault_v3_FaultDelay *ret = envoy_extensions_filters_common_fault_v3_FaultDelay_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultDelay_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_common_fault_v3_FaultDelay_serialize(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_common_fault_v3_FaultDelay_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_fixed_delay = 3,
+ envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_header_delay = 5,
+ envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_NOT_SET = 0
+} envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_oneofcases;
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_oneofcases envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_case(const envoy_extensions_filters_common_fault_v3_FaultDelay* msg) { return (envoy_extensions_filters_common_fault_v3_FaultDelay_fault_delay_secifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE bool envoy_extensions_filters_common_fault_v3_FaultDelay_has_fixed_delay(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
+UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_common_fault_v3_FaultDelay_fixed_delay(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Duration*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
+UPB_INLINE bool envoy_extensions_filters_common_fault_v3_FaultDelay_has_percentage(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_extensions_filters_common_fault_v3_FaultDelay_percentage(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE bool envoy_extensions_filters_common_fault_v3_FaultDelay_has_header_delay(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; }
+UPB_INLINE const envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay* envoy_extensions_filters_common_fault_v3_FaultDelay_header_delay(const envoy_extensions_filters_common_fault_v3_FaultDelay *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); }
+
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultDelay_set_fixed_delay(envoy_extensions_filters_common_fault_v3_FaultDelay *msg, struct google_protobuf_Duration* value) {
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Duration*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_common_fault_v3_FaultDelay_mutable_fixed_delay(envoy_extensions_filters_common_fault_v3_FaultDelay *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_extensions_filters_common_fault_v3_FaultDelay_fixed_delay(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_common_fault_v3_FaultDelay_set_fixed_delay(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultDelay_set_percentage(envoy_extensions_filters_common_fault_v3_FaultDelay *msg, struct envoy_type_v3_FractionalPercent* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_FractionalPercent*) = value;
+}
+UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_extensions_filters_common_fault_v3_FaultDelay_mutable_percentage(envoy_extensions_filters_common_fault_v3_FaultDelay *msg, upb_arena *arena) {
+ struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_extensions_filters_common_fault_v3_FaultDelay_percentage(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_v3_FractionalPercent*)_upb_msg_new(&envoy_type_v3_FractionalPercent_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_common_fault_v3_FaultDelay_set_percentage(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultDelay_set_header_delay(envoy_extensions_filters_common_fault_v3_FaultDelay *msg, envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay* value) {
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
+}
+UPB_INLINE struct envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay* envoy_extensions_filters_common_fault_v3_FaultDelay_mutable_header_delay(envoy_extensions_filters_common_fault_v3_FaultDelay *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay* sub = (struct envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay*)envoy_extensions_filters_common_fault_v3_FaultDelay_header_delay(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay*)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_common_fault_v3_FaultDelay_set_header_delay(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.extensions.filters.common.fault.v3.FaultDelay.HeaderDelay */
+
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_new(upb_arena *arena) {
+ return (envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *ret = envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *ret = envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_serialize(const envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit, arena, len);
+}
+
+
+
+/* envoy.extensions.filters.common.fault.v3.FaultRateLimit */
+
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_new(upb_arena *arena) {
+ return (envoy_extensions_filters_common_fault_v3_FaultRateLimit *)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit *ret = envoy_extensions_filters_common_fault_v3_FaultRateLimit_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit *ret = envoy_extensions_filters_common_fault_v3_FaultRateLimit_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_common_fault_v3_FaultRateLimit_serialize(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_fixed_limit = 1,
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_header_limit = 3,
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_NOT_SET = 0
+} envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_oneofcases;
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_oneofcases envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_case(const envoy_extensions_filters_common_fault_v3_FaultRateLimit* msg) { return (envoy_extensions_filters_common_fault_v3_FaultRateLimit_limit_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE bool envoy_extensions_filters_common_fault_v3_FaultRateLimit_has_fixed_limit(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 1; }
+UPB_INLINE const envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit* envoy_extensions_filters_common_fault_v3_FaultRateLimit_fixed_limit(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 1, NULL); }
+UPB_INLINE bool envoy_extensions_filters_common_fault_v3_FaultRateLimit_has_percentage(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_extensions_filters_common_fault_v3_FaultRateLimit_percentage(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE bool envoy_extensions_filters_common_fault_v3_FaultRateLimit_has_header_limit(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 3; }
+UPB_INLINE const envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit* envoy_extensions_filters_common_fault_v3_FaultRateLimit_header_limit(const envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 3, NULL); }
+
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultRateLimit_set_fixed_limit(envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit* value) {
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 1);
+}
+UPB_INLINE struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit* envoy_extensions_filters_common_fault_v3_FaultRateLimit_mutable_fixed_limit(envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit* sub = (struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit*)envoy_extensions_filters_common_fault_v3_FaultRateLimit_fixed_limit(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit*)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_set_fixed_limit(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultRateLimit_set_percentage(envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, struct envoy_type_v3_FractionalPercent* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_FractionalPercent*) = value;
+}
+UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_extensions_filters_common_fault_v3_FaultRateLimit_mutable_percentage(envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, upb_arena *arena) {
+ struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_extensions_filters_common_fault_v3_FaultRateLimit_percentage(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_v3_FractionalPercent*)_upb_msg_new(&envoy_type_v3_FractionalPercent_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_set_percentage(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultRateLimit_set_header_limit(envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit* value) {
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 3);
+}
+UPB_INLINE struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit* envoy_extensions_filters_common_fault_v3_FaultRateLimit_mutable_header_limit(envoy_extensions_filters_common_fault_v3_FaultRateLimit *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit* sub = (struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit*)envoy_extensions_filters_common_fault_v3_FaultRateLimit_header_limit(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit*)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_set_header_limit(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.extensions.filters.common.fault.v3.FaultRateLimit.FixedLimit */
+
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_new(upb_arena *arena) {
+ return (envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *ret = envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *ret = envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_serialize(const envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit, arena, len);
+}
+
+UPB_INLINE uint64_t envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_limit_kbps(const envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t); }
+
+UPB_INLINE void envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_set_limit_kbps(envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit *msg, uint64_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint64_t) = value;
+}
+
+/* envoy.extensions.filters.common.fault.v3.FaultRateLimit.HeaderLimit */
+
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_new(upb_arena *arena) {
+ return (envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *ret = envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *ret = envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_serialize(const envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit, arena, len);
+}
+
+
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_COMMON_FAULT_V3_FAULT_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c
new file mode 100644
index 00000000000..ca5144c5dcf
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c
@@ -0,0 +1,78 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/extensions/filters/http/fault/v3/fault.upb.h"
+#include "envoy/config/route/v3/route_components.upb.h"
+#include "envoy/extensions/filters/common/fault/v3/fault.upb.h"
+#include "envoy/type/v3/percent.upb.h"
+#include "google/protobuf/wrappers.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_extensions_filters_http_fault_v3_FaultAbort_submsgs[2] = {
+ &envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit,
+ &envoy_type_v3_FractionalPercent_msginit,
+};
+
+static const upb_msglayout_field envoy_extensions_filters_http_fault_v3_FaultAbort__fields[4] = {
+ {2, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 13, 1},
+ {3, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+ {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 13, 1},
+};
+
+const upb_msglayout envoy_extensions_filters_http_fault_v3_FaultAbort_msginit = {
+ &envoy_extensions_filters_http_fault_v3_FaultAbort_submsgs[0],
+ &envoy_extensions_filters_http_fault_v3_FaultAbort__fields[0],
+ UPB_SIZE(16, 32), 4, false, 255,
+};
+
+const upb_msglayout envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit = {
+ NULL,
+ NULL,
+ UPB_SIZE(0, 0), 0, false, 255,
+};
+
+static const upb_msglayout *const envoy_extensions_filters_http_fault_v3_HTTPFault_submsgs[5] = {
+ &envoy_config_route_v3_HeaderMatcher_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultDelay_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit,
+ &envoy_extensions_filters_http_fault_v3_FaultAbort_msginit,
+ &google_protobuf_UInt32Value_msginit,
+};
+
+static const upb_msglayout_field envoy_extensions_filters_http_fault_v3_HTTPFault__fields[14] = {
+ {1, UPB_SIZE(68, 136), 1, 1, 11, 1},
+ {2, UPB_SIZE(72, 144), 2, 3, 11, 1},
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {4, UPB_SIZE(84, 168), 0, 0, 11, 3},
+ {5, UPB_SIZE(88, 176), 0, 0, 9, 3},
+ {6, UPB_SIZE(76, 152), 3, 4, 11, 1},
+ {7, UPB_SIZE(80, 160), 4, 2, 11, 1},
+ {8, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {9, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {10, UPB_SIZE(28, 56), 0, 0, 9, 1},
+ {11, UPB_SIZE(36, 72), 0, 0, 9, 1},
+ {12, UPB_SIZE(44, 88), 0, 0, 9, 1},
+ {13, UPB_SIZE(52, 104), 0, 0, 9, 1},
+ {14, UPB_SIZE(60, 120), 0, 0, 9, 1},
+};
+
+const upb_msglayout envoy_extensions_filters_http_fault_v3_HTTPFault_msginit = {
+ &envoy_extensions_filters_http_fault_v3_HTTPFault_submsgs[0],
+ &envoy_extensions_filters_http_fault_v3_HTTPFault__fields[0],
+ UPB_SIZE(96, 192), 14, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h
new file mode 100644
index 00000000000..fc618c9a53e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h
@@ -0,0 +1,281 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_FAULT_V3_FAULT_PROTO_UPB_H_
+#define ENVOY_EXTENSIONS_FILTERS_HTTP_FAULT_V3_FAULT_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_extensions_filters_http_fault_v3_FaultAbort;
+struct envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort;
+struct envoy_extensions_filters_http_fault_v3_HTTPFault;
+typedef struct envoy_extensions_filters_http_fault_v3_FaultAbort envoy_extensions_filters_http_fault_v3_FaultAbort;
+typedef struct envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort;
+typedef struct envoy_extensions_filters_http_fault_v3_HTTPFault envoy_extensions_filters_http_fault_v3_HTTPFault;
+extern const upb_msglayout envoy_extensions_filters_http_fault_v3_FaultAbort_msginit;
+extern const upb_msglayout envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit;
+extern const upb_msglayout envoy_extensions_filters_http_fault_v3_HTTPFault_msginit;
+struct envoy_config_route_v3_HeaderMatcher;
+struct envoy_extensions_filters_common_fault_v3_FaultDelay;
+struct envoy_extensions_filters_common_fault_v3_FaultRateLimit;
+struct envoy_type_v3_FractionalPercent;
+struct google_protobuf_UInt32Value;
+extern const upb_msglayout envoy_config_route_v3_HeaderMatcher_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit;
+extern const upb_msglayout envoy_type_v3_FractionalPercent_msginit;
+extern const upb_msglayout google_protobuf_UInt32Value_msginit;
+
+
+/* envoy.extensions.filters.http.fault.v3.FaultAbort */
+
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort *envoy_extensions_filters_http_fault_v3_FaultAbort_new(upb_arena *arena) {
+ return (envoy_extensions_filters_http_fault_v3_FaultAbort *)_upb_msg_new(&envoy_extensions_filters_http_fault_v3_FaultAbort_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort *envoy_extensions_filters_http_fault_v3_FaultAbort_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_http_fault_v3_FaultAbort *ret = envoy_extensions_filters_http_fault_v3_FaultAbort_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_http_fault_v3_FaultAbort_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort *envoy_extensions_filters_http_fault_v3_FaultAbort_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_http_fault_v3_FaultAbort *ret = envoy_extensions_filters_http_fault_v3_FaultAbort_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_http_fault_v3_FaultAbort_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_http_fault_v3_FaultAbort_serialize(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_http_fault_v3_FaultAbort_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_http_status = 2,
+ envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_grpc_status = 5,
+ envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_header_abort = 4,
+ envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_NOT_SET = 0
+} envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_oneofcases;
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_oneofcases envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_case(const envoy_extensions_filters_http_fault_v3_FaultAbort* msg) { return (envoy_extensions_filters_http_fault_v3_FaultAbort_error_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_FaultAbort_has_http_status(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 2; }
+UPB_INLINE uint32_t envoy_extensions_filters_http_fault_v3_FaultAbort_http_status(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 2, 0); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_FaultAbort_has_percentage(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_v3_FractionalPercent* envoy_extensions_filters_http_fault_v3_FaultAbort_percentage(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_FractionalPercent*); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_FaultAbort_has_header_abort(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; }
+UPB_INLINE const envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort* envoy_extensions_filters_http_fault_v3_FaultAbort_header_abort(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_FaultAbort_has_grpc_status(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; }
+UPB_INLINE uint32_t envoy_extensions_filters_http_fault_v3_FaultAbort_grpc_status(const envoy_extensions_filters_http_fault_v3_FaultAbort *msg) { return UPB_READ_ONEOF(msg, uint32_t, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, 0); }
+
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_FaultAbort_set_http_status(envoy_extensions_filters_http_fault_v3_FaultAbort *msg, uint32_t value) {
+ UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 2);
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_FaultAbort_set_percentage(envoy_extensions_filters_http_fault_v3_FaultAbort *msg, struct envoy_type_v3_FractionalPercent* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_FractionalPercent*) = value;
+}
+UPB_INLINE struct envoy_type_v3_FractionalPercent* envoy_extensions_filters_http_fault_v3_FaultAbort_mutable_percentage(envoy_extensions_filters_http_fault_v3_FaultAbort *msg, upb_arena *arena) {
+ struct envoy_type_v3_FractionalPercent* sub = (struct envoy_type_v3_FractionalPercent*)envoy_extensions_filters_http_fault_v3_FaultAbort_percentage(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_v3_FractionalPercent*)_upb_msg_new(&envoy_type_v3_FractionalPercent_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_fault_v3_FaultAbort_set_percentage(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_FaultAbort_set_header_abort(envoy_extensions_filters_http_fault_v3_FaultAbort *msg, envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort* value) {
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4);
+}
+UPB_INLINE struct envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort* envoy_extensions_filters_http_fault_v3_FaultAbort_mutable_header_abort(envoy_extensions_filters_http_fault_v3_FaultAbort *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort* sub = (struct envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort*)envoy_extensions_filters_http_fault_v3_FaultAbort_header_abort(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort*)_upb_msg_new(&envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_fault_v3_FaultAbort_set_header_abort(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_FaultAbort_set_grpc_status(envoy_extensions_filters_http_fault_v3_FaultAbort *msg, uint32_t value) {
+ UPB_WRITE_ONEOF(msg, uint32_t, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
+}
+
+/* envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort */
+
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_new(upb_arena *arena) {
+ return (envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *)_upb_msg_new(&envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *ret = envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *ret = envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_serialize(const envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit, arena, len);
+}
+
+
+
+/* envoy.extensions.filters.http.fault.v3.HTTPFault */
+
+UPB_INLINE envoy_extensions_filters_http_fault_v3_HTTPFault *envoy_extensions_filters_http_fault_v3_HTTPFault_new(upb_arena *arena) {
+ return (envoy_extensions_filters_http_fault_v3_HTTPFault *)_upb_msg_new(&envoy_extensions_filters_http_fault_v3_HTTPFault_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_http_fault_v3_HTTPFault *envoy_extensions_filters_http_fault_v3_HTTPFault_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_http_fault_v3_HTTPFault *ret = envoy_extensions_filters_http_fault_v3_HTTPFault_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_http_fault_v3_HTTPFault_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_http_fault_v3_HTTPFault *envoy_extensions_filters_http_fault_v3_HTTPFault_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_http_fault_v3_HTTPFault *ret = envoy_extensions_filters_http_fault_v3_HTTPFault_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_http_fault_v3_HTTPFault_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_http_fault_v3_HTTPFault_serialize(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_http_fault_v3_HTTPFault_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_HTTPFault_has_delay(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_extensions_filters_common_fault_v3_FaultDelay* envoy_extensions_filters_http_fault_v3_HTTPFault_delay(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 136), const struct envoy_extensions_filters_common_fault_v3_FaultDelay*); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_HTTPFault_has_abort(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_extensions_filters_http_fault_v3_FaultAbort* envoy_extensions_filters_http_fault_v3_HTTPFault_abort(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 144), const envoy_extensions_filters_http_fault_v3_FaultAbort*); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_upstream_cluster(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_HTTPFault_has_headers(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 168)); }
+UPB_INLINE const struct envoy_config_route_v3_HeaderMatcher* const* envoy_extensions_filters_http_fault_v3_HTTPFault_headers(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg, size_t *len) { return (const struct envoy_config_route_v3_HeaderMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(84, 168), len); }
+UPB_INLINE upb_strview const* envoy_extensions_filters_http_fault_v3_HTTPFault_downstream_nodes(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(88, 176), len); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_HTTPFault_has_max_active_faults(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_filters_http_fault_v3_HTTPFault_max_active_faults(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 152), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_HTTPFault_has_response_rate_limit(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_extensions_filters_common_fault_v3_FaultRateLimit* envoy_extensions_filters_http_fault_v3_HTTPFault_response_rate_limit(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 160), const struct envoy_extensions_filters_common_fault_v3_FaultRateLimit*); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_delay_percent_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_abort_percent_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_delay_duration_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), upb_strview); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_abort_http_status_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), upb_strview); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_max_active_faults_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 88), upb_strview); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_response_rate_limit_percent_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 104), upb_strview); }
+UPB_INLINE upb_strview envoy_extensions_filters_http_fault_v3_HTTPFault_abort_grpc_status_runtime(const envoy_extensions_filters_http_fault_v3_HTTPFault *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 120), upb_strview); }
+
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_delay(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, struct envoy_extensions_filters_common_fault_v3_FaultDelay* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 136), struct envoy_extensions_filters_common_fault_v3_FaultDelay*) = value;
+}
+UPB_INLINE struct envoy_extensions_filters_common_fault_v3_FaultDelay* envoy_extensions_filters_http_fault_v3_HTTPFault_mutable_delay(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_common_fault_v3_FaultDelay* sub = (struct envoy_extensions_filters_common_fault_v3_FaultDelay*)envoy_extensions_filters_http_fault_v3_HTTPFault_delay(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_common_fault_v3_FaultDelay*)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultDelay_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_fault_v3_HTTPFault_set_delay(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_abort(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, envoy_extensions_filters_http_fault_v3_FaultAbort* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(72, 144), envoy_extensions_filters_http_fault_v3_FaultAbort*) = value;
+}
+UPB_INLINE struct envoy_extensions_filters_http_fault_v3_FaultAbort* envoy_extensions_filters_http_fault_v3_HTTPFault_mutable_abort(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_http_fault_v3_FaultAbort* sub = (struct envoy_extensions_filters_http_fault_v3_FaultAbort*)envoy_extensions_filters_http_fault_v3_HTTPFault_abort(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_http_fault_v3_FaultAbort*)_upb_msg_new(&envoy_extensions_filters_http_fault_v3_FaultAbort_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_fault_v3_HTTPFault_set_abort(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_upstream_cluster(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE struct envoy_config_route_v3_HeaderMatcher** envoy_extensions_filters_http_fault_v3_HTTPFault_mutable_headers(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, size_t *len) {
+ return (struct envoy_config_route_v3_HeaderMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(84, 168), len);
+}
+UPB_INLINE struct envoy_config_route_v3_HeaderMatcher** envoy_extensions_filters_http_fault_v3_HTTPFault_resize_headers(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_route_v3_HeaderMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(84, 168), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_route_v3_HeaderMatcher* envoy_extensions_filters_http_fault_v3_HTTPFault_add_headers(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_arena *arena) {
+ struct envoy_config_route_v3_HeaderMatcher* sub = (struct envoy_config_route_v3_HeaderMatcher*)_upb_msg_new(&envoy_config_route_v3_HeaderMatcher_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(84, 168), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+UPB_INLINE upb_strview* envoy_extensions_filters_http_fault_v3_HTTPFault_mutable_downstream_nodes(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, size_t *len) {
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(88, 176), len);
+}
+UPB_INLINE upb_strview* envoy_extensions_filters_http_fault_v3_HTTPFault_resize_downstream_nodes(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, size_t len, upb_arena *arena) {
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(88, 176), len, UPB_SIZE(3, 4), arena);
+}
+UPB_INLINE bool envoy_extensions_filters_http_fault_v3_HTTPFault_add_downstream_nodes(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview val, upb_arena *arena) {
+ return _upb_array_append_accessor2(msg, UPB_SIZE(88, 176), UPB_SIZE(3, 4), &val,
+ arena);
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_max_active_faults(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 152), struct google_protobuf_UInt32Value*) = value;
+}
+UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_filters_http_fault_v3_HTTPFault_mutable_max_active_faults(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_arena *arena) {
+ struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_extensions_filters_http_fault_v3_HTTPFault_max_active_faults(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_UInt32Value*)_upb_msg_new(&google_protobuf_UInt32Value_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_fault_v3_HTTPFault_set_max_active_faults(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_response_rate_limit(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, struct envoy_extensions_filters_common_fault_v3_FaultRateLimit* value) {
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 160), struct envoy_extensions_filters_common_fault_v3_FaultRateLimit*) = value;
+}
+UPB_INLINE struct envoy_extensions_filters_common_fault_v3_FaultRateLimit* envoy_extensions_filters_http_fault_v3_HTTPFault_mutable_response_rate_limit(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_arena *arena) {
+ struct envoy_extensions_filters_common_fault_v3_FaultRateLimit* sub = (struct envoy_extensions_filters_common_fault_v3_FaultRateLimit*)envoy_extensions_filters_http_fault_v3_HTTPFault_response_rate_limit(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_extensions_filters_common_fault_v3_FaultRateLimit*)_upb_msg_new(&envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_fault_v3_HTTPFault_set_response_rate_limit(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_delay_percent_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_abort_percent_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_delay_duration_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), upb_strview) = value;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_abort_http_status_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 72), upb_strview) = value;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_max_active_faults_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 88), upb_strview) = value;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_response_rate_limit_percent_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 104), upb_strview) = value;
+}
+UPB_INLINE void envoy_extensions_filters_http_fault_v3_HTTPFault_set_abort_grpc_status_runtime(envoy_extensions_filters_http_fault_v3_HTTPFault *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 120), upb_strview) = value;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_HTTP_FAULT_V3_FAULT_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c
new file mode 100644
index 00000000000..8e6ff697fc5
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c
@@ -0,0 +1,41 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/router/v3/router.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/extensions/filters/http/router/v3/router.upb.h"
+#include "envoy/config/accesslog/v3/accesslog.upb.h"
+#include "google/protobuf/wrappers.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_extensions_filters_http_router_v3_Router_submsgs[2] = {
+ &envoy_config_accesslog_v3_AccessLog_msginit,
+ &google_protobuf_BoolValue_msginit,
+};
+
+static const upb_msglayout_field envoy_extensions_filters_http_router_v3_Router__fields[6] = {
+ {1, UPB_SIZE(4, 8), 1, 1, 11, 1},
+ {2, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {3, UPB_SIZE(8, 16), 0, 0, 11, 3},
+ {4, UPB_SIZE(2, 2), 0, 0, 8, 1},
+ {5, UPB_SIZE(12, 24), 0, 0, 9, 3},
+ {6, UPB_SIZE(3, 3), 0, 0, 8, 1},
+};
+
+const upb_msglayout envoy_extensions_filters_http_router_v3_Router_msginit = {
+ &envoy_extensions_filters_http_router_v3_Router_submsgs[0],
+ &envoy_extensions_filters_http_router_v3_Router__fields[0],
+ UPB_SIZE(16, 32), 6, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h
new file mode 100644
index 00000000000..2e7084ac970
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h
@@ -0,0 +1,113 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/router/v3/router.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPB_H_
+#define ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_extensions_filters_http_router_v3_Router;
+typedef struct envoy_extensions_filters_http_router_v3_Router envoy_extensions_filters_http_router_v3_Router;
+extern const upb_msglayout envoy_extensions_filters_http_router_v3_Router_msginit;
+struct envoy_config_accesslog_v3_AccessLog;
+struct google_protobuf_BoolValue;
+extern const upb_msglayout envoy_config_accesslog_v3_AccessLog_msginit;
+extern const upb_msglayout google_protobuf_BoolValue_msginit;
+
+
+/* envoy.extensions.filters.http.router.v3.Router */
+
+UPB_INLINE envoy_extensions_filters_http_router_v3_Router *envoy_extensions_filters_http_router_v3_Router_new(upb_arena *arena) {
+ return (envoy_extensions_filters_http_router_v3_Router *)_upb_msg_new(&envoy_extensions_filters_http_router_v3_Router_msginit, arena);
+}
+UPB_INLINE envoy_extensions_filters_http_router_v3_Router *envoy_extensions_filters_http_router_v3_Router_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_extensions_filters_http_router_v3_Router *ret = envoy_extensions_filters_http_router_v3_Router_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_http_router_v3_Router_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_extensions_filters_http_router_v3_Router *envoy_extensions_filters_http_router_v3_Router_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_http_router_v3_Router *ret = envoy_extensions_filters_http_router_v3_Router_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_http_router_v3_Router_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_extensions_filters_http_router_v3_Router_serialize(const envoy_extensions_filters_http_router_v3_Router *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_extensions_filters_http_router_v3_Router_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_has_dynamic_stats(const envoy_extensions_filters_http_router_v3_Router *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_http_router_v3_Router_dynamic_stats(const envoy_extensions_filters_http_router_v3_Router *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_start_child_span(const envoy_extensions_filters_http_router_v3_Router *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_has_upstream_log(const envoy_extensions_filters_http_router_v3_Router *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_config_accesslog_v3_AccessLog* const* envoy_extensions_filters_http_router_v3_Router_upstream_log(const envoy_extensions_filters_http_router_v3_Router *msg, size_t *len) { return (const struct envoy_config_accesslog_v3_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_suppress_envoy_headers(const envoy_extensions_filters_http_router_v3_Router *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
+UPB_INLINE upb_strview const* envoy_extensions_filters_http_router_v3_Router_strict_check_headers(const envoy_extensions_filters_http_router_v3_Router *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_respect_expected_rq_timeout(const envoy_extensions_filters_http_router_v3_Router *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+
+UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_dynamic_stats(envoy_extensions_filters_http_router_v3_Router *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+}
+UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_http_router_v3_Router_mutable_dynamic_stats(envoy_extensions_filters_http_router_v3_Router *msg, upb_arena *arena) {
+ struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_http_router_v3_Router_dynamic_stats(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_BoolValue*)_upb_msg_new(&google_protobuf_BoolValue_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_http_router_v3_Router_set_dynamic_stats(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_start_child_span(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+}
+UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_extensions_filters_http_router_v3_Router_mutable_upstream_log(envoy_extensions_filters_http_router_v3_Router *msg, size_t *len) {
+ return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_extensions_filters_http_router_v3_Router_resize_upstream_log(envoy_extensions_filters_http_router_v3_Router *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_config_accesslog_v3_AccessLog* envoy_extensions_filters_http_router_v3_Router_add_upstream_log(envoy_extensions_filters_http_router_v3_Router *msg, upb_arena *arena) {
+ struct envoy_config_accesslog_v3_AccessLog* sub = (struct envoy_config_accesslog_v3_AccessLog*)_upb_msg_new(&envoy_config_accesslog_v3_AccessLog_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 void envoy_extensions_filters_http_router_v3_Router_set_suppress_envoy_headers(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
+}
+UPB_INLINE upb_strview* envoy_extensions_filters_http_router_v3_Router_mutable_strict_check_headers(envoy_extensions_filters_http_router_v3_Router *msg, size_t *len) {
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+}
+UPB_INLINE upb_strview* envoy_extensions_filters_http_router_v3_Router_resize_strict_check_headers(envoy_extensions_filters_http_router_v3_Router *msg, size_t len, upb_arena *arena) {
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(3, 4), arena);
+}
+UPB_INLINE bool envoy_extensions_filters_http_router_v3_Router_add_strict_check_headers(envoy_extensions_filters_http_router_v3_Router *msg, upb_strview val, upb_arena *arena) {
+ return _upb_array_append_accessor2(msg, UPB_SIZE(12, 24), UPB_SIZE(3, 4), &val,
+ arena);
+}
+UPB_INLINE void envoy_extensions_filters_http_router_v3_Router_set_respect_expected_rq_timeout(envoy_extensions_filters_http_router_v3_Router *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c
index 2adecb7a830..6b2b6c15bb9 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c
@@ -22,10 +22,7 @@
#include "envoy/type/v3/percent.upb.h"
#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
-#include "udpa/core/v1/resource_locator.upb.h"
-#include "envoy/annotations/deprecation.upb.h"
#include "udpa/annotations/migrate.upb.h"
#include "udpa/annotations/security.upb.h"
#include "udpa/annotations/status.upb.h"
@@ -34,7 +31,7 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_submsgs[24] = {
+static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_submsgs[17] = {
&envoy_config_accesslog_v3_AccessLog_msginit,
&envoy_config_core_v3_Http1ProtocolOptions_msginit,
&envoy_config_core_v3_Http2ProtocolOptions_msginit,
@@ -54,54 +51,56 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
&google_protobuf_UInt32Value_msginit,
};
-static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager__fields[38] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(36, 40), 0, 0, 9, 1},
- {3, UPB_SIZE(144, 256), UPB_SIZE(-149, -265), 11, 11, 1},
- {4, UPB_SIZE(144, 256), UPB_SIZE(-149, -265), 4, 11, 1},
- {5, UPB_SIZE(132, 232), 0, 9, 11, 3},
- {6, UPB_SIZE(60, 88), 0, 14, 11, 1},
- {7, UPB_SIZE(64, 96), 0, 7, 11, 1},
- {8, UPB_SIZE(68, 104), 0, 1, 11, 1},
- {9, UPB_SIZE(72, 112), 0, 2, 11, 1},
- {10, UPB_SIZE(44, 56), 0, 0, 9, 1},
- {12, UPB_SIZE(76, 120), 0, 15, 11, 1},
- {13, UPB_SIZE(136, 240), 0, 0, 11, 3},
- {14, UPB_SIZE(80, 128), 0, 14, 11, 1},
- {15, UPB_SIZE(84, 136), 0, 14, 11, 1},
+static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager__fields[40] = {
+ {1, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {2, UPB_SIZE(28, 32), 0, 0, 9, 1},
+ {3, UPB_SIZE(140, 256), UPB_SIZE(-145, -265), 11, 11, 1},
+ {4, UPB_SIZE(140, 256), UPB_SIZE(-145, -265), 4, 11, 1},
+ {5, UPB_SIZE(128, 232), 0, 9, 11, 3},
+ {6, UPB_SIZE(52, 80), 1, 14, 11, 1},
+ {7, UPB_SIZE(56, 88), 2, 7, 11, 1},
+ {8, UPB_SIZE(60, 96), 3, 1, 11, 1},
+ {9, UPB_SIZE(64, 104), 4, 2, 11, 1},
+ {10, UPB_SIZE(36, 48), 0, 0, 9, 1},
+ {12, UPB_SIZE(68, 112), 5, 15, 11, 1},
+ {13, UPB_SIZE(132, 240), 0, 0, 11, 3},
+ {14, UPB_SIZE(72, 120), 6, 14, 11, 1},
+ {15, UPB_SIZE(76, 128), 7, 14, 11, 1},
{16, UPB_SIZE(8, 8), 0, 0, 14, 1},
- {17, UPB_SIZE(88, 144), 0, 6, 11, 1},
- {18, UPB_SIZE(28, 28), 0, 0, 8, 1},
- {19, UPB_SIZE(24, 24), 0, 0, 13, 1},
- {20, UPB_SIZE(29, 29), 0, 0, 8, 1},
- {21, UPB_SIZE(30, 30), 0, 0, 8, 1},
- {22, UPB_SIZE(52, 72), 0, 0, 9, 1},
- {23, UPB_SIZE(140, 248), 0, 8, 11, 3},
- {24, UPB_SIZE(92, 152), 0, 15, 11, 1},
- {25, UPB_SIZE(96, 160), 0, 5, 11, 1},
- {26, UPB_SIZE(100, 168), 0, 15, 11, 1},
- {28, UPB_SIZE(104, 176), 0, 15, 11, 1},
- {29, UPB_SIZE(108, 184), 0, 16, 11, 1},
- {30, UPB_SIZE(112, 192), 0, 14, 11, 1},
- {31, UPB_SIZE(144, 256), UPB_SIZE(-149, -265), 13, 11, 1},
- {32, UPB_SIZE(31, 31), 0, 0, 8, 1},
- {33, UPB_SIZE(32, 32), 0, 0, 8, 1},
- {34, UPB_SIZE(16, 16), 0, 0, 14, 1},
- {35, UPB_SIZE(116, 200), 0, 3, 11, 1},
- {36, UPB_SIZE(120, 208), 0, 12, 11, 1},
- {37, UPB_SIZE(33, 33), 0, 0, 8, 1},
- {38, UPB_SIZE(124, 216), 0, 10, 11, 1},
- {39, UPB_SIZE(34, 34), 0, 0, 8, 1},
- {40, UPB_SIZE(128, 224), 0, 14, 11, 1},
+ {17, UPB_SIZE(80, 136), 8, 6, 11, 1},
+ {18, UPB_SIZE(20, 20), 0, 0, 8, 1},
+ {19, UPB_SIZE(16, 16), 0, 0, 13, 1},
+ {20, UPB_SIZE(21, 21), 0, 0, 8, 1},
+ {21, UPB_SIZE(22, 22), 0, 0, 8, 1},
+ {22, UPB_SIZE(44, 64), 0, 0, 9, 1},
+ {23, UPB_SIZE(136, 248), 0, 8, 11, 3},
+ {24, UPB_SIZE(84, 144), 9, 15, 11, 1},
+ {25, UPB_SIZE(88, 152), 10, 5, 11, 1},
+ {26, UPB_SIZE(92, 160), 11, 15, 11, 1},
+ {28, UPB_SIZE(96, 168), 12, 15, 11, 1},
+ {29, UPB_SIZE(100, 176), 13, 16, 11, 1},
+ {30, UPB_SIZE(104, 184), 14, 14, 11, 1},
+ {31, UPB_SIZE(140, 256), UPB_SIZE(-145, -265), 13, 11, 1},
+ {32, UPB_SIZE(23, 23), 0, 0, 8, 1},
+ {33, UPB_SIZE(24, 24), 0, 0, 8, 1},
+ {34, UPB_SIZE(12, 12), 0, 0, 14, 1},
+ {35, UPB_SIZE(108, 192), 15, 3, 11, 1},
+ {36, UPB_SIZE(112, 200), 16, 12, 11, 1},
+ {37, UPB_SIZE(25, 25), 0, 0, 8, 1},
+ {38, UPB_SIZE(116, 208), 17, 10, 11, 1},
+ {39, UPB_SIZE(26, 26), 0, 0, 8, 1},
+ {40, UPB_SIZE(120, 216), 18, 14, 11, 1},
+ {41, UPB_SIZE(124, 224), 19, 15, 11, 1},
+ {42, UPB_SIZE(148, 268), UPB_SIZE(-153, -273), 0, 8, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager__fields[0],
- UPB_SIZE(152, 272), 38, false,
+ UPB_SIZE(160, 288), 40, false, 255,
};
-static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_submsgs[6] = {
+static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_submsgs[4] = {
&envoy_config_trace_v3_Tracing_Http_msginit,
&envoy_type_tracing_v3_CustomTag_msginit,
&envoy_type_v3_Percent_msginit,
@@ -109,19 +108,19 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing__fields[7] = {
- {3, UPB_SIZE(4, 8), 0, 2, 11, 1},
- {4, UPB_SIZE(8, 16), 0, 2, 11, 1},
- {5, UPB_SIZE(12, 24), 0, 2, 11, 1},
- {6, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {7, UPB_SIZE(16, 32), 0, 3, 11, 1},
+ {3, UPB_SIZE(4, 8), 1, 2, 11, 1},
+ {4, UPB_SIZE(8, 16), 2, 2, 11, 1},
+ {5, UPB_SIZE(12, 24), 3, 2, 11, 1},
+ {6, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {7, UPB_SIZE(16, 32), 4, 3, 11, 1},
{8, UPB_SIZE(24, 48), 0, 1, 11, 3},
- {9, UPB_SIZE(20, 40), 0, 0, 11, 1},
+ {9, UPB_SIZE(20, 40), 5, 0, 11, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing__fields[0],
- UPB_SIZE(28, 56), 7, false,
+ UPB_SIZE(32, 56), 7, false, 255,
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig__fields[1] = {
@@ -131,7 +130,7 @@ static const upb_msglayout_field envoy_extensions_filters_network_http_connectio
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_msginit = {
NULL,
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig__fields[0],
- UPB_SIZE(1, 1), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_submsgs[1] = {
@@ -139,17 +138,17 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails__fields[5] = {
- {1, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {4, UPB_SIZE(1, 1), 0, 0, 8, 1},
- {5, UPB_SIZE(2, 2), 0, 0, 8, 1},
- {6, UPB_SIZE(3, 3), 0, 0, 8, 1},
+ {1, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {4, UPB_SIZE(2, 2), 0, 0, 8, 1},
+ {5, UPB_SIZE(3, 3), 0, 0, 8, 1},
+ {6, UPB_SIZE(4, 4), 0, 0, 8, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails__fields[0],
- UPB_SIZE(8, 16), 5, false,
+ UPB_SIZE(16, 16), 5, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_submsgs[2] = {
@@ -158,15 +157,15 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(12, 24), 0, 0, 11, 3},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 32), 0, 0, 11, 3},
+ {3, UPB_SIZE(12, 24), 1, 1, 11, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_submsgs[2] = {
@@ -175,14 +174,14 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig__fields[2] = {
- {1, UPB_SIZE(4, 8), 0, 1, 11, 3},
- {2, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(8, 16), 0, 1, 11, 3},
+ {2, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_submsgs[5] = {
@@ -194,34 +193,32 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper__fields[5] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 4, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {4, UPB_SIZE(12, 24), 0, 3, 11, 1},
- {5, UPB_SIZE(16, 32), 0, 2, 11, 3},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 4, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 1, 11, 1},
+ {4, UPB_SIZE(16, 32), 4, 3, 11, 1},
+ {5, UPB_SIZE(20, 40), 0, 2, 11, 3},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper__fields[0],
- UPB_SIZE(20, 40), 5, false,
+ UPB_SIZE(24, 48), 5, false, 255,
};
-static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_Rds_submsgs[2] = {
+static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_Rds_submsgs[1] = {
&envoy_config_core_v3_ConfigSource_msginit,
- &udpa_core_v1_ResourceLocator_msginit,
};
-static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_Rds__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), 0, 1, 11, 1},
+static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_Rds__fields[2] = {
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_Rds_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_Rds_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_Rds__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_submsgs[1] = {
@@ -235,7 +232,7 @@ static const upb_msglayout_field envoy_extensions_filters_network_http_connectio
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_submsgs[4] = {
@@ -246,17 +243,17 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes__fields[5] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 3, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {4, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 2, 11, 1},
- {5, UPB_SIZE(16, 32), UPB_SIZE(-21, -41), 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 3, 11, 1},
+ {3, UPB_SIZE(16, 32), 2, 0, 11, 1},
+ {4, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 2, 11, 1},
+ {5, UPB_SIZE(20, 40), UPB_SIZE(-25, -49), 1, 11, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes__fields[0],
- UPB_SIZE(24, 48), 5, false,
+ UPB_SIZE(32, 64), 5, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_submsgs[1] = {
@@ -270,7 +267,7 @@ static const upb_msglayout_field envoy_extensions_filters_network_http_connectio
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_submsgs[1] = {
@@ -284,7 +281,7 @@ static const upb_msglayout_field envoy_extensions_filters_network_http_connectio
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_submsgs[1] = {
@@ -301,7 +298,7 @@ static const upb_msglayout_field envoy_extensions_filters_network_http_connectio
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement__fields[2] = {
@@ -312,7 +309,7 @@ static const upb_msglayout_field envoy_extensions_filters_network_http_connectio
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit = {
NULL,
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_submsgs[1] = {
@@ -320,13 +317,13 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_submsgs[2] = {
@@ -334,16 +331,17 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
&google_protobuf_Any_msginit,
};
-static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {4, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 1, 11, 1},
- {5, UPB_SIZE(8, 16), UPB_SIZE(-13, -25), 0, 11, 1},
+static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter__fields[4] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {4, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 1, 11, 1},
+ {5, UPB_SIZE(12, 24), UPB_SIZE(-17, -33), 0, 11, 1},
+ {6, UPB_SIZE(0, 0), 0, 0, 8, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
static const upb_msglayout *const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_submsgs[1] = {
@@ -351,13 +349,13 @@ static const upb_msglayout *const envoy_extensions_filters_network_http_connecti
};
static const upb_msglayout_field envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_msginit = {
&envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_submsgs[0],
&envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h
index 87005ae05b9..668fa854854 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -89,7 +90,6 @@ struct google_protobuf_Any;
struct google_protobuf_BoolValue;
struct google_protobuf_Duration;
struct google_protobuf_UInt32Value;
-struct udpa_core_v1_ResourceLocator;
extern const upb_msglayout envoy_config_accesslog_v3_AccessLog_msginit;
extern const upb_msglayout envoy_config_accesslog_v3_AccessLogFilter_msginit;
extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
@@ -109,7 +109,6 @@ extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_protobuf_UInt32Value_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
typedef enum {
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_AUTO = 0,
@@ -148,6 +147,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConne
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_msginit, arena, len);
}
@@ -158,79 +163,89 @@ typedef enum {
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_scoped_routes = 31,
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_NOT_SET = 0
} envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_oneofcases;
-UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_case(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(148, 264), int32_t); }
-
-UPB_INLINE int32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_codec_type(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stat_prefix(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_rds(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(148, 264)) == 3; }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_Rds* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_rds(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_Rds*, UPB_SIZE(144, 256), UPB_SIZE(148, 264), 3, NULL); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_route_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(148, 264)) == 4; }
-UPB_INLINE const struct envoy_config_route_v3_RouteConfiguration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_route_v3_RouteConfiguration*, UPB_SIZE(144, 256), UPB_SIZE(148, 264), 4, NULL); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_http_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(132, 232)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(132, 232), len); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_add_user_agent(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(60, 88)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_add_user_agent(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_tracing(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(64, 96)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_tracing(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(68, 104)); }
-UPB_INLINE const struct envoy_config_core_v3_Http1ProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), const struct envoy_config_core_v3_Http1ProtocolOptions*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_http2_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(72, 112)); }
-UPB_INLINE const struct envoy_config_core_v3_Http2ProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http2_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 112), const struct envoy_config_core_v3_Http2ProtocolOptions*); }
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_server_name(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_drain_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(76, 120)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_drain_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_access_log(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(136, 240)); }
-UPB_INLINE const struct envoy_config_accesslog_v3_AccessLog* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_access_log(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) { return (const struct envoy_config_accesslog_v3_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(136, 240), len); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_use_remote_address(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(80, 128)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_use_remote_address(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 128), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_generate_request_id(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(84, 136)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_generate_request_id(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 136), const struct google_protobuf_BoolValue*); }
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_case(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(144, 264), int32_t); }
+
+typedef enum {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_port_mode_strip_any_host_port = 42,
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_port_mode_NOT_SET = 0
+} envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_port_mode_oneofcases;
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_port_mode_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_port_mode_case(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_port_mode_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(152, 272), int32_t); }
+
+UPB_INLINE int32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_codec_type(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stat_prefix(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_rds(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(144, 264)) == 3; }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_Rds* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_rds(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_Rds*, UPB_SIZE(140, 256), UPB_SIZE(144, 264), 3, NULL); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_route_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(144, 264)) == 4; }
+UPB_INLINE const struct envoy_config_route_v3_RouteConfiguration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_route_v3_RouteConfiguration*, UPB_SIZE(140, 256), UPB_SIZE(144, 264), 4, NULL); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_http_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(128, 232)); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(128, 232), len); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_add_user_agent(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_add_user_agent(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_tracing(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_tracing(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_Http1ProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), const struct envoy_config_core_v3_Http1ProtocolOptions*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_http2_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_config_core_v3_Http2ProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http2_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const struct envoy_config_core_v3_Http2ProtocolOptions*); }
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_server_name(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_drain_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_drain_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_access_log(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(132, 240)); }
+UPB_INLINE const struct envoy_config_accesslog_v3_AccessLog* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_access_log(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) { return (const struct envoy_config_accesslog_v3_AccessLog* const*)_upb_array_accessor(msg, UPB_SIZE(132, 240), len); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_use_remote_address(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_use_remote_address(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(72, 120), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_generate_request_id(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_generate_request_id(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), const struct google_protobuf_BoolValue*); }
UPB_INLINE int32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_forward_client_cert_details(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_set_current_client_cert_details(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(88, 144)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_current_client_cert_details(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(88, 144), const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_proxy_100_continue(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool); }
-UPB_INLINE uint32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_xff_num_trusted_hops(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint32_t); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(29, 29), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_skip_xff_append(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(30, 30), bool); }
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_via(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_upgrade_configs(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(140, 248)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_upgrade_configs(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(140, 248), len); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_stream_idle_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(92, 152)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stream_idle_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 152), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_internal_address_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(96, 160)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_internal_address_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 160), const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_delayed_close_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 168)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_delayed_close_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 168), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_request_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(104, 176)); }
-UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(104, 176), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_max_request_headers_kb(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 184)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_max_request_headers_kb(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(108, 184), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_normalize_path(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(112, 192)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_normalize_path(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 192), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_scoped_routes(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(148, 264)) == 31; }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_scoped_routes(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes*, UPB_SIZE(144, 256), UPB_SIZE(148, 264), 31, NULL); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_preserve_external_request_id(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(31, 31), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_merge_slashes(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); }
-UPB_INLINE int32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_server_header_transformation(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_common_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(116, 200)); }
-UPB_INLINE const struct envoy_config_core_v3_HttpProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_common_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 200), const struct envoy_config_core_v3_HttpProtocolOptions*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_request_id_extension(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(120, 208)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_id_extension(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 208), const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_always_set_request_id_in_response(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(33, 33), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_local_reply_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(124, 216)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_local_reply_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(124, 216), const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_matching_host_port(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(34, 34), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_stream_error_on_invalid_http_message(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(128, 224)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stream_error_on_invalid_http_message(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(128, 224), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_set_current_client_cert_details(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_current_client_cert_details(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(80, 136), const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_proxy_100_continue(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); }
+UPB_INLINE uint32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_xff_num_trusted_hops(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_skip_xff_append(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool); }
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_via(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_upgrade_configs(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(136, 248)); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_upgrade_configs(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig* const*)_upb_array_accessor(msg, UPB_SIZE(136, 248), len); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_stream_idle_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stream_idle_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_internal_address_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_internal_address_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(88, 152), const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_delayed_close_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_delayed_close_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_request_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(96, 168), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_max_request_headers_kb(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_max_request_headers_kb(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_normalize_path(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 14); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_normalize_path(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(104, 184), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_scoped_routes(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(144, 264)) == 31; }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_scoped_routes(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes*, UPB_SIZE(140, 256), UPB_SIZE(144, 264), 31, NULL); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_preserve_external_request_id(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_merge_slashes(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); }
+UPB_INLINE int32_t envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_server_header_transformation(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_common_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 15); }
+UPB_INLINE const struct envoy_config_core_v3_HttpProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_common_http_protocol_options(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(108, 192), const struct envoy_config_core_v3_HttpProtocolOptions*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_request_id_extension(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 16); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_id_extension(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(112, 200), const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_always_set_request_id_in_response(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_local_reply_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 17); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_local_reply_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(116, 208), const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_matching_host_port(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_stream_error_on_invalid_http_message(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 18); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stream_error_on_invalid_http_message(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(120, 216), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_request_headers_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_hasbit(msg, 19); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_headers_timeout(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(124, 224), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_strip_any_host_port(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return _upb_getoneofcase(msg, UPB_SIZE(152, 272)) == 42; }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_strip_any_host_port(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(148, 268), UPB_SIZE(152, 272), 42, false); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_codec_type(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_stat_prefix(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_rds(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_Rds* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_Rds*, UPB_SIZE(144, 256), value, UPB_SIZE(148, 264), 3);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_Rds*, UPB_SIZE(140, 256), value, UPB_SIZE(144, 264), 3);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Rds* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_rds(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_Rds* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_Rds*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_rds(msg);
@@ -242,7 +257,7 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Rd
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_route_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct envoy_config_route_v3_RouteConfiguration* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_RouteConfiguration*, UPB_SIZE(144, 256), value, UPB_SIZE(148, 264), 4);
+ UPB_WRITE_ONEOF(msg, struct envoy_config_route_v3_RouteConfiguration*, UPB_SIZE(140, 256), value, UPB_SIZE(144, 264), 4);
}
UPB_INLINE struct envoy_config_route_v3_RouteConfiguration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_route_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_config_route_v3_RouteConfiguration* sub = (struct envoy_config_route_v3_RouteConfiguration*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_config(msg);
@@ -254,20 +269,21 @@ UPB_INLINE struct envoy_config_route_v3_RouteConfiguration* envoy_extensions_fil
return sub;
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_http_filters(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(132, 232), len);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(128, 232), len);
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_resize_http_filters(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t len, upb_arena *arena) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(132, 232), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_resize_accessor2(msg, UPB_SIZE(128, 232), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_add_http_filters(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter*)_upb_msg_new(&envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(132, 232), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(128, 232), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_add_user_agent(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(60, 88), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 80), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_add_user_agent(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_add_user_agent(msg);
@@ -279,7 +295,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_tracing(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(64, 96), envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(56, 88), envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing*) = value;
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_tracing(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_tracing(msg);
@@ -291,7 +308,8 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_http_protocol_options(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct envoy_config_core_v3_Http1ProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(68, 104), struct envoy_config_core_v3_Http1ProtocolOptions*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 96), struct envoy_config_core_v3_Http1ProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Http1ProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_http_protocol_options(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_config_core_v3_Http1ProtocolOptions* sub = (struct envoy_config_core_v3_Http1ProtocolOptions*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http_protocol_options(msg);
@@ -303,7 +321,8 @@ UPB_INLINE struct envoy_config_core_v3_Http1ProtocolOptions* envoy_extensions_fi
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_http2_protocol_options(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct envoy_config_core_v3_Http2ProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(72, 112), struct envoy_config_core_v3_Http2ProtocolOptions*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(64, 104), struct envoy_config_core_v3_Http2ProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_http2_protocol_options(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_config_core_v3_Http2ProtocolOptions* sub = (struct envoy_config_core_v3_Http2ProtocolOptions*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http2_protocol_options(msg);
@@ -315,10 +334,11 @@ UPB_INLINE struct envoy_config_core_v3_Http2ProtocolOptions* envoy_extensions_fi
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_server_name(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_drain_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(76, 120), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 112), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_drain_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_drain_timeout(msg);
@@ -330,20 +350,21 @@ UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_htt
return sub;
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_access_log(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) {
- return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(136, 240), len);
+ return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_mutable_accessor(msg, UPB_SIZE(132, 240), len);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_resize_access_log(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_resize_accessor(msg, UPB_SIZE(136, 240), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_accesslog_v3_AccessLog**)_upb_array_resize_accessor2(msg, UPB_SIZE(132, 240), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLog* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_add_access_log(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_AccessLog* sub = (struct envoy_config_accesslog_v3_AccessLog*)_upb_msg_new(&envoy_config_accesslog_v3_AccessLog_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(136, 240), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(132, 240), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_use_remote_address(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(80, 128), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(72, 120), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_use_remote_address(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_use_remote_address(msg);
@@ -355,7 +376,8 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_generate_request_id(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(84, 136), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 128), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_generate_request_id(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_generate_request_id(msg);
@@ -370,7 +392,8 @@ UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_Http
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_set_current_client_cert_details(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(88, 144), envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails*) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(80, 136), envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails*) = value;
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_set_current_client_cert_details(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_current_client_cert_details(msg);
@@ -382,35 +405,36 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_proxy_100_continue(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 28), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_xff_num_trusted_hops(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint32_t) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_represent_ipv4_remote_address_as_ipv4_mapped_ipv6(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(29, 29), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_skip_xff_append(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(30, 30), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_via(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview) = value;
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_upgrade_configs(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t *len) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(140, 248), len);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(136, 248), len);
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_resize_upgrade_configs(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, size_t len, upb_arena *arena) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(140, 248), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(136, 248), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_add_upgrade_configs(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig*)_upb_msg_new(&envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(140, 248), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(136, 248), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_stream_idle_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(92, 152), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(84, 144), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_stream_idle_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stream_idle_timeout(msg);
@@ -422,7 +446,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_htt
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_internal_address_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(96, 160), envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig*) = value;
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(88, 152), envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig*) = value;
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_internal_address_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_internal_address_config(msg);
@@ -434,7 +459,8 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_delayed_close_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(100, 168), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(92, 160), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_delayed_close_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_delayed_close_timeout(msg);
@@ -446,7 +472,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_htt
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_request_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(104, 176), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 12);
+ *UPB_PTR_AT(msg, UPB_SIZE(96, 168), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_request_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_timeout(msg);
@@ -458,7 +485,8 @@ UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_htt
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_max_request_headers_kb(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(108, 184), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 13);
+ *UPB_PTR_AT(msg, UPB_SIZE(100, 176), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_max_request_headers_kb(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_max_request_headers_kb(msg);
@@ -470,7 +498,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_filters_network_
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_normalize_path(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(112, 192), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 14);
+ *UPB_PTR_AT(msg, UPB_SIZE(104, 184), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_normalize_path(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_normalize_path(msg);
@@ -482,7 +511,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_scoped_routes(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes*, UPB_SIZE(144, 256), value, UPB_SIZE(148, 264), 31);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes*, UPB_SIZE(140, 256), value, UPB_SIZE(144, 264), 31);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_scoped_routes(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_scoped_routes(msg);
@@ -494,16 +523,17 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Sc
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_preserve_external_request_id(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(31, 31), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_merge_slashes(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_server_header_transformation(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_common_http_protocol_options(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct envoy_config_core_v3_HttpProtocolOptions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(116, 200), struct envoy_config_core_v3_HttpProtocolOptions*) = value;
+ _upb_sethas(msg, 15);
+ *UPB_PTR_AT(msg, UPB_SIZE(108, 192), struct envoy_config_core_v3_HttpProtocolOptions*) = value;
}
UPB_INLINE struct envoy_config_core_v3_HttpProtocolOptions* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_common_http_protocol_options(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_config_core_v3_HttpProtocolOptions* sub = (struct envoy_config_core_v3_HttpProtocolOptions*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_common_http_protocol_options(msg);
@@ -515,7 +545,8 @@ UPB_INLINE struct envoy_config_core_v3_HttpProtocolOptions* envoy_extensions_fil
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_request_id_extension(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(120, 208), envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension*) = value;
+ _upb_sethas(msg, 16);
+ *UPB_PTR_AT(msg, UPB_SIZE(112, 200), envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension*) = value;
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_request_id_extension(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_id_extension(msg);
@@ -527,10 +558,11 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Re
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_always_set_request_id_in_response(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(33, 33), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_local_reply_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(124, 216), envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig*) = value;
+ _upb_sethas(msg, 17);
+ *UPB_PTR_AT(msg, UPB_SIZE(116, 208), envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig*) = value;
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_local_reply_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_local_reply_config(msg);
@@ -542,10 +574,11 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Lo
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_strip_matching_host_port(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(34, 34), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_stream_error_on_invalid_http_message(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(128, 224), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 18);
+ *UPB_PTR_AT(msg, UPB_SIZE(120, 216), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_stream_error_on_invalid_http_message(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_stream_error_on_invalid_http_message(msg);
@@ -556,6 +589,22 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_ht
}
return sub;
}
+UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_request_headers_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 19);
+ *UPB_PTR_AT(msg, UPB_SIZE(124, 224), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_mutable_request_headers_timeout(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_request_headers_timeout(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_request_headers_timeout(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_set_strip_any_host_port(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager *msg, bool value) {
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(148, 268), value, UPB_SIZE(152, 272), 42);
+}
/* envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing */
@@ -567,25 +616,32 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConne
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_client_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_client_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_client_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_v3_Percent*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_random_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_random_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_random_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_v3_Percent*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_overall_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_overall_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_overall_sampling(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_v3_Percent*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_verbose(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_max_path_tag_length(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_verbose(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_max_path_tag_length(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_max_path_tag_length(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); }
UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_custom_tags(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
UPB_INLINE const struct envoy_type_tracing_v3_CustomTag* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_custom_tags(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, size_t *len) { return (const struct envoy_type_tracing_v3_CustomTag* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_provider(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_has_provider(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE const struct envoy_config_trace_v3_Tracing_Http* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_provider(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_trace_v3_Tracing_Http*); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_set_client_sampling(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_mutable_client_sampling(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena) {
@@ -598,6 +654,7 @@ UPB_INLINE struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_c
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_set_random_sampling(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_mutable_random_sampling(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena) {
@@ -610,6 +667,7 @@ UPB_INLINE struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_c
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_set_overall_sampling(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, struct envoy_type_v3_Percent* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_v3_Percent*) = value;
}
UPB_INLINE struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_mutable_overall_sampling(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena) {
@@ -622,9 +680,10 @@ UPB_INLINE struct envoy_type_v3_Percent* envoy_extensions_filters_network_http_c
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_set_verbose(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_set_max_path_tag_length(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_mutable_max_path_tag_length(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena) {
@@ -640,16 +699,17 @@ UPB_INLINE struct envoy_type_tracing_v3_CustomTag** envoy_extensions_filters_net
return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE struct envoy_type_tracing_v3_CustomTag** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_resize_custom_tags(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, size_t len, upb_arena *arena) {
- return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_type_tracing_v3_CustomTag**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_tracing_v3_CustomTag* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_add_custom_tags(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena) {
struct envoy_type_tracing_v3_CustomTag* sub = (struct envoy_type_tracing_v3_CustomTag*)_upb_msg_new(&envoy_type_tracing_v3_CustomTag_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_set_provider(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, struct envoy_config_trace_v3_Tracing_Http* value) {
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_trace_v3_Tracing_Http*) = value;
}
UPB_INLINE struct envoy_config_trace_v3_Tracing_Http* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_mutable_provider(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing *msg, upb_arena *arena) {
@@ -672,6 +732,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConne
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_msginit, arena, len);
}
@@ -692,19 +758,26 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConne
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_has_subject(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_subject(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_cert(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_dns(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_uri(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_chain(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_has_subject(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_subject(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_BoolValue*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_cert(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_dns(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_uri(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_chain(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_set_subject(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_mutable_subject(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_subject(msg);
@@ -716,16 +789,16 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_ht
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_set_cert(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_set_dns(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_set_uri(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_set_chain(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
/* envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig */
@@ -738,34 +811,41 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConne
envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_upgrade_type(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_has_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_has_enabled(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_enabled(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_BoolValue*); }
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_upgrade_type(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_has_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_filters(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_has_enabled(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_enabled(const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_BoolValue*); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_set_upgrade_type(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_mutable_filters(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, size_t *len) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter** envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_resize_filters(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, size_t len, upb_arena *arena) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_add_filters(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter*)_upb_msg_new(&envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_set_enabled(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, struct google_protobuf_BoolValue* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_BoolValue*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_mutable_enabled(envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig *msg, upb_arena *arena) {
struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_enabled(msg);
@@ -787,30 +867,37 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_LocalRepl
envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *ret = envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *ret = envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_has_mappers(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper* const* envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_mappers(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_has_body_format(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_SubstitutionFormatString* envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_body_format(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_SubstitutionFormatString*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_has_mappers(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper* const* envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_mappers(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, size_t *len) { return (const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_has_body_format(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_SubstitutionFormatString* envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_body_format(const envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_SubstitutionFormatString*); }
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper** envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_mutable_mappers(envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, size_t *len) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper** envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_resize_mappers(envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, size_t len, upb_arena *arena) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper* envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_add_mappers(envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper*)_upb_msg_new(&envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, 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 void envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_set_body_format(envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, struct envoy_config_core_v3_SubstitutionFormatString* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_SubstitutionFormatString*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_SubstitutionFormatString*) = value;
}
UPB_INLINE struct envoy_config_core_v3_SubstitutionFormatString* envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_mutable_body_format(envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_SubstitutionFormatString* sub = (struct envoy_config_core_v3_SubstitutionFormatString*)envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_body_format(msg);
@@ -832,23 +919,30 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ResponseM
envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *ret = envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *ret = envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_filter(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_accesslog_v3_AccessLogFilter* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_filter(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_accesslog_v3_AccessLogFilter*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_status_code(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_status_code(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_body(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_body(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_body_format_override(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_SubstitutionFormatString* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_body_format_override(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_SubstitutionFormatString*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_headers_to_add(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_headers_to_add(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_filter(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_accesslog_v3_AccessLogFilter* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_filter(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_accesslog_v3_AccessLogFilter*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_status_code(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_status_code(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_body(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_body(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_body_format_override(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_config_core_v3_SubstitutionFormatString* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_body_format_override(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_SubstitutionFormatString*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_has_headers_to_add(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE const struct envoy_config_core_v3_HeaderValueOption* const* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_headers_to_add(const envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, size_t *len) { return (const struct envoy_config_core_v3_HeaderValueOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_set_filter(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, struct envoy_config_accesslog_v3_AccessLogFilter* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_accesslog_v3_AccessLogFilter*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_accesslog_v3_AccessLogFilter*) = value;
}
UPB_INLINE struct envoy_config_accesslog_v3_AccessLogFilter* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_mutable_filter(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, upb_arena *arena) {
struct envoy_config_accesslog_v3_AccessLogFilter* sub = (struct envoy_config_accesslog_v3_AccessLogFilter*)envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_filter(msg);
@@ -860,7 +954,8 @@ UPB_INLINE struct envoy_config_accesslog_v3_AccessLogFilter* envoy_extensions_fi
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_set_status_code(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_mutable_status_code(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_status_code(msg);
@@ -872,7 +967,8 @@ UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_filters_network_
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_set_body(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_mutable_body(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_body(msg);
@@ -884,7 +980,8 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_filters_netw
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_set_body_format_override(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, struct envoy_config_core_v3_SubstitutionFormatString* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_SubstitutionFormatString*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_SubstitutionFormatString*) = value;
}
UPB_INLINE struct envoy_config_core_v3_SubstitutionFormatString* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_mutable_body_format_override(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, upb_arena *arena) {
struct envoy_config_core_v3_SubstitutionFormatString* sub = (struct envoy_config_core_v3_SubstitutionFormatString*)envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_body_format_override(msg);
@@ -896,15 +993,15 @@ UPB_INLINE struct envoy_config_core_v3_SubstitutionFormatString* envoy_extension
return sub;
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_mutable_headers_to_add(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, size_t *len) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption** envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_resize_headers_to_add(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_HeaderValueOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_HeaderValueOption* envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_add_headers_to_add(envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper *msg, upb_arena *arena) {
struct envoy_config_core_v3_HeaderValueOption* sub = (struct envoy_config_core_v3_HeaderValueOption*)_upb_msg_new(&envoy_config_core_v3_HeaderValueOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -919,18 +1016,23 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_Rds *envo
envoy_extensions_filters_network_http_connection_manager_v3_Rds *ret = envoy_extensions_filters_network_http_connection_manager_v3_Rds_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_Rds_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_Rds *envoy_extensions_filters_network_http_connection_manager_v3_Rds_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_Rds *ret = envoy_extensions_filters_network_http_connection_manager_v3_Rds_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_Rds_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_Rds_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_Rds_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_Rds_has_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_Rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_ConfigSource*); }
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_Rds_route_config_name(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_Rds_has_rds_resource_locator(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct udpa_core_v1_ResourceLocator* envoy_extensions_filters_network_http_connection_manager_v3_Rds_rds_resource_locator(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct udpa_core_v1_ResourceLocator*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_Rds_has_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_Rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_Rds_route_config_name(const envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_Rds_set_config_source(envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_Rds_mutable_config_source(envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_extensions_filters_network_http_connection_manager_v3_Rds_config_source(msg);
@@ -942,19 +1044,7 @@ UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_ne
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_Rds_set_route_config_name(envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
-}
-UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_Rds_set_rds_resource_locator(envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg, struct udpa_core_v1_ResourceLocator* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct udpa_core_v1_ResourceLocator*) = value;
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* envoy_extensions_filters_network_http_connection_manager_v3_Rds_mutable_rds_resource_locator(envoy_extensions_filters_network_http_connection_manager_v3_Rds *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)envoy_extensions_filters_network_http_connection_manager_v3_Rds_rds_resource_locator(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- if (!sub) return NULL;
- envoy_extensions_filters_network_http_connection_manager_v3_Rds_set_rds_resource_locator(msg, sub);
- }
- return sub;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
/* envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList */
@@ -967,6 +1057,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_msginit, arena, len);
}
@@ -978,12 +1074,12 @@ UPB_INLINE struct envoy_config_route_v3_ScopedRouteConfiguration** envoy_extensi
return (struct envoy_config_route_v3_ScopedRouteConfiguration**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE struct envoy_config_route_v3_ScopedRouteConfiguration** envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_resize_scoped_route_configurations(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_route_v3_ScopedRouteConfiguration**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_route_v3_ScopedRouteConfiguration**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_route_v3_ScopedRouteConfiguration* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_add_scoped_route_configurations(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList *msg, upb_arena *arena) {
struct envoy_config_route_v3_ScopedRouteConfiguration* sub = (struct envoy_config_route_v3_ScopedRouteConfiguration*)_upb_msg_new(&envoy_config_route_v3_ScopedRouteConfiguration_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -998,6 +1094,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_msginit, arena, len);
}
@@ -1007,23 +1109,24 @@ typedef enum {
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_scoped_rds = 5,
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_NOT_SET = 0
} envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_oneofcases;
-UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_case(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 40), int32_t); }
-
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_name(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_scope_key_builder(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scope_key_builder(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_ConfigSource*); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_scoped_route_configurations_list(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 4; }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scoped_route_configurations_list(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 4, NULL); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_scoped_rds(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 40)) == 5; }
-UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scoped_rds(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds*, UPB_SIZE(16, 32), UPB_SIZE(20, 40), 5, NULL); }
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_case(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_config_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(24, 48), int32_t); }
+
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_name(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_scope_key_builder(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scope_key_builder(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_scoped_route_configurations_list(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 4; }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scoped_route_configurations_list(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList*, UPB_SIZE(20, 40), UPB_SIZE(24, 48), 4, NULL); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_has_scoped_rds(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return _upb_getoneofcase(msg, UPB_SIZE(24, 48)) == 5; }
+UPB_INLINE const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scoped_rds(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds*, UPB_SIZE(20, 40), UPB_SIZE(24, 48), 5, NULL); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_set_name(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_set_scope_key_builder(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder*) = value;
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_mutable_scope_key_builder(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder*)envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scope_key_builder(msg);
@@ -1035,7 +1138,8 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Sc
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_set_rds_config_source(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_mutable_rds_config_source(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_rds_config_source(msg);
@@ -1047,7 +1151,7 @@ UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_ne
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_set_scoped_route_configurations_list(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 4);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList*, UPB_SIZE(20, 40), value, UPB_SIZE(24, 48), 4);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_mutable_scoped_route_configurations_list(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList*)envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scoped_route_configurations_list(msg);
@@ -1059,7 +1163,7 @@ UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_Sc
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_set_scoped_rds(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds*, UPB_SIZE(16, 32), value, UPB_SIZE(20, 40), 5);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds*, UPB_SIZE(20, 40), value, UPB_SIZE(24, 48), 5);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_mutable_scoped_rds(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds*)envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_scoped_rds(msg);
@@ -1081,6 +1185,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_msginit, arena, len);
}
@@ -1092,12 +1202,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
return (envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder** envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_resize_fragments(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder *msg, size_t len, upb_arena *arena) {
- return (envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_add_fragments(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder *msg, upb_arena *arena) {
struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder* sub = (struct envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder*)_upb_msg_new(&envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1112,6 +1222,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit, arena, len);
}
@@ -1148,6 +1264,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit, arena, len);
}
@@ -1198,6 +1320,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRou
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit, arena, len);
}
@@ -1222,15 +1350,22 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds
envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *ret = envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_has_scoped_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_scoped_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_ConfigSource*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_has_scoped_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_scoped_rds_config_source(const envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_ConfigSource*); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_set_scoped_rds_config_source(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_mutable_scoped_rds_config_source(envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_scoped_rds_config_source(msg);
@@ -1252,6 +1387,12 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilte
envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *ret = envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit, arena, len);
}
@@ -1261,19 +1402,20 @@ typedef enum {
envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_config_discovery = 5,
envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_NOT_SET = 0
} envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_oneofcases;
-UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_case(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 24), int32_t); }
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_oneofcases envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_case(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter* msg) { return (envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(16, 32), int32_t); }
-UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_name(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_has_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 4; }
-UPB_INLINE const struct google_protobuf_Any* envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 4, NULL); }
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_has_config_discovery(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 24)) == 5; }
-UPB_INLINE const struct envoy_config_core_v3_ExtensionConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_discovery(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_ExtensionConfigSource*, UPB_SIZE(8, 16), UPB_SIZE(12, 24), 5, NULL); }
+UPB_INLINE upb_strview envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_name(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_has_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 4; }
+UPB_INLINE const struct google_protobuf_Any* envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 4, NULL); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_has_config_discovery(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return _upb_getoneofcase(msg, UPB_SIZE(16, 32)) == 5; }
+UPB_INLINE const struct envoy_config_core_v3_ExtensionConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_discovery(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return UPB_READ_ONEOF(msg, const struct envoy_config_core_v3_ExtensionConfigSource*, UPB_SIZE(12, 24), UPB_SIZE(16, 32), 5, NULL); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_is_optional(const envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_set_name(envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_set_typed_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, struct google_protobuf_Any* value) {
- UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 4);
+ UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 4);
}
UPB_INLINE struct google_protobuf_Any* envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_mutable_typed_config(envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_typed_config(msg);
@@ -1285,7 +1427,7 @@ UPB_INLINE struct google_protobuf_Any* envoy_extensions_filters_network_http_con
return sub;
}
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_set_config_discovery(envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, struct envoy_config_core_v3_ExtensionConfigSource* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_ExtensionConfigSource*, UPB_SIZE(8, 16), value, UPB_SIZE(12, 24), 5);
+ UPB_WRITE_ONEOF(msg, struct envoy_config_core_v3_ExtensionConfigSource*, UPB_SIZE(12, 24), value, UPB_SIZE(16, 32), 5);
}
UPB_INLINE struct envoy_config_core_v3_ExtensionConfigSource* envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_mutable_config_discovery(envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, upb_arena *arena) {
struct envoy_config_core_v3_ExtensionConfigSource* sub = (struct envoy_config_core_v3_ExtensionConfigSource*)envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_config_discovery(msg);
@@ -1296,6 +1438,9 @@ UPB_INLINE struct envoy_config_core_v3_ExtensionConfigSource* envoy_extensions_f
}
return sub;
}
+UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_set_is_optional(envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+}
/* envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension */
@@ -1307,15 +1452,22 @@ UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_RequestID
envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *ret = envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *ret = envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_serialize(const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_has_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_Any*); }
+UPB_INLINE bool envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_has_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_typed_config(const envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Any*); }
UPB_INLINE void envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_set_typed_config(envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_mutable_typed_config(envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_typed_config(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c
index 9ae915cd093..44d63a49387 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c
@@ -9,7 +9,6 @@
#include <stddef.h>
#include "upb/msg.h"
#include "envoy/extensions/transport_sockets/tls/v3/cert.upb.h"
-#include "udpa/annotations/status.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/common.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/secret.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/tls.upb.h"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h
index 318be48eba1..f1b24af9e65 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
/* Public Imports. */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c
index f292720df5a..247f262ea0c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c
@@ -12,7 +12,6 @@
#include "envoy/config/core/v3/base.upb.h"
#include "envoy/type/matcher/v3/string.upb.h"
#include "google/protobuf/any.upb.h"
-#include "google/protobuf/struct.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "udpa/annotations/sensitive.upb.h"
#include "udpa/annotations/status.upb.h"
@@ -23,15 +22,15 @@
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_TlsParameters__fields[4] = {
{1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(8, 8), 0, 0, 14, 1},
- {3, UPB_SIZE(16, 16), 0, 0, 9, 3},
- {4, UPB_SIZE(20, 24), 0, 0, 9, 3},
+ {2, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {3, UPB_SIZE(8, 8), 0, 0, 9, 3},
+ {4, UPB_SIZE(12, 16), 0, 0, 9, 3},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit = {
NULL,
&envoy_extensions_transport_sockets_tls_v3_TlsParameters__fields[0],
- UPB_SIZE(24, 32), 4, false,
+ UPB_SIZE(16, 24), 4, false, 255,
};
static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_submsgs[1] = {
@@ -46,27 +45,29 @@ static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_Priva
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit = {
&envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_TlsCertificate_submsgs[6] = {
+static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_TlsCertificate_submsgs[3] = {
&envoy_config_core_v3_DataSource_msginit,
+ &envoy_config_core_v3_WatchedDirectory_msginit,
&envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit,
};
-static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_TlsCertificate__fields[6] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {4, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {5, UPB_SIZE(20, 40), 0, 0, 11, 3},
- {6, UPB_SIZE(16, 32), 0, 1, 11, 1},
+static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_TlsCertificate__fields[7] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 0, 11, 1},
+ {4, UPB_SIZE(16, 32), 4, 0, 11, 1},
+ {5, UPB_SIZE(28, 56), 0, 0, 11, 3},
+ {6, UPB_SIZE(20, 40), 5, 2, 11, 1},
+ {7, UPB_SIZE(24, 48), 6, 1, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit = {
&envoy_extensions_transport_sockets_tls_v3_TlsCertificate_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_TlsCertificate__fields[0],
- UPB_SIZE(24, 48), 6, false,
+ UPB_SIZE(32, 64), 7, false, 255,
};
static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_submsgs[1] = {
@@ -80,30 +81,32 @@ static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_TlsSe
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit = {
&envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_submsgs[4] = {
&envoy_config_core_v3_DataSource_msginit,
+ &envoy_config_core_v3_WatchedDirectory_msginit,
&envoy_type_matcher_v3_StringMatcher_msginit,
&google_protobuf_BoolValue_msginit,
};
-static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext__fields[8] = {
- {1, UPB_SIZE(12, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(24, 40), 0, 0, 9, 3},
- {3, UPB_SIZE(28, 48), 0, 0, 9, 3},
- {6, UPB_SIZE(16, 24), 0, 2, 11, 1},
- {7, UPB_SIZE(20, 32), 0, 0, 11, 1},
+static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext__fields[9] = {
+ {1, UPB_SIZE(12, 16), 1, 0, 11, 1},
+ {2, UPB_SIZE(28, 48), 0, 0, 9, 3},
+ {3, UPB_SIZE(32, 56), 0, 0, 9, 3},
+ {6, UPB_SIZE(16, 24), 2, 3, 11, 1},
+ {7, UPB_SIZE(20, 32), 3, 0, 11, 1},
{8, UPB_SIZE(8, 8), 0, 0, 8, 1},
- {9, UPB_SIZE(32, 56), 0, 1, 11, 3},
- {10, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {9, UPB_SIZE(36, 64), 0, 2, 11, 3},
+ {10, UPB_SIZE(4, 4), 0, 0, 14, 1},
+ {11, UPB_SIZE(24, 40), 4, 1, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit = {
&envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext__fields[0],
- UPB_SIZE(40, 64), 8, false,
+ UPB_SIZE(40, 72), 9, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h
index c2d25814f9f..73b534aa25e 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -35,10 +36,12 @@ extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsCertific
extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit;
extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit;
struct envoy_config_core_v3_DataSource;
+struct envoy_config_core_v3_WatchedDirectory;
struct envoy_type_matcher_v3_StringMatcher;
struct google_protobuf_Any;
struct google_protobuf_BoolValue;
extern const upb_msglayout envoy_config_core_v3_DataSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_WatchedDirectory_msginit;
extern const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
extern const upb_msglayout google_protobuf_BoolValue_msginit;
@@ -67,39 +70,45 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsParameters *envoy_extens
envoy_extensions_transport_sockets_tls_v3_TlsParameters *ret = envoy_extensions_transport_sockets_tls_v3_TlsParameters_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsParameters *envoy_extensions_transport_sockets_tls_v3_TlsParameters_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_TlsParameters *ret = envoy_extensions_transport_sockets_tls_v3_TlsParameters_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_TlsParameters_serialize(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, arena, len);
}
UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_TlsParameters_tls_minimum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_TlsParameters_tls_maximum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_TlsParameters_cipher_suites(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(16, 16), len); }
-UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_TlsParameters_ecdh_curves(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); }
+UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_TlsParameters_tls_maximum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_TlsParameters_cipher_suites(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len); }
+UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_TlsParameters_ecdh_curves(const envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_set_tls_minimum_protocol_version(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_set_tls_maximum_protocol_version(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_TlsParameters_mutable_cipher_suites(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_TlsParameters_resize_cipher_suites(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 16), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsParameters_add_cipher_suites(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(16, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(8, 8), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_TlsParameters_mutable_ecdh_curves(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_TlsParameters_resize_ecdh_curves(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsParameters_add_ecdh_curves(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(20, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(12, 16), UPB_SIZE(3, 4), &val,
arena);
}
@@ -113,6 +122,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *envoy_e
envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *ret = envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *ret = envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_serialize(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, arena, len);
}
@@ -153,25 +168,34 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsCertificate *envoy_exten
envoy_extensions_transport_sockets_tls_v3_TlsCertificate *ret = envoy_extensions_transport_sockets_tls_v3_TlsCertificate_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsCertificate *envoy_extensions_transport_sockets_tls_v3_TlsCertificate_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_TlsCertificate *ret = envoy_extensions_transport_sockets_tls_v3_TlsCertificate_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_TlsCertificate_serialize(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* const* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, size_t *len) { return (const struct envoy_config_core_v3_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* const* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, size_t *len) { return (const struct envoy_config_core_v3_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_watched_directory(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE const struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_watched_directory(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_config_core_v3_WatchedDirectory*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_certificate_chain(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_certificate_chain(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_certificate_chain(msg);
@@ -183,7 +207,8 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_so
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_private_key(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_private_key(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key(msg);
@@ -195,7 +220,8 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_so
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_password(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_password(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_password(msg);
@@ -207,7 +233,8 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_so
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_ocsp_staple(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_ocsp_staple(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_ocsp_staple(msg);
@@ -219,20 +246,21 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_so
return sub;
}
UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, size_t *len) {
- return (struct envoy_config_core_v3_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
+ return (struct envoy_config_core_v3_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsCertificate_resize_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_DataSource**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_add_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)_upb_msg_new(&envoy_config_core_v3_DataSource_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_private_key_provider(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_private_key_provider(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* sub = (struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key_provider(msg);
@@ -243,6 +271,19 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*
}
return sub;
}
+UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_watched_directory(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_WatchedDirectory* value) {
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_config_core_v3_WatchedDirectory*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_watched_directory(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_WatchedDirectory* sub = (struct envoy_config_core_v3_WatchedDirectory*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_watched_directory(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_WatchedDirectory*)_upb_msg_new(&envoy_config_core_v3_WatchedDirectory_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_watched_directory(msg, sub);
+ }
+ return sub;
+}
/* envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys */
@@ -254,6 +295,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *envoy
envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *ret = envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *ret = envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_serialize(const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, arena, len);
}
@@ -265,12 +312,12 @@ UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_s
return (struct envoy_config_core_v3_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_resize_keys(envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_core_v3_DataSource**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_core_v3_DataSource**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_add_keys(envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)_upb_msg_new(&envoy_config_core_v3_DataSource_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -285,24 +332,33 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateValidationContex
envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *ret = envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *ret = envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_serialize(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_trusted_ca(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_trusted_ca(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_trusted_ca(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct envoy_config_core_v3_DataSource*); }
-UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_verify_certificate_hash(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); }
-UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_verify_certificate_spki(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_require_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
+UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_verify_certificate_hash(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
+UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_verify_certificate_spki(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_require_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_require_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct envoy_config_core_v3_DataSource*); }
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_allow_expired_certificate(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
-UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) { return (const struct envoy_type_matcher_v3_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len); }
-UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_trust_chain_verification(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
+UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) { return (const struct envoy_type_matcher_v3_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
+UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_trust_chain_verification(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_watched_directory(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_watched_directory(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct envoy_config_core_v3_WatchedDirectory*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_trusted_ca(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_DataSource* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_trusted_ca(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_arena *arena) {
@@ -315,26 +371,27 @@ UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_so
return sub;
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_verify_certificate_hash(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_verify_certificate_hash(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 48), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_verify_certificate_hash(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 48), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_verify_certificate_spki(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_verify_certificate_spki(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_verify_certificate_spki(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(32, 56), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_require_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_require_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_arena *arena) {
@@ -347,6 +404,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_crl(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_DataSource* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_crl(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_arena *arena) {
@@ -362,20 +420,33 @@ UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationC
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher** envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_match_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t *len) {
- return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
+ return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher** envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_match_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, size_t len, upb_arena *arena) {
- return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_match_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_trust_chain_verification(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_watched_directory(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_WatchedDirectory* value) {
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct envoy_config_core_v3_WatchedDirectory*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_watched_directory(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_WatchedDirectory* sub = (struct envoy_config_core_v3_WatchedDirectory*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_watched_directory(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_WatchedDirectory*)_upb_msg_new(&envoy_config_core_v3_WatchedDirectory_msginit, arena);
+ if (!sub) return NULL;
+ envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_watched_directory(msg, sub);
+ }
+ return sub;
}
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c
index cbd77b5246f..6717a17a024 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c
@@ -12,11 +12,10 @@
#include "envoy/config/core/v3/base.upb.h"
#include "envoy/config/core/v3/config_source.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/common.upb.h"
-#include "udpa/core/v1/resource_locator.upb.h"
-#include "udpa/annotations/migrate.upb.h"
#include "udpa/annotations/sensitive.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
#include "upb/port_def.inc"
@@ -25,30 +24,28 @@ static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_Gene
};
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_GenericSecret__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_GenericSecret_msginit = {
&envoy_extensions_transport_sockets_tls_v3_GenericSecret_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_GenericSecret__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
-static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_submsgs[2] = {
+static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_submsgs[1] = {
&envoy_config_core_v3_ConfigSource_msginit,
- &udpa_core_v1_ResourceLocator_msginit,
};
-static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {3, UPB_SIZE(12, 24), 0, 1, 11, 1},
+static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig__fields[2] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit = {
&envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_Secret_submsgs[4] = {
@@ -69,7 +66,7 @@ static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_Secre
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_Secret_msginit = {
&envoy_extensions_transport_sockets_tls_v3_Secret_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_Secret__fields[0],
- UPB_SIZE(16, 32), 5, false,
+ UPB_SIZE(16, 32), 5, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h
index 2a4438d9c86..c576e0adcee 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -33,13 +34,11 @@ struct envoy_config_core_v3_DataSource;
struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext;
struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate;
struct envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys;
-struct udpa_core_v1_ResourceLocator;
extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
extern const upb_msglayout envoy_config_core_v3_DataSource_msginit;
extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit;
extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit;
extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
/* envoy.extensions.transport_sockets.tls.v3.GenericSecret */
@@ -52,15 +51,22 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_GenericSecret *envoy_extens
envoy_extensions_transport_sockets_tls_v3_GenericSecret *ret = envoy_extensions_transport_sockets_tls_v3_GenericSecret_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_GenericSecret_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_GenericSecret *envoy_extensions_transport_sockets_tls_v3_GenericSecret_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_GenericSecret *ret = envoy_extensions_transport_sockets_tls_v3_GenericSecret_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_GenericSecret_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_GenericSecret_serialize(const envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_GenericSecret_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_GenericSecret_has_secret(const envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_GenericSecret_secret(const envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_DataSource*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_GenericSecret_has_secret(const envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_GenericSecret_secret(const envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_GenericSecret_set_secret(envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg, struct envoy_config_core_v3_DataSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_DataSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_GenericSecret_mutable_secret(envoy_extensions_transport_sockets_tls_v3_GenericSecret *msg, upb_arena *arena) {
struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_GenericSecret_secret(msg);
@@ -82,21 +88,26 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *envoy_exte
envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *ret = envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *ret = envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_serialize(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_name(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_has_sds_config(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_sds_config(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_ConfigSource*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_has_sds_resource_locator(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct udpa_core_v1_ResourceLocator* envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_sds_resource_locator(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct udpa_core_v1_ResourceLocator*); }
+UPB_INLINE upb_strview envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_name(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_has_sds_config(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ConfigSource* envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_sds_config(const envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_ConfigSource*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_set_name(envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_set_sds_config(envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg, struct envoy_config_core_v3_ConfigSource* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_ConfigSource*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_ConfigSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_mutable_sds_config(envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg, upb_arena *arena) {
struct envoy_config_core_v3_ConfigSource* sub = (struct envoy_config_core_v3_ConfigSource*)envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_sds_config(msg);
@@ -107,18 +118,6 @@ UPB_INLINE struct envoy_config_core_v3_ConfigSource* envoy_extensions_transport_
}
return sub;
}
-UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_set_sds_resource_locator(envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg, struct udpa_core_v1_ResourceLocator* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct udpa_core_v1_ResourceLocator*) = value;
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_mutable_sds_resource_locator(envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_sds_resource_locator(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- if (!sub) return NULL;
- envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_set_sds_resource_locator(msg, sub);
- }
- return sub;
-}
/* envoy.extensions.transport_sockets.tls.v3.Secret */
@@ -130,6 +129,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_Secret *envoy_extensions_tr
envoy_extensions_transport_sockets_tls_v3_Secret *ret = envoy_extensions_transport_sockets_tls_v3_Secret_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_Secret_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_Secret *envoy_extensions_transport_sockets_tls_v3_Secret_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_Secret *ret = envoy_extensions_transport_sockets_tls_v3_Secret_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_Secret_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_Secret_serialize(const envoy_extensions_transport_sockets_tls_v3_Secret *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_Secret_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c
index c38e5d97016..ad5494ce2e6 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c
@@ -12,7 +12,6 @@
#include "envoy/config/core/v3/extension.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/common.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/secret.upb.h"
-#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "udpa/annotations/migrate.upb.h"
@@ -28,19 +27,19 @@ static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_Upst
};
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext__fields[4] = {
- {1, UPB_SIZE(12, 24), 0, 0, 11, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
{2, UPB_SIZE(4, 8), 0, 0, 9, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {4, UPB_SIZE(16, 32), 0, 1, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {4, UPB_SIZE(16, 32), 2, 1, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_msginit = {
&envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
-static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_submsgs[6] = {
+static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_submsgs[5] = {
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit,
&envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit,
&envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit,
@@ -49,23 +48,23 @@ static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_Down
};
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext__fields[8] = {
- {1, UPB_SIZE(8, 8), 0, 0, 11, 1},
- {2, UPB_SIZE(12, 16), 0, 3, 11, 1},
- {3, UPB_SIZE(16, 24), 0, 3, 11, 1},
+ {1, UPB_SIZE(8, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(12, 16), 2, 3, 11, 1},
+ {3, UPB_SIZE(16, 24), 3, 3, 11, 1},
{4, UPB_SIZE(24, 40), UPB_SIZE(-29, -49), 2, 11, 1},
{5, UPB_SIZE(24, 40), UPB_SIZE(-29, -49), 1, 11, 1},
- {6, UPB_SIZE(20, 32), 0, 4, 11, 1},
+ {6, UPB_SIZE(20, 32), 4, 4, 11, 1},
{7, UPB_SIZE(24, 40), UPB_SIZE(-29, -49), 0, 8, 1},
- {8, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {8, UPB_SIZE(4, 4), 0, 0, 14, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_msginit = {
&envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext__fields[0],
- UPB_SIZE(32, 56), 8, false,
+ UPB_SIZE(32, 56), 8, false, 255,
};
-static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_submsgs[11] = {
+static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_submsgs[8] = {
&envoy_config_core_v3_TypedExtensionConfig_msginit,
&envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit,
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit,
@@ -77,24 +76,24 @@ static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_Comm
};
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_CommonTlsContext__fields[12] = {
- {1, UPB_SIZE(0, 0), 0, 7, 11, 1},
- {2, UPB_SIZE(16, 32), 0, 6, 11, 3},
- {3, UPB_SIZE(28, 56), UPB_SIZE(-33, -65), 1, 11, 1},
- {4, UPB_SIZE(20, 40), 0, 0, 9, 3},
- {6, UPB_SIZE(24, 48), 0, 5, 11, 3},
- {7, UPB_SIZE(28, 56), UPB_SIZE(-33, -65), 5, 11, 1},
- {8, UPB_SIZE(28, 56), UPB_SIZE(-33, -65), 4, 11, 1},
- {9, UPB_SIZE(4, 8), 0, 2, 11, 1},
- {10, UPB_SIZE(28, 56), UPB_SIZE(-33, -65), 2, 11, 1},
- {11, UPB_SIZE(8, 16), 0, 3, 11, 1},
- {12, UPB_SIZE(28, 56), UPB_SIZE(-33, -65), 3, 11, 1},
- {13, UPB_SIZE(12, 24), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 7, 11, 1},
+ {2, UPB_SIZE(20, 40), 0, 6, 11, 3},
+ {3, UPB_SIZE(32, 64), UPB_SIZE(-37, -73), 1, 11, 1},
+ {4, UPB_SIZE(24, 48), 0, 0, 9, 3},
+ {6, UPB_SIZE(28, 56), 0, 5, 11, 3},
+ {7, UPB_SIZE(32, 64), UPB_SIZE(-37, -73), 5, 11, 1},
+ {8, UPB_SIZE(32, 64), UPB_SIZE(-37, -73), 4, 11, 1},
+ {9, UPB_SIZE(8, 16), 2, 2, 11, 1},
+ {10, UPB_SIZE(32, 64), UPB_SIZE(-37, -73), 2, 11, 1},
+ {11, UPB_SIZE(12, 24), 3, 3, 11, 1},
+ {12, UPB_SIZE(32, 64), UPB_SIZE(-37, -73), 3, 11, 1},
+ {13, UPB_SIZE(16, 32), 4, 0, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit = {
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext__fields[0],
- UPB_SIZE(36, 72), 12, false,
+ UPB_SIZE(40, 80), 12, false, 255,
};
static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_submsgs[1] = {
@@ -109,7 +108,7 @@ static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_Commo
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit = {
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance__fields[2] = {
@@ -120,7 +119,7 @@ static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_Commo
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_msginit = {
NULL,
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_submsgs[4] = {
@@ -131,16 +130,16 @@ static const upb_msglayout *const envoy_extensions_transport_sockets_tls_v3_Comm
};
static const upb_msglayout_field envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext__fields[4] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 3, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {4, UPB_SIZE(12, 24), 0, 2, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 3, 11, 1},
+ {3, UPB_SIZE(12, 24), 3, 1, 11, 1},
+ {4, UPB_SIZE(16, 32), 4, 2, 11, 1},
};
const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_msginit = {
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_submsgs[0],
&envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(24, 40), 4, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h
index 8fc0ad2cec9..8a8ba90b7b2 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -73,18 +74,25 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *envoy_e
envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *ret = envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *ret = envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_serialize(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_has_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_has_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*); }
UPB_INLINE upb_strview envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_sni(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_allow_renegotiation(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_has_max_session_keys(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_allow_renegotiation(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_has_max_session_keys(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_max_session_keys(const envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_set_common_tls_context(envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_mutable_common_tls_context(envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg, upb_arena *arena) {
@@ -100,9 +108,10 @@ UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_set
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_set_allow_renegotiation(envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_set_max_session_keys(envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg, struct google_protobuf_UInt32Value* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_mutable_max_session_keys(envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext *msg, upb_arena *arena) {
@@ -125,6 +134,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *envoy
envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *ret = envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *ret = envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_serialize(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_msginit, arena, len);
}
@@ -137,23 +152,24 @@ typedef enum {
} envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_ticket_keys_type_oneofcases;
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_ticket_keys_type_oneofcases envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_ticket_keys_type_case(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext* msg) { return (envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_ticket_keys_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(28, 48), int32_t); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_common_tls_context(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_require_client_certificate(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_require_client_certificate(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_require_client_certificate(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_BoolValue*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_require_sni(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 24)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_require_sni(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_require_sni(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_BoolValue*); }
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_session_ticket_keys(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 48)) == 4; }
UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_ticket_keys(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys*, UPB_SIZE(24, 40), UPB_SIZE(28, 48), 4, NULL); }
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_session_ticket_keys_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 48)) == 5; }
UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_ticket_keys_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*, UPB_SIZE(24, 40), UPB_SIZE(28, 48), 5, NULL); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_session_timeout(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_session_timeout(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_Duration* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_session_timeout(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Duration*); }
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_has_disable_stateless_session_resumption(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 48)) == 7; }
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_disable_stateless_session_resumption(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(24, 40), UPB_SIZE(28, 48), 7, false); }
-UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_ocsp_staple_policy(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_ocsp_staple_policy(const envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_set_common_tls_context(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_mutable_common_tls_context(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, upb_arena *arena) {
@@ -166,6 +182,7 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* en
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_set_require_client_certificate(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_mutable_require_client_certificate(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, upb_arena *arena) {
@@ -178,6 +195,7 @@ UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_set_require_sni(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, struct google_protobuf_BoolValue* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_mutable_require_sni(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, upb_arena *arena) {
@@ -214,6 +232,7 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* env
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_set_session_timeout(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_mutable_session_timeout(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, upb_arena *arena) {
@@ -229,7 +248,7 @@ UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_s
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(24, 40), value, UPB_SIZE(28, 48), 7);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_set_ocsp_staple_policy(envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
/* envoy.extensions.transport_sockets.tls.v3.CommonTlsContext */
@@ -242,6 +261,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *envoy_ext
envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_serialize(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit, arena, len);
}
@@ -254,34 +279,35 @@ typedef enum {
envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_validation_context_certificate_provider_instance = 12,
envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_NOT_SET = 0
} envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_oneofcases;
-UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_oneofcases envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_case(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* msg) { return (envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(32, 64), int32_t); }
-
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_params(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_params(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_extensions_transport_sockets_tls_v3_TlsParameters*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificates(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate* const* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificates(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) { return (const struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 3; }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*, UPB_SIZE(28, 56), UPB_SIZE(32, 64), 3, NULL); }
-UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_alpn_protocols(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificate_sds_secret_configs(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* const* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_sds_secret_configs(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) { return (const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 7; }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*, UPB_SIZE(28, 56), UPB_SIZE(32, 64), 7, NULL); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_combined_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 8; }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_combined_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext*, UPB_SIZE(28, 56), UPB_SIZE(32, 64), 8, NULL); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificate_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 10; }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*, UPB_SIZE(28, 56), UPB_SIZE(32, 64), 10, NULL); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificate_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(32, 64)) == 12; }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*, UPB_SIZE(28, 56), UPB_SIZE(32, 64), 12, NULL); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_custom_handshaker(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_custom_handshaker(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_TypedExtensionConfig*); }
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_oneofcases envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_case(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext* msg) { return (envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 72), int32_t); }
+
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_params(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_params(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_extensions_transport_sockets_tls_v3_TlsParameters*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificates(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate* const* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificates(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) { return (const struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 3; }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*, UPB_SIZE(32, 64), UPB_SIZE(36, 72), 3, NULL); }
+UPB_INLINE upb_strview const* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_alpn_protocols(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificate_sds_secret_configs(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* const* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_sds_secret_configs(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) { return (const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 7; }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*, UPB_SIZE(32, 64), UPB_SIZE(36, 72), 7, NULL); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_combined_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 8; }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_combined_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext*, UPB_SIZE(32, 64), UPB_SIZE(36, 72), 8, NULL); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificate_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 10; }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*, UPB_SIZE(32, 64), UPB_SIZE(36, 72), 10, NULL); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_tls_certificate_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 12; }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return UPB_READ_ONEOF(msg, const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*, UPB_SIZE(32, 64), UPB_SIZE(36, 72), 12, NULL); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_has_custom_handshaker(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_custom_handshaker(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_TypedExtensionConfig*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_tls_params(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, struct envoy_extensions_transport_sockets_tls_v3_TlsParameters* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_extensions_transport_sockets_tls_v3_TlsParameters*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_extensions_transport_sockets_tls_v3_TlsParameters*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_tls_params(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_TlsParameters* sub = (struct envoy_extensions_transport_sockets_tls_v3_TlsParameters*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_params(msg);
@@ -293,20 +319,20 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy
return sub;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate** envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_tls_certificates(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) {
- return (struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
+ return (struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate** envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_resize_tls_certificates(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t len, upb_arena *arena) {
- return (struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_add_tls_certificates(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate* sub = (struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate*)_upb_msg_new(&envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_validation_context(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*, UPB_SIZE(28, 56), value, UPB_SIZE(32, 64), 3);
+ UPB_WRITE_ONEOF(msg, struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*, UPB_SIZE(32, 64), value, UPB_SIZE(36, 72), 3);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_validation_context(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* sub = (struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context(msg);
@@ -318,30 +344,30 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CertificateValidatio
return sub;
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_alpn_protocols(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE upb_strview* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_resize_alpn_protocols(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_add_alpn_protocols(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig** envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_tls_certificate_sds_secret_configs(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t *len) {
- return (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig** envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_resize_tls_certificate_sds_secret_configs(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, size_t len, upb_arena *arena) {
- return (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_add_tls_certificate_sds_secret_configs(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* sub = (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*)_upb_msg_new(&envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_validation_context_sds_secret_config(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* value) {
- UPB_WRITE_ONEOF(msg, struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*, UPB_SIZE(28, 56), value, UPB_SIZE(32, 64), 7);
+ UPB_WRITE_ONEOF(msg, struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*, UPB_SIZE(32, 64), value, UPB_SIZE(36, 72), 7);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_validation_context_sds_secret_config(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* sub = (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_sds_secret_config(msg);
@@ -353,7 +379,7 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* env
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_combined_validation_context(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext*, UPB_SIZE(28, 56), value, UPB_SIZE(32, 64), 8);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext*, UPB_SIZE(32, 64), value, UPB_SIZE(36, 72), 8);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_combined_validation_context(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_combined_validation_context(msg);
@@ -365,7 +391,8 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Com
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_tls_certificate_certificate_provider(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_tls_certificate_certificate_provider(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider(msg);
@@ -377,7 +404,7 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Cer
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_validation_context_certificate_provider(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*, UPB_SIZE(28, 56), value, UPB_SIZE(32, 64), 10);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*, UPB_SIZE(32, 64), value, UPB_SIZE(36, 72), 10);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_validation_context_certificate_provider(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_certificate_provider(msg);
@@ -389,7 +416,8 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Cer
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_tls_certificate_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_tls_certificate_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider_instance(msg);
@@ -401,7 +429,7 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Cer
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_validation_context_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* value) {
- UPB_WRITE_ONEOF(msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*, UPB_SIZE(28, 56), value, UPB_SIZE(32, 64), 12);
+ UPB_WRITE_ONEOF(msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*, UPB_SIZE(32, 64), value, UPB_SIZE(36, 72), 12);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_validation_context_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_validation_context_certificate_provider_instance(msg);
@@ -413,7 +441,8 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Cer
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_set_custom_handshaker(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_mutable_custom_handshaker(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext *msg, upb_arena *arena) {
struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_custom_handshaker(msg);
@@ -435,6 +464,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Certificat
envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_serialize(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit, arena, len);
}
@@ -475,6 +510,12 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Certificat
envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_serialize(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_msginit, arena, len);
}
@@ -499,21 +540,28 @@ UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCe
envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *ret = envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_serialize(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_msginit, arena, len);
}
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_default_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*); }
-UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_default_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*); }
+UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_has_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*); }
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_set_default_validation_context(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_mutable_default_validation_context(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* sub = (struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(msg);
@@ -525,7 +573,8 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CertificateValidatio
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_set_validation_context_sds_secret_config(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_mutable_validation_context_sds_secret_config(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* sub = (struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_sds_secret_config(msg);
@@ -537,7 +586,8 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig* env
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_set_validation_context_certificate_provider(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_mutable_validation_context_certificate_provider(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider(msg);
@@ -549,7 +599,8 @@ UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_Cer
return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_set_validation_context_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_mutable_validation_context_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext *msg, upb_arena *arena) {
struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance* sub = (struct envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*)envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider_instance(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c
index c8660dbd536..cc8dcc4f567 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.c
@@ -20,7 +20,7 @@
const upb_msglayout envoy_service_cluster_v3_CdsDummy_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h
index 11d8572c4a3..86fa3022b25 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_service_cluster_v3_CdsDummy *envoy_service_cluster_v3_CdsDummy_
envoy_service_cluster_v3_CdsDummy *ret = envoy_service_cluster_v3_CdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_cluster_v3_CdsDummy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_cluster_v3_CdsDummy *envoy_service_cluster_v3_CdsDummy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_cluster_v3_CdsDummy *ret = envoy_service_cluster_v3_CdsDummy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_cluster_v3_CdsDummy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_cluster_v3_CdsDummy_serialize(const envoy_service_cluster_v3_CdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_cluster_v3_CdsDummy_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c
index 959e3cbea22..7fb8ac990da 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.c
@@ -18,7 +18,7 @@
const upb_msglayout envoy_service_discovery_v3_AdsDummy_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h
index 41dc6428d13..0d26bd97dc5 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_service_discovery_v3_AdsDummy *envoy_service_discovery_v3_AdsDu
envoy_service_discovery_v3_AdsDummy *ret = envoy_service_discovery_v3_AdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_AdsDummy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_discovery_v3_AdsDummy *envoy_service_discovery_v3_AdsDummy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_AdsDummy *ret = envoy_service_discovery_v3_AdsDummy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_AdsDummy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_discovery_v3_AdsDummy_serialize(const envoy_service_discovery_v3_AdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_discovery_v3_AdsDummy_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c
index 2c76a985cba..a5b6ac46aa3 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c
@@ -11,10 +11,8 @@
#include "envoy/service/discovery/v3/discovery.upb.h"
#include "envoy/config/core/v3/base.upb.h"
#include "google/protobuf/any.upb.h"
+#include "google/protobuf/duration.upb.h"
#include "google/rpc/status.upb.h"
-#include "udpa/core/v1/resource_locator.upb.h"
-#include "udpa/core/v1/resource_name.upb.h"
-#include "udpa/annotations/migrate.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
@@ -26,18 +24,18 @@ static const upb_msglayout *const envoy_service_discovery_v3_DiscoveryRequest_su
};
static const upb_msglayout_field envoy_service_discovery_v3_DiscoveryRequest__fields[6] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(24, 48), 0, 0, 11, 1},
- {3, UPB_SIZE(32, 64), 0, 0, 9, 3},
- {4, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {5, UPB_SIZE(16, 32), 0, 0, 9, 1},
- {6, UPB_SIZE(28, 56), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(28, 56), 1, 0, 11, 1},
+ {3, UPB_SIZE(36, 72), 0, 0, 9, 3},
+ {4, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {5, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {6, UPB_SIZE(32, 64), 2, 1, 11, 1},
};
const upb_msglayout envoy_service_discovery_v3_DiscoveryRequest_msginit = {
&envoy_service_discovery_v3_DiscoveryRequest_submsgs[0],
&envoy_service_discovery_v3_DiscoveryRequest__fields[0],
- UPB_SIZE(40, 80), 6, false,
+ UPB_SIZE(40, 80), 6, false, 255,
};
static const upb_msglayout *const envoy_service_discovery_v3_DiscoveryResponse_submsgs[2] = {
@@ -48,41 +46,38 @@ static const upb_msglayout *const envoy_service_discovery_v3_DiscoveryResponse_s
static const upb_msglayout_field envoy_service_discovery_v3_DiscoveryResponse__fields[6] = {
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(32, 64), 0, 1, 11, 3},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
{4, UPB_SIZE(12, 24), 0, 0, 9, 1},
{5, UPB_SIZE(20, 40), 0, 0, 9, 1},
- {6, UPB_SIZE(28, 56), 0, 0, 11, 1},
+ {6, UPB_SIZE(28, 56), 1, 0, 11, 1},
};
const upb_msglayout envoy_service_discovery_v3_DiscoveryResponse_msginit = {
&envoy_service_discovery_v3_DiscoveryResponse_submsgs[0],
&envoy_service_discovery_v3_DiscoveryResponse__fields[0],
- UPB_SIZE(40, 80), 6, false,
+ UPB_SIZE(40, 80), 6, false, 255,
};
-static const upb_msglayout *const envoy_service_discovery_v3_DeltaDiscoveryRequest_submsgs[5] = {
+static const upb_msglayout *const envoy_service_discovery_v3_DeltaDiscoveryRequest_submsgs[3] = {
&envoy_config_core_v3_Node_msginit,
&envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit,
&google_rpc_Status_msginit,
- &udpa_core_v1_ResourceLocator_msginit,
};
-static const upb_msglayout_field envoy_service_discovery_v3_DeltaDiscoveryRequest__fields[9] = {
- {1, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(24, 48), 0, 0, 9, 3},
- {4, UPB_SIZE(28, 56), 0, 0, 9, 3},
- {5, UPB_SIZE(32, 64), 0, 1, 11, _UPB_LABEL_MAP},
- {6, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {7, UPB_SIZE(20, 40), 0, 2, 11, 1},
- {8, UPB_SIZE(36, 72), 0, 3, 11, 3},
- {9, UPB_SIZE(40, 80), 0, 3, 11, 3},
+static const upb_msglayout_field envoy_service_discovery_v3_DeltaDiscoveryRequest__fields[7] = {
+ {1, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(28, 56), 0, 0, 9, 3},
+ {4, UPB_SIZE(32, 64), 0, 0, 9, 3},
+ {5, UPB_SIZE(36, 72), 0, 1, 11, _UPB_LABEL_MAP},
+ {6, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {7, UPB_SIZE(24, 48), 2, 2, 11, 1},
};
const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit = {
&envoy_service_discovery_v3_DeltaDiscoveryRequest_submsgs[0],
&envoy_service_discovery_v3_DeltaDiscoveryRequest__fields[0],
- UPB_SIZE(48, 96), 9, false,
+ UPB_SIZE(40, 80), 7, false, 255,
};
static const upb_msglayout_field envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry__fields[2] = {
@@ -93,46 +88,58 @@ static const upb_msglayout_field envoy_service_discovery_v3_DeltaDiscoveryReques
const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit = {
NULL,
&envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_service_discovery_v3_DeltaDiscoveryResponse_submsgs[2] = {
+ &envoy_config_core_v3_ControlPlane_msginit,
&envoy_service_discovery_v3_Resource_msginit,
- &udpa_core_v1_ResourceName_msginit,
};
static const upb_msglayout_field envoy_service_discovery_v3_DeltaDiscoveryResponse__fields[6] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(24, 48), 0, 0, 11, 3},
- {4, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {5, UPB_SIZE(16, 32), 0, 0, 9, 1},
- {6, UPB_SIZE(28, 56), 0, 0, 9, 3},
- {7, UPB_SIZE(32, 64), 0, 1, 11, 3},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(32, 64), 0, 1, 11, 3},
+ {4, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {5, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {6, UPB_SIZE(36, 72), 0, 0, 9, 3},
+ {7, UPB_SIZE(28, 56), 1, 0, 11, 1},
};
const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit = {
&envoy_service_discovery_v3_DeltaDiscoveryResponse_submsgs[0],
&envoy_service_discovery_v3_DeltaDiscoveryResponse__fields[0],
- UPB_SIZE(40, 80), 6, false,
+ UPB_SIZE(40, 80), 6, false, 255,
};
-static const upb_msglayout *const envoy_service_discovery_v3_Resource_submsgs[2] = {
+static const upb_msglayout *const envoy_service_discovery_v3_Resource_submsgs[3] = {
+ &envoy_service_discovery_v3_Resource_CacheControl_msginit,
&google_protobuf_Any_msginit,
- &udpa_core_v1_ResourceName_msginit,
+ &google_protobuf_Duration_msginit,
};
-static const upb_msglayout_field envoy_service_discovery_v3_Resource__fields[5] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {4, UPB_SIZE(24, 48), 0, 0, 9, 3},
- {5, UPB_SIZE(20, 40), 0, 1, 11, 1},
+static const upb_msglayout_field envoy_service_discovery_v3_Resource__fields[6] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(20, 40), 1, 1, 11, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {4, UPB_SIZE(32, 64), 0, 0, 9, 3},
+ {6, UPB_SIZE(24, 48), 2, 2, 11, 1},
+ {7, UPB_SIZE(28, 56), 3, 0, 11, 1},
};
const upb_msglayout envoy_service_discovery_v3_Resource_msginit = {
&envoy_service_discovery_v3_Resource_submsgs[0],
&envoy_service_discovery_v3_Resource__fields[0],
- UPB_SIZE(32, 64), 5, false,
+ UPB_SIZE(40, 80), 6, false, 255,
+};
+
+static const upb_msglayout_field envoy_service_discovery_v3_Resource_CacheControl__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 8, 1},
+};
+
+const upb_msglayout envoy_service_discovery_v3_Resource_CacheControl_msginit = {
+ NULL,
+ &envoy_service_discovery_v3_Resource_CacheControl__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h
index 87af22db378..def27876393 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -25,30 +26,31 @@ struct envoy_service_discovery_v3_DeltaDiscoveryRequest;
struct envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry;
struct envoy_service_discovery_v3_DeltaDiscoveryResponse;
struct envoy_service_discovery_v3_Resource;
+struct envoy_service_discovery_v3_Resource_CacheControl;
typedef struct envoy_service_discovery_v3_DiscoveryRequest envoy_service_discovery_v3_DiscoveryRequest;
typedef struct envoy_service_discovery_v3_DiscoveryResponse envoy_service_discovery_v3_DiscoveryResponse;
typedef struct envoy_service_discovery_v3_DeltaDiscoveryRequest envoy_service_discovery_v3_DeltaDiscoveryRequest;
typedef struct envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry;
typedef struct envoy_service_discovery_v3_DeltaDiscoveryResponse envoy_service_discovery_v3_DeltaDiscoveryResponse;
typedef struct envoy_service_discovery_v3_Resource envoy_service_discovery_v3_Resource;
+typedef struct envoy_service_discovery_v3_Resource_CacheControl envoy_service_discovery_v3_Resource_CacheControl;
extern const upb_msglayout envoy_service_discovery_v3_DiscoveryRequest_msginit;
extern const upb_msglayout envoy_service_discovery_v3_DiscoveryResponse_msginit;
extern const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit;
extern const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit;
extern const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit;
extern const upb_msglayout envoy_service_discovery_v3_Resource_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_Resource_CacheControl_msginit;
struct envoy_config_core_v3_ControlPlane;
struct envoy_config_core_v3_Node;
struct google_protobuf_Any;
+struct google_protobuf_Duration;
struct google_rpc_Status;
-struct udpa_core_v1_ResourceLocator;
-struct udpa_core_v1_ResourceName;
extern const upb_msglayout envoy_config_core_v3_ControlPlane_msginit;
extern const upb_msglayout envoy_config_core_v3_Node_msginit;
extern const upb_msglayout google_protobuf_Any_msginit;
+extern const upb_msglayout google_protobuf_Duration_msginit;
extern const upb_msglayout google_rpc_Status_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceName_msginit;
/* envoy.service.discovery.v3.DiscoveryRequest */
@@ -61,24 +63,31 @@ UPB_INLINE envoy_service_discovery_v3_DiscoveryRequest *envoy_service_discovery_
envoy_service_discovery_v3_DiscoveryRequest *ret = envoy_service_discovery_v3_DiscoveryRequest_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_DiscoveryRequest_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_discovery_v3_DiscoveryRequest *envoy_service_discovery_v3_DiscoveryRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_DiscoveryRequest *ret = envoy_service_discovery_v3_DiscoveryRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_DiscoveryRequest_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_discovery_v3_DiscoveryRequest_serialize(const envoy_service_discovery_v3_DiscoveryRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_discovery_v3_DiscoveryRequest_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryRequest_version_info(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_service_discovery_v3_DiscoveryRequest_has_node(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DiscoveryRequest_node(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct envoy_config_core_v3_Node*); }
-UPB_INLINE upb_strview const* envoy_service_discovery_v3_DiscoveryRequest_resource_names(const envoy_service_discovery_v3_DiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryRequest_type_url(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryRequest_response_nonce(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); }
-UPB_INLINE bool envoy_service_discovery_v3_DiscoveryRequest_has_error_detail(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const struct google_rpc_Status* envoy_service_discovery_v3_DiscoveryRequest_error_detail(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_rpc_Status*); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryRequest_version_info(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_service_discovery_v3_DiscoveryRequest_has_node(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DiscoveryRequest_node(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_config_core_v3_Node*); }
+UPB_INLINE upb_strview const* envoy_service_discovery_v3_DiscoveryRequest_resource_names(const envoy_service_discovery_v3_DiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryRequest_type_url(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryRequest_response_nonce(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool envoy_service_discovery_v3_DiscoveryRequest_has_error_detail(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_rpc_Status* envoy_service_discovery_v3_DiscoveryRequest_error_detail(const envoy_service_discovery_v3_DiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct google_rpc_Status*); }
UPB_INLINE void envoy_service_discovery_v3_DiscoveryRequest_set_version_info(envoy_service_discovery_v3_DiscoveryRequest *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryRequest_set_node(envoy_service_discovery_v3_DiscoveryRequest *msg, struct envoy_config_core_v3_Node* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct envoy_config_core_v3_Node*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_config_core_v3_Node*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DiscoveryRequest_mutable_node(envoy_service_discovery_v3_DiscoveryRequest *msg, upb_arena *arena) {
struct envoy_config_core_v3_Node* sub = (struct envoy_config_core_v3_Node*)envoy_service_discovery_v3_DiscoveryRequest_node(msg);
@@ -90,23 +99,24 @@ UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_discovery_v3_Discover
return sub;
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DiscoveryRequest_mutable_resource_names(envoy_service_discovery_v3_DiscoveryRequest *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DiscoveryRequest_resize_resource_names(envoy_service_discovery_v3_DiscoveryRequest *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_service_discovery_v3_DiscoveryRequest_add_resource_names(envoy_service_discovery_v3_DiscoveryRequest *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(32, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryRequest_set_type_url(envoy_service_discovery_v3_DiscoveryRequest *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryRequest_set_response_nonce(envoy_service_discovery_v3_DiscoveryRequest *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryRequest_set_error_detail(envoy_service_discovery_v3_DiscoveryRequest *msg, struct google_rpc_Status* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_rpc_Status*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct google_rpc_Status*) = value;
}
UPB_INLINE struct google_rpc_Status* envoy_service_discovery_v3_DiscoveryRequest_mutable_error_detail(envoy_service_discovery_v3_DiscoveryRequest *msg, upb_arena *arena) {
struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_service_discovery_v3_DiscoveryRequest_error_detail(msg);
@@ -128,6 +138,12 @@ UPB_INLINE envoy_service_discovery_v3_DiscoveryResponse *envoy_service_discovery
envoy_service_discovery_v3_DiscoveryResponse *ret = envoy_service_discovery_v3_DiscoveryResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_DiscoveryResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_discovery_v3_DiscoveryResponse *envoy_service_discovery_v3_DiscoveryResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_DiscoveryResponse *ret = envoy_service_discovery_v3_DiscoveryResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_DiscoveryResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_discovery_v3_DiscoveryResponse_serialize(const envoy_service_discovery_v3_DiscoveryResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_discovery_v3_DiscoveryResponse_msginit, arena, len);
}
@@ -135,10 +151,10 @@ UPB_INLINE char *envoy_service_discovery_v3_DiscoveryResponse_serialize(const en
UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryResponse_version_info(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE bool envoy_service_discovery_v3_DiscoveryResponse_has_resources(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
UPB_INLINE const struct google_protobuf_Any* const* envoy_service_discovery_v3_DiscoveryResponse_resources(const envoy_service_discovery_v3_DiscoveryResponse *msg, size_t *len) { return (const struct google_protobuf_Any* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
-UPB_INLINE bool envoy_service_discovery_v3_DiscoveryResponse_canary(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool envoy_service_discovery_v3_DiscoveryResponse_canary(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryResponse_type_url(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE upb_strview envoy_service_discovery_v3_DiscoveryResponse_nonce(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
-UPB_INLINE bool envoy_service_discovery_v3_DiscoveryResponse_has_control_plane(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE bool envoy_service_discovery_v3_DiscoveryResponse_has_control_plane(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct envoy_config_core_v3_ControlPlane* envoy_service_discovery_v3_DiscoveryResponse_control_plane(const envoy_service_discovery_v3_DiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_config_core_v3_ControlPlane*); }
UPB_INLINE void envoy_service_discovery_v3_DiscoveryResponse_set_version_info(envoy_service_discovery_v3_DiscoveryResponse *msg, upb_strview value) {
@@ -148,17 +164,17 @@ UPB_INLINE struct google_protobuf_Any** envoy_service_discovery_v3_DiscoveryResp
return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE struct google_protobuf_Any** envoy_service_discovery_v3_DiscoveryResponse_resize_resources(envoy_service_discovery_v3_DiscoveryResponse *msg, size_t len, upb_arena *arena) {
- return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (struct google_protobuf_Any**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_Any* envoy_service_discovery_v3_DiscoveryResponse_add_resources(envoy_service_discovery_v3_DiscoveryResponse *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryResponse_set_canary(envoy_service_discovery_v3_DiscoveryResponse *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryResponse_set_type_url(envoy_service_discovery_v3_DiscoveryResponse *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
@@ -167,6 +183,7 @@ UPB_INLINE void envoy_service_discovery_v3_DiscoveryResponse_set_nonce(envoy_ser
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DiscoveryResponse_set_control_plane(envoy_service_discovery_v3_DiscoveryResponse *msg, struct envoy_config_core_v3_ControlPlane* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_config_core_v3_ControlPlane*) = value;
}
UPB_INLINE struct envoy_config_core_v3_ControlPlane* envoy_service_discovery_v3_DiscoveryResponse_mutable_control_plane(envoy_service_discovery_v3_DiscoveryResponse *msg, upb_arena *arena) {
@@ -189,29 +206,32 @@ UPB_INLINE envoy_service_discovery_v3_DeltaDiscoveryRequest *envoy_service_disco
envoy_service_discovery_v3_DeltaDiscoveryRequest *ret = envoy_service_discovery_v3_DeltaDiscoveryRequest_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_discovery_v3_DeltaDiscoveryRequest *envoy_service_discovery_v3_DeltaDiscoveryRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_DeltaDiscoveryRequest *ret = envoy_service_discovery_v3_DeltaDiscoveryRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_discovery_v3_DeltaDiscoveryRequest_serialize(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit, arena, len);
}
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_node(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DeltaDiscoveryRequest_node(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_Node*); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryRequest_type_url(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE upb_strview const* envoy_service_discovery_v3_DeltaDiscoveryRequest_resource_names_subscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE upb_strview const* envoy_service_discovery_v3_DeltaDiscoveryRequest_resource_names_unsubscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_initial_resource_versions(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE size_t envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_size(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) {return _upb_msg_map_size(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_get(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(32, 64), &key, 0, val, 0); }
-UPB_INLINE const envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_next(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t* iter) { return (const envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryRequest_response_nonce(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_error_detail(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct google_rpc_Status* envoy_service_discovery_v3_DeltaDiscoveryRequest_error_detail(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_rpc_Status*); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_udpa_resources_subscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
-UPB_INLINE const struct udpa_core_v1_ResourceLocator* const* envoy_service_discovery_v3_DeltaDiscoveryRequest_udpa_resources_subscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) { return (const struct udpa_core_v1_ResourceLocator* const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_udpa_resources_unsubscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 80)); }
-UPB_INLINE const struct udpa_core_v1_ResourceLocator* const* envoy_service_discovery_v3_DeltaDiscoveryRequest_udpa_resources_unsubscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) { return (const struct udpa_core_v1_ResourceLocator* const*)_upb_array_accessor(msg, UPB_SIZE(40, 80), len); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_node(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DeltaDiscoveryRequest_node(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct envoy_config_core_v3_Node*); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryRequest_type_url(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview const* envoy_service_discovery_v3_DeltaDiscoveryRequest_resource_names_subscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+UPB_INLINE upb_strview const* envoy_service_discovery_v3_DeltaDiscoveryRequest_resource_names_unsubscribe(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_initial_resource_versions(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE size_t envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_size(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) {return _upb_msg_map_size(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_get(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(36, 72), &key, 0, val, 0); }
+UPB_INLINE const envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_next(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t* iter) { return (const envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryRequest_response_nonce(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_has_error_detail(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_rpc_Status* envoy_service_discovery_v3_DeltaDiscoveryRequest_error_detail(const envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_rpc_Status*); }
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryRequest_set_node(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, struct envoy_config_core_v3_Node* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_Node*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct envoy_config_core_v3_Node*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DeltaDiscoveryRequest_mutable_node(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_arena *arena) {
struct envoy_config_core_v3_Node* sub = (struct envoy_config_core_v3_Node*)envoy_service_discovery_v3_DeltaDiscoveryRequest_node(msg);
@@ -223,37 +243,38 @@ UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_discovery_v3_DeltaDis
return sub;
}
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryRequest_set_type_url(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DeltaDiscoveryRequest_mutable_resource_names_subscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DeltaDiscoveryRequest_resize_resource_names_subscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_add_resource_names_subscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DeltaDiscoveryRequest_mutable_resource_names_unsubscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DeltaDiscoveryRequest_resize_resource_names_unsubscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_add_resource_names_unsubscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(32, 64), UPB_SIZE(3, 4), &val,
arena);
}
-UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_clear(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { _upb_msg_map_clear(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_set(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(32, 64), &key, 0, &val, 0, a); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_delete(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(32, 64), &key, 0); }
-UPB_INLINE envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_nextmutable(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t* iter) { return (envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 64), iter); }
+UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_clear(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg) { _upb_msg_map_clear(msg, UPB_SIZE(36, 72)); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_set(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(36, 72), &key, 0, &val, 0, a); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_delete(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(36, 72), &key, 0); }
+UPB_INLINE envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry* envoy_service_discovery_v3_DeltaDiscoveryRequest_initial_resource_versions_nextmutable(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t* iter) { return (envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(36, 72), iter); }
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryRequest_set_response_nonce(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryRequest_set_error_detail(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, struct google_rpc_Status* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_rpc_Status*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_rpc_Status*) = value;
}
UPB_INLINE struct google_rpc_Status* envoy_service_discovery_v3_DeltaDiscoveryRequest_mutable_error_detail(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_arena *arena) {
struct google_rpc_Status* sub = (struct google_rpc_Status*)envoy_service_discovery_v3_DeltaDiscoveryRequest_error_detail(msg);
@@ -264,32 +285,6 @@ UPB_INLINE struct google_rpc_Status* envoy_service_discovery_v3_DeltaDiscoveryRe
}
return sub;
}
-UPB_INLINE struct udpa_core_v1_ResourceLocator** envoy_service_discovery_v3_DeltaDiscoveryRequest_mutable_udpa_resources_subscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) {
- return (struct udpa_core_v1_ResourceLocator**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator** envoy_service_discovery_v3_DeltaDiscoveryRequest_resize_udpa_resources_subscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) {
- return (struct udpa_core_v1_ResourceLocator**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_MESSAGE, arena);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* envoy_service_discovery_v3_DeltaDiscoveryRequest_add_udpa_resources_subscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
- if (!ok) return NULL;
- return sub;
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator** envoy_service_discovery_v3_DeltaDiscoveryRequest_mutable_udpa_resources_unsubscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t *len) {
- return (struct udpa_core_v1_ResourceLocator**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator** envoy_service_discovery_v3_DeltaDiscoveryRequest_resize_udpa_resources_unsubscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, size_t len, upb_arena *arena) {
- return (struct udpa_core_v1_ResourceLocator**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* envoy_service_discovery_v3_DeltaDiscoveryRequest_add_udpa_resources_unsubscribe(envoy_service_discovery_v3_DeltaDiscoveryRequest *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
- if (!ok) return NULL;
- return sub;
-}
/* envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry */
@@ -318,62 +313,68 @@ UPB_INLINE envoy_service_discovery_v3_DeltaDiscoveryResponse *envoy_service_disc
envoy_service_discovery_v3_DeltaDiscoveryResponse *ret = envoy_service_discovery_v3_DeltaDiscoveryResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_discovery_v3_DeltaDiscoveryResponse *envoy_service_discovery_v3_DeltaDiscoveryResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_DeltaDiscoveryResponse *ret = envoy_service_discovery_v3_DeltaDiscoveryResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_discovery_v3_DeltaDiscoveryResponse_serialize(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryResponse_system_version_info(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryResponse_has_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const envoy_service_discovery_v3_Resource* const* envoy_service_discovery_v3_DeltaDiscoveryResponse_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) { return (const envoy_service_discovery_v3_Resource* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryResponse_type_url(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryResponse_nonce(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview); }
-UPB_INLINE upb_strview const* envoy_service_discovery_v3_DeltaDiscoveryResponse_removed_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryResponse_has_udpa_removed_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const struct udpa_core_v1_ResourceName* const* envoy_service_discovery_v3_DeltaDiscoveryResponse_udpa_removed_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) { return (const struct udpa_core_v1_ResourceName* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryResponse_system_version_info(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryResponse_has_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
+UPB_INLINE const envoy_service_discovery_v3_Resource* const* envoy_service_discovery_v3_DeltaDiscoveryResponse_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) { return (const envoy_service_discovery_v3_Resource* const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryResponse_type_url(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_DeltaDiscoveryResponse_nonce(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE upb_strview const* envoy_service_discovery_v3_DeltaDiscoveryResponse_removed_resources(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 72), len); }
+UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryResponse_has_control_plane(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_ControlPlane* envoy_service_discovery_v3_DeltaDiscoveryResponse_control_plane(const envoy_service_discovery_v3_DeltaDiscoveryResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_config_core_v3_ControlPlane*); }
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryResponse_set_system_version_info(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE envoy_service_discovery_v3_Resource** envoy_service_discovery_v3_DeltaDiscoveryResponse_mutable_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) {
- return (envoy_service_discovery_v3_Resource**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (envoy_service_discovery_v3_Resource**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE envoy_service_discovery_v3_Resource** envoy_service_discovery_v3_DeltaDiscoveryResponse_resize_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t len, upb_arena *arena) {
- return (envoy_service_discovery_v3_Resource**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_service_discovery_v3_Resource**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_service_discovery_v3_Resource* envoy_service_discovery_v3_DeltaDiscoveryResponse_add_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_arena *arena) {
struct envoy_service_discovery_v3_Resource* sub = (struct envoy_service_discovery_v3_Resource*)_upb_msg_new(&envoy_service_discovery_v3_Resource_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryResponse_set_type_url(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryResponse_set_nonce(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DeltaDiscoveryResponse_mutable_removed_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_DeltaDiscoveryResponse_resize_removed_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_service_discovery_v3_DeltaDiscoveryResponse_add_removed_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(3, 4), &val,
arena);
}
-UPB_INLINE struct udpa_core_v1_ResourceName** envoy_service_discovery_v3_DeltaDiscoveryResponse_mutable_udpa_removed_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t *len) {
- return (struct udpa_core_v1_ResourceName**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
-}
-UPB_INLINE struct udpa_core_v1_ResourceName** envoy_service_discovery_v3_DeltaDiscoveryResponse_resize_udpa_removed_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, size_t len, upb_arena *arena) {
- return (struct udpa_core_v1_ResourceName**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena);
+UPB_INLINE void envoy_service_discovery_v3_DeltaDiscoveryResponse_set_control_plane(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, struct envoy_config_core_v3_ControlPlane* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_config_core_v3_ControlPlane*) = value;
}
-UPB_INLINE struct udpa_core_v1_ResourceName* envoy_service_discovery_v3_DeltaDiscoveryResponse_add_udpa_removed_resources(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceName* sub = (struct udpa_core_v1_ResourceName*)_upb_msg_new(&udpa_core_v1_ResourceName_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
- if (!ok) return NULL;
+UPB_INLINE struct envoy_config_core_v3_ControlPlane* envoy_service_discovery_v3_DeltaDiscoveryResponse_mutable_control_plane(envoy_service_discovery_v3_DeltaDiscoveryResponse *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_ControlPlane* sub = (struct envoy_config_core_v3_ControlPlane*)envoy_service_discovery_v3_DeltaDiscoveryResponse_control_plane(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_ControlPlane*)_upb_msg_new(&envoy_config_core_v3_ControlPlane_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_discovery_v3_DeltaDiscoveryResponse_set_control_plane(msg, sub);
+ }
return sub;
}
@@ -387,23 +388,32 @@ UPB_INLINE envoy_service_discovery_v3_Resource *envoy_service_discovery_v3_Resou
envoy_service_discovery_v3_Resource *ret = envoy_service_discovery_v3_Resource_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_Resource_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_discovery_v3_Resource *envoy_service_discovery_v3_Resource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_Resource *ret = envoy_service_discovery_v3_Resource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_Resource_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_discovery_v3_Resource_serialize(const envoy_service_discovery_v3_Resource *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_discovery_v3_Resource_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_service_discovery_v3_Resource_version(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_service_discovery_v3_Resource_has_resource(const envoy_service_discovery_v3_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct google_protobuf_Any* envoy_service_discovery_v3_Resource_resource(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Any*); }
-UPB_INLINE upb_strview envoy_service_discovery_v3_Resource_name(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE upb_strview const* envoy_service_discovery_v3_Resource_aliases(const envoy_service_discovery_v3_Resource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE bool envoy_service_discovery_v3_Resource_has_udpa_resource_name(const envoy_service_discovery_v3_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct udpa_core_v1_ResourceName* envoy_service_discovery_v3_Resource_udpa_resource_name(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct udpa_core_v1_ResourceName*); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_Resource_version(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_service_discovery_v3_Resource_has_resource(const envoy_service_discovery_v3_Resource *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* envoy_service_discovery_v3_Resource_resource(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Any*); }
+UPB_INLINE upb_strview envoy_service_discovery_v3_Resource_name(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview const* envoy_service_discovery_v3_Resource_aliases(const envoy_service_discovery_v3_Resource *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(32, 64), len); }
+UPB_INLINE bool envoy_service_discovery_v3_Resource_has_ttl(const envoy_service_discovery_v3_Resource *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Duration* envoy_service_discovery_v3_Resource_ttl(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_Duration*); }
+UPB_INLINE bool envoy_service_discovery_v3_Resource_has_cache_control(const envoy_service_discovery_v3_Resource *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const envoy_service_discovery_v3_Resource_CacheControl* envoy_service_discovery_v3_Resource_cache_control(const envoy_service_discovery_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const envoy_service_discovery_v3_Resource_CacheControl*); }
UPB_INLINE void envoy_service_discovery_v3_Resource_set_version(envoy_service_discovery_v3_Resource *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void envoy_service_discovery_v3_Resource_set_resource(envoy_service_discovery_v3_Resource *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Any*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_Any*) = value;
}
UPB_INLINE struct google_protobuf_Any* envoy_service_discovery_v3_Resource_mutable_resource(envoy_service_discovery_v3_Resource *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_service_discovery_v3_Resource_resource(msg);
@@ -415,31 +425,71 @@ UPB_INLINE struct google_protobuf_Any* envoy_service_discovery_v3_Resource_mutab
return sub;
}
UPB_INLINE void envoy_service_discovery_v3_Resource_set_name(envoy_service_discovery_v3_Resource *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_Resource_mutable_aliases(envoy_service_discovery_v3_Resource *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE upb_strview* envoy_service_discovery_v3_Resource_resize_aliases(envoy_service_discovery_v3_Resource *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_service_discovery_v3_Resource_add_aliases(envoy_service_discovery_v3_Resource *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(32, 64), UPB_SIZE(3, 4), &val,
arena);
}
-UPB_INLINE void envoy_service_discovery_v3_Resource_set_udpa_resource_name(envoy_service_discovery_v3_Resource *msg, struct udpa_core_v1_ResourceName* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct udpa_core_v1_ResourceName*) = value;
+UPB_INLINE void envoy_service_discovery_v3_Resource_set_ttl(envoy_service_discovery_v3_Resource *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_Duration*) = value;
+}
+UPB_INLINE struct google_protobuf_Duration* envoy_service_discovery_v3_Resource_mutable_ttl(envoy_service_discovery_v3_Resource *msg, upb_arena *arena) {
+ struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)envoy_service_discovery_v3_Resource_ttl(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_discovery_v3_Resource_set_ttl(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_service_discovery_v3_Resource_set_cache_control(envoy_service_discovery_v3_Resource *msg, envoy_service_discovery_v3_Resource_CacheControl* value) {
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), envoy_service_discovery_v3_Resource_CacheControl*) = value;
}
-UPB_INLINE struct udpa_core_v1_ResourceName* envoy_service_discovery_v3_Resource_mutable_udpa_resource_name(envoy_service_discovery_v3_Resource *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceName* sub = (struct udpa_core_v1_ResourceName*)envoy_service_discovery_v3_Resource_udpa_resource_name(msg);
+UPB_INLINE struct envoy_service_discovery_v3_Resource_CacheControl* envoy_service_discovery_v3_Resource_mutable_cache_control(envoy_service_discovery_v3_Resource *msg, upb_arena *arena) {
+ struct envoy_service_discovery_v3_Resource_CacheControl* sub = (struct envoy_service_discovery_v3_Resource_CacheControl*)envoy_service_discovery_v3_Resource_cache_control(msg);
if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceName*)_upb_msg_new(&udpa_core_v1_ResourceName_msginit, arena);
+ sub = (struct envoy_service_discovery_v3_Resource_CacheControl*)_upb_msg_new(&envoy_service_discovery_v3_Resource_CacheControl_msginit, arena);
if (!sub) return NULL;
- envoy_service_discovery_v3_Resource_set_udpa_resource_name(msg, sub);
+ envoy_service_discovery_v3_Resource_set_cache_control(msg, sub);
}
return sub;
}
+/* envoy.service.discovery.v3.Resource.CacheControl */
+
+UPB_INLINE envoy_service_discovery_v3_Resource_CacheControl *envoy_service_discovery_v3_Resource_CacheControl_new(upb_arena *arena) {
+ return (envoy_service_discovery_v3_Resource_CacheControl *)_upb_msg_new(&envoy_service_discovery_v3_Resource_CacheControl_msginit, arena);
+}
+UPB_INLINE envoy_service_discovery_v3_Resource_CacheControl *envoy_service_discovery_v3_Resource_CacheControl_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_service_discovery_v3_Resource_CacheControl *ret = envoy_service_discovery_v3_Resource_CacheControl_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_service_discovery_v3_Resource_CacheControl_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_service_discovery_v3_Resource_CacheControl *envoy_service_discovery_v3_Resource_CacheControl_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_discovery_v3_Resource_CacheControl *ret = envoy_service_discovery_v3_Resource_CacheControl_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_discovery_v3_Resource_CacheControl_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_service_discovery_v3_Resource_CacheControl_serialize(const envoy_service_discovery_v3_Resource_CacheControl *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_service_discovery_v3_Resource_CacheControl_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_service_discovery_v3_Resource_CacheControl_do_not_cache(const envoy_service_discovery_v3_Resource_CacheControl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+
+UPB_INLINE void envoy_service_discovery_v3_Resource_CacheControl_set_do_not_cache(envoy_service_discovery_v3_Resource_CacheControl *msg, bool value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+}
+
#ifdef __cplusplus
} /* extern "C" */
#endif
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c
index 3006037b8be..0af0480487f 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.c
@@ -11,19 +11,16 @@
#include "envoy/service/endpoint/v3/eds.upb.h"
#include "envoy/service/discovery/v3/discovery.upb.h"
#include "google/api/annotations.upb.h"
-#include "google/protobuf/duration.upb.h"
-#include "google/protobuf/wrappers.upb.h"
#include "envoy/annotations/resource.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
-#include "validate/validate.upb.h"
#include "upb/port_def.inc"
const upb_msglayout envoy_service_endpoint_v3_EdsDummy_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h
index f9c36a0707a..1b1fd3d0a17 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_service_endpoint_v3_EdsDummy *envoy_service_endpoint_v3_EdsDumm
envoy_service_endpoint_v3_EdsDummy *ret = envoy_service_endpoint_v3_EdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_endpoint_v3_EdsDummy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_endpoint_v3_EdsDummy *envoy_service_endpoint_v3_EdsDummy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_endpoint_v3_EdsDummy *ret = envoy_service_endpoint_v3_EdsDummy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_endpoint_v3_EdsDummy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_endpoint_v3_EdsDummy_serialize(const envoy_service_endpoint_v3_EdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_endpoint_v3_EdsDummy_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c
index a0f7024331e..404bfa414ff 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.c
@@ -11,19 +11,16 @@
#include "envoy/service/listener/v3/lds.upb.h"
#include "envoy/service/discovery/v3/discovery.upb.h"
#include "google/api/annotations.upb.h"
-#include "google/protobuf/duration.upb.h"
-#include "google/protobuf/wrappers.upb.h"
#include "envoy/annotations/resource.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
-#include "validate/validate.upb.h"
#include "upb/port_def.inc"
const upb_msglayout envoy_service_listener_v3_LdsDummy_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h
index c427dc3d338..9b8988c1adf 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_service_listener_v3_LdsDummy *envoy_service_listener_v3_LdsDumm
envoy_service_listener_v3_LdsDummy *ret = envoy_service_listener_v3_LdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_listener_v3_LdsDummy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_listener_v3_LdsDummy *envoy_service_listener_v3_LdsDummy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_listener_v3_LdsDummy *ret = envoy_service_listener_v3_LdsDummy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_listener_v3_LdsDummy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_listener_v3_LdsDummy_serialize(const envoy_service_listener_v3_LdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_listener_v3_LdsDummy_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c
index 0b084142920..68fe078f090 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c
@@ -14,7 +14,6 @@
#include "google/protobuf/duration.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
-#include "validate/validate.upb.h"
#include "upb/port_def.inc"
@@ -24,14 +23,14 @@ static const upb_msglayout *const envoy_service_load_stats_v3_LoadStatsRequest_s
};
static const upb_msglayout_field envoy_service_load_stats_v3_LoadStatsRequest__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 1, 11, 3},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 1, 11, 3},
};
const upb_msglayout envoy_service_load_stats_v3_LoadStatsRequest_msginit = {
&envoy_service_load_stats_v3_LoadStatsRequest_submsgs[0],
&envoy_service_load_stats_v3_LoadStatsRequest__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const envoy_service_load_stats_v3_LoadStatsResponse_submsgs[1] = {
@@ -40,15 +39,15 @@ static const upb_msglayout *const envoy_service_load_stats_v3_LoadStatsResponse_
static const upb_msglayout_field envoy_service_load_stats_v3_LoadStatsResponse__fields[4] = {
{1, UPB_SIZE(8, 16), 0, 0, 9, 3},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
- {4, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {2, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
+ {4, UPB_SIZE(2, 2), 0, 0, 8, 1},
};
const upb_msglayout envoy_service_load_stats_v3_LoadStatsResponse_msginit = {
&envoy_service_load_stats_v3_LoadStatsResponse_submsgs[0],
&envoy_service_load_stats_v3_LoadStatsResponse__fields[0],
- UPB_SIZE(12, 24), 4, false,
+ UPB_SIZE(16, 24), 4, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h
index 0ec4da5c363..f74a023120a 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -43,17 +44,24 @@ UPB_INLINE envoy_service_load_stats_v3_LoadStatsRequest *envoy_service_load_stat
envoy_service_load_stats_v3_LoadStatsRequest *ret = envoy_service_load_stats_v3_LoadStatsRequest_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsRequest_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_load_stats_v3_LoadStatsRequest *envoy_service_load_stats_v3_LoadStatsRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_load_stats_v3_LoadStatsRequest *ret = envoy_service_load_stats_v3_LoadStatsRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsRequest_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_load_stats_v3_LoadStatsRequest_serialize(const envoy_service_load_stats_v3_LoadStatsRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_load_stats_v3_LoadStatsRequest_msginit, arena, len);
}
-UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_load_stats_v3_LoadStatsRequest_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct envoy_config_core_v3_Node*); }
-UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct envoy_config_endpoint_v3_ClusterStats* const* envoy_service_load_stats_v3_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t *len) { return (const struct envoy_config_endpoint_v3_ClusterStats* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_load_stats_v3_LoadStatsRequest_node(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_Node*); }
+UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsRequest_has_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_config_endpoint_v3_ClusterStats* const* envoy_service_load_stats_v3_LoadStatsRequest_cluster_stats(const envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t *len) { return (const struct envoy_config_endpoint_v3_ClusterStats* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsRequest_set_node(envoy_service_load_stats_v3_LoadStatsRequest *msg, struct envoy_config_core_v3_Node* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct envoy_config_core_v3_Node*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_Node*) = value;
}
UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_load_stats_v3_LoadStatsRequest_mutable_node(envoy_service_load_stats_v3_LoadStatsRequest *msg, upb_arena *arena) {
struct envoy_config_core_v3_Node* sub = (struct envoy_config_core_v3_Node*)envoy_service_load_stats_v3_LoadStatsRequest_node(msg);
@@ -65,15 +73,15 @@ UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_load_stats_v3_LoadSta
return sub;
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats** envoy_service_load_stats_v3_LoadStatsRequest_mutable_cluster_stats(envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t *len) {
- return (struct envoy_config_endpoint_v3_ClusterStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+ return (struct envoy_config_endpoint_v3_ClusterStats**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats** envoy_service_load_stats_v3_LoadStatsRequest_resize_cluster_stats(envoy_service_load_stats_v3_LoadStatsRequest *msg, size_t len, upb_arena *arena) {
- return (struct envoy_config_endpoint_v3_ClusterStats**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (struct envoy_config_endpoint_v3_ClusterStats**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_endpoint_v3_ClusterStats* envoy_service_load_stats_v3_LoadStatsRequest_add_cluster_stats(envoy_service_load_stats_v3_LoadStatsRequest *msg, upb_arena *arena) {
struct envoy_config_endpoint_v3_ClusterStats* sub = (struct envoy_config_endpoint_v3_ClusterStats*)_upb_msg_new(&envoy_config_endpoint_v3_ClusterStats_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -88,27 +96,34 @@ UPB_INLINE envoy_service_load_stats_v3_LoadStatsResponse *envoy_service_load_sta
envoy_service_load_stats_v3_LoadStatsResponse *ret = envoy_service_load_stats_v3_LoadStatsResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_load_stats_v3_LoadStatsResponse *envoy_service_load_stats_v3_LoadStatsResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_load_stats_v3_LoadStatsResponse *ret = envoy_service_load_stats_v3_LoadStatsResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_load_stats_v3_LoadStatsResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_load_stats_v3_LoadStatsResponse_serialize(const envoy_service_load_stats_v3_LoadStatsResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_load_stats_v3_LoadStatsResponse_msginit, arena, len);
}
UPB_INLINE upb_strview const* envoy_service_load_stats_v3_LoadStatsResponse_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
-UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_has_load_reporting_interval(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
+UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_has_load_reporting_interval(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct google_protobuf_Duration* envoy_service_load_stats_v3_LoadStatsResponse_load_reporting_interval(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Duration*); }
-UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
-UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_send_all_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_report_endpoint_granularity(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
+UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_send_all_clusters(const envoy_service_load_stats_v3_LoadStatsResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
UPB_INLINE upb_strview* envoy_service_load_stats_v3_LoadStatsResponse_mutable_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE upb_strview* envoy_service_load_stats_v3_LoadStatsResponse_resize_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_service_load_stats_v3_LoadStatsResponse_add_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsResponse_set_load_reporting_interval(envoy_service_load_stats_v3_LoadStatsResponse *msg, struct google_protobuf_Duration* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* envoy_service_load_stats_v3_LoadStatsResponse_mutable_load_reporting_interval(envoy_service_load_stats_v3_LoadStatsResponse *msg, upb_arena *arena) {
@@ -121,10 +136,10 @@ UPB_INLINE struct google_protobuf_Duration* envoy_service_load_stats_v3_LoadStat
return sub;
}
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsResponse_set_report_endpoint_granularity(envoy_service_load_stats_v3_LoadStatsResponse *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void envoy_service_load_stats_v3_LoadStatsResponse_set_send_all_clusters(envoy_service_load_stats_v3_LoadStatsResponse *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c
index 56e83f9ba9f..07d17f61278 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c
@@ -11,18 +11,16 @@
#include "envoy/service/route/v3/rds.upb.h"
#include "envoy/service/discovery/v3/discovery.upb.h"
#include "google/api/annotations.upb.h"
-#include "google/protobuf/wrappers.upb.h"
#include "envoy/annotations/resource.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
-#include "validate/validate.upb.h"
#include "upb/port_def.inc"
const upb_msglayout envoy_service_route_v3_RdsDummy_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h
index c7e4fa421dd..40a6d42563f 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_service_route_v3_RdsDummy *envoy_service_route_v3_RdsDummy_pars
envoy_service_route_v3_RdsDummy *ret = envoy_service_route_v3_RdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_route_v3_RdsDummy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_route_v3_RdsDummy *envoy_service_route_v3_RdsDummy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_route_v3_RdsDummy *ret = envoy_service_route_v3_RdsDummy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_route_v3_RdsDummy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_route_v3_RdsDummy_serialize(const envoy_service_route_v3_RdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_route_v3_RdsDummy_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c
index 12145377c64..6dbaa817c95 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c
@@ -20,7 +20,7 @@
const upb_msglayout envoy_service_route_v3_SrdsDummy_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h
index 504cffc9a5b..e86154b742e 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_service_route_v3_SrdsDummy *envoy_service_route_v3_SrdsDummy_pa
envoy_service_route_v3_SrdsDummy *ret = envoy_service_route_v3_SrdsDummy_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_service_route_v3_SrdsDummy_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_service_route_v3_SrdsDummy *envoy_service_route_v3_SrdsDummy_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_route_v3_SrdsDummy *ret = envoy_service_route_v3_SrdsDummy_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_route_v3_SrdsDummy_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_service_route_v3_SrdsDummy_serialize(const envoy_service_route_v3_SrdsDummy *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_service_route_v3_SrdsDummy_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c
new file mode 100644
index 00000000000..40e086cba51
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c
@@ -0,0 +1,93 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/status/v3/csds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/service/status/v3/csds.upb.h"
+#include "envoy/admin/v3/config_dump.upb.h"
+#include "envoy/config/core/v3/base.upb.h"
+#include "envoy/type/matcher/v3/node.upb.h"
+#include "google/api/annotations.upb.h"
+#include "udpa/annotations/migrate.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_service_status_v3_ClientStatusRequest_submsgs[2] = {
+ &envoy_config_core_v3_Node_msginit,
+ &envoy_type_matcher_v3_NodeMatcher_msginit,
+};
+
+static const upb_msglayout_field envoy_service_status_v3_ClientStatusRequest__fields[2] = {
+ {1, UPB_SIZE(8, 16), 0, 1, 11, 3},
+ {2, UPB_SIZE(4, 8), 1, 0, 11, 1},
+};
+
+const upb_msglayout envoy_service_status_v3_ClientStatusRequest_msginit = {
+ &envoy_service_status_v3_ClientStatusRequest_submsgs[0],
+ &envoy_service_status_v3_ClientStatusRequest__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_service_status_v3_PerXdsConfig_submsgs[5] = {
+ &envoy_admin_v3_ClustersConfigDump_msginit,
+ &envoy_admin_v3_EndpointsConfigDump_msginit,
+ &envoy_admin_v3_ListenersConfigDump_msginit,
+ &envoy_admin_v3_RoutesConfigDump_msginit,
+ &envoy_admin_v3_ScopedRoutesConfigDump_msginit,
+};
+
+static const upb_msglayout_field envoy_service_status_v3_PerXdsConfig__fields[7] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {2, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 2, 11, 1},
+ {3, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 0, 11, 1},
+ {4, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 3, 11, 1},
+ {5, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 4, 11, 1},
+ {6, UPB_SIZE(8, 8), UPB_SIZE(-13, -17), 1, 11, 1},
+ {7, UPB_SIZE(4, 4), 0, 0, 14, 1},
+};
+
+const upb_msglayout envoy_service_status_v3_PerXdsConfig_msginit = {
+ &envoy_service_status_v3_PerXdsConfig_submsgs[0],
+ &envoy_service_status_v3_PerXdsConfig__fields[0],
+ UPB_SIZE(16, 24), 7, false, 255,
+};
+
+static const upb_msglayout *const envoy_service_status_v3_ClientConfig_submsgs[2] = {
+ &envoy_config_core_v3_Node_msginit,
+ &envoy_service_status_v3_PerXdsConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_service_status_v3_ClientConfig__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 1, 11, 3},
+};
+
+const upb_msglayout envoy_service_status_v3_ClientConfig_msginit = {
+ &envoy_service_status_v3_ClientConfig_submsgs[0],
+ &envoy_service_status_v3_ClientConfig__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout *const envoy_service_status_v3_ClientStatusResponse_submsgs[1] = {
+ &envoy_service_status_v3_ClientConfig_msginit,
+};
+
+static const upb_msglayout_field envoy_service_status_v3_ClientStatusResponse__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 11, 3},
+};
+
+const upb_msglayout envoy_service_status_v3_ClientStatusResponse_msginit = {
+ &envoy_service_status_v3_ClientStatusResponse_submsgs[0],
+ &envoy_service_status_v3_ClientStatusResponse__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h
new file mode 100644
index 00000000000..87f807cdf1a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h
@@ -0,0 +1,323 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/status/v3/csds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_STATUS_V3_CSDS_PROTO_UPB_H_
+#define ENVOY_SERVICE_STATUS_V3_CSDS_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_service_status_v3_ClientStatusRequest;
+struct envoy_service_status_v3_PerXdsConfig;
+struct envoy_service_status_v3_ClientConfig;
+struct envoy_service_status_v3_ClientStatusResponse;
+typedef struct envoy_service_status_v3_ClientStatusRequest envoy_service_status_v3_ClientStatusRequest;
+typedef struct envoy_service_status_v3_PerXdsConfig envoy_service_status_v3_PerXdsConfig;
+typedef struct envoy_service_status_v3_ClientConfig envoy_service_status_v3_ClientConfig;
+typedef struct envoy_service_status_v3_ClientStatusResponse envoy_service_status_v3_ClientStatusResponse;
+extern const upb_msglayout envoy_service_status_v3_ClientStatusRequest_msginit;
+extern const upb_msglayout envoy_service_status_v3_PerXdsConfig_msginit;
+extern const upb_msglayout envoy_service_status_v3_ClientConfig_msginit;
+extern const upb_msglayout envoy_service_status_v3_ClientStatusResponse_msginit;
+struct envoy_admin_v3_ClustersConfigDump;
+struct envoy_admin_v3_EndpointsConfigDump;
+struct envoy_admin_v3_ListenersConfigDump;
+struct envoy_admin_v3_RoutesConfigDump;
+struct envoy_admin_v3_ScopedRoutesConfigDump;
+struct envoy_config_core_v3_Node;
+struct envoy_type_matcher_v3_NodeMatcher;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_msginit;
+extern const upb_msglayout envoy_config_core_v3_Node_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_NodeMatcher_msginit;
+
+typedef enum {
+ envoy_service_status_v3_CLIENT_UNKNOWN = 0,
+ envoy_service_status_v3_CLIENT_REQUESTED = 1,
+ envoy_service_status_v3_CLIENT_ACKED = 2,
+ envoy_service_status_v3_CLIENT_NACKED = 3
+} envoy_service_status_v3_ClientConfigStatus;
+
+typedef enum {
+ envoy_service_status_v3_UNKNOWN = 0,
+ envoy_service_status_v3_SYNCED = 1,
+ envoy_service_status_v3_NOT_SENT = 2,
+ envoy_service_status_v3_STALE = 3,
+ envoy_service_status_v3_ERROR = 4
+} envoy_service_status_v3_ConfigStatus;
+
+
+/* envoy.service.status.v3.ClientStatusRequest */
+
+UPB_INLINE envoy_service_status_v3_ClientStatusRequest *envoy_service_status_v3_ClientStatusRequest_new(upb_arena *arena) {
+ return (envoy_service_status_v3_ClientStatusRequest *)_upb_msg_new(&envoy_service_status_v3_ClientStatusRequest_msginit, arena);
+}
+UPB_INLINE envoy_service_status_v3_ClientStatusRequest *envoy_service_status_v3_ClientStatusRequest_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_service_status_v3_ClientStatusRequest *ret = envoy_service_status_v3_ClientStatusRequest_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_service_status_v3_ClientStatusRequest_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_service_status_v3_ClientStatusRequest *envoy_service_status_v3_ClientStatusRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_status_v3_ClientStatusRequest *ret = envoy_service_status_v3_ClientStatusRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_status_v3_ClientStatusRequest_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_service_status_v3_ClientStatusRequest_serialize(const envoy_service_status_v3_ClientStatusRequest *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_service_status_v3_ClientStatusRequest_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_service_status_v3_ClientStatusRequest_has_node_matchers(const envoy_service_status_v3_ClientStatusRequest *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_type_matcher_v3_NodeMatcher* const* envoy_service_status_v3_ClientStatusRequest_node_matchers(const envoy_service_status_v3_ClientStatusRequest *msg, size_t *len) { return (const struct envoy_type_matcher_v3_NodeMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_service_status_v3_ClientStatusRequest_has_node(const envoy_service_status_v3_ClientStatusRequest *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_status_v3_ClientStatusRequest_node(const envoy_service_status_v3_ClientStatusRequest *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_Node*); }
+
+UPB_INLINE struct envoy_type_matcher_v3_NodeMatcher** envoy_service_status_v3_ClientStatusRequest_mutable_node_matchers(envoy_service_status_v3_ClientStatusRequest *msg, size_t *len) {
+ return (struct envoy_type_matcher_v3_NodeMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE struct envoy_type_matcher_v3_NodeMatcher** envoy_service_status_v3_ClientStatusRequest_resize_node_matchers(envoy_service_status_v3_ClientStatusRequest *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_type_matcher_v3_NodeMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_type_matcher_v3_NodeMatcher* envoy_service_status_v3_ClientStatusRequest_add_node_matchers(envoy_service_status_v3_ClientStatusRequest *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_NodeMatcher* sub = (struct envoy_type_matcher_v3_NodeMatcher*)_upb_msg_new(&envoy_type_matcher_v3_NodeMatcher_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 void envoy_service_status_v3_ClientStatusRequest_set_node(envoy_service_status_v3_ClientStatusRequest *msg, struct envoy_config_core_v3_Node* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_Node*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_status_v3_ClientStatusRequest_mutable_node(envoy_service_status_v3_ClientStatusRequest *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_Node* sub = (struct envoy_config_core_v3_Node*)envoy_service_status_v3_ClientStatusRequest_node(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_Node*)_upb_msg_new(&envoy_config_core_v3_Node_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_ClientStatusRequest_set_node(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.service.status.v3.PerXdsConfig */
+
+UPB_INLINE envoy_service_status_v3_PerXdsConfig *envoy_service_status_v3_PerXdsConfig_new(upb_arena *arena) {
+ return (envoy_service_status_v3_PerXdsConfig *)_upb_msg_new(&envoy_service_status_v3_PerXdsConfig_msginit, arena);
+}
+UPB_INLINE envoy_service_status_v3_PerXdsConfig *envoy_service_status_v3_PerXdsConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_service_status_v3_PerXdsConfig *ret = envoy_service_status_v3_PerXdsConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_service_status_v3_PerXdsConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_service_status_v3_PerXdsConfig *envoy_service_status_v3_PerXdsConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_status_v3_PerXdsConfig *ret = envoy_service_status_v3_PerXdsConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_status_v3_PerXdsConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_service_status_v3_PerXdsConfig_serialize(const envoy_service_status_v3_PerXdsConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_service_status_v3_PerXdsConfig_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_service_status_v3_PerXdsConfig_per_xds_config_listener_config = 2,
+ envoy_service_status_v3_PerXdsConfig_per_xds_config_cluster_config = 3,
+ envoy_service_status_v3_PerXdsConfig_per_xds_config_route_config = 4,
+ envoy_service_status_v3_PerXdsConfig_per_xds_config_scoped_route_config = 5,
+ envoy_service_status_v3_PerXdsConfig_per_xds_config_endpoint_config = 6,
+ envoy_service_status_v3_PerXdsConfig_per_xds_config_NOT_SET = 0
+} envoy_service_status_v3_PerXdsConfig_per_xds_config_oneofcases;
+UPB_INLINE envoy_service_status_v3_PerXdsConfig_per_xds_config_oneofcases envoy_service_status_v3_PerXdsConfig_per_xds_config_case(const envoy_service_status_v3_PerXdsConfig* msg) { return (envoy_service_status_v3_PerXdsConfig_per_xds_config_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(12, 16), int32_t); }
+
+UPB_INLINE int32_t envoy_service_status_v3_PerXdsConfig_status(const envoy_service_status_v3_PerXdsConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE bool envoy_service_status_v3_PerXdsConfig_has_listener_config(const envoy_service_status_v3_PerXdsConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 2; }
+UPB_INLINE const struct envoy_admin_v3_ListenersConfigDump* envoy_service_status_v3_PerXdsConfig_listener_config(const envoy_service_status_v3_PerXdsConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_admin_v3_ListenersConfigDump*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 2, NULL); }
+UPB_INLINE bool envoy_service_status_v3_PerXdsConfig_has_cluster_config(const envoy_service_status_v3_PerXdsConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 3; }
+UPB_INLINE const struct envoy_admin_v3_ClustersConfigDump* envoy_service_status_v3_PerXdsConfig_cluster_config(const envoy_service_status_v3_PerXdsConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_admin_v3_ClustersConfigDump*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 3, NULL); }
+UPB_INLINE bool envoy_service_status_v3_PerXdsConfig_has_route_config(const envoy_service_status_v3_PerXdsConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 4; }
+UPB_INLINE const struct envoy_admin_v3_RoutesConfigDump* envoy_service_status_v3_PerXdsConfig_route_config(const envoy_service_status_v3_PerXdsConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_admin_v3_RoutesConfigDump*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 4, NULL); }
+UPB_INLINE bool envoy_service_status_v3_PerXdsConfig_has_scoped_route_config(const envoy_service_status_v3_PerXdsConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 5; }
+UPB_INLINE const struct envoy_admin_v3_ScopedRoutesConfigDump* envoy_service_status_v3_PerXdsConfig_scoped_route_config(const envoy_service_status_v3_PerXdsConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_admin_v3_ScopedRoutesConfigDump*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 5, NULL); }
+UPB_INLINE bool envoy_service_status_v3_PerXdsConfig_has_endpoint_config(const envoy_service_status_v3_PerXdsConfig *msg) { return _upb_getoneofcase(msg, UPB_SIZE(12, 16)) == 6; }
+UPB_INLINE const struct envoy_admin_v3_EndpointsConfigDump* envoy_service_status_v3_PerXdsConfig_endpoint_config(const envoy_service_status_v3_PerXdsConfig *msg) { return UPB_READ_ONEOF(msg, const struct envoy_admin_v3_EndpointsConfigDump*, UPB_SIZE(8, 8), UPB_SIZE(12, 16), 6, NULL); }
+UPB_INLINE int32_t envoy_service_status_v3_PerXdsConfig_client_status(const envoy_service_status_v3_PerXdsConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_status(envoy_service_status_v3_PerXdsConfig *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+}
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_listener_config(envoy_service_status_v3_PerXdsConfig *msg, struct envoy_admin_v3_ListenersConfigDump* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_admin_v3_ListenersConfigDump*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 2);
+}
+UPB_INLINE struct envoy_admin_v3_ListenersConfigDump* envoy_service_status_v3_PerXdsConfig_mutable_listener_config(envoy_service_status_v3_PerXdsConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ListenersConfigDump* sub = (struct envoy_admin_v3_ListenersConfigDump*)envoy_service_status_v3_PerXdsConfig_listener_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_ListenersConfigDump*)_upb_msg_new(&envoy_admin_v3_ListenersConfigDump_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_PerXdsConfig_set_listener_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_cluster_config(envoy_service_status_v3_PerXdsConfig *msg, struct envoy_admin_v3_ClustersConfigDump* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_admin_v3_ClustersConfigDump*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 3);
+}
+UPB_INLINE struct envoy_admin_v3_ClustersConfigDump* envoy_service_status_v3_PerXdsConfig_mutable_cluster_config(envoy_service_status_v3_PerXdsConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ClustersConfigDump* sub = (struct envoy_admin_v3_ClustersConfigDump*)envoy_service_status_v3_PerXdsConfig_cluster_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_ClustersConfigDump*)_upb_msg_new(&envoy_admin_v3_ClustersConfigDump_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_PerXdsConfig_set_cluster_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_route_config(envoy_service_status_v3_PerXdsConfig *msg, struct envoy_admin_v3_RoutesConfigDump* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_admin_v3_RoutesConfigDump*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 4);
+}
+UPB_INLINE struct envoy_admin_v3_RoutesConfigDump* envoy_service_status_v3_PerXdsConfig_mutable_route_config(envoy_service_status_v3_PerXdsConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_RoutesConfigDump* sub = (struct envoy_admin_v3_RoutesConfigDump*)envoy_service_status_v3_PerXdsConfig_route_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_RoutesConfigDump*)_upb_msg_new(&envoy_admin_v3_RoutesConfigDump_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_PerXdsConfig_set_route_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_scoped_route_config(envoy_service_status_v3_PerXdsConfig *msg, struct envoy_admin_v3_ScopedRoutesConfigDump* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_admin_v3_ScopedRoutesConfigDump*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 5);
+}
+UPB_INLINE struct envoy_admin_v3_ScopedRoutesConfigDump* envoy_service_status_v3_PerXdsConfig_mutable_scoped_route_config(envoy_service_status_v3_PerXdsConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_ScopedRoutesConfigDump* sub = (struct envoy_admin_v3_ScopedRoutesConfigDump*)envoy_service_status_v3_PerXdsConfig_scoped_route_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_ScopedRoutesConfigDump*)_upb_msg_new(&envoy_admin_v3_ScopedRoutesConfigDump_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_PerXdsConfig_set_scoped_route_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_endpoint_config(envoy_service_status_v3_PerXdsConfig *msg, struct envoy_admin_v3_EndpointsConfigDump* value) {
+ UPB_WRITE_ONEOF(msg, struct envoy_admin_v3_EndpointsConfigDump*, UPB_SIZE(8, 8), value, UPB_SIZE(12, 16), 6);
+}
+UPB_INLINE struct envoy_admin_v3_EndpointsConfigDump* envoy_service_status_v3_PerXdsConfig_mutable_endpoint_config(envoy_service_status_v3_PerXdsConfig *msg, upb_arena *arena) {
+ struct envoy_admin_v3_EndpointsConfigDump* sub = (struct envoy_admin_v3_EndpointsConfigDump*)envoy_service_status_v3_PerXdsConfig_endpoint_config(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_admin_v3_EndpointsConfigDump*)_upb_msg_new(&envoy_admin_v3_EndpointsConfigDump_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_PerXdsConfig_set_endpoint_config(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void envoy_service_status_v3_PerXdsConfig_set_client_status(envoy_service_status_v3_PerXdsConfig *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
+}
+
+/* envoy.service.status.v3.ClientConfig */
+
+UPB_INLINE envoy_service_status_v3_ClientConfig *envoy_service_status_v3_ClientConfig_new(upb_arena *arena) {
+ return (envoy_service_status_v3_ClientConfig *)_upb_msg_new(&envoy_service_status_v3_ClientConfig_msginit, arena);
+}
+UPB_INLINE envoy_service_status_v3_ClientConfig *envoy_service_status_v3_ClientConfig_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_service_status_v3_ClientConfig *ret = envoy_service_status_v3_ClientConfig_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_service_status_v3_ClientConfig_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_service_status_v3_ClientConfig *envoy_service_status_v3_ClientConfig_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_status_v3_ClientConfig *ret = envoy_service_status_v3_ClientConfig_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_status_v3_ClientConfig_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_service_status_v3_ClientConfig_serialize(const envoy_service_status_v3_ClientConfig *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_service_status_v3_ClientConfig_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_service_status_v3_ClientConfig_has_node(const envoy_service_status_v3_ClientConfig *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_config_core_v3_Node* envoy_service_status_v3_ClientConfig_node(const envoy_service_status_v3_ClientConfig *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_Node*); }
+UPB_INLINE bool envoy_service_status_v3_ClientConfig_has_xds_config(const envoy_service_status_v3_ClientConfig *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_service_status_v3_PerXdsConfig* const* envoy_service_status_v3_ClientConfig_xds_config(const envoy_service_status_v3_ClientConfig *msg, size_t *len) { return (const envoy_service_status_v3_PerXdsConfig* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+
+UPB_INLINE void envoy_service_status_v3_ClientConfig_set_node(envoy_service_status_v3_ClientConfig *msg, struct envoy_config_core_v3_Node* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_Node*) = value;
+}
+UPB_INLINE struct envoy_config_core_v3_Node* envoy_service_status_v3_ClientConfig_mutable_node(envoy_service_status_v3_ClientConfig *msg, upb_arena *arena) {
+ struct envoy_config_core_v3_Node* sub = (struct envoy_config_core_v3_Node*)envoy_service_status_v3_ClientConfig_node(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_config_core_v3_Node*)_upb_msg_new(&envoy_config_core_v3_Node_msginit, arena);
+ if (!sub) return NULL;
+ envoy_service_status_v3_ClientConfig_set_node(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE envoy_service_status_v3_PerXdsConfig** envoy_service_status_v3_ClientConfig_mutable_xds_config(envoy_service_status_v3_ClientConfig *msg, size_t *len) {
+ return (envoy_service_status_v3_PerXdsConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE envoy_service_status_v3_PerXdsConfig** envoy_service_status_v3_ClientConfig_resize_xds_config(envoy_service_status_v3_ClientConfig *msg, size_t len, upb_arena *arena) {
+ return (envoy_service_status_v3_PerXdsConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_service_status_v3_PerXdsConfig* envoy_service_status_v3_ClientConfig_add_xds_config(envoy_service_status_v3_ClientConfig *msg, upb_arena *arena) {
+ struct envoy_service_status_v3_PerXdsConfig* sub = (struct envoy_service_status_v3_PerXdsConfig*)_upb_msg_new(&envoy_service_status_v3_PerXdsConfig_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;
+}
+
+/* envoy.service.status.v3.ClientStatusResponse */
+
+UPB_INLINE envoy_service_status_v3_ClientStatusResponse *envoy_service_status_v3_ClientStatusResponse_new(upb_arena *arena) {
+ return (envoy_service_status_v3_ClientStatusResponse *)_upb_msg_new(&envoy_service_status_v3_ClientStatusResponse_msginit, arena);
+}
+UPB_INLINE envoy_service_status_v3_ClientStatusResponse *envoy_service_status_v3_ClientStatusResponse_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_service_status_v3_ClientStatusResponse *ret = envoy_service_status_v3_ClientStatusResponse_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_service_status_v3_ClientStatusResponse_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_service_status_v3_ClientStatusResponse *envoy_service_status_v3_ClientStatusResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_service_status_v3_ClientStatusResponse *ret = envoy_service_status_v3_ClientStatusResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_service_status_v3_ClientStatusResponse_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_service_status_v3_ClientStatusResponse_serialize(const envoy_service_status_v3_ClientStatusResponse *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_service_status_v3_ClientStatusResponse_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_service_status_v3_ClientStatusResponse_has_config(const envoy_service_status_v3_ClientStatusResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE const envoy_service_status_v3_ClientConfig* const* envoy_service_status_v3_ClientStatusResponse_config(const envoy_service_status_v3_ClientStatusResponse *msg, size_t *len) { return (const envoy_service_status_v3_ClientConfig* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }
+
+UPB_INLINE envoy_service_status_v3_ClientConfig** envoy_service_status_v3_ClientStatusResponse_mutable_config(envoy_service_status_v3_ClientStatusResponse *msg, size_t *len) {
+ return (envoy_service_status_v3_ClientConfig**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
+}
+UPB_INLINE envoy_service_status_v3_ClientConfig** envoy_service_status_v3_ClientStatusResponse_resize_config(envoy_service_status_v3_ClientStatusResponse *msg, size_t len, upb_arena *arena) {
+ return (envoy_service_status_v3_ClientConfig**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_service_status_v3_ClientConfig* envoy_service_status_v3_ClientStatusResponse_add_config(envoy_service_status_v3_ClientStatusResponse *msg, upb_arena *arena) {
+ struct envoy_service_status_v3_ClientConfig* sub = (struct envoy_service_status_v3_ClientConfig*)_upb_msg_new(&envoy_service_status_v3_ClientConfig_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_STATUS_V3_CSDS_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c
index e5e4720354a..7fdf5b9fea7 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c
@@ -22,15 +22,15 @@ static const upb_msglayout *const envoy_type_matcher_v3_MetadataMatcher_submsgs[
};
static const upb_msglayout_field envoy_type_matcher_v3_MetadataMatcher__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(12, 24), 0, 0, 11, 3},
- {3, UPB_SIZE(8, 16), 0, 1, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(16, 32), 0, 0, 11, 3},
+ {3, UPB_SIZE(12, 24), 1, 1, 11, 1},
};
const upb_msglayout envoy_type_matcher_v3_MetadataMatcher_msginit = {
&envoy_type_matcher_v3_MetadataMatcher_submsgs[0],
&envoy_type_matcher_v3_MetadataMatcher__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout_field envoy_type_matcher_v3_MetadataMatcher_PathSegment__fields[1] = {
@@ -40,7 +40,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_MetadataMatcher_PathSegme
const upb_msglayout envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit = {
NULL,
&envoy_type_matcher_v3_MetadataMatcher_PathSegment__fields[0],
- UPB_SIZE(16, 32), 1, false,
+ UPB_SIZE(16, 32), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h
index 71111fff169..a7f17c14488 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -39,34 +40,41 @@ UPB_INLINE envoy_type_matcher_v3_MetadataMatcher *envoy_type_matcher_v3_Metadata
envoy_type_matcher_v3_MetadataMatcher *ret = envoy_type_matcher_v3_MetadataMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_MetadataMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_MetadataMatcher *envoy_type_matcher_v3_MetadataMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_MetadataMatcher *ret = envoy_type_matcher_v3_MetadataMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_MetadataMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_MetadataMatcher_serialize(const envoy_type_matcher_v3_MetadataMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_MetadataMatcher_msginit, arena, len);
}
-UPB_INLINE upb_strview envoy_type_matcher_v3_MetadataMatcher_filter(const envoy_type_matcher_v3_MetadataMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool envoy_type_matcher_v3_MetadataMatcher_has_path(const envoy_type_matcher_v3_MetadataMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const envoy_type_matcher_v3_MetadataMatcher_PathSegment* const* envoy_type_matcher_v3_MetadataMatcher_path(const envoy_type_matcher_v3_MetadataMatcher *msg, size_t *len) { return (const envoy_type_matcher_v3_MetadataMatcher_PathSegment* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE bool envoy_type_matcher_v3_MetadataMatcher_has_value(const envoy_type_matcher_v3_MetadataMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_matcher_v3_ValueMatcher* envoy_type_matcher_v3_MetadataMatcher_value(const envoy_type_matcher_v3_MetadataMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_matcher_v3_ValueMatcher*); }
+UPB_INLINE upb_strview envoy_type_matcher_v3_MetadataMatcher_filter(const envoy_type_matcher_v3_MetadataMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool envoy_type_matcher_v3_MetadataMatcher_has_path(const envoy_type_matcher_v3_MetadataMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const envoy_type_matcher_v3_MetadataMatcher_PathSegment* const* envoy_type_matcher_v3_MetadataMatcher_path(const envoy_type_matcher_v3_MetadataMatcher *msg, size_t *len) { return (const envoy_type_matcher_v3_MetadataMatcher_PathSegment* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool envoy_type_matcher_v3_MetadataMatcher_has_value(const envoy_type_matcher_v3_MetadataMatcher *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_ValueMatcher* envoy_type_matcher_v3_MetadataMatcher_value(const envoy_type_matcher_v3_MetadataMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_matcher_v3_ValueMatcher*); }
UPB_INLINE void envoy_type_matcher_v3_MetadataMatcher_set_filter(envoy_type_matcher_v3_MetadataMatcher *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE envoy_type_matcher_v3_MetadataMatcher_PathSegment** envoy_type_matcher_v3_MetadataMatcher_mutable_path(envoy_type_matcher_v3_MetadataMatcher *msg, size_t *len) {
- return (envoy_type_matcher_v3_MetadataMatcher_PathSegment**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (envoy_type_matcher_v3_MetadataMatcher_PathSegment**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE envoy_type_matcher_v3_MetadataMatcher_PathSegment** envoy_type_matcher_v3_MetadataMatcher_resize_path(envoy_type_matcher_v3_MetadataMatcher *msg, size_t len, upb_arena *arena) {
- return (envoy_type_matcher_v3_MetadataMatcher_PathSegment**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_type_matcher_v3_MetadataMatcher_PathSegment**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_matcher_v3_MetadataMatcher_PathSegment* envoy_type_matcher_v3_MetadataMatcher_add_path(envoy_type_matcher_v3_MetadataMatcher *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_MetadataMatcher_PathSegment* sub = (struct envoy_type_matcher_v3_MetadataMatcher_PathSegment*)_upb_msg_new(&envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void envoy_type_matcher_v3_MetadataMatcher_set_value(envoy_type_matcher_v3_MetadataMatcher *msg, struct envoy_type_matcher_v3_ValueMatcher* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_matcher_v3_ValueMatcher*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_matcher_v3_ValueMatcher*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_ValueMatcher* envoy_type_matcher_v3_MetadataMatcher_mutable_value(envoy_type_matcher_v3_MetadataMatcher *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_ValueMatcher* sub = (struct envoy_type_matcher_v3_ValueMatcher*)envoy_type_matcher_v3_MetadataMatcher_value(msg);
@@ -88,6 +96,12 @@ UPB_INLINE envoy_type_matcher_v3_MetadataMatcher_PathSegment *envoy_type_matcher
envoy_type_matcher_v3_MetadataMatcher_PathSegment *ret = envoy_type_matcher_v3_MetadataMatcher_PathSegment_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_MetadataMatcher_PathSegment *envoy_type_matcher_v3_MetadataMatcher_PathSegment_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_MetadataMatcher_PathSegment *ret = envoy_type_matcher_v3_MetadataMatcher_PathSegment_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_MetadataMatcher_PathSegment_serialize(const envoy_type_matcher_v3_MetadataMatcher_PathSegment *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c
new file mode 100644
index 00000000000..8ef51fb91ec
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c
@@ -0,0 +1,36 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/node.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/type/matcher/v3/node.upb.h"
+#include "envoy/type/matcher/v3/string.upb.h"
+#include "envoy/type/matcher/v3/struct.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_type_matcher_v3_NodeMatcher_submsgs[2] = {
+ &envoy_type_matcher_v3_StringMatcher_msginit,
+ &envoy_type_matcher_v3_StructMatcher_msginit,
+};
+
+static const upb_msglayout_field envoy_type_matcher_v3_NodeMatcher__fields[2] = {
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 1, 11, 3},
+};
+
+const upb_msglayout envoy_type_matcher_v3_NodeMatcher_msginit = {
+ &envoy_type_matcher_v3_NodeMatcher_submsgs[0],
+ &envoy_type_matcher_v3_NodeMatcher__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h
new file mode 100644
index 00000000000..94e2257fdfc
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h
@@ -0,0 +1,90 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/node.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_NODE_PROTO_UPB_H_
+#define ENVOY_TYPE_MATCHER_V3_NODE_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_type_matcher_v3_NodeMatcher;
+typedef struct envoy_type_matcher_v3_NodeMatcher envoy_type_matcher_v3_NodeMatcher;
+extern const upb_msglayout envoy_type_matcher_v3_NodeMatcher_msginit;
+struct envoy_type_matcher_v3_StringMatcher;
+struct envoy_type_matcher_v3_StructMatcher;
+extern const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_StructMatcher_msginit;
+
+
+/* envoy.type.matcher.v3.NodeMatcher */
+
+UPB_INLINE envoy_type_matcher_v3_NodeMatcher *envoy_type_matcher_v3_NodeMatcher_new(upb_arena *arena) {
+ return (envoy_type_matcher_v3_NodeMatcher *)_upb_msg_new(&envoy_type_matcher_v3_NodeMatcher_msginit, arena);
+}
+UPB_INLINE envoy_type_matcher_v3_NodeMatcher *envoy_type_matcher_v3_NodeMatcher_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_type_matcher_v3_NodeMatcher *ret = envoy_type_matcher_v3_NodeMatcher_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_NodeMatcher_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_type_matcher_v3_NodeMatcher *envoy_type_matcher_v3_NodeMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_NodeMatcher *ret = envoy_type_matcher_v3_NodeMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_NodeMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_type_matcher_v3_NodeMatcher_serialize(const envoy_type_matcher_v3_NodeMatcher *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_type_matcher_v3_NodeMatcher_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_type_matcher_v3_NodeMatcher_has_node_id(const envoy_type_matcher_v3_NodeMatcher *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_type_matcher_v3_NodeMatcher_node_id(const envoy_type_matcher_v3_NodeMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_StringMatcher*); }
+UPB_INLINE bool envoy_type_matcher_v3_NodeMatcher_has_node_metadatas(const envoy_type_matcher_v3_NodeMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const struct envoy_type_matcher_v3_StructMatcher* const* envoy_type_matcher_v3_NodeMatcher_node_metadatas(const envoy_type_matcher_v3_NodeMatcher *msg, size_t *len) { return (const struct envoy_type_matcher_v3_StructMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+
+UPB_INLINE void envoy_type_matcher_v3_NodeMatcher_set_node_id(envoy_type_matcher_v3_NodeMatcher *msg, struct envoy_type_matcher_v3_StringMatcher* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_StringMatcher*) = value;
+}
+UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_type_matcher_v3_NodeMatcher_mutable_node_id(envoy_type_matcher_v3_NodeMatcher *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_type_matcher_v3_NodeMatcher_node_id(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
+ if (!sub) return NULL;
+ envoy_type_matcher_v3_NodeMatcher_set_node_id(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE struct envoy_type_matcher_v3_StructMatcher** envoy_type_matcher_v3_NodeMatcher_mutable_node_metadatas(envoy_type_matcher_v3_NodeMatcher *msg, size_t *len) {
+ return (struct envoy_type_matcher_v3_StructMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE struct envoy_type_matcher_v3_StructMatcher** envoy_type_matcher_v3_NodeMatcher_resize_node_metadatas(envoy_type_matcher_v3_NodeMatcher *msg, size_t len, upb_arena *arena) {
+ return (struct envoy_type_matcher_v3_StructMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_type_matcher_v3_StructMatcher* envoy_type_matcher_v3_NodeMatcher_add_node_metadatas(envoy_type_matcher_v3_NodeMatcher *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_StructMatcher* sub = (struct envoy_type_matcher_v3_StructMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StructMatcher_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;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_NODE_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c
index 7d61b981580..516755b0bf7 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c
@@ -28,7 +28,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_DoubleMatcher__fields[2]
const upb_msglayout envoy_type_matcher_v3_DoubleMatcher_msginit = {
&envoy_type_matcher_v3_DoubleMatcher_submsgs[0],
&envoy_type_matcher_v3_DoubleMatcher__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h
index a6112daf90f..ebca3037aa5 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,6 +37,12 @@ UPB_INLINE envoy_type_matcher_v3_DoubleMatcher *envoy_type_matcher_v3_DoubleMatc
envoy_type_matcher_v3_DoubleMatcher *ret = envoy_type_matcher_v3_DoubleMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_DoubleMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_DoubleMatcher *envoy_type_matcher_v3_DoubleMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_DoubleMatcher *ret = envoy_type_matcher_v3_DoubleMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_DoubleMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_DoubleMatcher_serialize(const envoy_type_matcher_v3_DoubleMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_DoubleMatcher_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c
index 0f0f080f048..caef3395638 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c
@@ -27,7 +27,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_PathMatcher__fields[1] =
const upb_msglayout envoy_type_matcher_v3_PathMatcher_msginit = {
&envoy_type_matcher_v3_PathMatcher_submsgs[0],
&envoy_type_matcher_v3_PathMatcher__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h
index fb9910f9294..defbcf02640 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,6 +37,12 @@ UPB_INLINE envoy_type_matcher_v3_PathMatcher *envoy_type_matcher_v3_PathMatcher_
envoy_type_matcher_v3_PathMatcher *ret = envoy_type_matcher_v3_PathMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_PathMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_PathMatcher *envoy_type_matcher_v3_PathMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_PathMatcher *ret = envoy_type_matcher_v3_PathMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_PathMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_PathMatcher_serialize(const envoy_type_matcher_v3_PathMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_PathMatcher_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c
index ba642570812..1e4232bca08 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c
@@ -28,7 +28,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_RegexMatcher__fields[2] =
const upb_msglayout envoy_type_matcher_v3_RegexMatcher_msginit = {
&envoy_type_matcher_v3_RegexMatcher_submsgs[0],
&envoy_type_matcher_v3_RegexMatcher__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_type_matcher_v3_RegexMatcher_GoogleRE2_submsgs[1] = {
@@ -36,13 +36,13 @@ static const upb_msglayout *const envoy_type_matcher_v3_RegexMatcher_GoogleRE2_s
};
static const upb_msglayout_field envoy_type_matcher_v3_RegexMatcher_GoogleRE2__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit = {
&envoy_type_matcher_v3_RegexMatcher_GoogleRE2_submsgs[0],
&envoy_type_matcher_v3_RegexMatcher_GoogleRE2__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const envoy_type_matcher_v3_RegexMatchAndSubstitute_submsgs[1] = {
@@ -50,14 +50,14 @@ static const upb_msglayout *const envoy_type_matcher_v3_RegexMatchAndSubstitute_
};
static const upb_msglayout_field envoy_type_matcher_v3_RegexMatchAndSubstitute__fields[2] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit = {
&envoy_type_matcher_v3_RegexMatchAndSubstitute_submsgs[0],
&envoy_type_matcher_v3_RegexMatchAndSubstitute__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h
index def56ed496a..5e00d13f189 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -42,6 +43,12 @@ UPB_INLINE envoy_type_matcher_v3_RegexMatcher *envoy_type_matcher_v3_RegexMatche
envoy_type_matcher_v3_RegexMatcher *ret = envoy_type_matcher_v3_RegexMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_RegexMatcher *envoy_type_matcher_v3_RegexMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_RegexMatcher *ret = envoy_type_matcher_v3_RegexMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_RegexMatcher_serialize(const envoy_type_matcher_v3_RegexMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_RegexMatcher_msginit, arena, len);
}
@@ -82,15 +89,22 @@ UPB_INLINE envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *envoy_type_matcher_v3_R
envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *ret = envoy_type_matcher_v3_RegexMatcher_GoogleRE2_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *envoy_type_matcher_v3_RegexMatcher_GoogleRE2_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *ret = envoy_type_matcher_v3_RegexMatcher_GoogleRE2_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_RegexMatcher_GoogleRE2_serialize(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit, arena, len);
}
-UPB_INLINE bool envoy_type_matcher_v3_RegexMatcher_GoogleRE2_has_max_program_size(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_protobuf_UInt32Value* envoy_type_matcher_v3_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_protobuf_UInt32Value*); }
+UPB_INLINE bool envoy_type_matcher_v3_RegexMatcher_GoogleRE2_has_max_program_size(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_UInt32Value* envoy_type_matcher_v3_RegexMatcher_GoogleRE2_max_program_size(const envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_UInt32Value*); }
UPB_INLINE void envoy_type_matcher_v3_RegexMatcher_GoogleRE2_set_max_program_size(envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg, struct google_protobuf_UInt32Value* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_protobuf_UInt32Value*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_type_matcher_v3_RegexMatcher_GoogleRE2_mutable_max_program_size(envoy_type_matcher_v3_RegexMatcher_GoogleRE2 *msg, upb_arena *arena) {
struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_type_matcher_v3_RegexMatcher_GoogleRE2_max_program_size(msg);
@@ -112,16 +126,23 @@ UPB_INLINE envoy_type_matcher_v3_RegexMatchAndSubstitute *envoy_type_matcher_v3_
envoy_type_matcher_v3_RegexMatchAndSubstitute *ret = envoy_type_matcher_v3_RegexMatchAndSubstitute_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_RegexMatchAndSubstitute *envoy_type_matcher_v3_RegexMatchAndSubstitute_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_RegexMatchAndSubstitute *ret = envoy_type_matcher_v3_RegexMatchAndSubstitute_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_RegexMatchAndSubstitute_serialize(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit, arena, len);
}
-UPB_INLINE bool envoy_type_matcher_v3_RegexMatchAndSubstitute_has_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const envoy_type_matcher_v3_RegexMatcher* envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const envoy_type_matcher_v3_RegexMatcher*); }
-UPB_INLINE upb_strview envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_type_matcher_v3_RegexMatchAndSubstitute_has_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const envoy_type_matcher_v3_RegexMatcher* envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const envoy_type_matcher_v3_RegexMatcher*); }
+UPB_INLINE upb_strview envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(const envoy_type_matcher_v3_RegexMatchAndSubstitute *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_type_matcher_v3_RegexMatchAndSubstitute_set_pattern(envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, envoy_type_matcher_v3_RegexMatcher* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), envoy_type_matcher_v3_RegexMatcher*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), envoy_type_matcher_v3_RegexMatcher*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_RegexMatcher* envoy_type_matcher_v3_RegexMatchAndSubstitute_mutable_pattern(envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_RegexMatcher* sub = (struct envoy_type_matcher_v3_RegexMatcher*)envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(msg);
@@ -133,7 +154,7 @@ UPB_INLINE struct envoy_type_matcher_v3_RegexMatcher* envoy_type_matcher_v3_Rege
return sub;
}
UPB_INLINE void envoy_type_matcher_v3_RegexMatchAndSubstitute_set_substitution(envoy_type_matcher_v3_RegexMatchAndSubstitute *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c
index 969d45b0daf..e84e4f7c928 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c
@@ -10,7 +10,6 @@
#include "upb/msg.h"
#include "envoy/type/matcher/v3/string.upb.h"
#include "envoy/type/matcher/v3/regex.upb.h"
-#include "envoy/annotations/deprecation.upb.h"
#include "udpa/annotations/status.upb.h"
#include "udpa/annotations/versioning.upb.h"
#include "validate/validate.upb.h"
@@ -33,7 +32,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_StringMatcher__fields[6]
const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit = {
&envoy_type_matcher_v3_StringMatcher_submsgs[0],
&envoy_type_matcher_v3_StringMatcher__fields[0],
- UPB_SIZE(16, 32), 6, false,
+ UPB_SIZE(16, 32), 6, false, 255,
};
static const upb_msglayout *const envoy_type_matcher_v3_ListStringMatcher_submsgs[1] = {
@@ -47,7 +46,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_ListStringMatcher__fields
const upb_msglayout envoy_type_matcher_v3_ListStringMatcher_msginit = {
&envoy_type_matcher_v3_ListStringMatcher_submsgs[0],
&envoy_type_matcher_v3_ListStringMatcher__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h
index 760956b9cd2..4bce450ca8b 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -39,6 +40,12 @@ UPB_INLINE envoy_type_matcher_v3_StringMatcher *envoy_type_matcher_v3_StringMatc
envoy_type_matcher_v3_StringMatcher *ret = envoy_type_matcher_v3_StringMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_StringMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_StringMatcher *envoy_type_matcher_v3_StringMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_StringMatcher *ret = envoy_type_matcher_v3_StringMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_StringMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_StringMatcher_serialize(const envoy_type_matcher_v3_StringMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_StringMatcher_msginit, arena, len);
}
@@ -103,6 +110,12 @@ UPB_INLINE envoy_type_matcher_v3_ListStringMatcher *envoy_type_matcher_v3_ListSt
envoy_type_matcher_v3_ListStringMatcher *ret = envoy_type_matcher_v3_ListStringMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ListStringMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_ListStringMatcher *envoy_type_matcher_v3_ListStringMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_ListStringMatcher *ret = envoy_type_matcher_v3_ListStringMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ListStringMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_ListStringMatcher_serialize(const envoy_type_matcher_v3_ListStringMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_ListStringMatcher_msginit, arena, len);
}
@@ -114,12 +127,12 @@ UPB_INLINE envoy_type_matcher_v3_StringMatcher** envoy_type_matcher_v3_ListStrin
return (envoy_type_matcher_v3_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_type_matcher_v3_StringMatcher** envoy_type_matcher_v3_ListStringMatcher_resize_patterns(envoy_type_matcher_v3_ListStringMatcher *msg, size_t len, upb_arena *arena) {
- return (envoy_type_matcher_v3_StringMatcher**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_type_matcher_v3_StringMatcher**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_type_matcher_v3_ListStringMatcher_add_patterns(envoy_type_matcher_v3_ListStringMatcher *msg, upb_arena *arena) {
struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_msg_new(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c
new file mode 100644
index 00000000000..05ea6a3ffcb
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c
@@ -0,0 +1,46 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "envoy/type/matcher/v3/struct.upb.h"
+#include "envoy/type/matcher/v3/value.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "udpa/annotations/versioning.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const envoy_type_matcher_v3_StructMatcher_submsgs[2] = {
+ &envoy_type_matcher_v3_StructMatcher_PathSegment_msginit,
+ &envoy_type_matcher_v3_ValueMatcher_msginit,
+};
+
+static const upb_msglayout_field envoy_type_matcher_v3_StructMatcher__fields[2] = {
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 3},
+ {3, UPB_SIZE(4, 8), 1, 1, 11, 1},
+};
+
+const upb_msglayout envoy_type_matcher_v3_StructMatcher_msginit = {
+ &envoy_type_matcher_v3_StructMatcher_submsgs[0],
+ &envoy_type_matcher_v3_StructMatcher__fields[0],
+ UPB_SIZE(16, 24), 2, false, 255,
+};
+
+static const upb_msglayout_field envoy_type_matcher_v3_StructMatcher_PathSegment__fields[1] = {
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
+};
+
+const upb_msglayout envoy_type_matcher_v3_StructMatcher_PathSegment_msginit = {
+ NULL,
+ &envoy_type_matcher_v3_StructMatcher_PathSegment__fields[0],
+ UPB_SIZE(16, 32), 1, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h
new file mode 100644
index 00000000000..53e521385de
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h
@@ -0,0 +1,124 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_STRUCT_PROTO_UPB_H_
+#define ENVOY_TYPE_MATCHER_V3_STRUCT_PROTO_UPB_H_
+
+#include "upb/msg.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 envoy_type_matcher_v3_StructMatcher;
+struct envoy_type_matcher_v3_StructMatcher_PathSegment;
+typedef struct envoy_type_matcher_v3_StructMatcher envoy_type_matcher_v3_StructMatcher;
+typedef struct envoy_type_matcher_v3_StructMatcher_PathSegment envoy_type_matcher_v3_StructMatcher_PathSegment;
+extern const upb_msglayout envoy_type_matcher_v3_StructMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_StructMatcher_PathSegment_msginit;
+struct envoy_type_matcher_v3_ValueMatcher;
+extern const upb_msglayout envoy_type_matcher_v3_ValueMatcher_msginit;
+
+
+/* envoy.type.matcher.v3.StructMatcher */
+
+UPB_INLINE envoy_type_matcher_v3_StructMatcher *envoy_type_matcher_v3_StructMatcher_new(upb_arena *arena) {
+ return (envoy_type_matcher_v3_StructMatcher *)_upb_msg_new(&envoy_type_matcher_v3_StructMatcher_msginit, arena);
+}
+UPB_INLINE envoy_type_matcher_v3_StructMatcher *envoy_type_matcher_v3_StructMatcher_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_type_matcher_v3_StructMatcher *ret = envoy_type_matcher_v3_StructMatcher_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_StructMatcher_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_type_matcher_v3_StructMatcher *envoy_type_matcher_v3_StructMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_StructMatcher *ret = envoy_type_matcher_v3_StructMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_StructMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_type_matcher_v3_StructMatcher_serialize(const envoy_type_matcher_v3_StructMatcher *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_type_matcher_v3_StructMatcher_msginit, arena, len);
+}
+
+UPB_INLINE bool envoy_type_matcher_v3_StructMatcher_has_path(const envoy_type_matcher_v3_StructMatcher *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const envoy_type_matcher_v3_StructMatcher_PathSegment* const* envoy_type_matcher_v3_StructMatcher_path(const envoy_type_matcher_v3_StructMatcher *msg, size_t *len) { return (const envoy_type_matcher_v3_StructMatcher_PathSegment* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
+UPB_INLINE bool envoy_type_matcher_v3_StructMatcher_has_value(const envoy_type_matcher_v3_StructMatcher *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_matcher_v3_ValueMatcher* envoy_type_matcher_v3_StructMatcher_value(const envoy_type_matcher_v3_StructMatcher *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_type_matcher_v3_ValueMatcher*); }
+
+UPB_INLINE envoy_type_matcher_v3_StructMatcher_PathSegment** envoy_type_matcher_v3_StructMatcher_mutable_path(envoy_type_matcher_v3_StructMatcher *msg, size_t *len) {
+ return (envoy_type_matcher_v3_StructMatcher_PathSegment**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
+}
+UPB_INLINE envoy_type_matcher_v3_StructMatcher_PathSegment** envoy_type_matcher_v3_StructMatcher_resize_path(envoy_type_matcher_v3_StructMatcher *msg, size_t len, upb_arena *arena) {
+ return (envoy_type_matcher_v3_StructMatcher_PathSegment**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct envoy_type_matcher_v3_StructMatcher_PathSegment* envoy_type_matcher_v3_StructMatcher_add_path(envoy_type_matcher_v3_StructMatcher *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_StructMatcher_PathSegment* sub = (struct envoy_type_matcher_v3_StructMatcher_PathSegment*)_upb_msg_new(&envoy_type_matcher_v3_StructMatcher_PathSegment_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 void envoy_type_matcher_v3_StructMatcher_set_value(envoy_type_matcher_v3_StructMatcher *msg, struct envoy_type_matcher_v3_ValueMatcher* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_type_matcher_v3_ValueMatcher*) = value;
+}
+UPB_INLINE struct envoy_type_matcher_v3_ValueMatcher* envoy_type_matcher_v3_StructMatcher_mutable_value(envoy_type_matcher_v3_StructMatcher *msg, upb_arena *arena) {
+ struct envoy_type_matcher_v3_ValueMatcher* sub = (struct envoy_type_matcher_v3_ValueMatcher*)envoy_type_matcher_v3_StructMatcher_value(msg);
+ if (sub == NULL) {
+ sub = (struct envoy_type_matcher_v3_ValueMatcher*)_upb_msg_new(&envoy_type_matcher_v3_ValueMatcher_msginit, arena);
+ if (!sub) return NULL;
+ envoy_type_matcher_v3_StructMatcher_set_value(msg, sub);
+ }
+ return sub;
+}
+
+/* envoy.type.matcher.v3.StructMatcher.PathSegment */
+
+UPB_INLINE envoy_type_matcher_v3_StructMatcher_PathSegment *envoy_type_matcher_v3_StructMatcher_PathSegment_new(upb_arena *arena) {
+ return (envoy_type_matcher_v3_StructMatcher_PathSegment *)_upb_msg_new(&envoy_type_matcher_v3_StructMatcher_PathSegment_msginit, arena);
+}
+UPB_INLINE envoy_type_matcher_v3_StructMatcher_PathSegment *envoy_type_matcher_v3_StructMatcher_PathSegment_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ envoy_type_matcher_v3_StructMatcher_PathSegment *ret = envoy_type_matcher_v3_StructMatcher_PathSegment_new(arena);
+ return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_StructMatcher_PathSegment_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE envoy_type_matcher_v3_StructMatcher_PathSegment *envoy_type_matcher_v3_StructMatcher_PathSegment_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_StructMatcher_PathSegment *ret = envoy_type_matcher_v3_StructMatcher_PathSegment_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_StructMatcher_PathSegment_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *envoy_type_matcher_v3_StructMatcher_PathSegment_serialize(const envoy_type_matcher_v3_StructMatcher_PathSegment *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &envoy_type_matcher_v3_StructMatcher_PathSegment_msginit, arena, len);
+}
+
+typedef enum {
+ envoy_type_matcher_v3_StructMatcher_PathSegment_segment_key = 1,
+ envoy_type_matcher_v3_StructMatcher_PathSegment_segment_NOT_SET = 0
+} envoy_type_matcher_v3_StructMatcher_PathSegment_segment_oneofcases;
+UPB_INLINE envoy_type_matcher_v3_StructMatcher_PathSegment_segment_oneofcases envoy_type_matcher_v3_StructMatcher_PathSegment_segment_case(const envoy_type_matcher_v3_StructMatcher_PathSegment* msg) { return (envoy_type_matcher_v3_StructMatcher_PathSegment_segment_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
+
+UPB_INLINE bool envoy_type_matcher_v3_StructMatcher_PathSegment_has_key(const envoy_type_matcher_v3_StructMatcher_PathSegment *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; }
+UPB_INLINE upb_strview envoy_type_matcher_v3_StructMatcher_PathSegment_key(const envoy_type_matcher_v3_StructMatcher_PathSegment *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, upb_strview_make("", strlen(""))); }
+
+UPB_INLINE void envoy_type_matcher_v3_StructMatcher_PathSegment_set_key(envoy_type_matcher_v3_StructMatcher_PathSegment *msg, upb_strview value) {
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_STRUCT_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c
index a2ab19e1896..0195307d0cd 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c
@@ -36,13 +36,13 @@ static const upb_msglayout_field envoy_type_matcher_v3_ValueMatcher__fields[6] =
const upb_msglayout envoy_type_matcher_v3_ValueMatcher_msginit = {
&envoy_type_matcher_v3_ValueMatcher_submsgs[0],
&envoy_type_matcher_v3_ValueMatcher__fields[0],
- UPB_SIZE(8, 16), 6, false,
+ UPB_SIZE(8, 16), 6, false, 255,
};
const upb_msglayout envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
static const upb_msglayout *const envoy_type_matcher_v3_ListMatcher_submsgs[1] = {
@@ -56,7 +56,7 @@ static const upb_msglayout_field envoy_type_matcher_v3_ListMatcher__fields[1] =
const upb_msglayout envoy_type_matcher_v3_ListMatcher_msginit = {
&envoy_type_matcher_v3_ListMatcher_submsgs[0],
&envoy_type_matcher_v3_ListMatcher__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h
index 5ff8ccd9985..dc44445f8f3 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -44,6 +45,12 @@ UPB_INLINE envoy_type_matcher_v3_ValueMatcher *envoy_type_matcher_v3_ValueMatche
envoy_type_matcher_v3_ValueMatcher *ret = envoy_type_matcher_v3_ValueMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_ValueMatcher *envoy_type_matcher_v3_ValueMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_ValueMatcher *ret = envoy_type_matcher_v3_ValueMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_ValueMatcher_serialize(const envoy_type_matcher_v3_ValueMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_ValueMatcher_msginit, arena, len);
}
@@ -137,6 +144,12 @@ UPB_INLINE envoy_type_matcher_v3_ValueMatcher_NullMatch *envoy_type_matcher_v3_V
envoy_type_matcher_v3_ValueMatcher_NullMatch *ret = envoy_type_matcher_v3_ValueMatcher_NullMatch_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_ValueMatcher_NullMatch *envoy_type_matcher_v3_ValueMatcher_NullMatch_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_ValueMatcher_NullMatch *ret = envoy_type_matcher_v3_ValueMatcher_NullMatch_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_ValueMatcher_NullMatch_serialize(const envoy_type_matcher_v3_ValueMatcher_NullMatch *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit, arena, len);
}
@@ -153,6 +166,12 @@ UPB_INLINE envoy_type_matcher_v3_ListMatcher *envoy_type_matcher_v3_ListMatcher_
envoy_type_matcher_v3_ListMatcher *ret = envoy_type_matcher_v3_ListMatcher_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_matcher_v3_ListMatcher_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_matcher_v3_ListMatcher *envoy_type_matcher_v3_ListMatcher_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_matcher_v3_ListMatcher *ret = envoy_type_matcher_v3_ListMatcher_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_matcher_v3_ListMatcher_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_matcher_v3_ListMatcher_serialize(const envoy_type_matcher_v3_ListMatcher *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_matcher_v3_ListMatcher_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c
index 1dbd48defbd..e692eda96f3 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c
@@ -27,7 +27,7 @@ static const upb_msglayout_field envoy_type_metadata_v3_MetadataKey__fields[2] =
const upb_msglayout envoy_type_metadata_v3_MetadataKey_msginit = {
&envoy_type_metadata_v3_MetadataKey_submsgs[0],
&envoy_type_metadata_v3_MetadataKey__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_type_metadata_v3_MetadataKey_PathSegment__fields[1] = {
@@ -37,7 +37,7 @@ static const upb_msglayout_field envoy_type_metadata_v3_MetadataKey_PathSegment_
const upb_msglayout envoy_type_metadata_v3_MetadataKey_PathSegment_msginit = {
NULL,
&envoy_type_metadata_v3_MetadataKey_PathSegment__fields[0],
- UPB_SIZE(16, 32), 1, false,
+ UPB_SIZE(16, 32), 1, false, 255,
};
static const upb_msglayout *const envoy_type_metadata_v3_MetadataKind_submsgs[4] = {
@@ -57,31 +57,31 @@ static const upb_msglayout_field envoy_type_metadata_v3_MetadataKind__fields[4]
const upb_msglayout envoy_type_metadata_v3_MetadataKind_msginit = {
&envoy_type_metadata_v3_MetadataKind_submsgs[0],
&envoy_type_metadata_v3_MetadataKind__fields[0],
- UPB_SIZE(8, 16), 4, false,
+ UPB_SIZE(8, 16), 4, false, 255,
};
const upb_msglayout envoy_type_metadata_v3_MetadataKind_Request_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
const upb_msglayout envoy_type_metadata_v3_MetadataKind_Route_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
const upb_msglayout envoy_type_metadata_v3_MetadataKind_Cluster_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
const upb_msglayout envoy_type_metadata_v3_MetadataKind_Host_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h
index 4aeccf5e8ea..83ac93cf529 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -52,6 +53,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKey *envoy_type_metadata_v3_MetadataKe
envoy_type_metadata_v3_MetadataKey *ret = envoy_type_metadata_v3_MetadataKey_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKey_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKey *envoy_type_metadata_v3_MetadataKey_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKey *ret = envoy_type_metadata_v3_MetadataKey_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKey_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKey_serialize(const envoy_type_metadata_v3_MetadataKey *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKey_msginit, arena, len);
}
@@ -67,12 +74,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKey_PathSegment** envoy_type_metadata_
return (envoy_type_metadata_v3_MetadataKey_PathSegment**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE envoy_type_metadata_v3_MetadataKey_PathSegment** envoy_type_metadata_v3_MetadataKey_resize_path(envoy_type_metadata_v3_MetadataKey *msg, size_t len, upb_arena *arena) {
- return (envoy_type_metadata_v3_MetadataKey_PathSegment**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (envoy_type_metadata_v3_MetadataKey_PathSegment**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_metadata_v3_MetadataKey_PathSegment* envoy_type_metadata_v3_MetadataKey_add_path(envoy_type_metadata_v3_MetadataKey *msg, upb_arena *arena) {
struct envoy_type_metadata_v3_MetadataKey_PathSegment* sub = (struct envoy_type_metadata_v3_MetadataKey_PathSegment*)_upb_msg_new(&envoy_type_metadata_v3_MetadataKey_PathSegment_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -87,6 +94,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKey_PathSegment *envoy_type_metadata_v
envoy_type_metadata_v3_MetadataKey_PathSegment *ret = envoy_type_metadata_v3_MetadataKey_PathSegment_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKey_PathSegment_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKey_PathSegment *envoy_type_metadata_v3_MetadataKey_PathSegment_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKey_PathSegment *ret = envoy_type_metadata_v3_MetadataKey_PathSegment_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKey_PathSegment_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKey_PathSegment_serialize(const envoy_type_metadata_v3_MetadataKey_PathSegment *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKey_PathSegment_msginit, arena, len);
}
@@ -114,6 +127,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKind *envoy_type_metadata_v3_MetadataK
envoy_type_metadata_v3_MetadataKind *ret = envoy_type_metadata_v3_MetadataKind_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKind *envoy_type_metadata_v3_MetadataKind_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKind *ret = envoy_type_metadata_v3_MetadataKind_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKind_serialize(const envoy_type_metadata_v3_MetadataKind *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKind_msginit, arena, len);
}
@@ -195,6 +214,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKind_Request *envoy_type_metadata_v3_M
envoy_type_metadata_v3_MetadataKind_Request *ret = envoy_type_metadata_v3_MetadataKind_Request_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Request_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKind_Request *envoy_type_metadata_v3_MetadataKind_Request_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKind_Request *ret = envoy_type_metadata_v3_MetadataKind_Request_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Request_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKind_Request_serialize(const envoy_type_metadata_v3_MetadataKind_Request *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKind_Request_msginit, arena, len);
}
@@ -211,6 +236,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKind_Route *envoy_type_metadata_v3_Met
envoy_type_metadata_v3_MetadataKind_Route *ret = envoy_type_metadata_v3_MetadataKind_Route_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Route_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKind_Route *envoy_type_metadata_v3_MetadataKind_Route_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKind_Route *ret = envoy_type_metadata_v3_MetadataKind_Route_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Route_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKind_Route_serialize(const envoy_type_metadata_v3_MetadataKind_Route *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKind_Route_msginit, arena, len);
}
@@ -227,6 +258,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKind_Cluster *envoy_type_metadata_v3_M
envoy_type_metadata_v3_MetadataKind_Cluster *ret = envoy_type_metadata_v3_MetadataKind_Cluster_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Cluster_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKind_Cluster *envoy_type_metadata_v3_MetadataKind_Cluster_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKind_Cluster *ret = envoy_type_metadata_v3_MetadataKind_Cluster_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Cluster_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKind_Cluster_serialize(const envoy_type_metadata_v3_MetadataKind_Cluster *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKind_Cluster_msginit, arena, len);
}
@@ -243,6 +280,12 @@ UPB_INLINE envoy_type_metadata_v3_MetadataKind_Host *envoy_type_metadata_v3_Meta
envoy_type_metadata_v3_MetadataKind_Host *ret = envoy_type_metadata_v3_MetadataKind_Host_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Host_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_metadata_v3_MetadataKind_Host *envoy_type_metadata_v3_MetadataKind_Host_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_metadata_v3_MetadataKind_Host *ret = envoy_type_metadata_v3_MetadataKind_Host_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_metadata_v3_MetadataKind_Host_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_metadata_v3_MetadataKind_Host_serialize(const envoy_type_metadata_v3_MetadataKind_Host *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_metadata_v3_MetadataKind_Host_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c
index 6db08468a5a..fa53e431e69 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c
@@ -34,7 +34,7 @@ static const upb_msglayout_field envoy_type_tracing_v3_CustomTag__fields[5] = {
const upb_msglayout envoy_type_tracing_v3_CustomTag_msginit = {
&envoy_type_tracing_v3_CustomTag_submsgs[0],
&envoy_type_tracing_v3_CustomTag__fields[0],
- UPB_SIZE(16, 32), 5, false,
+ UPB_SIZE(16, 32), 5, false, 255,
};
static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Literal__fields[1] = {
@@ -44,7 +44,7 @@ static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Literal__fields
const upb_msglayout envoy_type_tracing_v3_CustomTag_Literal_msginit = {
NULL,
&envoy_type_tracing_v3_CustomTag_Literal__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Environment__fields[2] = {
@@ -55,7 +55,7 @@ static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Environment__fi
const upb_msglayout envoy_type_tracing_v3_CustomTag_Environment_msginit = {
NULL,
&envoy_type_tracing_v3_CustomTag_Environment__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Header__fields[2] = {
@@ -66,7 +66,7 @@ static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Header__fields[
const upb_msglayout envoy_type_tracing_v3_CustomTag_Header_msginit = {
NULL,
&envoy_type_tracing_v3_CustomTag_Header__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const envoy_type_tracing_v3_CustomTag_Metadata_submsgs[2] = {
@@ -75,15 +75,15 @@ static const upb_msglayout *const envoy_type_tracing_v3_CustomTag_Metadata_subms
};
static const upb_msglayout_field envoy_type_tracing_v3_CustomTag_Metadata__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {2, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {1, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {2, UPB_SIZE(16, 32), 2, 0, 11, 1},
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout envoy_type_tracing_v3_CustomTag_Metadata_msginit = {
&envoy_type_tracing_v3_CustomTag_Metadata_submsgs[0],
&envoy_type_tracing_v3_CustomTag_Metadata__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h
index f72eac43ad4..666ed7b11db 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -50,6 +51,12 @@ UPB_INLINE envoy_type_tracing_v3_CustomTag *envoy_type_tracing_v3_CustomTag_pars
envoy_type_tracing_v3_CustomTag *ret = envoy_type_tracing_v3_CustomTag_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_tracing_v3_CustomTag *envoy_type_tracing_v3_CustomTag_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_tracing_v3_CustomTag *ret = envoy_type_tracing_v3_CustomTag_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_tracing_v3_CustomTag_serialize(const envoy_type_tracing_v3_CustomTag *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_tracing_v3_CustomTag_msginit, arena, len);
}
@@ -135,6 +142,12 @@ UPB_INLINE envoy_type_tracing_v3_CustomTag_Literal *envoy_type_tracing_v3_Custom
envoy_type_tracing_v3_CustomTag_Literal *ret = envoy_type_tracing_v3_CustomTag_Literal_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Literal_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_tracing_v3_CustomTag_Literal *envoy_type_tracing_v3_CustomTag_Literal_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_tracing_v3_CustomTag_Literal *ret = envoy_type_tracing_v3_CustomTag_Literal_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Literal_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_tracing_v3_CustomTag_Literal_serialize(const envoy_type_tracing_v3_CustomTag_Literal *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_tracing_v3_CustomTag_Literal_msginit, arena, len);
}
@@ -155,6 +168,12 @@ UPB_INLINE envoy_type_tracing_v3_CustomTag_Environment *envoy_type_tracing_v3_Cu
envoy_type_tracing_v3_CustomTag_Environment *ret = envoy_type_tracing_v3_CustomTag_Environment_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Environment_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_tracing_v3_CustomTag_Environment *envoy_type_tracing_v3_CustomTag_Environment_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_tracing_v3_CustomTag_Environment *ret = envoy_type_tracing_v3_CustomTag_Environment_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Environment_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_tracing_v3_CustomTag_Environment_serialize(const envoy_type_tracing_v3_CustomTag_Environment *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_tracing_v3_CustomTag_Environment_msginit, arena, len);
}
@@ -179,6 +198,12 @@ UPB_INLINE envoy_type_tracing_v3_CustomTag_Header *envoy_type_tracing_v3_CustomT
envoy_type_tracing_v3_CustomTag_Header *ret = envoy_type_tracing_v3_CustomTag_Header_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Header_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_tracing_v3_CustomTag_Header *envoy_type_tracing_v3_CustomTag_Header_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_tracing_v3_CustomTag_Header *ret = envoy_type_tracing_v3_CustomTag_Header_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Header_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_tracing_v3_CustomTag_Header_serialize(const envoy_type_tracing_v3_CustomTag_Header *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_tracing_v3_CustomTag_Header_msginit, arena, len);
}
@@ -203,18 +228,25 @@ UPB_INLINE envoy_type_tracing_v3_CustomTag_Metadata *envoy_type_tracing_v3_Custo
envoy_type_tracing_v3_CustomTag_Metadata *ret = envoy_type_tracing_v3_CustomTag_Metadata_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Metadata_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_tracing_v3_CustomTag_Metadata *envoy_type_tracing_v3_CustomTag_Metadata_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_tracing_v3_CustomTag_Metadata *ret = envoy_type_tracing_v3_CustomTag_Metadata_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_tracing_v3_CustomTag_Metadata_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_tracing_v3_CustomTag_Metadata_serialize(const envoy_type_tracing_v3_CustomTag_Metadata *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_tracing_v3_CustomTag_Metadata_msginit, arena, len);
}
-UPB_INLINE bool envoy_type_tracing_v3_CustomTag_Metadata_has_kind(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct envoy_type_metadata_v3_MetadataKind* envoy_type_tracing_v3_CustomTag_Metadata_kind(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_type_metadata_v3_MetadataKind*); }
-UPB_INLINE bool envoy_type_tracing_v3_CustomTag_Metadata_has_metadata_key(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_type_tracing_v3_CustomTag_Metadata_metadata_key(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_metadata_v3_MetadataKey*); }
-UPB_INLINE upb_strview envoy_type_tracing_v3_CustomTag_Metadata_default_value(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool envoy_type_tracing_v3_CustomTag_Metadata_has_kind(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct envoy_type_metadata_v3_MetadataKind* envoy_type_tracing_v3_CustomTag_Metadata_kind(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_type_metadata_v3_MetadataKind*); }
+UPB_INLINE bool envoy_type_tracing_v3_CustomTag_Metadata_has_metadata_key(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct envoy_type_metadata_v3_MetadataKey* envoy_type_tracing_v3_CustomTag_Metadata_metadata_key(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_type_metadata_v3_MetadataKey*); }
+UPB_INLINE upb_strview envoy_type_tracing_v3_CustomTag_Metadata_default_value(const envoy_type_tracing_v3_CustomTag_Metadata *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void envoy_type_tracing_v3_CustomTag_Metadata_set_kind(envoy_type_tracing_v3_CustomTag_Metadata *msg, struct envoy_type_metadata_v3_MetadataKind* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_type_metadata_v3_MetadataKind*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_metadata_v3_MetadataKind*) = value;
}
UPB_INLINE struct envoy_type_metadata_v3_MetadataKind* envoy_type_tracing_v3_CustomTag_Metadata_mutable_kind(envoy_type_tracing_v3_CustomTag_Metadata *msg, upb_arena *arena) {
struct envoy_type_metadata_v3_MetadataKind* sub = (struct envoy_type_metadata_v3_MetadataKind*)envoy_type_tracing_v3_CustomTag_Metadata_kind(msg);
@@ -226,7 +258,8 @@ UPB_INLINE struct envoy_type_metadata_v3_MetadataKind* envoy_type_tracing_v3_Cus
return sub;
}
UPB_INLINE void envoy_type_tracing_v3_CustomTag_Metadata_set_metadata_key(envoy_type_tracing_v3_CustomTag_Metadata *msg, struct envoy_type_metadata_v3_MetadataKey* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_type_metadata_v3_MetadataKey*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_type_metadata_v3_MetadataKey*) = value;
}
UPB_INLINE struct envoy_type_metadata_v3_MetadataKey* envoy_type_tracing_v3_CustomTag_Metadata_mutable_metadata_key(envoy_type_tracing_v3_CustomTag_Metadata *msg, upb_arena *arena) {
struct envoy_type_metadata_v3_MetadataKey* sub = (struct envoy_type_metadata_v3_MetadataKey*)envoy_type_tracing_v3_CustomTag_Metadata_metadata_key(msg);
@@ -238,7 +271,7 @@ UPB_INLINE struct envoy_type_metadata_v3_MetadataKey* envoy_type_tracing_v3_Cust
return sub;
}
UPB_INLINE void envoy_type_tracing_v3_CustomTag_Metadata_set_default_value(envoy_type_tracing_v3_CustomTag_Metadata *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/http.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/http.upb.h
index 9e505a4616c..25b033f214c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/http.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/http.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c
index e53879288e0..9e4a87c341a 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c
@@ -22,18 +22,18 @@ static const upb_msglayout_field envoy_type_v3_Percent__fields[1] = {
const upb_msglayout envoy_type_v3_Percent_msginit = {
NULL,
&envoy_type_v3_Percent__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field envoy_type_v3_FractionalPercent__fields[2] = {
- {1, UPB_SIZE(8, 8), 0, 0, 13, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 13, 1},
{2, UPB_SIZE(0, 0), 0, 0, 14, 1},
};
const upb_msglayout envoy_type_v3_FractionalPercent_msginit = {
NULL,
&envoy_type_v3_FractionalPercent__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h
index fd111fe322b..6155e2391d2 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -43,6 +44,12 @@ UPB_INLINE envoy_type_v3_Percent *envoy_type_v3_Percent_parse(const char *buf, s
envoy_type_v3_Percent *ret = envoy_type_v3_Percent_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_v3_Percent_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_v3_Percent *envoy_type_v3_Percent_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_v3_Percent *ret = envoy_type_v3_Percent_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_Percent_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_v3_Percent_serialize(const envoy_type_v3_Percent *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_v3_Percent_msginit, arena, len);
}
@@ -63,15 +70,21 @@ UPB_INLINE envoy_type_v3_FractionalPercent *envoy_type_v3_FractionalPercent_pars
envoy_type_v3_FractionalPercent *ret = envoy_type_v3_FractionalPercent_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_v3_FractionalPercent_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_v3_FractionalPercent *envoy_type_v3_FractionalPercent_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_v3_FractionalPercent *ret = envoy_type_v3_FractionalPercent_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_FractionalPercent_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_v3_FractionalPercent_serialize(const envoy_type_v3_FractionalPercent *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_v3_FractionalPercent_msginit, arena, len);
}
-UPB_INLINE uint32_t envoy_type_v3_FractionalPercent_numerator(const envoy_type_v3_FractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); }
+UPB_INLINE uint32_t envoy_type_v3_FractionalPercent_numerator(const envoy_type_v3_FractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
UPB_INLINE int32_t envoy_type_v3_FractionalPercent_denominator(const envoy_type_v3_FractionalPercent *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
UPB_INLINE void envoy_type_v3_FractionalPercent_set_numerator(envoy_type_v3_FractionalPercent *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
UPB_INLINE void envoy_type_v3_FractionalPercent_set_denominator(envoy_type_v3_FractionalPercent *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.c
index 0e21fed9c47..e4222bef5c9 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.c
@@ -22,7 +22,7 @@ static const upb_msglayout_field envoy_type_v3_Int64Range__fields[2] = {
const upb_msglayout envoy_type_v3_Int64Range_msginit = {
NULL,
&envoy_type_v3_Int64Range__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
static const upb_msglayout_field envoy_type_v3_Int32Range__fields[2] = {
@@ -33,7 +33,7 @@ static const upb_msglayout_field envoy_type_v3_Int32Range__fields[2] = {
const upb_msglayout envoy_type_v3_Int32Range_msginit = {
NULL,
&envoy_type_v3_Int32Range__fields[0],
- UPB_SIZE(8, 8), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
static const upb_msglayout_field envoy_type_v3_DoubleRange__fields[2] = {
@@ -44,7 +44,7 @@ static const upb_msglayout_field envoy_type_v3_DoubleRange__fields[2] = {
const upb_msglayout envoy_type_v3_DoubleRange_msginit = {
NULL,
&envoy_type_v3_DoubleRange__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.h
index 71453aabc7f..9ff396d9ce2 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/range.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -40,6 +41,12 @@ UPB_INLINE envoy_type_v3_Int64Range *envoy_type_v3_Int64Range_parse(const char *
envoy_type_v3_Int64Range *ret = envoy_type_v3_Int64Range_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_v3_Int64Range_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_v3_Int64Range *envoy_type_v3_Int64Range_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_v3_Int64Range *ret = envoy_type_v3_Int64Range_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_Int64Range_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_v3_Int64Range_serialize(const envoy_type_v3_Int64Range *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_v3_Int64Range_msginit, arena, len);
}
@@ -64,6 +71,12 @@ UPB_INLINE envoy_type_v3_Int32Range *envoy_type_v3_Int32Range_parse(const char *
envoy_type_v3_Int32Range *ret = envoy_type_v3_Int32Range_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_v3_Int32Range_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_v3_Int32Range *envoy_type_v3_Int32Range_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_v3_Int32Range *ret = envoy_type_v3_Int32Range_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_Int32Range_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_v3_Int32Range_serialize(const envoy_type_v3_Int32Range *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_v3_Int32Range_msginit, arena, len);
}
@@ -88,6 +101,12 @@ UPB_INLINE envoy_type_v3_DoubleRange *envoy_type_v3_DoubleRange_parse(const char
envoy_type_v3_DoubleRange *ret = envoy_type_v3_DoubleRange_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_v3_DoubleRange_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_v3_DoubleRange *envoy_type_v3_DoubleRange_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_v3_DoubleRange *ret = envoy_type_v3_DoubleRange_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_DoubleRange_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_v3_DoubleRange_serialize(const envoy_type_v3_DoubleRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_v3_DoubleRange_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c
index 5eb014a526e..8984ac7fbdc 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.c
@@ -23,7 +23,7 @@ static const upb_msglayout_field envoy_type_v3_SemanticVersion__fields[3] = {
const upb_msglayout envoy_type_v3_SemanticVersion_msginit = {
NULL,
&envoy_type_v3_SemanticVersion__fields[0],
- UPB_SIZE(12, 12), 3, false,
+ UPB_SIZE(16, 16), 3, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h
index 8d53babc9b7..e1dd3297202 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE envoy_type_v3_SemanticVersion *envoy_type_v3_SemanticVersion_parse(co
envoy_type_v3_SemanticVersion *ret = envoy_type_v3_SemanticVersion_new(arena);
return (ret && upb_decode(buf, size, ret, &envoy_type_v3_SemanticVersion_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE envoy_type_v3_SemanticVersion *envoy_type_v3_SemanticVersion_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ envoy_type_v3_SemanticVersion *ret = envoy_type_v3_SemanticVersion_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &envoy_type_v3_SemanticVersion_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *envoy_type_v3_SemanticVersion_serialize(const envoy_type_v3_SemanticVersion *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &envoy_type_v3_SemanticVersion_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/annotations.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/annotations.upb.h
index ea05f2597a0..fcbe640dbed 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/annotations.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/annotations.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c
index 5728a1063eb..16fd52a0739 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c
@@ -23,16 +23,16 @@ static const upb_msglayout *const google_api_expr_v1alpha1_CheckedExpr_submsgs[4
};
static const upb_msglayout_field google_api_expr_v1alpha1_CheckedExpr__fields[4] = {
- {2, UPB_SIZE(8, 16), 0, 0, 11, _UPB_LABEL_MAP},
- {3, UPB_SIZE(12, 24), 0, 1, 11, _UPB_LABEL_MAP},
- {4, UPB_SIZE(0, 0), 0, 2, 11, 1},
- {5, UPB_SIZE(4, 8), 0, 3, 11, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 11, _UPB_LABEL_MAP},
+ {3, UPB_SIZE(16, 32), 0, 1, 11, _UPB_LABEL_MAP},
+ {4, UPB_SIZE(4, 8), 1, 2, 11, 1},
+ {5, UPB_SIZE(8, 16), 2, 3, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_msginit = {
&google_api_expr_v1alpha1_CheckedExpr_submsgs[0],
&google_api_expr_v1alpha1_CheckedExpr__fields[0],
- UPB_SIZE(16, 32), 4, false,
+ UPB_SIZE(24, 40), 4, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_submsgs[1] = {
@@ -47,7 +47,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_CheckedExpr_ReferenceM
const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_msginit = {
&google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry_submsgs[0],
&google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_submsgs[1] = {
@@ -62,10 +62,10 @@ static const upb_msglayout_field google_api_expr_v1alpha1_CheckedExpr_TypeMapEnt
const upb_msglayout google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_msginit = {
&google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry_submsgs[0],
&google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Type_submsgs[7] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Type_submsgs[6] = {
&google_api_expr_v1alpha1_Type_msginit,
&google_api_expr_v1alpha1_Type_AbstractType_msginit,
&google_api_expr_v1alpha1_Type_FunctionType_msginit,
@@ -93,7 +93,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Type__fields[13] = {
const upb_msglayout google_api_expr_v1alpha1_Type_msginit = {
&google_api_expr_v1alpha1_Type_submsgs[0],
&google_api_expr_v1alpha1_Type__fields[0],
- UPB_SIZE(16, 32), 13, false,
+ UPB_SIZE(16, 32), 13, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Type_ListType_submsgs[1] = {
@@ -101,43 +101,43 @@ static const upb_msglayout *const google_api_expr_v1alpha1_Type_ListType_submsgs
};
static const upb_msglayout_field google_api_expr_v1alpha1_Type_ListType__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Type_ListType_msginit = {
&google_api_expr_v1alpha1_Type_ListType_submsgs[0],
&google_api_expr_v1alpha1_Type_ListType__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Type_MapType_submsgs[2] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Type_MapType_submsgs[1] = {
&google_api_expr_v1alpha1_Type_msginit,
};
static const upb_msglayout_field google_api_expr_v1alpha1_Type_MapType__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Type_MapType_msginit = {
&google_api_expr_v1alpha1_Type_MapType_submsgs[0],
&google_api_expr_v1alpha1_Type_MapType__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Type_FunctionType_submsgs[2] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Type_FunctionType_submsgs[1] = {
&google_api_expr_v1alpha1_Type_msginit,
};
static const upb_msglayout_field google_api_expr_v1alpha1_Type_FunctionType__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 3},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 3},
};
const upb_msglayout google_api_expr_v1alpha1_Type_FunctionType_msginit = {
&google_api_expr_v1alpha1_Type_FunctionType_submsgs[0],
&google_api_expr_v1alpha1_Type_FunctionType__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Type_AbstractType_submsgs[1] = {
@@ -152,7 +152,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Type_AbstractType__fie
const upb_msglayout google_api_expr_v1alpha1_Type_AbstractType_msginit = {
&google_api_expr_v1alpha1_Type_AbstractType_submsgs[0],
&google_api_expr_v1alpha1_Type_AbstractType__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Decl_submsgs[2] = {
@@ -169,7 +169,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Decl__fields[3] = {
const upb_msglayout google_api_expr_v1alpha1_Decl_msginit = {
&google_api_expr_v1alpha1_Decl_submsgs[0],
&google_api_expr_v1alpha1_Decl__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Decl_IdentDecl_submsgs[2] = {
@@ -178,15 +178,15 @@ static const upb_msglayout *const google_api_expr_v1alpha1_Decl_IdentDecl_submsg
};
static const upb_msglayout_field google_api_expr_v1alpha1_Decl_IdentDecl__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {2, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {1, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {2, UPB_SIZE(16, 32), 2, 0, 11, 1},
+ {3, UPB_SIZE(4, 8), 0, 0, 9, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Decl_IdentDecl_msginit = {
&google_api_expr_v1alpha1_Decl_IdentDecl_submsgs[0],
&google_api_expr_v1alpha1_Decl_IdentDecl__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Decl_FunctionDecl_submsgs[1] = {
@@ -200,10 +200,10 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Decl_FunctionDecl__fie
const upb_msglayout google_api_expr_v1alpha1_Decl_FunctionDecl_msginit = {
&google_api_expr_v1alpha1_Decl_FunctionDecl_submsgs[0],
&google_api_expr_v1alpha1_Decl_FunctionDecl__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_submsgs[2] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_submsgs[1] = {
&google_api_expr_v1alpha1_Type_msginit,
};
@@ -211,15 +211,15 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Decl_FunctionDecl_Over
{1, UPB_SIZE(4, 8), 0, 0, 9, 1},
{2, UPB_SIZE(24, 48), 0, 0, 11, 3},
{3, UPB_SIZE(28, 56), 0, 0, 9, 3},
- {4, UPB_SIZE(20, 40), 0, 0, 11, 1},
- {5, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {4, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {5, UPB_SIZE(1, 1), 0, 0, 8, 1},
{6, UPB_SIZE(12, 24), 0, 0, 9, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit = {
&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_submsgs[0],
&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload__fields[0],
- UPB_SIZE(32, 64), 6, false,
+ UPB_SIZE(32, 64), 6, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Reference_submsgs[1] = {
@@ -227,15 +227,15 @@ static const upb_msglayout *const google_api_expr_v1alpha1_Reference_submsgs[1]
};
static const upb_msglayout_field google_api_expr_v1alpha1_Reference__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 9, 3},
- {4, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(16, 32), 0, 0, 9, 3},
+ {4, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Reference_msginit = {
&google_api_expr_v1alpha1_Reference_submsgs[0],
&google_api_expr_v1alpha1_Reference__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h
index a5b9f0cb822..43a88f708bf 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -95,33 +96,40 @@ UPB_INLINE google_api_expr_v1alpha1_CheckedExpr *google_api_expr_v1alpha1_Checke
google_api_expr_v1alpha1_CheckedExpr *ret = google_api_expr_v1alpha1_CheckedExpr_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_CheckedExpr_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_CheckedExpr *google_api_expr_v1alpha1_CheckedExpr_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_CheckedExpr *ret = google_api_expr_v1alpha1_CheckedExpr_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_CheckedExpr_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_CheckedExpr_serialize(const google_api_expr_v1alpha1_CheckedExpr *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_CheckedExpr_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_reference_map(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_reference_map_size(const google_api_expr_v1alpha1_CheckedExpr *msg) {return _upb_msg_map_size(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_get(const google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Reference* *val) { return _upb_msg_map_get(msg, UPB_SIZE(8, 16), &key, sizeof(key), val, sizeof(*val)); }
-UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_next(const google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 16), iter); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_type_map(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_type_map_size(const google_api_expr_v1alpha1_CheckedExpr *msg) {return _upb_msg_map_size(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_get(const google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Type* *val) { return _upb_msg_map_get(msg, UPB_SIZE(12, 24), &key, sizeof(key), val, sizeof(*val)); }
-UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_next(const google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(12, 24), iter); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_expr(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_expr(const google_api_expr_v1alpha1_CheckedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const struct google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_source_info(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_source_info(const google_api_expr_v1alpha1_CheckedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_api_expr_v1alpha1_SourceInfo*); }
-
-UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_reference_map_clear(google_api_expr_v1alpha1_CheckedExpr *msg) { _upb_msg_map_clear(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_set(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Reference* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(8, 16), &key, sizeof(key), &val, sizeof(val), a); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_delete(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(8, 16), &key, sizeof(key)); }
-UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(8, 16), iter); }
-UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_type_map_clear(google_api_expr_v1alpha1_CheckedExpr *msg) { _upb_msg_map_clear(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_set(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Type* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(12, 24), &key, sizeof(key), &val, sizeof(val), a); }
-UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_delete(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(12, 24), &key, sizeof(key)); }
-UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(12, 24), iter); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_reference_map(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_reference_map_size(const google_api_expr_v1alpha1_CheckedExpr *msg) {return _upb_msg_map_size(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_get(const google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Reference* *val) { return _upb_msg_map_get(msg, UPB_SIZE(12, 24), &key, sizeof(key), val, sizeof(*val)); }
+UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_next(const google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (const google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(12, 24), iter); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_type_map(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE size_t google_api_expr_v1alpha1_CheckedExpr_type_map_size(const google_api_expr_v1alpha1_CheckedExpr *msg) {return _upb_msg_map_size(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_get(const google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Type* *val) { return _upb_msg_map_get(msg, UPB_SIZE(16, 32), &key, sizeof(key), val, sizeof(*val)); }
+UPB_INLINE const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_next(const google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (const google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_expr(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_expr(const google_api_expr_v1alpha1_CheckedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_has_source_info(const google_api_expr_v1alpha1_CheckedExpr *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_source_info(const google_api_expr_v1alpha1_CheckedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_api_expr_v1alpha1_SourceInfo*); }
+
+UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_reference_map_clear(google_api_expr_v1alpha1_CheckedExpr *msg) { _upb_msg_map_clear(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_set(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Reference* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(12, 24), &key, sizeof(key), &val, sizeof(val), a); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_reference_map_delete(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(12, 24), &key, sizeof(key)); }
+UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry* google_api_expr_v1alpha1_CheckedExpr_reference_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (google_api_expr_v1alpha1_CheckedExpr_ReferenceMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(12, 24), iter); }
+UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_type_map_clear(google_api_expr_v1alpha1_CheckedExpr *msg) { _upb_msg_map_clear(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_set(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key, google_api_expr_v1alpha1_Type* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(16, 32), &key, sizeof(key), &val, sizeof(val), a); }
+UPB_INLINE bool google_api_expr_v1alpha1_CheckedExpr_type_map_delete(google_api_expr_v1alpha1_CheckedExpr *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(16, 32), &key, sizeof(key)); }
+UPB_INLINE google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry* google_api_expr_v1alpha1_CheckedExpr_type_map_nextmutable(google_api_expr_v1alpha1_CheckedExpr *msg, size_t* iter) { return (google_api_expr_v1alpha1_CheckedExpr_TypeMapEntry*)_upb_msg_map_next(msg, UPB_SIZE(16, 32), iter); }
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_set_expr(google_api_expr_v1alpha1_CheckedExpr *msg, struct google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), struct google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_CheckedExpr_mutable_expr(google_api_expr_v1alpha1_CheckedExpr *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_CheckedExpr_expr(msg);
@@ -133,7 +141,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Checke
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_CheckedExpr_set_source_info(google_api_expr_v1alpha1_CheckedExpr *msg, struct google_api_expr_v1alpha1_SourceInfo* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_api_expr_v1alpha1_SourceInfo*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_api_expr_v1alpha1_SourceInfo*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_CheckedExpr_mutable_source_info(google_api_expr_v1alpha1_CheckedExpr *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_CheckedExpr_source_info(msg);
@@ -191,6 +200,12 @@ UPB_INLINE google_api_expr_v1alpha1_Type *google_api_expr_v1alpha1_Type_parse(co
google_api_expr_v1alpha1_Type *ret = google_api_expr_v1alpha1_Type_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Type *google_api_expr_v1alpha1_Type_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Type *ret = google_api_expr_v1alpha1_Type_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Type_serialize(const google_api_expr_v1alpha1_Type *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Type_msginit, arena, len);
}
@@ -353,15 +368,22 @@ UPB_INLINE google_api_expr_v1alpha1_Type_ListType *google_api_expr_v1alpha1_Type
google_api_expr_v1alpha1_Type_ListType *ret = google_api_expr_v1alpha1_Type_ListType_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_ListType_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Type_ListType *google_api_expr_v1alpha1_Type_ListType_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Type_ListType *ret = google_api_expr_v1alpha1_Type_ListType_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_ListType_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Type_ListType_serialize(const google_api_expr_v1alpha1_Type_ListType *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Type_ListType_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_Type_ListType_has_elem_type(const google_api_expr_v1alpha1_Type_ListType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_elem_type(const google_api_expr_v1alpha1_Type_ListType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const google_api_expr_v1alpha1_Type*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Type_ListType_has_elem_type(const google_api_expr_v1alpha1_Type_ListType *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_elem_type(const google_api_expr_v1alpha1_Type_ListType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
UPB_INLINE void google_api_expr_v1alpha1_Type_ListType_set_elem_type(google_api_expr_v1alpha1_Type_ListType *msg, google_api_expr_v1alpha1_Type* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_ListType_mutable_elem_type(google_api_expr_v1alpha1_Type_ListType *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_ListType_elem_type(msg);
@@ -383,17 +405,24 @@ UPB_INLINE google_api_expr_v1alpha1_Type_MapType *google_api_expr_v1alpha1_Type_
google_api_expr_v1alpha1_Type_MapType *ret = google_api_expr_v1alpha1_Type_MapType_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_MapType_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Type_MapType *google_api_expr_v1alpha1_Type_MapType_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Type_MapType *ret = google_api_expr_v1alpha1_Type_MapType_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_MapType_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Type_MapType_serialize(const google_api_expr_v1alpha1_Type_MapType *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Type_MapType_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_key_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_key_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const google_api_expr_v1alpha1_Type*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_value_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_value_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_key_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_key_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Type_MapType_has_value_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_value_type(const google_api_expr_v1alpha1_Type_MapType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_Type*); }
UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_set_key_type(google_api_expr_v1alpha1_Type_MapType *msg, google_api_expr_v1alpha1_Type* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_mutable_key_type(google_api_expr_v1alpha1_Type_MapType *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_MapType_key_type(msg);
@@ -405,7 +434,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_M
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Type_MapType_set_value_type(google_api_expr_v1alpha1_Type_MapType *msg, google_api_expr_v1alpha1_Type* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_Type*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_MapType_mutable_value_type(google_api_expr_v1alpha1_Type_MapType *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_MapType_value_type(msg);
@@ -427,17 +457,24 @@ UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType *google_api_expr_v1alpha1_
google_api_expr_v1alpha1_Type_FunctionType *ret = google_api_expr_v1alpha1_Type_FunctionType_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_FunctionType_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Type_FunctionType *google_api_expr_v1alpha1_Type_FunctionType_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Type_FunctionType *ret = google_api_expr_v1alpha1_Type_FunctionType_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_FunctionType_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Type_FunctionType_serialize(const google_api_expr_v1alpha1_Type_FunctionType *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Type_FunctionType_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_result_type(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_result_type(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const google_api_expr_v1alpha1_Type*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_arg_types(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Type_FunctionType_arg_types(const google_api_expr_v1alpha1_Type_FunctionType *msg, size_t *len) { return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len); }
+UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_result_type(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_result_type(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Type*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Type_FunctionType_has_arg_types(const google_api_expr_v1alpha1_Type_FunctionType *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Type_FunctionType_arg_types(const google_api_expr_v1alpha1_Type_FunctionType *msg, size_t *len) { return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(8, 16), len); }
UPB_INLINE void google_api_expr_v1alpha1_Type_FunctionType_set_result_type(google_api_expr_v1alpha1_Type_FunctionType *msg, google_api_expr_v1alpha1_Type* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Type*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Type*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_mutable_result_type(google_api_expr_v1alpha1_Type_FunctionType *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Type_FunctionType_result_type(msg);
@@ -449,15 +486,15 @@ UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_F
return sub;
}
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_FunctionType_mutable_arg_types(google_api_expr_v1alpha1_Type_FunctionType *msg, size_t *len) {
- return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
+ return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_FunctionType_resize_arg_types(google_api_expr_v1alpha1_Type_FunctionType *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_FunctionType_add_arg_types(google_api_expr_v1alpha1_Type_FunctionType *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -472,6 +509,12 @@ UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType *google_api_expr_v1alpha1_
google_api_expr_v1alpha1_Type_AbstractType *ret = google_api_expr_v1alpha1_Type_AbstractType_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_AbstractType_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Type_AbstractType *google_api_expr_v1alpha1_Type_AbstractType_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Type_AbstractType *ret = google_api_expr_v1alpha1_Type_AbstractType_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Type_AbstractType_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Type_AbstractType_serialize(const google_api_expr_v1alpha1_Type_AbstractType *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Type_AbstractType_msginit, arena, len);
}
@@ -487,12 +530,12 @@ UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_Abstrac
return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Type_AbstractType_resize_parameter_types(google_api_expr_v1alpha1_Type_AbstractType *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Type_AbstractType_add_parameter_types(google_api_expr_v1alpha1_Type_AbstractType *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -507,6 +550,12 @@ UPB_INLINE google_api_expr_v1alpha1_Decl *google_api_expr_v1alpha1_Decl_parse(co
google_api_expr_v1alpha1_Decl *ret = google_api_expr_v1alpha1_Decl_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Decl *google_api_expr_v1alpha1_Decl_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Decl *ret = google_api_expr_v1alpha1_Decl_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Decl_serialize(const google_api_expr_v1alpha1_Decl *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Decl_msginit, arena, len);
}
@@ -562,18 +611,25 @@ UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl *google_api_expr_v1alpha1_Dec
google_api_expr_v1alpha1_Decl_IdentDecl *ret = google_api_expr_v1alpha1_Decl_IdentDecl_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Decl_IdentDecl *google_api_expr_v1alpha1_Decl_IdentDecl_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Decl_IdentDecl *ret = google_api_expr_v1alpha1_Decl_IdentDecl_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Decl_IdentDecl_serialize(const google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Decl_IdentDecl_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_type(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_type(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_Type*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_value(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_value(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_api_expr_v1alpha1_Constant*); }
-UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_IdentDecl_doc(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_type(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_type(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_api_expr_v1alpha1_Type*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Decl_IdentDecl_has_value(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_value(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_api_expr_v1alpha1_Constant*); }
+UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_IdentDecl_doc(const google_api_expr_v1alpha1_Decl_IdentDecl *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_type(google_api_expr_v1alpha1_Decl_IdentDecl *msg, google_api_expr_v1alpha1_Type* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_Type*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_api_expr_v1alpha1_Type*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_IdentDecl_mutable_type(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)google_api_expr_v1alpha1_Decl_IdentDecl_type(msg);
@@ -585,7 +641,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_I
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_value(google_api_expr_v1alpha1_Decl_IdentDecl *msg, struct google_api_expr_v1alpha1_Constant* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_api_expr_v1alpha1_Constant*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_api_expr_v1alpha1_Constant*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Decl_IdentDecl_mutable_value(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Decl_IdentDecl_value(msg);
@@ -597,7 +654,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_De
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Decl_IdentDecl_set_doc(google_api_expr_v1alpha1_Decl_IdentDecl *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
/* google.api.expr.v1alpha1.Decl.FunctionDecl */
@@ -610,6 +667,12 @@ UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl *google_api_expr_v1alpha1_
google_api_expr_v1alpha1_Decl_FunctionDecl *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl *google_api_expr_v1alpha1_Decl_FunctionDecl_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Decl_FunctionDecl *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Decl_FunctionDecl_serialize(const google_api_expr_v1alpha1_Decl_FunctionDecl *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_msginit, arena, len);
}
@@ -621,12 +684,12 @@ UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload** google_api_expr
return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload** google_api_expr_v1alpha1_Decl_FunctionDecl_resize_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Decl_FunctionDecl_Overload**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* google_api_expr_v1alpha1_Decl_FunctionDecl_add_overloads(google_api_expr_v1alpha1_Decl_FunctionDecl *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload* sub = (struct google_api_expr_v1alpha1_Decl_FunctionDecl_Overload*)_upb_msg_new(&google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -641,6 +704,12 @@ UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *google_api_expr_
google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *ret = google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_serialize(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_msginit, arena, len);
}
@@ -649,9 +718,9 @@ UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_overl
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
UPB_INLINE const google_api_expr_v1alpha1_Type* const* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t *len) { return (const google_api_expr_v1alpha1_Type* const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
UPB_INLINE upb_strview const* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_type_params(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
-UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
+UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_has_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_result_type(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const google_api_expr_v1alpha1_Type*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_is_instance_function(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_is_instance_function(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE upb_strview google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_doc(const google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_overload_id(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_strview value) {
@@ -661,12 +730,12 @@ UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Decl_Functio
return (google_api_expr_v1alpha1_Type**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE google_api_expr_v1alpha1_Type** google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_resize_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Type**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_add_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Type* sub = (struct google_api_expr_v1alpha1_Type*)_upb_msg_new(&google_api_expr_v1alpha1_Type_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -674,13 +743,14 @@ UPB_INLINE upb_strview* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_muta
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE upb_strview* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_resize_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_add_type_params(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_result_type(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, google_api_expr_v1alpha1_Type* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), google_api_expr_v1alpha1_Type*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_mutable_result_type(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_arena *arena) {
@@ -693,7 +763,7 @@ UPB_INLINE struct google_api_expr_v1alpha1_Type* google_api_expr_v1alpha1_Decl_F
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_is_instance_function(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void google_api_expr_v1alpha1_Decl_FunctionDecl_Overload_set_doc(google_api_expr_v1alpha1_Decl_FunctionDecl_Overload *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
@@ -709,30 +779,37 @@ UPB_INLINE google_api_expr_v1alpha1_Reference *google_api_expr_v1alpha1_Referenc
google_api_expr_v1alpha1_Reference *ret = google_api_expr_v1alpha1_Reference_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Reference_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Reference *google_api_expr_v1alpha1_Reference_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Reference *ret = google_api_expr_v1alpha1_Reference_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Reference_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Reference_serialize(const google_api_expr_v1alpha1_Reference *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Reference_msginit, arena, len);
}
-UPB_INLINE upb_strview google_api_expr_v1alpha1_Reference_name(const google_api_expr_v1alpha1_Reference *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE upb_strview const* google_api_expr_v1alpha1_Reference_overload_id(const google_api_expr_v1alpha1_Reference *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
-UPB_INLINE bool google_api_expr_v1alpha1_Reference_has_value(const google_api_expr_v1alpha1_Reference *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_value(const google_api_expr_v1alpha1_Reference *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_api_expr_v1alpha1_Constant*); }
+UPB_INLINE upb_strview google_api_expr_v1alpha1_Reference_name(const google_api_expr_v1alpha1_Reference *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview const* google_api_expr_v1alpha1_Reference_overload_id(const google_api_expr_v1alpha1_Reference *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
+UPB_INLINE bool google_api_expr_v1alpha1_Reference_has_value(const google_api_expr_v1alpha1_Reference *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_value(const google_api_expr_v1alpha1_Reference *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_api_expr_v1alpha1_Constant*); }
UPB_INLINE void google_api_expr_v1alpha1_Reference_set_name(google_api_expr_v1alpha1_Reference *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE upb_strview* google_api_expr_v1alpha1_Reference_mutable_overload_id(google_api_expr_v1alpha1_Reference *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE upb_strview* google_api_expr_v1alpha1_Reference_resize_overload_id(google_api_expr_v1alpha1_Reference *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_api_expr_v1alpha1_Reference_add_overload_id(google_api_expr_v1alpha1_Reference *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(12, 24), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(16, 32), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void google_api_expr_v1alpha1_Reference_set_value(google_api_expr_v1alpha1_Reference *msg, struct google_api_expr_v1alpha1_Constant* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_api_expr_v1alpha1_Constant*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_api_expr_v1alpha1_Constant*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Constant* google_api_expr_v1alpha1_Reference_mutable_value(google_api_expr_v1alpha1_Reference *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Constant* sub = (struct google_api_expr_v1alpha1_Constant*)google_api_expr_v1alpha1_Reference_value(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c
index 0169d39b4dd..4bbf5758615 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c
@@ -21,14 +21,14 @@ static const upb_msglayout *const google_api_expr_v1alpha1_ParsedExpr_submsgs[2]
};
static const upb_msglayout_field google_api_expr_v1alpha1_ParsedExpr__fields[2] = {
- {2, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {3, UPB_SIZE(4, 8), 0, 1, 11, 1},
+ {2, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {3, UPB_SIZE(8, 16), 2, 1, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_ParsedExpr_msginit = {
&google_api_expr_v1alpha1_ParsedExpr_submsgs[0],
&google_api_expr_v1alpha1_ParsedExpr__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_submsgs[7] = {
@@ -55,7 +55,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Expr__fields[8] = {
const upb_msglayout google_api_expr_v1alpha1_Expr_msginit = {
&google_api_expr_v1alpha1_Expr_submsgs[0],
&google_api_expr_v1alpha1_Expr__fields[0],
- UPB_SIZE(16, 24), 8, false,
+ UPB_SIZE(16, 24), 8, false, 255,
};
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Ident__fields[1] = {
@@ -65,7 +65,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Ident__fields[1]
const upb_msglayout google_api_expr_v1alpha1_Expr_Ident_msginit = {
NULL,
&google_api_expr_v1alpha1_Expr_Ident__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Select_submsgs[1] = {
@@ -73,31 +73,31 @@ static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Select_submsgs[1
};
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Select__fields[3] = {
- {1, UPB_SIZE(12, 24), 0, 0, 11, 1},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
{2, UPB_SIZE(4, 8), 0, 0, 9, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 8, 1},
+ {3, UPB_SIZE(1, 1), 0, 0, 8, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Expr_Select_msginit = {
&google_api_expr_v1alpha1_Expr_Select_submsgs[0],
&google_api_expr_v1alpha1_Expr_Select__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Call_submsgs[2] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Call_submsgs[1] = {
&google_api_expr_v1alpha1_Expr_msginit,
};
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Call__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 3},
+ {1, UPB_SIZE(12, 24), 1, 0, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(16, 32), 0, 0, 11, 3},
};
const upb_msglayout google_api_expr_v1alpha1_Expr_Call_msginit = {
&google_api_expr_v1alpha1_Expr_Call_submsgs[0],
&google_api_expr_v1alpha1_Expr_Call__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateList_submsgs[1] = {
@@ -111,7 +111,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Expr_CreateList__field
const upb_msglayout google_api_expr_v1alpha1_Expr_CreateList_msginit = {
&google_api_expr_v1alpha1_Expr_CreateList_submsgs[0],
&google_api_expr_v1alpha1_Expr_CreateList__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateStruct_submsgs[1] = {
@@ -126,44 +126,44 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Expr_CreateStruct__fie
const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_msginit = {
&google_api_expr_v1alpha1_Expr_CreateStruct_submsgs[0],
&google_api_expr_v1alpha1_Expr_CreateStruct__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateStruct_Entry_submsgs[2] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Expr_CreateStruct_Entry_submsgs[1] = {
&google_api_expr_v1alpha1_Expr_msginit,
};
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_CreateStruct_Entry__fields[4] = {
- {1, UPB_SIZE(0, 0), 0, 0, 3, 1},
- {2, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 9, 1},
- {3, UPB_SIZE(12, 16), UPB_SIZE(-21, -33), 0, 11, 1},
- {4, UPB_SIZE(8, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(8, 8), 0, 0, 3, 1},
+ {2, UPB_SIZE(20, 24), UPB_SIZE(-29, -41), 0, 9, 1},
+ {3, UPB_SIZE(20, 24), UPB_SIZE(-29, -41), 0, 11, 1},
+ {4, UPB_SIZE(16, 16), 1, 0, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit = {
&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_submsgs[0],
&google_api_expr_v1alpha1_Expr_CreateStruct_Entry__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(32, 48), 4, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Comprehension_submsgs[5] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_Expr_Comprehension_submsgs[1] = {
&google_api_expr_v1alpha1_Expr_msginit,
};
static const upb_msglayout_field google_api_expr_v1alpha1_Expr_Comprehension__fields[7] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {4, UPB_SIZE(20, 40), 0, 0, 11, 1},
- {5, UPB_SIZE(24, 48), 0, 0, 11, 1},
- {6, UPB_SIZE(28, 56), 0, 0, 11, 1},
- {7, UPB_SIZE(32, 64), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(20, 40), 1, 0, 11, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {4, UPB_SIZE(24, 48), 2, 0, 11, 1},
+ {5, UPB_SIZE(28, 56), 3, 0, 11, 1},
+ {6, UPB_SIZE(32, 64), 4, 0, 11, 1},
+ {7, UPB_SIZE(36, 72), 5, 0, 11, 1},
};
const upb_msglayout google_api_expr_v1alpha1_Expr_Comprehension_msginit = {
&google_api_expr_v1alpha1_Expr_Comprehension_submsgs[0],
&google_api_expr_v1alpha1_Expr_Comprehension__fields[0],
- UPB_SIZE(40, 80), 7, false,
+ UPB_SIZE(40, 80), 7, false, 255,
};
static const upb_msglayout *const google_api_expr_v1alpha1_Constant_submsgs[2] = {
@@ -186,24 +186,26 @@ static const upb_msglayout_field google_api_expr_v1alpha1_Constant__fields[9] =
const upb_msglayout google_api_expr_v1alpha1_Constant_msginit = {
&google_api_expr_v1alpha1_Constant_submsgs[0],
&google_api_expr_v1alpha1_Constant__fields[0],
- UPB_SIZE(16, 32), 9, false,
+ UPB_SIZE(16, 32), 9, false, 255,
};
-static const upb_msglayout *const google_api_expr_v1alpha1_SourceInfo_submsgs[1] = {
+static const upb_msglayout *const google_api_expr_v1alpha1_SourceInfo_submsgs[2] = {
+ &google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_msginit,
&google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit,
};
-static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo__fields[4] = {
+static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo__fields[5] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
{2, UPB_SIZE(8, 16), 0, 0, 9, 1},
{3, UPB_SIZE(16, 32), 0, 0, 5, _UPB_LABEL_PACKED},
- {4, UPB_SIZE(20, 40), 0, 0, 11, _UPB_LABEL_MAP},
+ {4, UPB_SIZE(20, 40), 0, 1, 11, _UPB_LABEL_MAP},
+ {5, UPB_SIZE(24, 48), 0, 0, 11, _UPB_LABEL_MAP},
};
const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit = {
&google_api_expr_v1alpha1_SourceInfo_submsgs[0],
&google_api_expr_v1alpha1_SourceInfo__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(32, 64), 5, false, 255,
};
static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo_PositionsEntry__fields[2] = {
@@ -214,7 +216,22 @@ static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo_PositionsEn
const upb_msglayout google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit = {
NULL,
&google_api_expr_v1alpha1_SourceInfo_PositionsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+static const upb_msglayout *const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_submsgs[1] = {
+ &google_api_expr_v1alpha1_Expr_msginit,
+};
+
+static const upb_msglayout_field google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 3, 1},
+ {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+};
+
+const upb_msglayout google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_msginit = {
+ &google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_submsgs[0],
+ &google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field google_api_expr_v1alpha1_SourcePosition__fields[4] = {
@@ -227,7 +244,7 @@ static const upb_msglayout_field google_api_expr_v1alpha1_SourcePosition__fields
const upb_msglayout google_api_expr_v1alpha1_SourcePosition_msginit = {
NULL,
&google_api_expr_v1alpha1_SourcePosition__fields[0],
- UPB_SIZE(24, 32), 4, false,
+ UPB_SIZE(24, 32), 4, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h
index 6c4b7f81eb1..ffa7925ab35 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -31,6 +32,7 @@ struct google_api_expr_v1alpha1_Expr_Comprehension;
struct google_api_expr_v1alpha1_Constant;
struct google_api_expr_v1alpha1_SourceInfo;
struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry;
+struct google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry;
struct google_api_expr_v1alpha1_SourcePosition;
typedef struct google_api_expr_v1alpha1_ParsedExpr google_api_expr_v1alpha1_ParsedExpr;
typedef struct google_api_expr_v1alpha1_Expr google_api_expr_v1alpha1_Expr;
@@ -44,6 +46,7 @@ typedef struct google_api_expr_v1alpha1_Expr_Comprehension google_api_expr_v1alp
typedef struct google_api_expr_v1alpha1_Constant google_api_expr_v1alpha1_Constant;
typedef struct google_api_expr_v1alpha1_SourceInfo google_api_expr_v1alpha1_SourceInfo;
typedef struct google_api_expr_v1alpha1_SourceInfo_PositionsEntry google_api_expr_v1alpha1_SourceInfo_PositionsEntry;
+typedef struct google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry;
typedef struct google_api_expr_v1alpha1_SourcePosition google_api_expr_v1alpha1_SourcePosition;
extern const upb_msglayout google_api_expr_v1alpha1_ParsedExpr_msginit;
extern const upb_msglayout google_api_expr_v1alpha1_Expr_msginit;
@@ -57,6 +60,7 @@ extern const upb_msglayout google_api_expr_v1alpha1_Expr_Comprehension_msginit;
extern const upb_msglayout google_api_expr_v1alpha1_Constant_msginit;
extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_msginit;
extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_PositionsEntry_msginit;
+extern const upb_msglayout google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_msginit;
extern const upb_msglayout google_api_expr_v1alpha1_SourcePosition_msginit;
struct google_protobuf_Duration;
struct google_protobuf_Timestamp;
@@ -74,17 +78,24 @@ UPB_INLINE google_api_expr_v1alpha1_ParsedExpr *google_api_expr_v1alpha1_ParsedE
google_api_expr_v1alpha1_ParsedExpr *ret = google_api_expr_v1alpha1_ParsedExpr_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_ParsedExpr_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_ParsedExpr *google_api_expr_v1alpha1_ParsedExpr_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_ParsedExpr *ret = google_api_expr_v1alpha1_ParsedExpr_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_ParsedExpr_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_ParsedExpr_serialize(const google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_ParsedExpr_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_SourceInfo*); }
+UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_expr(const google_api_expr_v1alpha1_ParsedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE bool google_api_expr_v1alpha1_ParsedExpr_has_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_source_info(const google_api_expr_v1alpha1_ParsedExpr *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_SourceInfo*); }
UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_expr(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_ParsedExpr_mutable_expr(google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_ParsedExpr_expr(msg);
@@ -96,7 +107,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Parsed
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_ParsedExpr_set_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, google_api_expr_v1alpha1_SourceInfo* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), google_api_expr_v1alpha1_SourceInfo*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_SourceInfo*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_SourceInfo* google_api_expr_v1alpha1_ParsedExpr_mutable_source_info(google_api_expr_v1alpha1_ParsedExpr *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_SourceInfo* sub = (struct google_api_expr_v1alpha1_SourceInfo*)google_api_expr_v1alpha1_ParsedExpr_source_info(msg);
@@ -118,6 +130,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr *google_api_expr_v1alpha1_Expr_parse(co
google_api_expr_v1alpha1_Expr *ret = google_api_expr_v1alpha1_Expr_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr *google_api_expr_v1alpha1_Expr_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr *ret = google_api_expr_v1alpha1_Expr_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_serialize(const google_api_expr_v1alpha1_Expr *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_msginit, arena, len);
}
@@ -248,6 +266,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_Ident *google_api_expr_v1alpha1_Expr_Id
google_api_expr_v1alpha1_Expr_Ident *ret = google_api_expr_v1alpha1_Expr_Ident_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Ident_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_Ident *google_api_expr_v1alpha1_Expr_Ident_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_Ident *ret = google_api_expr_v1alpha1_Expr_Ident_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Ident_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Ident_serialize(const google_api_expr_v1alpha1_Expr_Ident *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Ident_msginit, arena, len);
}
@@ -268,16 +292,23 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_Select *google_api_expr_v1alpha1_Expr_S
google_api_expr_v1alpha1_Expr_Select *ret = google_api_expr_v1alpha1_Expr_Select_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Select_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_Select *google_api_expr_v1alpha1_Expr_Select_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_Select *ret = google_api_expr_v1alpha1_Expr_Select_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Select_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Select_serialize(const google_api_expr_v1alpha1_Expr_Select *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Select_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_has_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_has_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_operand(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_api_expr_v1alpha1_Expr*); }
UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Select_field(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_test_only(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Select_test_only(const google_api_expr_v1alpha1_Expr_Select *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_operand(google_api_expr_v1alpha1_Expr_Select *msg, google_api_expr_v1alpha1_Expr* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Select_mutable_operand(google_api_expr_v1alpha1_Expr_Select *msg, upb_arena *arena) {
@@ -293,7 +324,7 @@ UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_field(google_api_expr_v
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Select_set_test_only(google_api_expr_v1alpha1_Expr_Select *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
/* google.api.expr.v1alpha1.Expr.Call */
@@ -306,18 +337,25 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_Call *google_api_expr_v1alpha1_Expr_Cal
google_api_expr_v1alpha1_Expr_Call *ret = google_api_expr_v1alpha1_Expr_Call_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Call_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_Call *google_api_expr_v1alpha1_Expr_Call_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_Call *ret = google_api_expr_v1alpha1_Expr_Call_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Call_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Call_serialize(const google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Call_msginit, arena, len);
}
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Call_function(const google_api_expr_v1alpha1_Expr_Call *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_args(const google_api_expr_v1alpha1_Expr_Call *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_Call_args(const google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(12, 24), len); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_target(const google_api_expr_v1alpha1_Expr_Call *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Call_function(const google_api_expr_v1alpha1_Expr_Call *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Call_has_args(const google_api_expr_v1alpha1_Expr_Call *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* const* google_api_expr_v1alpha1_Expr_Call_args(const google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) { return (const google_api_expr_v1alpha1_Expr* const*)_upb_array_accessor(msg, UPB_SIZE(16, 32), len); }
UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_target(google_api_expr_v1alpha1_Expr_Call *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_mutable_target(google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Call_target(msg);
@@ -329,18 +367,18 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Call_set_function(google_api_expr_v1alpha1_Expr_Call *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_mutable_args(google_api_expr_v1alpha1_Expr_Call *msg, size_t *len) {
- return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
+ return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_Call_resize_args(google_api_expr_v1alpha1_Expr_Call *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Call_add_args(google_api_expr_v1alpha1_Expr_Call *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -355,6 +393,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList *google_api_expr_v1alpha1_Ex
google_api_expr_v1alpha1_Expr_CreateList *ret = google_api_expr_v1alpha1_Expr_CreateList_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateList_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_CreateList *google_api_expr_v1alpha1_Expr_CreateList_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_CreateList *ret = google_api_expr_v1alpha1_Expr_CreateList_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateList_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateList_serialize(const google_api_expr_v1alpha1_Expr_CreateList *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateList_msginit, arena, len);
}
@@ -366,12 +410,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateL
return (google_api_expr_v1alpha1_Expr**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_api_expr_v1alpha1_Expr** google_api_expr_v1alpha1_Expr_CreateList_resize_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Expr**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateList_add_elements(google_api_expr_v1alpha1_Expr_CreateList *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -386,6 +430,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct *google_api_expr_v1alpha1_
google_api_expr_v1alpha1_Expr_CreateStruct *ret = google_api_expr_v1alpha1_Expr_CreateStruct_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct *google_api_expr_v1alpha1_Expr_CreateStruct_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_CreateStruct *ret = google_api_expr_v1alpha1_Expr_CreateStruct_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateStruct_serialize(const google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_msginit, arena, len);
}
@@ -401,12 +451,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1
return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry** google_api_expr_v1alpha1_Expr_CreateStruct_resize_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, size_t len, upb_arena *arena) {
- return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* google_api_expr_v1alpha1_Expr_CreateStruct_add_entries(google_api_expr_v1alpha1_Expr_CreateStruct *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry* sub = (struct google_api_expr_v1alpha1_Expr_CreateStruct_Entry*)_upb_msg_new(&google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 16), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -421,6 +471,12 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry *google_api_expr_v1a
google_api_expr_v1alpha1_Expr_CreateStruct_Entry *ret = google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_CreateStruct_Entry *ret = google_api_expr_v1alpha1_Expr_CreateStruct_Entry_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_CreateStruct_Entry_serialize(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_CreateStruct_Entry_msginit, arena, len);
}
@@ -430,24 +486,24 @@ typedef enum {
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_map_key = 3,
google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_NOT_SET = 0
} google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases;
-UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_case(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) { return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(20, 32), int32_t); }
+UPB_INLINE google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_case(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry* msg) { return (google_api_expr_v1alpha1_Expr_CreateStruct_Entry_key_kind_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(28, 40), int32_t); }
-UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_CreateStruct_Entry_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 2; }
-UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_Entry_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 2, upb_strview_make("", strlen(""))); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(20, 32)) == 3; }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 16), UPB_SIZE(20, 32), 3, NULL); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 8)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE int64_t google_api_expr_v1alpha1_Expr_CreateStruct_Entry_id(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 40)) == 2; }
+UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_CreateStruct_Entry_field_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(20, 24), UPB_SIZE(28, 40), 2, upb_strview_make("", strlen(""))); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(28, 40)) == 3; }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return UPB_READ_ONEOF(msg, const google_api_expr_v1alpha1_Expr*, UPB_SIZE(20, 24), UPB_SIZE(28, 40), 3, NULL); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_CreateStruct_Entry_has_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(const google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), const google_api_expr_v1alpha1_Expr*); }
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_id(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, int64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_field_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 2);
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(20, 24), value, UPB_SIZE(28, 40), 2);
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) {
- UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(12, 16), value, UPB_SIZE(20, 32), 3);
+ UPB_WRITE_ONEOF(msg, google_api_expr_v1alpha1_Expr*, UPB_SIZE(20, 24), value, UPB_SIZE(28, 40), 3);
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_map_key(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_map_key(msg);
@@ -459,7 +515,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_CreateStruct_Entry_set_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_CreateStruct_Entry_mutable_value(google_api_expr_v1alpha1_Expr_CreateStruct_Entry *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_CreateStruct_Entry_value(msg);
@@ -481,28 +538,35 @@ UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension *google_api_expr_v1alpha1
google_api_expr_v1alpha1_Expr_Comprehension *ret = google_api_expr_v1alpha1_Expr_Comprehension_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Expr_Comprehension *google_api_expr_v1alpha1_Expr_Comprehension_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Expr_Comprehension *ret = google_api_expr_v1alpha1_Expr_Comprehension_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Expr_Comprehension_serialize(const google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Expr_Comprehension_msginit, arena, len);
}
-UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_api_expr_v1alpha1_Expr*); }
-UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 64)); }
-UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_iter_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_iter_range(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE upb_strview google_api_expr_v1alpha1_Expr_Comprehension_accu_var(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_accu_init(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_loop_step(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_api_expr_v1alpha1_Expr*); }
+UPB_INLINE bool google_api_expr_v1alpha1_Expr_Comprehension_has_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_result(const google_api_expr_v1alpha1_Expr_Comprehension *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 72), const google_api_expr_v1alpha1_Expr*); }
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_iter_range(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_iter_range(msg);
@@ -514,10 +578,11 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_var(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 48), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_accu_init(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_accu_init(msg);
@@ -529,7 +594,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 48), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_condition(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_condition(msg);
@@ -541,7 +607,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_loop_step(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_loop_step(msg);
@@ -553,7 +620,8 @@ UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_C
return sub;
}
UPB_INLINE void google_api_expr_v1alpha1_Expr_Comprehension_set_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, google_api_expr_v1alpha1_Expr* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_api_expr_v1alpha1_Expr*) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 72), google_api_expr_v1alpha1_Expr*) = value;
}
UPB_INLINE struct google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_Expr_Comprehension_mutable_result(google_api_expr_v1alpha1_Expr_Comprehension *msg, upb_arena *arena) {
struct google_api_expr_v1alpha1_Expr* sub = (struct google_api_expr_v1alpha1_Expr*)google_api_expr_v1alpha1_Expr_Comprehension_result(msg);
@@ -575,6 +643,12 @@ UPB_INLINE google_api_expr_v1alpha1_Constant *google_api_expr_v1alpha1_Constant_
google_api_expr_v1alpha1_Constant *ret = google_api_expr_v1alpha1_Constant_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Constant_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_Constant *google_api_expr_v1alpha1_Constant_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_Constant *ret = google_api_expr_v1alpha1_Constant_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_Constant_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_Constant_serialize(const google_api_expr_v1alpha1_Constant *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_Constant_msginit, arena, len);
}
@@ -668,6 +742,12 @@ UPB_INLINE google_api_expr_v1alpha1_SourceInfo *google_api_expr_v1alpha1_SourceI
google_api_expr_v1alpha1_SourceInfo *ret = google_api_expr_v1alpha1_SourceInfo_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_SourceInfo *google_api_expr_v1alpha1_SourceInfo_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_SourceInfo *ret = google_api_expr_v1alpha1_SourceInfo_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourceInfo_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_SourceInfo_serialize(const google_api_expr_v1alpha1_SourceInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_SourceInfo_msginit, arena, len);
}
@@ -679,6 +759,10 @@ UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_has_positions(const google_a
UPB_INLINE size_t google_api_expr_v1alpha1_SourceInfo_positions_size(const google_api_expr_v1alpha1_SourceInfo *msg) {return _upb_msg_map_size(msg, UPB_SIZE(20, 40)); }
UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_get(const google_api_expr_v1alpha1_SourceInfo *msg, int64_t key, int32_t *val) { return _upb_msg_map_get(msg, UPB_SIZE(20, 40), &key, sizeof(key), val, sizeof(*val)); }
UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_positions_next(const google_api_expr_v1alpha1_SourceInfo *msg, size_t* iter) { return (const google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); }
+UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_has_macro_calls(const google_api_expr_v1alpha1_SourceInfo *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE size_t google_api_expr_v1alpha1_SourceInfo_macro_calls_size(const google_api_expr_v1alpha1_SourceInfo *msg) {return _upb_msg_map_size(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_macro_calls_get(const google_api_expr_v1alpha1_SourceInfo *msg, int64_t key, google_api_expr_v1alpha1_Expr* *val) { return _upb_msg_map_get(msg, UPB_SIZE(24, 48), &key, sizeof(key), val, sizeof(*val)); }
+UPB_INLINE const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* google_api_expr_v1alpha1_SourceInfo_macro_calls_next(const google_api_expr_v1alpha1_SourceInfo *msg, size_t* iter) { return (const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 48), iter); }
UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_set_syntax_version(google_api_expr_v1alpha1_SourceInfo *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
@@ -690,16 +774,20 @@ UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_mutable_line_offsets(goo
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE int32_t* google_api_expr_v1alpha1_SourceInfo_resize_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, 2, arena);
}
UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_add_line_offsets(google_api_expr_v1alpha1_SourceInfo *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(16, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(16, 32), 2, &val,
arena);
}
UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_positions_clear(google_api_expr_v1alpha1_SourceInfo *msg) { _upb_msg_map_clear(msg, UPB_SIZE(20, 40)); }
UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_set(google_api_expr_v1alpha1_SourceInfo *msg, int64_t key, int32_t val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(20, 40), &key, sizeof(key), &val, sizeof(val), a); }
UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_positions_delete(google_api_expr_v1alpha1_SourceInfo *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(20, 40), &key, sizeof(key)); }
UPB_INLINE google_api_expr_v1alpha1_SourceInfo_PositionsEntry* google_api_expr_v1alpha1_SourceInfo_positions_nextmutable(google_api_expr_v1alpha1_SourceInfo *msg, size_t* iter) { return (google_api_expr_v1alpha1_SourceInfo_PositionsEntry*)_upb_msg_map_next(msg, UPB_SIZE(20, 40), iter); }
+UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_macro_calls_clear(google_api_expr_v1alpha1_SourceInfo *msg) { _upb_msg_map_clear(msg, UPB_SIZE(24, 48)); }
+UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_macro_calls_set(google_api_expr_v1alpha1_SourceInfo *msg, int64_t key, google_api_expr_v1alpha1_Expr* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(24, 48), &key, sizeof(key), &val, sizeof(val), a); }
+UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_macro_calls_delete(google_api_expr_v1alpha1_SourceInfo *msg, int64_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(24, 48), &key, sizeof(key)); }
+UPB_INLINE google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry* google_api_expr_v1alpha1_SourceInfo_macro_calls_nextmutable(google_api_expr_v1alpha1_SourceInfo *msg, size_t* iter) { return (google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry*)_upb_msg_map_next(msg, UPB_SIZE(24, 48), iter); }
/* google.api.expr.v1alpha1.SourceInfo.PositionsEntry */
@@ -718,6 +806,24 @@ UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_PositionsEntry_set_value(goo
_upb_msg_map_set_value(msg, &value, sizeof(int32_t));
}
+/* google.api.expr.v1alpha1.SourceInfo.MacroCallsEntry */
+
+UPB_INLINE int64_t google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_key(const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry *msg) {
+ int64_t ret;
+ _upb_msg_map_key(msg, &ret, sizeof(ret));
+ return ret;
+}
+UPB_INLINE bool google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_has_value(const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
+UPB_INLINE const google_api_expr_v1alpha1_Expr* google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_value(const google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry *msg) {
+ google_api_expr_v1alpha1_Expr* ret;
+ _upb_msg_map_value(msg, &ret, sizeof(ret));
+ return ret;
+}
+
+UPB_INLINE void google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry_set_value(google_api_expr_v1alpha1_SourceInfo_MacroCallsEntry *msg, google_api_expr_v1alpha1_Expr* value) {
+ _upb_msg_map_set_value(msg, &value, sizeof(google_api_expr_v1alpha1_Expr*));
+}
+
/* google.api.expr.v1alpha1.SourcePosition */
UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_SourcePosition_new(upb_arena *arena) {
@@ -728,6 +834,12 @@ UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_Sou
google_api_expr_v1alpha1_SourcePosition *ret = google_api_expr_v1alpha1_SourcePosition_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourcePosition_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_expr_v1alpha1_SourcePosition *google_api_expr_v1alpha1_SourcePosition_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_expr_v1alpha1_SourcePosition *ret = google_api_expr_v1alpha1_SourcePosition_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_expr_v1alpha1_SourcePosition_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_expr_v1alpha1_SourcePosition_serialize(const google_api_expr_v1alpha1_SourcePosition *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_expr_v1alpha1_SourcePosition_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.c
index 8ad07dcd9fd..f17613acb98 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.c
@@ -24,7 +24,7 @@ static const upb_msglayout_field google_api_Http__fields[2] = {
const upb_msglayout google_api_Http_msginit = {
&google_api_Http_submsgs[0],
&google_api_Http__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout *const google_api_HttpRule_submsgs[2] = {
@@ -48,7 +48,7 @@ static const upb_msglayout_field google_api_HttpRule__fields[10] = {
const upb_msglayout google_api_HttpRule_msginit = {
&google_api_HttpRule_submsgs[0],
&google_api_HttpRule__fields[0],
- UPB_SIZE(40, 80), 10, false,
+ UPB_SIZE(40, 80), 10, false, 255,
};
static const upb_msglayout_field google_api_CustomHttpPattern__fields[2] = {
@@ -59,7 +59,7 @@ static const upb_msglayout_field google_api_CustomHttpPattern__fields[2] = {
const upb_msglayout google_api_CustomHttpPattern_msginit = {
NULL,
&google_api_CustomHttpPattern__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.h
index 9012b9f7482..ed4e6d10dce 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/api/http.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -40,6 +41,12 @@ UPB_INLINE google_api_Http *google_api_Http_parse(const char *buf, size_t size,
google_api_Http *ret = google_api_Http_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_Http_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_Http *google_api_Http_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_Http *ret = google_api_Http_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_Http_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_Http_serialize(const google_api_Http *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_Http_msginit, arena, len);
}
@@ -52,12 +59,12 @@ UPB_INLINE google_api_HttpRule** google_api_Http_mutable_rules(google_api_Http *
return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_api_HttpRule** google_api_Http_resize_rules(google_api_Http *msg, size_t len, upb_arena *arena) {
- return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_HttpRule**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_HttpRule* google_api_Http_add_rules(google_api_Http *msg, upb_arena *arena) {
struct google_api_HttpRule* sub = (struct google_api_HttpRule*)_upb_msg_new(&google_api_HttpRule_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -75,6 +82,12 @@ UPB_INLINE google_api_HttpRule *google_api_HttpRule_parse(const char *buf, size_
google_api_HttpRule *ret = google_api_HttpRule_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_HttpRule_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_HttpRule *google_api_HttpRule_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_HttpRule *ret = google_api_HttpRule_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_HttpRule_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_HttpRule_serialize(const google_api_HttpRule *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_HttpRule_msginit, arena, len);
}
@@ -145,12 +158,12 @@ UPB_INLINE google_api_HttpRule** google_api_HttpRule_mutable_additional_bindings
return (google_api_HttpRule**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE google_api_HttpRule** google_api_HttpRule_resize_additional_bindings(google_api_HttpRule *msg, size_t len, upb_arena *arena) {
- return (google_api_HttpRule**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (google_api_HttpRule**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_api_HttpRule* google_api_HttpRule_add_additional_bindings(google_api_HttpRule *msg, upb_arena *arena) {
struct google_api_HttpRule* sub = (struct google_api_HttpRule*)_upb_msg_new(&google_api_HttpRule_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -168,6 +181,12 @@ UPB_INLINE google_api_CustomHttpPattern *google_api_CustomHttpPattern_parse(cons
google_api_CustomHttpPattern *ret = google_api_CustomHttpPattern_new(arena);
return (ret && upb_decode(buf, size, ret, &google_api_CustomHttpPattern_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_api_CustomHttpPattern *google_api_CustomHttpPattern_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_api_CustomHttpPattern *ret = google_api_CustomHttpPattern_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_api_CustomHttpPattern_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_api_CustomHttpPattern_serialize(const google_api_CustomHttpPattern *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_api_CustomHttpPattern_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.c
index 14badf797c1..93eaa603e32 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.c
@@ -20,7 +20,7 @@ static const upb_msglayout_field google_protobuf_Any__fields[2] = {
const upb_msglayout google_protobuf_Any_msginit = {
NULL,
&google_protobuf_Any__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.h
index bf8394e732c..2bd44f76852 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/any.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE google_protobuf_Any *google_protobuf_Any_parse(const char *buf, size_
google_protobuf_Any *ret = google_protobuf_Any_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Any_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Any *google_protobuf_Any_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Any *ret = google_protobuf_Any_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Any_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Any_serialize(const google_protobuf_Any *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Any_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
index 44cd3ae2cec..339fafac090 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
@@ -23,7 +23,7 @@ static const upb_msglayout_field google_protobuf_FileDescriptorSet__fields[1] =
const upb_msglayout google_protobuf_FileDescriptorSet_msginit = {
&google_protobuf_FileDescriptorSet_submsgs[0],
&google_protobuf_FileDescriptorSet__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const google_protobuf_FileDescriptorProto_submsgs[6] = {
@@ -43,20 +43,20 @@ static const upb_msglayout_field google_protobuf_FileDescriptorProto__fields[12]
{5, UPB_SIZE(44, 88), 0, 1, 11, 3},
{6, UPB_SIZE(48, 96), 0, 4, 11, 3},
{7, UPB_SIZE(52, 104), 0, 2, 11, 3},
- {8, UPB_SIZE(28, 56), 4, 3, 11, 1},
- {9, UPB_SIZE(32, 64), 5, 5, 11, 1},
+ {8, UPB_SIZE(28, 56), 3, 3, 11, 1},
+ {9, UPB_SIZE(32, 64), 4, 5, 11, 1},
{10, UPB_SIZE(56, 112), 0, 0, 5, 3},
{11, UPB_SIZE(60, 120), 0, 0, 5, 3},
- {12, UPB_SIZE(20, 40), 3, 0, 12, 1},
+ {12, UPB_SIZE(20, 40), 5, 0, 12, 1},
};
const upb_msglayout google_protobuf_FileDescriptorProto_msginit = {
&google_protobuf_FileDescriptorProto_submsgs[0],
&google_protobuf_FileDescriptorProto__fields[0],
- UPB_SIZE(64, 128), 12, false,
+ UPB_SIZE(64, 128), 12, false, 255,
};
-static const upb_msglayout *const google_protobuf_DescriptorProto_submsgs[8] = {
+static const upb_msglayout *const google_protobuf_DescriptorProto_submsgs[7] = {
&google_protobuf_DescriptorProto_msginit,
&google_protobuf_DescriptorProto_ExtensionRange_msginit,
&google_protobuf_DescriptorProto_ReservedRange_msginit,
@@ -82,7 +82,7 @@ static const upb_msglayout_field google_protobuf_DescriptorProto__fields[10] = {
const upb_msglayout google_protobuf_DescriptorProto_msginit = {
&google_protobuf_DescriptorProto_submsgs[0],
&google_protobuf_DescriptorProto__fields[0],
- UPB_SIZE(48, 96), 10, false,
+ UPB_SIZE(48, 96), 10, false, 255,
};
static const upb_msglayout *const google_protobuf_DescriptorProto_ExtensionRange_submsgs[1] = {
@@ -98,7 +98,7 @@ static const upb_msglayout_field google_protobuf_DescriptorProto_ExtensionRange_
const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit = {
&google_protobuf_DescriptorProto_ExtensionRange_submsgs[0],
&google_protobuf_DescriptorProto_ExtensionRange__fields[0],
- UPB_SIZE(16, 24), 3, false,
+ UPB_SIZE(16, 24), 3, false, 255,
};
static const upb_msglayout_field google_protobuf_DescriptorProto_ReservedRange__fields[2] = {
@@ -109,7 +109,7 @@ static const upb_msglayout_field google_protobuf_DescriptorProto_ReservedRange__
const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit = {
NULL,
&google_protobuf_DescriptorProto_ReservedRange__fields[0],
- UPB_SIZE(12, 12), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_ExtensionRangeOptions_submsgs[1] = {
@@ -123,7 +123,7 @@ static const upb_msglayout_field google_protobuf_ExtensionRangeOptions__fields[1
const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit = {
&google_protobuf_ExtensionRangeOptions_submsgs[0],
&google_protobuf_ExtensionRangeOptions__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const google_protobuf_FieldDescriptorProto_submsgs[1] = {
@@ -131,23 +131,23 @@ static const upb_msglayout *const google_protobuf_FieldDescriptorProto_submsgs[1
};
static const upb_msglayout_field google_protobuf_FieldDescriptorProto__fields[11] = {
- {1, UPB_SIZE(36, 40), 6, 0, 12, 1},
- {2, UPB_SIZE(44, 56), 7, 0, 12, 1},
- {3, UPB_SIZE(24, 24), 3, 0, 5, 1},
- {4, UPB_SIZE(8, 8), 1, 0, 14, 1},
- {5, UPB_SIZE(16, 16), 2, 0, 14, 1},
- {6, UPB_SIZE(52, 72), 8, 0, 12, 1},
- {7, UPB_SIZE(60, 88), 9, 0, 12, 1},
- {8, UPB_SIZE(76, 120), 11, 0, 11, 1},
- {9, UPB_SIZE(28, 28), 4, 0, 5, 1},
- {10, UPB_SIZE(68, 104), 10, 0, 12, 1},
- {17, UPB_SIZE(32, 32), 5, 0, 8, 1},
+ {1, UPB_SIZE(24, 24), 1, 0, 12, 1},
+ {2, UPB_SIZE(32, 40), 2, 0, 12, 1},
+ {3, UPB_SIZE(12, 12), 3, 0, 5, 1},
+ {4, UPB_SIZE(4, 4), 4, 0, 14, 1},
+ {5, UPB_SIZE(8, 8), 5, 0, 14, 1},
+ {6, UPB_SIZE(40, 56), 6, 0, 12, 1},
+ {7, UPB_SIZE(48, 72), 7, 0, 12, 1},
+ {8, UPB_SIZE(64, 104), 8, 0, 11, 1},
+ {9, UPB_SIZE(16, 16), 9, 0, 5, 1},
+ {10, UPB_SIZE(56, 88), 10, 0, 12, 1},
+ {17, UPB_SIZE(20, 20), 11, 0, 8, 1},
};
const upb_msglayout google_protobuf_FieldDescriptorProto_msginit = {
&google_protobuf_FieldDescriptorProto_submsgs[0],
&google_protobuf_FieldDescriptorProto__fields[0],
- UPB_SIZE(80, 128), 11, false,
+ UPB_SIZE(72, 112), 11, false, 255,
};
static const upb_msglayout *const google_protobuf_OneofDescriptorProto_submsgs[1] = {
@@ -162,7 +162,7 @@ static const upb_msglayout_field google_protobuf_OneofDescriptorProto__fields[2]
const upb_msglayout google_protobuf_OneofDescriptorProto_msginit = {
&google_protobuf_OneofDescriptorProto_submsgs[0],
&google_protobuf_OneofDescriptorProto__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_EnumDescriptorProto_submsgs[3] = {
@@ -182,7 +182,7 @@ static const upb_msglayout_field google_protobuf_EnumDescriptorProto__fields[5]
const upb_msglayout google_protobuf_EnumDescriptorProto_msginit = {
&google_protobuf_EnumDescriptorProto_submsgs[0],
&google_protobuf_EnumDescriptorProto__fields[0],
- UPB_SIZE(32, 64), 5, false,
+ UPB_SIZE(32, 64), 5, false, 255,
};
static const upb_msglayout_field google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[2] = {
@@ -193,7 +193,7 @@ static const upb_msglayout_field google_protobuf_EnumDescriptorProto_EnumReserve
const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit = {
NULL,
&google_protobuf_EnumDescriptorProto_EnumReservedRange__fields[0],
- UPB_SIZE(12, 12), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_EnumValueDescriptorProto_submsgs[1] = {
@@ -201,15 +201,15 @@ static const upb_msglayout *const google_protobuf_EnumValueDescriptorProto_subms
};
static const upb_msglayout_field google_protobuf_EnumValueDescriptorProto__fields[3] = {
- {1, UPB_SIZE(8, 8), 2, 0, 12, 1},
- {2, UPB_SIZE(4, 4), 1, 0, 5, 1},
+ {1, UPB_SIZE(8, 8), 1, 0, 12, 1},
+ {2, UPB_SIZE(4, 4), 2, 0, 5, 1},
{3, UPB_SIZE(16, 24), 3, 0, 11, 1},
};
const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit = {
&google_protobuf_EnumValueDescriptorProto_submsgs[0],
&google_protobuf_EnumValueDescriptorProto__fields[0],
- UPB_SIZE(24, 32), 3, false,
+ UPB_SIZE(24, 32), 3, false, 255,
};
static const upb_msglayout *const google_protobuf_ServiceDescriptorProto_submsgs[2] = {
@@ -226,7 +226,7 @@ static const upb_msglayout_field google_protobuf_ServiceDescriptorProto__fields[
const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit = {
&google_protobuf_ServiceDescriptorProto_submsgs[0],
&google_protobuf_ServiceDescriptorProto__fields[0],
- UPB_SIZE(24, 48), 3, false,
+ UPB_SIZE(24, 48), 3, false, 255,
};
static const upb_msglayout *const google_protobuf_MethodDescriptorProto_submsgs[1] = {
@@ -234,18 +234,18 @@ static const upb_msglayout *const google_protobuf_MethodDescriptorProto_submsgs[
};
static const upb_msglayout_field google_protobuf_MethodDescriptorProto__fields[6] = {
- {1, UPB_SIZE(4, 8), 3, 0, 12, 1},
- {2, UPB_SIZE(12, 24), 4, 0, 12, 1},
- {3, UPB_SIZE(20, 40), 5, 0, 12, 1},
- {4, UPB_SIZE(28, 56), 6, 0, 11, 1},
- {5, UPB_SIZE(1, 1), 1, 0, 8, 1},
- {6, UPB_SIZE(2, 2), 2, 0, 8, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 12, 1},
+ {2, UPB_SIZE(12, 24), 2, 0, 12, 1},
+ {3, UPB_SIZE(20, 40), 3, 0, 12, 1},
+ {4, UPB_SIZE(28, 56), 4, 0, 11, 1},
+ {5, UPB_SIZE(1, 1), 5, 0, 8, 1},
+ {6, UPB_SIZE(2, 2), 6, 0, 8, 1},
};
const upb_msglayout google_protobuf_MethodDescriptorProto_msginit = {
&google_protobuf_MethodDescriptorProto_submsgs[0],
&google_protobuf_MethodDescriptorProto__fields[0],
- UPB_SIZE(32, 64), 6, false,
+ UPB_SIZE(32, 64), 6, false, 255,
};
static const upb_msglayout *const google_protobuf_FileOptions_submsgs[1] = {
@@ -253,33 +253,33 @@ static const upb_msglayout *const google_protobuf_FileOptions_submsgs[1] = {
};
static const upb_msglayout_field google_protobuf_FileOptions__fields[21] = {
- {1, UPB_SIZE(28, 32), 11, 0, 12, 1},
- {8, UPB_SIZE(36, 48), 12, 0, 12, 1},
- {9, UPB_SIZE(8, 8), 1, 0, 14, 1},
- {10, UPB_SIZE(16, 16), 2, 0, 8, 1},
- {11, UPB_SIZE(44, 64), 13, 0, 12, 1},
- {16, UPB_SIZE(17, 17), 3, 0, 8, 1},
- {17, UPB_SIZE(18, 18), 4, 0, 8, 1},
- {18, UPB_SIZE(19, 19), 5, 0, 8, 1},
- {20, UPB_SIZE(20, 20), 6, 0, 8, 1},
- {23, UPB_SIZE(21, 21), 7, 0, 8, 1},
- {27, UPB_SIZE(22, 22), 8, 0, 8, 1},
- {31, UPB_SIZE(23, 23), 9, 0, 8, 1},
- {36, UPB_SIZE(52, 80), 14, 0, 12, 1},
- {37, UPB_SIZE(60, 96), 15, 0, 12, 1},
- {39, UPB_SIZE(68, 112), 16, 0, 12, 1},
- {40, UPB_SIZE(76, 128), 17, 0, 12, 1},
- {41, UPB_SIZE(84, 144), 18, 0, 12, 1},
- {42, UPB_SIZE(24, 24), 10, 0, 8, 1},
- {44, UPB_SIZE(92, 160), 19, 0, 12, 1},
- {45, UPB_SIZE(100, 176), 20, 0, 12, 1},
- {999, UPB_SIZE(108, 192), 0, 0, 11, 3},
+ {1, UPB_SIZE(20, 24), 1, 0, 12, 1},
+ {8, UPB_SIZE(28, 40), 2, 0, 12, 1},
+ {9, UPB_SIZE(4, 4), 3, 0, 14, 1},
+ {10, UPB_SIZE(8, 8), 4, 0, 8, 1},
+ {11, UPB_SIZE(36, 56), 5, 0, 12, 1},
+ {16, UPB_SIZE(9, 9), 6, 0, 8, 1},
+ {17, UPB_SIZE(10, 10), 7, 0, 8, 1},
+ {18, UPB_SIZE(11, 11), 8, 0, 8, 1},
+ {20, UPB_SIZE(12, 12), 9, 0, 8, 1},
+ {23, UPB_SIZE(13, 13), 10, 0, 8, 1},
+ {27, UPB_SIZE(14, 14), 11, 0, 8, 1},
+ {31, UPB_SIZE(15, 15), 12, 0, 8, 1},
+ {36, UPB_SIZE(44, 72), 13, 0, 12, 1},
+ {37, UPB_SIZE(52, 88), 14, 0, 12, 1},
+ {39, UPB_SIZE(60, 104), 15, 0, 12, 1},
+ {40, UPB_SIZE(68, 120), 16, 0, 12, 1},
+ {41, UPB_SIZE(76, 136), 17, 0, 12, 1},
+ {42, UPB_SIZE(16, 16), 18, 0, 8, 1},
+ {44, UPB_SIZE(84, 152), 19, 0, 12, 1},
+ {45, UPB_SIZE(92, 168), 20, 0, 12, 1},
+ {999, UPB_SIZE(100, 184), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_FileOptions_msginit = {
&google_protobuf_FileOptions_submsgs[0],
&google_protobuf_FileOptions__fields[0],
- UPB_SIZE(112, 208), 21, false,
+ UPB_SIZE(104, 192), 21, false, 255,
};
static const upb_msglayout *const google_protobuf_MessageOptions_submsgs[1] = {
@@ -297,7 +297,7 @@ static const upb_msglayout_field google_protobuf_MessageOptions__fields[5] = {
const upb_msglayout google_protobuf_MessageOptions_msginit = {
&google_protobuf_MessageOptions_submsgs[0],
&google_protobuf_MessageOptions__fields[0],
- UPB_SIZE(12, 16), 5, false,
+ UPB_SIZE(16, 16), 5, false, 255,
};
static const upb_msglayout *const google_protobuf_FieldOptions_submsgs[1] = {
@@ -305,19 +305,19 @@ static const upb_msglayout *const google_protobuf_FieldOptions_submsgs[1] = {
};
static const upb_msglayout_field google_protobuf_FieldOptions__fields[7] = {
- {1, UPB_SIZE(8, 8), 1, 0, 14, 1},
- {2, UPB_SIZE(24, 24), 3, 0, 8, 1},
- {3, UPB_SIZE(25, 25), 4, 0, 8, 1},
- {5, UPB_SIZE(26, 26), 5, 0, 8, 1},
- {6, UPB_SIZE(16, 16), 2, 0, 14, 1},
- {10, UPB_SIZE(27, 27), 6, 0, 8, 1},
- {999, UPB_SIZE(28, 32), 0, 0, 11, 3},
+ {1, UPB_SIZE(4, 4), 1, 0, 14, 1},
+ {2, UPB_SIZE(12, 12), 2, 0, 8, 1},
+ {3, UPB_SIZE(13, 13), 3, 0, 8, 1},
+ {5, UPB_SIZE(14, 14), 4, 0, 8, 1},
+ {6, UPB_SIZE(8, 8), 5, 0, 14, 1},
+ {10, UPB_SIZE(15, 15), 6, 0, 8, 1},
+ {999, UPB_SIZE(16, 16), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_FieldOptions_msginit = {
&google_protobuf_FieldOptions_submsgs[0],
&google_protobuf_FieldOptions__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(24, 24), 7, false, 255,
};
static const upb_msglayout *const google_protobuf_OneofOptions_submsgs[1] = {
@@ -331,7 +331,7 @@ static const upb_msglayout_field google_protobuf_OneofOptions__fields[1] = {
const upb_msglayout google_protobuf_OneofOptions_msginit = {
&google_protobuf_OneofOptions_submsgs[0],
&google_protobuf_OneofOptions__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const google_protobuf_EnumOptions_submsgs[1] = {
@@ -347,7 +347,7 @@ static const upb_msglayout_field google_protobuf_EnumOptions__fields[3] = {
const upb_msglayout google_protobuf_EnumOptions_msginit = {
&google_protobuf_EnumOptions_submsgs[0],
&google_protobuf_EnumOptions__fields[0],
- UPB_SIZE(8, 16), 3, false,
+ UPB_SIZE(8, 16), 3, false, 255,
};
static const upb_msglayout *const google_protobuf_EnumValueOptions_submsgs[1] = {
@@ -362,7 +362,7 @@ static const upb_msglayout_field google_protobuf_EnumValueOptions__fields[2] = {
const upb_msglayout google_protobuf_EnumValueOptions_msginit = {
&google_protobuf_EnumValueOptions_submsgs[0],
&google_protobuf_EnumValueOptions__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_ServiceOptions_submsgs[1] = {
@@ -377,7 +377,7 @@ static const upb_msglayout_field google_protobuf_ServiceOptions__fields[2] = {
const upb_msglayout google_protobuf_ServiceOptions_msginit = {
&google_protobuf_ServiceOptions_submsgs[0],
&google_protobuf_ServiceOptions__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_MethodOptions_submsgs[1] = {
@@ -385,15 +385,15 @@ static const upb_msglayout *const google_protobuf_MethodOptions_submsgs[1] = {
};
static const upb_msglayout_field google_protobuf_MethodOptions__fields[3] = {
- {33, UPB_SIZE(16, 16), 2, 0, 8, 1},
- {34, UPB_SIZE(8, 8), 1, 0, 14, 1},
- {999, UPB_SIZE(20, 24), 0, 0, 11, 3},
+ {33, UPB_SIZE(8, 8), 1, 0, 8, 1},
+ {34, UPB_SIZE(4, 4), 2, 0, 14, 1},
+ {999, UPB_SIZE(12, 16), 0, 0, 11, 3},
};
const upb_msglayout google_protobuf_MethodOptions_msginit = {
&google_protobuf_MethodOptions_submsgs[0],
&google_protobuf_MethodOptions__fields[0],
- UPB_SIZE(24, 32), 3, false,
+ UPB_SIZE(16, 24), 3, false, 255,
};
static const upb_msglayout *const google_protobuf_UninterpretedOption_submsgs[1] = {
@@ -402,10 +402,10 @@ static const upb_msglayout *const google_protobuf_UninterpretedOption_submsgs[1]
static const upb_msglayout_field google_protobuf_UninterpretedOption__fields[7] = {
{2, UPB_SIZE(56, 80), 0, 0, 11, 3},
- {3, UPB_SIZE(32, 32), 4, 0, 12, 1},
- {4, UPB_SIZE(8, 8), 1, 0, 4, 1},
- {5, UPB_SIZE(16, 16), 2, 0, 3, 1},
- {6, UPB_SIZE(24, 24), 3, 0, 1, 1},
+ {3, UPB_SIZE(32, 32), 1, 0, 12, 1},
+ {4, UPB_SIZE(8, 8), 2, 0, 4, 1},
+ {5, UPB_SIZE(16, 16), 3, 0, 3, 1},
+ {6, UPB_SIZE(24, 24), 4, 0, 1, 1},
{7, UPB_SIZE(40, 48), 5, 0, 12, 1},
{8, UPB_SIZE(48, 64), 6, 0, 12, 1},
};
@@ -413,18 +413,18 @@ static const upb_msglayout_field google_protobuf_UninterpretedOption__fields[7]
const upb_msglayout google_protobuf_UninterpretedOption_msginit = {
&google_protobuf_UninterpretedOption_submsgs[0],
&google_protobuf_UninterpretedOption__fields[0],
- UPB_SIZE(64, 96), 7, false,
+ UPB_SIZE(64, 96), 7, false, 255,
};
static const upb_msglayout_field google_protobuf_UninterpretedOption_NamePart__fields[2] = {
- {1, UPB_SIZE(4, 8), 2, 0, 12, 2},
- {2, UPB_SIZE(1, 1), 1, 0, 8, 2},
+ {1, UPB_SIZE(4, 8), 1, 0, 12, 2},
+ {2, UPB_SIZE(1, 1), 2, 0, 8, 2},
};
const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit = {
NULL,
&google_protobuf_UninterpretedOption_NamePart__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_SourceCodeInfo_submsgs[1] = {
@@ -438,7 +438,7 @@ static const upb_msglayout_field google_protobuf_SourceCodeInfo__fields[1] = {
const upb_msglayout google_protobuf_SourceCodeInfo_msginit = {
&google_protobuf_SourceCodeInfo_submsgs[0],
&google_protobuf_SourceCodeInfo__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_SourceCodeInfo_Location__fields[5] = {
@@ -452,7 +452,7 @@ static const upb_msglayout_field google_protobuf_SourceCodeInfo_Location__fields
const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit = {
NULL,
&google_protobuf_SourceCodeInfo_Location__fields[0],
- UPB_SIZE(32, 64), 5, false,
+ UPB_SIZE(32, 64), 5, false, 255,
};
static const upb_msglayout *const google_protobuf_GeneratedCodeInfo_submsgs[1] = {
@@ -466,20 +466,20 @@ static const upb_msglayout_field google_protobuf_GeneratedCodeInfo__fields[1] =
const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit = {
&google_protobuf_GeneratedCodeInfo_submsgs[0],
&google_protobuf_GeneratedCodeInfo__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_GeneratedCodeInfo_Annotation__fields[4] = {
{1, UPB_SIZE(20, 32), 0, 0, 5, _UPB_LABEL_PACKED},
- {2, UPB_SIZE(12, 16), 3, 0, 12, 1},
- {3, UPB_SIZE(4, 4), 1, 0, 5, 1},
- {4, UPB_SIZE(8, 8), 2, 0, 5, 1},
+ {2, UPB_SIZE(12, 16), 1, 0, 12, 1},
+ {3, UPB_SIZE(4, 4), 2, 0, 5, 1},
+ {4, UPB_SIZE(8, 8), 3, 0, 5, 1},
};
const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit = {
NULL,
&google_protobuf_GeneratedCodeInfo_Annotation__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h
index 64701a0cf21..a8ed71a688c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -163,6 +164,12 @@ UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_
google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_FileDescriptorSet *google_protobuf_FileDescriptorSet_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_FileDescriptorSet *ret = google_protobuf_FileDescriptorSet_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileDescriptorSet_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_FileDescriptorSet_serialize(const google_protobuf_FileDescriptorSet *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileDescriptorSet_msginit, arena, len);
}
@@ -174,12 +181,12 @@ UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorS
return (google_protobuf_FileDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_FileDescriptorProto** google_protobuf_FileDescriptorSet_resize_file(google_protobuf_FileDescriptorSet *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_FileDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FileDescriptorProto* google_protobuf_FileDescriptorSet_add_file(google_protobuf_FileDescriptorSet *msg, upb_arena *arena) {
struct google_protobuf_FileDescriptorProto* sub = (struct google_protobuf_FileDescriptorProto*)_upb_msg_new(&google_protobuf_FileDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -194,6 +201,12 @@ UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorPr
google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_FileDescriptorProto *google_protobuf_FileDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_FileDescriptorProto *ret = google_protobuf_FileDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_FileDescriptorProto_serialize(const google_protobuf_FileDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileDescriptorProto_msginit, arena, len);
}
@@ -211,13 +224,13 @@ UPB_INLINE bool google_protobuf_FileDescriptorProto_has_service(const google_pro
UPB_INLINE const google_protobuf_ServiceDescriptorProto* const* google_protobuf_FileDescriptorProto_service(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_ServiceDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(48, 96), len); }
UPB_INLINE bool google_protobuf_FileDescriptorProto_has_extension(const google_protobuf_FileDescriptorProto *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(52, 104)); }
UPB_INLINE const google_protobuf_FieldDescriptorProto* const* google_protobuf_FileDescriptorProto_extension(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (const google_protobuf_FieldDescriptorProto* const*)_upb_array_accessor(msg, UPB_SIZE(52, 104), len); }
-UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool google_protobuf_FileDescriptorProto_has_options(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_options(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_FileOptions*); }
-UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE bool google_protobuf_FileDescriptorProto_has_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_source_code_info(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const google_protobuf_SourceCodeInfo*); }
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_public_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(56, 112), len); }
UPB_INLINE int32_t const* google_protobuf_FileDescriptorProto_weak_dependency(const google_protobuf_FileDescriptorProto *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(60, 120), len); }
-UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool google_protobuf_FileDescriptorProto_has_syntax(const google_protobuf_FileDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE upb_strview google_protobuf_FileDescriptorProto_syntax(const google_protobuf_FileDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
UPB_INLINE void google_protobuf_FileDescriptorProto_set_name(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
@@ -232,22 +245,22 @@ UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_mutable_dependency(g
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE upb_strview* google_protobuf_FileDescriptorProto_resize_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_dependency(google_protobuf_FileDescriptorProto *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(36, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(36, 72), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_mutable_message_type(google_protobuf_FileDescriptorProto *msg, size_t *len) {
return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_FileDescriptorProto_resize_message_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_FileDescriptorProto_add_message_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -255,12 +268,12 @@ UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorP
return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_FileDescriptorProto_resize_enum_type(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_FileDescriptorProto_add_enum_type(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(44, 88), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 88), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -268,12 +281,12 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescript
return (google_protobuf_ServiceDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 96), len);
}
UPB_INLINE google_protobuf_ServiceDescriptorProto** google_protobuf_FileDescriptorProto_resize_service(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(48, 96), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_ServiceDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 96), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_ServiceDescriptorProto* google_protobuf_FileDescriptorProto_add_service(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_ServiceDescriptorProto* sub = (struct google_protobuf_ServiceDescriptorProto*)_upb_msg_new(&google_protobuf_ServiceDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(48, 96), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(48, 96), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -281,17 +294,17 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptor
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 104), len);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_FileDescriptorProto_resize_extension(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(52, 104), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 104), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_FileDescriptorProto_add_extension(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(52, 104), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(52, 104), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_options(google_protobuf_FileDescriptorProto *msg, google_protobuf_FileOptions* value) {
- _upb_sethas(msg, 4);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_FileOptions*) = value;
}
UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorProto_mutable_options(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
@@ -304,7 +317,7 @@ UPB_INLINE struct google_protobuf_FileOptions* google_protobuf_FileDescriptorPro
return sub;
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_source_code_info(google_protobuf_FileDescriptorProto *msg, google_protobuf_SourceCodeInfo* value) {
- _upb_sethas(msg, 5);
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(32, 64), google_protobuf_SourceCodeInfo*) = value;
}
UPB_INLINE struct google_protobuf_SourceCodeInfo* google_protobuf_FileDescriptorProto_mutable_source_code_info(google_protobuf_FileDescriptorProto *msg, upb_arena *arena) {
@@ -320,24 +333,24 @@ UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_public_dependenc
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 112), len);
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_public_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(56, 112), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(56, 112), len, 2, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_public_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(56, 112), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(56, 112), 2, &val,
arena);
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_mutable_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(60, 120), len);
}
UPB_INLINE int32_t* google_protobuf_FileDescriptorProto_resize_weak_dependency(google_protobuf_FileDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(60, 120), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(60, 120), len, 2, arena);
}
UPB_INLINE bool google_protobuf_FileDescriptorProto_add_weak_dependency(google_protobuf_FileDescriptorProto *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(60, 120), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(60, 120), 2, &val,
arena);
}
UPB_INLINE void google_protobuf_FileDescriptorProto_set_syntax(google_protobuf_FileDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
@@ -351,6 +364,12 @@ UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_pars
google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_DescriptorProto *google_protobuf_DescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_DescriptorProto *ret = google_protobuf_DescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_DescriptorProto_serialize(const google_protobuf_DescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_msginit, arena, len);
}
@@ -383,12 +402,12 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProt
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_field(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_field(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -396,12 +415,12 @@ UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_mut
return (google_protobuf_DescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE google_protobuf_DescriptorProto** google_protobuf_DescriptorProto_resize_nested_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_DescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto* google_protobuf_DescriptorProto_add_nested_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_DescriptorProto* sub = (struct google_protobuf_DescriptorProto*)_upb_msg_new(&google_protobuf_DescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -409,12 +428,12 @@ UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto
return (google_protobuf_EnumDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE google_protobuf_EnumDescriptorProto** google_protobuf_DescriptorProto_resize_enum_type(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_EnumDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_EnumDescriptorProto* google_protobuf_DescriptorProto_add_enum_type(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_EnumDescriptorProto* sub = (struct google_protobuf_EnumDescriptorProto*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -422,12 +441,12 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_Desc
return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange** google_protobuf_DescriptorProto_resize_extension_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_DescriptorProto_ExtensionRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto_ExtensionRange* google_protobuf_DescriptorProto_add_extension_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_DescriptorProto_ExtensionRange* sub = (struct google_protobuf_DescriptorProto_ExtensionRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ExtensionRange_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -435,12 +454,12 @@ UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProt
return (google_protobuf_FieldDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 64), len);
}
UPB_INLINE google_protobuf_FieldDescriptorProto** google_protobuf_DescriptorProto_resize_extension(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(32, 64), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_FieldDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(32, 64), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_FieldDescriptorProto* google_protobuf_DescriptorProto_add_extension(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_FieldDescriptorProto* sub = (struct google_protobuf_FieldDescriptorProto*)_upb_msg_new(&google_protobuf_FieldDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(32, 64), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(32, 64), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -461,12 +480,12 @@ UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProt
return (google_protobuf_OneofDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 72), len);
}
UPB_INLINE google_protobuf_OneofDescriptorProto** google_protobuf_DescriptorProto_resize_oneof_decl(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 72), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_OneofDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 72), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_OneofDescriptorProto* google_protobuf_DescriptorProto_add_oneof_decl(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_OneofDescriptorProto* sub = (struct google_protobuf_OneofDescriptorProto*)_upb_msg_new(&google_protobuf_OneofDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 72), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(36, 72), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -474,12 +493,12 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_Descr
return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 80), len);
}
UPB_INLINE google_protobuf_DescriptorProto_ReservedRange** google_protobuf_DescriptorProto_resize_reserved_range(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(40, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_DescriptorProto_ReservedRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_DescriptorProto_ReservedRange* google_protobuf_DescriptorProto_add_reserved_range(google_protobuf_DescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_DescriptorProto_ReservedRange* sub = (struct google_protobuf_DescriptorProto_ReservedRange*)_upb_msg_new(&google_protobuf_DescriptorProto_ReservedRange_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(40, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(40, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -487,10 +506,10 @@ UPB_INLINE upb_strview* google_protobuf_DescriptorProto_mutable_reserved_name(go
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 88), len);
}
UPB_INLINE upb_strview* google_protobuf_DescriptorProto_resize_reserved_name(google_protobuf_DescriptorProto *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(44, 88), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 88), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_DescriptorProto_add_reserved_name(google_protobuf_DescriptorProto *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(44, 88), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(44, 88), UPB_SIZE(3, 4), &val,
arena);
}
@@ -504,6 +523,12 @@ UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_Descr
google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_DescriptorProto_ExtensionRange *google_protobuf_DescriptorProto_ExtensionRange_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_DescriptorProto_ExtensionRange *ret = google_protobuf_DescriptorProto_ExtensionRange_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_DescriptorProto_ExtensionRange_serialize(const google_protobuf_DescriptorProto_ExtensionRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ExtensionRange_msginit, arena, len);
}
@@ -547,6 +572,12 @@ UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_Descri
google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_DescriptorProto_ReservedRange *google_protobuf_DescriptorProto_ReservedRange_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_DescriptorProto_ReservedRange *ret = google_protobuf_DescriptorProto_ReservedRange_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_DescriptorProto_ReservedRange_serialize(const google_protobuf_DescriptorProto_ReservedRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DescriptorProto_ReservedRange_msginit, arena, len);
}
@@ -575,6 +606,12 @@ UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRange
google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_ExtensionRangeOptions *google_protobuf_ExtensionRangeOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_ExtensionRangeOptions *ret = google_protobuf_ExtensionRangeOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_ExtensionRangeOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_ExtensionRangeOptions_serialize(const google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ExtensionRangeOptions_msginit, arena, len);
}
@@ -586,12 +623,12 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeO
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ExtensionRangeOptions_resize_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ExtensionRangeOptions_add_uninterpreted_option(google_protobuf_ExtensionRangeOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -606,64 +643,70 @@ UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptor
google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_FieldDescriptorProto *google_protobuf_FieldDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_FieldDescriptorProto *ret = google_protobuf_FieldDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_FieldDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_FieldDescriptorProto_serialize(const google_protobuf_FieldDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FieldDescriptorProto_msginit, arena, len);
}
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
-UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 7); }
-UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_extendee(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_extendee(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_strview); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_number(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
-UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
-UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
-UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 8); }
-UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 9); }
-UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 11); }
-UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 120), const google_protobuf_FieldOptions*); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
-UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t); }
+UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_number(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_label(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_label(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_type(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_type_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_type_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_strview); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_default_value(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_default_value(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_strview); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_options(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE const google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_options(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 104), const google_protobuf_FieldOptions*); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE int32_t google_protobuf_FieldDescriptorProto_oneof_index(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_json_name(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 10); }
-UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
-UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool); }
+UPB_INLINE upb_strview google_protobuf_FieldDescriptorProto_json_name(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_strview); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_has_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE bool google_protobuf_FieldDescriptorProto_proto3_optional(const google_protobuf_FieldDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); }
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 6);
- *UPB_PTR_AT(msg, UPB_SIZE(36, 40), upb_strview) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 24), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_extendee(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 7);
- *UPB_PTR_AT(msg, UPB_SIZE(44, 56), upb_strview) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 40), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_number(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
_upb_sethas(msg, 3);
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_label(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
- _upb_sethas(msg, 1);
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
- _upb_sethas(msg, 2);
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_type_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 8);
- *UPB_PTR_AT(msg, UPB_SIZE(52, 72), upb_strview) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 56), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_default_value(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 9);
- *UPB_PTR_AT(msg, UPB_SIZE(60, 88), upb_strview) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(48, 72), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_options(google_protobuf_FieldDescriptorProto *msg, google_protobuf_FieldOptions* value) {
- _upb_sethas(msg, 11);
- *UPB_PTR_AT(msg, UPB_SIZE(76, 120), google_protobuf_FieldOptions*) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(64, 104), google_protobuf_FieldOptions*) = value;
}
UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorProto_mutable_options(google_protobuf_FieldDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_FieldOptions* sub = (struct google_protobuf_FieldOptions*)google_protobuf_FieldDescriptorProto_options(msg);
@@ -675,16 +718,16 @@ UPB_INLINE struct google_protobuf_FieldOptions* google_protobuf_FieldDescriptorP
return sub;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_oneof_index(google_protobuf_FieldDescriptorProto *msg, int32_t value) {
- _upb_sethas(msg, 4);
- *UPB_PTR_AT(msg, UPB_SIZE(28, 28), int32_t) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_json_name(google_protobuf_FieldDescriptorProto *msg, upb_strview value) {
_upb_sethas(msg, 10);
- *UPB_PTR_AT(msg, UPB_SIZE(68, 104), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(56, 88), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FieldDescriptorProto_set_proto3_optional(google_protobuf_FieldDescriptorProto *msg, bool value) {
- _upb_sethas(msg, 5);
- *UPB_PTR_AT(msg, UPB_SIZE(32, 32), bool) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value;
}
/* google.protobuf.OneofDescriptorProto */
@@ -697,6 +740,12 @@ UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptor
google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_OneofDescriptorProto *google_protobuf_OneofDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_OneofDescriptorProto *ret = google_protobuf_OneofDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_OneofDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_OneofDescriptorProto_serialize(const google_protobuf_OneofDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_OneofDescriptorProto_msginit, arena, len);
}
@@ -734,6 +783,12 @@ UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorPr
google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_EnumDescriptorProto *google_protobuf_EnumDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_EnumDescriptorProto *ret = google_protobuf_EnumDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_EnumDescriptorProto_serialize(const google_protobuf_EnumDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_msginit, arena, len);
}
@@ -756,12 +811,12 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescri
return (google_protobuf_EnumValueDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE google_protobuf_EnumValueDescriptorProto** google_protobuf_EnumDescriptorProto_resize_value(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_EnumValueDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_EnumValueDescriptorProto* google_protobuf_EnumDescriptorProto_add_value(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_EnumValueDescriptorProto* sub = (struct google_protobuf_EnumValueDescriptorProto*)_upb_msg_new(&google_protobuf_EnumValueDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -782,12 +837,12 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protob
return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange** google_protobuf_EnumDescriptorProto_resize_reserved_range(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_EnumDescriptorProto_EnumReservedRange**)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_EnumDescriptorProto_EnumReservedRange* google_protobuf_EnumDescriptorProto_add_reserved_range(google_protobuf_EnumDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_EnumDescriptorProto_EnumReservedRange* sub = (struct google_protobuf_EnumDescriptorProto_EnumReservedRange*)_upb_msg_new(&google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -795,10 +850,10 @@ UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_mutable_reserved_nam
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE upb_strview* google_protobuf_EnumDescriptorProto_resize_reserved_name(google_protobuf_EnumDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_EnumDescriptorProto_add_reserved_name(google_protobuf_EnumDescriptorProto *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 48), UPB_SIZE(3, 4), &val,
arena);
}
@@ -812,6 +867,12 @@ UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobu
google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_EnumDescriptorProto_EnumReservedRange *google_protobuf_EnumDescriptorProto_EnumReservedRange_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_EnumDescriptorProto_EnumReservedRange *ret = google_protobuf_EnumDescriptorProto_EnumReservedRange_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_EnumDescriptorProto_EnumReservedRange_serialize(const google_protobuf_EnumDescriptorProto_EnumReservedRange *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit, arena, len);
}
@@ -840,23 +901,29 @@ UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDe
google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_EnumValueDescriptorProto *google_protobuf_EnumValueDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_EnumValueDescriptorProto *ret = google_protobuf_EnumValueDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumValueDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_EnumValueDescriptorProto_serialize(const google_protobuf_EnumValueDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumValueDescriptorProto_msginit, arena, len);
}
-UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_name(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_EnumValueDescriptorProto_name(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_number(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_EnumValueDescriptorProto_number(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE bool google_protobuf_EnumValueDescriptorProto_has_options(const google_protobuf_EnumValueDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const google_protobuf_EnumValueOptions* google_protobuf_EnumValueDescriptorProto_options(const google_protobuf_EnumValueDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const google_protobuf_EnumValueOptions*); }
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_name(google_protobuf_EnumValueDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_number(google_protobuf_EnumValueDescriptorProto *msg, int32_t value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_EnumValueDescriptorProto_set_options(google_protobuf_EnumValueDescriptorProto *msg, google_protobuf_EnumValueOptions* value) {
@@ -883,6 +950,12 @@ UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescri
google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_ServiceDescriptorProto *google_protobuf_ServiceDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_ServiceDescriptorProto *ret = google_protobuf_ServiceDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_ServiceDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_ServiceDescriptorProto_serialize(const google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ServiceDescriptorProto_msginit, arena, len);
}
@@ -902,12 +975,12 @@ UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescri
return (google_protobuf_MethodDescriptorProto**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 32), len);
}
UPB_INLINE google_protobuf_MethodDescriptorProto** google_protobuf_ServiceDescriptorProto_resize_method(google_protobuf_ServiceDescriptorProto *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor(msg, UPB_SIZE(16, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_MethodDescriptorProto**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 32), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_MethodDescriptorProto* google_protobuf_ServiceDescriptorProto_add_method(google_protobuf_ServiceDescriptorProto *msg, upb_arena *arena) {
struct google_protobuf_MethodDescriptorProto* sub = (struct google_protobuf_MethodDescriptorProto*)_upb_msg_new(&google_protobuf_MethodDescriptorProto_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(16, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 32), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -935,37 +1008,43 @@ UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescript
google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_MethodDescriptorProto *google_protobuf_MethodDescriptorProto_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_MethodDescriptorProto *ret = google_protobuf_MethodDescriptorProto_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_MethodDescriptorProto_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_MethodDescriptorProto_serialize(const google_protobuf_MethodDescriptorProto *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MethodDescriptorProto_msginit, arena, len);
}
-UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_name(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_name(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_input_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_input_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
-UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_output_type(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE upb_strview google_protobuf_MethodDescriptorProto_output_type(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
-UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_options(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_options(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const google_protobuf_MethodOptions*); }
-UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE bool google_protobuf_MethodDescriptorProto_client_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
-UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool google_protobuf_MethodDescriptorProto_has_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE bool google_protobuf_MethodDescriptorProto_server_streaming(const google_protobuf_MethodDescriptorProto *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_name(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_input_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 4);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_output_type(google_protobuf_MethodDescriptorProto *msg, upb_strview value) {
- _upb_sethas(msg, 5);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_options(google_protobuf_MethodDescriptorProto *msg, google_protobuf_MethodOptions* value) {
- _upb_sethas(msg, 6);
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(28, 56), google_protobuf_MethodOptions*) = value;
}
UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescriptorProto_mutable_options(google_protobuf_MethodDescriptorProto *msg, upb_arena *arena) {
@@ -978,11 +1057,11 @@ UPB_INLINE struct google_protobuf_MethodOptions* google_protobuf_MethodDescripto
return sub;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_client_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE void google_protobuf_MethodDescriptorProto_set_server_streaming(google_protobuf_MethodDescriptorProto *msg, bool value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
@@ -996,143 +1075,149 @@ UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse(const
google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_FileOptions *google_protobuf_FileOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_FileOptions *ret = google_protobuf_FileOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_FileOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_FileOptions_serialize(const google_protobuf_FileOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FileOptions_msginit, arena, len);
}
-UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 11); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 12); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 1); }
-UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 2); }
-UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 13); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 3); }
-UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 4); }
-UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 5); }
-UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 6); }
-UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 7); }
-UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 8); }
-UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 9); }
-UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool); }
-UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 14); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 15); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 16); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 17); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 18); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 10); }
-UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_java_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_java_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_java_outer_classname(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_java_outer_classname(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_optimize_for(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE int32_t google_protobuf_FileOptions_optimize_for(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool google_protobuf_FileOptions_has_java_multiple_files(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool google_protobuf_FileOptions_java_multiple_files(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_go_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_go_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_cc_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE bool google_protobuf_FileOptions_cc_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_java_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE bool google_protobuf_FileOptions_java_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_py_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE bool google_protobuf_FileOptions_py_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE bool google_protobuf_FileOptions_java_generate_equals_and_hash(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_deprecated(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE bool google_protobuf_FileOptions_deprecated(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE bool google_protobuf_FileOptions_java_string_check_utf8(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE bool google_protobuf_FileOptions_cc_enable_arenas(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool); }
+UPB_INLINE bool google_protobuf_FileOptions_has_objc_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_objc_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_csharp_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 14); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_csharp_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_swift_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 15); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_swift_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_php_class_prefix(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 16); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_php_class_prefix(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_php_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 17); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_php_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_php_generic_services(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 18); }
+UPB_INLINE bool google_protobuf_FileOptions_php_generic_services(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
UPB_INLINE bool google_protobuf_FileOptions_has_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 19); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_php_metadata_namespace(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_strview); }
UPB_INLINE bool google_protobuf_FileOptions_has_ruby_package(const google_protobuf_FileOptions *msg) { return _upb_hasbit(msg, 20); }
-UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview); }
-UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(108, 192)); }
-UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(108, 192), len); }
+UPB_INLINE upb_strview google_protobuf_FileOptions_ruby_package(const google_protobuf_FileOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_strview); }
+UPB_INLINE bool google_protobuf_FileOptions_has_uninterpreted_option(const google_protobuf_FileOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(100, 184)); }
+UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FileOptions_uninterpreted_option(const google_protobuf_FileOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(100, 184), len); }
UPB_INLINE void google_protobuf_FileOptions_set_java_package(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 11);
- *UPB_PTR_AT(msg, UPB_SIZE(28, 32), upb_strview) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 24), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_outer_classname(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 12);
- *UPB_PTR_AT(msg, UPB_SIZE(36, 48), upb_strview) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 40), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_optimize_for(google_protobuf_FileOptions *msg, int32_t value) {
- _upb_sethas(msg, 1);
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_multiple_files(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 2);
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_go_package(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 13);
- *UPB_PTR_AT(msg, UPB_SIZE(44, 64), upb_strview) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 56), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_cc_generic_services(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 3);
- *UPB_PTR_AT(msg, UPB_SIZE(17, 17), bool) = value;
+ _upb_sethas(msg, 6);
+ *UPB_PTR_AT(msg, UPB_SIZE(9, 9), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_generic_services(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 4);
- *UPB_PTR_AT(msg, UPB_SIZE(18, 18), bool) = value;
+ _upb_sethas(msg, 7);
+ *UPB_PTR_AT(msg, UPB_SIZE(10, 10), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_py_generic_services(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 5);
- *UPB_PTR_AT(msg, UPB_SIZE(19, 19), bool) = value;
+ _upb_sethas(msg, 8);
+ *UPB_PTR_AT(msg, UPB_SIZE(11, 11), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_generate_equals_and_hash(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 6);
- *UPB_PTR_AT(msg, UPB_SIZE(20, 20), bool) = value;
+ _upb_sethas(msg, 9);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_deprecated(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 7);
- *UPB_PTR_AT(msg, UPB_SIZE(21, 21), bool) = value;
+ _upb_sethas(msg, 10);
+ *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_java_string_check_utf8(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 8);
- *UPB_PTR_AT(msg, UPB_SIZE(22, 22), bool) = value;
+ _upb_sethas(msg, 11);
+ *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_cc_enable_arenas(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 9);
- *UPB_PTR_AT(msg, UPB_SIZE(23, 23), bool) = value;
+ _upb_sethas(msg, 12);
+ *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_objc_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 14);
- *UPB_PTR_AT(msg, UPB_SIZE(52, 80), upb_strview) = value;
+ _upb_sethas(msg, 13);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 72), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_csharp_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 15);
- *UPB_PTR_AT(msg, UPB_SIZE(60, 96), upb_strview) = value;
+ _upb_sethas(msg, 14);
+ *UPB_PTR_AT(msg, UPB_SIZE(52, 88), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_swift_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 16);
- *UPB_PTR_AT(msg, UPB_SIZE(68, 112), upb_strview) = value;
+ _upb_sethas(msg, 15);
+ *UPB_PTR_AT(msg, UPB_SIZE(60, 104), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_class_prefix(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 17);
- *UPB_PTR_AT(msg, UPB_SIZE(76, 128), upb_strview) = value;
+ _upb_sethas(msg, 16);
+ *UPB_PTR_AT(msg, UPB_SIZE(68, 120), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
- _upb_sethas(msg, 18);
- *UPB_PTR_AT(msg, UPB_SIZE(84, 144), upb_strview) = value;
+ _upb_sethas(msg, 17);
+ *UPB_PTR_AT(msg, UPB_SIZE(76, 136), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_generic_services(google_protobuf_FileOptions *msg, bool value) {
- _upb_sethas(msg, 10);
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value;
+ _upb_sethas(msg, 18);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_php_metadata_namespace(google_protobuf_FileOptions *msg, upb_strview value) {
_upb_sethas(msg, 19);
- *UPB_PTR_AT(msg, UPB_SIZE(92, 160), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(84, 152), upb_strview) = value;
}
UPB_INLINE void google_protobuf_FileOptions_set_ruby_package(google_protobuf_FileOptions *msg, upb_strview value) {
_upb_sethas(msg, 20);
- *UPB_PTR_AT(msg, UPB_SIZE(100, 176), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(92, 168), upb_strview) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_mutable_uninterpreted_option(google_protobuf_FileOptions *msg, size_t *len) {
- return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 192), len);
+ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(100, 184), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FileOptions_resize_uninterpreted_option(google_protobuf_FileOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(108, 192), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(100, 184), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FileOptions_add_uninterpreted_option(google_protobuf_FileOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(108, 192), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(100, 184), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1147,6 +1232,12 @@ UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse(
google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_MessageOptions *google_protobuf_MessageOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_MessageOptions *ret = google_protobuf_MessageOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_MessageOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_MessageOptions_serialize(const google_protobuf_MessageOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MessageOptions_msginit, arena, len);
}
@@ -1182,12 +1273,12 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MessageOptions_resize_uninterpreted_option(google_protobuf_MessageOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(8, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MessageOptions_add_uninterpreted_option(google_protobuf_MessageOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(8, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(8, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1202,59 +1293,65 @@ UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse(cons
google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_FieldOptions *google_protobuf_FieldOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_FieldOptions *ret = google_protobuf_FieldOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_FieldOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_FieldOptions_serialize(const google_protobuf_FieldOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FieldOptions_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_FieldOptions_has_ctype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 1); }
-UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 3); }
-UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool); }
-UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 4); }
-UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool); }
-UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 5); }
-UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool); }
-UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 2); }
-UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t); }
+UPB_INLINE int32_t google_protobuf_FieldOptions_ctype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool google_protobuf_FieldOptions_has_packed(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool google_protobuf_FieldOptions_packed(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool); }
+UPB_INLINE bool google_protobuf_FieldOptions_has_deprecated(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool google_protobuf_FieldOptions_deprecated(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool); }
+UPB_INLINE bool google_protobuf_FieldOptions_has_lazy(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool google_protobuf_FieldOptions_lazy(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool); }
+UPB_INLINE bool google_protobuf_FieldOptions_has_jstype(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE int32_t google_protobuf_FieldOptions_jstype(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE bool google_protobuf_FieldOptions_has_weak(const google_protobuf_FieldOptions *msg) { return _upb_hasbit(msg, 6); }
-UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool); }
-UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 32)); }
-UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(28, 32), len); }
+UPB_INLINE bool google_protobuf_FieldOptions_weak(const google_protobuf_FieldOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool); }
+UPB_INLINE bool google_protobuf_FieldOptions_has_uninterpreted_option(const google_protobuf_FieldOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 16)); }
+UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_FieldOptions_uninterpreted_option(const google_protobuf_FieldOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(16, 16), len); }
UPB_INLINE void google_protobuf_FieldOptions_set_ctype(google_protobuf_FieldOptions *msg, int32_t value) {
_upb_sethas(msg, 1);
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_packed(google_protobuf_FieldOptions *msg, bool value) {
- _upb_sethas(msg, 3);
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), bool) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 12), bool) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_deprecated(google_protobuf_FieldOptions *msg, bool value) {
- _upb_sethas(msg, 4);
- *UPB_PTR_AT(msg, UPB_SIZE(25, 25), bool) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(13, 13), bool) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_lazy(google_protobuf_FieldOptions *msg, bool value) {
- _upb_sethas(msg, 5);
- *UPB_PTR_AT(msg, UPB_SIZE(26, 26), bool) = value;
+ _upb_sethas(msg, 4);
+ *UPB_PTR_AT(msg, UPB_SIZE(14, 14), bool) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_jstype(google_protobuf_FieldOptions *msg, int32_t value) {
- _upb_sethas(msg, 2);
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int32_t) = value;
+ _upb_sethas(msg, 5);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
UPB_INLINE void google_protobuf_FieldOptions_set_weak(google_protobuf_FieldOptions *msg, bool value) {
_upb_sethas(msg, 6);
- *UPB_PTR_AT(msg, UPB_SIZE(27, 27), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(15, 15), bool) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_mutable_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t *len) {
- return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
+ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 16), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_FieldOptions_resize_uninterpreted_option(google_protobuf_FieldOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_FieldOptions_add_uninterpreted_option(google_protobuf_FieldOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 32), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(16, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1269,6 +1366,12 @@ UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse(cons
google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_OneofOptions *google_protobuf_OneofOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_OneofOptions *ret = google_protobuf_OneofOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_OneofOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_OneofOptions_serialize(const google_protobuf_OneofOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_OneofOptions_msginit, arena, len);
}
@@ -1280,12 +1383,12 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_mu
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_OneofOptions_resize_uninterpreted_option(google_protobuf_OneofOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_OneofOptions_add_uninterpreted_option(google_protobuf_OneofOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1300,6 +1403,12 @@ UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse(const
google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_EnumOptions *google_protobuf_EnumOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_EnumOptions *ret = google_protobuf_EnumOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_EnumOptions_serialize(const google_protobuf_EnumOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumOptions_msginit, arena, len);
}
@@ -1323,12 +1432,12 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_mut
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumOptions_resize_uninterpreted_option(google_protobuf_EnumOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumOptions_add_uninterpreted_option(google_protobuf_EnumOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1343,6 +1452,12 @@ UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_pa
google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_EnumValueOptions *google_protobuf_EnumValueOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_EnumValueOptions *ret = google_protobuf_EnumValueOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_EnumValueOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_EnumValueOptions_serialize(const google_protobuf_EnumValueOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_EnumValueOptions_msginit, arena, len);
}
@@ -1360,12 +1475,12 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOption
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_EnumValueOptions_resize_uninterpreted_option(google_protobuf_EnumValueOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_EnumValueOptions_add_uninterpreted_option(google_protobuf_EnumValueOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1380,6 +1495,12 @@ UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse(
google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_ServiceOptions *google_protobuf_ServiceOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_ServiceOptions *ret = google_protobuf_ServiceOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_ServiceOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_ServiceOptions_serialize(const google_protobuf_ServiceOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ServiceOptions_msginit, arena, len);
}
@@ -1397,12 +1518,12 @@ UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_
return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_ServiceOptions_resize_uninterpreted_option(google_protobuf_ServiceOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_ServiceOptions_add_uninterpreted_option(google_protobuf_ServiceOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1417,35 +1538,41 @@ UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse(co
google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_MethodOptions *google_protobuf_MethodOptions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_MethodOptions *ret = google_protobuf_MethodOptions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_MethodOptions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_MethodOptions_serialize(const google_protobuf_MethodOptions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_MethodOptions_msginit, arena, len);
}
-UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 2); }
-UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool); }
-UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 1); }
-UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
-UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 24)); }
-UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(20, 24), len); }
+UPB_INLINE bool google_protobuf_MethodOptions_has_deprecated(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool google_protobuf_MethodOptions_deprecated(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE bool google_protobuf_MethodOptions_has_idempotency_level(const google_protobuf_MethodOptions *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE int32_t google_protobuf_MethodOptions_idempotency_level(const google_protobuf_MethodOptions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
+UPB_INLINE bool google_protobuf_MethodOptions_has_uninterpreted_option(const google_protobuf_MethodOptions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 16)); }
+UPB_INLINE const google_protobuf_UninterpretedOption* const* google_protobuf_MethodOptions_uninterpreted_option(const google_protobuf_MethodOptions *msg, size_t *len) { return (const google_protobuf_UninterpretedOption* const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len); }
UPB_INLINE void google_protobuf_MethodOptions_set_deprecated(google_protobuf_MethodOptions *msg, bool value) {
- _upb_sethas(msg, 2);
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), bool) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void google_protobuf_MethodOptions_set_idempotency_level(google_protobuf_MethodOptions *msg, int32_t value) {
- _upb_sethas(msg, 1);
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_mutable_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t *len) {
- return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 24), len);
+ return (google_protobuf_UninterpretedOption**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE google_protobuf_UninterpretedOption** google_protobuf_MethodOptions_resize_uninterpreted_option(google_protobuf_MethodOptions *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor(msg, UPB_SIZE(20, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption* google_protobuf_MethodOptions_add_uninterpreted_option(google_protobuf_MethodOptions *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption* sub = (struct google_protobuf_UninterpretedOption*)_upb_msg_new(&google_protobuf_UninterpretedOption_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(20, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(12, 16), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1460,19 +1587,25 @@ UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOpt
google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_UninterpretedOption *google_protobuf_UninterpretedOption_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_UninterpretedOption *ret = google_protobuf_UninterpretedOption_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_UninterpretedOption_serialize(const google_protobuf_UninterpretedOption *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_msginit, arena, len);
}
UPB_INLINE bool google_protobuf_UninterpretedOption_has_name(const google_protobuf_UninterpretedOption *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(56, 80)); }
UPB_INLINE const google_protobuf_UninterpretedOption_NamePart* const* google_protobuf_UninterpretedOption_name(const google_protobuf_UninterpretedOption *msg, size_t *len) { return (const google_protobuf_UninterpretedOption_NamePart* const*)_upb_array_accessor(msg, UPB_SIZE(56, 80), len); }
-UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool google_protobuf_UninterpretedOption_has_identifier_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_identifier_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); }
-UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool google_protobuf_UninterpretedOption_has_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE uint64_t google_protobuf_UninterpretedOption_positive_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
-UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool google_protobuf_UninterpretedOption_has_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE int64_t google_protobuf_UninterpretedOption_negative_int_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); }
-UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool google_protobuf_UninterpretedOption_has_double_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE double google_protobuf_UninterpretedOption_double_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), double); }
UPB_INLINE bool google_protobuf_UninterpretedOption_has_string_value(const google_protobuf_UninterpretedOption *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_string_value(const google_protobuf_UninterpretedOption *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); }
@@ -1483,29 +1616,29 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_Uninte
return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_mutable_accessor(msg, UPB_SIZE(56, 80), len);
}
UPB_INLINE google_protobuf_UninterpretedOption_NamePart** google_protobuf_UninterpretedOption_resize_name(google_protobuf_UninterpretedOption *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor(msg, UPB_SIZE(56, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_UninterpretedOption_NamePart**)_upb_array_resize_accessor2(msg, UPB_SIZE(56, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_UninterpretedOption_NamePart* google_protobuf_UninterpretedOption_add_name(google_protobuf_UninterpretedOption *msg, upb_arena *arena) {
struct google_protobuf_UninterpretedOption_NamePart* sub = (struct google_protobuf_UninterpretedOption_NamePart*)_upb_msg_new(&google_protobuf_UninterpretedOption_NamePart_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(56, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(56, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_identifier_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
- _upb_sethas(msg, 4);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_positive_int_value(google_protobuf_UninterpretedOption *msg, uint64_t value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_negative_int_value(google_protobuf_UninterpretedOption *msg, int64_t value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_double_value(google_protobuf_UninterpretedOption *msg, double value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), double) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_set_string_value(google_protobuf_UninterpretedOption *msg, upb_strview value) {
@@ -1527,21 +1660,27 @@ UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_Uninter
google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_UninterpretedOption_NamePart *google_protobuf_UninterpretedOption_NamePart_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_UninterpretedOption_NamePart *ret = google_protobuf_UninterpretedOption_NamePart_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_UninterpretedOption_NamePart_serialize(const google_protobuf_UninterpretedOption_NamePart *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UninterpretedOption_NamePart_msginit, arena, len);
}
-UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_UninterpretedOption_NamePart_name_part(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_has_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE bool google_protobuf_UninterpretedOption_NamePart_is_extension(const google_protobuf_UninterpretedOption_NamePart *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool); }
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_name_part(google_protobuf_UninterpretedOption_NamePart *msg, upb_strview value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void google_protobuf_UninterpretedOption_NamePart_set_is_extension(google_protobuf_UninterpretedOption_NamePart *msg, bool value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
@@ -1555,6 +1694,12 @@ UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse(
google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_SourceCodeInfo *google_protobuf_SourceCodeInfo_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_SourceCodeInfo *ret = google_protobuf_SourceCodeInfo_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_SourceCodeInfo_serialize(const google_protobuf_SourceCodeInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_msginit, arena, len);
}
@@ -1566,12 +1711,12 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeI
return (google_protobuf_SourceCodeInfo_Location**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_SourceCodeInfo_Location** google_protobuf_SourceCodeInfo_resize_location(google_protobuf_SourceCodeInfo *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_SourceCodeInfo_Location**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_SourceCodeInfo_Location* google_protobuf_SourceCodeInfo_add_location(google_protobuf_SourceCodeInfo *msg, upb_arena *arena) {
struct google_protobuf_SourceCodeInfo_Location* sub = (struct google_protobuf_SourceCodeInfo_Location*)_upb_msg_new(&google_protobuf_SourceCodeInfo_Location_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1586,6 +1731,12 @@ UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeIn
google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_SourceCodeInfo_Location *google_protobuf_SourceCodeInfo_Location_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_SourceCodeInfo_Location *ret = google_protobuf_SourceCodeInfo_Location_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_SourceCodeInfo_Location_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_SourceCodeInfo_Location_serialize(const google_protobuf_SourceCodeInfo_Location *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_SourceCodeInfo_Location_msginit, arena, len);
}
@@ -1602,20 +1753,20 @@ UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_path(google_
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_path(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 40), len, 2, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_path(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(20, 40), 2, &val,
arena);
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_mutable_span(google_protobuf_SourceCodeInfo_Location *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE int32_t* google_protobuf_SourceCodeInfo_Location_resize_span(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, 2, arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_span(google_protobuf_SourceCodeInfo_Location *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 48), 2, &val,
arena);
}
UPB_INLINE void google_protobuf_SourceCodeInfo_Location_set_leading_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview value) {
@@ -1630,10 +1781,10 @@ UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_mutable_leading_
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE upb_strview* google_protobuf_SourceCodeInfo_Location_resize_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool google_protobuf_SourceCodeInfo_Location_add_leading_detached_comments(google_protobuf_SourceCodeInfo_Location *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 56), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 56), UPB_SIZE(3, 4), &val,
arena);
}
@@ -1647,6 +1798,12 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_
google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_GeneratedCodeInfo *google_protobuf_GeneratedCodeInfo_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_GeneratedCodeInfo *ret = google_protobuf_GeneratedCodeInfo_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_serialize(const google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_msginit, arena, len);
}
@@ -1658,12 +1815,12 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_Genera
return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation** google_protobuf_GeneratedCodeInfo_resize_annotation(google_protobuf_GeneratedCodeInfo *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_GeneratedCodeInfo_Annotation**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_GeneratedCodeInfo_Annotation* google_protobuf_GeneratedCodeInfo_add_annotation(google_protobuf_GeneratedCodeInfo *msg, upb_arena *arena) {
struct google_protobuf_GeneratedCodeInfo_Annotation* sub = (struct google_protobuf_GeneratedCodeInfo_Annotation*)_upb_msg_new(&google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1678,38 +1835,44 @@ UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_Generat
google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_GeneratedCodeInfo_Annotation *google_protobuf_GeneratedCodeInfo_Annotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_GeneratedCodeInfo_Annotation *ret = google_protobuf_GeneratedCodeInfo_Annotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_GeneratedCodeInfo_Annotation_serialize(const google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_GeneratedCodeInfo_Annotation_msginit, arena, len);
}
UPB_INLINE int32_t const* google_protobuf_GeneratedCodeInfo_Annotation_path(const google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) { return (int32_t const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len); }
-UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview google_protobuf_GeneratedCodeInfo_Annotation_source_file(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
-UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_begin(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
-UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_has_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE int32_t google_protobuf_GeneratedCodeInfo_Annotation_end(const google_protobuf_GeneratedCodeInfo_Annotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_mutable_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
}
UPB_INLINE int32_t* google_protobuf_GeneratedCodeInfo_Annotation_resize_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 32), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(20, 32), len, 2, arena);
}
UPB_INLINE bool google_protobuf_GeneratedCodeInfo_Annotation_add_path(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(20, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(20, 32), 2, &val,
arena);
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_source_file(google_protobuf_GeneratedCodeInfo_Annotation *msg, upb_strview value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_begin(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void google_protobuf_GeneratedCodeInfo_Annotation_set_end(google_protobuf_GeneratedCodeInfo_Annotation *msg, int32_t value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.c
index 7384c06cf27..03d463a05ee 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.c
@@ -20,7 +20,7 @@ static const upb_msglayout_field google_protobuf_Duration__fields[2] = {
const upb_msglayout google_protobuf_Duration_msginit = {
NULL,
&google_protobuf_Duration__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.h
index f3fa03591c4..4692fd70be9 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/duration.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE google_protobuf_Duration *google_protobuf_Duration_parse(const char *
google_protobuf_Duration *ret = google_protobuf_Duration_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Duration_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Duration *google_protobuf_Duration_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Duration *ret = google_protobuf_Duration_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Duration_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Duration_serialize(const google_protobuf_Duration *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Duration_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.c
index 51ac7ed26c3..f634b2bed69 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.c
@@ -15,7 +15,7 @@
const upb_msglayout google_protobuf_Empty_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.h
index a7471dcd08d..9202b832e19 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/empty.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE google_protobuf_Empty *google_protobuf_Empty_parse(const char *buf, s
google_protobuf_Empty *ret = google_protobuf_Empty_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Empty_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Empty *google_protobuf_Empty_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Empty *ret = google_protobuf_Empty_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Empty_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Empty_serialize(const google_protobuf_Empty *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Empty_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.c
index a0d20a4fae0..04b916703cc 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.c
@@ -23,7 +23,7 @@ static const upb_msglayout_field google_protobuf_Struct__fields[1] = {
const upb_msglayout google_protobuf_Struct_msginit = {
&google_protobuf_Struct_submsgs[0],
&google_protobuf_Struct__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout *const google_protobuf_Struct_FieldsEntry_submsgs[1] = {
@@ -38,7 +38,7 @@ static const upb_msglayout_field google_protobuf_Struct_FieldsEntry__fields[2] =
const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit = {
&google_protobuf_Struct_FieldsEntry_submsgs[0],
&google_protobuf_Struct_FieldsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const google_protobuf_Value_submsgs[2] = {
@@ -58,7 +58,7 @@ static const upb_msglayout_field google_protobuf_Value__fields[6] = {
const upb_msglayout google_protobuf_Value_msginit = {
&google_protobuf_Value_submsgs[0],
&google_protobuf_Value__fields[0],
- UPB_SIZE(16, 32), 6, false,
+ UPB_SIZE(16, 32), 6, false, 255,
};
static const upb_msglayout *const google_protobuf_ListValue_submsgs[1] = {
@@ -72,7 +72,7 @@ static const upb_msglayout_field google_protobuf_ListValue__fields[1] = {
const upb_msglayout google_protobuf_ListValue_msginit = {
&google_protobuf_ListValue_submsgs[0],
&google_protobuf_ListValue__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.h
index b25201d3234..29fec82b577 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/struct.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -47,6 +48,12 @@ UPB_INLINE google_protobuf_Struct *google_protobuf_Struct_parse(const char *buf,
google_protobuf_Struct *ret = google_protobuf_Struct_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Struct_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Struct *google_protobuf_Struct_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Struct *ret = google_protobuf_Struct_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Struct_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Struct_serialize(const google_protobuf_Struct *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Struct_msginit, arena, len);
}
@@ -89,6 +96,12 @@ UPB_INLINE google_protobuf_Value *google_protobuf_Value_parse(const char *buf, s
google_protobuf_Value *ret = google_protobuf_Value_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Value_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Value *google_protobuf_Value_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Value *ret = google_protobuf_Value_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Value_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Value_serialize(const google_protobuf_Value *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Value_msginit, arena, len);
}
@@ -164,6 +177,12 @@ UPB_INLINE google_protobuf_ListValue *google_protobuf_ListValue_parse(const char
google_protobuf_ListValue *ret = google_protobuf_ListValue_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_ListValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_ListValue *google_protobuf_ListValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_ListValue *ret = google_protobuf_ListValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_ListValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_ListValue_serialize(const google_protobuf_ListValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_ListValue_msginit, arena, len);
}
@@ -175,12 +194,12 @@ UPB_INLINE google_protobuf_Value** google_protobuf_ListValue_mutable_values(goog
return (google_protobuf_Value**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE google_protobuf_Value** google_protobuf_ListValue_resize_values(google_protobuf_ListValue *msg, size_t len, upb_arena *arena) {
- return (google_protobuf_Value**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (google_protobuf_Value**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_Value* google_protobuf_ListValue_add_values(google_protobuf_ListValue *msg, upb_arena *arena) {
struct google_protobuf_Value* sub = (struct google_protobuf_Value*)_upb_msg_new(&google_protobuf_Value_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c
index edc7af5f364..718ce3b9dbb 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c
@@ -20,7 +20,7 @@ static const upb_msglayout_field google_protobuf_Timestamp__fields[2] = {
const upb_msglayout google_protobuf_Timestamp_msginit = {
NULL,
&google_protobuf_Timestamp__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(16, 16), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h
index f5166de4d5d..31c1145adc9 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE google_protobuf_Timestamp *google_protobuf_Timestamp_parse(const char
google_protobuf_Timestamp *ret = google_protobuf_Timestamp_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Timestamp_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Timestamp *google_protobuf_Timestamp_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Timestamp *ret = google_protobuf_Timestamp_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Timestamp_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Timestamp_serialize(const google_protobuf_Timestamp *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Timestamp_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c
index 1b93ef437ac..aabc1740129 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c
@@ -19,7 +19,7 @@ static const upb_msglayout_field google_protobuf_DoubleValue__fields[1] = {
const upb_msglayout google_protobuf_DoubleValue_msginit = {
NULL,
&google_protobuf_DoubleValue__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_FloatValue__fields[1] = {
@@ -29,7 +29,7 @@ static const upb_msglayout_field google_protobuf_FloatValue__fields[1] = {
const upb_msglayout google_protobuf_FloatValue_msginit = {
NULL,
&google_protobuf_FloatValue__fields[0],
- UPB_SIZE(4, 4), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_Int64Value__fields[1] = {
@@ -39,7 +39,7 @@ static const upb_msglayout_field google_protobuf_Int64Value__fields[1] = {
const upb_msglayout google_protobuf_Int64Value_msginit = {
NULL,
&google_protobuf_Int64Value__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_UInt64Value__fields[1] = {
@@ -49,7 +49,7 @@ static const upb_msglayout_field google_protobuf_UInt64Value__fields[1] = {
const upb_msglayout google_protobuf_UInt64Value_msginit = {
NULL,
&google_protobuf_UInt64Value__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_Int32Value__fields[1] = {
@@ -59,7 +59,7 @@ static const upb_msglayout_field google_protobuf_Int32Value__fields[1] = {
const upb_msglayout google_protobuf_Int32Value_msginit = {
NULL,
&google_protobuf_Int32Value__fields[0],
- UPB_SIZE(4, 4), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_UInt32Value__fields[1] = {
@@ -69,7 +69,7 @@ static const upb_msglayout_field google_protobuf_UInt32Value__fields[1] = {
const upb_msglayout google_protobuf_UInt32Value_msginit = {
NULL,
&google_protobuf_UInt32Value__fields[0],
- UPB_SIZE(4, 4), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_BoolValue__fields[1] = {
@@ -79,7 +79,7 @@ static const upb_msglayout_field google_protobuf_BoolValue__fields[1] = {
const upb_msglayout google_protobuf_BoolValue_msginit = {
NULL,
&google_protobuf_BoolValue__fields[0],
- UPB_SIZE(1, 1), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_StringValue__fields[1] = {
@@ -89,7 +89,7 @@ static const upb_msglayout_field google_protobuf_StringValue__fields[1] = {
const upb_msglayout google_protobuf_StringValue_msginit = {
NULL,
&google_protobuf_StringValue__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field google_protobuf_BytesValue__fields[1] = {
@@ -99,7 +99,7 @@ static const upb_msglayout_field google_protobuf_BytesValue__fields[1] = {
const upb_msglayout google_protobuf_BytesValue_msginit = {
NULL,
&google_protobuf_BytesValue__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h
index 761eeebdd64..c184b805064 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -58,6 +59,12 @@ UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_parse(const
google_protobuf_DoubleValue *ret = google_protobuf_DoubleValue_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_DoubleValue *google_protobuf_DoubleValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_DoubleValue *ret = google_protobuf_DoubleValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_DoubleValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_DoubleValue_serialize(const google_protobuf_DoubleValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_DoubleValue_msginit, arena, len);
}
@@ -78,6 +85,12 @@ UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_parse(const ch
google_protobuf_FloatValue *ret = google_protobuf_FloatValue_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_FloatValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_FloatValue *google_protobuf_FloatValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_FloatValue *ret = google_protobuf_FloatValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_FloatValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_FloatValue_serialize(const google_protobuf_FloatValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_FloatValue_msginit, arena, len);
}
@@ -98,6 +111,12 @@ UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_parse(const ch
google_protobuf_Int64Value *ret = google_protobuf_Int64Value_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Int64Value_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Int64Value *google_protobuf_Int64Value_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Int64Value *ret = google_protobuf_Int64Value_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Int64Value_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Int64Value_serialize(const google_protobuf_Int64Value *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Int64Value_msginit, arena, len);
}
@@ -118,6 +137,12 @@ UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_parse(const
google_protobuf_UInt64Value *ret = google_protobuf_UInt64Value_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_UInt64Value *google_protobuf_UInt64Value_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_UInt64Value *ret = google_protobuf_UInt64Value_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_UInt64Value_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_UInt64Value_serialize(const google_protobuf_UInt64Value *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UInt64Value_msginit, arena, len);
}
@@ -138,6 +163,12 @@ UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_parse(const ch
google_protobuf_Int32Value *ret = google_protobuf_Int32Value_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_Int32Value_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_Int32Value *google_protobuf_Int32Value_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_Int32Value *ret = google_protobuf_Int32Value_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_Int32Value_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_Int32Value_serialize(const google_protobuf_Int32Value *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_Int32Value_msginit, arena, len);
}
@@ -158,6 +189,12 @@ UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_parse(const
google_protobuf_UInt32Value *ret = google_protobuf_UInt32Value_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_UInt32Value *google_protobuf_UInt32Value_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_UInt32Value *ret = google_protobuf_UInt32Value_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_UInt32Value_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_UInt32Value_serialize(const google_protobuf_UInt32Value *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_UInt32Value_msginit, arena, len);
}
@@ -178,6 +215,12 @@ UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_parse(const char
google_protobuf_BoolValue *ret = google_protobuf_BoolValue_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_BoolValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_BoolValue *google_protobuf_BoolValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_BoolValue *ret = google_protobuf_BoolValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_BoolValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_BoolValue_serialize(const google_protobuf_BoolValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_BoolValue_msginit, arena, len);
}
@@ -198,6 +241,12 @@ UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_parse(const
google_protobuf_StringValue *ret = google_protobuf_StringValue_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_StringValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_StringValue *google_protobuf_StringValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_StringValue *ret = google_protobuf_StringValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_StringValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_StringValue_serialize(const google_protobuf_StringValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_StringValue_msginit, arena, len);
}
@@ -218,6 +267,12 @@ UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_parse(const ch
google_protobuf_BytesValue *ret = google_protobuf_BytesValue_new(arena);
return (ret && upb_decode(buf, size, ret, &google_protobuf_BytesValue_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_protobuf_BytesValue *google_protobuf_BytesValue_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_protobuf_BytesValue *ret = google_protobuf_BytesValue_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_protobuf_BytesValue_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_protobuf_BytesValue_serialize(const google_protobuf_BytesValue *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_protobuf_BytesValue_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.c
index 25ac1461741..e276a0dc1f1 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.c
@@ -26,7 +26,7 @@ static const upb_msglayout_field google_rpc_Status__fields[3] = {
const upb_msglayout google_rpc_Status_msginit = {
&google_rpc_Status_submsgs[0],
&google_rpc_Status__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.h
index 2c5fb02f7d9..4cc29b3dc26 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/google/rpc/status.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -36,6 +37,12 @@ UPB_INLINE google_rpc_Status *google_rpc_Status_parse(const char *buf, size_t si
google_rpc_Status *ret = google_rpc_Status_new(arena);
return (ret && upb_decode(buf, size, ret, &google_rpc_Status_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE google_rpc_Status *google_rpc_Status_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ google_rpc_Status *ret = google_rpc_Status_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &google_rpc_Status_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *google_rpc_Status_serialize(const google_rpc_Status *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &google_rpc_Status_msginit, arena, len);
}
@@ -55,12 +62,12 @@ UPB_INLINE struct google_protobuf_Any** google_rpc_Status_mutable_details(google
return (struct google_protobuf_Any**)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 24), len);
}
UPB_INLINE struct google_protobuf_Any** google_rpc_Status_resize_details(google_rpc_Status *msg, size_t len, upb_arena *arena) {
- return (struct google_protobuf_Any**)_upb_array_resize_accessor(msg, UPB_SIZE(12, 24), len, UPB_TYPE_MESSAGE, arena);
+ return (struct google_protobuf_Any**)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 24), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_Any* google_rpc_Status_add_details(google_rpc_Status *msg, upb_arena *arena) {
struct google_protobuf_Any* sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(12, 24), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(12, 24), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c
index 6c917ad9f20..8b6de3fb468 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c
@@ -21,17 +21,17 @@ static const upb_msglayout *const grpc_gcp_AltsContext_submsgs[2] = {
static const upb_msglayout_field grpc_gcp_AltsContext__fields[7] = {
{1, UPB_SIZE(8, 8), 0, 0, 9, 1},
{2, UPB_SIZE(16, 24), 0, 0, 9, 1},
- {3, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {3, UPB_SIZE(4, 4), 0, 0, 14, 1},
{4, UPB_SIZE(24, 40), 0, 0, 9, 1},
{5, UPB_SIZE(32, 56), 0, 0, 9, 1},
- {6, UPB_SIZE(40, 72), 0, 1, 11, 1},
+ {6, UPB_SIZE(40, 72), 1, 1, 11, 1},
{7, UPB_SIZE(44, 80), 0, 0, 11, _UPB_LABEL_MAP},
};
const upb_msglayout grpc_gcp_AltsContext_msginit = {
&grpc_gcp_AltsContext_submsgs[0],
&grpc_gcp_AltsContext__fields[0],
- UPB_SIZE(48, 96), 7, false,
+ UPB_SIZE(48, 96), 7, false, 255,
};
static const upb_msglayout_field grpc_gcp_AltsContext_PeerAttributesEntry__fields[2] = {
@@ -42,7 +42,7 @@ static const upb_msglayout_field grpc_gcp_AltsContext_PeerAttributesEntry__field
const upb_msglayout grpc_gcp_AltsContext_PeerAttributesEntry_msginit = {
NULL,
&grpc_gcp_AltsContext_PeerAttributesEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h
index 33c1b2f160a..3a91b53d000 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -39,16 +40,22 @@ UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse(const char *buf, siz
grpc_gcp_AltsContext *ret = grpc_gcp_AltsContext_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_AltsContext_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_AltsContext *grpc_gcp_AltsContext_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_AltsContext *ret = grpc_gcp_AltsContext_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_AltsContext_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_AltsContext_serialize(const grpc_gcp_AltsContext *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_AltsContext_msginit, arena, len);
}
UPB_INLINE upb_strview grpc_gcp_AltsContext_application_protocol(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
UPB_INLINE upb_strview grpc_gcp_AltsContext_record_protocol(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
-UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t grpc_gcp_AltsContext_security_level(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE upb_strview grpc_gcp_AltsContext_peer_service_account(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview); }
UPB_INLINE upb_strview grpc_gcp_AltsContext_local_service_account(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview); }
-UPB_INLINE bool grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); }
+UPB_INLINE bool grpc_gcp_AltsContext_has_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_peer_rpc_versions(const grpc_gcp_AltsContext *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct grpc_gcp_RpcProtocolVersions*); }
UPB_INLINE bool grpc_gcp_AltsContext_has_peer_attributes(const grpc_gcp_AltsContext *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
UPB_INLINE size_t grpc_gcp_AltsContext_peer_attributes_size(const grpc_gcp_AltsContext *msg) {return _upb_msg_map_size(msg, UPB_SIZE(44, 80)); }
@@ -62,7 +69,7 @@ UPB_INLINE void grpc_gcp_AltsContext_set_record_protocol(grpc_gcp_AltsContext *m
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_AltsContext_set_security_level(grpc_gcp_AltsContext *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void grpc_gcp_AltsContext_set_peer_service_account(grpc_gcp_AltsContext *msg, upb_strview value) {
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview) = value;
@@ -71,6 +78,7 @@ UPB_INLINE void grpc_gcp_AltsContext_set_local_service_account(grpc_gcp_AltsCont
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_AltsContext_set_peer_rpc_versions(grpc_gcp_AltsContext *msg, struct grpc_gcp_RpcProtocolVersions* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct grpc_gcp_RpcProtocolVersions*) = value;
}
UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_AltsContext_mutable_peer_rpc_versions(grpc_gcp_AltsContext *msg, upb_arena *arena) {
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c
index 036b66fdcec..998f2d81c2c 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c
@@ -14,15 +14,15 @@
#include "upb/port_def.inc"
static const upb_msglayout_field grpc_gcp_Endpoint__fields[3] = {
- {1, UPB_SIZE(12, 16), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 8), 0, 0, 5, 1},
+ {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(4, 4), 0, 0, 5, 1},
{3, UPB_SIZE(0, 0), 0, 0, 14, 1},
};
const upb_msglayout grpc_gcp_Endpoint_msginit = {
NULL,
&grpc_gcp_Endpoint__fields[0],
- UPB_SIZE(24, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout *const grpc_gcp_Identity_submsgs[1] = {
@@ -38,7 +38,7 @@ static const upb_msglayout_field grpc_gcp_Identity__fields[3] = {
const upb_msglayout grpc_gcp_Identity_msginit = {
&grpc_gcp_Identity_submsgs[0],
&grpc_gcp_Identity__fields[0],
- UPB_SIZE(16, 32), 3, false,
+ UPB_SIZE(16, 32), 3, false, 255,
};
static const upb_msglayout_field grpc_gcp_Identity_AttributesEntry__fields[2] = {
@@ -49,32 +49,32 @@ static const upb_msglayout_field grpc_gcp_Identity_AttributesEntry__fields[2] =
const upb_msglayout grpc_gcp_Identity_AttributesEntry_msginit = {
NULL,
&grpc_gcp_Identity_AttributesEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
-static const upb_msglayout *const grpc_gcp_StartClientHandshakeReq_submsgs[5] = {
+static const upb_msglayout *const grpc_gcp_StartClientHandshakeReq_submsgs[3] = {
&grpc_gcp_Endpoint_msginit,
&grpc_gcp_Identity_msginit,
&grpc_gcp_RpcProtocolVersions_msginit,
};
static const upb_msglayout_field grpc_gcp_StartClientHandshakeReq__fields[10] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 14, 1},
{2, UPB_SIZE(36, 64), 0, 0, 9, 3},
{3, UPB_SIZE(40, 72), 0, 0, 9, 3},
{4, UPB_SIZE(44, 80), 0, 1, 11, 3},
- {5, UPB_SIZE(20, 32), 0, 1, 11, 1},
- {6, UPB_SIZE(24, 40), 0, 0, 11, 1},
- {7, UPB_SIZE(28, 48), 0, 0, 11, 1},
+ {5, UPB_SIZE(20, 32), 1, 1, 11, 1},
+ {6, UPB_SIZE(24, 40), 2, 0, 11, 1},
+ {7, UPB_SIZE(28, 48), 3, 0, 11, 1},
{8, UPB_SIZE(12, 16), 0, 0, 9, 1},
- {9, UPB_SIZE(32, 56), 0, 2, 11, 1},
+ {9, UPB_SIZE(32, 56), 4, 2, 11, 1},
{10, UPB_SIZE(8, 8), 0, 0, 13, 1},
};
const upb_msglayout grpc_gcp_StartClientHandshakeReq_msginit = {
&grpc_gcp_StartClientHandshakeReq_submsgs[0],
&grpc_gcp_StartClientHandshakeReq__fields[0],
- UPB_SIZE(48, 96), 10, false,
+ UPB_SIZE(48, 96), 10, false, 255,
};
static const upb_msglayout *const grpc_gcp_ServerHandshakeParameters_submsgs[1] = {
@@ -89,29 +89,29 @@ static const upb_msglayout_field grpc_gcp_ServerHandshakeParameters__fields[2] =
const upb_msglayout grpc_gcp_ServerHandshakeParameters_msginit = {
&grpc_gcp_ServerHandshakeParameters_submsgs[0],
&grpc_gcp_ServerHandshakeParameters__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
-static const upb_msglayout *const grpc_gcp_StartServerHandshakeReq_submsgs[4] = {
+static const upb_msglayout *const grpc_gcp_StartServerHandshakeReq_submsgs[3] = {
&grpc_gcp_Endpoint_msginit,
&grpc_gcp_RpcProtocolVersions_msginit,
&grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit,
};
static const upb_msglayout_field grpc_gcp_StartServerHandshakeReq__fields[7] = {
- {1, UPB_SIZE(24, 48), 0, 0, 9, 3},
- {2, UPB_SIZE(28, 56), 0, 2, 11, _UPB_LABEL_MAP},
- {3, UPB_SIZE(4, 8), 0, 0, 12, 1},
- {4, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {5, UPB_SIZE(16, 32), 0, 0, 11, 1},
- {6, UPB_SIZE(20, 40), 0, 1, 11, 1},
- {7, UPB_SIZE(0, 0), 0, 0, 13, 1},
+ {1, UPB_SIZE(28, 48), 0, 0, 9, 3},
+ {2, UPB_SIZE(32, 56), 0, 2, 11, _UPB_LABEL_MAP},
+ {3, UPB_SIZE(8, 8), 0, 0, 12, 1},
+ {4, UPB_SIZE(16, 24), 1, 0, 11, 1},
+ {5, UPB_SIZE(20, 32), 2, 0, 11, 1},
+ {6, UPB_SIZE(24, 40), 3, 1, 11, 1},
+ {7, UPB_SIZE(4, 4), 0, 0, 13, 1},
};
const upb_msglayout grpc_gcp_StartServerHandshakeReq_msginit = {
&grpc_gcp_StartServerHandshakeReq_submsgs[0],
&grpc_gcp_StartServerHandshakeReq__fields[0],
- UPB_SIZE(32, 64), 7, false,
+ UPB_SIZE(40, 64), 7, false, 255,
};
static const upb_msglayout *const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_submsgs[1] = {
@@ -126,7 +126,7 @@ static const upb_msglayout_field grpc_gcp_StartServerHandshakeReq_HandshakeParam
const upb_msglayout grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_msginit = {
&grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry_submsgs[0],
&grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field grpc_gcp_NextHandshakeMessageReq__fields[1] = {
@@ -136,7 +136,7 @@ static const upb_msglayout_field grpc_gcp_NextHandshakeMessageReq__fields[1] = {
const upb_msglayout grpc_gcp_NextHandshakeMessageReq_msginit = {
NULL,
&grpc_gcp_NextHandshakeMessageReq__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout *const grpc_gcp_HandshakerReq_submsgs[3] = {
@@ -154,29 +154,29 @@ static const upb_msglayout_field grpc_gcp_HandshakerReq__fields[3] = {
const upb_msglayout grpc_gcp_HandshakerReq_msginit = {
&grpc_gcp_HandshakerReq_submsgs[0],
&grpc_gcp_HandshakerReq__fields[0],
- UPB_SIZE(8, 16), 3, false,
+ UPB_SIZE(8, 16), 3, false, 255,
};
-static const upb_msglayout *const grpc_gcp_HandshakerResult_submsgs[3] = {
+static const upb_msglayout *const grpc_gcp_HandshakerResult_submsgs[2] = {
&grpc_gcp_Identity_msginit,
&grpc_gcp_RpcProtocolVersions_msginit,
};
static const upb_msglayout_field grpc_gcp_HandshakerResult__fields[8] = {
- {1, UPB_SIZE(8, 8), 0, 0, 9, 1},
- {2, UPB_SIZE(16, 24), 0, 0, 9, 1},
- {3, UPB_SIZE(24, 40), 0, 0, 12, 1},
- {4, UPB_SIZE(32, 56), 0, 0, 11, 1},
- {5, UPB_SIZE(36, 64), 0, 0, 11, 1},
- {6, UPB_SIZE(4, 4), 0, 0, 8, 1},
- {7, UPB_SIZE(40, 72), 0, 1, 11, 1},
- {8, UPB_SIZE(0, 0), 0, 0, 13, 1},
+ {1, UPB_SIZE(12, 16), 0, 0, 9, 1},
+ {2, UPB_SIZE(20, 32), 0, 0, 9, 1},
+ {3, UPB_SIZE(28, 48), 0, 0, 12, 1},
+ {4, UPB_SIZE(36, 64), 1, 0, 11, 1},
+ {5, UPB_SIZE(40, 72), 2, 0, 11, 1},
+ {6, UPB_SIZE(8, 8), 0, 0, 8, 1},
+ {7, UPB_SIZE(44, 80), 3, 1, 11, 1},
+ {8, UPB_SIZE(4, 4), 0, 0, 13, 1},
};
const upb_msglayout grpc_gcp_HandshakerResult_msginit = {
&grpc_gcp_HandshakerResult_submsgs[0],
&grpc_gcp_HandshakerResult__fields[0],
- UPB_SIZE(48, 80), 8, false,
+ UPB_SIZE(48, 96), 8, false, 255,
};
static const upb_msglayout_field grpc_gcp_HandshakerStatus__fields[2] = {
@@ -187,7 +187,7 @@ static const upb_msglayout_field grpc_gcp_HandshakerStatus__fields[2] = {
const upb_msglayout grpc_gcp_HandshakerStatus_msginit = {
NULL,
&grpc_gcp_HandshakerStatus__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const grpc_gcp_HandshakerResp_submsgs[2] = {
@@ -196,16 +196,16 @@ static const upb_msglayout *const grpc_gcp_HandshakerResp_submsgs[2] = {
};
static const upb_msglayout_field grpc_gcp_HandshakerResp__fields[4] = {
- {1, UPB_SIZE(4, 8), 0, 0, 12, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 13, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
- {4, UPB_SIZE(16, 32), 0, 1, 11, 1},
+ {1, UPB_SIZE(8, 8), 0, 0, 12, 1},
+ {2, UPB_SIZE(4, 4), 0, 0, 13, 1},
+ {3, UPB_SIZE(16, 24), 1, 0, 11, 1},
+ {4, UPB_SIZE(20, 32), 2, 1, 11, 1},
};
const upb_msglayout grpc_gcp_HandshakerResp_msginit = {
&grpc_gcp_HandshakerResp_submsgs[0],
&grpc_gcp_HandshakerResp__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h
index 323f3cdbc6a..e4c5bf63bea 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -81,19 +82,25 @@ UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse(const char *buf, size_t si
grpc_gcp_Endpoint *ret = grpc_gcp_Endpoint_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_Endpoint_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_Endpoint *grpc_gcp_Endpoint_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_Endpoint *ret = grpc_gcp_Endpoint_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_Endpoint_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_Endpoint_serialize(const grpc_gcp_Endpoint *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_Endpoint_msginit, arena, len);
}
-UPB_INLINE upb_strview grpc_gcp_Endpoint_ip_address(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
-UPB_INLINE int32_t grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t); }
+UPB_INLINE upb_strview grpc_gcp_Endpoint_ip_address(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE int32_t grpc_gcp_Endpoint_port(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE int32_t grpc_gcp_Endpoint_protocol(const grpc_gcp_Endpoint *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
UPB_INLINE void grpc_gcp_Endpoint_set_ip_address(grpc_gcp_Endpoint *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_Endpoint_set_port(grpc_gcp_Endpoint *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void grpc_gcp_Endpoint_set_protocol(grpc_gcp_Endpoint *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
@@ -109,6 +116,12 @@ UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse(const char *buf, size_t si
grpc_gcp_Identity *ret = grpc_gcp_Identity_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_Identity_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_Identity *grpc_gcp_Identity_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_Identity *ret = grpc_gcp_Identity_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_Identity_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_Identity_serialize(const grpc_gcp_Identity *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_Identity_msginit, arena, len);
}
@@ -167,63 +180,70 @@ UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_pa
grpc_gcp_StartClientHandshakeReq *ret = grpc_gcp_StartClientHandshakeReq_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_StartClientHandshakeReq_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_StartClientHandshakeReq *grpc_gcp_StartClientHandshakeReq_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_StartClientHandshakeReq *ret = grpc_gcp_StartClientHandshakeReq_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_StartClientHandshakeReq_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_StartClientHandshakeReq_serialize(const grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_StartClientHandshakeReq_msginit, arena, len);
}
-UPB_INLINE int32_t grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE int32_t grpc_gcp_StartClientHandshakeReq_handshake_security_protocol(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t); }
UPB_INLINE upb_strview const* grpc_gcp_StartClientHandshakeReq_application_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(36, 64), len); }
UPB_INLINE upb_strview const* grpc_gcp_StartClientHandshakeReq_record_protocols(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(40, 72), len); }
UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_target_identities(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 80)); }
UPB_INLINE const grpc_gcp_Identity* const* grpc_gcp_StartClientHandshakeReq_target_identities(const grpc_gcp_StartClientHandshakeReq *msg, size_t *len) { return (const grpc_gcp_Identity* const*)_upb_array_accessor(msg, UPB_SIZE(44, 80), len); }
-UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 32)); }
+UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE const grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_local_identity(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_Identity*); }
-UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(24, 40)); }
+UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_local_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const grpc_gcp_Endpoint*); }
-UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
+UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_remote_endpoint(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const grpc_gcp_Endpoint*); }
UPB_INLINE upb_strview grpc_gcp_StartClientHandshakeReq_target_name(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
-UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_has_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_rpc_versions(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const struct grpc_gcp_RpcProtocolVersions*); }
UPB_INLINE uint32_t grpc_gcp_StartClientHandshakeReq_max_frame_size(const grpc_gcp_StartClientHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint32_t); }
UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_handshake_security_protocol(grpc_gcp_StartClientHandshakeReq *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 64), len);
}
UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(36, 64), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(36, 64), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_application_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(36, 64), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(36, 64), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_mutable_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(40, 72), len);
}
UPB_INLINE upb_strview* grpc_gcp_StartClientHandshakeReq_resize_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(40, 72), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(40, 72), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool grpc_gcp_StartClientHandshakeReq_add_record_protocols(grpc_gcp_StartClientHandshakeReq *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(40, 72), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(40, 72), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_mutable_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t *len) {
return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 80), len);
}
UPB_INLINE grpc_gcp_Identity** grpc_gcp_StartClientHandshakeReq_resize_target_identities(grpc_gcp_StartClientHandshakeReq *msg, size_t len, upb_arena *arena) {
- return (grpc_gcp_Identity**)_upb_array_resize_accessor(msg, UPB_SIZE(44, 80), len, UPB_TYPE_MESSAGE, arena);
+ return (grpc_gcp_Identity**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 80), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_add_target_identities(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(44, 80), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 80), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_identity(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Identity* value) {
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Identity*) = value;
}
UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_local_identity(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
@@ -236,6 +256,7 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_StartClientHandshakeReq_mutable_lo
return sub;
}
UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) {
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), grpc_gcp_Endpoint*) = value;
}
UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_local_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
@@ -248,6 +269,7 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_lo
return sub;
}
UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, grpc_gcp_Endpoint* value) {
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(28, 48), grpc_gcp_Endpoint*) = value;
}
UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartClientHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
@@ -263,6 +285,7 @@ UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_target_name(grpc_gcp_StartC
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_StartClientHandshakeReq_set_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) {
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(32, 56), struct grpc_gcp_RpcProtocolVersions*) = value;
}
UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartClientHandshakeReq_mutable_rpc_versions(grpc_gcp_StartClientHandshakeReq *msg, upb_arena *arena) {
@@ -288,6 +311,12 @@ UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameter
grpc_gcp_ServerHandshakeParameters *ret = grpc_gcp_ServerHandshakeParameters_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_ServerHandshakeParameters_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_ServerHandshakeParameters *grpc_gcp_ServerHandshakeParameters_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_ServerHandshakeParameters *ret = grpc_gcp_ServerHandshakeParameters_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_ServerHandshakeParameters_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_ServerHandshakeParameters_serialize(const grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_ServerHandshakeParameters_msginit, arena, len);
}
@@ -300,22 +329,22 @@ UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_mutable_record_protoc
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE upb_strview* grpc_gcp_ServerHandshakeParameters_resize_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool grpc_gcp_ServerHandshakeParameters_add_record_protocols(grpc_gcp_ServerHandshakeParameters *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(0, 0), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_mutable_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t *len) {
return (grpc_gcp_Identity**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE grpc_gcp_Identity** grpc_gcp_ServerHandshakeParameters_resize_local_identities(grpc_gcp_ServerHandshakeParameters *msg, size_t len, upb_arena *arena) {
- return (grpc_gcp_Identity**)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_MESSAGE, arena);
+ return (grpc_gcp_Identity**)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_ServerHandshakeParameters_add_local_identities(grpc_gcp_ServerHandshakeParameters *msg, upb_arena *arena) {
struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)_upb_msg_new(&grpc_gcp_Identity_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(4, 8), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -330,43 +359,50 @@ UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_pa
grpc_gcp_StartServerHandshakeReq *ret = grpc_gcp_StartServerHandshakeReq_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_StartServerHandshakeReq *grpc_gcp_StartServerHandshakeReq_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_StartServerHandshakeReq *ret = grpc_gcp_StartServerHandshakeReq_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_StartServerHandshakeReq_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_StartServerHandshakeReq_serialize(const grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_StartServerHandshakeReq_msginit, arena, len);
}
-UPB_INLINE upb_strview const* grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 48), len); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_handshake_parameters(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE size_t grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq *msg) {return _upb_msg_map_size(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* *val) { return _upb_msg_map_get(msg, UPB_SIZE(28, 56), &key, sizeof(key), val, sizeof(*val)); }
-UPB_INLINE const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_next(const grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); }
-UPB_INLINE upb_strview grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const grpc_gcp_Endpoint*); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const grpc_gcp_Endpoint*); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40)); }
-UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct grpc_gcp_RpcProtocolVersions*); }
-UPB_INLINE uint32_t grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
+UPB_INLINE upb_strview const* grpc_gcp_StartServerHandshakeReq_application_protocols(const grpc_gcp_StartServerHandshakeReq *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_handshake_parameters(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE size_t grpc_gcp_StartServerHandshakeReq_handshake_parameters_size(const grpc_gcp_StartServerHandshakeReq *msg) {return _upb_msg_map_size(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_get(const grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* *val) { return _upb_msg_map_get(msg, UPB_SIZE(32, 56), &key, sizeof(key), val, sizeof(*val)); }
+UPB_INLINE const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_next(const grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (const grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 56), iter); }
+UPB_INLINE upb_strview grpc_gcp_StartServerHandshakeReq_in_bytes(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_local_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const grpc_gcp_Endpoint*); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_remote_endpoint(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_Endpoint*); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_has_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_rpc_versions(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct grpc_gcp_RpcProtocolVersions*); }
+UPB_INLINE uint32_t grpc_gcp_StartServerHandshakeReq_max_frame_size(const grpc_gcp_StartServerHandshakeReq *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_mutable_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
+ return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
}
UPB_INLINE upb_strview* grpc_gcp_StartServerHandshakeReq_resize_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 48), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_add_application_protocols(grpc_gcp_StartServerHandshakeReq *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 48), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 48), UPB_SIZE(3, 4), &val,
arena);
}
-UPB_INLINE void grpc_gcp_StartServerHandshakeReq_handshake_parameters_clear(grpc_gcp_StartServerHandshakeReq *msg) { _upb_msg_map_clear(msg, UPB_SIZE(28, 56)); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_set(grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(28, 56), &key, sizeof(key), &val, sizeof(val), a); }
-UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_delete(grpc_gcp_StartServerHandshakeReq *msg, int32_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(28, 56), &key, sizeof(key)); }
-UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_nextmutable(grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(28, 56), iter); }
+UPB_INLINE void grpc_gcp_StartServerHandshakeReq_handshake_parameters_clear(grpc_gcp_StartServerHandshakeReq *msg) { _upb_msg_map_clear(msg, UPB_SIZE(32, 56)); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_set(grpc_gcp_StartServerHandshakeReq *msg, int32_t key, grpc_gcp_ServerHandshakeParameters* val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(32, 56), &key, sizeof(key), &val, sizeof(val), a); }
+UPB_INLINE bool grpc_gcp_StartServerHandshakeReq_handshake_parameters_delete(grpc_gcp_StartServerHandshakeReq *msg, int32_t key) { return _upb_msg_map_delete(msg, UPB_SIZE(32, 56), &key, sizeof(key)); }
+UPB_INLINE grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry* grpc_gcp_StartServerHandshakeReq_handshake_parameters_nextmutable(grpc_gcp_StartServerHandshakeReq *msg, size_t* iter) { return (grpc_gcp_StartServerHandshakeReq_HandshakeParametersEntry*)_upb_msg_map_next(msg, UPB_SIZE(32, 56), iter); }
UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_in_bytes(grpc_gcp_StartServerHandshakeReq *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), grpc_gcp_Endpoint*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), grpc_gcp_Endpoint*) = value;
}
UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_local_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_local_endpoint(msg);
@@ -378,7 +414,8 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_lo
return sub;
}
UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, grpc_gcp_Endpoint* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), grpc_gcp_Endpoint*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_Endpoint*) = value;
}
UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_remote_endpoint(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
struct grpc_gcp_Endpoint* sub = (struct grpc_gcp_Endpoint*)grpc_gcp_StartServerHandshakeReq_remote_endpoint(msg);
@@ -390,7 +427,8 @@ UPB_INLINE struct grpc_gcp_Endpoint* grpc_gcp_StartServerHandshakeReq_mutable_re
return sub;
}
UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, struct grpc_gcp_RpcProtocolVersions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct grpc_gcp_RpcProtocolVersions*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct grpc_gcp_RpcProtocolVersions*) = value;
}
UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq_mutable_rpc_versions(grpc_gcp_StartServerHandshakeReq *msg, upb_arena *arena) {
struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_StartServerHandshakeReq_rpc_versions(msg);
@@ -402,7 +440,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_StartServerHandshakeReq
return sub;
}
UPB_INLINE void grpc_gcp_StartServerHandshakeReq_set_max_frame_size(grpc_gcp_StartServerHandshakeReq *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
/* grpc.gcp.StartServerHandshakeReq.HandshakeParametersEntry */
@@ -433,6 +471,12 @@ UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_pa
grpc_gcp_NextHandshakeMessageReq *ret = grpc_gcp_NextHandshakeMessageReq_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_NextHandshakeMessageReq_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_NextHandshakeMessageReq *grpc_gcp_NextHandshakeMessageReq_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_NextHandshakeMessageReq *ret = grpc_gcp_NextHandshakeMessageReq_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_NextHandshakeMessageReq_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_NextHandshakeMessageReq_serialize(const grpc_gcp_NextHandshakeMessageReq *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_NextHandshakeMessageReq_msginit, arena, len);
}
@@ -453,6 +497,12 @@ UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse(const char *buf,
grpc_gcp_HandshakerReq *ret = grpc_gcp_HandshakerReq_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerReq_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_HandshakerReq *grpc_gcp_HandshakerReq_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_HandshakerReq *ret = grpc_gcp_HandshakerReq_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerReq_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_HandshakerReq_serialize(const grpc_gcp_HandshakerReq *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_HandshakerReq_msginit, arena, len);
}
@@ -519,33 +569,40 @@ UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse(const char
grpc_gcp_HandshakerResult *ret = grpc_gcp_HandshakerResult_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerResult_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_HandshakerResult *grpc_gcp_HandshakerResult_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_HandshakerResult *ret = grpc_gcp_HandshakerResult_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerResult_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_HandshakerResult_serialize(const grpc_gcp_HandshakerResult *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_HandshakerResult_msginit, arena, len);
}
-UPB_INLINE upb_strview grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE upb_strview grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
-UPB_INLINE upb_strview grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview); }
-UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56)); }
-UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 56), const grpc_gcp_Identity*); }
-UPB_INLINE bool grpc_gcp_HandshakerResult_has_local_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 64)); }
-UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const grpc_gcp_Identity*); }
-UPB_INLINE bool grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
-UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(40, 72)); }
-UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct grpc_gcp_RpcProtocolVersions*); }
-UPB_INLINE uint32_t grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
+UPB_INLINE upb_strview grpc_gcp_HandshakerResult_application_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview); }
+UPB_INLINE upb_strview grpc_gcp_HandshakerResult_record_protocol(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview); }
+UPB_INLINE upb_strview grpc_gcp_HandshakerResult_key_data(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview); }
+UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_peer_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const grpc_gcp_Identity*); }
+UPB_INLINE bool grpc_gcp_HandshakerResult_has_local_identity(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const grpc_gcp_Identity* grpc_gcp_HandshakerResult_local_identity(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const grpc_gcp_Identity*); }
+UPB_INLINE bool grpc_gcp_HandshakerResult_keep_channel_open(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE bool grpc_gcp_HandshakerResult_has_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE const struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_peer_rpc_versions(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const struct grpc_gcp_RpcProtocolVersions*); }
+UPB_INLINE uint32_t grpc_gcp_HandshakerResult_max_frame_size(const grpc_gcp_HandshakerResult *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
UPB_INLINE void grpc_gcp_HandshakerResult_set_application_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 16), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_record_protocol(grpc_gcp_HandshakerResult *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_key_data(grpc_gcp_HandshakerResult *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 40), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 48), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 56), grpc_gcp_Identity*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(36, 64), grpc_gcp_Identity*) = value;
}
UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_peer_identity(msg);
@@ -557,7 +614,8 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_peer_iden
return sub;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_local_identity(grpc_gcp_HandshakerResult *msg, grpc_gcp_Identity* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(36, 64), grpc_gcp_Identity*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 72), grpc_gcp_Identity*) = value;
}
UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_identity(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
struct grpc_gcp_Identity* sub = (struct grpc_gcp_Identity*)grpc_gcp_HandshakerResult_local_identity(msg);
@@ -569,10 +627,11 @@ UPB_INLINE struct grpc_gcp_Identity* grpc_gcp_HandshakerResult_mutable_local_ide
return sub;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_keep_channel_open(grpc_gcp_HandshakerResult *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, struct grpc_gcp_RpcProtocolVersions* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct grpc_gcp_RpcProtocolVersions*) = value;
+ _upb_sethas(msg, 3);
+ *UPB_PTR_AT(msg, UPB_SIZE(44, 80), struct grpc_gcp_RpcProtocolVersions*) = value;
}
UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutable_peer_rpc_versions(grpc_gcp_HandshakerResult *msg, upb_arena *arena) {
struct grpc_gcp_RpcProtocolVersions* sub = (struct grpc_gcp_RpcProtocolVersions*)grpc_gcp_HandshakerResult_peer_rpc_versions(msg);
@@ -584,7 +643,7 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions* grpc_gcp_HandshakerResult_mutabl
return sub;
}
UPB_INLINE void grpc_gcp_HandshakerResult_set_max_frame_size(grpc_gcp_HandshakerResult *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
/* grpc.gcp.HandshakerStatus */
@@ -597,6 +656,12 @@ UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse(const char
grpc_gcp_HandshakerStatus *ret = grpc_gcp_HandshakerStatus_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerStatus_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_HandshakerStatus *grpc_gcp_HandshakerStatus_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_HandshakerStatus *ret = grpc_gcp_HandshakerStatus_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerStatus_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_HandshakerStatus_serialize(const grpc_gcp_HandshakerStatus *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_HandshakerStatus_msginit, arena, len);
}
@@ -621,25 +686,32 @@ UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse(const char *bu
grpc_gcp_HandshakerResp *ret = grpc_gcp_HandshakerResp_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_HandshakerResp_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_HandshakerResp *grpc_gcp_HandshakerResp_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_HandshakerResp *ret = grpc_gcp_HandshakerResp_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_HandshakerResp_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_HandshakerResp_serialize(const grpc_gcp_HandshakerResp *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_HandshakerResp_msginit, arena, len);
}
-UPB_INLINE upb_strview grpc_gcp_HandshakerResp_out_frames(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
-UPB_INLINE uint32_t grpc_gcp_HandshakerResp_bytes_consumed(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t); }
-UPB_INLINE bool grpc_gcp_HandshakerResp_has_result(const grpc_gcp_HandshakerResp *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const grpc_gcp_HandshakerResult*); }
-UPB_INLINE bool grpc_gcp_HandshakerResp_has_status(const grpc_gcp_HandshakerResp *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_status(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const grpc_gcp_HandshakerStatus*); }
+UPB_INLINE upb_strview grpc_gcp_HandshakerResp_out_frames(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
+UPB_INLINE uint32_t grpc_gcp_HandshakerResp_bytes_consumed(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t); }
+UPB_INLINE bool grpc_gcp_HandshakerResp_has_result(const grpc_gcp_HandshakerResp *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_result(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const grpc_gcp_HandshakerResult*); }
+UPB_INLINE bool grpc_gcp_HandshakerResp_has_status(const grpc_gcp_HandshakerResp *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_status(const grpc_gcp_HandshakerResp *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const grpc_gcp_HandshakerStatus*); }
UPB_INLINE void grpc_gcp_HandshakerResp_set_out_frames(grpc_gcp_HandshakerResp *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
}
UPB_INLINE void grpc_gcp_HandshakerResp_set_bytes_consumed(grpc_gcp_HandshakerResp *msg, uint32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), uint32_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), uint32_t) = value;
}
UPB_INLINE void grpc_gcp_HandshakerResp_set_result(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerResult* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), grpc_gcp_HandshakerResult*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 24), grpc_gcp_HandshakerResult*) = value;
}
UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_result(grpc_gcp_HandshakerResp *msg, upb_arena *arena) {
struct grpc_gcp_HandshakerResult* sub = (struct grpc_gcp_HandshakerResult*)grpc_gcp_HandshakerResp_result(msg);
@@ -651,7 +723,8 @@ UPB_INLINE struct grpc_gcp_HandshakerResult* grpc_gcp_HandshakerResp_mutable_res
return sub;
}
UPB_INLINE void grpc_gcp_HandshakerResp_set_status(grpc_gcp_HandshakerResp *msg, grpc_gcp_HandshakerStatus* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), grpc_gcp_HandshakerStatus*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 32), grpc_gcp_HandshakerStatus*) = value;
}
UPB_INLINE struct grpc_gcp_HandshakerStatus* grpc_gcp_HandshakerResp_mutable_status(grpc_gcp_HandshakerResp *msg, upb_arena *arena) {
struct grpc_gcp_HandshakerStatus* sub = (struct grpc_gcp_HandshakerStatus*)grpc_gcp_HandshakerResp_status(msg);
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c
index 9b6303458e2..136c30da0e0 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c
@@ -12,19 +12,19 @@
#include "upb/port_def.inc"
-static const upb_msglayout *const grpc_gcp_RpcProtocolVersions_submsgs[2] = {
+static const upb_msglayout *const grpc_gcp_RpcProtocolVersions_submsgs[1] = {
&grpc_gcp_RpcProtocolVersions_Version_msginit,
};
static const upb_msglayout_field grpc_gcp_RpcProtocolVersions__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, 1},
- {2, UPB_SIZE(4, 8), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 16), 2, 0, 11, 1},
};
const upb_msglayout grpc_gcp_RpcProtocolVersions_msginit = {
&grpc_gcp_RpcProtocolVersions_submsgs[0],
&grpc_gcp_RpcProtocolVersions__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(16, 24), 2, false, 255,
};
static const upb_msglayout_field grpc_gcp_RpcProtocolVersions_Version__fields[2] = {
@@ -35,7 +35,7 @@ static const upb_msglayout_field grpc_gcp_RpcProtocolVersions_Version__fields[2]
const upb_msglayout grpc_gcp_RpcProtocolVersions_Version_msginit = {
NULL,
&grpc_gcp_RpcProtocolVersions_Version__fields[0],
- UPB_SIZE(8, 8), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h
index 52963988131..9e02e0b57b4 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -43,17 +44,24 @@ UPB_INLINE grpc_gcp_RpcProtocolVersions *grpc_gcp_RpcProtocolVersions_parse(cons
grpc_gcp_RpcProtocolVersions *ret = grpc_gcp_RpcProtocolVersions_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_RpcProtocolVersions_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_RpcProtocolVersions *grpc_gcp_RpcProtocolVersions_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_RpcProtocolVersions *ret = grpc_gcp_RpcProtocolVersions_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_RpcProtocolVersions_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_RpcProtocolVersions_serialize(const grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_RpcProtocolVersions_msginit, arena, len);
}
-UPB_INLINE bool grpc_gcp_RpcProtocolVersions_has_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), const grpc_gcp_RpcProtocolVersions_Version*); }
-UPB_INLINE bool grpc_gcp_RpcProtocolVersions_has_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8)); }
-UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_gcp_RpcProtocolVersions_Version*); }
+UPB_INLINE bool grpc_gcp_RpcProtocolVersions_has_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_max_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const grpc_gcp_RpcProtocolVersions_Version*); }
+UPB_INLINE bool grpc_gcp_RpcProtocolVersions_has_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_min_rpc_version(const grpc_gcp_RpcProtocolVersions *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const grpc_gcp_RpcProtocolVersions_Version*); }
UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, grpc_gcp_RpcProtocolVersions_Version* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), grpc_gcp_RpcProtocolVersions_Version*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_gcp_RpcProtocolVersions_Version*) = value;
}
UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_max_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) {
struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_max_rpc_version(msg);
@@ -65,7 +73,8 @@ UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVers
return sub;
}
UPB_INLINE void grpc_gcp_RpcProtocolVersions_set_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, grpc_gcp_RpcProtocolVersions_Version* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(4, 8), grpc_gcp_RpcProtocolVersions_Version*) = value;
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 16), grpc_gcp_RpcProtocolVersions_Version*) = value;
}
UPB_INLINE struct grpc_gcp_RpcProtocolVersions_Version* grpc_gcp_RpcProtocolVersions_mutable_min_rpc_version(grpc_gcp_RpcProtocolVersions *msg, upb_arena *arena) {
struct grpc_gcp_RpcProtocolVersions_Version* sub = (struct grpc_gcp_RpcProtocolVersions_Version*)grpc_gcp_RpcProtocolVersions_min_rpc_version(msg);
@@ -87,6 +96,12 @@ UPB_INLINE grpc_gcp_RpcProtocolVersions_Version *grpc_gcp_RpcProtocolVersions_Ve
grpc_gcp_RpcProtocolVersions_Version *ret = grpc_gcp_RpcProtocolVersions_Version_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_gcp_RpcProtocolVersions_Version_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_gcp_RpcProtocolVersions_Version *grpc_gcp_RpcProtocolVersions_Version_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_gcp_RpcProtocolVersions_Version *ret = grpc_gcp_RpcProtocolVersions_Version_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_gcp_RpcProtocolVersions_Version_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_gcp_RpcProtocolVersions_Version_serialize(const grpc_gcp_RpcProtocolVersions_Version *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_gcp_RpcProtocolVersions_Version_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c
index 8a3359bb769..df8d846627e 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c
@@ -19,7 +19,7 @@ static const upb_msglayout_field grpc_health_v1_HealthCheckRequest__fields[1] =
const upb_msglayout grpc_health_v1_HealthCheckRequest_msginit = {
NULL,
&grpc_health_v1_HealthCheckRequest__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field grpc_health_v1_HealthCheckResponse__fields[1] = {
@@ -29,7 +29,7 @@ static const upb_msglayout_field grpc_health_v1_HealthCheckResponse__fields[1] =
const upb_msglayout grpc_health_v1_HealthCheckResponse_msginit = {
NULL,
&grpc_health_v1_HealthCheckResponse__fields[0],
- UPB_SIZE(8, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h
index d3f6471621f..361b221ffea 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -44,6 +45,12 @@ UPB_INLINE grpc_health_v1_HealthCheckRequest *grpc_health_v1_HealthCheckRequest_
grpc_health_v1_HealthCheckRequest *ret = grpc_health_v1_HealthCheckRequest_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckRequest_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_health_v1_HealthCheckRequest *grpc_health_v1_HealthCheckRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_health_v1_HealthCheckRequest *ret = grpc_health_v1_HealthCheckRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckRequest_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_health_v1_HealthCheckRequest_serialize(const grpc_health_v1_HealthCheckRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_health_v1_HealthCheckRequest_msginit, arena, len);
}
@@ -64,6 +71,12 @@ UPB_INLINE grpc_health_v1_HealthCheckResponse *grpc_health_v1_HealthCheckRespons
grpc_health_v1_HealthCheckResponse *ret = grpc_health_v1_HealthCheckResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_health_v1_HealthCheckResponse *grpc_health_v1_HealthCheckResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_health_v1_HealthCheckResponse *ret = grpc_health_v1_HealthCheckResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_health_v1_HealthCheckResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_health_v1_HealthCheckResponse_serialize(const grpc_health_v1_HealthCheckResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_health_v1_HealthCheckResponse_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c
index 90b7cb7f622..3ecf09f145d 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c
@@ -27,7 +27,7 @@ static const upb_msglayout_field grpc_lb_v1_LoadBalanceRequest__fields[2] = {
const upb_msglayout grpc_lb_v1_LoadBalanceRequest_msginit = {
&grpc_lb_v1_LoadBalanceRequest_submsgs[0],
&grpc_lb_v1_LoadBalanceRequest__fields[0],
- UPB_SIZE(8, 16), 2, false,
+ UPB_SIZE(8, 16), 2, false, 255,
};
static const upb_msglayout_field grpc_lb_v1_InitialLoadBalanceRequest__fields[1] = {
@@ -37,7 +37,7 @@ static const upb_msglayout_field grpc_lb_v1_InitialLoadBalanceRequest__fields[1]
const upb_msglayout grpc_lb_v1_InitialLoadBalanceRequest_msginit = {
NULL,
&grpc_lb_v1_InitialLoadBalanceRequest__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field grpc_lb_v1_ClientStatsPerToken__fields[2] = {
@@ -48,7 +48,7 @@ static const upb_msglayout_field grpc_lb_v1_ClientStatsPerToken__fields[2] = {
const upb_msglayout grpc_lb_v1_ClientStatsPerToken_msginit = {
NULL,
&grpc_lb_v1_ClientStatsPerToken__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const grpc_lb_v1_ClientStats_submsgs[2] = {
@@ -57,18 +57,18 @@ static const upb_msglayout *const grpc_lb_v1_ClientStats_submsgs[2] = {
};
static const upb_msglayout_field grpc_lb_v1_ClientStats__fields[6] = {
- {1, UPB_SIZE(32, 32), 0, 0, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 3, 1},
- {3, UPB_SIZE(8, 8), 0, 0, 3, 1},
- {6, UPB_SIZE(16, 16), 0, 0, 3, 1},
- {7, UPB_SIZE(24, 24), 0, 0, 3, 1},
- {8, UPB_SIZE(36, 40), 0, 1, 11, 3},
+ {1, UPB_SIZE(40, 40), 1, 0, 11, 1},
+ {2, UPB_SIZE(8, 8), 0, 0, 3, 1},
+ {3, UPB_SIZE(16, 16), 0, 0, 3, 1},
+ {6, UPB_SIZE(24, 24), 0, 0, 3, 1},
+ {7, UPB_SIZE(32, 32), 0, 0, 3, 1},
+ {8, UPB_SIZE(44, 48), 0, 1, 11, 3},
};
const upb_msglayout grpc_lb_v1_ClientStats_msginit = {
&grpc_lb_v1_ClientStats_submsgs[0],
&grpc_lb_v1_ClientStats__fields[0],
- UPB_SIZE(40, 48), 6, false,
+ UPB_SIZE(48, 56), 6, false, 255,
};
static const upb_msglayout *const grpc_lb_v1_LoadBalanceResponse_submsgs[3] = {
@@ -86,7 +86,7 @@ static const upb_msglayout_field grpc_lb_v1_LoadBalanceResponse__fields[3] = {
const upb_msglayout grpc_lb_v1_LoadBalanceResponse_msginit = {
&grpc_lb_v1_LoadBalanceResponse_submsgs[0],
&grpc_lb_v1_LoadBalanceResponse__fields[0],
- UPB_SIZE(8, 16), 3, false,
+ UPB_SIZE(8, 16), 3, false, 255,
};
static const upb_msglayout *const grpc_lb_v1_InitialLoadBalanceResponse_submsgs[1] = {
@@ -94,14 +94,14 @@ static const upb_msglayout *const grpc_lb_v1_InitialLoadBalanceResponse_submsgs[
};
static const upb_msglayout_field grpc_lb_v1_InitialLoadBalanceResponse__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 11, 1},
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
};
const upb_msglayout grpc_lb_v1_InitialLoadBalanceResponse_msginit = {
&grpc_lb_v1_InitialLoadBalanceResponse_submsgs[0],
&grpc_lb_v1_InitialLoadBalanceResponse__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout *const grpc_lb_v1_ServerList_submsgs[1] = {
@@ -115,7 +115,7 @@ static const upb_msglayout_field grpc_lb_v1_ServerList__fields[1] = {
const upb_msglayout grpc_lb_v1_ServerList_msginit = {
&grpc_lb_v1_ServerList_submsgs[0],
&grpc_lb_v1_ServerList__fields[0],
- UPB_SIZE(4, 8), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field grpc_lb_v1_Server__fields[4] = {
@@ -128,13 +128,13 @@ static const upb_msglayout_field grpc_lb_v1_Server__fields[4] = {
const upb_msglayout grpc_lb_v1_Server_msginit = {
NULL,
&grpc_lb_v1_Server__fields[0],
- UPB_SIZE(24, 48), 4, false,
+ UPB_SIZE(24, 48), 4, false, 255,
};
const upb_msglayout grpc_lb_v1_FallbackResponse_msginit = {
NULL,
NULL,
- UPB_SIZE(0, 0), 0, false,
+ UPB_SIZE(0, 0), 0, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h
index 2ce5afca1c4..c8c352ce989 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -62,6 +63,12 @@ UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse(co
grpc_lb_v1_LoadBalanceRequest *ret = grpc_lb_v1_LoadBalanceRequest_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_LoadBalanceRequest *grpc_lb_v1_LoadBalanceRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_LoadBalanceRequest *ret = grpc_lb_v1_LoadBalanceRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceRequest_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_LoadBalanceRequest_serialize(const grpc_lb_v1_LoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_LoadBalanceRequest_msginit, arena, len);
}
@@ -113,6 +120,12 @@ UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRe
grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_InitialLoadBalanceRequest *grpc_lb_v1_InitialLoadBalanceRequest_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_InitialLoadBalanceRequest *ret = grpc_lb_v1_InitialLoadBalanceRequest_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceRequest_serialize(const grpc_lb_v1_InitialLoadBalanceRequest *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceRequest_msginit, arena, len);
}
@@ -133,6 +146,12 @@ UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse(
grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_ClientStatsPerToken *grpc_lb_v1_ClientStatsPerToken_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_ClientStatsPerToken *ret = grpc_lb_v1_ClientStatsPerToken_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_ClientStatsPerToken_serialize(const grpc_lb_v1_ClientStatsPerToken *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_ClientStatsPerToken_msginit, arena, len);
}
@@ -157,21 +176,28 @@ UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse(const char *buf,
grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_ClientStats *grpc_lb_v1_ClientStats_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_ClientStats *ret = grpc_lb_v1_ClientStats_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_ClientStats_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_ClientStats_serialize(const grpc_lb_v1_ClientStats *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_ClientStats_msginit, arena, len);
}
-UPB_INLINE bool grpc_lb_v1_ClientStats_has_timestamp(const grpc_lb_v1_ClientStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 32)); }
-UPB_INLINE const struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), const struct google_protobuf_Timestamp*); }
-UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t); }
-UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
-UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); }
-UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); }
-UPB_INLINE bool grpc_lb_v1_ClientStats_has_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(36, 40)); }
-UPB_INLINE const grpc_lb_v1_ClientStatsPerToken* const* grpc_lb_v1_ClientStats_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg, size_t *len) { return (const grpc_lb_v1_ClientStatsPerToken* const*)_upb_array_accessor(msg, UPB_SIZE(36, 40), len); }
+UPB_INLINE bool grpc_lb_v1_ClientStats_has_timestamp(const grpc_lb_v1_ClientStats *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_timestamp(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), const struct google_protobuf_Timestamp*); }
+UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_started(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t); }
+UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t); }
+UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t); }
+UPB_INLINE int64_t grpc_lb_v1_ClientStats_num_calls_finished_known_received(const grpc_lb_v1_ClientStats *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t); }
+UPB_INLINE bool grpc_lb_v1_ClientStats_has_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(44, 48)); }
+UPB_INLINE const grpc_lb_v1_ClientStatsPerToken* const* grpc_lb_v1_ClientStats_calls_finished_with_drop(const grpc_lb_v1_ClientStats *msg, size_t *len) { return (const grpc_lb_v1_ClientStatsPerToken* const*)_upb_array_accessor(msg, UPB_SIZE(44, 48), len); }
UPB_INLINE void grpc_lb_v1_ClientStats_set_timestamp(grpc_lb_v1_ClientStats *msg, struct google_protobuf_Timestamp* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(32, 32), struct google_protobuf_Timestamp*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(40, 40), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_timestamp(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)grpc_lb_v1_ClientStats_timestamp(msg);
@@ -183,27 +209,27 @@ UPB_INLINE struct google_protobuf_Timestamp* grpc_lb_v1_ClientStats_mutable_time
return sub;
}
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_started(grpc_lb_v1_ClientStats *msg, int64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
}
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished(grpc_lb_v1_ClientStats *msg, int64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), int64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
}
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_with_client_failed_to_send(grpc_lb_v1_ClientStats *msg, int64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 16), int64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value;
}
UPB_INLINE void grpc_lb_v1_ClientStats_set_num_calls_finished_known_received(grpc_lb_v1_ClientStats *msg, int64_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(24, 24), int64_t) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(32, 32), int64_t) = value;
}
UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_mutable_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t *len) {
- return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(36, 40), len);
+ return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_mutable_accessor(msg, UPB_SIZE(44, 48), len);
}
UPB_INLINE grpc_lb_v1_ClientStatsPerToken** grpc_lb_v1_ClientStats_resize_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, size_t len, upb_arena *arena) {
- return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor(msg, UPB_SIZE(36, 40), len, UPB_TYPE_MESSAGE, arena);
+ return (grpc_lb_v1_ClientStatsPerToken**)_upb_array_resize_accessor2(msg, UPB_SIZE(44, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct grpc_lb_v1_ClientStatsPerToken* grpc_lb_v1_ClientStats_add_calls_finished_with_drop(grpc_lb_v1_ClientStats *msg, upb_arena *arena) {
struct grpc_lb_v1_ClientStatsPerToken* sub = (struct grpc_lb_v1_ClientStatsPerToken*)_upb_msg_new(&grpc_lb_v1_ClientStatsPerToken_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(36, 40), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(44, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -218,6 +244,12 @@ UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse(
grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_LoadBalanceResponse *grpc_lb_v1_LoadBalanceResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_LoadBalanceResponse *ret = grpc_lb_v1_LoadBalanceResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_LoadBalanceResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_LoadBalanceResponse_serialize(const grpc_lb_v1_LoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_LoadBalanceResponse_msginit, arena, len);
}
@@ -284,19 +316,26 @@ UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceR
grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_InitialLoadBalanceResponse *grpc_lb_v1_InitialLoadBalanceResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_InitialLoadBalanceResponse *ret = grpc_lb_v1_InitialLoadBalanceResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_InitialLoadBalanceResponse_serialize(const grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_InitialLoadBalanceResponse_msginit, arena, len);
}
-UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool grpc_lb_v1_InitialLoadBalanceResponse_has_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Duration*); }
+UPB_INLINE upb_strview grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool grpc_lb_v1_InitialLoadBalanceResponse_has_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(const grpc_lb_v1_InitialLoadBalanceResponse *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Duration*); }
UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_load_balancer_delegate(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
}
UPB_INLINE void grpc_lb_v1_InitialLoadBalanceResponse_set_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, struct google_protobuf_Duration* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Duration*) = value;
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Duration*) = value;
}
UPB_INLINE struct google_protobuf_Duration* grpc_lb_v1_InitialLoadBalanceResponse_mutable_client_stats_report_interval(grpc_lb_v1_InitialLoadBalanceResponse *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(msg);
@@ -318,6 +357,12 @@ UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse(const char *buf, s
grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_ServerList *grpc_lb_v1_ServerList_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_ServerList *ret = grpc_lb_v1_ServerList_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_ServerList_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_ServerList_serialize(const grpc_lb_v1_ServerList *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_ServerList_msginit, arena, len);
}
@@ -329,12 +374,12 @@ UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_mutable_servers(grpc_lb_v1_
return (grpc_lb_v1_Server**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE grpc_lb_v1_Server** grpc_lb_v1_ServerList_resize_servers(grpc_lb_v1_ServerList *msg, size_t len, upb_arena *arena) {
- return (grpc_lb_v1_Server**)_upb_array_resize_accessor(msg, UPB_SIZE(0, 0), len, UPB_TYPE_MESSAGE, arena);
+ return (grpc_lb_v1_Server**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct grpc_lb_v1_Server* grpc_lb_v1_ServerList_add_servers(grpc_lb_v1_ServerList *msg, upb_arena *arena) {
struct grpc_lb_v1_Server* sub = (struct grpc_lb_v1_Server*)_upb_msg_new(&grpc_lb_v1_Server_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(0, 0), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -349,6 +394,12 @@ UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse(const char *buf, size_t si
grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_Server *grpc_lb_v1_Server_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_Server *ret = grpc_lb_v1_Server_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_Server_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_Server_serialize(const grpc_lb_v1_Server *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_Server_msginit, arena, len);
}
@@ -381,6 +432,12 @@ UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse(const
grpc_lb_v1_FallbackResponse *ret = grpc_lb_v1_FallbackResponse_new(arena);
return (ret && upb_decode(buf, size, ret, &grpc_lb_v1_FallbackResponse_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE grpc_lb_v1_FallbackResponse *grpc_lb_v1_FallbackResponse_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ grpc_lb_v1_FallbackResponse *ret = grpc_lb_v1_FallbackResponse_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &grpc_lb_v1_FallbackResponse_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *grpc_lb_v1_FallbackResponse_serialize(const grpc_lb_v1_FallbackResponse *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &grpc_lb_v1_FallbackResponse_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c
index fcf32a608bb..5f5f1edd030 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c
@@ -20,7 +20,7 @@ static const upb_msglayout_field udpa_annotations_MigrateAnnotation__fields[1] =
const upb_msglayout udpa_annotations_MigrateAnnotation_msginit = {
NULL,
&udpa_annotations_MigrateAnnotation__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
static const upb_msglayout_field udpa_annotations_FieldMigrateAnnotation__fields[2] = {
@@ -31,7 +31,7 @@ static const upb_msglayout_field udpa_annotations_FieldMigrateAnnotation__fields
const upb_msglayout udpa_annotations_FieldMigrateAnnotation_msginit = {
NULL,
&udpa_annotations_FieldMigrateAnnotation__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field udpa_annotations_FileMigrateAnnotation__fields[1] = {
@@ -41,7 +41,7 @@ static const upb_msglayout_field udpa_annotations_FileMigrateAnnotation__fields[
const upb_msglayout udpa_annotations_FileMigrateAnnotation_msginit = {
NULL,
&udpa_annotations_FileMigrateAnnotation__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h
index d6a3d0cc5b1..8d55a775b8a 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -40,6 +41,12 @@ UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotatio
udpa_annotations_MigrateAnnotation *ret = udpa_annotations_MigrateAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_annotations_MigrateAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_annotations_MigrateAnnotation *udpa_annotations_MigrateAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_annotations_MigrateAnnotation *ret = udpa_annotations_MigrateAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_annotations_MigrateAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_annotations_MigrateAnnotation_serialize(const udpa_annotations_MigrateAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_annotations_MigrateAnnotation_msginit, arena, len);
}
@@ -60,6 +67,12 @@ UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrat
udpa_annotations_FieldMigrateAnnotation *ret = udpa_annotations_FieldMigrateAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_annotations_FieldMigrateAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_annotations_FieldMigrateAnnotation *udpa_annotations_FieldMigrateAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_annotations_FieldMigrateAnnotation *ret = udpa_annotations_FieldMigrateAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_annotations_FieldMigrateAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_annotations_FieldMigrateAnnotation_serialize(const udpa_annotations_FieldMigrateAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_annotations_FieldMigrateAnnotation_msginit, arena, len);
}
@@ -84,6 +97,12 @@ UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateA
udpa_annotations_FileMigrateAnnotation *ret = udpa_annotations_FileMigrateAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_annotations_FileMigrateAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_annotations_FileMigrateAnnotation *udpa_annotations_FileMigrateAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_annotations_FileMigrateAnnotation *ret = udpa_annotations_FileMigrateAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_annotations_FileMigrateAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_annotations_FileMigrateAnnotation_serialize(const udpa_annotations_FileMigrateAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_annotations_FileMigrateAnnotation_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.c
index ebba91cd7d4..d135d4f73be 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.c
@@ -24,7 +24,7 @@ static const upb_msglayout_field udpa_annotations_FieldSecurityAnnotation__field
const upb_msglayout udpa_annotations_FieldSecurityAnnotation_msginit = {
NULL,
&udpa_annotations_FieldSecurityAnnotation__fields[0],
- UPB_SIZE(2, 2), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.h
index 89115fa1f9b..415ba045bdf 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/security.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE udpa_annotations_FieldSecurityAnnotation *udpa_annotations_FieldSecur
udpa_annotations_FieldSecurityAnnotation *ret = udpa_annotations_FieldSecurityAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_annotations_FieldSecurityAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_annotations_FieldSecurityAnnotation *udpa_annotations_FieldSecurityAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_annotations_FieldSecurityAnnotation *ret = udpa_annotations_FieldSecurityAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_annotations_FieldSecurityAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_annotations_FieldSecurityAnnotation_serialize(const udpa_annotations_FieldSecurityAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_annotations_FieldSecurityAnnotation_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h
index e676115b85f..69f2a862967 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.c
index 05cb76c13a0..16b0181ab80 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.c
@@ -14,14 +14,14 @@
#include "upb/port_def.inc"
static const upb_msglayout_field udpa_annotations_StatusAnnotation__fields[2] = {
- {1, UPB_SIZE(8, 8), 0, 0, 8, 1},
+ {1, UPB_SIZE(4, 4), 0, 0, 8, 1},
{2, UPB_SIZE(0, 0), 0, 0, 14, 1},
};
const upb_msglayout udpa_annotations_StatusAnnotation_msginit = {
NULL,
&udpa_annotations_StatusAnnotation__fields[0],
- UPB_SIZE(16, 16), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.h
index b6599e9b245..a55570df678 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/status.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -41,15 +42,21 @@ UPB_INLINE udpa_annotations_StatusAnnotation *udpa_annotations_StatusAnnotation_
udpa_annotations_StatusAnnotation *ret = udpa_annotations_StatusAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_annotations_StatusAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_annotations_StatusAnnotation *udpa_annotations_StatusAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_annotations_StatusAnnotation *ret = udpa_annotations_StatusAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_annotations_StatusAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_annotations_StatusAnnotation_serialize(const udpa_annotations_StatusAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_annotations_StatusAnnotation_msginit, arena, len);
}
-UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool); }
+UPB_INLINE bool udpa_annotations_StatusAnnotation_work_in_progress(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE int32_t udpa_annotations_StatusAnnotation_package_version_status(const udpa_annotations_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
UPB_INLINE void udpa_annotations_StatusAnnotation_set_work_in_progress(udpa_annotations_StatusAnnotation *msg, bool value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
UPB_INLINE void udpa_annotations_StatusAnnotation_set_package_version_status(udpa_annotations_StatusAnnotation *msg, int32_t value) {
*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c
index 017d26e05a2..253afc858b6 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c
@@ -20,7 +20,7 @@ static const upb_msglayout_field udpa_annotations_VersioningAnnotation__fields[1
const upb_msglayout udpa_annotations_VersioningAnnotation_msginit = {
NULL,
&udpa_annotations_VersioningAnnotation__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h
index 5341663b1fb..e39f8c397c7 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -34,6 +35,12 @@ UPB_INLINE udpa_annotations_VersioningAnnotation *udpa_annotations_VersioningAnn
udpa_annotations_VersioningAnnotation *ret = udpa_annotations_VersioningAnnotation_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_annotations_VersioningAnnotation_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_annotations_VersioningAnnotation *udpa_annotations_VersioningAnnotation_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_annotations_VersioningAnnotation *ret = udpa_annotations_VersioningAnnotation_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_annotations_VersioningAnnotation_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_annotations_VersioningAnnotation_serialize(const udpa_annotations_VersioningAnnotation *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_annotations_VersioningAnnotation_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.h
deleted file mode 100644
index b464edd104f..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/authority.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#ifndef UDPA_CORE_V1_AUTHORITY_PROTO_UPB_H_
-#define UDPA_CORE_V1_AUTHORITY_PROTO_UPB_H_
-
-#include "upb/msg.h"
-#include "upb/decode.h"
-#include "upb/encode.h"
-
-#include "upb/port_def.inc"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct udpa_core_v1_Authority;
-typedef struct udpa_core_v1_Authority udpa_core_v1_Authority;
-extern const upb_msglayout udpa_core_v1_Authority_msginit;
-
-
-/* udpa.core.v1.Authority */
-
-UPB_INLINE udpa_core_v1_Authority *udpa_core_v1_Authority_new(upb_arena *arena) {
- return (udpa_core_v1_Authority *)_upb_msg_new(&udpa_core_v1_Authority_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_Authority *udpa_core_v1_Authority_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_Authority *ret = udpa_core_v1_Authority_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_Authority_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_Authority_serialize(const udpa_core_v1_Authority *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_Authority_msginit, arena, len);
-}
-
-UPB_INLINE upb_strview udpa_core_v1_Authority_name(const udpa_core_v1_Authority *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-
-UPB_INLINE void udpa_core_v1_Authority_set_name(udpa_core_v1_Authority *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#include "upb/port_undef.inc"
-
-#endif /* UDPA_CORE_V1_AUTHORITY_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c
deleted file mode 100644
index f0e763e5a3d..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/collection_entry.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#include <stddef.h>
-#include "upb/msg.h"
-#include "udpa/core/v1/collection_entry.upb.h"
-#include "google/protobuf/any.upb.h"
-#include "udpa/annotations/status.upb.h"
-#include "udpa/core/v1/resource_locator.upb.h"
-#include "validate/validate.upb.h"
-
-#include "upb/port_def.inc"
-
-static const upb_msglayout *const udpa_core_v1_CollectionEntry_submsgs[2] = {
- &udpa_core_v1_CollectionEntry_InlineEntry_msginit,
- &udpa_core_v1_ResourceLocator_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_CollectionEntry__fields[2] = {
- {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
- {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
-};
-
-const upb_msglayout udpa_core_v1_CollectionEntry_msginit = {
- &udpa_core_v1_CollectionEntry_submsgs[0],
- &udpa_core_v1_CollectionEntry__fields[0],
- UPB_SIZE(8, 16), 2, false,
-};
-
-static const upb_msglayout *const udpa_core_v1_CollectionEntry_InlineEntry_submsgs[1] = {
- &google_protobuf_Any_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_CollectionEntry_InlineEntry__fields[3] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {3, UPB_SIZE(16, 32), 0, 0, 11, 1},
-};
-
-const upb_msglayout udpa_core_v1_CollectionEntry_InlineEntry_msginit = {
- &udpa_core_v1_CollectionEntry_InlineEntry_submsgs[0],
- &udpa_core_v1_CollectionEntry_InlineEntry__fields[0],
- UPB_SIZE(24, 48), 3, false,
-};
-
-#include "upb/port_undef.inc"
-
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h
deleted file mode 100644
index c4d4cda46dc..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/collection_entry.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#ifndef UDPA_CORE_V1_COLLECTION_ENTRY_PROTO_UPB_H_
-#define UDPA_CORE_V1_COLLECTION_ENTRY_PROTO_UPB_H_
-
-#include "upb/msg.h"
-#include "upb/decode.h"
-#include "upb/encode.h"
-
-#include "upb/port_def.inc"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct udpa_core_v1_CollectionEntry;
-struct udpa_core_v1_CollectionEntry_InlineEntry;
-typedef struct udpa_core_v1_CollectionEntry udpa_core_v1_CollectionEntry;
-typedef struct udpa_core_v1_CollectionEntry_InlineEntry udpa_core_v1_CollectionEntry_InlineEntry;
-extern const upb_msglayout udpa_core_v1_CollectionEntry_msginit;
-extern const upb_msglayout udpa_core_v1_CollectionEntry_InlineEntry_msginit;
-struct google_protobuf_Any;
-struct udpa_core_v1_ResourceLocator;
-extern const upb_msglayout google_protobuf_Any_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
-
-
-/* udpa.core.v1.CollectionEntry */
-
-UPB_INLINE udpa_core_v1_CollectionEntry *udpa_core_v1_CollectionEntry_new(upb_arena *arena) {
- return (udpa_core_v1_CollectionEntry *)_upb_msg_new(&udpa_core_v1_CollectionEntry_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_CollectionEntry *udpa_core_v1_CollectionEntry_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_CollectionEntry *ret = udpa_core_v1_CollectionEntry_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_CollectionEntry_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_CollectionEntry_serialize(const udpa_core_v1_CollectionEntry *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_CollectionEntry_msginit, arena, len);
-}
-
-typedef enum {
- udpa_core_v1_CollectionEntry_resource_specifier_locator = 1,
- udpa_core_v1_CollectionEntry_resource_specifier_inline_entry = 2,
- udpa_core_v1_CollectionEntry_resource_specifier_NOT_SET = 0
-} udpa_core_v1_CollectionEntry_resource_specifier_oneofcases;
-UPB_INLINE udpa_core_v1_CollectionEntry_resource_specifier_oneofcases udpa_core_v1_CollectionEntry_resource_specifier_case(const udpa_core_v1_CollectionEntry* msg) { return (udpa_core_v1_CollectionEntry_resource_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
-
-UPB_INLINE bool udpa_core_v1_CollectionEntry_has_locator(const udpa_core_v1_CollectionEntry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
-UPB_INLINE const struct udpa_core_v1_ResourceLocator* udpa_core_v1_CollectionEntry_locator(const udpa_core_v1_CollectionEntry *msg) { return UPB_READ_ONEOF(msg, const struct udpa_core_v1_ResourceLocator*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
-UPB_INLINE bool udpa_core_v1_CollectionEntry_has_inline_entry(const udpa_core_v1_CollectionEntry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
-UPB_INLINE const udpa_core_v1_CollectionEntry_InlineEntry* udpa_core_v1_CollectionEntry_inline_entry(const udpa_core_v1_CollectionEntry *msg) { return UPB_READ_ONEOF(msg, const udpa_core_v1_CollectionEntry_InlineEntry*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
-
-UPB_INLINE void udpa_core_v1_CollectionEntry_set_locator(udpa_core_v1_CollectionEntry *msg, struct udpa_core_v1_ResourceLocator* value) {
- UPB_WRITE_ONEOF(msg, struct udpa_core_v1_ResourceLocator*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* udpa_core_v1_CollectionEntry_mutable_locator(udpa_core_v1_CollectionEntry *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)udpa_core_v1_CollectionEntry_locator(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_CollectionEntry_set_locator(msg, sub);
- }
- return sub;
-}
-UPB_INLINE void udpa_core_v1_CollectionEntry_set_inline_entry(udpa_core_v1_CollectionEntry *msg, udpa_core_v1_CollectionEntry_InlineEntry* value) {
- UPB_WRITE_ONEOF(msg, udpa_core_v1_CollectionEntry_InlineEntry*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
-}
-UPB_INLINE struct udpa_core_v1_CollectionEntry_InlineEntry* udpa_core_v1_CollectionEntry_mutable_inline_entry(udpa_core_v1_CollectionEntry *msg, upb_arena *arena) {
- struct udpa_core_v1_CollectionEntry_InlineEntry* sub = (struct udpa_core_v1_CollectionEntry_InlineEntry*)udpa_core_v1_CollectionEntry_inline_entry(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_CollectionEntry_InlineEntry*)_upb_msg_new(&udpa_core_v1_CollectionEntry_InlineEntry_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_CollectionEntry_set_inline_entry(msg, sub);
- }
- return sub;
-}
-
-/* udpa.core.v1.CollectionEntry.InlineEntry */
-
-UPB_INLINE udpa_core_v1_CollectionEntry_InlineEntry *udpa_core_v1_CollectionEntry_InlineEntry_new(upb_arena *arena) {
- return (udpa_core_v1_CollectionEntry_InlineEntry *)_upb_msg_new(&udpa_core_v1_CollectionEntry_InlineEntry_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_CollectionEntry_InlineEntry *udpa_core_v1_CollectionEntry_InlineEntry_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_CollectionEntry_InlineEntry *ret = udpa_core_v1_CollectionEntry_InlineEntry_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_CollectionEntry_InlineEntry_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_CollectionEntry_InlineEntry_serialize(const udpa_core_v1_CollectionEntry_InlineEntry *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_CollectionEntry_InlineEntry_msginit, arena, len);
-}
-
-UPB_INLINE upb_strview udpa_core_v1_CollectionEntry_InlineEntry_name(const udpa_core_v1_CollectionEntry_InlineEntry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE upb_strview udpa_core_v1_CollectionEntry_InlineEntry_version(const udpa_core_v1_CollectionEntry_InlineEntry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE bool udpa_core_v1_CollectionEntry_InlineEntry_has_resource(const udpa_core_v1_CollectionEntry_InlineEntry *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct google_protobuf_Any* udpa_core_v1_CollectionEntry_InlineEntry_resource(const udpa_core_v1_CollectionEntry_InlineEntry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Any*); }
-
-UPB_INLINE void udpa_core_v1_CollectionEntry_InlineEntry_set_name(udpa_core_v1_CollectionEntry_InlineEntry *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_CollectionEntry_InlineEntry_set_version(udpa_core_v1_CollectionEntry_InlineEntry *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_CollectionEntry_InlineEntry_set_resource(udpa_core_v1_CollectionEntry_InlineEntry *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Any*) = value;
-}
-UPB_INLINE struct google_protobuf_Any* udpa_core_v1_CollectionEntry_InlineEntry_mutable_resource(udpa_core_v1_CollectionEntry_InlineEntry *msg, upb_arena *arena) {
- struct google_protobuf_Any* sub = (struct google_protobuf_Any*)udpa_core_v1_CollectionEntry_InlineEntry_resource(msg);
- if (sub == NULL) {
- sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_CollectionEntry_InlineEntry_set_resource(msg, sub);
- }
- return sub;
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#include "upb/port_undef.inc"
-
-#endif /* UDPA_CORE_V1_COLLECTION_ENTRY_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c
deleted file mode 100644
index 8ec1e455f87..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/context_params.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#include <stddef.h>
-#include "upb/msg.h"
-#include "udpa/core/v1/context_params.upb.h"
-#include "udpa/annotations/status.upb.h"
-
-#include "upb/port_def.inc"
-
-static const upb_msglayout *const udpa_core_v1_ContextParams_submsgs[1] = {
- &udpa_core_v1_ContextParams_ParamsEntry_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_ContextParams__fields[1] = {
- {1, UPB_SIZE(0, 0), 0, 0, 11, _UPB_LABEL_MAP},
-};
-
-const upb_msglayout udpa_core_v1_ContextParams_msginit = {
- &udpa_core_v1_ContextParams_submsgs[0],
- &udpa_core_v1_ContextParams__fields[0],
- UPB_SIZE(4, 8), 1, false,
-};
-
-static const upb_msglayout_field udpa_core_v1_ContextParams_ParamsEntry__fields[2] = {
- {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
-};
-
-const upb_msglayout udpa_core_v1_ContextParams_ParamsEntry_msginit = {
- NULL,
- &udpa_core_v1_ContextParams_ParamsEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
-};
-
-#include "upb/port_undef.inc"
-
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h
deleted file mode 100644
index cc16b620d4f..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/context_params.upb.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/context_params.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#ifndef UDPA_CORE_V1_CONTEXT_PARAMS_PROTO_UPB_H_
-#define UDPA_CORE_V1_CONTEXT_PARAMS_PROTO_UPB_H_
-
-#include "upb/msg.h"
-#include "upb/decode.h"
-#include "upb/encode.h"
-
-#include "upb/port_def.inc"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct udpa_core_v1_ContextParams;
-struct udpa_core_v1_ContextParams_ParamsEntry;
-typedef struct udpa_core_v1_ContextParams udpa_core_v1_ContextParams;
-typedef struct udpa_core_v1_ContextParams_ParamsEntry udpa_core_v1_ContextParams_ParamsEntry;
-extern const upb_msglayout udpa_core_v1_ContextParams_msginit;
-extern const upb_msglayout udpa_core_v1_ContextParams_ParamsEntry_msginit;
-
-
-/* udpa.core.v1.ContextParams */
-
-UPB_INLINE udpa_core_v1_ContextParams *udpa_core_v1_ContextParams_new(upb_arena *arena) {
- return (udpa_core_v1_ContextParams *)_upb_msg_new(&udpa_core_v1_ContextParams_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_ContextParams *udpa_core_v1_ContextParams_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_ContextParams *ret = udpa_core_v1_ContextParams_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ContextParams_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_ContextParams_serialize(const udpa_core_v1_ContextParams *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_ContextParams_msginit, arena, len);
-}
-
-UPB_INLINE bool udpa_core_v1_ContextParams_has_params(const udpa_core_v1_ContextParams *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE size_t udpa_core_v1_ContextParams_params_size(const udpa_core_v1_ContextParams *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE bool udpa_core_v1_ContextParams_params_get(const udpa_core_v1_ContextParams *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, 0); }
-UPB_INLINE const udpa_core_v1_ContextParams_ParamsEntry* udpa_core_v1_ContextParams_params_next(const udpa_core_v1_ContextParams *msg, size_t* iter) { return (const udpa_core_v1_ContextParams_ParamsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
-
-UPB_INLINE void udpa_core_v1_ContextParams_params_clear(udpa_core_v1_ContextParams *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); }
-UPB_INLINE bool udpa_core_v1_ContextParams_params_set(udpa_core_v1_ContextParams *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, 0, a); }
-UPB_INLINE bool udpa_core_v1_ContextParams_params_delete(udpa_core_v1_ContextParams *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); }
-UPB_INLINE udpa_core_v1_ContextParams_ParamsEntry* udpa_core_v1_ContextParams_params_nextmutable(udpa_core_v1_ContextParams *msg, size_t* iter) { return (udpa_core_v1_ContextParams_ParamsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
-
-/* udpa.core.v1.ContextParams.ParamsEntry */
-
-UPB_INLINE upb_strview udpa_core_v1_ContextParams_ParamsEntry_key(const udpa_core_v1_ContextParams_ParamsEntry *msg) {
- upb_strview ret;
- _upb_msg_map_key(msg, &ret, 0);
- return ret;
-}
-UPB_INLINE upb_strview udpa_core_v1_ContextParams_ParamsEntry_value(const udpa_core_v1_ContextParams_ParamsEntry *msg) {
- upb_strview ret;
- _upb_msg_map_value(msg, &ret, 0);
- return ret;
-}
-
-UPB_INLINE void udpa_core_v1_ContextParams_ParamsEntry_set_value(udpa_core_v1_ContextParams_ParamsEntry *msg, upb_strview value) {
- _upb_msg_map_set_value(msg, &value, 0);
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#include "upb/port_undef.inc"
-
-#endif /* UDPA_CORE_V1_CONTEXT_PARAMS_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c
deleted file mode 100644
index f7d100e4d47..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/resource.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#include <stddef.h>
-#include "upb/msg.h"
-#include "udpa/core/v1/resource.upb.h"
-#include "google/protobuf/any.upb.h"
-#include "udpa/annotations/status.upb.h"
-#include "udpa/core/v1/resource_name.upb.h"
-
-#include "upb/port_def.inc"
-
-static const upb_msglayout *const udpa_core_v1_Resource_submsgs[2] = {
- &google_protobuf_Any_msginit,
- &udpa_core_v1_ResourceName_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_Resource__fields[3] = {
- {1, UPB_SIZE(8, 16), 0, 1, 11, 1},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(12, 24), 0, 0, 11, 1},
-};
-
-const upb_msglayout udpa_core_v1_Resource_msginit = {
- &udpa_core_v1_Resource_submsgs[0],
- &udpa_core_v1_Resource__fields[0],
- UPB_SIZE(16, 32), 3, false,
-};
-
-#include "upb/port_undef.inc"
-
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.h
deleted file mode 100644
index d7ff6fe7604..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource.upb.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/resource.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#ifndef UDPA_CORE_V1_RESOURCE_PROTO_UPB_H_
-#define UDPA_CORE_V1_RESOURCE_PROTO_UPB_H_
-
-#include "upb/msg.h"
-#include "upb/decode.h"
-#include "upb/encode.h"
-
-#include "upb/port_def.inc"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct udpa_core_v1_Resource;
-typedef struct udpa_core_v1_Resource udpa_core_v1_Resource;
-extern const upb_msglayout udpa_core_v1_Resource_msginit;
-struct google_protobuf_Any;
-struct udpa_core_v1_ResourceName;
-extern const upb_msglayout google_protobuf_Any_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceName_msginit;
-
-
-/* udpa.core.v1.Resource */
-
-UPB_INLINE udpa_core_v1_Resource *udpa_core_v1_Resource_new(upb_arena *arena) {
- return (udpa_core_v1_Resource *)_upb_msg_new(&udpa_core_v1_Resource_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_Resource *udpa_core_v1_Resource_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_Resource *ret = udpa_core_v1_Resource_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_Resource_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_Resource_serialize(const udpa_core_v1_Resource *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_Resource_msginit, arena, len);
-}
-
-UPB_INLINE bool udpa_core_v1_Resource_has_name(const udpa_core_v1_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(8, 16)); }
-UPB_INLINE const struct udpa_core_v1_ResourceName* udpa_core_v1_Resource_name(const udpa_core_v1_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct udpa_core_v1_ResourceName*); }
-UPB_INLINE upb_strview udpa_core_v1_Resource_version(const udpa_core_v1_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE bool udpa_core_v1_Resource_has_resource(const udpa_core_v1_Resource *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(12, 24)); }
-UPB_INLINE const struct google_protobuf_Any* udpa_core_v1_Resource_resource(const udpa_core_v1_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Any*); }
-
-UPB_INLINE void udpa_core_v1_Resource_set_name(udpa_core_v1_Resource *msg, struct udpa_core_v1_ResourceName* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct udpa_core_v1_ResourceName*) = value;
-}
-UPB_INLINE struct udpa_core_v1_ResourceName* udpa_core_v1_Resource_mutable_name(udpa_core_v1_Resource *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceName* sub = (struct udpa_core_v1_ResourceName*)udpa_core_v1_Resource_name(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceName*)_upb_msg_new(&udpa_core_v1_ResourceName_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_Resource_set_name(msg, sub);
- }
- return sub;
-}
-UPB_INLINE void udpa_core_v1_Resource_set_version(udpa_core_v1_Resource *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_Resource_set_resource(udpa_core_v1_Resource *msg, struct google_protobuf_Any* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Any*) = value;
-}
-UPB_INLINE struct google_protobuf_Any* udpa_core_v1_Resource_mutable_resource(udpa_core_v1_Resource *msg, upb_arena *arena) {
- struct google_protobuf_Any* sub = (struct google_protobuf_Any*)udpa_core_v1_Resource_resource(msg);
- if (sub == NULL) {
- sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_Resource_set_resource(msg, sub);
- }
- return sub;
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#include "upb/port_undef.inc"
-
-#endif /* UDPA_CORE_V1_RESOURCE_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c
deleted file mode 100644
index e9532250894..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c
+++ /dev/null
@@ -1,54 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/resource_locator.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#include <stddef.h>
-#include "upb/msg.h"
-#include "udpa/core/v1/resource_locator.upb.h"
-#include "udpa/annotations/status.upb.h"
-#include "udpa/core/v1/context_params.upb.h"
-#include "validate/validate.upb.h"
-
-#include "upb/port_def.inc"
-
-static const upb_msglayout *const udpa_core_v1_ResourceLocator_submsgs[2] = {
- &udpa_core_v1_ContextParams_msginit,
- &udpa_core_v1_ResourceLocator_Directive_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_ResourceLocator__fields[6] = {
- {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
- {2, UPB_SIZE(24, 40), 0, 0, 9, 3},
- {3, UPB_SIZE(8, 8), 0, 0, 9, 1},
- {4, UPB_SIZE(16, 24), 0, 0, 9, 1},
- {5, UPB_SIZE(32, 56), UPB_SIZE(-37, -65), 0, 11, 1},
- {6, UPB_SIZE(28, 48), 0, 1, 11, 3},
-};
-
-const upb_msglayout udpa_core_v1_ResourceLocator_msginit = {
- &udpa_core_v1_ResourceLocator_submsgs[0],
- &udpa_core_v1_ResourceLocator__fields[0],
- UPB_SIZE(40, 80), 6, false,
-};
-
-static const upb_msglayout *const udpa_core_v1_ResourceLocator_Directive_submsgs[1] = {
- &udpa_core_v1_ResourceLocator_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_ResourceLocator_Directive__fields[2] = {
- {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1},
- {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
-};
-
-const upb_msglayout udpa_core_v1_ResourceLocator_Directive_msginit = {
- &udpa_core_v1_ResourceLocator_Directive_submsgs[0],
- &udpa_core_v1_ResourceLocator_Directive__fields[0],
- UPB_SIZE(16, 32), 2, false,
-};
-
-#include "upb/port_undef.inc"
-
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h
deleted file mode 100644
index f485f704089..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/resource_locator.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#ifndef UDPA_CORE_V1_RESOURCE_LOCATOR_PROTO_UPB_H_
-#define UDPA_CORE_V1_RESOURCE_LOCATOR_PROTO_UPB_H_
-
-#include "upb/msg.h"
-#include "upb/decode.h"
-#include "upb/encode.h"
-
-#include "upb/port_def.inc"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct udpa_core_v1_ResourceLocator;
-struct udpa_core_v1_ResourceLocator_Directive;
-typedef struct udpa_core_v1_ResourceLocator udpa_core_v1_ResourceLocator;
-typedef struct udpa_core_v1_ResourceLocator_Directive udpa_core_v1_ResourceLocator_Directive;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_msginit;
-extern const upb_msglayout udpa_core_v1_ResourceLocator_Directive_msginit;
-struct udpa_core_v1_ContextParams;
-extern const upb_msglayout udpa_core_v1_ContextParams_msginit;
-
-typedef enum {
- udpa_core_v1_ResourceLocator_UDPA = 0,
- udpa_core_v1_ResourceLocator_HTTP = 1,
- udpa_core_v1_ResourceLocator_FILE = 2
-} udpa_core_v1_ResourceLocator_Scheme;
-
-
-/* udpa.core.v1.ResourceLocator */
-
-UPB_INLINE udpa_core_v1_ResourceLocator *udpa_core_v1_ResourceLocator_new(upb_arena *arena) {
- return (udpa_core_v1_ResourceLocator *)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_ResourceLocator *udpa_core_v1_ResourceLocator_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_ResourceLocator *ret = udpa_core_v1_ResourceLocator_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ResourceLocator_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_ResourceLocator_serialize(const udpa_core_v1_ResourceLocator *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_ResourceLocator_msginit, arena, len);
-}
-
-typedef enum {
- udpa_core_v1_ResourceLocator_context_param_specifier_exact_context = 5,
- udpa_core_v1_ResourceLocator_context_param_specifier_NOT_SET = 0
-} udpa_core_v1_ResourceLocator_context_param_specifier_oneofcases;
-UPB_INLINE udpa_core_v1_ResourceLocator_context_param_specifier_oneofcases udpa_core_v1_ResourceLocator_context_param_specifier_case(const udpa_core_v1_ResourceLocator* msg) { return (udpa_core_v1_ResourceLocator_context_param_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 64), int32_t); }
-
-UPB_INLINE int32_t udpa_core_v1_ResourceLocator_scheme(const udpa_core_v1_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
-UPB_INLINE upb_strview const* udpa_core_v1_ResourceLocator_id(const udpa_core_v1_ResourceLocator *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(24, 40), len); }
-UPB_INLINE upb_strview udpa_core_v1_ResourceLocator_authority(const udpa_core_v1_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview); }
-UPB_INLINE upb_strview udpa_core_v1_ResourceLocator_resource_type(const udpa_core_v1_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview); }
-UPB_INLINE bool udpa_core_v1_ResourceLocator_has_exact_context(const udpa_core_v1_ResourceLocator *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 64)) == 5; }
-UPB_INLINE const struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceLocator_exact_context(const udpa_core_v1_ResourceLocator *msg) { return UPB_READ_ONEOF(msg, const struct udpa_core_v1_ContextParams*, UPB_SIZE(32, 56), UPB_SIZE(36, 64), 5, NULL); }
-UPB_INLINE bool udpa_core_v1_ResourceLocator_has_directives(const udpa_core_v1_ResourceLocator *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 48)); }
-UPB_INLINE const udpa_core_v1_ResourceLocator_Directive* const* udpa_core_v1_ResourceLocator_directives(const udpa_core_v1_ResourceLocator *msg, size_t *len) { return (const udpa_core_v1_ResourceLocator_Directive* const*)_upb_array_accessor(msg, UPB_SIZE(28, 48), len); }
-
-UPB_INLINE void udpa_core_v1_ResourceLocator_set_scheme(udpa_core_v1_ResourceLocator *msg, int32_t value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
-}
-UPB_INLINE upb_strview* udpa_core_v1_ResourceLocator_mutable_id(udpa_core_v1_ResourceLocator *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 40), len);
-}
-UPB_INLINE upb_strview* udpa_core_v1_ResourceLocator_resize_id(udpa_core_v1_ResourceLocator *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 40), len, UPB_TYPE_STRING, arena);
-}
-UPB_INLINE bool udpa_core_v1_ResourceLocator_add_id(udpa_core_v1_ResourceLocator *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
- arena);
-}
-UPB_INLINE void udpa_core_v1_ResourceLocator_set_authority(udpa_core_v1_ResourceLocator *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 8), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_ResourceLocator_set_resource_type(udpa_core_v1_ResourceLocator *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 24), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_ResourceLocator_set_exact_context(udpa_core_v1_ResourceLocator *msg, struct udpa_core_v1_ContextParams* value) {
- UPB_WRITE_ONEOF(msg, struct udpa_core_v1_ContextParams*, UPB_SIZE(32, 56), value, UPB_SIZE(36, 64), 5);
-}
-UPB_INLINE struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceLocator_mutable_exact_context(udpa_core_v1_ResourceLocator *msg, upb_arena *arena) {
- struct udpa_core_v1_ContextParams* sub = (struct udpa_core_v1_ContextParams*)udpa_core_v1_ResourceLocator_exact_context(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ContextParams*)_upb_msg_new(&udpa_core_v1_ContextParams_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_ResourceLocator_set_exact_context(msg, sub);
- }
- return sub;
-}
-UPB_INLINE udpa_core_v1_ResourceLocator_Directive** udpa_core_v1_ResourceLocator_mutable_directives(udpa_core_v1_ResourceLocator *msg, size_t *len) {
- return (udpa_core_v1_ResourceLocator_Directive**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 48), len);
-}
-UPB_INLINE udpa_core_v1_ResourceLocator_Directive** udpa_core_v1_ResourceLocator_resize_directives(udpa_core_v1_ResourceLocator *msg, size_t len, upb_arena *arena) {
- return (udpa_core_v1_ResourceLocator_Directive**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 48), len, UPB_TYPE_MESSAGE, arena);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator_Directive* udpa_core_v1_ResourceLocator_add_directives(udpa_core_v1_ResourceLocator *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator_Directive* sub = (struct udpa_core_v1_ResourceLocator_Directive*)_upb_msg_new(&udpa_core_v1_ResourceLocator_Directive_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
- if (!ok) return NULL;
- return sub;
-}
-
-/* udpa.core.v1.ResourceLocator.Directive */
-
-UPB_INLINE udpa_core_v1_ResourceLocator_Directive *udpa_core_v1_ResourceLocator_Directive_new(upb_arena *arena) {
- return (udpa_core_v1_ResourceLocator_Directive *)_upb_msg_new(&udpa_core_v1_ResourceLocator_Directive_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_ResourceLocator_Directive *udpa_core_v1_ResourceLocator_Directive_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_ResourceLocator_Directive *ret = udpa_core_v1_ResourceLocator_Directive_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ResourceLocator_Directive_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_ResourceLocator_Directive_serialize(const udpa_core_v1_ResourceLocator_Directive *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_ResourceLocator_Directive_msginit, arena, len);
-}
-
-typedef enum {
- udpa_core_v1_ResourceLocator_Directive_directive_alt = 1,
- udpa_core_v1_ResourceLocator_Directive_directive_entry = 2,
- udpa_core_v1_ResourceLocator_Directive_directive_NOT_SET = 0
-} udpa_core_v1_ResourceLocator_Directive_directive_oneofcases;
-UPB_INLINE udpa_core_v1_ResourceLocator_Directive_directive_oneofcases udpa_core_v1_ResourceLocator_Directive_directive_case(const udpa_core_v1_ResourceLocator_Directive* msg) { return (udpa_core_v1_ResourceLocator_Directive_directive_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
-
-UPB_INLINE bool udpa_core_v1_ResourceLocator_Directive_has_alt(const udpa_core_v1_ResourceLocator_Directive *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; }
-UPB_INLINE const udpa_core_v1_ResourceLocator* udpa_core_v1_ResourceLocator_Directive_alt(const udpa_core_v1_ResourceLocator_Directive *msg) { return UPB_READ_ONEOF(msg, const udpa_core_v1_ResourceLocator*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, NULL); }
-UPB_INLINE bool udpa_core_v1_ResourceLocator_Directive_has_entry(const udpa_core_v1_ResourceLocator_Directive *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; }
-UPB_INLINE upb_strview udpa_core_v1_ResourceLocator_Directive_entry(const udpa_core_v1_ResourceLocator_Directive *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); }
-
-UPB_INLINE void udpa_core_v1_ResourceLocator_Directive_set_alt(udpa_core_v1_ResourceLocator_Directive *msg, udpa_core_v1_ResourceLocator* value) {
- UPB_WRITE_ONEOF(msg, udpa_core_v1_ResourceLocator*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
-}
-UPB_INLINE struct udpa_core_v1_ResourceLocator* udpa_core_v1_ResourceLocator_Directive_mutable_alt(udpa_core_v1_ResourceLocator_Directive *msg, upb_arena *arena) {
- struct udpa_core_v1_ResourceLocator* sub = (struct udpa_core_v1_ResourceLocator*)udpa_core_v1_ResourceLocator_Directive_alt(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ResourceLocator*)_upb_msg_new(&udpa_core_v1_ResourceLocator_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_ResourceLocator_Directive_set_alt(msg, sub);
- }
- return sub;
-}
-UPB_INLINE void udpa_core_v1_ResourceLocator_Directive_set_entry(udpa_core_v1_ResourceLocator_Directive *msg, upb_strview value) {
- UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#include "upb/port_undef.inc"
-
-#endif /* UDPA_CORE_V1_RESOURCE_LOCATOR_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c
deleted file mode 100644
index 095399de4da..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/resource_name.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#include <stddef.h>
-#include "upb/msg.h"
-#include "udpa/core/v1/resource_name.upb.h"
-#include "udpa/annotations/status.upb.h"
-#include "udpa/core/v1/context_params.upb.h"
-#include "validate/validate.upb.h"
-
-#include "upb/port_def.inc"
-
-static const upb_msglayout *const udpa_core_v1_ResourceName_submsgs[1] = {
- &udpa_core_v1_ContextParams_msginit,
-};
-
-static const upb_msglayout_field udpa_core_v1_ResourceName__fields[4] = {
- {1, UPB_SIZE(20, 40), 0, 0, 9, 3},
- {2, UPB_SIZE(0, 0), 0, 0, 9, 1},
- {3, UPB_SIZE(8, 16), 0, 0, 9, 1},
- {4, UPB_SIZE(16, 32), 0, 0, 11, 1},
-};
-
-const upb_msglayout udpa_core_v1_ResourceName_msginit = {
- &udpa_core_v1_ResourceName_submsgs[0],
- &udpa_core_v1_ResourceName__fields[0],
- UPB_SIZE(24, 48), 4, false,
-};
-
-#include "upb/port_undef.inc"
-
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h
deleted file mode 100644
index 40d807393c9..00000000000
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* This file was generated by upbc (the upb compiler) from the input
- * file:
- *
- * udpa/core/v1/resource_name.proto
- *
- * Do not edit -- your changes will be discarded when the file is
- * regenerated. */
-
-#ifndef UDPA_CORE_V1_RESOURCE_NAME_PROTO_UPB_H_
-#define UDPA_CORE_V1_RESOURCE_NAME_PROTO_UPB_H_
-
-#include "upb/msg.h"
-#include "upb/decode.h"
-#include "upb/encode.h"
-
-#include "upb/port_def.inc"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-struct udpa_core_v1_ResourceName;
-typedef struct udpa_core_v1_ResourceName udpa_core_v1_ResourceName;
-extern const upb_msglayout udpa_core_v1_ResourceName_msginit;
-struct udpa_core_v1_ContextParams;
-extern const upb_msglayout udpa_core_v1_ContextParams_msginit;
-
-
-/* udpa.core.v1.ResourceName */
-
-UPB_INLINE udpa_core_v1_ResourceName *udpa_core_v1_ResourceName_new(upb_arena *arena) {
- return (udpa_core_v1_ResourceName *)_upb_msg_new(&udpa_core_v1_ResourceName_msginit, arena);
-}
-UPB_INLINE udpa_core_v1_ResourceName *udpa_core_v1_ResourceName_parse(const char *buf, size_t size,
- upb_arena *arena) {
- udpa_core_v1_ResourceName *ret = udpa_core_v1_ResourceName_new(arena);
- return (ret && upb_decode(buf, size, ret, &udpa_core_v1_ResourceName_msginit, arena)) ? ret : NULL;
-}
-UPB_INLINE char *udpa_core_v1_ResourceName_serialize(const udpa_core_v1_ResourceName *msg, upb_arena *arena, size_t *len) {
- return upb_encode(msg, &udpa_core_v1_ResourceName_msginit, arena, len);
-}
-
-UPB_INLINE upb_strview const* udpa_core_v1_ResourceName_id(const udpa_core_v1_ResourceName *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len); }
-UPB_INLINE upb_strview udpa_core_v1_ResourceName_authority(const udpa_core_v1_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
-UPB_INLINE upb_strview udpa_core_v1_ResourceName_resource_type(const udpa_core_v1_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview); }
-UPB_INLINE bool udpa_core_v1_ResourceName_has_context(const udpa_core_v1_ResourceName *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(16, 32)); }
-UPB_INLINE const struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceName_context(const udpa_core_v1_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct udpa_core_v1_ContextParams*); }
-
-UPB_INLINE upb_strview* udpa_core_v1_ResourceName_mutable_id(udpa_core_v1_ResourceName *msg, size_t *len) {
- return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
-}
-UPB_INLINE upb_strview* udpa_core_v1_ResourceName_resize_id(udpa_core_v1_ResourceName *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(20, 40), len, UPB_TYPE_STRING, arena);
-}
-UPB_INLINE bool udpa_core_v1_ResourceName_add_id(udpa_core_v1_ResourceName *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(20, 40), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
- arena);
-}
-UPB_INLINE void udpa_core_v1_ResourceName_set_authority(udpa_core_v1_ResourceName *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_ResourceName_set_resource_type(udpa_core_v1_ResourceName *msg, upb_strview value) {
- *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_strview) = value;
-}
-UPB_INLINE void udpa_core_v1_ResourceName_set_context(udpa_core_v1_ResourceName *msg, struct udpa_core_v1_ContextParams* value) {
- *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct udpa_core_v1_ContextParams*) = value;
-}
-UPB_INLINE struct udpa_core_v1_ContextParams* udpa_core_v1_ResourceName_mutable_context(udpa_core_v1_ResourceName *msg, upb_arena *arena) {
- struct udpa_core_v1_ContextParams* sub = (struct udpa_core_v1_ContextParams*)udpa_core_v1_ResourceName_context(msg);
- if (sub == NULL) {
- sub = (struct udpa_core_v1_ContextParams*)_upb_msg_new(&udpa_core_v1_ContextParams_msginit, arena);
- if (!sub) return NULL;
- udpa_core_v1_ResourceName_set_context(msg, sub);
- }
- return sub;
-}
-
-#ifdef __cplusplus
-} /* extern "C" */
-#endif
-
-#include "upb/port_undef.inc"
-
-#endif /* UDPA_CORE_V1_RESOURCE_NAME_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
index aa9918f024a..e5069b7f13b 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c
@@ -29,7 +29,7 @@ static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport__fields[5] = {
const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_msginit = {
&udpa_data_orca_v1_OrcaLoadReport_submsgs[0],
&udpa_data_orca_v1_OrcaLoadReport__fields[0],
- UPB_SIZE(32, 40), 5, false,
+ UPB_SIZE(32, 40), 5, false, 255,
};
static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[2] = {
@@ -40,7 +40,7 @@ static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_RequestCostEnt
const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry_msginit = {
NULL,
&udpa_data_orca_v1_OrcaLoadReport_RequestCostEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[2] = {
@@ -51,7 +51,7 @@ static const upb_msglayout_field udpa_data_orca_v1_OrcaLoadReport_UtilizationEnt
const upb_msglayout udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry_msginit = {
NULL,
&udpa_data_orca_v1_OrcaLoadReport_UtilizationEntry__fields[0],
- UPB_SIZE(16, 32), 2, false,
+ UPB_SIZE(16, 32), 2, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h
index 5c63aef12ed..e5923cc5e12 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -40,6 +41,12 @@ UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_pa
udpa_data_orca_v1_OrcaLoadReport *ret = udpa_data_orca_v1_OrcaLoadReport_new(arena);
return (ret && upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE udpa_data_orca_v1_OrcaLoadReport *udpa_data_orca_v1_OrcaLoadReport_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_data_orca_v1_OrcaLoadReport *ret = udpa_data_orca_v1_OrcaLoadReport_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *udpa_data_orca_v1_OrcaLoadReport_serialize(const udpa_data_orca_v1_OrcaLoadReport *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &udpa_data_orca_v1_OrcaLoadReport_msginit, arena, len);
}
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c
new file mode 100644
index 00000000000..24407fa6eac
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c
@@ -0,0 +1,33 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/type/v1/typed_struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "udpa/type/v1/typed_struct.upb.h"
+#include "validate/validate.upb.h"
+#include "google/protobuf/struct.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const udpa_type_v1_TypedStruct_submsgs[1] = {
+ &google_protobuf_Struct_msginit,
+};
+
+static const upb_msglayout_field udpa_type_v1_TypedStruct__fields[2] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 1, 0, 11, 1},
+};
+
+const upb_msglayout udpa_type_v1_TypedStruct_msginit = {
+ &udpa_type_v1_TypedStruct_submsgs[0],
+ &udpa_type_v1_TypedStruct__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h
new file mode 100644
index 00000000000..2dd03ff12d7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h
@@ -0,0 +1,77 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/type/v1/typed_struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_TYPE_V1_TYPED_STRUCT_PROTO_UPB_H_
+#define UDPA_TYPE_V1_TYPED_STRUCT_PROTO_UPB_H_
+
+#include "upb/msg.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 udpa_type_v1_TypedStruct;
+typedef struct udpa_type_v1_TypedStruct udpa_type_v1_TypedStruct;
+extern const upb_msglayout udpa_type_v1_TypedStruct_msginit;
+struct google_protobuf_Struct;
+extern const upb_msglayout google_protobuf_Struct_msginit;
+
+
+/* udpa.type.v1.TypedStruct */
+
+UPB_INLINE udpa_type_v1_TypedStruct *udpa_type_v1_TypedStruct_new(upb_arena *arena) {
+ return (udpa_type_v1_TypedStruct *)_upb_msg_new(&udpa_type_v1_TypedStruct_msginit, arena);
+}
+UPB_INLINE udpa_type_v1_TypedStruct *udpa_type_v1_TypedStruct_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ udpa_type_v1_TypedStruct *ret = udpa_type_v1_TypedStruct_new(arena);
+ return (ret && upb_decode(buf, size, ret, &udpa_type_v1_TypedStruct_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE udpa_type_v1_TypedStruct *udpa_type_v1_TypedStruct_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ udpa_type_v1_TypedStruct *ret = udpa_type_v1_TypedStruct_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &udpa_type_v1_TypedStruct_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *udpa_type_v1_TypedStruct_serialize(const udpa_type_v1_TypedStruct *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &udpa_type_v1_TypedStruct_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview udpa_type_v1_TypedStruct_type_url(const udpa_type_v1_TypedStruct *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool udpa_type_v1_TypedStruct_has_value(const udpa_type_v1_TypedStruct *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Struct* udpa_type_v1_TypedStruct_value(const udpa_type_v1_TypedStruct *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct google_protobuf_Struct*); }
+
+UPB_INLINE void udpa_type_v1_TypedStruct_set_type_url(udpa_type_v1_TypedStruct *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void udpa_type_v1_TypedStruct_set_value(udpa_type_v1_TypedStruct *msg, struct google_protobuf_Struct* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct google_protobuf_Struct*) = value;
+}
+UPB_INLINE struct google_protobuf_Struct* udpa_type_v1_TypedStruct_mutable_value(udpa_type_v1_TypedStruct *msg, upb_arena *arena) {
+ struct google_protobuf_Struct* sub = (struct google_protobuf_Struct*)udpa_type_v1_TypedStruct_value(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Struct*)_upb_msg_new(&google_protobuf_Struct_msginit, arena);
+ if (!sub) return NULL;
+ udpa_type_v1_TypedStruct_set_value(msg, sub);
+ }
+ return sub;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_TYPE_V1_TYPED_STRUCT_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.c
index 63c324368d7..ec2888eeac1 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.c
@@ -68,7 +68,7 @@ static const upb_msglayout_field validate_FieldRules__fields[22] = {
const upb_msglayout validate_FieldRules_msginit = {
&validate_FieldRules_submsgs[0],
&validate_FieldRules__fields[0],
- UPB_SIZE(16, 32), 22, false,
+ UPB_SIZE(16, 32), 22, false, 255,
};
static const upb_msglayout_field validate_FloatRules__fields[7] = {
@@ -84,7 +84,7 @@ static const upb_msglayout_field validate_FloatRules__fields[7] = {
const upb_msglayout validate_FloatRules_msginit = {
NULL,
&validate_FloatRules__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(32, 40), 7, false, 255,
};
static const upb_msglayout_field validate_DoubleRules__fields[7] = {
@@ -100,7 +100,7 @@ static const upb_msglayout_field validate_DoubleRules__fields[7] = {
const upb_msglayout validate_DoubleRules_msginit = {
NULL,
&validate_DoubleRules__fields[0],
- UPB_SIZE(56, 64), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field validate_Int32Rules__fields[7] = {
@@ -116,7 +116,7 @@ static const upb_msglayout_field validate_Int32Rules__fields[7] = {
const upb_msglayout validate_Int32Rules_msginit = {
NULL,
&validate_Int32Rules__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(32, 40), 7, false, 255,
};
static const upb_msglayout_field validate_Int64Rules__fields[7] = {
@@ -132,7 +132,7 @@ static const upb_msglayout_field validate_Int64Rules__fields[7] = {
const upb_msglayout validate_Int64Rules_msginit = {
NULL,
&validate_Int64Rules__fields[0],
- UPB_SIZE(56, 64), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field validate_UInt32Rules__fields[7] = {
@@ -148,7 +148,7 @@ static const upb_msglayout_field validate_UInt32Rules__fields[7] = {
const upb_msglayout validate_UInt32Rules_msginit = {
NULL,
&validate_UInt32Rules__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(32, 40), 7, false, 255,
};
static const upb_msglayout_field validate_UInt64Rules__fields[7] = {
@@ -164,7 +164,7 @@ static const upb_msglayout_field validate_UInt64Rules__fields[7] = {
const upb_msglayout validate_UInt64Rules_msginit = {
NULL,
&validate_UInt64Rules__fields[0],
- UPB_SIZE(56, 64), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field validate_SInt32Rules__fields[7] = {
@@ -180,7 +180,7 @@ static const upb_msglayout_field validate_SInt32Rules__fields[7] = {
const upb_msglayout validate_SInt32Rules_msginit = {
NULL,
&validate_SInt32Rules__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(32, 40), 7, false, 255,
};
static const upb_msglayout_field validate_SInt64Rules__fields[7] = {
@@ -196,7 +196,7 @@ static const upb_msglayout_field validate_SInt64Rules__fields[7] = {
const upb_msglayout validate_SInt64Rules_msginit = {
NULL,
&validate_SInt64Rules__fields[0],
- UPB_SIZE(56, 64), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field validate_Fixed32Rules__fields[7] = {
@@ -212,7 +212,7 @@ static const upb_msglayout_field validate_Fixed32Rules__fields[7] = {
const upb_msglayout validate_Fixed32Rules_msginit = {
NULL,
&validate_Fixed32Rules__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(32, 40), 7, false, 255,
};
static const upb_msglayout_field validate_Fixed64Rules__fields[7] = {
@@ -228,7 +228,7 @@ static const upb_msglayout_field validate_Fixed64Rules__fields[7] = {
const upb_msglayout validate_Fixed64Rules_msginit = {
NULL,
&validate_Fixed64Rules__fields[0],
- UPB_SIZE(56, 64), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field validate_SFixed32Rules__fields[7] = {
@@ -244,7 +244,7 @@ static const upb_msglayout_field validate_SFixed32Rules__fields[7] = {
const upb_msglayout validate_SFixed32Rules_msginit = {
NULL,
&validate_SFixed32Rules__fields[0],
- UPB_SIZE(32, 40), 7, false,
+ UPB_SIZE(32, 40), 7, false, 255,
};
static const upb_msglayout_field validate_SFixed64Rules__fields[7] = {
@@ -260,7 +260,7 @@ static const upb_msglayout_field validate_SFixed64Rules__fields[7] = {
const upb_msglayout validate_SFixed64Rules_msginit = {
NULL,
&validate_SFixed64Rules__fields[0],
- UPB_SIZE(56, 64), 7, false,
+ UPB_SIZE(56, 64), 7, false, 255,
};
static const upb_msglayout_field validate_BoolRules__fields[1] = {
@@ -270,63 +270,63 @@ static const upb_msglayout_field validate_BoolRules__fields[1] = {
const upb_msglayout validate_BoolRules_msginit = {
NULL,
&validate_BoolRules__fields[0],
- UPB_SIZE(2, 2), 1, false,
+ UPB_SIZE(8, 8), 1, false, 255,
};
static const upb_msglayout_field validate_StringRules__fields[25] = {
- {1, UPB_SIZE(60, 64), 8, 0, 12, 1},
- {2, UPB_SIZE(8, 8), 1, 0, 4, 1},
- {3, UPB_SIZE(16, 16), 2, 0, 4, 1},
- {4, UPB_SIZE(24, 24), 3, 0, 4, 1},
- {5, UPB_SIZE(32, 32), 4, 0, 4, 1},
- {6, UPB_SIZE(68, 80), 9, 0, 12, 1},
- {7, UPB_SIZE(76, 96), 10, 0, 12, 1},
- {8, UPB_SIZE(84, 112), 11, 0, 12, 1},
- {9, UPB_SIZE(92, 128), 12, 0, 12, 1},
+ {1, UPB_SIZE(60, 64), 1, 0, 12, 1},
+ {2, UPB_SIZE(8, 8), 2, 0, 4, 1},
+ {3, UPB_SIZE(16, 16), 3, 0, 4, 1},
+ {4, UPB_SIZE(24, 24), 4, 0, 4, 1},
+ {5, UPB_SIZE(32, 32), 5, 0, 4, 1},
+ {6, UPB_SIZE(68, 80), 6, 0, 12, 1},
+ {7, UPB_SIZE(76, 96), 7, 0, 12, 1},
+ {8, UPB_SIZE(84, 112), 8, 0, 12, 1},
+ {9, UPB_SIZE(92, 128), 9, 0, 12, 1},
{10, UPB_SIZE(108, 160), 0, 0, 12, 3},
{11, UPB_SIZE(112, 168), 0, 0, 12, 3},
- {12, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {13, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {14, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {15, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {16, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {17, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {18, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {19, UPB_SIZE(40, 40), 5, 0, 4, 1},
- {20, UPB_SIZE(48, 48), 6, 0, 4, 1},
- {21, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {22, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 8, 1},
- {23, UPB_SIZE(100, 144), 13, 0, 12, 1},
- {24, UPB_SIZE(120, 176), UPB_SIZE(-129, -185), 0, 14, 1},
- {25, UPB_SIZE(56, 56), 7, 0, 8, 1},
+ {12, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {13, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {14, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {15, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {16, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {17, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {18, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {19, UPB_SIZE(40, 40), 10, 0, 4, 1},
+ {20, UPB_SIZE(48, 48), 11, 0, 4, 1},
+ {21, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {22, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 8, 1},
+ {23, UPB_SIZE(100, 144), 12, 0, 12, 1},
+ {24, UPB_SIZE(116, 176), UPB_SIZE(-121, -181), 0, 14, 1},
+ {25, UPB_SIZE(56, 56), 13, 0, 8, 1},
};
const upb_msglayout validate_StringRules_msginit = {
NULL,
&validate_StringRules__fields[0],
- UPB_SIZE(136, 192), 25, false,
+ UPB_SIZE(128, 192), 25, false, 255,
};
static const upb_msglayout_field validate_BytesRules__fields[13] = {
- {1, UPB_SIZE(32, 32), 4, 0, 12, 1},
- {2, UPB_SIZE(8, 8), 1, 0, 4, 1},
- {3, UPB_SIZE(16, 16), 2, 0, 4, 1},
- {4, UPB_SIZE(40, 48), 5, 0, 12, 1},
- {5, UPB_SIZE(48, 64), 6, 0, 12, 1},
- {6, UPB_SIZE(56, 80), 7, 0, 12, 1},
- {7, UPB_SIZE(64, 96), 8, 0, 12, 1},
+ {1, UPB_SIZE(32, 32), 1, 0, 12, 1},
+ {2, UPB_SIZE(8, 8), 2, 0, 4, 1},
+ {3, UPB_SIZE(16, 16), 3, 0, 4, 1},
+ {4, UPB_SIZE(40, 48), 4, 0, 12, 1},
+ {5, UPB_SIZE(48, 64), 5, 0, 12, 1},
+ {6, UPB_SIZE(56, 80), 6, 0, 12, 1},
+ {7, UPB_SIZE(64, 96), 7, 0, 12, 1},
{8, UPB_SIZE(72, 112), 0, 0, 12, 3},
{9, UPB_SIZE(76, 120), 0, 0, 12, 3},
{10, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1},
{11, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1},
{12, UPB_SIZE(80, 128), UPB_SIZE(-85, -133), 0, 8, 1},
- {13, UPB_SIZE(24, 24), 3, 0, 4, 1},
+ {13, UPB_SIZE(24, 24), 8, 0, 4, 1},
};
const upb_msglayout validate_BytesRules_msginit = {
NULL,
&validate_BytesRules__fields[0],
- UPB_SIZE(88, 144), 13, false,
+ UPB_SIZE(88, 144), 13, false, 255,
};
static const upb_msglayout_field validate_EnumRules__fields[4] = {
@@ -339,7 +339,7 @@ static const upb_msglayout_field validate_EnumRules__fields[4] = {
const upb_msglayout validate_EnumRules_msginit = {
NULL,
&validate_EnumRules__fields[0],
- UPB_SIZE(20, 32), 4, false,
+ UPB_SIZE(24, 32), 4, false, 255,
};
static const upb_msglayout_field validate_MessageRules__fields[2] = {
@@ -350,7 +350,7 @@ static const upb_msglayout_field validate_MessageRules__fields[2] = {
const upb_msglayout validate_MessageRules_msginit = {
NULL,
&validate_MessageRules__fields[0],
- UPB_SIZE(3, 3), 2, false,
+ UPB_SIZE(8, 8), 2, false, 255,
};
static const upb_msglayout *const validate_RepeatedRules_submsgs[1] = {
@@ -367,10 +367,10 @@ static const upb_msglayout_field validate_RepeatedRules__fields[4] = {
const upb_msglayout validate_RepeatedRules_msginit = {
&validate_RepeatedRules_submsgs[0],
&validate_RepeatedRules__fields[0],
- UPB_SIZE(32, 40), 4, false,
+ UPB_SIZE(32, 40), 4, false, 255,
};
-static const upb_msglayout *const validate_MapRules_submsgs[2] = {
+static const upb_msglayout *const validate_MapRules_submsgs[1] = {
&validate_FieldRules_msginit,
};
@@ -385,7 +385,7 @@ static const upb_msglayout_field validate_MapRules__fields[5] = {
const upb_msglayout validate_MapRules_msginit = {
&validate_MapRules_submsgs[0],
&validate_MapRules__fields[0],
- UPB_SIZE(40, 48), 5, false,
+ UPB_SIZE(40, 48), 5, false, 255,
};
static const upb_msglayout_field validate_AnyRules__fields[3] = {
@@ -397,10 +397,10 @@ static const upb_msglayout_field validate_AnyRules__fields[3] = {
const upb_msglayout validate_AnyRules_msginit = {
NULL,
&validate_AnyRules__fields[0],
- UPB_SIZE(12, 24), 3, false,
+ UPB_SIZE(16, 24), 3, false, 255,
};
-static const upb_msglayout *const validate_DurationRules_submsgs[7] = {
+static const upb_msglayout *const validate_DurationRules_submsgs[1] = {
&google_protobuf_Duration_msginit,
};
@@ -418,30 +418,30 @@ static const upb_msglayout_field validate_DurationRules__fields[8] = {
const upb_msglayout validate_DurationRules_msginit = {
&validate_DurationRules_submsgs[0],
&validate_DurationRules__fields[0],
- UPB_SIZE(32, 64), 8, false,
+ UPB_SIZE(32, 64), 8, false, 255,
};
-static const upb_msglayout *const validate_TimestampRules_submsgs[6] = {
+static const upb_msglayout *const validate_TimestampRules_submsgs[2] = {
&google_protobuf_Duration_msginit,
&google_protobuf_Timestamp_msginit,
};
static const upb_msglayout_field validate_TimestampRules__fields[9] = {
{1, UPB_SIZE(2, 2), 1, 0, 8, 1},
- {2, UPB_SIZE(8, 8), 4, 1, 11, 1},
- {3, UPB_SIZE(12, 16), 5, 1, 11, 1},
- {4, UPB_SIZE(16, 24), 6, 1, 11, 1},
- {5, UPB_SIZE(20, 32), 7, 1, 11, 1},
- {6, UPB_SIZE(24, 40), 8, 1, 11, 1},
- {7, UPB_SIZE(3, 3), 2, 0, 8, 1},
- {8, UPB_SIZE(4, 4), 3, 0, 8, 1},
+ {2, UPB_SIZE(8, 8), 2, 1, 11, 1},
+ {3, UPB_SIZE(12, 16), 3, 1, 11, 1},
+ {4, UPB_SIZE(16, 24), 4, 1, 11, 1},
+ {5, UPB_SIZE(20, 32), 5, 1, 11, 1},
+ {6, UPB_SIZE(24, 40), 6, 1, 11, 1},
+ {7, UPB_SIZE(3, 3), 7, 0, 8, 1},
+ {8, UPB_SIZE(4, 4), 8, 0, 8, 1},
{9, UPB_SIZE(28, 48), 9, 0, 11, 1},
};
const upb_msglayout validate_TimestampRules_msginit = {
&validate_TimestampRules_submsgs[0],
&validate_TimestampRules__fields[0],
- UPB_SIZE(32, 56), 9, false,
+ UPB_SIZE(32, 56), 9, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.h
index c29b4ec589b..dcde0a9b4f4 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.h
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/validate/validate.upb.h
@@ -11,6 +11,7 @@
#include "upb/msg.h"
#include "upb/decode.h"
+#include "upb/decode_fast.h"
#include "upb/encode.h"
#include "upb/port_def.inc"
@@ -110,6 +111,12 @@ UPB_INLINE validate_FieldRules *validate_FieldRules_parse(const char *buf, size_
validate_FieldRules *ret = validate_FieldRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_FieldRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_FieldRules *validate_FieldRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_FieldRules *ret = validate_FieldRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_FieldRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_FieldRules_serialize(const validate_FieldRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_FieldRules_msginit, arena, len);
}
@@ -461,6 +468,12 @@ UPB_INLINE validate_FloatRules *validate_FloatRules_parse(const char *buf, size_
validate_FloatRules *ret = validate_FloatRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_FloatRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_FloatRules *validate_FloatRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_FloatRules *ret = validate_FloatRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_FloatRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_FloatRules_serialize(const validate_FloatRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_FloatRules_msginit, arena, len);
}
@@ -502,20 +515,20 @@ UPB_INLINE float* validate_FloatRules_mutable_in(validate_FloatRules *msg, size_
return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE float* validate_FloatRules_resize_in(validate_FloatRules *msg, size_t len, upb_arena *arena) {
- return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_FLOAT, arena);
+ return (float*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 24), len, 2, arena);
}
UPB_INLINE bool validate_FloatRules_add_in(validate_FloatRules *msg, float val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 24), 2, &val,
arena);
}
UPB_INLINE float* validate_FloatRules_mutable_not_in(validate_FloatRules *msg, size_t *len) {
return (float*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE float* validate_FloatRules_resize_not_in(validate_FloatRules *msg, size_t len, upb_arena *arena) {
- return (float*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_FLOAT, arena);
+ return (float*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 32), len, 2, arena);
}
UPB_INLINE bool validate_FloatRules_add_not_in(validate_FloatRules *msg, float val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_FLOAT, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 32), 2, &val,
arena);
}
@@ -529,6 +542,12 @@ UPB_INLINE validate_DoubleRules *validate_DoubleRules_parse(const char *buf, siz
validate_DoubleRules *ret = validate_DoubleRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_DoubleRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_DoubleRules *validate_DoubleRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_DoubleRules *ret = validate_DoubleRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_DoubleRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_DoubleRules_serialize(const validate_DoubleRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_DoubleRules_msginit, arena, len);
}
@@ -570,20 +589,20 @@ UPB_INLINE double* validate_DoubleRules_mutable_in(validate_DoubleRules *msg, si
return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
}
UPB_INLINE double* validate_DoubleRules_resize_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) {
- return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_DOUBLE, arena);
+ return (double*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 48), len, 3, arena);
}
UPB_INLINE bool validate_DoubleRules_add_in(validate_DoubleRules *msg, double val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 48), 3, &val,
arena);
}
UPB_INLINE double* validate_DoubleRules_mutable_not_in(validate_DoubleRules *msg, size_t *len) {
return (double*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
}
UPB_INLINE double* validate_DoubleRules_resize_not_in(validate_DoubleRules *msg, size_t len, upb_arena *arena) {
- return (double*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_DOUBLE, arena);
+ return (double*)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 56), len, 3, arena);
}
UPB_INLINE bool validate_DoubleRules_add_not_in(validate_DoubleRules *msg, double val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_DOUBLE, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(52, 56), 3, &val,
arena);
}
@@ -597,6 +616,12 @@ UPB_INLINE validate_Int32Rules *validate_Int32Rules_parse(const char *buf, size_
validate_Int32Rules *ret = validate_Int32Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_Int32Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_Int32Rules *validate_Int32Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_Int32Rules *ret = validate_Int32Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_Int32Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_Int32Rules_serialize(const validate_Int32Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_Int32Rules_msginit, arena, len);
}
@@ -638,20 +663,20 @@ UPB_INLINE int32_t* validate_Int32Rules_mutable_in(validate_Int32Rules *msg, siz
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE int32_t* validate_Int32Rules_resize_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 24), len, 2, arena);
}
UPB_INLINE bool validate_Int32Rules_add_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 24), 2, &val,
arena);
}
UPB_INLINE int32_t* validate_Int32Rules_mutable_not_in(validate_Int32Rules *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE int32_t* validate_Int32Rules_resize_not_in(validate_Int32Rules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 32), len, 2, arena);
}
UPB_INLINE bool validate_Int32Rules_add_not_in(validate_Int32Rules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 32), 2, &val,
arena);
}
@@ -665,6 +690,12 @@ UPB_INLINE validate_Int64Rules *validate_Int64Rules_parse(const char *buf, size_
validate_Int64Rules *ret = validate_Int64Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_Int64Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_Int64Rules *validate_Int64Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_Int64Rules *ret = validate_Int64Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_Int64Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_Int64Rules_serialize(const validate_Int64Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_Int64Rules_msginit, arena, len);
}
@@ -706,20 +737,20 @@ UPB_INLINE int64_t* validate_Int64Rules_mutable_in(validate_Int64Rules *msg, siz
return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
}
UPB_INLINE int64_t* validate_Int64Rules_resize_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) {
- return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena);
+ return (int64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 48), len, 3, arena);
}
UPB_INLINE bool validate_Int64Rules_add_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 48), 3, &val,
arena);
}
UPB_INLINE int64_t* validate_Int64Rules_mutable_not_in(validate_Int64Rules *msg, size_t *len) {
return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
}
UPB_INLINE int64_t* validate_Int64Rules_resize_not_in(validate_Int64Rules *msg, size_t len, upb_arena *arena) {
- return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena);
+ return (int64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 56), len, 3, arena);
}
UPB_INLINE bool validate_Int64Rules_add_not_in(validate_Int64Rules *msg, int64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(52, 56), 3, &val,
arena);
}
@@ -733,6 +764,12 @@ UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_parse(const char *buf, siz
validate_UInt32Rules *ret = validate_UInt32Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_UInt32Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_UInt32Rules *validate_UInt32Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_UInt32Rules *ret = validate_UInt32Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_UInt32Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_UInt32Rules_serialize(const validate_UInt32Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_UInt32Rules_msginit, arena, len);
}
@@ -774,20 +811,20 @@ UPB_INLINE uint32_t* validate_UInt32Rules_mutable_in(validate_UInt32Rules *msg,
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE uint32_t* validate_UInt32Rules_resize_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 24), len, 2, arena);
}
UPB_INLINE bool validate_UInt32Rules_add_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 24), 2, &val,
arena);
}
UPB_INLINE uint32_t* validate_UInt32Rules_mutable_not_in(validate_UInt32Rules *msg, size_t *len) {
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE uint32_t* validate_UInt32Rules_resize_not_in(validate_UInt32Rules *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 32), len, 2, arena);
}
UPB_INLINE bool validate_UInt32Rules_add_not_in(validate_UInt32Rules *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 32), 2, &val,
arena);
}
@@ -801,6 +838,12 @@ UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_parse(const char *buf, siz
validate_UInt64Rules *ret = validate_UInt64Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_UInt64Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_UInt64Rules *validate_UInt64Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_UInt64Rules *ret = validate_UInt64Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_UInt64Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_UInt64Rules_serialize(const validate_UInt64Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_UInt64Rules_msginit, arena, len);
}
@@ -842,20 +885,20 @@ UPB_INLINE uint64_t* validate_UInt64Rules_mutable_in(validate_UInt64Rules *msg,
return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
}
UPB_INLINE uint64_t* validate_UInt64Rules_resize_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) {
- return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_UINT64, arena);
+ return (uint64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 48), len, 3, arena);
}
UPB_INLINE bool validate_UInt64Rules_add_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 48), 3, &val,
arena);
}
UPB_INLINE uint64_t* validate_UInt64Rules_mutable_not_in(validate_UInt64Rules *msg, size_t *len) {
return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
}
UPB_INLINE uint64_t* validate_UInt64Rules_resize_not_in(validate_UInt64Rules *msg, size_t len, upb_arena *arena) {
- return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_UINT64, arena);
+ return (uint64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 56), len, 3, arena);
}
UPB_INLINE bool validate_UInt64Rules_add_not_in(validate_UInt64Rules *msg, uint64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(52, 56), 3, &val,
arena);
}
@@ -869,6 +912,12 @@ UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_parse(const char *buf, siz
validate_SInt32Rules *ret = validate_SInt32Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_SInt32Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_SInt32Rules *validate_SInt32Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_SInt32Rules *ret = validate_SInt32Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_SInt32Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_SInt32Rules_serialize(const validate_SInt32Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_SInt32Rules_msginit, arena, len);
}
@@ -910,20 +959,20 @@ UPB_INLINE int32_t* validate_SInt32Rules_mutable_in(validate_SInt32Rules *msg, s
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE int32_t* validate_SInt32Rules_resize_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 24), len, 2, arena);
}
UPB_INLINE bool validate_SInt32Rules_add_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 24), 2, &val,
arena);
}
UPB_INLINE int32_t* validate_SInt32Rules_mutable_not_in(validate_SInt32Rules *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE int32_t* validate_SInt32Rules_resize_not_in(validate_SInt32Rules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 32), len, 2, arena);
}
UPB_INLINE bool validate_SInt32Rules_add_not_in(validate_SInt32Rules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 32), 2, &val,
arena);
}
@@ -937,6 +986,12 @@ UPB_INLINE validate_SInt64Rules *validate_SInt64Rules_parse(const char *buf, siz
validate_SInt64Rules *ret = validate_SInt64Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_SInt64Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_SInt64Rules *validate_SInt64Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_SInt64Rules *ret = validate_SInt64Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_SInt64Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_SInt64Rules_serialize(const validate_SInt64Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_SInt64Rules_msginit, arena, len);
}
@@ -978,20 +1033,20 @@ UPB_INLINE int64_t* validate_SInt64Rules_mutable_in(validate_SInt64Rules *msg, s
return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
}
UPB_INLINE int64_t* validate_SInt64Rules_resize_in(validate_SInt64Rules *msg, size_t len, upb_arena *arena) {
- return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena);
+ return (int64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 48), len, 3, arena);
}
UPB_INLINE bool validate_SInt64Rules_add_in(validate_SInt64Rules *msg, int64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 48), 3, &val,
arena);
}
UPB_INLINE int64_t* validate_SInt64Rules_mutable_not_in(validate_SInt64Rules *msg, size_t *len) {
return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
}
UPB_INLINE int64_t* validate_SInt64Rules_resize_not_in(validate_SInt64Rules *msg, size_t len, upb_arena *arena) {
- return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena);
+ return (int64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 56), len, 3, arena);
}
UPB_INLINE bool validate_SInt64Rules_add_not_in(validate_SInt64Rules *msg, int64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(52, 56), 3, &val,
arena);
}
@@ -1005,6 +1060,12 @@ UPB_INLINE validate_Fixed32Rules *validate_Fixed32Rules_parse(const char *buf, s
validate_Fixed32Rules *ret = validate_Fixed32Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_Fixed32Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_Fixed32Rules *validate_Fixed32Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_Fixed32Rules *ret = validate_Fixed32Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_Fixed32Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_Fixed32Rules_serialize(const validate_Fixed32Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_Fixed32Rules_msginit, arena, len);
}
@@ -1046,20 +1107,20 @@ UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_in(validate_Fixed32Rules *msg
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE uint32_t* validate_Fixed32Rules_resize_in(validate_Fixed32Rules *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 24), len, 2, arena);
}
UPB_INLINE bool validate_Fixed32Rules_add_in(validate_Fixed32Rules *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 24), 2, &val,
arena);
}
UPB_INLINE uint32_t* validate_Fixed32Rules_mutable_not_in(validate_Fixed32Rules *msg, size_t *len) {
return (uint32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE uint32_t* validate_Fixed32Rules_resize_not_in(validate_Fixed32Rules *msg, size_t len, upb_arena *arena) {
- return (uint32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_UINT32, arena);
+ return (uint32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 32), len, 2, arena);
}
UPB_INLINE bool validate_Fixed32Rules_add_not_in(validate_Fixed32Rules *msg, uint32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_UINT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 32), 2, &val,
arena);
}
@@ -1073,6 +1134,12 @@ UPB_INLINE validate_Fixed64Rules *validate_Fixed64Rules_parse(const char *buf, s
validate_Fixed64Rules *ret = validate_Fixed64Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_Fixed64Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_Fixed64Rules *validate_Fixed64Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_Fixed64Rules *ret = validate_Fixed64Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_Fixed64Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_Fixed64Rules_serialize(const validate_Fixed64Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_Fixed64Rules_msginit, arena, len);
}
@@ -1114,20 +1181,20 @@ UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_in(validate_Fixed64Rules *msg
return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
}
UPB_INLINE uint64_t* validate_Fixed64Rules_resize_in(validate_Fixed64Rules *msg, size_t len, upb_arena *arena) {
- return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_UINT64, arena);
+ return (uint64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 48), len, 3, arena);
}
UPB_INLINE bool validate_Fixed64Rules_add_in(validate_Fixed64Rules *msg, uint64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 48), 3, &val,
arena);
}
UPB_INLINE uint64_t* validate_Fixed64Rules_mutable_not_in(validate_Fixed64Rules *msg, size_t *len) {
return (uint64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
}
UPB_INLINE uint64_t* validate_Fixed64Rules_resize_not_in(validate_Fixed64Rules *msg, size_t len, upb_arena *arena) {
- return (uint64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_UINT64, arena);
+ return (uint64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 56), len, 3, arena);
}
UPB_INLINE bool validate_Fixed64Rules_add_not_in(validate_Fixed64Rules *msg, uint64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_UINT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(52, 56), 3, &val,
arena);
}
@@ -1141,6 +1208,12 @@ UPB_INLINE validate_SFixed32Rules *validate_SFixed32Rules_parse(const char *buf,
validate_SFixed32Rules *ret = validate_SFixed32Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_SFixed32Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_SFixed32Rules *validate_SFixed32Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_SFixed32Rules *ret = validate_SFixed32Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_SFixed32Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_SFixed32Rules_serialize(const validate_SFixed32Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_SFixed32Rules_msginit, arena, len);
}
@@ -1182,20 +1255,20 @@ UPB_INLINE int32_t* validate_SFixed32Rules_mutable_in(validate_SFixed32Rules *ms
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 24), len);
}
UPB_INLINE int32_t* validate_SFixed32Rules_resize_in(validate_SFixed32Rules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(24, 24), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 24), len, 2, arena);
}
UPB_INLINE bool validate_SFixed32Rules_add_in(validate_SFixed32Rules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(24, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(24, 24), 2, &val,
arena);
}
UPB_INLINE int32_t* validate_SFixed32Rules_mutable_not_in(validate_SFixed32Rules *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 32), len);
}
UPB_INLINE int32_t* validate_SFixed32Rules_resize_not_in(validate_SFixed32Rules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(28, 32), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 32), len, 2, arena);
}
UPB_INLINE bool validate_SFixed32Rules_add_not_in(validate_SFixed32Rules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(28, 32), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(28, 32), 2, &val,
arena);
}
@@ -1209,6 +1282,12 @@ UPB_INLINE validate_SFixed64Rules *validate_SFixed64Rules_parse(const char *buf,
validate_SFixed64Rules *ret = validate_SFixed64Rules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_SFixed64Rules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_SFixed64Rules *validate_SFixed64Rules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_SFixed64Rules *ret = validate_SFixed64Rules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_SFixed64Rules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_SFixed64Rules_serialize(const validate_SFixed64Rules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_SFixed64Rules_msginit, arena, len);
}
@@ -1250,20 +1329,20 @@ UPB_INLINE int64_t* validate_SFixed64Rules_mutable_in(validate_SFixed64Rules *ms
return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 48), len);
}
UPB_INLINE int64_t* validate_SFixed64Rules_resize_in(validate_SFixed64Rules *msg, size_t len, upb_arena *arena) {
- return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(48, 48), len, UPB_TYPE_INT64, arena);
+ return (int64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(48, 48), len, 3, arena);
}
UPB_INLINE bool validate_SFixed64Rules_add_in(validate_SFixed64Rules *msg, int64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(48, 48), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(48, 48), 3, &val,
arena);
}
UPB_INLINE int64_t* validate_SFixed64Rules_mutable_not_in(validate_SFixed64Rules *msg, size_t *len) {
return (int64_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(52, 56), len);
}
UPB_INLINE int64_t* validate_SFixed64Rules_resize_not_in(validate_SFixed64Rules *msg, size_t len, upb_arena *arena) {
- return (int64_t*)_upb_array_resize_accessor(msg, UPB_SIZE(52, 56), len, UPB_TYPE_INT64, arena);
+ return (int64_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(52, 56), len, 3, arena);
}
UPB_INLINE bool validate_SFixed64Rules_add_not_in(validate_SFixed64Rules *msg, int64_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(52, 56), UPB_SIZE(8, 8), UPB_TYPE_INT64, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(52, 56), 3, &val,
arena);
}
@@ -1277,6 +1356,12 @@ UPB_INLINE validate_BoolRules *validate_BoolRules_parse(const char *buf, size_t
validate_BoolRules *ret = validate_BoolRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_BoolRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_BoolRules *validate_BoolRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_BoolRules *ret = validate_BoolRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_BoolRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_BoolRules_serialize(const validate_BoolRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_BoolRules_msginit, arena, len);
}
@@ -1299,6 +1384,12 @@ UPB_INLINE validate_StringRules *validate_StringRules_parse(const char *buf, siz
validate_StringRules *ret = validate_StringRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_StringRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_StringRules *validate_StringRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_StringRules *ret = validate_StringRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_StringRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_StringRules_serialize(const validate_StringRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_StringRules_msginit, arena, len);
}
@@ -1316,157 +1407,157 @@ typedef enum {
validate_StringRules_well_known_well_known_regex = 24,
validate_StringRules_well_known_NOT_SET = 0
} validate_StringRules_well_known_oneofcases;
-UPB_INLINE validate_StringRules_well_known_oneofcases validate_StringRules_well_known_case(const validate_StringRules* msg) { return (validate_StringRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(128, 184), int32_t); }
+UPB_INLINE validate_StringRules_well_known_oneofcases validate_StringRules_well_known_case(const validate_StringRules* msg) { return (validate_StringRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(120, 180), int32_t); }
-UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE bool validate_StringRules_has_const(const validate_StringRules *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview validate_StringRules_const(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(60, 64), upb_strview); }
-UPB_INLINE bool validate_StringRules_has_min_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool validate_StringRules_has_min_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE uint64_t validate_StringRules_min_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
-UPB_INLINE bool validate_StringRules_has_max_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool validate_StringRules_has_max_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE uint64_t validate_StringRules_max_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
-UPB_INLINE bool validate_StringRules_has_min_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool validate_StringRules_has_min_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE uint64_t validate_StringRules_min_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
-UPB_INLINE bool validate_StringRules_has_max_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool validate_StringRules_has_max_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE uint64_t validate_StringRules_max_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t); }
-UPB_INLINE bool validate_StringRules_has_pattern(const validate_StringRules *msg) { return _upb_hasbit(msg, 9); }
+UPB_INLINE bool validate_StringRules_has_pattern(const validate_StringRules *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE upb_strview validate_StringRules_pattern(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(68, 80), upb_strview); }
-UPB_INLINE bool validate_StringRules_has_prefix(const validate_StringRules *msg) { return _upb_hasbit(msg, 10); }
+UPB_INLINE bool validate_StringRules_has_prefix(const validate_StringRules *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE upb_strview validate_StringRules_prefix(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(76, 96), upb_strview); }
-UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) { return _upb_hasbit(msg, 11); }
+UPB_INLINE bool validate_StringRules_has_suffix(const validate_StringRules *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE upb_strview validate_StringRules_suffix(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(84, 112), upb_strview); }
-UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_hasbit(msg, 12); }
+UPB_INLINE bool validate_StringRules_has_contains(const validate_StringRules *msg) { return _upb_hasbit(msg, 9); }
UPB_INLINE upb_strview validate_StringRules_contains(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(92, 128), upb_strview); }
UPB_INLINE upb_strview const* validate_StringRules_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(108, 160), len); }
UPB_INLINE upb_strview const* validate_StringRules_not_in(const validate_StringRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(112, 168), len); }
-UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 12; }
-UPB_INLINE bool validate_StringRules_email(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 12, false); }
-UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 13; }
-UPB_INLINE bool validate_StringRules_hostname(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 13, false); }
-UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 14; }
-UPB_INLINE bool validate_StringRules_ip(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 14, false); }
-UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 15; }
-UPB_INLINE bool validate_StringRules_ipv4(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 15, false); }
-UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 16; }
-UPB_INLINE bool validate_StringRules_ipv6(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 16, false); }
-UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 17; }
-UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 17, false); }
-UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 18; }
-UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 18, false); }
-UPB_INLINE bool validate_StringRules_has_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE bool validate_StringRules_has_email(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 12; }
+UPB_INLINE bool validate_StringRules_email(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 12, false); }
+UPB_INLINE bool validate_StringRules_has_hostname(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 13; }
+UPB_INLINE bool validate_StringRules_hostname(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 13, false); }
+UPB_INLINE bool validate_StringRules_has_ip(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 14; }
+UPB_INLINE bool validate_StringRules_ip(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 14, false); }
+UPB_INLINE bool validate_StringRules_has_ipv4(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 15; }
+UPB_INLINE bool validate_StringRules_ipv4(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 15, false); }
+UPB_INLINE bool validate_StringRules_has_ipv6(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 16; }
+UPB_INLINE bool validate_StringRules_ipv6(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 16, false); }
+UPB_INLINE bool validate_StringRules_has_uri(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 17; }
+UPB_INLINE bool validate_StringRules_uri(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 17, false); }
+UPB_INLINE bool validate_StringRules_has_uri_ref(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 18; }
+UPB_INLINE bool validate_StringRules_uri_ref(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 18, false); }
+UPB_INLINE bool validate_StringRules_has_len(const validate_StringRules *msg) { return _upb_hasbit(msg, 10); }
UPB_INLINE uint64_t validate_StringRules_len(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t); }
-UPB_INLINE bool validate_StringRules_has_len_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE bool validate_StringRules_has_len_bytes(const validate_StringRules *msg) { return _upb_hasbit(msg, 11); }
UPB_INLINE uint64_t validate_StringRules_len_bytes(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 48), uint64_t); }
-UPB_INLINE bool validate_StringRules_has_address(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 21; }
-UPB_INLINE bool validate_StringRules_address(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 21, false); }
-UPB_INLINE bool validate_StringRules_has_uuid(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 22; }
-UPB_INLINE bool validate_StringRules_uuid(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 22, false); }
-UPB_INLINE bool validate_StringRules_has_not_contains(const validate_StringRules *msg) { return _upb_hasbit(msg, 13); }
+UPB_INLINE bool validate_StringRules_has_address(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 21; }
+UPB_INLINE bool validate_StringRules_address(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 21, false); }
+UPB_INLINE bool validate_StringRules_has_uuid(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 22; }
+UPB_INLINE bool validate_StringRules_uuid(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 22, false); }
+UPB_INLINE bool validate_StringRules_has_not_contains(const validate_StringRules *msg) { return _upb_hasbit(msg, 12); }
UPB_INLINE upb_strview validate_StringRules_not_contains(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(100, 144), upb_strview); }
-UPB_INLINE bool validate_StringRules_has_well_known_regex(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(128, 184)) == 24; }
-UPB_INLINE int32_t validate_StringRules_well_known_regex(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(120, 176), UPB_SIZE(128, 184), 24, 0); }
-UPB_INLINE bool validate_StringRules_has_strict(const validate_StringRules *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE bool validate_StringRules_has_well_known_regex(const validate_StringRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(120, 180)) == 24; }
+UPB_INLINE int32_t validate_StringRules_well_known_regex(const validate_StringRules *msg) { return UPB_READ_ONEOF(msg, int32_t, UPB_SIZE(116, 176), UPB_SIZE(120, 180), 24, 0); }
+UPB_INLINE bool validate_StringRules_has_strict(const validate_StringRules *msg) { return _upb_hasbit(msg, 13); }
UPB_INLINE bool validate_StringRules_strict(const validate_StringRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 56), bool); }
UPB_INLINE void validate_StringRules_set_const(validate_StringRules *msg, upb_strview value) {
- _upb_sethas(msg, 8);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(60, 64), upb_strview) = value;
}
UPB_INLINE void validate_StringRules_set_min_len(validate_StringRules *msg, uint64_t value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void validate_StringRules_set_max_len(validate_StringRules *msg, uint64_t value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
}
UPB_INLINE void validate_StringRules_set_min_bytes(validate_StringRules *msg, uint64_t value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
}
UPB_INLINE void validate_StringRules_set_max_bytes(validate_StringRules *msg, uint64_t value) {
- _upb_sethas(msg, 4);
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(32, 32), uint64_t) = value;
}
UPB_INLINE void validate_StringRules_set_pattern(validate_StringRules *msg, upb_strview value) {
- _upb_sethas(msg, 9);
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(68, 80), upb_strview) = value;
}
UPB_INLINE void validate_StringRules_set_prefix(validate_StringRules *msg, upb_strview value) {
- _upb_sethas(msg, 10);
+ _upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(76, 96), upb_strview) = value;
}
UPB_INLINE void validate_StringRules_set_suffix(validate_StringRules *msg, upb_strview value) {
- _upb_sethas(msg, 11);
+ _upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(84, 112), upb_strview) = value;
}
UPB_INLINE void validate_StringRules_set_contains(validate_StringRules *msg, upb_strview value) {
- _upb_sethas(msg, 12);
+ _upb_sethas(msg, 9);
*UPB_PTR_AT(msg, UPB_SIZE(92, 128), upb_strview) = value;
}
UPB_INLINE upb_strview* validate_StringRules_mutable_in(validate_StringRules *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(108, 160), len);
}
UPB_INLINE upb_strview* validate_StringRules_resize_in(validate_StringRules *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(108, 160), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(108, 160), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool validate_StringRules_add_in(validate_StringRules *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(108, 160), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(108, 160), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* validate_StringRules_mutable_not_in(validate_StringRules *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(112, 168), len);
}
UPB_INLINE upb_strview* validate_StringRules_resize_not_in(validate_StringRules *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(112, 168), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(112, 168), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool validate_StringRules_add_not_in(validate_StringRules *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(112, 168), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(112, 168), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void validate_StringRules_set_email(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 12);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 12);
}
UPB_INLINE void validate_StringRules_set_hostname(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 13);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 13);
}
UPB_INLINE void validate_StringRules_set_ip(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 14);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 14);
}
UPB_INLINE void validate_StringRules_set_ipv4(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 15);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 15);
}
UPB_INLINE void validate_StringRules_set_ipv6(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 16);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 16);
}
UPB_INLINE void validate_StringRules_set_uri(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 17);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 17);
}
UPB_INLINE void validate_StringRules_set_uri_ref(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 18);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 18);
}
UPB_INLINE void validate_StringRules_set_len(validate_StringRules *msg, uint64_t value) {
- _upb_sethas(msg, 5);
+ _upb_sethas(msg, 10);
*UPB_PTR_AT(msg, UPB_SIZE(40, 40), uint64_t) = value;
}
UPB_INLINE void validate_StringRules_set_len_bytes(validate_StringRules *msg, uint64_t value) {
- _upb_sethas(msg, 6);
+ _upb_sethas(msg, 11);
*UPB_PTR_AT(msg, UPB_SIZE(48, 48), uint64_t) = value;
}
UPB_INLINE void validate_StringRules_set_address(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 21);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 21);
}
UPB_INLINE void validate_StringRules_set_uuid(validate_StringRules *msg, bool value) {
- UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 22);
+ UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 22);
}
UPB_INLINE void validate_StringRules_set_not_contains(validate_StringRules *msg, upb_strview value) {
- _upb_sethas(msg, 13);
+ _upb_sethas(msg, 12);
*UPB_PTR_AT(msg, UPB_SIZE(100, 144), upb_strview) = value;
}
UPB_INLINE void validate_StringRules_set_well_known_regex(validate_StringRules *msg, int32_t value) {
- UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(120, 176), value, UPB_SIZE(128, 184), 24);
+ UPB_WRITE_ONEOF(msg, int32_t, UPB_SIZE(116, 176), value, UPB_SIZE(120, 180), 24);
}
UPB_INLINE void validate_StringRules_set_strict(validate_StringRules *msg, bool value) {
- _upb_sethas(msg, 7);
+ _upb_sethas(msg, 13);
*UPB_PTR_AT(msg, UPB_SIZE(56, 56), bool) = value;
}
@@ -1480,6 +1571,12 @@ UPB_INLINE validate_BytesRules *validate_BytesRules_parse(const char *buf, size_
validate_BytesRules *ret = validate_BytesRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_BytesRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_BytesRules *validate_BytesRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_BytesRules *ret = validate_BytesRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_BytesRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_BytesRules_serialize(const validate_BytesRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_BytesRules_msginit, arena, len);
}
@@ -1492,19 +1589,19 @@ typedef enum {
} validate_BytesRules_well_known_oneofcases;
UPB_INLINE validate_BytesRules_well_known_oneofcases validate_BytesRules_well_known_case(const validate_BytesRules* msg) { return (validate_BytesRules_well_known_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(84, 132), int32_t); }
-UPB_INLINE bool validate_BytesRules_has_const(const validate_BytesRules *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool validate_BytesRules_has_const(const validate_BytesRules *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE upb_strview validate_BytesRules_const(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview); }
-UPB_INLINE bool validate_BytesRules_has_min_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE bool validate_BytesRules_has_min_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE uint64_t validate_BytesRules_min_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t); }
-UPB_INLINE bool validate_BytesRules_has_max_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool validate_BytesRules_has_max_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE uint64_t validate_BytesRules_max_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t); }
-UPB_INLINE bool validate_BytesRules_has_pattern(const validate_BytesRules *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE bool validate_BytesRules_has_pattern(const validate_BytesRules *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE upb_strview validate_BytesRules_pattern(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview); }
-UPB_INLINE bool validate_BytesRules_has_prefix(const validate_BytesRules *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE bool validate_BytesRules_has_prefix(const validate_BytesRules *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE upb_strview validate_BytesRules_prefix(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview); }
-UPB_INLINE bool validate_BytesRules_has_suffix(const validate_BytesRules *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE bool validate_BytesRules_has_suffix(const validate_BytesRules *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE upb_strview validate_BytesRules_suffix(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(56, 80), upb_strview); }
-UPB_INLINE bool validate_BytesRules_has_contains(const validate_BytesRules *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE bool validate_BytesRules_has_contains(const validate_BytesRules *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE upb_strview validate_BytesRules_contains(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(64, 96), upb_strview); }
UPB_INLINE upb_strview const* validate_BytesRules_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(72, 112), len); }
UPB_INLINE upb_strview const* validate_BytesRules_not_in(const validate_BytesRules *msg, size_t *len) { return (upb_strview const*)_upb_array_accessor(msg, UPB_SIZE(76, 120), len); }
@@ -1514,55 +1611,55 @@ UPB_INLINE bool validate_BytesRules_has_ipv4(const validate_BytesRules *msg) { r
UPB_INLINE bool validate_BytesRules_ipv4(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 11, false); }
UPB_INLINE bool validate_BytesRules_has_ipv6(const validate_BytesRules *msg) { return _upb_getoneofcase(msg, UPB_SIZE(84, 132)) == 12; }
UPB_INLINE bool validate_BytesRules_ipv6(const validate_BytesRules *msg) { return UPB_READ_ONEOF(msg, bool, UPB_SIZE(80, 128), UPB_SIZE(84, 132), 12, false); }
-UPB_INLINE bool validate_BytesRules_has_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool validate_BytesRules_has_len(const validate_BytesRules *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE uint64_t validate_BytesRules_len(const validate_BytesRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t); }
UPB_INLINE void validate_BytesRules_set_const(validate_BytesRules *msg, upb_strview value) {
- _upb_sethas(msg, 4);
+ _upb_sethas(msg, 1);
*UPB_PTR_AT(msg, UPB_SIZE(32, 32), upb_strview) = value;
}
UPB_INLINE void validate_BytesRules_set_min_len(validate_BytesRules *msg, uint64_t value) {
- _upb_sethas(msg, 1);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), uint64_t) = value;
}
UPB_INLINE void validate_BytesRules_set_max_len(validate_BytesRules *msg, uint64_t value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(16, 16), uint64_t) = value;
}
UPB_INLINE void validate_BytesRules_set_pattern(validate_BytesRules *msg, upb_strview value) {
- _upb_sethas(msg, 5);
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(40, 48), upb_strview) = value;
}
UPB_INLINE void validate_BytesRules_set_prefix(validate_BytesRules *msg, upb_strview value) {
- _upb_sethas(msg, 6);
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(48, 64), upb_strview) = value;
}
UPB_INLINE void validate_BytesRules_set_suffix(validate_BytesRules *msg, upb_strview value) {
- _upb_sethas(msg, 7);
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(56, 80), upb_strview) = value;
}
UPB_INLINE void validate_BytesRules_set_contains(validate_BytesRules *msg, upb_strview value) {
- _upb_sethas(msg, 8);
+ _upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(64, 96), upb_strview) = value;
}
UPB_INLINE upb_strview* validate_BytesRules_mutable_in(validate_BytesRules *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(72, 112), len);
}
UPB_INLINE upb_strview* validate_BytesRules_resize_in(validate_BytesRules *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(72, 112), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(72, 112), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool validate_BytesRules_add_in(validate_BytesRules *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(72, 112), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(72, 112), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* validate_BytesRules_mutable_not_in(validate_BytesRules *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(76, 120), len);
}
UPB_INLINE upb_strview* validate_BytesRules_resize_not_in(validate_BytesRules *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(76, 120), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(76, 120), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool validate_BytesRules_add_not_in(validate_BytesRules *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(76, 120), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(76, 120), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE void validate_BytesRules_set_ip(validate_BytesRules *msg, bool value) {
@@ -1575,7 +1672,7 @@ UPB_INLINE void validate_BytesRules_set_ipv6(validate_BytesRules *msg, bool valu
UPB_WRITE_ONEOF(msg, bool, UPB_SIZE(80, 128), value, UPB_SIZE(84, 132), 12);
}
UPB_INLINE void validate_BytesRules_set_len(validate_BytesRules *msg, uint64_t value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(24, 24), uint64_t) = value;
}
@@ -1589,6 +1686,12 @@ UPB_INLINE validate_EnumRules *validate_EnumRules_parse(const char *buf, size_t
validate_EnumRules *ret = validate_EnumRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_EnumRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_EnumRules *validate_EnumRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_EnumRules *ret = validate_EnumRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_EnumRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_EnumRules_serialize(const validate_EnumRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_EnumRules_msginit, arena, len);
}
@@ -1612,20 +1715,20 @@ UPB_INLINE int32_t* validate_EnumRules_mutable_in(validate_EnumRules *msg, size_
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE int32_t* validate_EnumRules_resize_in(validate_EnumRules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(12, 16), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(12, 16), len, 2, arena);
}
UPB_INLINE bool validate_EnumRules_add_in(validate_EnumRules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(12, 16), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(12, 16), 2, &val,
arena);
}
UPB_INLINE int32_t* validate_EnumRules_mutable_not_in(validate_EnumRules *msg, size_t *len) {
return (int32_t*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len);
}
UPB_INLINE int32_t* validate_EnumRules_resize_not_in(validate_EnumRules *msg, size_t len, upb_arena *arena) {
- return (int32_t*)_upb_array_resize_accessor(msg, UPB_SIZE(16, 24), len, UPB_TYPE_INT32, arena);
+ return (int32_t*)_upb_array_resize_accessor2(msg, UPB_SIZE(16, 24), len, 2, arena);
}
UPB_INLINE bool validate_EnumRules_add_not_in(validate_EnumRules *msg, int32_t val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(16, 24), UPB_SIZE(4, 4), UPB_TYPE_INT32, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(16, 24), 2, &val,
arena);
}
@@ -1639,6 +1742,12 @@ UPB_INLINE validate_MessageRules *validate_MessageRules_parse(const char *buf, s
validate_MessageRules *ret = validate_MessageRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_MessageRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_MessageRules *validate_MessageRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_MessageRules *ret = validate_MessageRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_MessageRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_MessageRules_serialize(const validate_MessageRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_MessageRules_msginit, arena, len);
}
@@ -1667,6 +1776,12 @@ UPB_INLINE validate_RepeatedRules *validate_RepeatedRules_parse(const char *buf,
validate_RepeatedRules *ret = validate_RepeatedRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_RepeatedRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_RepeatedRules *validate_RepeatedRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_RepeatedRules *ret = validate_RepeatedRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_RepeatedRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_RepeatedRules_serialize(const validate_RepeatedRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_RepeatedRules_msginit, arena, len);
}
@@ -1716,6 +1831,12 @@ UPB_INLINE validate_MapRules *validate_MapRules_parse(const char *buf, size_t si
validate_MapRules *ret = validate_MapRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_MapRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_MapRules *validate_MapRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_MapRules *ret = validate_MapRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_MapRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_MapRules_serialize(const validate_MapRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_MapRules_msginit, arena, len);
}
@@ -1780,6 +1901,12 @@ UPB_INLINE validate_AnyRules *validate_AnyRules_parse(const char *buf, size_t si
validate_AnyRules *ret = validate_AnyRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_AnyRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_AnyRules *validate_AnyRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_AnyRules *ret = validate_AnyRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_AnyRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_AnyRules_serialize(const validate_AnyRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_AnyRules_msginit, arena, len);
}
@@ -1797,20 +1924,20 @@ UPB_INLINE upb_strview* validate_AnyRules_mutable_in(validate_AnyRules *msg, siz
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE upb_strview* validate_AnyRules_resize_in(validate_AnyRules *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(4, 8), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool validate_AnyRules_add_in(validate_AnyRules *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(4, 8), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(3, 4), &val,
arena);
}
UPB_INLINE upb_strview* validate_AnyRules_mutable_not_in(validate_AnyRules *msg, size_t *len) {
return (upb_strview*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 16), len);
}
UPB_INLINE upb_strview* validate_AnyRules_resize_not_in(validate_AnyRules *msg, size_t len, upb_arena *arena) {
- return (upb_strview*)_upb_array_resize_accessor(msg, UPB_SIZE(8, 16), len, UPB_TYPE_STRING, arena);
+ return (upb_strview*)_upb_array_resize_accessor2(msg, UPB_SIZE(8, 16), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool validate_AnyRules_add_not_in(validate_AnyRules *msg, upb_strview val, upb_arena *arena) {
- return _upb_array_append_accessor(msg, UPB_SIZE(8, 16), UPB_SIZE(8, 16), UPB_TYPE_STRING, &val,
+ return _upb_array_append_accessor2(msg, UPB_SIZE(8, 16), UPB_SIZE(3, 4), &val,
arena);
}
@@ -1824,6 +1951,12 @@ UPB_INLINE validate_DurationRules *validate_DurationRules_parse(const char *buf,
validate_DurationRules *ret = validate_DurationRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_DurationRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_DurationRules *validate_DurationRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_DurationRules *ret = validate_DurationRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_DurationRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_DurationRules_serialize(const validate_DurationRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_DurationRules_msginit, arena, len);
}
@@ -1918,12 +2051,12 @@ UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_mutable_in(v
return (struct google_protobuf_Duration**)_upb_array_mutable_accessor(msg, UPB_SIZE(24, 48), len);
}
UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_resize_in(validate_DurationRules *msg, size_t len, upb_arena *arena) {
- return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(24, 48), len, UPB_TYPE_MESSAGE, arena);
+ return (struct google_protobuf_Duration**)_upb_array_resize_accessor2(msg, UPB_SIZE(24, 48), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_in(validate_DurationRules *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(24, 48), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(24, 48), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1931,12 +2064,12 @@ UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_mutable_not_
return (struct google_protobuf_Duration**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
}
UPB_INLINE struct google_protobuf_Duration** validate_DurationRules_resize_not_in(validate_DurationRules *msg, size_t len, upb_arena *arena) {
- return (struct google_protobuf_Duration**)_upb_array_resize_accessor(msg, UPB_SIZE(28, 56), len, UPB_TYPE_MESSAGE, arena);
+ return (struct google_protobuf_Duration**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct google_protobuf_Duration* validate_DurationRules_add_not_in(validate_DurationRules *msg, upb_arena *arena) {
struct google_protobuf_Duration* sub = (struct google_protobuf_Duration*)_upb_msg_new(&google_protobuf_Duration_msginit, arena);
- bool ok = _upb_array_append_accessor(
- msg, UPB_SIZE(28, 56), UPB_SIZE(4, 8), UPB_TYPE_MESSAGE, &sub, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
if (!ok) return NULL;
return sub;
}
@@ -1951,25 +2084,31 @@ UPB_INLINE validate_TimestampRules *validate_TimestampRules_parse(const char *bu
validate_TimestampRules *ret = validate_TimestampRules_new(arena);
return (ret && upb_decode(buf, size, ret, &validate_TimestampRules_msginit, arena)) ? ret : NULL;
}
+UPB_INLINE validate_TimestampRules *validate_TimestampRules_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ validate_TimestampRules *ret = validate_TimestampRules_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &validate_TimestampRules_msginit, arena, options))
+ ? ret : NULL;
+}
UPB_INLINE char *validate_TimestampRules_serialize(const validate_TimestampRules *msg, upb_arena *arena, size_t *len) {
return upb_encode(msg, &validate_TimestampRules_msginit, arena, len);
}
UPB_INLINE bool validate_TimestampRules_has_required(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 1); }
UPB_INLINE bool validate_TimestampRules_required(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool); }
-UPB_INLINE bool validate_TimestampRules_has_const(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 4); }
+UPB_INLINE bool validate_TimestampRules_has_const(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 2); }
UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_const(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct google_protobuf_Timestamp*); }
-UPB_INLINE bool validate_TimestampRules_has_lt(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 5); }
+UPB_INLINE bool validate_TimestampRules_has_lt(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 3); }
UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lt(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct google_protobuf_Timestamp*); }
-UPB_INLINE bool validate_TimestampRules_has_lte(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 6); }
+UPB_INLINE bool validate_TimestampRules_has_lte(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 4); }
UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_lte(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 24), const struct google_protobuf_Timestamp*); }
-UPB_INLINE bool validate_TimestampRules_has_gt(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 7); }
+UPB_INLINE bool validate_TimestampRules_has_gt(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 5); }
UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gt(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 32), const struct google_protobuf_Timestamp*); }
-UPB_INLINE bool validate_TimestampRules_has_gte(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 8); }
+UPB_INLINE bool validate_TimestampRules_has_gte(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 6); }
UPB_INLINE const struct google_protobuf_Timestamp* validate_TimestampRules_gte(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_Timestamp*); }
-UPB_INLINE bool validate_TimestampRules_has_lt_now(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE bool validate_TimestampRules_has_lt_now(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 7); }
UPB_INLINE bool validate_TimestampRules_lt_now(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool); }
-UPB_INLINE bool validate_TimestampRules_has_gt_now(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 3); }
+UPB_INLINE bool validate_TimestampRules_has_gt_now(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 8); }
UPB_INLINE bool validate_TimestampRules_gt_now(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE bool validate_TimestampRules_has_within(const validate_TimestampRules *msg) { return _upb_hasbit(msg, 9); }
UPB_INLINE const struct google_protobuf_Duration* validate_TimestampRules_within(const validate_TimestampRules *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct google_protobuf_Duration*); }
@@ -1979,7 +2118,7 @@ UPB_INLINE void validate_TimestampRules_set_required(validate_TimestampRules *ms
*UPB_PTR_AT(msg, UPB_SIZE(2, 2), bool) = value;
}
UPB_INLINE void validate_TimestampRules_set_const(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) {
- _upb_sethas(msg, 4);
+ _upb_sethas(msg, 2);
*UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_const(validate_TimestampRules *msg, upb_arena *arena) {
@@ -1992,7 +2131,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_con
return sub;
}
UPB_INLINE void validate_TimestampRules_set_lt(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) {
- _upb_sethas(msg, 5);
+ _upb_sethas(msg, 3);
*UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lt(validate_TimestampRules *msg, upb_arena *arena) {
@@ -2005,7 +2144,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lt(
return sub;
}
UPB_INLINE void validate_TimestampRules_set_lte(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) {
- _upb_sethas(msg, 6);
+ _upb_sethas(msg, 4);
*UPB_PTR_AT(msg, UPB_SIZE(16, 24), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lte(validate_TimestampRules *msg, upb_arena *arena) {
@@ -2018,7 +2157,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_lte
return sub;
}
UPB_INLINE void validate_TimestampRules_set_gt(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) {
- _upb_sethas(msg, 7);
+ _upb_sethas(msg, 5);
*UPB_PTR_AT(msg, UPB_SIZE(20, 32), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gt(validate_TimestampRules *msg, upb_arena *arena) {
@@ -2031,7 +2170,7 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gt(
return sub;
}
UPB_INLINE void validate_TimestampRules_set_gte(validate_TimestampRules *msg, struct google_protobuf_Timestamp* value) {
- _upb_sethas(msg, 8);
+ _upb_sethas(msg, 6);
*UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gte(validate_TimestampRules *msg, upb_arena *arena) {
@@ -2044,11 +2183,11 @@ UPB_INLINE struct google_protobuf_Timestamp* validate_TimestampRules_mutable_gte
return sub;
}
UPB_INLINE void validate_TimestampRules_set_lt_now(validate_TimestampRules *msg, bool value) {
- _upb_sethas(msg, 2);
+ _upb_sethas(msg, 7);
*UPB_PTR_AT(msg, UPB_SIZE(3, 3), bool) = value;
}
UPB_INLINE void validate_TimestampRules_set_gt_now(validate_TimestampRules *msg, bool value) {
- _upb_sethas(msg, 3);
+ _upb_sethas(msg, 8);
*UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
UPB_INLINE void validate_TimestampRules_set_within(validate_TimestampRules *msg, struct google_protobuf_Duration* value) {
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.c
index d93320d88c3..6c6da7d75b7 100644
--- a/contrib/libs/grpc/src/core/ext/upb-generated/udpa/core/v1/authority.upb.c
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.c
@@ -1,27 +1,27 @@
/* This file was generated by upbc (the upb compiler) from the input
* file:
*
- * udpa/core/v1/authority.proto
+ * xds/core/v3/authority.proto
*
* Do not edit -- your changes will be discarded when the file is
* regenerated. */
#include <stddef.h>
#include "upb/msg.h"
-#include "udpa/core/v1/authority.upb.h"
+#include "xds/core/v3/authority.upb.h"
#include "udpa/annotations/status.upb.h"
#include "validate/validate.upb.h"
#include "upb/port_def.inc"
-static const upb_msglayout_field udpa_core_v1_Authority__fields[1] = {
+static const upb_msglayout_field xds_core_v3_Authority__fields[1] = {
{1, UPB_SIZE(0, 0), 0, 0, 9, 1},
};
-const upb_msglayout udpa_core_v1_Authority_msginit = {
+const upb_msglayout xds_core_v3_Authority_msginit = {
NULL,
- &udpa_core_v1_Authority__fields[0],
- UPB_SIZE(8, 16), 1, false,
+ &xds_core_v3_Authority__fields[0],
+ UPB_SIZE(8, 16), 1, false, 255,
};
#include "upb/port_undef.inc"
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.h
new file mode 100644
index 00000000000..2f1ff445416
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/authority.upb.h
@@ -0,0 +1,60 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/authority.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_AUTHORITY_PROTO_UPB_H_
+#define XDS_CORE_V3_AUTHORITY_PROTO_UPB_H_
+
+#include "upb/msg.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 xds_core_v3_Authority;
+typedef struct xds_core_v3_Authority xds_core_v3_Authority;
+extern const upb_msglayout xds_core_v3_Authority_msginit;
+
+
+/* xds.core.v3.Authority */
+
+UPB_INLINE xds_core_v3_Authority *xds_core_v3_Authority_new(upb_arena *arena) {
+ return (xds_core_v3_Authority *)_upb_msg_new(&xds_core_v3_Authority_msginit, arena);
+}
+UPB_INLINE xds_core_v3_Authority *xds_core_v3_Authority_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_Authority *ret = xds_core_v3_Authority_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_Authority_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_Authority *xds_core_v3_Authority_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_Authority *ret = xds_core_v3_Authority_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_Authority_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_Authority_serialize(const xds_core_v3_Authority *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_Authority_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview xds_core_v3_Authority_name(const xds_core_v3_Authority *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview); }
+
+UPB_INLINE void xds_core_v3_Authority_set_name(xds_core_v3_Authority *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_strview) = value;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_AUTHORITY_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c
new file mode 100644
index 00000000000..20cc2970982
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c
@@ -0,0 +1,52 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/collection_entry.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "xds/core/v3/collection_entry.upb.h"
+#include "google/protobuf/any.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "xds/core/v3/resource_locator.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const xds_core_v3_CollectionEntry_submsgs[2] = {
+ &xds_core_v3_CollectionEntry_InlineEntry_msginit,
+ &xds_core_v3_ResourceLocator_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_CollectionEntry__fields[2] = {
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 1, 11, 1},
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-5, -9), 0, 11, 1},
+};
+
+const upb_msglayout xds_core_v3_CollectionEntry_msginit = {
+ &xds_core_v3_CollectionEntry_submsgs[0],
+ &xds_core_v3_CollectionEntry__fields[0],
+ UPB_SIZE(8, 16), 2, false, 255,
+};
+
+static const upb_msglayout *const xds_core_v3_CollectionEntry_InlineEntry_submsgs[1] = {
+ &google_protobuf_Any_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_CollectionEntry_InlineEntry__fields[3] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(20, 40), 1, 0, 11, 1},
+};
+
+const upb_msglayout xds_core_v3_CollectionEntry_InlineEntry_msginit = {
+ &xds_core_v3_CollectionEntry_InlineEntry_submsgs[0],
+ &xds_core_v3_CollectionEntry_InlineEntry__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h
new file mode 100644
index 00000000000..983a3455c8f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h
@@ -0,0 +1,143 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/collection_entry.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_COLLECTION_ENTRY_PROTO_UPB_H_
+#define XDS_CORE_V3_COLLECTION_ENTRY_PROTO_UPB_H_
+
+#include "upb/msg.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 xds_core_v3_CollectionEntry;
+struct xds_core_v3_CollectionEntry_InlineEntry;
+typedef struct xds_core_v3_CollectionEntry xds_core_v3_CollectionEntry;
+typedef struct xds_core_v3_CollectionEntry_InlineEntry xds_core_v3_CollectionEntry_InlineEntry;
+extern const upb_msglayout xds_core_v3_CollectionEntry_msginit;
+extern const upb_msglayout xds_core_v3_CollectionEntry_InlineEntry_msginit;
+struct google_protobuf_Any;
+struct xds_core_v3_ResourceLocator;
+extern const upb_msglayout google_protobuf_Any_msginit;
+extern const upb_msglayout xds_core_v3_ResourceLocator_msginit;
+
+
+/* xds.core.v3.CollectionEntry */
+
+UPB_INLINE xds_core_v3_CollectionEntry *xds_core_v3_CollectionEntry_new(upb_arena *arena) {
+ return (xds_core_v3_CollectionEntry *)_upb_msg_new(&xds_core_v3_CollectionEntry_msginit, arena);
+}
+UPB_INLINE xds_core_v3_CollectionEntry *xds_core_v3_CollectionEntry_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_CollectionEntry *ret = xds_core_v3_CollectionEntry_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_CollectionEntry_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_CollectionEntry *xds_core_v3_CollectionEntry_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_CollectionEntry *ret = xds_core_v3_CollectionEntry_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_CollectionEntry_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_CollectionEntry_serialize(const xds_core_v3_CollectionEntry *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_CollectionEntry_msginit, arena, len);
+}
+
+typedef enum {
+ xds_core_v3_CollectionEntry_resource_specifier_locator = 1,
+ xds_core_v3_CollectionEntry_resource_specifier_inline_entry = 2,
+ xds_core_v3_CollectionEntry_resource_specifier_NOT_SET = 0
+} xds_core_v3_CollectionEntry_resource_specifier_oneofcases;
+UPB_INLINE xds_core_v3_CollectionEntry_resource_specifier_oneofcases xds_core_v3_CollectionEntry_resource_specifier_case(const xds_core_v3_CollectionEntry* msg) { return (xds_core_v3_CollectionEntry_resource_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }
+
+UPB_INLINE bool xds_core_v3_CollectionEntry_has_locator(const xds_core_v3_CollectionEntry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 1; }
+UPB_INLINE const struct xds_core_v3_ResourceLocator* xds_core_v3_CollectionEntry_locator(const xds_core_v3_CollectionEntry *msg) { return UPB_READ_ONEOF(msg, const struct xds_core_v3_ResourceLocator*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 1, NULL); }
+UPB_INLINE bool xds_core_v3_CollectionEntry_has_inline_entry(const xds_core_v3_CollectionEntry *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
+UPB_INLINE const xds_core_v3_CollectionEntry_InlineEntry* xds_core_v3_CollectionEntry_inline_entry(const xds_core_v3_CollectionEntry *msg) { return UPB_READ_ONEOF(msg, const xds_core_v3_CollectionEntry_InlineEntry*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
+
+UPB_INLINE void xds_core_v3_CollectionEntry_set_locator(xds_core_v3_CollectionEntry *msg, struct xds_core_v3_ResourceLocator* value) {
+ UPB_WRITE_ONEOF(msg, struct xds_core_v3_ResourceLocator*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 1);
+}
+UPB_INLINE struct xds_core_v3_ResourceLocator* xds_core_v3_CollectionEntry_mutable_locator(xds_core_v3_CollectionEntry *msg, upb_arena *arena) {
+ struct xds_core_v3_ResourceLocator* sub = (struct xds_core_v3_ResourceLocator*)xds_core_v3_CollectionEntry_locator(msg);
+ if (sub == NULL) {
+ sub = (struct xds_core_v3_ResourceLocator*)_upb_msg_new(&xds_core_v3_ResourceLocator_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_CollectionEntry_set_locator(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void xds_core_v3_CollectionEntry_set_inline_entry(xds_core_v3_CollectionEntry *msg, xds_core_v3_CollectionEntry_InlineEntry* value) {
+ UPB_WRITE_ONEOF(msg, xds_core_v3_CollectionEntry_InlineEntry*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
+}
+UPB_INLINE struct xds_core_v3_CollectionEntry_InlineEntry* xds_core_v3_CollectionEntry_mutable_inline_entry(xds_core_v3_CollectionEntry *msg, upb_arena *arena) {
+ struct xds_core_v3_CollectionEntry_InlineEntry* sub = (struct xds_core_v3_CollectionEntry_InlineEntry*)xds_core_v3_CollectionEntry_inline_entry(msg);
+ if (sub == NULL) {
+ sub = (struct xds_core_v3_CollectionEntry_InlineEntry*)_upb_msg_new(&xds_core_v3_CollectionEntry_InlineEntry_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_CollectionEntry_set_inline_entry(msg, sub);
+ }
+ return sub;
+}
+
+/* xds.core.v3.CollectionEntry.InlineEntry */
+
+UPB_INLINE xds_core_v3_CollectionEntry_InlineEntry *xds_core_v3_CollectionEntry_InlineEntry_new(upb_arena *arena) {
+ return (xds_core_v3_CollectionEntry_InlineEntry *)_upb_msg_new(&xds_core_v3_CollectionEntry_InlineEntry_msginit, arena);
+}
+UPB_INLINE xds_core_v3_CollectionEntry_InlineEntry *xds_core_v3_CollectionEntry_InlineEntry_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_CollectionEntry_InlineEntry *ret = xds_core_v3_CollectionEntry_InlineEntry_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_CollectionEntry_InlineEntry_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_CollectionEntry_InlineEntry *xds_core_v3_CollectionEntry_InlineEntry_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_CollectionEntry_InlineEntry *ret = xds_core_v3_CollectionEntry_InlineEntry_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_CollectionEntry_InlineEntry_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_CollectionEntry_InlineEntry_serialize(const xds_core_v3_CollectionEntry_InlineEntry *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_CollectionEntry_InlineEntry_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview xds_core_v3_CollectionEntry_InlineEntry_name(const xds_core_v3_CollectionEntry_InlineEntry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview xds_core_v3_CollectionEntry_InlineEntry_version(const xds_core_v3_CollectionEntry_InlineEntry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE bool xds_core_v3_CollectionEntry_InlineEntry_has_resource(const xds_core_v3_CollectionEntry_InlineEntry *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct google_protobuf_Any* xds_core_v3_CollectionEntry_InlineEntry_resource(const xds_core_v3_CollectionEntry_InlineEntry *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), const struct google_protobuf_Any*); }
+
+UPB_INLINE void xds_core_v3_CollectionEntry_InlineEntry_set_name(xds_core_v3_CollectionEntry_InlineEntry *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_CollectionEntry_InlineEntry_set_version(xds_core_v3_CollectionEntry_InlineEntry *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_CollectionEntry_InlineEntry_set_resource(xds_core_v3_CollectionEntry_InlineEntry *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* xds_core_v3_CollectionEntry_InlineEntry_mutable_resource(xds_core_v3_CollectionEntry_InlineEntry *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)xds_core_v3_CollectionEntry_InlineEntry_resource(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_CollectionEntry_InlineEntry_set_resource(msg, sub);
+ }
+ return sub;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_COLLECTION_ENTRY_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c
new file mode 100644
index 00000000000..17c3c61cda9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c
@@ -0,0 +1,42 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/context_params.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "xds/core/v3/context_params.upb.h"
+#include "udpa/annotations/status.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const xds_core_v3_ContextParams_submsgs[1] = {
+ &xds_core_v3_ContextParams_ParamsEntry_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_ContextParams__fields[1] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 11, _UPB_LABEL_MAP},
+};
+
+const upb_msglayout xds_core_v3_ContextParams_msginit = {
+ &xds_core_v3_ContextParams_submsgs[0],
+ &xds_core_v3_ContextParams__fields[0],
+ UPB_SIZE(8, 8), 1, false, 255,
+};
+
+static const upb_msglayout_field xds_core_v3_ContextParams_ParamsEntry__fields[2] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 9, 1},
+ {2, UPB_SIZE(8, 16), 0, 0, 9, 1},
+};
+
+const upb_msglayout xds_core_v3_ContextParams_ParamsEntry_msginit = {
+ NULL,
+ &xds_core_v3_ContextParams_ParamsEntry__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h
new file mode 100644
index 00000000000..0bcd2425962
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h
@@ -0,0 +1,84 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/context_params.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_CONTEXT_PARAMS_PROTO_UPB_H_
+#define XDS_CORE_V3_CONTEXT_PARAMS_PROTO_UPB_H_
+
+#include "upb/msg.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 xds_core_v3_ContextParams;
+struct xds_core_v3_ContextParams_ParamsEntry;
+typedef struct xds_core_v3_ContextParams xds_core_v3_ContextParams;
+typedef struct xds_core_v3_ContextParams_ParamsEntry xds_core_v3_ContextParams_ParamsEntry;
+extern const upb_msglayout xds_core_v3_ContextParams_msginit;
+extern const upb_msglayout xds_core_v3_ContextParams_ParamsEntry_msginit;
+
+
+/* xds.core.v3.ContextParams */
+
+UPB_INLINE xds_core_v3_ContextParams *xds_core_v3_ContextParams_new(upb_arena *arena) {
+ return (xds_core_v3_ContextParams *)_upb_msg_new(&xds_core_v3_ContextParams_msginit, arena);
+}
+UPB_INLINE xds_core_v3_ContextParams *xds_core_v3_ContextParams_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_ContextParams *ret = xds_core_v3_ContextParams_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_ContextParams_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_ContextParams *xds_core_v3_ContextParams_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_ContextParams *ret = xds_core_v3_ContextParams_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_ContextParams_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_ContextParams_serialize(const xds_core_v3_ContextParams *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_ContextParams_msginit, arena, len);
+}
+
+UPB_INLINE bool xds_core_v3_ContextParams_has_params(const xds_core_v3_ContextParams *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE size_t xds_core_v3_ContextParams_params_size(const xds_core_v3_ContextParams *msg) {return _upb_msg_map_size(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE bool xds_core_v3_ContextParams_params_get(const xds_core_v3_ContextParams *msg, upb_strview key, upb_strview *val) { return _upb_msg_map_get(msg, UPB_SIZE(0, 0), &key, 0, val, 0); }
+UPB_INLINE const xds_core_v3_ContextParams_ParamsEntry* xds_core_v3_ContextParams_params_next(const xds_core_v3_ContextParams *msg, size_t* iter) { return (const xds_core_v3_ContextParams_ParamsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
+
+UPB_INLINE void xds_core_v3_ContextParams_params_clear(xds_core_v3_ContextParams *msg) { _upb_msg_map_clear(msg, UPB_SIZE(0, 0)); }
+UPB_INLINE bool xds_core_v3_ContextParams_params_set(xds_core_v3_ContextParams *msg, upb_strview key, upb_strview val, upb_arena *a) { return _upb_msg_map_set(msg, UPB_SIZE(0, 0), &key, 0, &val, 0, a); }
+UPB_INLINE bool xds_core_v3_ContextParams_params_delete(xds_core_v3_ContextParams *msg, upb_strview key) { return _upb_msg_map_delete(msg, UPB_SIZE(0, 0), &key, 0); }
+UPB_INLINE xds_core_v3_ContextParams_ParamsEntry* xds_core_v3_ContextParams_params_nextmutable(xds_core_v3_ContextParams *msg, size_t* iter) { return (xds_core_v3_ContextParams_ParamsEntry*)_upb_msg_map_next(msg, UPB_SIZE(0, 0), iter); }
+
+/* xds.core.v3.ContextParams.ParamsEntry */
+
+UPB_INLINE upb_strview xds_core_v3_ContextParams_ParamsEntry_key(const xds_core_v3_ContextParams_ParamsEntry *msg) {
+ upb_strview ret;
+ _upb_msg_map_key(msg, &ret, 0);
+ return ret;
+}
+UPB_INLINE upb_strview xds_core_v3_ContextParams_ParamsEntry_value(const xds_core_v3_ContextParams_ParamsEntry *msg) {
+ upb_strview ret;
+ _upb_msg_map_value(msg, &ret, 0);
+ return ret;
+}
+
+UPB_INLINE void xds_core_v3_ContextParams_ParamsEntry_set_value(xds_core_v3_ContextParams_ParamsEntry *msg, upb_strview value) {
+ _upb_msg_map_set_value(msg, &value, 0);
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_CONTEXT_PARAMS_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.c
new file mode 100644
index 00000000000..fa2375e98ee
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.c
@@ -0,0 +1,36 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "xds/core/v3/resource.upb.h"
+#include "google/protobuf/any.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "xds/core/v3/resource_name.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const xds_core_v3_Resource_submsgs[2] = {
+ &google_protobuf_Any_msginit,
+ &xds_core_v3_ResourceName_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_Resource__fields[3] = {
+ {1, UPB_SIZE(12, 24), 1, 1, 11, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(16, 32), 2, 0, 11, 1},
+};
+
+const upb_msglayout xds_core_v3_Resource_msginit = {
+ &xds_core_v3_Resource_submsgs[0],
+ &xds_core_v3_Resource__fields[0],
+ UPB_SIZE(24, 48), 3, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.h
new file mode 100644
index 00000000000..ab8e2df41b6
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource.upb.h
@@ -0,0 +1,94 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_RESOURCE_PROTO_UPB_H_
+#define XDS_CORE_V3_RESOURCE_PROTO_UPB_H_
+
+#include "upb/msg.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 xds_core_v3_Resource;
+typedef struct xds_core_v3_Resource xds_core_v3_Resource;
+extern const upb_msglayout xds_core_v3_Resource_msginit;
+struct google_protobuf_Any;
+struct xds_core_v3_ResourceName;
+extern const upb_msglayout google_protobuf_Any_msginit;
+extern const upb_msglayout xds_core_v3_ResourceName_msginit;
+
+
+/* xds.core.v3.Resource */
+
+UPB_INLINE xds_core_v3_Resource *xds_core_v3_Resource_new(upb_arena *arena) {
+ return (xds_core_v3_Resource *)_upb_msg_new(&xds_core_v3_Resource_msginit, arena);
+}
+UPB_INLINE xds_core_v3_Resource *xds_core_v3_Resource_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_Resource *ret = xds_core_v3_Resource_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_Resource_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_Resource *xds_core_v3_Resource_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_Resource *ret = xds_core_v3_Resource_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_Resource_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_Resource_serialize(const xds_core_v3_Resource *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_Resource_msginit, arena, len);
+}
+
+UPB_INLINE bool xds_core_v3_Resource_has_name(const xds_core_v3_Resource *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct xds_core_v3_ResourceName* xds_core_v3_Resource_name(const xds_core_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct xds_core_v3_ResourceName*); }
+UPB_INLINE upb_strview xds_core_v3_Resource_version(const xds_core_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE bool xds_core_v3_Resource_has_resource(const xds_core_v3_Resource *msg) { return _upb_hasbit(msg, 2); }
+UPB_INLINE const struct google_protobuf_Any* xds_core_v3_Resource_resource(const xds_core_v3_Resource *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct google_protobuf_Any*); }
+
+UPB_INLINE void xds_core_v3_Resource_set_name(xds_core_v3_Resource *msg, struct xds_core_v3_ResourceName* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct xds_core_v3_ResourceName*) = value;
+}
+UPB_INLINE struct xds_core_v3_ResourceName* xds_core_v3_Resource_mutable_name(xds_core_v3_Resource *msg, upb_arena *arena) {
+ struct xds_core_v3_ResourceName* sub = (struct xds_core_v3_ResourceName*)xds_core_v3_Resource_name(msg);
+ if (sub == NULL) {
+ sub = (struct xds_core_v3_ResourceName*)_upb_msg_new(&xds_core_v3_ResourceName_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_Resource_set_name(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void xds_core_v3_Resource_set_version(xds_core_v3_Resource *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_Resource_set_resource(xds_core_v3_Resource *msg, struct google_protobuf_Any* value) {
+ _upb_sethas(msg, 2);
+ *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct google_protobuf_Any*) = value;
+}
+UPB_INLINE struct google_protobuf_Any* xds_core_v3_Resource_mutable_resource(xds_core_v3_Resource *msg, upb_arena *arena) {
+ struct google_protobuf_Any* sub = (struct google_protobuf_Any*)xds_core_v3_Resource_resource(msg);
+ if (sub == NULL) {
+ sub = (struct google_protobuf_Any*)_upb_msg_new(&google_protobuf_Any_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_Resource_set_resource(msg, sub);
+ }
+ return sub;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_RESOURCE_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c
new file mode 100644
index 00000000000..2bd099a5e4c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c
@@ -0,0 +1,54 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_locator.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "xds/core/v3/resource_locator.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "xds/core/v3/context_params.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const xds_core_v3_ResourceLocator_submsgs[2] = {
+ &xds_core_v3_ContextParams_msginit,
+ &xds_core_v3_ResourceLocator_Directive_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_ResourceLocator__fields[6] = {
+ {1, UPB_SIZE(0, 0), 0, 0, 14, 1},
+ {2, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {3, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {4, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {5, UPB_SIZE(32, 64), UPB_SIZE(-37, -73), 0, 11, 1},
+ {6, UPB_SIZE(28, 56), 0, 1, 11, 3},
+};
+
+const upb_msglayout xds_core_v3_ResourceLocator_msginit = {
+ &xds_core_v3_ResourceLocator_submsgs[0],
+ &xds_core_v3_ResourceLocator__fields[0],
+ UPB_SIZE(40, 80), 6, false, 255,
+};
+
+static const upb_msglayout *const xds_core_v3_ResourceLocator_Directive_submsgs[1] = {
+ &xds_core_v3_ResourceLocator_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_ResourceLocator_Directive__fields[2] = {
+ {1, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 11, 1},
+ {2, UPB_SIZE(0, 0), UPB_SIZE(-9, -17), 0, 9, 1},
+};
+
+const upb_msglayout xds_core_v3_ResourceLocator_Directive_msginit = {
+ &xds_core_v3_ResourceLocator_Directive_submsgs[0],
+ &xds_core_v3_ResourceLocator_Directive__fields[0],
+ UPB_SIZE(16, 32), 2, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h
new file mode 100644
index 00000000000..da7442bd179
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h
@@ -0,0 +1,166 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_locator.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_RESOURCE_LOCATOR_PROTO_UPB_H_
+#define XDS_CORE_V3_RESOURCE_LOCATOR_PROTO_UPB_H_
+
+#include "upb/msg.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 xds_core_v3_ResourceLocator;
+struct xds_core_v3_ResourceLocator_Directive;
+typedef struct xds_core_v3_ResourceLocator xds_core_v3_ResourceLocator;
+typedef struct xds_core_v3_ResourceLocator_Directive xds_core_v3_ResourceLocator_Directive;
+extern const upb_msglayout xds_core_v3_ResourceLocator_msginit;
+extern const upb_msglayout xds_core_v3_ResourceLocator_Directive_msginit;
+struct xds_core_v3_ContextParams;
+extern const upb_msglayout xds_core_v3_ContextParams_msginit;
+
+typedef enum {
+ xds_core_v3_ResourceLocator_XDSTP = 0,
+ xds_core_v3_ResourceLocator_HTTP = 1,
+ xds_core_v3_ResourceLocator_FILE = 2
+} xds_core_v3_ResourceLocator_Scheme;
+
+
+/* xds.core.v3.ResourceLocator */
+
+UPB_INLINE xds_core_v3_ResourceLocator *xds_core_v3_ResourceLocator_new(upb_arena *arena) {
+ return (xds_core_v3_ResourceLocator *)_upb_msg_new(&xds_core_v3_ResourceLocator_msginit, arena);
+}
+UPB_INLINE xds_core_v3_ResourceLocator *xds_core_v3_ResourceLocator_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_ResourceLocator *ret = xds_core_v3_ResourceLocator_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_ResourceLocator_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_ResourceLocator *xds_core_v3_ResourceLocator_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_ResourceLocator *ret = xds_core_v3_ResourceLocator_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_ResourceLocator_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_ResourceLocator_serialize(const xds_core_v3_ResourceLocator *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_ResourceLocator_msginit, arena, len);
+}
+
+typedef enum {
+ xds_core_v3_ResourceLocator_context_param_specifier_exact_context = 5,
+ xds_core_v3_ResourceLocator_context_param_specifier_NOT_SET = 0
+} xds_core_v3_ResourceLocator_context_param_specifier_oneofcases;
+UPB_INLINE xds_core_v3_ResourceLocator_context_param_specifier_oneofcases xds_core_v3_ResourceLocator_context_param_specifier_case(const xds_core_v3_ResourceLocator* msg) { return (xds_core_v3_ResourceLocator_context_param_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(36, 72), int32_t); }
+
+UPB_INLINE int32_t xds_core_v3_ResourceLocator_scheme(const xds_core_v3_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }
+UPB_INLINE upb_strview xds_core_v3_ResourceLocator_id(const xds_core_v3_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview xds_core_v3_ResourceLocator_authority(const xds_core_v3_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview xds_core_v3_ResourceLocator_resource_type(const xds_core_v3_ResourceLocator *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool xds_core_v3_ResourceLocator_has_exact_context(const xds_core_v3_ResourceLocator *msg) { return _upb_getoneofcase(msg, UPB_SIZE(36, 72)) == 5; }
+UPB_INLINE const struct xds_core_v3_ContextParams* xds_core_v3_ResourceLocator_exact_context(const xds_core_v3_ResourceLocator *msg) { return UPB_READ_ONEOF(msg, const struct xds_core_v3_ContextParams*, UPB_SIZE(32, 64), UPB_SIZE(36, 72), 5, NULL); }
+UPB_INLINE bool xds_core_v3_ResourceLocator_has_directives(const xds_core_v3_ResourceLocator *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(28, 56)); }
+UPB_INLINE const xds_core_v3_ResourceLocator_Directive* const* xds_core_v3_ResourceLocator_directives(const xds_core_v3_ResourceLocator *msg, size_t *len) { return (const xds_core_v3_ResourceLocator_Directive* const*)_upb_array_accessor(msg, UPB_SIZE(28, 56), len); }
+
+UPB_INLINE void xds_core_v3_ResourceLocator_set_scheme(xds_core_v3_ResourceLocator *msg, int32_t value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceLocator_set_id(xds_core_v3_ResourceLocator *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceLocator_set_authority(xds_core_v3_ResourceLocator *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceLocator_set_resource_type(xds_core_v3_ResourceLocator *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceLocator_set_exact_context(xds_core_v3_ResourceLocator *msg, struct xds_core_v3_ContextParams* value) {
+ UPB_WRITE_ONEOF(msg, struct xds_core_v3_ContextParams*, UPB_SIZE(32, 64), value, UPB_SIZE(36, 72), 5);
+}
+UPB_INLINE struct xds_core_v3_ContextParams* xds_core_v3_ResourceLocator_mutable_exact_context(xds_core_v3_ResourceLocator *msg, upb_arena *arena) {
+ struct xds_core_v3_ContextParams* sub = (struct xds_core_v3_ContextParams*)xds_core_v3_ResourceLocator_exact_context(msg);
+ if (sub == NULL) {
+ sub = (struct xds_core_v3_ContextParams*)_upb_msg_new(&xds_core_v3_ContextParams_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_ResourceLocator_set_exact_context(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE xds_core_v3_ResourceLocator_Directive** xds_core_v3_ResourceLocator_mutable_directives(xds_core_v3_ResourceLocator *msg, size_t *len) {
+ return (xds_core_v3_ResourceLocator_Directive**)_upb_array_mutable_accessor(msg, UPB_SIZE(28, 56), len);
+}
+UPB_INLINE xds_core_v3_ResourceLocator_Directive** xds_core_v3_ResourceLocator_resize_directives(xds_core_v3_ResourceLocator *msg, size_t len, upb_arena *arena) {
+ return (xds_core_v3_ResourceLocator_Directive**)_upb_array_resize_accessor2(msg, UPB_SIZE(28, 56), len, UPB_SIZE(2, 3), arena);
+}
+UPB_INLINE struct xds_core_v3_ResourceLocator_Directive* xds_core_v3_ResourceLocator_add_directives(xds_core_v3_ResourceLocator *msg, upb_arena *arena) {
+ struct xds_core_v3_ResourceLocator_Directive* sub = (struct xds_core_v3_ResourceLocator_Directive*)_upb_msg_new(&xds_core_v3_ResourceLocator_Directive_msginit, arena);
+ bool ok = _upb_array_append_accessor2(
+ msg, UPB_SIZE(28, 56), UPB_SIZE(2, 3), &sub, arena);
+ if (!ok) return NULL;
+ return sub;
+}
+
+/* xds.core.v3.ResourceLocator.Directive */
+
+UPB_INLINE xds_core_v3_ResourceLocator_Directive *xds_core_v3_ResourceLocator_Directive_new(upb_arena *arena) {
+ return (xds_core_v3_ResourceLocator_Directive *)_upb_msg_new(&xds_core_v3_ResourceLocator_Directive_msginit, arena);
+}
+UPB_INLINE xds_core_v3_ResourceLocator_Directive *xds_core_v3_ResourceLocator_Directive_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_ResourceLocator_Directive *ret = xds_core_v3_ResourceLocator_Directive_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_ResourceLocator_Directive_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_ResourceLocator_Directive *xds_core_v3_ResourceLocator_Directive_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_ResourceLocator_Directive *ret = xds_core_v3_ResourceLocator_Directive_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_ResourceLocator_Directive_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_ResourceLocator_Directive_serialize(const xds_core_v3_ResourceLocator_Directive *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_ResourceLocator_Directive_msginit, arena, len);
+}
+
+typedef enum {
+ xds_core_v3_ResourceLocator_Directive_directive_alt = 1,
+ xds_core_v3_ResourceLocator_Directive_directive_entry = 2,
+ xds_core_v3_ResourceLocator_Directive_directive_NOT_SET = 0
+} xds_core_v3_ResourceLocator_Directive_directive_oneofcases;
+UPB_INLINE xds_core_v3_ResourceLocator_Directive_directive_oneofcases xds_core_v3_ResourceLocator_Directive_directive_case(const xds_core_v3_ResourceLocator_Directive* msg) { return (xds_core_v3_ResourceLocator_Directive_directive_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(8, 16), int32_t); }
+
+UPB_INLINE bool xds_core_v3_ResourceLocator_Directive_has_alt(const xds_core_v3_ResourceLocator_Directive *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 1; }
+UPB_INLINE const xds_core_v3_ResourceLocator* xds_core_v3_ResourceLocator_Directive_alt(const xds_core_v3_ResourceLocator_Directive *msg) { return UPB_READ_ONEOF(msg, const xds_core_v3_ResourceLocator*, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 1, NULL); }
+UPB_INLINE bool xds_core_v3_ResourceLocator_Directive_has_entry(const xds_core_v3_ResourceLocator_Directive *msg) { return _upb_getoneofcase(msg, UPB_SIZE(8, 16)) == 2; }
+UPB_INLINE upb_strview xds_core_v3_ResourceLocator_Directive_entry(const xds_core_v3_ResourceLocator_Directive *msg) { return UPB_READ_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), UPB_SIZE(8, 16), 2, upb_strview_make("", strlen(""))); }
+
+UPB_INLINE void xds_core_v3_ResourceLocator_Directive_set_alt(xds_core_v3_ResourceLocator_Directive *msg, xds_core_v3_ResourceLocator* value) {
+ UPB_WRITE_ONEOF(msg, xds_core_v3_ResourceLocator*, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 1);
+}
+UPB_INLINE struct xds_core_v3_ResourceLocator* xds_core_v3_ResourceLocator_Directive_mutable_alt(xds_core_v3_ResourceLocator_Directive *msg, upb_arena *arena) {
+ struct xds_core_v3_ResourceLocator* sub = (struct xds_core_v3_ResourceLocator*)xds_core_v3_ResourceLocator_Directive_alt(msg);
+ if (sub == NULL) {
+ sub = (struct xds_core_v3_ResourceLocator*)_upb_msg_new(&xds_core_v3_ResourceLocator_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_ResourceLocator_Directive_set_alt(msg, sub);
+ }
+ return sub;
+}
+UPB_INLINE void xds_core_v3_ResourceLocator_Directive_set_entry(xds_core_v3_ResourceLocator_Directive *msg, upb_strview value) {
+ UPB_WRITE_ONEOF(msg, upb_strview, UPB_SIZE(0, 0), value, UPB_SIZE(8, 16), 2);
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_RESOURCE_LOCATOR_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c
new file mode 100644
index 00000000000..ff645f687ff
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c
@@ -0,0 +1,36 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_name.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include <stddef.h>
+#include "upb/msg.h"
+#include "xds/core/v3/resource_name.upb.h"
+#include "udpa/annotations/status.upb.h"
+#include "xds/core/v3/context_params.upb.h"
+#include "validate/validate.upb.h"
+
+#include "upb/port_def.inc"
+
+static const upb_msglayout *const xds_core_v3_ResourceName_submsgs[1] = {
+ &xds_core_v3_ContextParams_msginit,
+};
+
+static const upb_msglayout_field xds_core_v3_ResourceName__fields[4] = {
+ {1, UPB_SIZE(4, 8), 0, 0, 9, 1},
+ {2, UPB_SIZE(12, 24), 0, 0, 9, 1},
+ {3, UPB_SIZE(20, 40), 0, 0, 9, 1},
+ {4, UPB_SIZE(28, 56), 1, 0, 11, 1},
+};
+
+const upb_msglayout xds_core_v3_ResourceName_msginit = {
+ &xds_core_v3_ResourceName_submsgs[0],
+ &xds_core_v3_ResourceName__fields[0],
+ UPB_SIZE(32, 64), 4, false, 255,
+};
+
+#include "upb/port_undef.inc"
+
diff --git a/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h
new file mode 100644
index 00000000000..3f38cc5139d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h
@@ -0,0 +1,85 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_name.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_RESOURCE_NAME_PROTO_UPB_H_
+#define XDS_CORE_V3_RESOURCE_NAME_PROTO_UPB_H_
+
+#include "upb/msg.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 xds_core_v3_ResourceName;
+typedef struct xds_core_v3_ResourceName xds_core_v3_ResourceName;
+extern const upb_msglayout xds_core_v3_ResourceName_msginit;
+struct xds_core_v3_ContextParams;
+extern const upb_msglayout xds_core_v3_ContextParams_msginit;
+
+
+/* xds.core.v3.ResourceName */
+
+UPB_INLINE xds_core_v3_ResourceName *xds_core_v3_ResourceName_new(upb_arena *arena) {
+ return (xds_core_v3_ResourceName *)_upb_msg_new(&xds_core_v3_ResourceName_msginit, arena);
+}
+UPB_INLINE xds_core_v3_ResourceName *xds_core_v3_ResourceName_parse(const char *buf, size_t size,
+ upb_arena *arena) {
+ xds_core_v3_ResourceName *ret = xds_core_v3_ResourceName_new(arena);
+ return (ret && upb_decode(buf, size, ret, &xds_core_v3_ResourceName_msginit, arena)) ? ret : NULL;
+}
+UPB_INLINE xds_core_v3_ResourceName *xds_core_v3_ResourceName_parse_ex(const char *buf, size_t size,
+ upb_arena *arena, int options) {
+ xds_core_v3_ResourceName *ret = xds_core_v3_ResourceName_new(arena);
+ return (ret && _upb_decode(buf, size, ret, &xds_core_v3_ResourceName_msginit, arena, options))
+ ? ret : NULL;
+}
+UPB_INLINE char *xds_core_v3_ResourceName_serialize(const xds_core_v3_ResourceName *msg, upb_arena *arena, size_t *len) {
+ return upb_encode(msg, &xds_core_v3_ResourceName_msginit, arena, len);
+}
+
+UPB_INLINE upb_strview xds_core_v3_ResourceName_id(const xds_core_v3_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview); }
+UPB_INLINE upb_strview xds_core_v3_ResourceName_authority(const xds_core_v3_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview); }
+UPB_INLINE upb_strview xds_core_v3_ResourceName_resource_type(const xds_core_v3_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview); }
+UPB_INLINE bool xds_core_v3_ResourceName_has_context(const xds_core_v3_ResourceName *msg) { return _upb_hasbit(msg, 1); }
+UPB_INLINE const struct xds_core_v3_ContextParams* xds_core_v3_ResourceName_context(const xds_core_v3_ResourceName *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct xds_core_v3_ContextParams*); }
+
+UPB_INLINE void xds_core_v3_ResourceName_set_id(xds_core_v3_ResourceName *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceName_set_authority(xds_core_v3_ResourceName *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceName_set_resource_type(xds_core_v3_ResourceName *msg, upb_strview value) {
+ *UPB_PTR_AT(msg, UPB_SIZE(20, 40), upb_strview) = value;
+}
+UPB_INLINE void xds_core_v3_ResourceName_set_context(xds_core_v3_ResourceName *msg, struct xds_core_v3_ContextParams* value) {
+ _upb_sethas(msg, 1);
+ *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct xds_core_v3_ContextParams*) = value;
+}
+UPB_INLINE struct xds_core_v3_ContextParams* xds_core_v3_ResourceName_mutable_context(xds_core_v3_ResourceName *msg, upb_arena *arena) {
+ struct xds_core_v3_ContextParams* sub = (struct xds_core_v3_ContextParams*)xds_core_v3_ResourceName_context(msg);
+ if (sub == NULL) {
+ sub = (struct xds_core_v3_ContextParams*)_upb_msg_new(&xds_core_v3_ContextParams_msginit, arena);
+ if (!sub) return NULL;
+ xds_core_v3_ResourceName_set_context(msg, sub);
+ }
+ return sub;
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_RESOURCE_NAME_PROTO_UPB_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c
new file mode 100644
index 00000000000..8418d1e9284
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c
@@ -0,0 +1,354 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/admin/v3/config_dump.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/admin/v3/config_dump.upbdefs.h"
+
+extern upb_def_init envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_timestamp_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_admin_v3_ConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_UpdateFailureState_msginit;
+extern const upb_msglayout envoy_admin_v3_BootstrapConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_StaticListener_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit;
+extern const upb_msglayout envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit;
+extern const upb_msglayout envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit;
+extern const upb_msglayout envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit;
+extern const upb_msglayout envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit;
+extern const upb_msglayout envoy_admin_v3_SecretsConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit;
+extern const upb_msglayout envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit;
+extern const upb_msglayout envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit;
+
+static const upb_msglayout *layouts[22] = {
+ &envoy_admin_v3_ConfigDump_msginit,
+ &envoy_admin_v3_UpdateFailureState_msginit,
+ &envoy_admin_v3_BootstrapConfigDump_msginit,
+ &envoy_admin_v3_ListenersConfigDump_msginit,
+ &envoy_admin_v3_ListenersConfigDump_StaticListener_msginit,
+ &envoy_admin_v3_ListenersConfigDump_DynamicListenerState_msginit,
+ &envoy_admin_v3_ListenersConfigDump_DynamicListener_msginit,
+ &envoy_admin_v3_ClustersConfigDump_msginit,
+ &envoy_admin_v3_ClustersConfigDump_StaticCluster_msginit,
+ &envoy_admin_v3_ClustersConfigDump_DynamicCluster_msginit,
+ &envoy_admin_v3_RoutesConfigDump_msginit,
+ &envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_msginit,
+ &envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_msginit,
+ &envoy_admin_v3_ScopedRoutesConfigDump_msginit,
+ &envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_msginit,
+ &envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_msginit,
+ &envoy_admin_v3_SecretsConfigDump_msginit,
+ &envoy_admin_v3_SecretsConfigDump_DynamicSecret_msginit,
+ &envoy_admin_v3_SecretsConfigDump_StaticSecret_msginit,
+ &envoy_admin_v3_EndpointsConfigDump_msginit,
+ &envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_msginit,
+ &envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_msginit,
+};
+
+static const char descriptor[6802] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'd', 'm', 'i', 'n', '/', 'v', '3', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 'd',
+'u', 'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\016', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3',
+'\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '/',
+'v', '3', '/', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l',
+'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'g', 'o', 'o',
+'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a',
+'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', 'c', '\n', '\n', 'C', 'o',
+'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\022', '.', '\n', '\007', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\001', ' ', '\003', '(', '\013',
+'2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\007', 'c',
+'o', 'n', 'f', 'i', 'g', 's', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i',
+'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\"', '\225', '\002', '\n', '\022',
+'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'S', 't', 'a', 't', 'e', '\022', 'G', '\n', '\024', 'f', 'a', 'i',
+'l', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\023', 'f', 'a', 'i',
+'l', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', 'J', '\n', '\023', 'l', 'a', 's', 't', '_',
+'u', 'p', 'd', 'a', 't', 'e', '_', 'a', 't', 't', 'e', 'm', 'p', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\021',
+'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'A', 't', 't', 'e', 'm', 'p', 't', '\022', '\030', '\n', '\007', 'd', 'e', 't', 'a',
+'i', 'l', 's', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\007', 'd', 'e', 't', 'a', 'i', 'l', 's', '\022', '!', '\n', '\014', 'v', 'e', 'r',
+'s', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I',
+'n', 'f', 'o', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v',
+'2', 'a', 'l', 'p', 'h', 'a', '.', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'S', 't', 'a', 't', 'e',
+'\"', '\310', '\001', '\n', '\023', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\022',
+'B', '\n', '\t', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'B', 'o', 'o',
+'t', 's', 't', 'r', 'a', 'p', 'R', '\t', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '\022', '=', '\n', '\014', 'l', 'a', 's', 't',
+'_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p',
+'d', 'a', 't', 'e', 'd', ':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n',
+'.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', 'C', 'o', 'n', 'f', 'i', 'g', 'D',
+'u', 'm', 'p', '\"', '\363', '\t', '\n', '\023', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u',
+'m', 'p', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R',
+'\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', ']', '\n', '\020', 's', 't', 'a', 't', 'i', 'c', '_', 'l', 'i',
+'s', 't', 'e', 'n', 'e', 'r', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm',
+'i', 'n', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p',
+'.', 'S', 't', 'a', 't', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'R', '\017', 's', 't', 'a', 't', 'i', 'c', 'L', 'i',
+'s', 't', 'e', 'n', 'e', 'r', 's', '\022', '`', '\n', '\021', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 'l', 'i', 's', 't', 'e', 'n',
+'e', 'r', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v',
+'3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n',
+'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'R', '\020', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', 's', '\032', '\300', '\001', '\n', '\016', 'S', 't', 'a', 't', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022',
+'0', '\n', '\010', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\010', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022',
+'=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R',
+'\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', ':', '=', '\232', '\305', '\210', '\036', '8', '\n', '6', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's',
+'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r',
+'\032', '\357', '\001', '\n', '\024', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'S', 't', 'a', 't', 'e',
+'\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'v',
+'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '0', '\n', '\010', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\030', '\002', ' ',
+'\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y',
+'R', '\010', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e',
+'d', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', ':', 'C',
+'\232', '\305', '\210', '\036', '>', '\n', '<', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h',
+'a', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n',
+'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'S', 't', 'a', 't', 'e', '\032', '\222', '\004', '\n', '\017', 'D', 'y', 'n',
+'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(',
+'\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '[', '\n', '\014', 'a', 'c', 't', 'i', 'v', 'e', '_', 's', 't', 'a', 't', 'e', '\030', '\002',
+' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'L', 'i', 's',
+'t', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'L',
+'i', 's', 't', 'e', 'n', 'e', 'r', 'S', 't', 'a', 't', 'e', 'R', '\013', 'a', 'c', 't', 'i', 'v', 'e', 'S', 't', 'a', 't', 'e',
+'\022', ']', '\n', '\r', 'w', 'a', 'r', 'm', 'i', 'n', 'g', '_', 's', 't', 'a', 't', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '8',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's',
+'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e',
+'r', 'S', 't', 'a', 't', 'e', 'R', '\014', 'w', 'a', 'r', 'm', 'i', 'n', 'g', 'S', 't', 'a', 't', 'e', '\022', '_', '\n', '\016', 'd',
+'r', 'a', 'i', 'n', 'i', 'n', 'g', '_', 's', 't', 'a', 't', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f',
+'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'S', 't', 'a',
+'t', 'e', 'R', '\r', 'd', 'r', 'a', 'i', 'n', 'i', 'n', 'g', 'S', 't', 'a', 't', 'e', '\022', 'C', '\n', '\013', 'e', 'r', 'r', 'o',
+'r', '_', 's', 't', 'a', 't', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm',
+'i', 'n', '.', 'v', '3', '.', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'S', 't', 'a', 't', 'e', 'R',
+'\n', 'e', 'r', 'r', 'o', 'r', 'S', 't', 'a', 't', 'e', '\022', 'I', '\n', '\r', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a',
+'t', 'u', 's', '\030', '\006', ' ', '\001', '(', '\016', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v',
+'3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'S', 't', 'a', 't', 'u', 's', 'R', '\014', 'c',
+'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', ':', '>', '\232', '\305', '\210', '\036', '9', '\n', '7', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C',
+'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r',
+':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l',
+'p', 'h', 'a', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\"', '\312',
+'\007', '\n', '\022', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\022', '!', '\n', '\014',
+'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's', 'i',
+'o', 'n', 'I', 'n', 'f', 'o', '\022', 'Y', '\n', '\017', 's', 't', 'a', 't', 'i', 'c', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', 's',
+'\030', '\002', ' ', '\003', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'C',
+'l', 'u', 's', 't', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i', 'c', 'C',
+'l', 'u', 's', 't', 'e', 'r', 'R', '\016', 's', 't', 'a', 't', 'i', 'c', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', 'i', '\n',
+'\027', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 'a', 'c', 't', 'i', 'v', 'e', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\030',
+'\003', ' ', '\003', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'C', 'l',
+'u', 's', 't', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'C',
+'l', 'u', 's', 't', 'e', 'r', 'R', '\025', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'A', 'c', 't', 'i', 'v', 'e', 'C', 'l', 'u', 's',
+'t', 'e', 'r', 's', '\022', 'k', '\n', '\030', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 'w', 'a', 'r', 'm', 'i', 'n', 'g', '_', 'c',
+'l', 'u', 's', 't', 'e', 'r', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm',
+'i', 'n', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.',
+'D', 'y', 'n', 'a', 'm', 'i', 'c', 'C', 'l', 'u', 's', 't', 'e', 'r', 'R', '\026', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'W', 'a',
+'r', 'm', 'i', 'n', 'g', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\032', '\273', '\001', '\n', '\r', 'S', 't', 'a', 't', 'i', 'c', 'C',
+'l', 'u', 's', 't', 'e', 'r', '\022', '.', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\007', 'c', 'l', 'u',
+'s', 't', 'e', 'r', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(',
+'\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's',
+'t', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', ':', ';', '\232', '\305', '\210', '\036', '6', '\n',
+'4', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'C', 'l', 'u', 's',
+'t', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i', 'c', 'C', 'l', 'u', 's',
+'t', 'e', 'r', '\032', '\360', '\002', '\n', '\016', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', '!', '\n',
+'\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's',
+'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '.', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2',
+'\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\007', 'c', 'l',
+'u', 's', 't', 'e', 'r', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001',
+'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e',
+'s', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', '\022', 'C', '\n', '\013', 'e', 'r', 'r',
+'o', 'r', '_', 's', 't', 'a', 't', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd',
+'m', 'i', 'n', '.', 'v', '3', '.', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'S', 't', 'a', 't', 'e',
+'R', '\n', 'e', 'r', 'r', 'o', 'r', 'S', 't', 'a', 't', 'e', '\022', 'I', '\n', '\r', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't',
+'a', 't', 'u', 's', '\030', '\005', ' ', '\001', '(', '\016', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.',
+'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'S', 't', 'a', 't', 'u', 's', 'R', '\014',
+'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', ':', '<', '\232', '\305', '\210', '\036', '7', '\n', '5', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', 'C',
+'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'C', 'l', 'u', 's', 't', 'e', 'r', ':',
+'-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p',
+'h', 'a', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\"', '\335', '\006', '\n',
+'\020', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\022', 'd', '\n', '\024', 's', 't', 'a', 't',
+'i', 'c', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '2', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f',
+'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R',
+'\022', 's', 't', 'a', 't', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', 'g', '\n', '\025', 'd', 'y',
+'n', 'a', 'm', 'i', 'c', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\003', ' ', '\003', '(', '\013',
+'2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 's', 'C',
+'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n',
+'f', 'i', 'g', 'R', '\023', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\032',
+'\312', '\001', '\n', '\021', 'S', 't', 'a', 't', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '7', '\n', '\014',
+'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g',
+'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 'r', 'o', 'u', 't', 'e', 'C', 'o', 'n',
+'f', 'i', 'g', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013',
+'2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't',
+'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', ':', '=', '\232', '\305', '\210', '\036', '8', '\n', '6',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'R', 'o', 'u', 't', 'e',
+'s', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o',
+'n', 'f', 'i', 'g', '\032', '\377', '\002', '\n', '\022', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f',
+'i', 'g', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R',
+'\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '7', '\n', '\014', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n',
+'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 'r', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '=', '\n', '\014', 'l', 'a',
+'s', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't',
+'U', 'p', 'd', 'a', 't', 'e', 'd', '\022', 'C', '\n', '\013', 'e', 'r', 'r', 'o', 'r', '_', 's', 't', 'a', 't', 'e', '\030', '\004', ' ',
+'\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'U', 'p', 'd', 'a',
+'t', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'S', 't', 'a', 't', 'e', 'R', '\n', 'e', 'r', 'r', 'o', 'r', 'S', 't', 'a', 't',
+'e', '\022', 'I', '\n', '\r', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\005', ' ', '\001', '(', '\016', '2',
+'$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e',
+'s', 'o', 'u', 'r', 'c', 'e', 'S', 't', 'a', 't', 'u', 's', 'R', '\014', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u',
+'s', ':', '>', '\232', '\305', '\210', '\036', '9', '\n', '7', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a',
+'l', 'p', 'h', 'a', '.', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n',
+'a', 'm', 'i', 'c', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'R', 'o', 'u', 't', 'e', 's',
+'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\"', '\214', '\010', '\n', '\026', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't',
+'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\022', '~', '\n', '\033', 'i', 'n', 'l', 'i', 'n', 'e', '_', 's', 'c',
+'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\001', ' ', '\003', '(', '\013', '2',
+'?', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o',
+'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'I', 'n', 'l', 'i', 'n', 'e', 'S', 'c', 'o', 'p',
+'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', 'R', '\030', 'i', 'n', 'l', 'i', 'n', 'e', 'S', 'c', 'o',
+'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', '\201', '\001', '\n', '\034', 'd', 'y', 'n', 'a', 'm',
+'i', 'c', '_', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\002',
+' ', '\003', '(', '\013', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'S', 'c', 'o',
+'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm',
+'i', 'c', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', 'R', '\031', 'd', 'y', 'n',
+'a', 'm', 'i', 'c', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\032', '\201', '\002',
+'\n', '\030', 'I', 'n', 'l', 'i', 'n', 'e', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g',
+'s', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'F', '\n', '\024',
+'s', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\002', ' ', '\003', '(',
+'\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\022',
+'s', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', '=', '\n', '\014', 'l', 'a', 's',
+'t', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U',
+'p', 'd', 'a', 't', 'e', 'd', ':', 'J', '\232', '\305', '\210', '\036', 'E', '\n', 'C', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i',
+'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n',
+'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'I', 'n', 'l', 'i', 'n', 'e', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e',
+'C', 'o', 'n', 'f', 'i', 'g', 's', '\032', '\266', '\003', '\n', '\031', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'c', 'o', 'p', 'e', 'd',
+'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(',
+'\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\002',
+' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', 'F', '\n', '\024', 's', 'c', 'o', 'p',
+'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\024', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\022', 's', 'c', 'o', 'p',
+'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p',
+'d', 'a', 't', 'e', 'd', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't',
+'e', 'd', '\022', 'C', '\n', '\013', 'e', 'r', 'r', 'o', 'r', '_', 's', 't', 'a', 't', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\"',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i',
+'l', 'u', 'r', 'e', 'S', 't', 'a', 't', 'e', 'R', '\n', 'e', 'r', 'r', 'o', 'r', 'S', 't', 'a', 't', 'e', '\022', 'I', '\n', '\r',
+'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\006', ' ', '\001', '(', '\016', '2', '$', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 's', 'o', 'u', 'r', 'c',
+'e', 'S', 't', 'a', 't', 'u', 's', 'R', '\014', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', ':', 'K', '\232', '\305',
+'\210', '\036', 'F', '\n', 'D', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.',
+'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y',
+'n', 'a', 'm', 'i', 'c', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', ':', '1',
+'\232', '\305', '\210', '\036', ',', '\n', '*', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h',
+'a', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\"',
+'\267', '\007', '\n', '\021', 'S', 'e', 'c', 'r', 'e', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '\022', 'U', '\n', '\016',
+'s', 't', 'a', 't', 'i', 'c', '_', 's', 'e', 'c', 'r', 'e', 't', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '.', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'S', 'e', 'c', 'r', 'e', 't', 's', 'C', 'o', 'n', 'f', 'i',
+'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', 'R', '\r', 's', 't', 'a', 't', 'i',
+'c', 'S', 'e', 'c', 'r', 'e', 't', 's', '\022', 'e', '\n', '\026', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 'a', 'c', 't', 'i', 'v',
+'e', '_', 's', 'e', 'c', 'r', 'e', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'d', 'm', 'i', 'n', '.', 'v', '3', '.', 'S', 'e', 'c', 'r', 'e', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p',
+'.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', 'R', '\024', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'A', 'c',
+'t', 'i', 'v', 'e', 'S', 'e', 'c', 'r', 'e', 't', 's', '\022', 'g', '\n', '\027', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 'w', 'a',
+'r', 'm', 'i', 'n', 'g', '_', 's', 'e', 'c', 'r', 'e', 't', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'S', 'e', 'c', 'r', 'e', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g',
+'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', 'R', '\025', 'd', 'y', 'n', 'a', 'm',
+'i', 'c', 'W', 'a', 'r', 'm', 'i', 'n', 'g', 'S', 'e', 'c', 'r', 'e', 't', 's', '\032', '\377', '\002', '\n', '\r', 'D', 'y', 'n', 'a',
+'m', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004',
+'n', 'a', 'm', 'e', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\002', ' ', '\001', '(',
+'\t', 'R', '\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p',
+'d', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't',
+'e', 'd', '\022', ',', '\n', '\006', 's', 'e', 'c', 'r', 'e', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g',
+'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\006', 's', 'e', 'c', 'r', 'e', 't', '\022', 'C',
+'\n', '\013', 'e', 'r', 'r', 'o', 'r', '_', 's', 't', 'a', 't', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e',
+'S', 't', 'a', 't', 'e', 'R', '\n', 'e', 'r', 'r', 'o', 'r', 'S', 't', 'a', 't', 'e', '\022', 'I', '\n', '\r', 'c', 'l', 'i', 'e',
+'n', 't', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\006', ' ', '\001', '(', '\016', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'d', 'm', 'i', 'n', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'S', 't', 'a',
+'t', 'u', 's', 'R', '\014', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', ':', ':', '\232', '\305', '\210', '\036', '5', '\n',
+'3', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'S', 'e', 'c', 'r',
+'e', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 'e', 'c', 'r',
+'e', 't', '\032', '\312', '\001', '\n', '\014', 'S', 't', 'a', 't', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', '\022', '\022', '\n', '\004', 'n', 'a',
+'m', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p',
+'d', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't',
+'e', 'd', '\022', ',', '\n', '\006', 's', 'e', 'c', 'r', 'e', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g',
+'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\006', 's', 'e', 'c', 'r', 'e', 't', ':', '9',
+'\232', '\305', '\210', '\036', '4', '\n', '2', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h',
+'a', '.', 'S', 'e', 'c', 'r', 'e', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't', 'a', 't', 'i',
+'c', 'S', 'e', 'c', 'r', 'e', 't', ':', ',', '\232', '\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm',
+'i', 'n', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'S', 'e', 'c', 'r', 'e', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D',
+'u', 'm', 'p', '\"', '\336', '\005', '\n', '\023', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u',
+'m', 'p', '\022', 'p', '\n', '\027', 's', 't', 'a', 't', 'i', 'c', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'n',
+'f', 'i', 'g', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.',
+'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'S', 't',
+'a', 't', 'i', 'c', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\025', 's', 't', 'a', 't', 'i',
+'c', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', 's', '\n', '\030', 'd', 'y', 'n', 'a', 'm',
+'i', 'c', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\003', ' ', '\003', '(', '\013',
+'2', '9', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n',
+'t', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'E', 'n', 'd', 'p', 'o',
+'i', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\026', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'E', 'n', 'd', 'p', 'o', 'i', 'n',
+'t', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\032', '\224', '\001', '\n', '\024', 'S', 't', 'a', 't', 'i', 'c', 'E', 'n', 'd', 'p', 'o', 'i',
+'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '=', '\n', '\017', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'n', 'f',
+'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'A', 'n', 'y', 'R', '\016', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '=', '\n', '\014',
+'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g',
+'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a',
+'s', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', '\032', '\310', '\002', '\n', '\025', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'E', 'n', 'd', 'p',
+'o', 'i', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f',
+'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '=', '\n', '\017', 'e',
+'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\016', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '=', '\n', '\014', 'l', 'a', 's', 't', '_', 'u', 'p', 'd', 'a', 't', 'e', 'd', '\030',
+'\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T',
+'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\013', 'l', 'a', 's', 't', 'U', 'p', 'd', 'a', 't', 'e', 'd', '\022', 'C', '\n', '\013',
+'e', 'r', 'r', 'o', 'r', '_', 's', 't', 'a', 't', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'S', 't',
+'a', 't', 'e', 'R', '\n', 'e', 'r', 'r', 'o', 'r', 'S', 't', 'a', 't', 'e', '\022', 'I', '\n', '\r', 'c', 'l', 'i', 'e', 'n', 't',
+'_', 's', 't', 'a', 't', 'u', 's', '\030', '\005', ' ', '\001', '(', '\016', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm',
+'i', 'n', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'S', 't', 'a', 't', 'u',
+'s', 'R', '\014', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', '*', ']', '\n', '\024', 'C', 'l', 'i', 'e', 'n', 't',
+'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'S', 't', 'a', 't', 'u', 's', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N',
+'\020', '\000', '\022', '\r', '\n', '\t', 'R', 'E', 'Q', 'U', 'E', 'S', 'T', 'E', 'D', '\020', '\001', '\022', '\022', '\n', '\016', 'D', 'O', 'E', 'S',
+'_', 'N', 'O', 'T', '_', 'E', 'X', 'I', 'S', 'T', '\020', '\002', '\022', '\t', '\n', '\005', 'A', 'C', 'K', 'E', 'D', '\020', '\003', '\022', '\n',
+'\n', '\006', 'N', 'A', 'C', 'K', 'E', 'D', '\020', '\004', 'B', '9', '\n', '\034', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o',
+'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', 'B', '\017', 'C', 'o', 'n', 'f', 'i', 'g',
+'D', 'u', 'm', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't',
+'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_timestamp_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_admin_v3_config_dump_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/admin/v3/config_dump.proto",
+ UPB_STRVIEW_INIT(descriptor, 6802)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h
new file mode 100644
index 00000000000..8e62d4e4444
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h
@@ -0,0 +1,140 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/admin/v3/config_dump.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_ADMIN_V3_CONFIG_DUMP_PROTO_UPBDEFS_H_
+#define ENVOY_ADMIN_V3_CONFIG_DUMP_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_def_init envoy_admin_v3_config_dump_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_UpdateFailureState_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.UpdateFailureState");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_BootstrapConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.BootstrapConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ListenersConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ListenersConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ListenersConfigDump_StaticListener_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ListenersConfigDump.StaticListener");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ListenersConfigDump_DynamicListenerState_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ListenersConfigDump.DynamicListenerState");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ListenersConfigDump_DynamicListener_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ListenersConfigDump.DynamicListener");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ClustersConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ClustersConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ClustersConfigDump_StaticCluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ClustersConfigDump.StaticCluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ClustersConfigDump_DynamicCluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ClustersConfigDump.DynamicCluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_RoutesConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.RoutesConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_RoutesConfigDump_StaticRouteConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.RoutesConfigDump.StaticRouteConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.RoutesConfigDump.DynamicRouteConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ScopedRoutesConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ScopedRoutesConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ScopedRoutesConfigDump_InlineScopedRouteConfigs_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ScopedRoutesConfigDump.InlineScopedRouteConfigs");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_ScopedRoutesConfigDump_DynamicScopedRouteConfigs_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.ScopedRoutesConfigDump.DynamicScopedRouteConfigs");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_SecretsConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.SecretsConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_SecretsConfigDump_DynamicSecret_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.SecretsConfigDump.DynamicSecret");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_SecretsConfigDump_StaticSecret_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.SecretsConfigDump.StaticSecret");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_EndpointsConfigDump_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.EndpointsConfigDump");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_EndpointsConfigDump_StaticEndpointConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.EndpointsConfigDump.StaticEndpointConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_admin_v3_config_dump_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.admin.v3.EndpointsConfigDump.DynamicEndpointConfig");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_ADMIN_V3_CONFIG_DUMP_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c
new file mode 100644
index 00000000000..ffb007703cf
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c
@@ -0,0 +1,38 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/annotations/deprecation.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/annotations/deprecation.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+
+static const char descriptor[283] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e',
+'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd',
+'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':', 'T', '\n', '\025', 'd', 'i', 's', 'a', 'l', 'l',
+'o', 'w', 'e', 'd', '_', 'b', 'y', '_', 'd', 'e', 'f', 'a', 'u', 'l', 't', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\347', '\255', '\256',
+'Z', ' ', '\001', '(', '\010', 'R', '\023', 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd', 'B', 'y', 'D', 'e', 'f', 'a', 'u', 'l',
+'t', ':', 'a', '\n', '\032', 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd', '_', 'b', 'y', '_', 'd', 'e', 'f', 'a', 'u', 'l',
+'t', '_', 'e', 'n', 'u', 'm', '\022', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\365', '\316', '\266', '!', ' ', '\001', '(', '\010',
+'R', '\027', 'd', 'i', 's', 'a', 'l', 'l', 'o', 'w', 'e', 'd', 'B', 'y', 'D', 'e', 'f', 'a', 'u', 'l', 't', 'E', 'n', 'u', 'm',
+'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_annotations_deprecation_proto_upbdefinit = {
+ deps,
+ NULL,
+ "envoy/annotations/deprecation.proto",
+ UPB_STRVIEW_INIT(descriptor, 283)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h
new file mode 100644
index 00000000000..012d961e923
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h
@@ -0,0 +1,30 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/annotations/deprecation.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPBDEFS_H_
+#define ENVOY_ANNOTATIONS_DEPRECATION_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_def_init envoy_annotations_deprecation_proto_upbdefinit;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_ANNOTATIONS_DEPRECATION_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c
new file mode 100644
index 00000000000..5a3b9652a7f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c
@@ -0,0 +1,41 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/annotations/resource.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/annotations/resource.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+extern const upb_msglayout envoy_annotations_ResourceAnnotation_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_annotations_ResourceAnnotation_msginit,
+};
+
+static const char descriptor[240] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u',
+'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c',
+'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '(', '\n', '\022', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'A',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004',
+'t', 'y', 'p', 'e', ':', 'e', '\n', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030',
+'\301', '\344', '\262', '~', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'r',
+'e', 's', 'o', 'u', 'r', 'c', 'e', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_annotations_resource_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/annotations/resource.proto",
+ UPB_STRVIEW_INIT(descriptor, 240)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h
new file mode 100644
index 00000000000..bb778390a8d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/annotations/resource.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPBDEFS_H_
+#define ENVOY_ANNOTATIONS_RESOURCE_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_def_init envoy_annotations_resource_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_annotations_ResourceAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_annotations_resource_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.annotations.ResourceAnnotation");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_ANNOTATIONS_RESOURCE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c
new file mode 100644
index 00000000000..d9e634392ca
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c
@@ -0,0 +1,251 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/accesslog/v3/accesslog.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/accesslog/v3/accesslog.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_route_v3_route_components_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_metadata_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_accesslog_v3_AccessLog_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_AccessLogFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_ComparisonFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_StatusCodeFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_DurationFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_NotHealthCheckFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_TraceableFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_RuntimeFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_AndFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_OrFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_HeaderFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_ResponseFlagFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_GrpcStatusFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_MetadataFilter_msginit;
+extern const upb_msglayout envoy_config_accesslog_v3_ExtensionFilter_msginit;
+
+static const upb_msglayout *layouts[15] = {
+ &envoy_config_accesslog_v3_AccessLog_msginit,
+ &envoy_config_accesslog_v3_AccessLogFilter_msginit,
+ &envoy_config_accesslog_v3_ComparisonFilter_msginit,
+ &envoy_config_accesslog_v3_StatusCodeFilter_msginit,
+ &envoy_config_accesslog_v3_DurationFilter_msginit,
+ &envoy_config_accesslog_v3_NotHealthCheckFilter_msginit,
+ &envoy_config_accesslog_v3_TraceableFilter_msginit,
+ &envoy_config_accesslog_v3_RuntimeFilter_msginit,
+ &envoy_config_accesslog_v3_AndFilter_msginit,
+ &envoy_config_accesslog_v3_OrFilter_msginit,
+ &envoy_config_accesslog_v3_HeaderFilter_msginit,
+ &envoy_config_accesslog_v3_ResponseFlagFilter_msginit,
+ &envoy_config_accesslog_v3_GrpcStatusFilter_msginit,
+ &envoy_config_accesslog_v3_MetadataFilter_msginit,
+ &envoy_config_accesslog_v3_ExtensionFilter_msginit,
+};
+
+static const char descriptor[4388] = {'\n', ')', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '/',
+'v', '3', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\031', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\032', ',', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o', 'u', 't', 'e', '/', 'v',
+'3', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'$', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'm', 'e',
+'t', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/',
+'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l',
+'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/',
+'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't',
+'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\356', '\001', '\n', '\t', 'A', 'c', 'c', 'e',
+'s', 's', 'L', 'o', 'g', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e',
+'\022', 'B', '\n', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'A', 'c', 'c', 'e', 's',
+'s', 'L', 'o', 'g', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\022', '9', '\n', '\014', 't', 'y', 'p',
+'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f',
+'i', 'g', ':', '1', '\232', '\305', '\210', '\036', ',', '\n', '*', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f',
+'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's',
+'L', 'o', 'g', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\003', '\020', '\004', 'R',
+'\006', 'c', 'o', 'n', 'f', 'i', 'g', '\"', '\366', '\010', '\n', '\017', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't',
+'e', 'r', '\022', '[', '\n', '\022', 's', 't', 'a', 't', 'u', 's', '_', 'c', 'o', 'd', 'e', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030',
+'\001', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e',
+'s', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'S', 't', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', 'F', 'i', 'l', 't', 'e', 'r',
+'H', '\000', 'R', '\020', 's', 't', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'T', '\n', '\017', 'd',
+'u', 'r', 'a', 't', 'i', 'o', 'n', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'D',
+'u', 'r', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\016', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n',
+'F', 'i', 'l', 't', 'e', 'r', '\022', 'h', '\n', '\027', 'n', 'o', 't', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c',
+'k', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'N', 'o', 't', 'H', 'e', 'a', 'l',
+'t', 'h', 'C', 'h', 'e', 'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\024', 'n', 'o', 't', 'H', 'e', 'a', 'l', 't',
+'h', 'C', 'h', 'e', 'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'W', '\n', '\020', 't', 'r', 'a', 'c', 'e', 'a', 'b', 'l', 'e',
+'_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'T', 'r', 'a', 'c', 'e', 'a', 'b', 'l',
+'e', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\017', 't', 'r', 'a', 'c', 'e', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't', 'e',
+'r', '\022', 'Q', '\n', '\016', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\005', ' ', '\001', '(', '\013',
+'2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g',
+'.', 'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\r', 'r', 'u', 'n', 't',
+'i', 'm', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'E', '\n', '\n', 'a', 'n', 'd', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\006',
+' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's',
+'s', 'l', 'o', 'g', '.', 'v', '3', '.', 'A', 'n', 'd', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\t', 'a', 'n', 'd', 'F',
+'i', 'l', 't', 'e', 'r', '\022', 'B', '\n', '\t', 'o', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\007', ' ', '\001', '(', '\013', '2',
+'#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.',
+'v', '3', '.', 'O', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\010', 'o', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'N',
+'\n', '\r', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\010', ' ', '\001', '(', '\013', '2', '\'', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.',
+'H', 'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\014', 'h', 'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l',
+'t', 'e', 'r', '\022', 'a', '\n', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'f', 'l', 'a', 'g', '_', 'f', 'i', 'l', 't',
+'e', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a',
+'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F',
+'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\022', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F', 'i', 'l', 't',
+'e', 'r', '\022', '[', '\n', '\022', 'g', 'r', 'p', 'c', '_', 's', 't', 'a', 't', 'u', 's', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030',
+'\n', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e',
+'s', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r',
+'H', '\000', 'R', '\020', 'g', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'W', '\n', '\020', 'e',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\013', ' ', '\001', '(', '\013', '2', '*', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.',
+'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'H', '\000', 'R', '\017', 'e', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'T', '\n', '\017', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'f', 'i', 'l',
+'t', 'e', 'r', '\030', '\014', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'F', 'i', 'l', 't',
+'e', 'r', 'H', '\000', 'R', '\016', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'F', 'i', 'l', 't', 'e', 'r', ':', '7', '\232', '\305', '\210',
+'\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a',
+'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't',
+'e', 'r', 'B', '\027', '\n', '\020', 'f', 'i', 'l', 't', 'e', 'r', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370',
+'B', '\001', '\"', '\357', '\001', '\n', '\020', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'H',
+'\n', '\002', 'o', 'p', '\030', '\001', ' ', '\001', '(', '\016', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F',
+'i', 'l', 't', 'e', 'r', '.', 'O', 'p', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\002', 'o', 'p', '\022', '9', '\n',
+'\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'U', 'I', 'n', 't', '3', '2', 'R',
+'\005', 'v', 'a', 'l', 'u', 'e', '\"', '\034', '\n', '\002', 'O', 'p', '\022', '\006', '\n', '\002', 'E', 'Q', '\020', '\000', '\022', '\006', '\n', '\002', 'G',
+'E', '\020', '\001', '\022', '\006', '\n', '\002', 'L', 'E', '\020', '\002', ':', '8', '\232', '\305', '\210', '\036', '3', '\n', '1', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.',
+'v', '2', '.', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\243', '\001', '\n', '\020', 'S',
+'t', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'U', '\n', '\n', 'c', 'o', 'm', 'p', 'a', 'r',
+'i', 's', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F',
+'i', 'l', 't', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\n', 'c', 'o', 'm', 'p', 'a', 'r', 'i', 's',
+'o', 'n', ':', '8', '\232', '\305', '\210', '\036', '3', '\n', '1', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f',
+'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'S', 't', 'a', 't', 'u', 's',
+'C', 'o', 'd', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\237', '\001', '\n', '\016', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'F', 'i',
+'l', 't', 'e', 'r', '\022', 'U', '\n', '\n', 'c', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2',
+'+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.',
+'v', '3', '.', 'C', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212',
+'\001', '\002', '\020', '\001', 'R', '\n', 'c', 'o', 'm', 'p', 'a', 'r', 'i', 's', 'o', 'n', ':', '6', '\232', '\305', '\210', '\036', '1', '\n', '/',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's',
+'s', 'l', 'o', 'g', '.', 'v', '2', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\"', 'T', '\n',
+'\024', 'N', 'o', 't', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', ':', '<', '\232', '\305',
+'\210', '\036', '7', '\n', '5', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.',
+'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'N', 'o', 't', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e',
+'c', 'k', 'F', 'i', 'l', 't', 'e', 'r', '\"', 'J', '\n', '\017', 'T', 'r', 'a', 'c', 'e', 'a', 'b', 'l', 'e', 'F', 'i', 'l', 't',
+'e', 'r', ':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f',
+'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'T', 'r', 'a', 'c', 'e', 'a',
+'b', 'l', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\371', '\001', '\n', '\r', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'i', 'l', 't',
+'e', 'r', '\022', '(', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007',
+'\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', '\022', 'I', '\n', '\017', 'p', 'e',
+'r', 'c', 'e', 'n', 't', '_', 's', 'a', 'm', 'p', 'l', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v',
+'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c',
+'e', 'n', 't', 'R', '\016', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'S', 'a', 'm', 'p', 'l', 'e', 'd', '\022', '<', '\n', '\032', 'u', 's',
+'e', '_', 'i', 'n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 't', '_', 'r', 'a', 'n', 'd', 'o', 'm', 'n', 'e', 's', 's', '\030',
+'\003', ' ', '\001', '(', '\010', 'R', '\030', 'u', 's', 'e', 'I', 'n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 't', 'R', 'a', 'n', 'd',
+'o', 'm', 'n', 'e', 's', 's', ':', '5', '\232', '\305', '\210', '\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'R', 'u',
+'n', 't', 'i', 'm', 'e', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\216', '\001', '\n', '\t', 'A', 'n', 'd', 'F', 'i', 'l', 't', 'e', 'r',
+'\022', 'N', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'A', 'c', 'c', 'e',
+'s', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\002', 'R', '\007', 'f', 'i',
+'l', 't', 'e', 'r', 's', ':', '1', '\232', '\305', '\210', '\036', ',', '\n', '*', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'A', 'n', 'd',
+'F', 'i', 'l', 't', 'e', 'r', '\"', '\214', '\001', '\n', '\010', 'O', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'N', '\n', '\007', 'f', 'i',
+'l', 't', 'e', 'r', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F',
+'i', 'l', 't', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\002', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', ':',
+'0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't',
+'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'O', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\"',
+'\214', '\001', '\n', '\014', 'H', 'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', 'F', '\n', '\006', 'h', 'e', 'a', 'd', 'e',
+'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o',
+'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005',
+'\212', '\001', '\002', '\020', '\001', 'R', '\006', 'h', 'e', 'a', 'd', 'e', 'r', ':', '4', '\232', '\305', '\210', '\036', '/', '\n', '-', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o',
+'g', '.', 'v', '2', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\334', '\001', '\n', '\022', 'R', 'e', 's',
+'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\211', '\001', '\n', '\005', 'f', 'l', 'a', 'g', 's',
+'\030', '\001', ' ', '\003', '(', '\t', 'B', 's', '\372', 'B', 'p', '\222', '\001', 'm', '\"', 'k', 'r', 'i', 'R', '\002', 'L', 'H', 'R', '\002', 'U',
+'H', 'R', '\002', 'U', 'T', 'R', '\002', 'L', 'R', 'R', '\002', 'U', 'R', 'R', '\002', 'U', 'F', 'R', '\002', 'U', 'C', 'R', '\002', 'U', 'O',
+'R', '\002', 'N', 'R', 'R', '\002', 'D', 'I', 'R', '\002', 'F', 'I', 'R', '\002', 'R', 'L', 'R', '\004', 'U', 'A', 'E', 'X', 'R', '\004', 'R',
+'L', 'S', 'E', 'R', '\002', 'D', 'C', 'R', '\003', 'U', 'R', 'X', 'R', '\002', 'S', 'I', 'R', '\002', 'I', 'H', 'R', '\003', 'D', 'P', 'E',
+'R', '\005', 'U', 'M', 'S', 'D', 'R', 'R', '\004', 'R', 'F', 'C', 'F', 'R', '\004', 'N', 'F', 'C', 'F', 'R', '\002', 'D', 'T', 'R', '\005',
+'f', 'l', 'a', 'g', 's', ':', ':', '\232', '\305', '\210', '\036', '5', '\n', '3', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'R', 'e', 's',
+'p', 'o', 'n', 's', 'e', 'F', 'l', 'a', 'g', 'F', 'i', 'l', 't', 'e', 'r', '\"', '\200', '\004', '\n', '\020', 'G', 'r', 'p', 'c', 'S',
+'t', 'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r', '\022', ']', '\n', '\010', 's', 't', 'a', 't', 'u', 's', 'e', 's', '\030', '\001',
+' ', '\003', '(', '\016', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's',
+'s', 'l', 'o', 'g', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F', 'i', 'l', 't', 'e', 'r', '.',
+'S', 't', 'a', 't', 'u', 's', 'B', '\r', '\372', 'B', '\n', '\222', '\001', '\007', '\"', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', 's', 't',
+'a', 't', 'u', 's', 'e', 's', '\022', '\030', '\n', '\007', 'e', 'x', 'c', 'l', 'u', 'd', 'e', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\007',
+'e', 'x', 'c', 'l', 'u', 'd', 'e', '\"', '\270', '\002', '\n', '\006', 'S', 't', 'a', 't', 'u', 's', '\022', '\006', '\n', '\002', 'O', 'K', '\020',
+'\000', '\022', '\014', '\n', '\010', 'C', 'A', 'N', 'C', 'E', 'L', 'E', 'D', '\020', '\001', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W',
+'N', '\020', '\002', '\022', '\024', '\n', '\020', 'I', 'N', 'V', 'A', 'L', 'I', 'D', '_', 'A', 'R', 'G', 'U', 'M', 'E', 'N', 'T', '\020', '\003',
+'\022', '\025', '\n', '\021', 'D', 'E', 'A', 'D', 'L', 'I', 'N', 'E', '_', 'E', 'X', 'C', 'E', 'E', 'D', 'E', 'D', '\020', '\004', '\022', '\r',
+'\n', '\t', 'N', 'O', 'T', '_', 'F', 'O', 'U', 'N', 'D', '\020', '\005', '\022', '\022', '\n', '\016', 'A', 'L', 'R', 'E', 'A', 'D', 'Y', '_',
+'E', 'X', 'I', 'S', 'T', 'S', '\020', '\006', '\022', '\025', '\n', '\021', 'P', 'E', 'R', 'M', 'I', 'S', 'S', 'I', 'O', 'N', '_', 'D', 'E',
+'N', 'I', 'E', 'D', '\020', '\007', '\022', '\026', '\n', '\022', 'R', 'E', 'S', 'O', 'U', 'R', 'C', 'E', '_', 'E', 'X', 'H', 'A', 'U', 'S',
+'T', 'E', 'D', '\020', '\010', '\022', '\027', '\n', '\023', 'F', 'A', 'I', 'L', 'E', 'D', '_', 'P', 'R', 'E', 'C', 'O', 'N', 'D', 'I', 'T',
+'I', 'O', 'N', '\020', '\t', '\022', '\013', '\n', '\007', 'A', 'B', 'O', 'R', 'T', 'E', 'D', '\020', '\n', '\022', '\020', '\n', '\014', 'O', 'U', 'T',
+'_', 'O', 'F', '_', 'R', 'A', 'N', 'G', 'E', '\020', '\013', '\022', '\021', '\n', '\r', 'U', 'N', 'I', 'M', 'P', 'L', 'E', 'M', 'E', 'N',
+'T', 'E', 'D', '\020', '\014', '\022', '\014', '\n', '\010', 'I', 'N', 'T', 'E', 'R', 'N', 'A', 'L', '\020', '\r', '\022', '\017', '\n', '\013', 'U', 'N',
+'A', 'V', 'A', 'I', 'L', 'A', 'B', 'L', 'E', '\020', '\016', '\022', '\r', '\n', '\t', 'D', 'A', 'T', 'A', '_', 'L', 'O', 'S', 'S', '\020',
+'\017', '\022', '\023', '\n', '\017', 'U', 'N', 'A', 'U', 'T', 'H', 'E', 'N', 'T', 'I', 'C', 'A', 'T', 'E', 'D', '\020', '\020', ':', '8', '\232',
+'\305', '\210', '\036', '3', '\n', '1', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r',
+'.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'G', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'F',
+'i', 'l', 't', 'e', 'r', '\"', '\332', '\001', '\n', '\016', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'F', 'i', 'l', 't', 'e', 'r', '\022',
+'@', '\n', '\007', 'm', 'a', 't', 'c', 'h', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'t', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M',
+'a', 't', 'c', 'h', 'e', 'r', 'R', '\007', 'm', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'N', '\n', '\026', 'm', 'a', 't', 'c', 'h', '_',
+'i', 'f', '_', 'k', 'e', 'y', '_', 'n', 'o', 't', '_', 'f', 'o', 'u', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e',
+'R', '\022', 'm', 'a', 't', 'c', 'h', 'I', 'f', 'K', 'e', 'y', 'N', 'o', 't', 'F', 'o', 'u', 'n', 'd', ':', '6', '\232', '\305', '\210',
+'\036', '1', '\n', '/', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'a',
+'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'F', 'i', 'l', 't', 'e',
+'r', '\"', '\266', '\001', '\n', '\017', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\022', '\n', '\004',
+'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd',
+'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g',
+':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l',
+'t', 'e', 'r', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '2', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010',
+'\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', 'B', 'C', '\n', '\'', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r',
+'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o',
+'g', '.', 'v', '3', 'B', '\016', 'A', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310',
+'\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[10] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_route_v3_route_components_proto_upbdefinit,
+ &envoy_type_matcher_v3_metadata_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_accesslog_v3_accesslog_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/accesslog/v3/accesslog.proto",
+ UPB_STRVIEW_INIT(descriptor, 4388)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h
new file mode 100644
index 00000000000..e868f90bb53
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h
@@ -0,0 +1,105 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/accesslog/v3/accesslog.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ACCESSLOG_V3_ACCESSLOG_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ACCESSLOG_V3_ACCESSLOG_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_def_init envoy_config_accesslog_v3_accesslog_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_AccessLog_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.AccessLog");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_AccessLogFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.AccessLogFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_ComparisonFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.ComparisonFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_StatusCodeFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.StatusCodeFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_DurationFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.DurationFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_NotHealthCheckFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.NotHealthCheckFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_TraceableFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.TraceableFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_RuntimeFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.RuntimeFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_AndFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.AndFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_OrFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.OrFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_HeaderFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.HeaderFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_ResponseFlagFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.ResponseFlagFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_GrpcStatusFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.GrpcStatusFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_MetadataFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.MetadataFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_accesslog_v3_ExtensionFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_accesslog_v3_accesslog_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.accesslog.v3.ExtensionFilter");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ACCESSLOG_V3_ACCESSLOG_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c
new file mode 100644
index 00000000000..f86bfe76f4a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c
@@ -0,0 +1,383 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/bootstrap/v3/bootstrap.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/bootstrap/v3/bootstrap.upbdefs.h"
+
+extern upb_def_init envoy_config_cluster_v3_cluster_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_event_service_config_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_socket_option_proto_upbdefinit;
+extern upb_def_init envoy_config_listener_v3_listener_proto_upbdefinit;
+extern upb_def_init envoy_config_metrics_v3_stats_proto_upbdefinit;
+extern upb_def_init envoy_config_overload_v3_overload_proto_upbdefinit;
+extern upb_def_init envoy_config_trace_v3_http_tracer_proto_upbdefinit;
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_migrate_proto_upbdefinit;
+extern upb_def_init udpa_annotations_security_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Admin_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_ClusterManager_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Watchdogs_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Watchdog_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_FatalAction_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_Runtime_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit;
+extern const upb_msglayout envoy_config_bootstrap_v3_LayeredRuntime_msginit;
+
+static const upb_msglayout *layouts[17] = {
+ &envoy_config_bootstrap_v3_Bootstrap_msginit,
+ &envoy_config_bootstrap_v3_Bootstrap_StaticResources_msginit,
+ &envoy_config_bootstrap_v3_Bootstrap_DynamicResources_msginit,
+ &envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_msginit,
+ &envoy_config_bootstrap_v3_Admin_msginit,
+ &envoy_config_bootstrap_v3_ClusterManager_msginit,
+ &envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_msginit,
+ &envoy_config_bootstrap_v3_Watchdogs_msginit,
+ &envoy_config_bootstrap_v3_Watchdog_msginit,
+ &envoy_config_bootstrap_v3_Watchdog_WatchdogAction_msginit,
+ &envoy_config_bootstrap_v3_FatalAction_msginit,
+ &envoy_config_bootstrap_v3_Runtime_msginit,
+ &envoy_config_bootstrap_v3_RuntimeLayer_msginit,
+ &envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_msginit,
+ &envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_msginit,
+ &envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_msginit,
+ &envoy_config_bootstrap_v3_LayeredRuntime_msginit,
+};
+
+static const char descriptor[6993] = {'\n', ')', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '/',
+'v', '3', '/', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\031', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '\032', '%', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3', '/', 'c', 'l', 'u', 's',
+'t', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c',
+'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3',
+'/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '/', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'v', 'e', 'n', 't', '_', 's',
+'e', 'r', 'v', 'i', 'c', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o',
+'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r',
+'e', '/', 'v', '3', '/', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v', '3',
+'/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o',
+'n', 'f', 'i', 'g', '/', 'm', 'e', 't', 'r', 'i', 'c', 's', '/', 'v', '3', '/', 's', 't', 'a', 't', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd',
+'/', 'v', '3', '/', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'p', 'r', 'o', 't', 'o', '\032', '\'', 'e', 'n', 'v', 'o', 'y',
+'/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 't', 'r', 'a', 'c', 'e', '/', 'v', '3', '/', 'h', 't', 't', 'p', '_', 't', 'r', 'a',
+'c', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/',
+'v', '3', '/', 's', 'e', 'c', 'r', 'e', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y',
+'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w',
+'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a',
+'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\341', '\026', '\n', '\t', 'B',
+'o', 'o', 't', 's', 't', 'r', 'a', 'p', '\022', '.', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'N', 'o', 'd', 'e',
+'R', '\004', 'n', 'o', 'd', 'e', '\022', '.', '\n', '\023', 'n', 'o', 'd', 'e', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 'p', 'a',
+'r', 'a', 'm', 's', '\030', '\032', ' ', '\003', '(', '\t', 'R', '\021', 'n', 'o', 'd', 'e', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'a',
+'r', 'a', 'm', 's', '\022', '_', '\n', '\020', 's', 't', 'a', 't', 'i', 'c', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\030',
+'\002', ' ', '\001', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't',
+'s', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'S', 't', 'a', 't', 'i', 'c',
+'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', 'R', '\017', 's', 't', 'a', 't', 'i', 'c', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e',
+'s', '\022', 'b', '\n', '\021', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\030', '\003', ' ',
+'\001', '(', '\013', '2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't',
+'r', 'a', 'p', '.', 'v', '3', '.', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'R',
+'e', 's', 'o', 'u', 'r', 'c', 'e', 's', 'R', '\020', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e',
+'s', '\022', 'R', '\n', '\017', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '\030', '\004', ' ', '\001', '(',
+'\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a',
+'p', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'M', 'a', 'n', 'a', 'g', 'e', 'r', 'R', '\016', 'c', 'l', 'u', 's',
+'t', 'e', 'r', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '\022', 'D', '\n', '\n', 'h', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030',
+'\016', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'h', 'd', 's', 'C',
+'o', 'n', 'f', 'i', 'g', '\022', '\035', '\n', '\n', 'f', 'l', 'a', 'g', 's', '_', 'p', 'a', 't', 'h', '\030', '\005', ' ', '\001', '(', '\t',
+'R', '\t', 'f', 'l', 'a', 'g', 's', 'P', 'a', 't', 'h', '\022', 'C', '\n', '\013', 's', 't', 'a', 't', 's', '_', 's', 'i', 'n', 'k',
+'s', '\030', '\006', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e',
+'t', 'r', 'i', 'c', 's', '.', 'v', '3', '.', 'S', 't', 'a', 't', 's', 'S', 'i', 'n', 'k', 'R', '\n', 's', 't', 'a', 't', 's',
+'S', 'i', 'n', 'k', 's', '\022', 'G', '\n', '\014', 's', 't', 'a', 't', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\r', ' ', '\001',
+'(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c', 's',
+'.', 'v', '3', '.', 'S', 't', 'a', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\013', 's', 't', 'a', 't', 's', 'C', 'o', 'n',
+'f', 'i', 'g', '\022', 'q', '\n', '\024', 's', 't', 'a', 't', 's', '_', 'f', 'l', 'u', 's', 'h', '_', 'i', 'n', 't', 'e', 'r', 'v',
+'a', 'l', '\030', '\007', ' ', '\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', 'B', '$', '\372', 'B', '\016', '\252', '\001', '\013', '\032', '\003', '\010', '\254', '\002', '2', '\004',
+'\020', '\300', '\204', '=', '\362', '\230', '\376', '\217', '\005', '\r', '\022', '\013', 's', 't', 'a', 't', 's', '_', 'f', 'l', 'u', 's', 'h', 'R', '\022',
+'s', 't', 'a', 't', 's', 'F', 'l', 'u', 's', 'h', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', ':', '\n', '\024', 's', 't', 'a',
+'t', 's', '_', 'f', 'l', 'u', 's', 'h', '_', 'o', 'n', '_', 'a', 'd', 'm', 'i', 'n', '\030', '\035', ' ', '\001', '(', '\010', 'B', '\007',
+'\372', 'B', '\004', 'j', '\002', '\010', '\001', 'H', '\000', 'R', '\021', 's', 't', 'a', 't', 's', 'F', 'l', 'u', 's', 'h', 'O', 'n', 'A', 'd',
+'m', 'i', 'n', '\022', 'C', '\n', '\010', 'w', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\030', '\010', ' ', '\001', '(', '\013', '2', '#', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.',
+'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 'B', '\002', '\030', '\001', 'R', '\010', 'w', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\022', 'B', '\n',
+'\t', 'w', 'a', 't', 'c', 'h', 'd', 'o', 'g', 's', '\030', '\033', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'W', 'a', 't', 'c', 'h',
+'d', 'o', 'g', 's', 'R', '\t', 'w', 'a', 't', 'c', 'h', 'd', 'o', 'g', 's', '\022', '<', '\n', '\007', 't', 'r', 'a', 'c', 'i', 'n',
+'g', '\030', '\t', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r',
+'a', 'c', 'e', '.', 'v', '3', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', 'B', '\002', '\030', '\001', 'R', '\007', 't', 'r', 'a', 'c', 'i',
+'n', 'g', '\022', 'R', '\n', '\017', 'l', 'a', 'y', 'e', 'r', 'e', 'd', '_', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\021', ' ', '\001',
+'(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r',
+'a', 'p', '.', 'v', '3', '.', 'L', 'a', 'y', 'e', 'r', 'e', 'd', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'R', '\016', 'l', 'a', 'y',
+'e', 'r', 'e', 'd', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', '6', '\n', '\005', 'a', 'd', 'm', 'i', 'n', '\030', '\014', ' ', '\001', '(',
+'\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a',
+'p', '.', 'v', '3', '.', 'A', 'd', 'm', 'i', 'n', 'R', '\005', 'a', 'd', 'm', 'i', 'n', '\022', 'd', '\n', '\020', 'o', 'v', 'e', 'r',
+'l', 'o', 'a', 'd', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '\030', '\017', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'O', 'v', 'e', 'r',
+'l', 'o', 'a', 'd', 'M', 'a', 'n', 'a', 'g', 'e', 'r', 'B', '\016', '\212', '\223', '\267', '*', '\002', '\010', '\001', '\212', '\223', '\267', '*', '\002',
+'\020', '\001', 'R', '\017', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '\022', '6', '\n', '\027', 'e', 'n',
+'a', 'b', 'l', 'e', '_', 'd', 'i', 's', 'p', 'a', 't', 'c', 'h', 'e', 'r', '_', 's', 't', 'a', 't', 's', '\030', '\020', ' ', '\001',
+'(', '\010', 'R', '\025', 'e', 'n', 'a', 'b', 'l', 'e', 'D', 'i', 's', 'p', 'a', 't', 'c', 'h', 'e', 'r', 'S', 't', 'a', 't', 's',
+'\022', '#', '\n', '\r', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\022', ' ', '\001', '(', '\t', 'R', '\014',
+'h', 'e', 'a', 'd', 'e', 'r', 'P', 'r', 'e', 'f', 'i', 'x', '\022', '_', '\n', '\035', 's', 't', 'a', 't', 's', '_', 's', 'e', 'r',
+'v', 'e', 'r', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\030', '\023', ' ', '\001', '(',
+'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '6',
+'4', 'V', 'a', 'l', 'u', 'e', 'R', '\032', 's', 't', 'a', 't', 's', 'S', 'e', 'r', 'v', 'e', 'r', 'V', 'e', 'r', 's', 'i', 'o',
+'n', 'O', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\022', '4', '\n', '\027', 'u', 's', 'e', '_', 't', 'c', 'p', '_', 'f', 'o', 'r', '_',
+'d', 'n', 's', '_', 'l', 'o', 'o', 'k', 'u', 'p', 's', '\030', '\024', ' ', '\001', '(', '\010', 'R', '\023', 'u', 's', 'e', 'T', 'c', 'p',
+'F', 'o', 'r', 'D', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 's', '\022', ']', '\n', '\024', 'b', 'o', 'o', 't', 's', 't', 'r', 'a',
+'p', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\030', '\025', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't',
+'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\023', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', 'E', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 's', '\022', 'K', '\n', '\r', 'f', 'a', 't', 'a', 'l', '_', 'a', 'c', 't', 'i', 'o', 'n', 's',
+'\030', '\034', ' ', '\003', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o',
+'t', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'F', 'a', 't', 'a', 'l', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\014', 'f', 'a',
+'t', 'a', 'l', 'A', 'c', 't', 'i', 'o', 'n', 's', '\022', 'I', '\n', '\016', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r',
+'c', 'e', 's', '\030', '\026', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\r', 'c', 'o', 'n',
+'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 's', '\022', 'V', '\n', '\025', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'c', 'o', 'n',
+'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\027', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r',
+'c', 'e', 'R', '\023', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '8',
+'\n', '\030', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '_', 'i', 'n', 't', 'e', 'r', 'f', 'a', 'c',
+'e', '\030', '\030', ' ', '\001', '(', '\t', 'R', '\026', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'S', 'o', 'c', 'k', 'e', 't', 'I', 'n', 't',
+'e', 'r', 'f', 'a', 'c', 'e', '\022', '\214', '\001', '\n', '\036', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'p', 'r',
+'o', 'v', 'i', 'd', 'e', 'r', '_', 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', 's', '\030', '\031', ' ', '\003', '(', '\013', '2', 'F', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3',
+'.', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o',
+'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', 's', 'E', 'n', 't', 'r', 'y', 'R', '\034', 'c', 'e', 'r', 't',
+'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', 's', '\032',
+'\232', '\002', '\n', '\017', 'S', 't', 'a', 't', 'i', 'c', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '@', '\n', '\t', 'l', 'i',
+'s', 't', 'e', 'n', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'R',
+'\t', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\022', '<', '\n', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\030', '\002', ' ',
+'\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e',
+'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'R', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', 'K', '\n',
+'\007', 's', 'e', 'c', 'r', 'e', 't', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't',
+'s', '.', 't', 'l', 's', '.', 'v', '3', '.', 'S', 'e', 'c', 'r', 'e', 't', 'R', '\007', 's', 'e', 'c', 'r', 'e', 't', 's', ':',
+':', '\232', '\305', '\210', '\036', '5', '\n', '3', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't',
+'s', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'S', 't', 'a', 't', 'i', 'c',
+'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\032', '\211', '\003', '\n', '\020', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'R', 'e', 's', 'o',
+'u', 'r', 'c', 'e', 's', '\022', 'A', '\n', '\n', 'l', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C',
+'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'l', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '2', '\n',
+'\025', 'l', 'd', 's', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '_', 'l', 'o', 'c', 'a', 't', 'o', 'r', '\030', '\005', ' ',
+'\001', '(', '\t', 'R', '\023', 'l', 'd', 's', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', 'L', 'o', 'c', 'a', 't', 'o', 'r', '\022',
+'A', '\n', '\n', 'c', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S',
+'o', 'u', 'r', 'c', 'e', 'R', '\t', 'c', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '2', '\n', '\025', 'c', 'd', 's', '_', 'r',
+'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '_', 'l', 'o', 'c', 'a', 't', 'o', 'r', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\023', 'c',
+'d', 's', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', 'L', 'o', 'c', 'a', 't', 'o', 'r', '\022', 'D', '\n', '\n', 'a', 'd', 's',
+'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r',
+'c', 'e', 'R', '\t', 'a', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', ':', ';', '\232', '\305', '\210', '\036', '6', '\n', '4', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'B', 'o',
+'o', 't', 's', 't', 'r', 'a', 'p', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', 'J',
+'\004', '\010', '\004', '\020', '\005', '\032', '{', '\n', '!', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i',
+'d', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030',
+'\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '@', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013',
+'2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T',
+'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\005', 'v', 'a', 'l', 'u',
+'e', ':', '\002', '8', '\001', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', 'B',
+'\r', '\n', '\013', 's', 't', 'a', 't', 's', '_', 'f', 'l', 'u', 's', 'h', 'J', '\004', '\010', '\n', '\020', '\013', 'J', '\004', '\010', '\013', '\020',
+'\014', 'R', '\007', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\"', '\376', '\001', '\n', '\005', 'A', 'd', 'm', 'i', 'n', '\022', '&', '\n', '\017', 'a',
+'c', 'c', 'e', 's', 's', '_', 'l', 'o', 'g', '_', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\r', 'a', 'c', 'c',
+'e', 's', 's', 'L', 'o', 'g', 'P', 'a', 't', 'h', '\022', '!', '\n', '\014', 'p', 'r', 'o', 'f', 'i', 'l', 'e', '_', 'p', 'a', 't',
+'h', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\013', 'p', 'r', 'o', 'f', 'i', 'l', 'e', 'P', 'a', 't', 'h', '\022', '7', '\n', '\007', 'a',
+'d', 'd', 'r', 'e', 's', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'R', '\007', 'a', 'd', 'd', 'r', 'e',
+'s', 's', '\022', 'I', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\004', ' ', '\003', '(',
+'\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\r', 's', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o',
+'n', 's', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b',
+'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'A', 'd', 'm', 'i', 'n', '\"', '\313', '\004', '\n', '\016', 'C', 'l', 'u',
+'s', 't', 'e', 'r', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '\022', ',', '\n', '\022', 'l', 'o', 'c', 'a', 'l', '_', 'c', 'l', 'u', 's',
+'t', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\020', 'l', 'o', 'c', 'a', 'l', 'C', 'l', 'u', 's',
+'t', 'e', 'r', 'N', 'a', 'm', 'e', '\022', 'g', '\n', '\021', 'o', 'u', 't', 'l', 'i', 'e', 'r', '_', 'd', 'e', 't', 'e', 'c', 't',
+'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'M', 'a', 'n', 'a', 'g',
+'e', 'r', '.', 'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', 'R', '\020', 'o', 'u', 't', 'l',
+'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'R', '\n', '\024', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_',
+'b', 'i', 'n', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i',
+'g', 'R', '\022', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'Q', '\n', '\021',
+'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', ' ', '\001', '(', '\013', '2', '%',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'p', 'i',
+'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\017', 'l', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'C', 'o',
+'n', 'f', 'i', 'g', '\032', '\311', '\001', '\n', '\020', 'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n',
+'\022', '$', '\n', '\016', 'e', 'v', 'e', 'n', 't', '_', 'l', 'o', 'g', '_', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\t', 'R',
+'\014', 'e', 'v', 'e', 'n', 't', 'L', 'o', 'g', 'P', 'a', 't', 'h', '\022', 'M', '\n', '\r', 'e', 'v', 'e', 'n', 't', '_', 's', 'e',
+'r', 'v', 'i', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'o', 'n',
+'f', 'i', 'g', 'R', '\014', 'e', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', ':', '@', '\232', '\305', '\210', '\036', ';', '\n',
+'9', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v',
+'2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'O', 'u', 't', 'l', 'i', 'e', 'r', 'D',
+'e', 't', 'e', 'c', 't', 'i', 'o', 'n', ':', '/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r',
+'M', 'a', 'n', 'a', 'g', 'e', 'r', '\"', '\260', '\001', '\n', '\t', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 's', '\022', 'U', '\n', '\024',
+'m', 'a', 'i', 'n', '_', 't', 'h', 'r', 'e', 'a', 'd', '_', 'w', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\030', '\001', ' ', '\001', '(',
+'\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a',
+'p', '.', 'v', '3', '.', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 'R', '\022', 'm', 'a', 'i', 'n', 'T', 'h', 'r', 'e', 'a', 'd',
+'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\022', 'L', '\n', '\017', 'w', 'o', 'r', 'k', 'e', 'r', '_', 'w', 'a', 't', 'c', 'h', 'd',
+'o', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b',
+'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 'R', '\016', 'w', 'o', 'r',
+'k', 'e', 'r', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\"', '\272', '\006', '\n', '\010', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\022',
+'L', '\n', '\007', 'a', 'c', 't', 'i', 'o', 'n', 's', '\030', '\007', ' ', '\003', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'W', 'a', 't', 'c', 'h',
+'d', 'o', 'g', '.', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\007', 'a', 'c', 't', 'i', 'o',
+'n', 's', '\022', '<', '\n', '\014', 'm', 'i', 's', 's', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\001', ' ', '\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', '\013', 'm', 'i', 's', 's', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'D', '\n', '\020', 'm', 'e', 'g', 'a', 'm', 'i', 's',
+'s', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\002', ' ', '\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', '\017', 'm', 'e', 'g', 'a', 'm', 'i',
+'s', 's', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '<', '\n', '\014', 'k', 'i', 'l', 'l', '_', 't', 'i', 'm', 'e', 'o', 'u', 't',
+'\030', '\003', ' ', '\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', '\013', 'k', 'i', 'l', 'l', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'Z', '\n', '\027',
+'m', 'a', 'x', '_', 'k', 'i', 'l', 'l', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '_', 'j', 'i', 't', 't', 'e', 'r', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '2', '\000', 'R', '\024', 'm', 'a', 'x', 'K', 'i', 'l', 'l',
+'T', 'i', 'm', 'e', 'o', 'u', 't', 'J', 'i', 't', 't', 'e', 'r', '\022', 'F', '\n', '\021', 'm', 'u', 'l', 't', 'i', 'k', 'i', 'l',
+'l', '_', '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', '\020', 'm', 'u', 'l', 't', 'i', 'k',
+'i', 'l', 'l', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'G', '\n', '\023', 'm', 'u', 'l', 't', 'i', 'k', 'i', 'l', 'l', '_', 't',
+'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\005', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\022', 'm', 'u', 'l', 't', 'i', 'k', 'i', 'l', 'l', 'T',
+'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\032', '\205', '\002', '\n', '\016', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 'A', 'c', 't', 'i',
+'o', 'n', '\022', 'B', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't',
+'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '`', '\n', '\005', 'e',
+'v', 'e', 'n', 't', '\030', '\002', ' ', '\001', '(', '\016', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', '.', 'W', 'a',
+'t', 'c', 'h', 'd', 'o', 'g', 'A', 'c', 't', 'i', 'o', 'n', '.', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', 'E', 'v', 'e', 'n',
+'t', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\005', 'e', 'v', 'e', 'n', 't', '\"', 'M', '\n', '\r', 'W', 'a', 't',
+'c', 'h', 'd', 'o', 'g', 'E', 'v', 'e', 'n', 't', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\010',
+'\n', '\004', 'K', 'I', 'L', 'L', '\020', '\001', '\022', '\r', '\n', '\t', 'M', 'U', 'L', 'T', 'I', 'K', 'I', 'L', 'L', '\020', '\002', '\022', '\014',
+'\n', '\010', 'M', 'E', 'G', 'A', 'M', 'I', 'S', 'S', '\020', '\003', '\022', '\010', '\n', '\004', 'M', 'I', 'S', 'S', '\020', '\004', ':', ')', '\232',
+'\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't',
+'r', 'a', 'p', '.', 'v', '2', '.', 'W', 'a', 't', 'c', 'h', 'd', 'o', 'g', '\"', 'Q', '\n', '\013', 'F', 'a', 't', 'a', 'l', 'A',
+'c', 't', 'i', 'o', 'n', '\022', 'B', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '*', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd',
+'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\"', '\334',
+'\001', '\n', '\007', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', '!', '\n', '\014', 's', 'y', 'm', 'l', 'i', 'n', 'k', '_', 'r', 'o', 'o',
+'t', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 's', 'y', 'm', 'l', 'i', 'n', 'k', 'R', 'o', 'o', 't', '\022', '\"', '\n', '\014', 's',
+'u', 'b', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 's', 'u', 'b', 'd', 'i', 'r',
+'e', 'c', 't', 'o', 'r', 'y', '\022', '3', '\n', '\025', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '_', 's', 'u', 'b', 'd', 'i', 'r',
+'e', 'c', 't', 'o', 'r', 'y', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\024', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', 'S', 'u', 'b',
+'d', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\022', '+', '\n', '\004', 'b', 'a', 's', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\027',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\004',
+'b', 'a', 's', 'e', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\"', '\333', '\006', '\n',
+'\014', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001',
+'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '<', '\n', '\014', 's', 't', 'a', 't',
+'i', 'c', '_', 'l', 'a', 'y', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'H', '\000', 'R', '\013', 's', 't', 'a', 't', 'i', 'c', 'L',
+'a', 'y', 'e', 'r', '\022', 'R', '\n', '\n', 'd', 'i', 's', 'k', '_', 'l', 'a', 'y', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2',
+'1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.',
+'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', '.', 'D', 'i', 's', 'k', 'L', 'a', 'y', 'e', 'r',
+'H', '\000', 'R', '\t', 'd', 'i', 's', 'k', 'L', 'a', 'y', 'e', 'r', '\022', 'U', '\n', '\013', 'a', 'd', 'm', 'i', 'n', '_', 'l', 'a',
+'y', 'e', 'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r',
+'.', 'A', 'd', 'm', 'i', 'n', 'L', 'a', 'y', 'e', 'r', 'H', '\000', 'R', '\n', 'a', 'd', 'm', 'i', 'n', 'L', 'a', 'y', 'e', 'r',
+'\022', 'R', '\n', '\n', 'r', 't', 'd', 's', '_', 'l', 'a', 'y', 'e', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'R',
+'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', '.', 'R', 't', 'd', 's', 'L', 'a', 'y', 'e', 'r', 'H', '\000', 'R', '\t',
+'r', 't', 'd', 's', 'L', 'a', 'y', 'e', 'r', '\032', '\301', '\001', '\n', '\t', 'D', 'i', 's', 'k', 'L', 'a', 'y', 'e', 'r', '\022', '!',
+'\n', '\014', 's', 'y', 'm', 'l', 'i', 'n', 'k', '_', 'r', 'o', 'o', 't', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 's', 'y', 'm',
+'l', 'i', 'n', 'k', 'R', 'o', 'o', 't', '\022', '\"', '\n', '\014', 's', 'u', 'b', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\030',
+'\003', ' ', '\001', '(', '\t', 'R', '\014', 's', 'u', 'b', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\022', '4', '\n', '\026', 'a', 'p',
+'p', 'e', 'n', 'd', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(',
+'\010', 'R', '\024', 'a', 'p', 'p', 'e', 'n', 'd', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'l', 'u', 's', 't', 'e', 'r', ':', '7',
+'\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's',
+'t', 'r', 'a', 'p', '.', 'v', '2', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', '.', 'D', 'i', 's', 'k',
+'L', 'a', 'y', 'e', 'r', '\032', 'F', '\n', '\n', 'A', 'd', 'm', 'i', 'n', 'L', 'a', 'y', 'e', 'r', ':', '8', '\232', '\305', '\210', '\036',
+'3', '\n', '1', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p',
+'.', 'v', '2', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', '.', 'A', 'd', 'm', 'i', 'n', 'L', 'a', 'y',
+'e', 'r', '\032', '\235', '\001', '\n', '\t', 'R', 't', 'd', 's', 'L', 'a', 'y', 'e', 'r', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030',
+'\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'C', '\n', '\013', 'r', 't', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\n', 'r', 't', 'd', 's', 'C',
+'o', 'n', 'f', 'i', 'g', ':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'L', 'a', 'y',
+'e', 'r', '.', 'R', 't', 'd', 's', 'L', 'a', 'y', 'e', 'r', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '2', '.', 'R', 'u', 'n',
+'t', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', 'B', '\026', '\n', '\017', 'l', 'a', 'y', 'e', 'r', '_', 's', 'p', 'e', 'c', 'i', 'f',
+'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', '\202', '\001', '\n', '\016', 'L', 'a', 'y', 'e', 'r', 'e', 'd', 'R', 'u', 'n', 't', 'i',
+'m', 'e', '\022', '?', '\n', '\006', 'l', 'a', 'y', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v', '3', '.', 'R', 'u', 'n',
+'t', 'i', 'm', 'e', 'L', 'a', 'y', 'e', 'r', 'R', '\006', 'l', 'a', 'y', 'e', 'r', 's', ':', '/', '\232', '\305', '\210', '\036', '*', '\n',
+'(', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', '.', 'v',
+'2', '.', 'L', 'a', 'y', 'e', 'r', 'e', 'd', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'B', 'C', '\n', '\'', 'i', 'o', '.', 'e', 'n',
+'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'b', 'o', 'o',
+'t', 's', 't', 'r', 'a', 'p', '.', 'v', '3', 'B', '\016', 'B', 'o', 'o', 't', 's', 't', 'r', 'a', 'p', 'P', 'r', 'o', 't', 'o',
+'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[22] = {
+ &envoy_config_cluster_v3_cluster_proto_upbdefinit,
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_config_source_proto_upbdefinit,
+ &envoy_config_core_v3_event_service_config_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_config_core_v3_socket_option_proto_upbdefinit,
+ &envoy_config_listener_v3_listener_proto_upbdefinit,
+ &envoy_config_metrics_v3_stats_proto_upbdefinit,
+ &envoy_config_overload_v3_overload_proto_upbdefinit,
+ &envoy_config_trace_v3_http_tracer_proto_upbdefinit,
+ &envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_migrate_proto_upbdefinit,
+ &udpa_annotations_security_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/bootstrap/v3/bootstrap.proto",
+ UPB_STRVIEW_INIT(descriptor, 6993)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h
new file mode 100644
index 00000000000..666cbed19e3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h
@@ -0,0 +1,115 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/bootstrap/v3/bootstrap.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_BOOTSTRAP_V3_BOOTSTRAP_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_BOOTSTRAP_V3_BOOTSTRAP_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_def_init envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Bootstrap_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Bootstrap");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Bootstrap_StaticResources_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Bootstrap.StaticResources");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Bootstrap_DynamicResources_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Bootstrap.DynamicResources");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Bootstrap_CertificateProviderInstancesEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Bootstrap.CertificateProviderInstancesEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Admin_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Admin");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_ClusterManager_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.ClusterManager");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_ClusterManager_OutlierDetection_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.ClusterManager.OutlierDetection");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Watchdogs_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Watchdogs");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Watchdog_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Watchdog");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Watchdog_WatchdogAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Watchdog.WatchdogAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_FatalAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.FatalAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_Runtime_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.Runtime");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_RuntimeLayer_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.RuntimeLayer");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_RuntimeLayer_DiskLayer_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.RuntimeLayer.DiskLayer");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_RuntimeLayer_AdminLayer_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.RuntimeLayer.AdminLayer");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_RuntimeLayer_RtdsLayer_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.RuntimeLayer.RtdsLayer");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_bootstrap_v3_LayeredRuntime_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_bootstrap_v3_bootstrap_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.bootstrap.v3.LayeredRuntime");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_BOOTSTRAP_V3_BOOTSTRAP_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c
new file mode 100644
index 00000000000..baca9f3e43d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c
@@ -0,0 +1,100 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/circuit_breaker.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/cluster/v3/circuit_breaker.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_config_cluster_v3_CircuitBreakers_msginit,
+ &envoy_config_cluster_v3_CircuitBreakers_Thresholds_msginit,
+ &envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_msginit,
+};
+
+static const char descriptor[1364] = {'\n', '-', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3',
+'/', 'c', 'i', 'r', 'c', 'u', 'i', 't', '_', 'b', 'r', 'e', 'a', 'k', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\027', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '\032', '\037', 'e',
+'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c',
+'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n',
+'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\200', '\010', '\n', '\017', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e',
+'r', 's', '\022', 'S', '\n', '\n', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '3', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C',
+'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '.', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's',
+'R', '\n', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '\032', '\352', '\006', '\n', '\n', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l',
+'d', 's', '\022', 'K', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\001', ' ', '\001', '(', '\016', '2', '%', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'i', 'n',
+'g', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', 'p', 'r', 'i', 'o',
+'r', 'i', 't', 'y', '\022', 'E', '\n', '\017', 'm', 'a', 'x', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's', '\030', '\002',
+' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I',
+'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'm', 'a', 'x', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's',
+'\022', 'N', '\n', '\024', 'm', 'a', 'x', '_', 'p', 'e', 'n', 'd', 'i', 'n', 'g', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030',
+'\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U',
+'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\022', 'm', 'a', 'x', 'P', 'e', 'n', 'd', 'i', 'n', 'g', 'R', 'e', 'q',
+'u', 'e', 's', 't', 's', '\022', '?', '\n', '\014', 'm', 'a', 'x', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\004', ' ', '\001',
+'(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't',
+'3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\013', 'm', 'a', 'x', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '=', '\n', '\013', 'm',
+'a', 'x', '_', 'r', 'e', 't', 'r', 'i', 'e', 's', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\n', 'm', 'a',
+'x', 'R', 'e', 't', 'r', 'i', 'e', 's', '\022', 'b', '\n', '\014', 'r', 'e', 't', 'r', 'y', '_', 'b', 'u', 'd', 'g', 'e', 't', '\030',
+'\010', ' ', '\001', '(', '\013', '2', '?', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's',
+'t', 'e', 'r', '.', 'v', '3', '.', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '.', 'T', 'h',
+'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '.', 'R', 'e', 't', 'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', 'R', '\013', 'r', 'e', 't',
+'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', '\022', '\'', '\n', '\017', 't', 'r', 'a', 'c', 'k', '_', 'r', 'e', 'm', 'a', 'i', 'n', 'i',
+'n', 'g', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\016', 't', 'r', 'a', 'c', 'k', 'R', 'e', 'm', 'a', 'i', 'n', 'i', 'n', 'g', '\022',
+'N', '\n', '\024', 'm', 'a', 'x', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'p', 'o', 'o', 'l', 's', '\030', '\007',
+' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I',
+'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\022', 'm', 'a', 'x', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P',
+'o', 'o', 'l', 's', '\032', '\342', '\001', '\n', '\013', 'R', 'e', 't', 'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', '\022', '=', '\n', '\016', 'b',
+'u', 'd', 'g', 'e', 't', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v',
+'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\r', 'b', 'u', 'd', 'g', 'e',
+'t', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', 'P', '\n', '\025', 'm', 'i', 'n', '_', 'r', 'e', 't', 'r', 'y', '_', 'c', 'o', 'n',
+'c', 'u', 'r', 'r', 'e', 'n', 'c', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\023', 'm', 'i', 'n', 'R',
+'e', 't', 'r', 'y', 'C', 'o', 'n', 'c', 'u', 'r', 'r', 'e', 'n', 'c', 'y', ':', 'B', '\232', '\305', '\210', '\036', '=', '\n', ';', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'i', 'r', 'c', 'u',
+'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '.', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', '.', 'R', 'e', 't',
+'r', 'y', 'B', 'u', 'd', 'g', 'e', 't', ':', '6', '\232', '\305', '\210', '\036', '1', '\n', '/', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k',
+'e', 'r', 's', '.', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 's', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'i', 'r', 'c', 'u', 'i',
+'t', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', 'B', 'F', '\n', '%', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x',
+'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3',
+'B', '\023', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[7] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/cluster/v3/circuit_breaker.proto",
+ UPB_STRVIEW_INIT(descriptor, 1364)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h
new file mode 100644
index 00000000000..f6b6032b4fa
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/circuit_breaker.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CLUSTER_V3_CIRCUIT_BREAKER_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CLUSTER_V3_CIRCUIT_BREAKER_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_def_init envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_CircuitBreakers_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.CircuitBreakers");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_CircuitBreakers_Thresholds_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.CircuitBreakers.Thresholds");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_CircuitBreakers_Thresholds_RetryBudget_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.CircuitBreakers.Thresholds.RetryBudget");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CLUSTER_V3_CIRCUIT_BREAKER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c
new file mode 100644
index 00000000000..18db991b6ba
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c
@@ -0,0 +1,543 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/cluster.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/cluster/v3/cluster.upbdefs.h"
+
+extern upb_def_init envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit;
+extern upb_def_init envoy_config_cluster_v3_filter_proto_upbdefinit;
+extern upb_def_init envoy_config_cluster_v3_outlier_detection_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_health_check_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_protocol_proto_upbdefinit;
+extern upb_def_init envoy_config_endpoint_v3_endpoint_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init xds_core_v3_collection_entry_proto_upbdefinit;
+extern upb_def_init udpa_annotations_security_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_cluster_v3_ClusterCollection_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_CustomClusterType_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_EdsClusterConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_LbSubsetConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_RefreshRate_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_LoadBalancingPolicy_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_UpstreamBindConfig_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_UpstreamConnectionOptions_msginit;
+extern const upb_msglayout envoy_config_cluster_v3_TrackClusterStats_msginit;
+
+static const upb_msglayout *layouts[23] = {
+ &envoy_config_cluster_v3_ClusterCollection_msginit,
+ &envoy_config_cluster_v3_Cluster_msginit,
+ &envoy_config_cluster_v3_Cluster_TransportSocketMatch_msginit,
+ &envoy_config_cluster_v3_Cluster_CustomClusterType_msginit,
+ &envoy_config_cluster_v3_Cluster_EdsClusterConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_LbSubsetConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_msginit,
+ &envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_RingHashLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_MaglevLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_CommonLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_msginit,
+ &envoy_config_cluster_v3_Cluster_RefreshRate_msginit,
+ &envoy_config_cluster_v3_Cluster_PreconnectPolicy_msginit,
+ &envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_msginit,
+ &envoy_config_cluster_v3_LoadBalancingPolicy_msginit,
+ &envoy_config_cluster_v3_LoadBalancingPolicy_Policy_msginit,
+ &envoy_config_cluster_v3_UpstreamBindConfig_msginit,
+ &envoy_config_cluster_v3_UpstreamConnectionOptions_msginit,
+ &envoy_config_cluster_v3_TrackClusterStats_msginit,
+};
+
+static const char descriptor[10750] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3',
+'/', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '\032', '-', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n',
+'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3', '/', 'c', 'i', 'r', 'c', 'u', 'i', 't', '_', 'b', 'r',
+'e', 'a', 'k', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g',
+'/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3', '/', 'f', 'i', 'l', 't', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'/', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3', '/',
+'o', 'u', 't', 'l', 'i', 'e', 'r', '_', 'd', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"',
+'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'd', 'd', 'r',
+'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c',
+'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/',
+'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u',
+'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c',
+'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\'', 'e',
+'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'h', 'e', 'a', 'l', 't',
+'h', '_', 'c', 'h', 'e', 'c', 'k', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f',
+'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'v',
+'3', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't',
+'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o',
+'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r',
+'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'x', 'd', 's', '/', 'c', 'o', 'r',
+'e', '/', 'v', '3', '/', 'c', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '_', 'e', 'n', 't', 'r', 'y', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\037', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'c', 'u',
+'r', 'i', 't', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't',
+'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't',
+'o', '\"', 'K', '\n', '\021', 'C', 'l', 'u', 's', 't', 'e', 'r', 'C', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\022', '6', '\n',
+'\007', 'e', 'n', 't', 'r', 'i', 'e', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'C', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r', 'y', 'R', '\007', 'e', 'n', 't', 'r',
+'i', 'e', 's', '\"', '\246', 'G', '\n', '\007', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', 'o', '\n', '\030', 't', 'r', 'a', 'n', 's', 'p',
+'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '_', 'm', 'a', 't', 'c', 'h', 'e', 's', '\030', '+', ' ', '\003', '(', '\013', '2',
+'5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3',
+'.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'M',
+'a', 't', 'c', 'h', 'R', '\026', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'M', 'a', 't', 'c',
+'h', 'e', 's', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020',
+'\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\"', '\n', '\r', 'a', 'l', 't', '_', 's', 't', 'a', 't', '_', 'n', 'a', 'm', 'e', '\030',
+'\034', ' ', '\001', '(', '\t', 'R', '\013', 'a', 'l', 't', 'S', 't', 'a', 't', 'N', 'a', 'm', 'e', '\022', 'N', '\n', '\004', 't', 'y', 'p',
+'e', '\030', '\002', ' ', '\001', '(', '\016', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l',
+'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r',
+'y', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\004', 't', 'y', 'p', 'e', '\022', 'W',
+'\n', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 't', 'y', 'p', 'e', '\030', '&', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u',
+'s', 't', 'e', 'r', '.', 'C', 'u', 's', 't', 'o', 'm', 'C', 'l', 'u', 's', 't', 'e', 'r', 'T', 'y', 'p', 'e', 'H', '\000', 'R',
+'\013', 'c', 'l', 'u', 's', 't', 'e', 'r', 'T', 'y', 'p', 'e', '\022', '_', '\n', '\022', 'e', 'd', 's', '_', 'c', 'l', 'u', 's', 't',
+'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.',
+'E', 'd', 's', 'C', 'l', 'u', 's', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\020', 'e', 'd', 's', 'C', 'l', 'u', 's',
+'t', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'L', '\n', '\017', 'c', 'o', 'n', 'n', 'e', 'c', 't', '_', '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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\016', 'c', 'o',
+'n', 'n', 'e', 'c', 't', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'o', '\n', '!', 'p', 'e', 'r', '_', 'c', 'o', 'n', 'n', 'e',
+'c', 't', 'i', 'o', 'n', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b', 'y', 't', 'e', 's', '\030',
+'\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U',
+'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\212', '\223', '\267', '*', '\002', '\020', '\001', 'R', '\035', 'p', 'e', 'r', 'C',
+'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's',
+'\022', 'R', '\n', '\t', 'l', 'b', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\006', ' ', '\001', '(', '\016', '2', ')', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's',
+'t', 'e', 'r', '.', 'L', 'b', 'P', 'o', 'l', 'i', 'c', 'y', 'B', '\n', '\372', 'B', '\007', '\202', '\001', '\004', '\020', '\001', ' ', '\007', 'R',
+'\010', 'l', 'b', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'X', '\n', '\017', 'l', 'o', 'a', 'd', '_', 'a', 's', 's', 'i', 'g', 'n', 'm',
+'e', 'n', 't', '\030', '!', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's',
+'s', 'i', 'g', 'n', 'm', 'e', 'n', 't', 'R', '\016', 'l', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '\022',
+'F', '\n', '\r', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', 's', '\030', '\010', ' ', '\003', '(', '\013', '2', '!', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l',
+'t', 'h', 'C', 'h', 'e', 'c', 'k', 'R', '\014', 'h', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 's', '\022', '[', '\n', '\033',
+'m', 'a', 'x', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '_', 'p', 'e', 'r', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', '\030', '\t', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\030', 'm', 'a', 'x', 'R', 'e', 'q', 'u', 'e', 's', 't',
+'s', 'P', 'e', 'r', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'S', '\n', '\020', 'c', 'i', 'r', 'c', 'u', 'i', 't',
+'_', 'b', 'r', 'e', 'a', 'k', 'e', 'r', 's', '\030', '\n', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'i', 'r', 'c', 'u', 'i', 't', 'B',
+'r', 'e', 'a', 'k', 'e', 'r', 's', 'R', '\017', 'c', 'i', 'r', 'c', 'u', 'i', 't', 'B', 'r', 'e', 'a', 'k', 'e', 'r', 's', '\022',
+'z', '\n', '\036', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l',
+'_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '.', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'H', 't', 't', 'p',
+'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B', '\002', '\030', '\001', 'R', '\033', 'u', 'p', 's', 't',
+'r', 'e', 'a', 'm', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'n',
+'\n', '\034', 'c', 'o', 'm', 'm', 'o', 'n', '_', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p',
+'t', 'i', 'o', 'n', 's', '\030', '\035', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't',
+'i', 'o', 'n', 's', 'B', '\002', '\030', '\001', 'R', '\031', 'c', 'o', 'm', 'm', 'o', 'n', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o',
+'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'b', '\n', '\025', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c',
+'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\r', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o',
+'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B', '\002', '\030', '\001', 'R', '\023', 'h', 't', 't', 'p', 'P', 'r', 'o', 't', 'o',
+'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'k', '\n', '\026', 'h', 't', 't', 'p', '2', '_', 'p', 'r', 'o', 't', 'o',
+'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\016', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't',
+'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B', '\t', '\030', '\001', '\212', '\223', '\267', '*', '\002', '\020', '\001', 'R', '\024', 'h',
+'t', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\214', '\001', '\n', ' ', 't',
+'y', 'p', 'e', 'd', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o',
+'p', 't', 'i', 'o', 'n', 's', '\030', '$', ' ', '\003', '(', '\013', '2', 'C', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'T', 'y', 'p',
+'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n',
+'s', 'E', 'n', 't', 'r', 'y', 'R', '\035', 't', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o',
+'t', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'Q', '\n', '\020', 'd', 'n', 's', '_', 'r', 'e', 'f', 'r', 'e',
+'s', 'h', '_', 'r', 'a', 't', 'e', '\030', '\020', ' ', '\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', 'B', '\014', '\372', 'B', '\t', '\252', '\001', '\006', '*', '\004',
+'\020', '\300', '\204', '=', 'R', '\016', 'd', 'n', 's', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', '\022', 'e', '\n', '\030', 'd',
+'n', 's', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 'r', 'a', 't', 'e', '\030', ',',
+' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't',
+'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e',
+'R', '\025', 'd', 'n', 's', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', '\022', '&',
+'\n', '\017', 'r', 'e', 's', 'p', 'e', 'c', 't', '_', 'd', 'n', 's', '_', 't', 't', 'l', '\030', '\'', ' ', '\001', '(', '\010', 'R', '\r',
+'r', 'e', 's', 'p', 'e', 'c', 't', 'D', 'n', 's', 'T', 't', 'l', '\022', 'f', '\n', '\021', 'd', 'n', 's', '_', 'l', 'o', 'o', 'k',
+'u', 'p', '_', 'f', 'a', 'm', 'i', 'l', 'y', '\030', '\021', ' ', '\001', '(', '\016', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.',
+'D', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 'F', 'a', 'm', 'i', 'l', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001',
+'R', '\017', 'd', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 'F', 'a', 'm', 'i', 'l', 'y', '\022', 'B', '\n', '\r', 'd', 'n', 's', '_',
+'r', 'e', 's', 'o', 'l', 'v', 'e', 'r', 's', '\030', '\022', ' ', '\003', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'R', '\014', 'd', 'n',
+'s', 'R', 'e', 's', 'o', 'l', 'v', 'e', 'r', 's', '\022', '4', '\n', '\027', 'u', 's', 'e', '_', 't', 'c', 'p', '_', 'f', 'o', 'r',
+'_', 'd', 'n', 's', '_', 'l', 'o', 'o', 'k', 'u', 'p', 's', '\030', '-', ' ', '\001', '(', '\010', 'R', '\023', 'u', 's', 'e', 'T', 'c',
+'p', 'F', 'o', 'r', 'D', 'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 's', '\022', 'V', '\n', '\021', 'o', 'u', 't', 'l', 'i', 'e', 'r',
+'_', 'd', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\023', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'O', 'u', 't', 'l', 'i', 'e', 'r',
+'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', 'R', '\020', 'o', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i',
+'o', 'n', '\022', 'N', '\n', '\020', 'c', 'l', 'e', 'a', 'n', 'u', 'p', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\024', ' ',
+'\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\017', 'c', 'l', 'e', 'a', 'n', 'u', 'p', 'I',
+'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'R', '\n', '\024', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'b', 'i', 'n', 'd', '_',
+'c', 'o', 'n', 'f', 'i', 'g', '\030', '\025', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\022', 'u', 'p',
+'s', 't', 'r', 'e', 'a', 'm', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'Y', '\n', '\020', 'l', 'b', '_', 's', 'u',
+'b', 's', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\026', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e',
+'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'l', 'b', 'S', 'u', 'b', 's', 'e',
+'t', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'b', '\n', '\023', 'r', 'i', 'n', 'g', '_', 'h', 'a', 's', 'h', '_', 'l', 'b', '_', 'c',
+'o', 'n', 'f', 'i', 'g', '\030', '\027', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'i', 'n', 'g',
+'H', 'a', 's', 'h', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\001', 'R', '\020', 'r', 'i', 'n', 'g', 'H', 'a', 's', 'h', 'L',
+'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '[', '\n', '\020', 'm', 'a', 'g', 'l', 'e', 'v', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f',
+'i', 'g', '\030', '4', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c',
+'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'M', 'a', 'g', 'l', 'e', 'v', 'L',
+'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\001', 'R', '\016', 'm', 'a', 'g', 'l', 'e', 'v', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g',
+'\022', 'k', '\n', '\026', 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', '_', 'd', 's', 't', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\"', ' ', '\001', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l',
+'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'O', 'r', 'i', 'g', 'i', 'n', 'a', 'l',
+'D', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\001', 'R', '\023', 'o', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'D', 's',
+'t', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'n', '\n', '\027', 'l', 'e', 'a', 's', 't', '_', 'r', 'e', 'q', 'u', 'e', 's',
+'t', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '%', ' ', '\001', '(', '\013', '2', '5', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e',
+'r', '.', 'L', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\001', 'R',
+'\024', 'l', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'Y', '\n', '\020',
+'c', 'o', 'm', 'm', 'o', 'n', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\033', ' ', '\001', '(', '\013', '2', '/', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C',
+'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'c', 'o',
+'m', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'P', '\n', '\020', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't',
+'_', 's', 'o', 'c', 'k', 'e', 't', '\030', '\030', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k',
+'e', 't', 'R', '\017', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', '\022', ':', '\n', '\010', 'm', 'e',
+'t', 'a', 'd', 'a', 't', 'a', '\030', '\031', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a',
+'d', 'a', 't', 'a', '\022', 'l', '\n', '\022', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 's', 'e', 'l', 'e', 'c', 't', 'i', 'o',
+'n', '\030', '\032', ' ', '\001', '(', '\016', '2', '9', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l',
+'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'P',
+'r', 'o', 't', 'o', 'c', 'o', 'l', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'B', '\002', '\030', '\001', 'R', '\021', 'p', 'r', 'o',
+'t', 'o', 'c', 'o', 'l', 'S', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '\022', 'r', '\n', '\033', 'u', 'p', 's', 't', 'r', 'e', 'a',
+'m', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\036', ' ', '\001', '(',
+'\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.',
+'v', '3', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'O', 'p', 't', 'i',
+'o', 'n', 's', 'R', '\031', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'O', 'p',
+'t', 'i', 'o', 'n', 's', '\022', 'U', '\n', '(', 'c', 'l', 'o', 's', 'e', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'s', '_', 'o', 'n', '_', 'h', 'o', 's', 't', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030',
+'\037', ' ', '\001', '(', '\010', 'R', '#', 'c', 'l', 'o', 's', 'e', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's', 'O', 'n',
+'H', 'o', 's', 't', 'H', 'e', 'a', 'l', 't', 'h', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', '@', '\n', '\035', 'i', 'g', 'n', 'o',
+'r', 'e', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'o', 'n', '_', 'h', 'o', 's', 't', '_', 'r', 'e', 'm', 'o', 'v', 'a', 'l',
+'\030', ' ', ' ', '\001', '(', '\010', 'R', '\031', 'i', 'g', 'n', 'o', 'r', 'e', 'H', 'e', 'a', 'l', 't', 'h', 'O', 'n', 'H', 'o', 's',
+'t', 'R', 'e', 'm', 'o', 'v', 'a', 'l', '\022', '9', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '(', ' ', '\003', '(', '\013',
+'2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v',
+'3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\022', '`', '\n', '\025', 'l', 'o', 'a', 'd',
+'_', 'b', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', ')', ' ', '\001', '(', '\013', '2', ',',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.',
+'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\023', 'l', 'o', 'a', 'd',
+'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'A', '\n', '\n', 'l', 'r', 's', '_', 's', 'e',
+'r', 'v', 'e', 'r', '\030', '*', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'l', 'r',
+'s', 'S', 'e', 'r', 'v', 'e', 'r', '\022', '6', '\n', '\025', 't', 'r', 'a', 'c', 'k', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '_',
+'b', 'u', 'd', 'g', 'e', 't', 's', '\030', '/', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', 'R', '\023', 't', 'r', 'a', 'c', 'k', 'T',
+'i', 'm', 'e', 'o', 'u', 't', 'B', 'u', 'd', 'g', 'e', 't', 's', '\022', 'S', '\n', '\017', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm',
+'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '0', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'Z',
+'\n', '\023', 't', 'r', 'a', 'c', 'k', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 's', 't', 'a', 't', 's', '\030', '1', ' ', '\001',
+'(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r',
+'.', 'v', '3', '.', 'T', 'r', 'a', 'c', 'k', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', 'R', '\021', 't', 'r',
+'a', 'c', 'k', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', '\022', '^', '\n', '\021', 'p', 'r', 'e', 'c', 'o', 'n',
+'n', 'e', 'c', 't', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '2', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e',
+'r', '.', 'P', 'r', 'e', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\020', 'p', 'r', 'e', 'c', 'o',
+'n', 'n', 'e', 'c', 't', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'X', '\n', ')', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'_', 'p', 'o', 'o', 'l', '_', 'p', 'e', 'r', '_', 'd', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', '_', 'c', 'o', 'n', 'n',
+'e', 'c', 't', 'i', 'o', 'n', '\030', '3', ' ', '\001', '(', '\010', 'R', '%', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P',
+'o', 'o', 'l', 'P', 'e', 'r', 'D', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o',
+'n', '\032', '\346', '\001', '\n', '\024', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'M', 'a', 't', 'c',
+'h', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R',
+'\004', 'n', 'a', 'm', 'e', '\022', '-', '\n', '\005', 'm', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'm', 'a', 't',
+'c', 'h', '\022', 'P', '\n', '\020', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '\030', '\003', ' ',
+'\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'R', '\017', 't', 'r', 'a', 'n', 's', 'p',
+'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', ':', '0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o',
+'c', 'k', 'e', 't', 'M', 'a', 't', 'c', 'h', '\032', '\230', '\001', '\n', '\021', 'C', 'u', 's', 't', 'o', 'm', 'C', 'l', 'u', 's', 't',
+'e', 'r', 'T', 'y', 'p', 'e', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '-', '\232', '\305', '\210', '\036', '(', '\n',
+'&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'u', 's',
+'t', 'o', 'm', 'C', 'l', 'u', 's', 't', 'e', 'r', 'T', 'y', 'p', 'e', '\032', '\246', '\001', '\n', '\020', 'E', 'd', 's', 'C', 'l', 'u',
+'s', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'A', '\n', '\n', 'e', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030',
+'\001', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'e', 'd', 's', 'C', 'o', 'n', 'f',
+'i', 'g', '\022', '!', '\n', '\014', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R',
+'\013', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', ':', ',', '\232', '\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'E', 'd', 's', 'C', 'l', 'u', 's', 't',
+'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\032', '\300', '\010', '\n', '\016', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f',
+'i', 'g', '\022', 'y', '\n', '\017', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\001', ' ', '\001',
+'(', '\016', '2', 'F', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r',
+'.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i',
+'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', 'B',
+'\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\016', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y',
+'\022', '>', '\n', '\016', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 's', 'u', 'b', 's', 'e', 't', '\030', '\002', ' ', '\001', '(', '\013', '2',
+'\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R',
+'\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'S', 'u', 'b', 's', 'e', 't', '\022', 'k', '\n', '\020', 's', 'u', 'b', 's', 'e', 't', '_',
+'s', 'e', 'l', 'e', 'c', 't', 'o', 'r', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.',
+'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e',
+'l', 'e', 'c', 't', 'o', 'r', 'R', '\017', 's', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 's', '\022', '2',
+'\n', '\025', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'w', 'e', 'i', 'g', 'h', 't', '_', 'a', 'w', 'a', 'r', 'e', '\030', '\004',
+' ', '\001', '(', '\010', 'R', '\023', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'A', 'w', 'a', 'r', 'e',
+'\022', '2', '\n', '\025', 's', 'c', 'a', 'l', 'e', '_', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'w', 'e', 'i', 'g', 'h', 't',
+'\030', '\005', ' ', '\001', '(', '\010', 'R', '\023', 's', 'c', 'a', 'l', 'e', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g',
+'h', 't', '\022', '$', '\n', '\016', 'p', 'a', 'n', 'i', 'c', '_', 'm', 'o', 'd', 'e', '_', 'a', 'n', 'y', '\030', '\006', ' ', '\001', '(',
+'\010', 'R', '\014', 'p', 'a', 'n', 'i', 'c', 'M', 'o', 'd', 'e', 'A', 'n', 'y', '\022', '\036', '\n', '\013', 'l', 'i', 's', 't', '_', 'a',
+'s', '_', 'a', 'n', 'y', '\030', '\007', ' ', '\001', '(', '\010', 'R', '\t', 'l', 'i', 's', 't', 'A', 's', 'A', 'n', 'y', '\032', '\332', '\003',
+'\n', '\020', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\022', '\022', '\n', '\004', 'k', 'e', 'y',
+'s', '\030', '\001', ' ', '\003', '(', '\t', 'R', '\004', 'k', 'e', 'y', 's', '\022', '3', '\n', '\026', 's', 'i', 'n', 'g', 'l', 'e', '_', 'h',
+'o', 's', 't', '_', 'p', 'e', 'r', '_', 's', 'u', 'b', 's', 'e', 't', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\023', 's', 'i', 'n',
+'g', 'l', 'e', 'H', 'o', 's', 't', 'P', 'e', 'r', 'S', 'u', 'b', 's', 'e', 't', '\022', '\222', '\001', '\n', '\017', 'f', 'a', 'l', 'l',
+'b', 'a', 'c', 'k', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\002', ' ', '\001', '(', '\016', '2', '_', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e',
+'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't',
+'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r',
+'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R',
+'\016', 'f', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '0', '\n', '\024', 'f', 'a', 'l', 'l', 'b', 'a',
+'c', 'k', '_', 'k', 'e', 'y', 's', '_', 's', 'u', 'b', 's', 'e', 't', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\022', 'f', 'a', 'l',
+'l', 'b', 'a', 'c', 'k', 'K', 'e', 'y', 's', 'S', 'u', 'b', 's', 'e', 't', '\"', 'y', '\n', '\036', 'L', 'b', 'S', 'u', 'b', 's',
+'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y', '\022',
+'\017', '\n', '\013', 'N', 'O', 'T', '_', 'D', 'E', 'F', 'I', 'N', 'E', 'D', '\020', '\000', '\022', '\017', '\n', '\013', 'N', 'O', '_', 'F', 'A',
+'L', 'L', 'B', 'A', 'C', 'K', '\020', '\001', '\022', '\020', '\n', '\014', 'A', 'N', 'Y', '_', 'E', 'N', 'D', 'P', 'O', 'I', 'N', 'T', '\020',
+'\002', '\022', '\022', '\n', '\016', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '_', 'S', 'U', 'B', 'S', 'E', 'T', '\020', '\003', '\022', '\017', '\n', '\013',
+'K', 'E', 'Y', 'S', '_', 'S', 'U', 'B', 'S', 'E', 'T', '\020', '\004', ':', ';', '\232', '\305', '\210', '\036', '6', '\n', '4', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e',
+'t', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\"',
+'O', '\n', '\026', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'F', 'a', 'l', 'l', 'b', 'a', 'c', 'k', 'P', 'o', 'l', 'i', 'c', 'y',
+'\022', '\017', '\n', '\013', 'N', 'O', '_', 'F', 'A', 'L', 'L', 'B', 'A', 'C', 'K', '\020', '\000', '\022', '\020', '\n', '\014', 'A', 'N', 'Y', '_',
+'E', 'N', 'D', 'P', 'O', 'I', 'N', 'T', '\020', '\001', '\022', '\022', '\n', '\016', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '_', 'S', 'U', 'B',
+'S', 'E', 'T', '\020', '\002', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v',
+'2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'b', 'S', 'u', 'b', 's', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\032',
+'\347', '\001', '\n', '\024', 'L', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022',
+'H', '\n', '\014', 'c', 'h', 'o', 'i', 'c', 'e', '_', 'c', 'o', 'u', 'n', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u',
+'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\002', 'R', '\013', 'c', 'h', 'o', 'i', 'c', 'e', 'C', 'o', 'u', 'n', 't', '\022', 'S',
+'\n', '\023', 'a', 'c', 't', 'i', 'v', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'b', 'i', 'a', 's', '\030', '\002', ' ', '\001',
+'(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'D', 'o', 'u', 'b', 'l', 'e', 'R', '\021', 'a', 'c', 't', 'i', 'v', 'e', 'R', 'e', 'q',
+'u', 'e', 's', 't', 'B', 'i', 'a', 's', ':', '0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'L', 'e', 'a', 's', 't', 'R', 'e', 'q', 'u', 'e', 's', 't',
+'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\032', '\221', '\003', '\n', '\020', 'R', 'i', 'n', 'g', 'H', 'a', 's', 'h', 'L', 'b', 'C', 'o',
+'n', 'f', 'i', 'g', '\022', 'T', '\n', '\021', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_', 'r', 'i', 'n', 'g', '_', 's', 'i', 'z', 'e',
+'\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', 'B', '\n', '\372', 'B', '\007', '2', '\005', '\030', '\200', '\200', '\200', '\004', 'R', '\017',
+'m', 'i', 'n', 'i', 'm', 'u', 'm', 'R', 'i', 'n', 'g', 'S', 'i', 'z', 'e', '\022', 'm', '\n', '\r', 'h', 'a', 's', 'h', '_', 'f',
+'u', 'n', 'c', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', '(', '\016', '2', '>', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'i',
+'n', 'g', 'H', 'a', 's', 'h', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'H', 'a', 's', 'h', 'F', 'u', 'n', 'c', 't', 'i',
+'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\014', 'h', 'a', 's', 'h', 'F', 'u', 'n', 'c', 't', 'i', 'o',
+'n', '\022', 'T', '\n', '\021', 'm', 'a', 'x', 'i', 'm', 'u', 'm', '_', 'r', 'i', 'n', 'g', '_', 's', 'i', 'z', 'e', '\030', '\004', ' ',
+'\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n',
+'t', '6', '4', 'V', 'a', 'l', 'u', 'e', 'B', '\n', '\372', 'B', '\007', '2', '\005', '\030', '\200', '\200', '\200', '\004', 'R', '\017', 'm', 'a', 'x',
+'i', 'm', 'u', 'm', 'R', 'i', 'n', 'g', 'S', 'i', 'z', 'e', '\"', '.', '\n', '\014', 'H', 'a', 's', 'h', 'F', 'u', 'n', 'c', 't',
+'i', 'o', 'n', '\022', '\013', '\n', '\007', 'X', 'X', '_', 'H', 'A', 'S', 'H', '\020', '\000', '\022', '\021', '\n', '\r', 'M', 'U', 'R', 'M', 'U',
+'R', '_', 'H', 'A', 'S', 'H', '_', '2', '\020', '\001', ':', ',', '\232', '\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.',
+'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'i', 'n', 'g', 'H', 'a', 's', 'h', 'L', 'b',
+'C', 'o', 'n', 'f', 'i', 'g', 'J', '\004', '\010', '\002', '\020', '\003', '\032', 'M', '\n', '\016', 'M', 'a', 'g', 'l', 'e', 'v', 'L', 'b', 'C',
+'o', 'n', 'f', 'i', 'g', '\022', ';', '\n', '\n', 't', 'a', 'b', 'l', 'e', '_', 's', 'i', 'z', 'e', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '6', '4',
+'V', 'a', 'l', 'u', 'e', 'R', '\t', 't', 'a', 'b', 'l', 'e', 'S', 'i', 'z', 'e', '\032', 'n', '\n', '\023', 'O', 'r', 'i', 'g', 'i',
+'n', 'a', 'l', 'D', 's', 't', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '&', '\n', '\017', 'u', 's', 'e', '_', 'h', 't', 't',
+'p', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\r', 'u', 's', 'e', 'H', 't', 't', 'p', 'H', 'e',
+'a', 'd', 'e', 'r', ':', '/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2',
+'.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'O', 'r', 'i', 'g', 'i', 'n', 'a', 'l', 'D', 's', 't', 'L', 'b', 'C', 'o', 'n',
+'f', 'i', 'g', '\032', '\374', '\n', '\n', '\016', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'N', '\n',
+'\027', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 'p', 'a', 'n', 'i', 'c', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030',
+'\001', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r',
+'c', 'e', 'n', 't', 'R', '\025', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'P', 'a', 'n', 'i', 'c', 'T', 'h', 'r', 'e', 's', 'h', 'o',
+'l', 'd', '\022', 't', '\n', '\024', 'z', 'o', 'n', 'e', '_', 'a', 'w', 'a', 'r', 'e', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\002', ' ', '\001', '(', '\013', '2', 'A', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l',
+'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b',
+'C', 'o', 'n', 'f', 'i', 'g', '.', 'Z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H',
+'\000', 'R', '\021', 'z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\211', '\001', '\n', '\033',
+'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'w', 'e', 'i', 'g', 'h', 't', 'e', 'd', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f',
+'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', 'H', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c',
+'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L',
+'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'L',
+'b', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\000', 'R', '\030', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't',
+'e', 'd', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'I', '\n', '\023', 'u', 'p', 'd', 'a', 't', 'e', '_', 'm', 'e', 'r', 'g',
+'e', '_', 'w', 'i', 'n', 'd', 'o', 'w', '\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', '\021', 'u', 'p', 'd', 'a', 't', 'e', 'M',
+'e', 'r', 'g', 'e', 'W', 'i', 'n', 'd', 'o', 'w', '\022', 'C', '\n', '\037', 'i', 'g', 'n', 'o', 'r', 'e', '_', 'n', 'e', 'w', '_',
+'h', 'o', 's', 't', 's', '_', 'u', 'n', 't', 'i', 'l', '_', 'f', 'i', 'r', 's', 't', '_', 'h', 'c', '\030', '\005', ' ', '\001', '(',
+'\010', 'R', '\032', 'i', 'g', 'n', 'o', 'r', 'e', 'N', 'e', 'w', 'H', 'o', 's', 't', 's', 'U', 'n', 't', 'i', 'l', 'F', 'i', 'r',
+'s', 't', 'H', 'c', '\022', 'M', '\n', '$', 'c', 'l', 'o', 's', 'e', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's',
+'_', 'o', 'n', '_', 'h', 'o', 's', 't', '_', 's', 'e', 't', '_', 'c', 'h', 'a', 'n', 'g', 'e', '\030', '\006', ' ', '\001', '(', '\010',
+'R', '\037', 'c', 'l', 'o', 's', 'e', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 's', 'O', 'n', 'H', 'o', 's', 't', 'S',
+'e', 't', 'C', 'h', 'a', 'n', 'g', 'e', '\022', '\212', '\001', '\n', '\034', 'c', 'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', '_', 'h',
+'a', 's', 'h', 'i', 'n', 'g', '_', 'l', 'b', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\007', ' ', '\001', '(', '\013', '2', 'I', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C',
+'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'C', 'o', 'n',
+'s', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', 's', 'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\031', 'c',
+'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', 's', 'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\032',
+'\215', '\002', '\n', '\021', 'Z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '?', '\n', '\017',
+'r', 'o', 'u', 't', 'i', 'n', 'g', '_', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '\026', '.', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'r', 'o', 'u',
+'t', 'i', 'n', 'g', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\022', 'F', '\n', '\020', 'm', 'i', 'n', '_', 'c', 'l', 'u', 's', 't', 'e',
+'r', '_', 's', 'i', 'z', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'm', 'i', 'n', 'C', 'l', 'u',
+'s', 't', 'e', 'r', 'S', 'i', 'z', 'e', '\022', '1', '\n', '\025', 'f', 'a', 'i', 'l', '_', 't', 'r', 'a', 'f', 'f', 'i', 'c', '_',
+'o', 'n', '_', 'p', 'a', 'n', 'i', 'c', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\022', 'f', 'a', 'i', 'l', 'T', 'r', 'a', 'f', 'f',
+'i', 'c', 'O', 'n', 'P', 'a', 'n', 'i', 'c', ':', '<', '\232', '\305', '\210', '\036', '7', '\n', '5', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n',
+'f', 'i', 'g', '.', 'Z', 'o', 'n', 'e', 'A', 'w', 'a', 'r', 'e', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\032', '_', '\n', '\030',
+'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', ':',
+'C', '\232', '\305', '\210', '\036', '>', '\n', '<', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's',
+'t', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'L', 'o', 'c', 'a', 'l', 'i',
+'t', 'y', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\032', '\361', '\001', '\n', '\031', 'C', 'o',
+'n', 's', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', 's', 'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '7',
+'\n', '\030', 'u', 's', 'e', '_', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '_', 'f', 'o', 'r', '_', 'h', 'a', 's', 'h', 'i', 'n',
+'g', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\025', 'u', 's', 'e', 'H', 'o', 's', 't', 'n', 'a', 'm', 'e', 'F', 'o', 'r', 'H', 'a',
+'s', 'h', 'i', 'n', 'g', '\022', 'U', '\n', '\023', 'h', 'a', 's', 'h', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 'f', 'a', 'c',
+'t', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', 'd', 'R', '\021',
+'h', 'a', 's', 'h', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'F', 'a', 'c', 't', 'o', 'r', ':', 'D', '\232', '\305', '\210', '\036', '?', '\n',
+'=', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm',
+'m', 'o', 'n', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'C', 'o', 'n', 's', 'i', 's', 't', 'e', 'n', 't', 'H', 'a', 's',
+'h', 'i', 'n', 'g', 'L', 'b', 'C', 'o', 'n', 'f', 'i', 'g', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'L', 'b',
+'C', 'o', 'n', 'f', 'i', 'g', 'B', '\033', '\n', '\031', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '_', 'c', 'o', 'n', 'f', 'i', 'g',
+'_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\032', '\322', '\001', '\n', '\013', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't',
+'e', '\022', 'N', '\n', '\r', 'b', 'a', 's', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\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', 'B', '\016', '\372', 'B', '\013', '\252', '\001', '\010', '\010', '\001', '*', '\004', '\020', '\300', '\204', '=', 'R', '\014', 'b', 'a', 's', 'e', 'I', 'n',
+'t', 'e', 'r', 'v', 'a', 'l', '\022', 'J', '\n', '\014', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ',
+'\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', 'B', '\014', '\372', 'B', '\t', '\252', '\001', '\006', '*', '\004', '\020', '\300', '\204', '=', 'R', '\013', 'm', 'a', 'x', 'I',
+'n', 't', 'e', 'r', 'v', 'a', 'l', ':', '\'', '\232', '\305', '\210', '\036', '\"', '\n', ' ', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i',
+'.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'R', 'a', 't', 'e', '\032', '\203',
+'\002', '\n', '\020', 'P', 'r', 'e', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'x', '\n', '\035', 'p', 'e',
+'r', '_', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'p', 'r', 'e', 'c', 'o', 'n', 'n', 'e', 'c', 't', '_', 'r', 'a', 't',
+'i', 'o', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'D', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', 'B', '\027', '\372', 'B', '\024', '\022', '\022', '\031', '\000', '\000', '\000', '\000',
+'\000', '\000', '\010', '@', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', 'R', '\032', 'p', 'e', 'r', 'U', 'p', 's', 't', 'r', 'e', 'a',
+'m', 'P', 'r', 'e', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'R', 'a', 't', 'i', 'o', '\022', 'u', '\n', '\033', 'p', 'r', 'e', 'd', 'i',
+'c', 't', 'i', 'v', 'e', '_', 'p', 'r', 'e', 'c', 'o', 'n', 'n', 'e', 'c', 't', '_', 'r', 'a', 't', 'i', 'o', '\030', '\002', ' ',
+'\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'o', 'u',
+'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', 'B', '\027', '\372', 'B', '\024', '\022', '\022', '\031', '\000', '\000', '\000', '\000', '\000', '\000', '\010', '@', ')',
+'\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', 'R', '\031', 'p', 'r', 'e', 'd', 'i', 'c', 't', 'i', 'v', 'e', 'P', 'r', 'e', 'c', 'o',
+'n', 'n', 'e', 'c', 't', 'R', 'a', 't', 'i', 'o', '\032', 'f', '\n', '\"', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020',
+'\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', 'e',
+'\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'A', 'n', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', 'W', '\n', '\r', 'D', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', 'T', 'y', 'p', 'e', '\022', '\n', '\n', '\006', 'S', 'T', 'A', 'T', 'I', 'C', '\020', '\000', '\022', '\016', '\n', '\n', 'S', 'T', 'R',
+'I', 'C', 'T', '_', 'D', 'N', 'S', '\020', '\001', '\022', '\017', '\n', '\013', 'L', 'O', 'G', 'I', 'C', 'A', 'L', '_', 'D', 'N', 'S', '\020',
+'\002', '\022', '\007', '\n', '\003', 'E', 'D', 'S', '\020', '\003', '\022', '\020', '\n', '\014', 'O', 'R', 'I', 'G', 'I', 'N', 'A', 'L', '_', 'D', 'S',
+'T', '\020', '\004', '\"', '\244', '\001', '\n', '\010', 'L', 'b', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '\017', '\n', '\013', 'R', 'O', 'U', 'N', 'D',
+'_', 'R', 'O', 'B', 'I', 'N', '\020', '\000', '\022', '\021', '\n', '\r', 'L', 'E', 'A', 'S', 'T', '_', 'R', 'E', 'Q', 'U', 'E', 'S', 'T',
+'\020', '\001', '\022', '\r', '\n', '\t', 'R', 'I', 'N', 'G', '_', 'H', 'A', 'S', 'H', '\020', '\002', '\022', '\n', '\n', '\006', 'R', 'A', 'N', 'D',
+'O', 'M', '\020', '\003', '\022', '\n', '\n', '\006', 'M', 'A', 'G', 'L', 'E', 'V', '\020', '\005', '\022', '\024', '\n', '\020', 'C', 'L', 'U', 'S', 'T',
+'E', 'R', '_', 'P', 'R', 'O', 'V', 'I', 'D', 'E', 'D', '\020', '\006', '\022', ' ', '\n', '\034', 'L', 'O', 'A', 'D', '_', 'B', 'A', 'L',
+'A', 'N', 'C', 'I', 'N', 'G', '_', 'P', 'O', 'L', 'I', 'C', 'Y', '_', 'C', 'O', 'N', 'F', 'I', 'G', '\020', '\007', '\"', '\004', '\010',
+'\004', '\020', '\004', '*', '\017', 'O', 'R', 'I', 'G', 'I', 'N', 'A', 'L', '_', 'D', 'S', 'T', '_', 'L', 'B', '\"', '5', '\n', '\017', 'D',
+'n', 's', 'L', 'o', 'o', 'k', 'u', 'p', 'F', 'a', 'm', 'i', 'l', 'y', '\022', '\010', '\n', '\004', 'A', 'U', 'T', 'O', '\020', '\000', '\022',
+'\013', '\n', '\007', 'V', '4', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\013', '\n', '\007', 'V', '6', '_', 'O', 'N', 'L', 'Y', '\020', '\002',
+'\"', 'T', '\n', '\030', 'C', 'l', 'u', 's', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'S', 'e', 'l', 'e', 'c', 't',
+'i', 'o', 'n', '\022', '\033', '\n', '\027', 'U', 'S', 'E', '_', 'C', 'O', 'N', 'F', 'I', 'G', 'U', 'R', 'E', 'D', '_', 'P', 'R', 'O',
+'T', 'O', 'C', 'O', 'L', '\020', '\000', '\022', '\033', '\n', '\027', 'U', 'S', 'E', '_', 'D', 'O', 'W', 'N', 'S', 'T', 'R', 'E', 'A', 'M',
+'_', 'P', 'R', 'O', 'T', 'O', 'C', 'O', 'L', '\020', '\001', ':', '\033', '\232', '\305', '\210', '\036', '\026', '\n', '\024', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'B', '\030', '\n', '\026', 'c', 'l', 'u', 's', 't', 'e',
+'r', '_', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '_', 't', 'y', 'p', 'e', 'B', '\013', '\n', '\t', 'l', 'b', '_', 'c', 'o',
+'n', 'f', 'i', 'g', 'J', '\004', '\010', '\014', '\020', '\r', 'J', '\004', '\010', '\017', '\020', '\020', 'J', '\004', '\010', '\007', '\020', '\010', 'J', '\004', '\010',
+'\013', '\020', '\014', 'J', '\004', '\010', '#', '\020', '$', 'R', '\005', 'h', 'o', 's', 't', 's', 'R', '\013', 't', 'l', 's', '_', 'c', 'o', 'n',
+'t', 'e', 'x', 't', 'R', '\032', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_',
+'o', 'p', 't', 'i', 'o', 'n', 's', '\"', '\245', '\002', '\n', '\023', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g',
+'P', 'o', 'l', 'i', 'c', 'y', '\022', 'O', '\n', '\010', 'p', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2',
+'3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3',
+'.', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'P', 'o', 'l', 'i',
+'c', 'y', 'R', '\010', 'p', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\032', '\223', '\001', '\n', '\006', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '\022',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '7', '\n', '\014', 't', 'y', 'p',
+'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g',
+':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'o', 'a',
+'d', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'P', 'o', 'l', 'i', 'c', 'y', 'J', '\004',
+'\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', ':', '\'', '\232', '\305', '\210', '\036', '\"', '\n', ' ', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'P', 'o', 'l',
+'i', 'c', 'y', '\"', '\202', '\001', '\n', '\022', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i',
+'g', '\022', 'D', '\n', '\016', 's', 'o', 'u', 'r', 'c', 'e', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A',
+'d', 'd', 'r', 'e', 's', 's', 'R', '\r', 's', 'o', 'u', 'r', 'c', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', ':', '&', '\232', '\305',
+'\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'U', 'p', 's', 't', 'r', 'e', 'a',
+'m', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\"', '\223', '\001', '\n', '\031', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C',
+'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'G', '\n', '\r', 't', 'c', 'p', '_', 'k',
+'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'c', 'p', 'K', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e',
+'R', '\014', 't', 'c', 'p', 'K', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', 'o', 'n', 'n', 'e', 'c',
+'t', 'i', 'o', 'n', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', 'r', '\n', '\021', 'T', 'r', 'a', 'c', 'k', 'C', 'l', 'u', 's', 't',
+'e', 'r', 'S', 't', 'a', 't', 's', '\022', '\'', '\n', '\017', 't', 'i', 'm', 'e', 'o', 'u', 't', '_', 'b', 'u', 'd', 'g', 'e', 't',
+'s', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\016', 't', 'i', 'm', 'e', 'o', 'u', 't', 'B', 'u', 'd', 'g', 'e', 't', 's', '\022', '4',
+'\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 's', 'i', 'z', 'e', 's', '\030',
+'\002', ' ', '\001', '(', '\010', 'R', '\024', 'r', 'e', 'q', 'u', 'e', 's', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'S', 'i', 'z',
+'e', 's', 'B', '?', '\n', '%', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', 'B', '\014', 'C', 'l', 'u', 's', 't',
+'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[21] = {
+ &envoy_config_cluster_v3_circuit_breaker_proto_upbdefinit,
+ &envoy_config_cluster_v3_filter_proto_upbdefinit,
+ &envoy_config_cluster_v3_outlier_detection_proto_upbdefinit,
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_config_source_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_config_core_v3_health_check_proto_upbdefinit,
+ &envoy_config_core_v3_protocol_proto_upbdefinit,
+ &envoy_config_endpoint_v3_endpoint_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &xds_core_v3_collection_entry_proto_upbdefinit,
+ &udpa_annotations_security_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_cluster_v3_cluster_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/cluster/v3/cluster.proto",
+ UPB_STRVIEW_INIT(descriptor, 10750)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h
new file mode 100644
index 00000000000..1bbc89979ac
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h
@@ -0,0 +1,145 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/cluster.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CLUSTER_V3_CLUSTER_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CLUSTER_V3_CLUSTER_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_def_init envoy_config_cluster_v3_cluster_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_ClusterCollection_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.ClusterCollection");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_TransportSocketMatch_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.TransportSocketMatch");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_CustomClusterType_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.CustomClusterType");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_EdsClusterConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.EdsClusterConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_LbSubsetConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.LbSubsetConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_LbSubsetConfig_LbSubsetSelector_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.LbSubsetConfig.LbSubsetSelector");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_LeastRequestLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.LeastRequestLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_RingHashLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.RingHashLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_MaglevLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.MaglevLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_OriginalDstLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.OriginalDstLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_CommonLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.CommonLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_CommonLbConfig_ZoneAwareLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.CommonLbConfig.ZoneAwareLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_CommonLbConfig_LocalityWeightedLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.CommonLbConfig.LocalityWeightedLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_CommonLbConfig_ConsistentHashingLbConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.CommonLbConfig.ConsistentHashingLbConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_RefreshRate_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.RefreshRate");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_PreconnectPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.PreconnectPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Cluster_TypedExtensionProtocolOptionsEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Cluster.TypedExtensionProtocolOptionsEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_LoadBalancingPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.LoadBalancingPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_LoadBalancingPolicy_Policy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.LoadBalancingPolicy.Policy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_UpstreamBindConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.UpstreamBindConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_UpstreamConnectionOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.UpstreamConnectionOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_TrackClusterStats_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.TrackClusterStats");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CLUSTER_V3_CLUSTER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c
new file mode 100644
index 00000000000..fbd5db06baf
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c
@@ -0,0 +1,53 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/filter.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/cluster/v3/filter.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_cluster_v3_Filter_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_cluster_v3_Filter_msginit,
+};
+
+static const char descriptor[386] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3',
+'/', 'f', 'i', 'l', 't', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n',
+'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'.', 'p', 'r', 'o', 't', 'o', '\"', '\202', '\001', '\n', '\006', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e',
+'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '7', '\n', '\014',
+'t', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g',
+'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n',
+'f', 'i', 'g', ':', '\"', '\232', '\305', '\210', '\036', '\035', '\n', '\033', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'B', '>', '\n', '%', 'i', 'o', '.', 'e', 'n', 'v', 'o',
+'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't',
+'e', 'r', '.', 'v', '3', 'B', '\013', 'F', 'i', 'l', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006',
+'\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_cluster_v3_filter_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/cluster/v3/filter.proto",
+ UPB_STRVIEW_INIT(descriptor, 386)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h
new file mode 100644
index 00000000000..2d4c025882a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/filter.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CLUSTER_V3_FILTER_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CLUSTER_V3_FILTER_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_def_init envoy_config_cluster_v3_filter_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_Filter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_filter_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.Filter");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CLUSTER_V3_FILTER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c
new file mode 100644
index 00000000000..8ab795d9b2b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c
@@ -0,0 +1,136 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/outlier_detection.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/cluster/v3/outlier_detection.upbdefs.h"
+
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_cluster_v3_OutlierDetection_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_cluster_v3_OutlierDetection_msginit,
+};
+
+static const char descriptor[2423] = {'\n', '/', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v', '3',
+'/', 'o', 'u', 't', 'l', 'i', 'e', 'r', '_', 'd', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022',
+'\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '\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', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w',
+'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a',
+'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p',
+'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p',
+'r', 'o', 't', 'o', '\"', '\275', '\020', '\n', '\020', 'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n',
+'\022', 'E', '\n', '\017', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', '5', 'x', 'x', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2',
+'V', 'a', 'l', 'u', 'e', 'R', '\016', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '5', 'x', 'x', '\022', '?', '\n', '\010',
+'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*',
+'\000', 'R', '\010', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'Q', '\n', '\022', 'b', 'a', 's', 'e', '_', 'e', 'j', 'e', 'c', 't',
+'i', 'o', 'n', '_', 't', 'i', 'm', 'e', '\030', '\003', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*',
+'\000', 'R', '\020', 'b', 'a', 's', 'e', 'E', 'j', 'e', 'c', 't', 'i', 'o', 'n', 'T', 'i', 'm', 'e', '\022', 'W', '\n', '\024', 'm', 'a',
+'x', '_', 'e', 'j', 'e', 'c', 't', 'i', 'o', 'n', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', '\030', '\004', ' ', '\001', '(', '\013', '2',
+'\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V',
+'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\022', 'm', 'a', 'x', 'E', 'j', 'e', 'c', 't', 'i', 'o',
+'n', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', 'a', '\n', '\031', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'c', 'o', 'n',
+'s', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', '5', 'x', 'x', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g',
+'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007',
+'\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\027', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'C', 'o', 'n', 's', 'e', 'c', 'u',
+'t', 'i', 'v', 'e', '5', 'x', 'x', '\022', '[', '\n', '\026', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 's', 'u', 'c', 'c',
+'e', 's', 's', '_', 'r', 'a', 't', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*',
+'\002', '\030', 'd', 'R', '\024', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'S', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e',
+'\022', 'Y', '\n', '\032', 's', 'u', 'c', 'c', 'e', 's', 's', '_', 'r', 'a', 't', 'e', '_', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_',
+'h', 'o', 's', 't', 's', '\030', '\007', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\027', 's', 'u', 'c', 'c', 'e', 's', 's',
+'R', 'a', 't', 'e', 'M', 'i', 'n', 'i', 'm', 'u', 'm', 'H', 'o', 's', 't', 's', '\022', '[', '\n', '\033', 's', 'u', 'c', 'c', 'e',
+'s', 's', '_', 'r', 'a', 't', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'v', 'o', 'l', 'u', 'm', 'e', '\030', '\010', ' ',
+'\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n',
+'t', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\030', 's', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e', 'R', 'e', 'q', 'u',
+'e', 's', 't', 'V', 'o', 'l', 'u', 'm', 'e', '\022', 'W', '\n', '\031', 's', 'u', 'c', 'c', 'e', 's', 's', '_', 'r', 'a', 't', 'e',
+'_', 's', 't', 'd', 'e', 'v', '_', 'f', 'a', 'c', 't', 'o', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o',
+'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R',
+'\026', 's', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e', 'S', 't', 'd', 'e', 'v', 'F', 'a', 'c', 't', 'o', 'r', '\022', '\\',
+'\n', '\033', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'g', 'a', 't', 'e', 'w', 'a', 'y', '_', 'f', 'a', 'i',
+'l', 'u', 'r', 'e', '\030', '\n', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\031', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't',
+'i', 'v', 'e', 'G', 'a', 't', 'e', 'w', 'a', 'y', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', 'x', '\n', '%', 'e', 'n', 'f', 'o',
+'r', 'c', 'i', 'n', 'g', '_', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'g', 'a', 't', 'e', 'w', 'a', 'y',
+'_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030', '\013', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*',
+'\002', '\030', 'd', 'R', '\"', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'C', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e',
+'G', 'a', 't', 'e', 'w', 'a', 'y', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', 'J', '\n', '\"', 's', 'p', 'l', 'i', 't', '_', 'e',
+'x', 't', 'e', 'r', 'n', 'a', 'l', '_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'e', 'r', 'r', 'o',
+'r', 's', '\030', '\014', ' ', '\001', '(', '\010', 'R', '\036', 's', 'p', 'l', 'i', 't', 'E', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'L', 'o',
+'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', 'E', 'r', 'r', 'o', 'r', 's', '\022', 'e', '\n', ' ', 'c', 'o', 'n', 's', 'e', 'c',
+'u', 't', 'i', 'v', 'e', '_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'f', 'a', 'i', 'l', 'u', 'r',
+'e', '\030', '\r', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\035', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e',
+'L', 'o', 'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', 'F', 'a', 'i', 'l', 'u', 'r', 'e', '\022', '\201', '\001', '\n', '*', 'e', 'n',
+'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'c', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'l', 'o', 'c', 'a', 'l',
+'_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '\030', '\016', ' ', '\001', '(', '\013', '2', '\034', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u',
+'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '&', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'C', 'o', 'n', 's',
+'e', 'c', 'u', 't', 'i', 'v', 'e', 'L', 'o', 'c', 'a', 'l', 'O', 'r', 'i', 'g', 'i', 'n', 'F', 'a', 'i', 'l', 'u', 'r', 'e',
+'\022', 's', '\n', '#', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i',
+'n', '_', 's', 'u', 'c', 'c', 'e', 's', 's', '_', 'r', 'a', 't', 'e', '\030', '\017', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e',
+'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\037', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'L', 'o', 'c', 'a', 'l',
+'O', 'r', 'i', 'g', 'i', 'n', 'S', 'u', 'c', 'c', 'e', 's', 's', 'R', 'a', 't', 'e', '\022', 'g', '\n', '\034', 'f', 'a', 'i', 'l',
+'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030',
+'\020', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U',
+'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '\032', 'f', 'a', 'i', 'l',
+'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'g', '\n',
+'\034', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n',
+'t', 'a', 'g', 'e', '\030', '\021', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R',
+'\032', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a',
+'g', 'e', '\022', '\177', '\n', ')', 'e', 'n', 'f', 'o', 'r', 'c', 'i', 'n', 'g', '_', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p',
+'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '_', 'l', 'o', 'c', 'a', 'l', '_', 'o', 'r', 'i', 'g', 'i', 'n', '\030', '\022', ' ',
+'\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n',
+'t', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '\030', 'd', 'R', '%', 'e', 'n', 'f', 'o', 'r', 'c',
+'i', 'n', 'g', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'L', 'o', 'c', 'a', 'l',
+'O', 'r', 'i', 'g', 'i', 'n', '\022', 'e', '\n', ' ', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't',
+'a', 'g', 'e', '_', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_', 'h', 'o', 's', 't', 's', '\030', '\023', ' ', '\001', '(', '\013', '2', '\034',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a',
+'l', 'u', 'e', 'R', '\035', 'f', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', 'M', 'i', 'n',
+'i', 'm', 'u', 'm', 'H', 'o', 's', 't', 's', '\022', 'g', '\n', '!', 'f', 'a', 'i', 'l', 'u', 'r', 'e', '_', 'p', 'e', 'r', 'c',
+'e', 'n', 't', 'a', 'g', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'v', 'o', 'l', 'u', 'm', 'e', '\030', '\024', ' ', '\001',
+'(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't',
+'3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\036', 'f', 'a', 'i', 'l', 'u', 'r', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g',
+'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'V', 'o', 'l', 'u', 'm', 'e', '\022', 'O', '\n', '\021', 'm', 'a', 'x', '_', 'e', 'j', 'e',
+'c', 't', 'i', 'o', 'n', '_', 't', 'i', 'm', 'e', '\030', '\025', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001',
+'\002', '*', '\000', 'R', '\017', 'm', 'a', 'x', 'E', 'j', 'e', 'c', 't', 'i', 'o', 'n', 'T', 'i', 'm', 'e', ':', ',', '\232', '\305', '\210',
+'\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.',
+'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'H', '\n', '%', 'i', 'o', '.', 'e', 'n',
+'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u',
+'s', 't', 'e', 'r', '.', 'v', '3', 'B', '\025', 'O', 'u', 't', 'l', 'i', 'e', 'r', 'D', 'e', 't', 'e', 'c', 't', 'i', 'o', 'n',
+'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_cluster_v3_outlier_detection_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/cluster/v3/outlier_detection.proto",
+ UPB_STRVIEW_INIT(descriptor, 2423)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h
new file mode 100644
index 00000000000..1f0551181f0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/cluster/v3/outlier_detection.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CLUSTER_V3_OUTLIER_DETECTION_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CLUSTER_V3_OUTLIER_DETECTION_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_def_init envoy_config_cluster_v3_outlier_detection_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_cluster_v3_OutlierDetection_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_cluster_v3_outlier_detection_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.cluster.v3.OutlierDetection");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CLUSTER_V3_OUTLIER_DETECTION_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c
new file mode 100644
index 00000000000..25a383a1a5f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c
@@ -0,0 +1,127 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/address.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/address.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_socket_option_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_Pipe_msginit;
+extern const upb_msglayout envoy_config_core_v3_EnvoyInternalAddress_msginit;
+extern const upb_msglayout envoy_config_core_v3_SocketAddress_msginit;
+extern const upb_msglayout envoy_config_core_v3_TcpKeepalive_msginit;
+extern const upb_msglayout envoy_config_core_v3_BindConfig_msginit;
+extern const upb_msglayout envoy_config_core_v3_Address_msginit;
+extern const upb_msglayout envoy_config_core_v3_CidrRange_msginit;
+
+static const upb_msglayout *layouts[7] = {
+ &envoy_config_core_v3_Pipe_msginit,
+ &envoy_config_core_v3_EnvoyInternalAddress_msginit,
+ &envoy_config_core_v3_SocketAddress_msginit,
+ &envoy_config_core_v3_TcpKeepalive_msginit,
+ &envoy_config_core_v3_BindConfig_msginit,
+ &envoy_config_core_v3_Address_msginit,
+ &envoy_config_core_v3_CidrRange_msginit,
+};
+
+static const char descriptor[1878] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'd',
+'d', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o',
+'r', 'e', '/', 'v', '3', '/', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r',
+'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's',
+'/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027',
+'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '`',
+'\n', '\004', 'P', 'i', 'p', 'e', '\022', '\033', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\034', '\n', '\004', 'm', 'o', 'd', 'e', '\030', '\002', ' ', '\001', '(', '\r', 'B',
+'\010', '\372', 'B', '\005', '*', '\003', '\030', '\377', '\003', 'R', '\004', 'm', 'o', 'd', 'e', ':', '\035', '\232', '\305', '\210', '\036', '\030', '\n', '\026', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'P', 'i', 'p', 'e', '\"', 'i', '\n', '\024',
+'E', 'n', 'v', 'o', 'y', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '2', '\n', '\024', 's',
+'e', 'r', 'v', 'e', 'r', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t',
+'H', '\000', 'R', '\022', 's', 'e', 'r', 'v', 'e', 'r', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'a', 'm', 'e', 'B', '\035', '\n',
+'\026', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', 'n', 'a', 'm', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003',
+'\370', 'B', '\001', '\"', '\366', '\002', '\n', '\r', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', 'R', '\n', '\010',
+'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\001', ' ', '\001', '(', '\016', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's',
+'s', '.', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\010', 'p', 'r', 'o',
+'t', 'o', 'c', 'o', 'l', '\022', '!', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372',
+'B', '\004', 'r', '\002', '\020', '\001', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '*', '\n', '\n', 'p', 'o', 'r', 't', '_', 'v',
+'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\r', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '\377', '\377', '\003', 'H', '\000', 'R', '\t',
+'p', 'o', 'r', 't', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', '\n', 'n', 'a', 'm', 'e', 'd', '_', 'p', 'o', 'r', 't', '\030', '\004',
+' ', '\001', '(', '\t', 'H', '\000', 'R', '\t', 'n', 'a', 'm', 'e', 'd', 'P', 'o', 'r', 't', '\022', '#', '\n', '\r', 'r', 'e', 's', 'o',
+'l', 'v', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\014', 'r', 'e', 's', 'o', 'l', 'v', 'e', 'r',
+'N', 'a', 'm', 'e', '\022', '\037', '\n', '\013', 'i', 'p', 'v', '4', '_', 'c', 'o', 'm', 'p', 'a', 't', '\030', '\006', ' ', '\001', '(', '\010',
+'R', '\n', 'i', 'p', 'v', '4', 'C', 'o', 'm', 'p', 'a', 't', '\"', '\034', '\n', '\010', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022',
+'\007', '\n', '\003', 'T', 'C', 'P', '\020', '\000', '\022', '\007', '\n', '\003', 'U', 'D', 'P', '\020', '\001', ':', '&', '\232', '\305', '\210', '\036', '!', '\n',
+'\037', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', 'k', 'e', 't',
+'A', 'd', 'd', 'r', 'e', 's', 's', 'B', '\025', '\n', '\016', 'p', 'o', 'r', 't', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r',
+'\022', '\003', '\370', 'B', '\001', '\"', '\220', '\002', '\n', '\014', 'T', 'c', 'p', 'K', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '\022', 'G', '\n',
+'\020', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '_', 'p', 'r', 'o', 'b', 'e', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a',
+'l', 'u', 'e', 'R', '\017', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'P', 'r', 'o', 'b', 'e', 's', '\022', 'C', '\n', '\016', 'k',
+'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '_', 't', 'i', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o',
+'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R',
+'\r', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'T', 'i', 'm', 'e', '\022', 'K', '\n', '\022', 'k', 'e', 'e', 'p', 'a', 'l', 'i',
+'v', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\021', 'k',
+'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'T', 'c', 'p', 'K', 'e', 'e', 'p',
+'a', 'l', 'i', 'v', 'e', '\"', '\212', '\002', '\n', '\n', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'T', '\n', '\016', 's',
+'o', 'u', 'r', 'c', 'e', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S', 'o', 'c', 'k', 'e', 't', 'A',
+'d', 'd', 'r', 'e', 's', 's', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\r', 's', 'o', 'u', 'r', 'c', 'e', 'A',
+'d', 'd', 'r', 'e', 's', 's', '\022', '6', '\n', '\010', 'f', 'r', 'e', 'e', 'b', 'i', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2',
+'\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l',
+'u', 'e', 'R', '\010', 'f', 'r', 'e', 'e', 'b', 'i', 'n', 'd', '\022', 'I', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p',
+'t', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\r', 's',
+'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 's', ':', '#', '\232', '\305', '\210', '\036', '\036', '\n', '\034', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'B', 'i', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\"',
+'\237', '\002', '\n', '\007', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', 'L', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'a', 'd', 'd',
+'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', 'H', '\000', 'R',
+'\r', 's', 'o', 'c', 'k', 'e', 't', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '0', '\n', '\004', 'p', 'i', 'p', 'e', '\030', '\002', ' ',
+'\001', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'P', 'i', 'p', 'e', 'H', '\000', 'R', '\004', 'p', 'i', 'p', 'e', '\022', 'b', '\n', '\026', 'e', 'n', 'v', 'o', 'y', '_', 'i',
+'n', 't', 'e', 'r', 'n', 'a', 'l', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '*', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'E', 'n', 'v', 'o', 'y',
+'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', 'H', '\000', 'R', '\024', 'e', 'n', 'v', 'o', 'y', 'I',
+'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', ':', ' ', '\232', '\305', '\210', '\036', '\033', '\n', '\031', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'B', '\016',
+'\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '\003', '\370', 'B', '\001', '\"', '\246', '\001', '\n', '\t', 'C', 'i', 'd', 'r', 'R', 'a',
+'n', 'g', 'e', '\022', '.', '\n', '\016', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\001', ' ', '\001',
+'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\r', 'a', 'd', 'd', 'r', 'e', 's', 's', 'P', 'r', 'e', 'f', 'i',
+'x', '\022', 'E', '\n', '\n', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'l', 'e', 'n', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u',
+'e', 'B', '\010', '\372', 'B', '\005', '*', '\003', '\030', '\200', '\001', 'R', '\t', 'p', 'r', 'e', 'f', 'i', 'x', 'L', 'e', 'n', ':', '\"', '\232',
+'\305', '\210', '\036', '\035', '\n', '\033', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C',
+'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', 'B', '<', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\014', 'A', 'd',
+'d', 'r', 'e', 's', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o',
+'t', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_config_core_v3_socket_option_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_address_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/address.proto",
+ UPB_STRVIEW_INIT(descriptor, 1878)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h
new file mode 100644
index 00000000000..0bc0604e580
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h
@@ -0,0 +1,65 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/address.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_ADDRESS_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_def_init envoy_config_core_v3_address_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Pipe_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Pipe");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_EnvoyInternalAddress_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.EnvoyInternalAddress");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_SocketAddress_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.SocketAddress");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_TcpKeepalive_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.TcpKeepalive");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_BindConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.BindConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Address_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Address");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_CidrRange_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_address_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.CidrRange");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_ADDRESS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c
new file mode 100644
index 00000000000..0b0bbdd401c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c
@@ -0,0 +1,56 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/backoff.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/backoff.upbdefs.h"
+
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_BackoffStrategy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_core_v3_BackoffStrategy_msginit,
+};
+
+static const char descriptor[465] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a',
+'c', 'k', 'o', 'f', 'f', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\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', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n',
+'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'.', 'p', 'r', 'o', 't', 'o', '\"', '\323', '\001', '\n', '\017', 'B', 'a', 'c', 'k', 'o', 'f', 'f', 'S', 't', 'r', 'a', 't', 'e', 'g',
+'y', '\022', 'N', '\n', '\r', 'b', 'a', 's', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\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', 'B', '\016', '\372', 'B', '\013', '\252', '\001', '\010', '\010', '\001', '2', '\004', '\020', '\300', '\204', '=', 'R', '\014', 'b', 'a', 's', 'e', 'I', 'n',
+'t', 'e', 'r', 'v', 'a', 'l', '\022', 'F', '\n', '\014', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ',
+'\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\013', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r',
+'v', 'a', 'l', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'c', 'o', 'r', 'e', '.', 'B', 'a', 'c', 'k', 'o', 'f', 'f', 'S', 't', 'r', 'a', 't', 'e', 'g', 'y', 'B', '<', '\n', '\"', 'i',
+'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\014', 'B', 'a', 'c', 'k', 'o', 'f', 'f', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272',
+'\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &google_protobuf_duration_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_backoff_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/backoff.proto",
+ UPB_STRVIEW_INIT(descriptor, 465)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h
new file mode 100644
index 00000000000..e6351d5f769
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/backoff.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_BACKOFF_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_BACKOFF_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_def_init envoy_config_core_v3_backoff_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_BackoffStrategy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_backoff_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.BackoffStrategy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_BACKOFF_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c
new file mode 100644
index 00000000000..a91ff3d6ac5
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c
@@ -0,0 +1,272 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/base.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/base.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_backoff_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_http_uri_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_semantic_version_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_migrate_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_Locality_msginit;
+extern const upb_msglayout envoy_config_core_v3_BuildVersion_msginit;
+extern const upb_msglayout envoy_config_core_v3_Extension_msginit;
+extern const upb_msglayout envoy_config_core_v3_Node_msginit;
+extern const upb_msglayout envoy_config_core_v3_Metadata_msginit;
+extern const upb_msglayout envoy_config_core_v3_Metadata_FilterMetadataEntry_msginit;
+extern const upb_msglayout envoy_config_core_v3_RuntimeUInt32_msginit;
+extern const upb_msglayout envoy_config_core_v3_RuntimePercent_msginit;
+extern const upb_msglayout envoy_config_core_v3_RuntimeDouble_msginit;
+extern const upb_msglayout envoy_config_core_v3_RuntimeFeatureFlag_msginit;
+extern const upb_msglayout envoy_config_core_v3_HeaderValue_msginit;
+extern const upb_msglayout envoy_config_core_v3_HeaderValueOption_msginit;
+extern const upb_msglayout envoy_config_core_v3_HeaderMap_msginit;
+extern const upb_msglayout envoy_config_core_v3_WatchedDirectory_msginit;
+extern const upb_msglayout envoy_config_core_v3_DataSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_RetryPolicy_msginit;
+extern const upb_msglayout envoy_config_core_v3_RemoteDataSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_AsyncDataSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_TransportSocket_msginit;
+extern const upb_msglayout envoy_config_core_v3_RuntimeFractionalPercent_msginit;
+extern const upb_msglayout envoy_config_core_v3_ControlPlane_msginit;
+
+static const upb_msglayout *layouts[21] = {
+ &envoy_config_core_v3_Locality_msginit,
+ &envoy_config_core_v3_BuildVersion_msginit,
+ &envoy_config_core_v3_Extension_msginit,
+ &envoy_config_core_v3_Node_msginit,
+ &envoy_config_core_v3_Metadata_msginit,
+ &envoy_config_core_v3_Metadata_FilterMetadataEntry_msginit,
+ &envoy_config_core_v3_RuntimeUInt32_msginit,
+ &envoy_config_core_v3_RuntimePercent_msginit,
+ &envoy_config_core_v3_RuntimeDouble_msginit,
+ &envoy_config_core_v3_RuntimeFeatureFlag_msginit,
+ &envoy_config_core_v3_HeaderValue_msginit,
+ &envoy_config_core_v3_HeaderValueOption_msginit,
+ &envoy_config_core_v3_HeaderMap_msginit,
+ &envoy_config_core_v3_WatchedDirectory_msginit,
+ &envoy_config_core_v3_DataSource_msginit,
+ &envoy_config_core_v3_RetryPolicy_msginit,
+ &envoy_config_core_v3_RemoteDataSource_msginit,
+ &envoy_config_core_v3_AsyncDataSource_msginit,
+ &envoy_config_core_v3_TransportSocket_msginit,
+ &envoy_config_core_v3_RuntimeFractionalPercent_msginit,
+ &envoy_config_core_v3_ControlPlane_msginit,
+};
+
+static const char descriptor[4473] = {'\n', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a',
+'s', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/',
+'v', '3', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c',
+'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 'c', 'k', 'o', 'f', 'f', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/',
+'h', 't', 't', 'p', '_', 'u', 'r', 'i', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p',
+'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y',
+'/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 's', 'e', 'm', 'a', 'n', 't', 'i', 'c', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a',
+'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't',
+'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 't', '\n', '\010', 'L', 'o', 'c',
+'a', 'l', 'i', 't', 'y', '\022', '\026', '\n', '\006', 'r', 'e', 'g', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\006', 'r', 'e',
+'g', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 'z', 'o', 'n', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\004', 'z', 'o', 'n', 'e', '\022',
+'\031', '\n', '\010', 's', 'u', 'b', '_', 'z', 'o', 'n', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\007', 's', 'u', 'b', 'Z', 'o', 'n',
+'e', ':', '!', '\232', '\305', '\210', '\036', '\034', '\n', '\032', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o',
+'r', 'e', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\"', '\244', '\001', '\n', '\014', 'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r', 's',
+'i', 'o', 'n', '\022', '8', '\n', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n',
+'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'V', 'e', 'r', 's', 'i',
+'o', 'n', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', '3', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\002',
+' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't',
+'r', 'u', 'c', 't', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r', 's',
+'i', 'o', 'n', '\"', '\342', '\001', '\n', '\t', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e',
+'\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\032', '\n', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\030',
+'\002', ' ', '\001', '(', '\t', 'R', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\022', '\'', '\n', '\017', 't', 'y', 'p', 'e', '_', 'd',
+'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\016', 't', 'y', 'p', 'e', 'D', 'e', 's', 'c',
+'r', 'i', 'p', 't', 'o', 'r', '\022', '<', '\n', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\004', ' ', '\001', '(', '\013', '2', '\"',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'B', 'u', 'i',
+'l', 'd', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', '\032', '\n', '\010', 'd', 'i', 's',
+'a', 'b', 'l', 'e', 'd', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\010', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', ':', '\"', '\232', '\305',
+'\210', '\036', '\035', '\n', '\033', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'E', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', '\"', '\345', '\004', '\n', '\004', 'N', 'o', 'd', 'e', '\022', '\016', '\n', '\002', 'i', 'd', '\030', '\001', ' ',
+'\001', '(', '\t', 'R', '\002', 'i', 'd', '\022', '\030', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'R',
+'\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', '3', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\003', ' ', '\001', '(',
+'\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c',
+'t', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', ':', '\n', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\030', '\004',
+' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'R', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\022', '&', '\n', '\017',
+'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '_', 'n', 'a', 'm', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\r', 'u', 's',
+'e', 'r', 'A', 'g', 'e', 'n', 't', 'N', 'a', 'm', 'e', '\022', '.', '\n', '\022', 'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't',
+'_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\007', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\020', 'u', 's', 'e', 'r', 'A', 'g', 'e',
+'n', 't', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', ']', '\n', '\030', 'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '_', 'b',
+'u', 'i', 'l', 'd', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\010', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r',
+'s', 'i', 'o', 'n', 'H', '\000', 'R', '\025', 'u', 's', 'e', 'r', 'A', 'g', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'V', 'e', 'r',
+'s', 'i', 'o', 'n', '\022', '?', '\n', '\n', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\030', '\t', ' ', '\003', '(', '\013', '2',
+'\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'E', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 'R', '\n', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '\022', '\'', '\n', '\017', 'c', 'l',
+'i', 'e', 'n', 't', '_', 'f', 'e', 'a', 't', 'u', 'r', 'e', 's', '\030', '\n', ' ', '\003', '(', '\t', 'R', '\016', 'c', 'l', 'i', 'e',
+'n', 't', 'F', 'e', 'a', 't', 'u', 'r', 'e', 's', '\022', 'R', '\n', '\023', 'l', 'i', 's', 't', 'e', 'n', 'i', 'n', 'g', '_', 'a',
+'d', 'd', 'r', 'e', 's', 's', 'e', 's', '\030', '\013', ' ', '\003', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'B', '\002', '\030', '\001', 'R',
+'\022', 'l', 'i', 's', 't', 'e', 'n', 'i', 'n', 'g', 'A', 'd', 'd', 'r', 'e', 's', 's', 'e', 's', ':', '\035', '\232', '\305', '\210', '\036',
+'\030', '\n', '\026', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'N', 'o', 'd', 'e',
+'B', '\031', '\n', '\027', 'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 't', 'y',
+'p', 'e', 'J', '\004', '\010', '\005', '\020', '\006', 'R', '\r', 'b', 'u', 'i', 'l', 'd', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\"', '\346',
+'\001', '\n', '\010', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', '[', '\n', '\017', 'f', 'i', 'l', 't', 'e', 'r', '_', 'm', 'e', 't',
+'a', 'd', 'a', 't', 'a', '\030', '\001', ' ', '\003', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'F', 'i', 'l', 't', 'e', 'r',
+'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'E', 'n', 't', 'r', 'y', 'R', '\016', 'f', 'i', 'l', 't', 'e', 'r', 'M', 'e', 't', 'a',
+'d', 'a', 't', 'a', '\032', 'Z', '\n', '\023', 'F', 'i', 'l', 't', 'e', 'r', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'E', 'n', 't',
+'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '-', '\n', '\005', 'v',
+'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', ':', '!', '\232', '\305',
+'\210', '\036', '\034', '\n', '\032', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'M', 'e',
+'t', 'a', 'd', 'a', 't', 'a', '\"', '\206', '\001', '\n', '\r', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'U', 'I', 'n', 't', '3', '2', '\022',
+'#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\r', 'R', '\014', 'd',
+'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '(', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e',
+'y', '\030', '\003', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e',
+'K', 'e', 'y', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'U', 'I', 'n', 't', '3', '2', '\"', 'w', '\n', '\016', 'R', 'u', 'n',
+'t', 'i', 'm', 'e', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', ';', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a',
+'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3',
+'.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '(', '\n',
+'\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002',
+'\020', '\001', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', '\"', '\206', '\001', '\n', '\r', 'R', 'u', 'n', 't', 'i', 'm',
+'e', 'D', 'o', 'u', 'b', 'l', 'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030',
+'\001', ' ', '\001', '(', '\001', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '(', '\n', '\013', 'r', 'u',
+'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R',
+'\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'D', 'o', 'u', 'b', 'l',
+'e', '\"', '\266', '\001', '\n', '\022', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'e', 'a', 't', 'u', 'r', 'e', 'F', 'l', 'a', 'g', '\022',
+'I', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e',
+'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022',
+'(', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e',
+'F', 'e', 'a', 't', 'u', 'r', 'e', 'F', 'l', 'a', 'g', '\"', '\177', '\n', '\013', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u',
+'e', '\022', '#', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\021', '\372', 'B', '\016', 'r', '\014', '\020', '\001', '(', '\200',
+'\200', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\003', 'k', 'e', 'y', '\022', '%', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ',
+'\001', '(', '\t', 'B', '\017', '\372', 'B', '\014', 'r', '\n', '(', '\200', '\200', '\001', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\005', 'v', 'a', 'l',
+'u', 'e', ':', '$', '\232', '\305', '\210', '\036', '\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c',
+'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\"', '\270', '\001', '\n', '\021', 'H', 'e', 'a', 'd', 'e',
+'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', '\022', 'C', '\n', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ',
+'\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\006',
+'h', 'e', 'a', 'd', 'e', 'r', '\022', '2', '\n', '\006', 'a', 'p', 'p', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e',
+'R', '\006', 'a', 'p', 'p', 'e', 'n', 'd', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i',
+'o', 'n', '\"', 'l', '\n', '\t', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 'p', '\022', ';', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r',
+'s', '\030', '\001', ' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r',
+'s', ':', '\"', '\232', '\305', '\210', '\036', '\035', '\n', '\033', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o',
+'r', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 'p', '\"', '/', '\n', '\020', 'W', 'a', 't', 'c', 'h', 'e', 'd', 'D', 'i',
+'r', 'e', 'c', 't', 'o', 'r', 'y', '\022', '\033', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B',
+'\004', 'r', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\"', '\266', '\001', '\n', '\n', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c',
+'e', '\022', '%', '\n', '\010', 'f', 'i', 'l', 'e', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r',
+'\002', '\020', '\001', 'H', '\000', 'R', '\010', 'f', 'i', 'l', 'e', 'n', 'a', 'm', 'e', '\022', '#', '\n', '\014', 'i', 'n', 'l', 'i', 'n', 'e',
+'_', 'b', 'y', 't', 'e', 's', '\030', '\002', ' ', '\001', '(', '\014', 'H', '\000', 'R', '\013', 'i', 'n', 'l', 'i', 'n', 'e', 'B', 'y', 't',
+'e', 's', '\022', '%', '\n', '\r', 'i', 'n', 'l', 'i', 'n', 'e', '_', 's', 't', 'r', 'i', 'n', 'g', '\030', '\003', ' ', '\001', '(', '\t',
+'H', '\000', 'R', '\014', 'i', 'n', 'l', 'i', 'n', 'e', 'S', 't', 'r', 'i', 'n', 'g', ':', '#', '\232', '\305', '\210', '\036', '\036', '\n', '\034',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u',
+'r', 'c', 'e', 'B', '\020', '\n', '\t', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"', '\324', '\001', '\n',
+'\013', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'K', '\n', '\016', 'r', 'e', 't', 'r', 'y', '_', 'b', 'a', 'c',
+'k', '_', 'o', 'f', 'f', '\030', '\001', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'B', 'a', 'c', 'k', 'o', 'f', 'f', 'S', 't', 'r', 'a', 't', 'e', 'g', 'y',
+'R', '\014', 'r', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', '\022', 'R', '\n', '\013', 'n', 'u', 'm', '_', 'r', 'e', 't',
+'r', 'i', 'e', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\023', '\362', '\230', '\376', '\217', '\005', '\r', '\n', '\013',
+'m', 'a', 'x', '_', 'r', 'e', 't', 'r', 'i', 'e', 's', 'R', '\n', 'n', 'u', 'm', 'R', 'e', 't', 'r', 'i', 'e', 's', ':', '$',
+'\232', '\305', '\210', '\036', '\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.',
+'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\"', '\350', '\001', '\n', '\020', 'R', 'e', 'm', 'o', 't', 'e', 'D', 'a', 't',
+'a', 'S', 'o', 'u', 'r', 'c', 'e', '\022', 'B', '\n', '\010', 'h', 't', 't', 'p', '_', 'u', 'r', 'i', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H',
+'t', 't', 'p', 'U', 'r', 'i', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\007', 'h', 't', 't', 'p', 'U', 'r', 'i',
+'\022', '\037', '\n', '\006', 's', 'h', 'a', '2', '5', '6', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001',
+'R', '\006', 's', 'h', 'a', '2', '5', '6', '\022', 'D', '\n', '\014', 'r', 'e', 't', 'r', 'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030',
+'\003', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\013', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l',
+'i', 'c', 'y', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'c', 'o', 'r', 'e', '.', 'R', 'e', 'm', 'o', 't', 'e', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', '\"', '\311', '\001', '\n',
+'\017', 'A', 's', 'y', 'n', 'c', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '8', '\n', '\005', 'l', 'o', 'c', 'a', 'l',
+'\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r',
+'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\005', 'l', 'o', 'c', 'a', 'l', '\022',
+'@', '\n', '\006', 'r', 'e', 'm', 'o', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'e', 'm', 'o', 't', 'e', 'D', 'a', 't', 'a', 'S',
+'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\006', 'r', 'e', 'm', 'o', 't', 'e', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 's', 'y', 'n', 'c', 'D', 'a', 't',
+'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\020', '\n', '\t', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001',
+'\"', '\260', '\001', '\n', '\017', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', '\022', '\033', '\n', '\004', 'n',
+'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022',
+'9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p',
+'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't',
+'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o',
+'n', 'f', 'i', 'g', '\"', '\277', '\001', '\n', '\030', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a',
+'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', 'O', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e',
+'\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r',
+'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001',
+'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e',
+'_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', ':', '1', '\232',
+'\305', '\210', '\036', ',', '\n', '*', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R',
+'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\"', 'U',
+'\n', '\014', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', '\022', '\036', '\n', '\n', 'i', 'd', 'e', 'n', 't', 'i', 'f',
+'i', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\n', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', ':', '%', '\232', '\305',
+'\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'o',
+'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', '*', '(', '\n', '\017', 'R', 'o', 'u', 't', 'i', 'n', 'g', 'P', 'r', 'i', 'o',
+'r', 'i', 't', 'y', '\022', '\013', '\n', '\007', 'D', 'E', 'F', 'A', 'U', 'L', 'T', '\020', '\000', '\022', '\010', '\n', '\004', 'H', 'I', 'G', 'H',
+'\020', '\001', '*', '\211', '\001', '\n', '\r', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'e', 't', 'h', 'o', 'd', '\022', '\026', '\n', '\022', 'M',
+'E', 'T', 'H', 'O', 'D', '_', 'U', 'N', 'S', 'P', 'E', 'C', 'I', 'F', 'I', 'E', 'D', '\020', '\000', '\022', '\007', '\n', '\003', 'G', 'E',
+'T', '\020', '\001', '\022', '\010', '\n', '\004', 'H', 'E', 'A', 'D', '\020', '\002', '\022', '\010', '\n', '\004', 'P', 'O', 'S', 'T', '\020', '\003', '\022', '\007',
+'\n', '\003', 'P', 'U', 'T', '\020', '\004', '\022', '\n', '\n', '\006', 'D', 'E', 'L', 'E', 'T', 'E', '\020', '\005', '\022', '\013', '\n', '\007', 'C', 'O',
+'N', 'N', 'E', 'C', 'T', '\020', '\006', '\022', '\013', '\n', '\007', 'O', 'P', 'T', 'I', 'O', 'N', 'S', '\020', '\007', '\022', '\t', '\n', '\005', 'T',
+'R', 'A', 'C', 'E', '\020', '\010', '\022', '\t', '\n', '\005', 'P', 'A', 'T', 'C', 'H', '\020', '\t', '*', '>', '\n', '\020', 'T', 'r', 'a', 'f',
+'f', 'i', 'c', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\022', '\017', '\n', '\013', 'U', 'N', 'S', 'P', 'E', 'C', 'I', 'F', 'I',
+'E', 'D', '\020', '\000', '\022', '\013', '\n', '\007', 'I', 'N', 'B', 'O', 'U', 'N', 'D', '\020', '\001', '\022', '\014', '\n', '\010', 'O', 'U', 'T', 'B',
+'O', 'U', 'N', 'D', '\020', '\002', 'B', '9', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\t', 'B', 'a', 's', 'e',
+'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[13] = {
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_backoff_proto_upbdefinit,
+ &envoy_config_core_v3_http_uri_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &envoy_type_v3_semantic_version_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_migrate_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_base_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/base.proto",
+ UPB_STRVIEW_INIT(descriptor, 4473)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h
new file mode 100644
index 00000000000..4464edaf687
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h
@@ -0,0 +1,135 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/base.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_BASE_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_BASE_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_def_init envoy_config_core_v3_base_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Locality_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Locality");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_BuildVersion_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.BuildVersion");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Extension_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Extension");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Node_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Node");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Metadata_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Metadata");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Metadata_FilterMetadataEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Metadata.FilterMetadataEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RuntimeUInt32_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RuntimeUInt32");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RuntimePercent_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RuntimePercent");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RuntimeDouble_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RuntimeDouble");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RuntimeFeatureFlag_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RuntimeFeatureFlag");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HeaderValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HeaderValue");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HeaderValueOption_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HeaderValueOption");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HeaderMap_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HeaderMap");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_WatchedDirectory_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.WatchedDirectory");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_DataSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.DataSource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RetryPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RetryPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RemoteDataSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RemoteDataSource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_AsyncDataSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.AsyncDataSource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_TransportSocket_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.TransportSocket");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RuntimeFractionalPercent_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RuntimeFractionalPercent");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_ControlPlane_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_base_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.ControlPlane");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_BASE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c
new file mode 100644
index 00000000000..6eb77098334
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c
@@ -0,0 +1,143 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/config_source.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/config_source.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_grpc_service_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init xds_core_v3_authority_proto_upbdefinit;
+extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_ApiConfigSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_AggregatedConfigSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_SelfConfigSource_msginit;
+extern const upb_msglayout envoy_config_core_v3_RateLimitSettings_msginit;
+extern const upb_msglayout envoy_config_core_v3_ConfigSource_msginit;
+
+static const upb_msglayout *layouts[5] = {
+ &envoy_config_core_v3_ApiConfigSource_msginit,
+ &envoy_config_core_v3_AggregatedConfigSource_msginit,
+ &envoy_config_core_v3_SelfConfigSource_msginit,
+ &envoy_config_core_v3_RateLimitSettings_msginit,
+ &envoy_config_core_v3_ConfigSource_msginit,
+};
+
+static const char descriptor[2238] = {'\n', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o',
+'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n',
+'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'g', 'r', 'p', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.',
+'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'x', 'd', 's', '/',
+'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '#',
+'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'd', 'e', 'p', 'r', 'e', 'c', 'a',
+'t', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't',
+'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't',
+'o', '\"', '\233', '\006', '\n', '\017', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', 'R', '\n', '\010',
+'a', 'p', 'i', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u',
+'r', 'c', 'e', '.', 'A', 'p', 'i', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\007', 'a', 'p',
+'i', 'T', 'y', 'p', 'e', '\022', '^', '\n', '\025', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 'a', 'p', 'i', '_', 'v', 'e',
+'r', 's', 'i', 'o', 'n', '\030', '\010', ' ', '\001', '(', '\016', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005',
+'\202', '\001', '\002', '\020', '\001', 'R', '\023', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o',
+'n', '\022', '#', '\n', '\r', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', 'a', 'm', 'e', 's', '\030', '\002', ' ', '\003', '(', '\t', 'R',
+'\014', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', 's', '\022', 'F', '\n', '\r', 'g', 'r', 'p', 'c', '_', 's', 'e', 'r',
+'v', 'i', 'c', 'e', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'R', '\014', 'g', 'r',
+'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '>', '\n', '\r', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 'd', 'e', 'l',
+'a', 'y', '\030', '\003', ' ', '\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', '\014', 'r', 'e', 'f', 'r', 'e', 's', 'h', 'D', 'e', 'l', 'a', 'y', '\022',
+'L', '\n', '\017', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\016', 'r', 'e', 'q', 'u', 'e', 's', 't', 'T', 'i', 'm', 'e', 'o',
+'u', 't', '\022', 'W', '\n', '\023', 'r', 'a', 't', 'e', '_', 'l', 'i', 'm', 'i', 't', '_', 's', 'e', 't', 't', 'i', 'n', 'g', 's',
+'\030', '\006', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r',
+'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'R', '\021', 'r',
+'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\022', 'A', '\n', '\036', 's', 'e', 't', '_', 'n',
+'o', 'd', 'e', '_', 'o', 'n', '_', 'f', 'i', 'r', 's', 't', '_', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 'o', 'n', 'l', 'y',
+'\030', '\007', ' ', '\001', '(', '\010', 'R', '\031', 's', 'e', 't', 'N', 'o', 'd', 'e', 'O', 'n', 'F', 'i', 'r', 's', 't', 'M', 'e', 's',
+'s', 'a', 'g', 'e', 'O', 'n', 'l', 'y', '\"', '\222', '\001', '\n', '\007', 'A', 'p', 'i', 'T', 'y', 'p', 'e', '\022', '3', '\n', '%', 'D',
+'E', 'P', 'R', 'E', 'C', 'A', 'T', 'E', 'D', '_', 'A', 'N', 'D', '_', 'U', 'N', 'A', 'V', 'A', 'I', 'L', 'A', 'B', 'L', 'E',
+'_', 'D', 'O', '_', 'N', 'O', 'T', '_', 'U', 'S', 'E', '\020', '\000', '\032', '\010', '\010', '\001', '\250', '\367', '\264', '\213', '\002', '\001', '\022', '\010',
+'\n', '\004', 'R', 'E', 'S', 'T', '\020', '\001', '\022', '\010', '\n', '\004', 'G', 'R', 'P', 'C', '\020', '\002', '\022', '\016', '\n', '\n', 'D', 'E', 'L',
+'T', 'A', '_', 'G', 'R', 'P', 'C', '\020', '\003', '\022', '\023', '\n', '\017', 'A', 'G', 'G', 'R', 'E', 'G', 'A', 'T', 'E', 'D', '_', 'G',
+'R', 'P', 'C', '\020', '\005', '\022', '\031', '\n', '\025', 'A', 'G', 'G', 'R', 'E', 'G', 'A', 'T', 'E', 'D', '_', 'D', 'E', 'L', 'T', 'A',
+'_', 'G', 'R', 'P', 'C', '\020', '\006', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i',
+'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\"',
+'I', '\n', '\026', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e',
+':', '/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r',
+'e', '.', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\"',
+'\235', '\001', '\n', '\020', 'S', 'e', 'l', 'f', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '^', '\n', '\025', 't',
+'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 'a', 'p', 'i', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(',
+'\016', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\023', 't', 'r', 'a',
+'n', 's', 'p', 'o', 'r', 't', 'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'e', 'l', 'f', 'C', 'o', 'n',
+'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\"', '\307', '\001', '\n', '\021', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'S', 'e',
+'t', 't', 'i', 'n', 'g', 's', '\022', ';', '\n', '\n', 'm', 'a', 'x', '_', 't', 'o', 'k', 'e', 'n', 's', '\030', '\001', ' ', '\001', '(',
+'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3',
+'2', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'm', 'a', 'x', 'T', 'o', 'k', 'e', 'n', 's', '\022', 'I', '\n', '\t', 'f', 'i', 'l', 'l',
+'_', 'r', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'D', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', 'B', '\016', '\372', 'B', '\013', '\022', '\t', '!', '\000',
+'\000', '\000', '\000', '\000', '\000', '\000', '\000', 'R', '\010', 'f', 'i', 'l', 'l', 'R', 'a', 't', 'e', ':', '*', '\232', '\305', '\210', '\036', '%', '\n',
+'#', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i',
+'m', 'i', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\"', '\247', '\004', '\n', '\014', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u',
+'r', 'c', 'e', '\022', '8', '\n', '\013', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'i', 'e', 's', '\030', '\007', ' ', '\003', '(', '\013', '2',
+'\026', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', 'R', '\013',
+'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'i', 'e', 's', '\022', '\024', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\t',
+'H', '\000', 'R', '\004', 'p', 'a', 't', 'h', '\022', 'S', '\n', '\021', 'a', 'p', 'i', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o',
+'u', 'r', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'H',
+'\000', 'R', '\017', 'a', 'p', 'i', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '@', '\n', '\003', 'a', 'd', 's',
+'\030', '\003', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r',
+'e', '.', 'v', '3', '.', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r',
+'c', 'e', 'H', '\000', 'R', '\003', 'a', 'd', 's', '\022', '<', '\n', '\004', 's', 'e', 'l', 'f', '\030', '\005', ' ', '\001', '(', '\013', '2', '&',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S', 'e', 'l',
+'f', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\004', 's', 'e', 'l', 'f', '\022', 'M', '\n', '\025',
+'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'f', 'e', 't', 'c', 'h', '_', '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', '\023', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'F', 'e', 't', 'c', 'h', 'T', 'i', 'm', 'e', 'o', 'u', 't',
+'\022', '\\', '\n', '\024', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'a', 'p', 'i', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030',
+'\006', ' ', '\001', '(', '\016', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R',
+'\022', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'A', 'p', 'i', 'V', 'e', 'r', 's', 'i', 'o', 'n', ':', '%', '\232', '\305', '\210', '\036',
+' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'C', 'o', 'n', 'f',
+'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\036', '\n', '\027', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e',
+'_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '*', '.', '\n', '\n', 'A', 'p', 'i', 'V', 'e', 'r',
+'s', 'i', 'o', 'n', '\022', '\014', '\n', '\004', 'A', 'U', 'T', 'O', '\020', '\000', '\032', '\002', '\010', '\001', '\022', '\n', '\n', '\002', 'V', '2', '\020',
+'\001', '\032', '\002', '\010', '\001', '\022', '\006', '\n', '\002', 'V', '3', '\020', '\002', 'B', 'A', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y',
+'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', 'B', '\021', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310',
+'\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[9] = {
+ &envoy_config_core_v3_grpc_service_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &xds_core_v3_authority_proto_upbdefinit,
+ &envoy_annotations_deprecation_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/config_source.proto",
+ UPB_STRVIEW_INIT(descriptor, 2238)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h
new file mode 100644
index 00000000000..c61a3a634fd
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h
@@ -0,0 +1,55 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/config_source.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_CONFIG_SOURCE_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_CONFIG_SOURCE_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_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_ApiConfigSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_config_source_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.ApiConfigSource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_AggregatedConfigSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_config_source_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.AggregatedConfigSource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_SelfConfigSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_config_source_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.SelfConfigSource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_RateLimitSettings_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_config_source_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.RateLimitSettings");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_ConfigSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_config_source_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.ConfigSource");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_CONFIG_SOURCE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c
new file mode 100644
index 00000000000..3de56597c2d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c
@@ -0,0 +1,56 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/event_service_config.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/event_service_config.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_grpc_service_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_EventServiceConfig_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_core_v3_EventServiceConfig_msginit,
+};
+
+static const char descriptor[456] = {'\n', '/', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'v',
+'e', 'n', 't', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022',
+'\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\'', 'e', 'n',
+'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'g', 'r', 'p', 'c', '_', 's',
+'e', 'r', 'v', 'i', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a',
+'t', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\"', '\251', '\001', '\n', '\022', 'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'o', 'n', 'f', 'i',
+'g', '\022', 'F', '\n', '\014', 'g', 'r', 'p', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '!',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p',
+'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'H', '\000', 'R', '\013', 'g', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', ':', '+',
+'\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.',
+'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\036', '\n', '\027', 'c', 'o', 'n',
+'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001',
+'B', 'G', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\027', 'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i',
+'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006',
+'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_config_core_v3_grpc_service_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_event_service_config_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/event_service_config.proto",
+ UPB_STRVIEW_INIT(descriptor, 456)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h
new file mode 100644
index 00000000000..b51d7e45744
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/event_service_config.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_EVENT_SERVICE_CONFIG_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_EVENT_SERVICE_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_def_init envoy_config_core_v3_event_service_config_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_EventServiceConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_event_service_config_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.EventServiceConfig");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_EVENT_SERVICE_CONFIG_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c
new file mode 100644
index 00000000000..3518a9a7291
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c
@@ -0,0 +1,66 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/extension.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/extension.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_TypedExtensionConfig_msginit;
+extern const upb_msglayout envoy_config_core_v3_ExtensionConfigSource_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_config_core_v3_TypedExtensionConfig_msginit,
+ &envoy_config_core_v3_ExtensionConfigSource_msginit,
+};
+
+static const char descriptor[666] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/',
+'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p',
+'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't',
+'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'v', '\n', '\024', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007',
+'\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'A', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o',
+'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'A', 'n', 'y', 'B', '\010', '\372', 'B', '\005', '\242', '\001', '\002', '\010', '\001', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C',
+'o', 'n', 'f', 'i', 'g', '\"', '\236', '\002', '\n', '\025', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g',
+'S', 'o', 'u', 'r', 'c', 'e', '\022', 'Q', '\n', '\r', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\001',
+' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005', '\242', '\001', '\002', '\010', '\001',
+'R', '\014', 'c', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', ';', '\n', '\016', 'd', 'e', 'f', 'a', 'u', 'l', 't',
+'_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'C', 'o', 'n', 'f', 'i', 'g',
+'\022', 'N', '\n', '$', 'a', 'p', 'p', 'l', 'y', '_', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_',
+'w', 'i', 't', 'h', 'o', 'u', 't', '_', 'w', 'a', 'r', 'm', 'i', 'n', 'g', '\030', '\003', ' ', '\001', '(', '\010', 'R', ' ', 'a', 'p',
+'p', 'l', 'y', 'D', 'e', 'f', 'a', 'u', 'l', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'W', 'i', 't', 'h', 'o', 'u', 't', 'W', 'a',
+'r', 'm', 'i', 'n', 'g', '\022', '%', '\n', '\t', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', 's', '\030', '\004', ' ', '\003', '(', '\t', 'B',
+'\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\010', 't', 'y', 'p', 'e', 'U', 'r', 'l', 's', 'B', '>', '\n', '\"', 'i', 'o',
+'.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\016', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001',
+'\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_config_core_v3_config_source_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_extension_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/extension.proto",
+ UPB_STRVIEW_INIT(descriptor, 666)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h
new file mode 100644
index 00000000000..e60f9421586
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/extension.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_EXTENSION_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_EXTENSION_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_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_TypedExtensionConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_extension_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.TypedExtensionConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_ExtensionConfigSource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_extension_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.ExtensionConfigSource");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_EXTENSION_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c
new file mode 100644
index 00000000000..17f95e90b61
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c
@@ -0,0 +1,263 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/grpc_service.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/grpc_service.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_empty_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_EnvoyGrpc_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry_msginit;
+
+static const upb_msglayout *layouts[14] = {
+ &envoy_config_core_v3_GrpcService_msginit,
+ &envoy_config_core_v3_GrpcService_EnvoyGrpc_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_msginit,
+ &envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry_msginit,
+};
+
+static const char descriptor[4684] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'g', 'r',
+'p', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f',
+'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\033', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'e', 'm',
+'p', 't', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's',
+'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\214', '!', '\n',
+'\013', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'L', '\n', '\n', 'e', 'n', 'v', 'o', 'y', '_', 'g', 'r', 'p',
+'c', '\030', '\001', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'E', 'n', 'v', 'o', 'y', 'G', 'r',
+'p', 'c', 'H', '\000', 'R', '\t', 'e', 'n', 'v', 'o', 'y', 'G', 'r', 'p', 'c', '\022', 'O', '\n', '\013', 'g', 'o', 'o', 'g', 'l', 'e',
+'_', 'g', 'r', 'p', 'c', '\030', '\002', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o',
+'g', 'l', 'e', 'G', 'r', 'p', 'c', 'H', '\000', 'R', '\n', 'g', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '\022', '3', '\n', '\007',
+'t', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\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', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\022',
+'L', '\n', '\020', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\005', ' ', '\003', '(', '\013',
+'2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H',
+'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'R', '\017', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'M', 'e', 't', 'a', 'd', 'a',
+'t', 'a', '\032', '\230', '\001', '\n', '\t', 'E', 'n', 'v', 'o', 'y', 'G', 'r', 'p', 'c', '\022', '*', '\n', '\014', 'c', 'l', 'u', 's', 't',
+'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\013', 'c',
+'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '/', '\n', '\t', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '\030', '\002',
+' ', '\001', '(', '\t', 'B', '\021', '\372', 'B', '\016', 'r', '\014', '\020', '\000', '(', '\200', '\200', '\001', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\t',
+'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', ':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'E', 'n',
+'v', 'o', 'y', 'G', 'r', 'p', 'c', '\032', '\372', '\034', '\n', '\n', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '\022', '&', '\n',
+'\n', 't', 'a', 'r', 'g', 'e', 't', '_', 'u', 'r', 'i', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020',
+'\001', 'R', '\t', 't', 'a', 'r', 'g', 'e', 't', 'U', 'r', 'i', '\022', 'p', '\n', '\023', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '_', 'c',
+'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '?', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c',
+'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'h', 'a', 'n', 'n', 'e', 'l', 'C', 'r', 'e', 'd', 'e',
+'n', 't', 'i', 'a', 'l', 's', 'R', '\022', 'c', 'h', 'a', 'n', 'n', 'e', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l',
+'s', '\022', 'g', '\n', '\020', 'c', 'a', 'l', 'l', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\003', ' ', '\003',
+'(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C',
+'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'R', '\017', 'c', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e',
+'n', 't', 'i', 'a', 'l', 's', '\022', '(', '\n', '\013', 's', 't', 'a', 't', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\004', ' ', '\001',
+'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\n', 's', 't', 'a', 't', 'P', 'r', 'e', 'f', 'i', 'x', '\022', '8',
+'\n', '\030', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '_', 'f', 'a', 'c', 't', 'o', 'r', 'y', '_', 'n', 'a', 'm',
+'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\026', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'F', 'a', 'c', 't', 'o',
+'r', 'y', 'N', 'a', 'm', 'e', '\022', '/', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\006', ' ', '\001', '(', '\013', '2', '\027', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\006', 'c',
+'o', 'n', 'f', 'i', 'g', '\022', '^', '\n', '\035', 'p', 'e', 'r', '_', 's', 't', 'r', 'e', 'a', 'm', '_', 'b', 'u', 'f', 'f', 'e',
+'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b', 'y', 't', 'e', 's', '\030', '\007', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o',
+'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R',
+'\031', 'p', 'e', 'r', 'S', 't', 'r', 'e', 'a', 'm', 'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e',
+'s', '\022', '[', '\n', '\014', 'c', 'h', 'a', 'n', 'n', 'e', 'l', '_', 'a', 'r', 'g', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '8',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p',
+'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'h', 'a', 'n', 'n',
+'e', 'l', 'A', 'r', 'g', 's', 'R', '\013', 'c', 'h', 'a', 'n', 'n', 'e', 'l', 'A', 'r', 'g', 's', '\032', '\235', '\002', '\n', '\016', 'S',
+'s', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '?', '\n', '\n', 'r', 'o', 'o', 't', '_', 'c', 'e', 'r',
+'t', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c',
+'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'r', 'o', 'o', 't', 'C', 'e',
+'r', 't', 's', '\022', 'I', '\n', '\013', 'p', 'r', 'i', 'v', 'a', 't', 'e', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2',
+' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a',
+'t', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'R', '\n', 'p', 'r', 'i', 'v', 'a', 't', 'e',
+'K', 'e', 'y', '\022', '?', '\n', '\n', 'c', 'e', 'r', 't', '_', 'c', 'h', 'a', 'i', 'n', '\030', '\003', ' ', '\001', '(', '\013', '2', ' ',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't',
+'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'c', 'e', 'r', 't', 'C', 'h', 'a', 'i', 'n', ':', '>', '\232', '\305', '\210', '\036', '9',
+'\n', '7', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S',
+'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'S', 's', 'l', 'C', 'r', 'e', 'd',
+'e', 'n', 't', 'i', 'a', 'l', 's', '\032', '`', '\n', '\026', 'G', 'o', 'o', 'g', 'l', 'e', 'L', 'o', 'c', 'a', 'l', 'C', 'r', 'e',
+'d', 'e', 'n', 't', 'i', 'a', 'l', 's', ':', 'F', '\232', '\305', '\210', '\036', 'A', '\n', '?', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o',
+'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'L', 'o', 'c', 'a', 'l', 'C', 'r', 'e', 'd', 'e', 'n',
+'t', 'i', 'a', 'l', 's', '\032', '\222', '\003', '\n', '\022', 'C', 'h', 'a', 'n', 'n', 'e', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i',
+'a', 'l', 's', '\022', 'f', '\n', '\017', 's', 's', 'l', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\001', ' ',
+'\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.',
+'S', 's', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\016', 's', 's', 'l', 'C', 'r', 'e', 'd',
+'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '?', '\n', '\016', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'd', 'e', 'f', 'a', 'u', 'l', 't',
+'\030', '\002', ' ', '\001', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'E', 'm', 'p', 't', 'y', 'H', '\000', 'R', '\r', 'g', 'o', 'o', 'g', 'l', 'e', 'D', 'e', 'f', 'a', 'u', 'l', 't', '\022', 'r', '\n',
+'\021', 'l', 'o', 'c', 'a', 'l', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030', '\003', ' ', '\001', '(', '\013', '2',
+'C', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r',
+'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'G', 'o', 'o', 'g',
+'l', 'e', 'L', 'o', 'c', 'a', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\020', 'l', 'o', 'c',
+'a', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', ':', 'B', '\232', '\305', '\210', '\036', '=', '\n', ';', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c',
+'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'h', 'a', 'n', 'n', 'e', 'l', 'C', 'r', 'e', 'd', 'e',
+'n', 't', 'i', 'a', 'l', 's', 'B', '\033', '\n', '\024', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', '_', 's', 'p', 'e', 'c',
+'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\032', '\210', '\017', '\n', '\017', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n',
+'t', 'i', 'a', 'l', 's', '\022', '#', '\n', '\014', 'a', 'c', 'c', 'e', 's', 's', '_', 't', 'o', 'k', 'e', 'n', '\030', '\001', ' ', '\001',
+'(', '\t', 'H', '\000', 'R', '\013', 'a', 'c', 'c', 'e', 's', 's', 'T', 'o', 'k', 'e', 'n', '\022', 'L', '\n', '\025', 'g', 'o', 'o', 'g',
+'l', 'e', '_', 'c', 'o', 'm', 'p', 'u', 't', 'e', '_', 'e', 'n', 'g', 'i', 'n', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\026',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'm', 'p', 't', 'y', 'H', '\000', 'R',
+'\023', 'g', 'o', 'o', 'g', 'l', 'e', 'C', 'o', 'm', 'p', 'u', 't', 'e', 'E', 'n', 'g', 'i', 'n', 'e', '\022', '2', '\n', '\024', 'g',
+'o', 'o', 'g', 'l', 'e', '_', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 't', 'o', 'k', 'e', 'n', '\030', '\003', ' ', '\001', '(', '\t',
+'H', '\000', 'R', '\022', 'g', 'o', 'o', 'g', 'l', 'e', 'R', 'e', 'f', 'r', 'e', 's', 'h', 'T', 'o', 'k', 'e', 'n', '\022', '\236', '\001',
+'\n', '\032', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'a', 'c', 'c', 'o', 'u', 'n', 't', '_', 'j', 'w', 't', '_', 'a', 'c', 'c',
+'e', 's', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '_', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l',
+'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'S', 'e', 'r',
+'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', 'J', 'W', 'T', 'A', 'c', 'c', 'e', 's', 's', 'C', 'r', 'e', 'd', 'e',
+'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\027', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', 'J',
+'w', 't', 'A', 'c', 'c', 'e', 's', 's', '\022', 'r', '\n', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'i', 'a', 'm', '\030', '\005', ' ',
+'\001', '(', '\013', '2', 'Q', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.',
+'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'I', 'A', 'M',
+'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'H', '\000', 'R', '\t', 'g', 'o', 'o', 'g', 'l', 'e', 'I', 'a', 'm', '\022',
+'}', '\n', '\013', 'f', 'r', 'o', 'm', '_', 'p', 'l', 'u', 'g', 'i', 'n', '\030', '\006', ' ', '\001', '(', '\013', '2', 'Z', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e',
+'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd',
+'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a',
+'l', 's', 'F', 'r', 'o', 'm', 'P', 'l', 'u', 'g', 'i', 'n', 'H', '\000', 'R', '\n', 'f', 'r', 'o', 'm', 'P', 'l', 'u', 'g', 'i',
+'n', '\022', 'j', '\n', '\013', 's', 't', 's', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', 'G', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c',
+'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r',
+'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'S', 't', 's', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'H', '\000', 'R', '\n', 's',
+'t', 's', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\032', '\331', '\001', '\n', '\"', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'A', 'c', 'c', 'o',
+'u', 'n', 't', 'J', 'W', 'T', 'A', 'c', 'c', 'e', 's', 's', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\022', '\031',
+'\n', '\010', 'j', 's', 'o', 'n', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'j', 's', 'o', 'n', 'K', 'e', 'y',
+'\022', '4', '\n', '\026', 't', 'o', 'k', 'e', 'n', '_', 'l', 'i', 'f', 'e', 't', 'i', 'm', 'e', '_', 's', 'e', 'c', 'o', 'n', 'd',
+'s', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\024', 't', 'o', 'k', 'e', 'n', 'L', 'i', 'f', 'e', 't', 'i', 'm', 'e', 'S', 'e', 'c',
+'o', 'n', 'd', 's', ':', 'b', '\232', '\305', '\210', '\036', ']', '\n', '[', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2',
+'.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G',
+'r', 'p', 'c', '.', 'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'S', 'e', 'r', 'v', 'i',
+'c', 'e', 'A', 'c', 'c', 'o', 'u', 'n', 't', 'J', 'W', 'T', 'A', 'c', 'c', 'e', 's', 's', 'C', 'r', 'e', 'd', 'e', 'n', 't',
+'i', 'a', 'l', 's', '\032', '\314', '\001', '\n', '\024', 'G', 'o', 'o', 'g', 'l', 'e', 'I', 'A', 'M', 'C', 'r', 'e', 'd', 'e', 'n', 't',
+'i', 'a', 'l', 's', '\022', '/', '\n', '\023', 'a', 'u', 't', 'h', 'o', 'r', 'i', 'z', 'a', 't', 'i', 'o', 'n', '_', 't', 'o', 'k',
+'e', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\022', 'a', 'u', 't', 'h', 'o', 'r', 'i', 'z', 'a', 't', 'i', 'o', 'n', 'T', 'o',
+'k', 'e', 'n', '\022', '-', '\n', '\022', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '_', 's', 'e', 'l', 'e', 'c', 't', 'o', 'r',
+'\030', '\002', ' ', '\001', '(', '\t', 'R', '\021', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', 'S', 'e', 'l', 'e', 'c', 't', 'o', 'r',
+':', 'T', '\232', '\305', '\210', '\036', 'O', '\n', 'M', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r',
+'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.',
+'C', 'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'I', 'A', 'M',
+'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\032', '\352', '\001', '\n', '\035', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'C',
+'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'F', 'r', 'o', 'm', 'P', 'l', 'u', 'g', 'i', 'n', '\022', '\022', '\n', '\004', 'n',
+'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_',
+'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':',
+']', '\232', '\305', '\210', '\036', 'X', '\n', 'V', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e',
+'.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C',
+'a', 'l', 'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'C', 'r',
+'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'F', 'r', 'o', 'm', 'P', 'l', 'u', 'g', 'i', 'n', 'B', '\r', '\n', '\013', 'c', 'o',
+'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\032', '\327',
+'\003', '\n', '\n', 'S', 't', 's', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', ';', '\n', '\032', 't', 'o', 'k', 'e', 'n', '_', 'e', 'x',
+'c', 'h', 'a', 'n', 'g', 'e', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'u', 'r', 'i', '\030', '\001', ' ', '\001', '(', '\t', 'R',
+'\027', 't', 'o', 'k', 'e', 'n', 'E', 'x', 'c', 'h', 'a', 'n', 'g', 'e', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'U', 'r', 'i', '\022',
+'\032', '\n', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'r', 'e', 's', 'o', 'u', 'r',
+'c', 'e', '\022', '\032', '\n', '\010', 'a', 'u', 'd', 'i', 'e', 'n', 'c', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\010', 'a', 'u', 'd',
+'i', 'e', 'n', 'c', 'e', '\022', '\024', '\n', '\005', 's', 'c', 'o', 'p', 'e', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\005', 's', 'c', 'o',
+'p', 'e', '\022', '0', '\n', '\024', 'r', 'e', 'q', 'u', 'e', 's', 't', 'e', 'd', '_', 't', 'o', 'k', 'e', 'n', '_', 't', 'y', 'p',
+'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\022', 'r', 'e', 'q', 'u', 'e', 's', 't', 'e', 'd', 'T', 'o', 'k', 'e', 'n', 'T', 'y',
+'p', 'e', '\022', '5', '\n', '\022', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', 't', 'o', 'k', 'e', 'n', '_', 'p', 'a', 't', 'h', '\030',
+'\006', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\020', 's', 'u', 'b', 'j', 'e', 'c', 't', 'T', 'o',
+'k', 'e', 'n', 'P', 'a', 't', 'h', '\022', '5', '\n', '\022', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', 't', 'o', 'k', 'e', 'n', '_',
+'t', 'y', 'p', 'e', '\030', '\007', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\020', 's', 'u', 'b', 'j',
+'e', 'c', 't', 'T', 'o', 'k', 'e', 'n', 'T', 'y', 'p', 'e', '\022', '(', '\n', '\020', 'a', 'c', 't', 'o', 'r', '_', 't', 'o', 'k',
+'e', 'n', '_', 'p', 'a', 't', 'h', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'c', 't', 'o', 'r', 'T', 'o', 'k', 'e', 'n',
+'P', 'a', 't', 'h', '\022', '(', '\n', '\020', 'a', 'c', 't', 'o', 'r', '_', 't', 'o', 'k', 'e', 'n', '_', 't', 'y', 'p', 'e', '\030',
+'\t', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'c', 't', 'o', 'r', 'T', 'o', 'k', 'e', 'n', 'T', 'y', 'p', 'e', ':', 'J', '\232', '\305',
+'\210', '\036', 'E', '\n', 'C', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r',
+'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l', 'l',
+'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '.', 'S', 't', 's', 'S', 'e', 'r', 'v', 'i', 'c', 'e', ':', '?', '\232',
+'\305', '\210', '\036', ':', '\n', '8', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G',
+'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'a', 'l',
+'l', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', 'B', '\033', '\n', '\024', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a',
+'l', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\032', '\303', '\002', '\n', '\013', 'C', 'h', 'a', 'n',
+'n', 'e', 'l', 'A', 'r', 'g', 's', '\022', 'V', '\n', '\004', 'a', 'r', 'g', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', 'B', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S',
+'e', 'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'h', 'a', 'n', 'n', 'e', 'l',
+'A', 'r', 'g', 's', '.', 'A', 'r', 'g', 's', 'E', 'n', 't', 'r', 'y', 'R', '\004', 'a', 'r', 'g', 's', '\032', 'c', '\n', '\005', 'V',
+'a', 'l', 'u', 'e', '\022', '#', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(',
+'\t', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\035', '\n', '\t', 'i', 'n', 't', '_', 'v',
+'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\003', 'H', '\000', 'R', '\010', 'i', 'n', 't', 'V', 'a', 'l', 'u', 'e', 'B', '\026', '\n',
+'\017', 'v', 'a', 'l', 'u', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\032', 'w', '\n', '\t',
+'A', 'r', 'g', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k',
+'e', 'y', '\022', 'T', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '>', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i',
+'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', '.', 'C', 'h', 'a', 'n', 'n', 'e', 'l', 'A', 'r', 'g', 's',
+'.', 'V', 'a', 'l', 'u', 'e', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', ':', '/', '\232', '\305', '\210', '\036', '*', '\n',
+'(', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e',
+'r', 'v', 'i', 'c', 'e', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'G', 'r', 'p', 'c', ':', '$', '\232', '\305', '\210', '\036', '\037', '\n', '\035',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'S', 'e', 'r',
+'v', 'i', 'c', 'e', 'B', '\027', '\n', '\020', 't', 'a', 'r', 'g', 'e', 't', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022',
+'\003', '\370', 'B', '\001', 'J', '\004', '\010', '\004', '\020', '\005', 'B', '@', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o',
+'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\020',
+'G', 'r', 'p', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020',
+'\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[11] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_empty_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_sensitive_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_grpc_service_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/grpc_service.proto",
+ UPB_STRVIEW_INIT(descriptor, 4684)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h
new file mode 100644
index 00000000000..5b0b865762b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h
@@ -0,0 +1,100 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/grpc_service.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_GRPC_SERVICE_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_GRPC_SERVICE_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_def_init envoy_config_core_v3_grpc_service_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_EnvoyGrpc_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.EnvoyGrpc");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_SslCredentials_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.SslCredentials");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_GoogleLocalCredentials_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.GoogleLocalCredentials");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelCredentials_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelCredentials");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_ServiceAccountJWTAccessCredentials_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.ServiceAccountJWTAccessCredentials");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_GoogleIAMCredentials_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.GoogleIAMCredentials");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_MetadataCredentialsFromPlugin_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.MetadataCredentialsFromPlugin");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_CallCredentials_StsService_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.CallCredentials.StsService");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_Value_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.Value");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcService_GoogleGrpc_ChannelArgs_ArgsEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_grpc_service_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcService.GoogleGrpc.ChannelArgs.ArgsEntry");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_GRPC_SERVICE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c
new file mode 100644
index 00000000000..469acd3f7a3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c
@@ -0,0 +1,233 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/health_check.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/health_check.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_event_service_config_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_http_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_range_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_Payload_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_HttpHealthCheck_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_TcpHealthCheck_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_RedisHealthCheck_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit;
+extern const upb_msglayout envoy_config_core_v3_HealthCheck_TlsOptions_msginit;
+
+static const upb_msglayout *layouts[8] = {
+ &envoy_config_core_v3_HealthCheck_msginit,
+ &envoy_config_core_v3_HealthCheck_Payload_msginit,
+ &envoy_config_core_v3_HealthCheck_HttpHealthCheck_msginit,
+ &envoy_config_core_v3_HealthCheck_TcpHealthCheck_msginit,
+ &envoy_config_core_v3_HealthCheck_RedisHealthCheck_msginit,
+ &envoy_config_core_v3_HealthCheck_GrpcHealthCheck_msginit,
+ &envoy_config_core_v3_HealthCheck_CustomHealthCheck_msginit,
+ &envoy_config_core_v3_HealthCheck_TlsOptions_msginit,
+};
+
+static const char descriptor[4147] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'h', 'e',
+'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f',
+'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '/', 'e', 'n',
+'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'v', 'e', 'n', 't', '_',
+'s', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v',
+'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'i', 'n', 'g',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'h', 't', 't',
+'p', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'r', 'a',
+'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\034', 'g', 'o', 'o', 'g', 'l',
+'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036',
+'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's',
+'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\306', '\033', '\n',
+'\013', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '?', '\n', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\001',
+' ', '\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', 'B', '\n', '\372', 'B', '\007', '\252', '\001', '\004', '\010', '\001', '*', '\000', 'R', '\007', 't', 'i', 'm', 'e', 'o',
+'u', 't', '\022', 'A', '\n', '\010', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\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', 'B', '\n', '\372',
+'B', '\007', '\252', '\001', '\004', '\010', '\001', '*', '\000', 'R', '\010', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', '@', '\n', '\016', 'i', 'n',
+'i', 't', 'i', 'a', 'l', '_', 'j', 'i', 't', 't', 'e', 'r', '\030', '\024', ' ', '\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', '\r', 'i', 'n', 'i',
+'t', 'i', 'a', 'l', 'J', 'i', 't', 't', 'e', 'r', '\022', 'B', '\n', '\017', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '_', 'j', 'i',
+'t', 't', 'e', 'r', '\030', '\003', ' ', '\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', '\016', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', 'J', 'i', 't',
+'t', 'e', 'r', '\022', '6', '\n', '\027', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '_', 'j', 'i', 't', 't', 'e', 'r', '_', 'p', 'e',
+'r', 'c', 'e', 'n', 't', '\030', '\022', ' ', '\001', '(', '\r', 'R', '\025', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', 'J', 'i', 't', 't',
+'e', 'r', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', 'W', '\n', '\023', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 't', 'h',
+'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001',
+'\002', '\020', '\001', 'R', '\022', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'S',
+'\n', '\021', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\005', ' ', '\001', '(', '\013',
+'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2',
+'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\020', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'T',
+'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', '7', '\n', '\010', 'a', 'l', 't', '_', 'p', 'o', 'r', 't', '\030', '\006', ' ', '\001', '(',
+'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3',
+'2', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'a', 'l', 't', 'P', 'o', 'r', 't', '\022', 'E', '\n', '\020', 'r', 'e', 'u', 's', 'e', '_',
+'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\017', 'r', 'e', 'u', 's',
+'e', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '\022', '_', '\n', '\021', 'h', 't', 't', 'p', '_', 'h', 'e', 'a', 'l', 't',
+'h', '_', 'c', 'h', 'e', 'c', 'k', '\030', '\010', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'H',
+'t', 't', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\017', 'h', 't', 't', 'p', 'H', 'e', 'a',
+'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\\', '\n', '\020', 't', 'c', 'p', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h',
+'e', 'c', 'k', '\030', '\t', ' ', '\001', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'T', 'c', 'p', 'H', 'e',
+'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\016', 't', 'c', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e',
+'c', 'k', '\022', '_', '\n', '\021', 'g', 'r', 'p', 'c', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '\030', '\013',
+' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'G', 'r', 'p', 'c', 'H', 'e', 'a', 'l', 't', 'h',
+'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\017', 'g', 'r', 'p', 'c', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022',
+'e', '\n', '\023', 'c', 'u', 's', 't', 'o', 'm', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '\030', '\r', ' ',
+'\001', '(', '\013', '2', '3', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'C', 'u', 's', 't', 'o', 'm', 'H', 'e', 'a', 'l', 't',
+'h', 'C', 'h', 'e', 'c', 'k', 'H', '\000', 'R', '\021', 'c', 'u', 's', 't', 'o', 'm', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e',
+'c', 'k', '\022', 'S', '\n', '\023', 'n', 'o', '_', 't', 'r', 'a', 'f', 'f', 'i', 'c', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l',
+'\030', '\014', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\021', 'n', 'o', 'T', 'r', 'a',
+'f', 'f', 'i', 'c', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'b', '\n', '\033', 'n', 'o', '_', 't', 'r', 'a', 'f', 'f', 'i',
+'c', '_', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\030', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\030', 'n', 'o', 'T', 'r', 'a', 'f', 'f', 'i', 'c', 'H', 'e', 'a',
+'l', 't', 'h', 'y', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'R', '\n', '\022', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y',
+'_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\016', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002',
+'*', '\000', 'R', '\021', 'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', '[', '\n', '\027',
+'u', 'n', 'h', 'e', 'a', 'l', 't', 'h', 'y', '_', 'e', 'd', 'g', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\017',
+' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\025', 'u', 'n', 'h', 'e', 'a', 'l', 't',
+'h', 'y', 'E', 'd', 'g', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'W', '\n', '\025', 'h', 'e', 'a', 'l', 't', 'h', 'y',
+'_', 'e', 'd', 'g', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\020', ' ', '\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', 'B', '\010', '\372',
+'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\023', 'h', 'e', 'a', 'l', 't', 'h', 'y', 'E', 'd', 'g', 'e', 'I', 'n', 't', 'e', 'r',
+'v', 'a', 'l', '\022', '$', '\n', '\016', 'e', 'v', 'e', 'n', 't', '_', 'l', 'o', 'g', '_', 'p', 'a', 't', 'h', '\030', '\021', ' ', '\001',
+'(', '\t', 'R', '\014', 'e', 'v', 'e', 'n', 't', 'L', 'o', 'g', 'P', 'a', 't', 'h', '\022', 'M', '\n', '\r', 'e', 'v', 'e', 'n', 't',
+'_', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\026', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'E', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e',
+'C', 'o', 'n', 'f', 'i', 'g', 'R', '\014', 'e', 'v', 'e', 'n', 't', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'F', '\n', ' ', 'a',
+'l', 'w', 'a', 'y', 's', '_', 'l', 'o', 'g', '_', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '_', 'f', 'a',
+'i', 'l', 'u', 'r', 'e', 's', '\030', '\023', ' ', '\001', '(', '\010', 'R', '\034', 'a', 'l', 'w', 'a', 'y', 's', 'L', 'o', 'g', 'H', 'e',
+'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'F', 'a', 'i', 'l', 'u', 'r', 'e', 's', '\022', 'M', '\n', '\013', 't', 'l', 's', '_',
+'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\025', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'T',
+'l', 's', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\n', 't', 'l', 's', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '^', '\n', '\037',
+'t', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '_', 'm', 'a', 't', 'c', 'h', '_', 'c', 'r',
+'i', 't', 'e', 'r', 'i', 'a', '\030', '\027', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\034', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o',
+'c', 'k', 'e', 't', 'M', 'a', 't', 'c', 'h', 'C', 'r', 'i', 't', 'e', 'r', 'i', 'a', '\032', '\200', '\001', '\n', '\007', 'P', 'a', 'y',
+'l', 'o', 'a', 'd', '\022', '\035', '\n', '\004', 't', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002',
+'\020', '\001', 'H', '\000', 'R', '\004', 't', 'e', 'x', 't', '\022', '\030', '\n', '\006', 'b', 'i', 'n', 'a', 'r', 'y', '\030', '\002', ' ', '\001', '(',
+'\014', 'H', '\000', 'R', '\006', 'b', 'i', 'n', 'a', 'r', 'y', ':', ',', '\232', '\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.',
+'P', 'a', 'y', 'l', 'o', 'a', 'd', 'B', '\016', '\n', '\007', 'p', 'a', 'y', 'l', 'o', 'a', 'd', '\022', '\003', '\370', 'B', '\001', '\032', '\340',
+'\005', '\n', '\017', 'H', 't', 't', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\037', '\n', '\004', 'h', 'o', 's',
+'t', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\004', 'h', 'o', 's',
+'t', '\022', '!', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300',
+'\001', '\002', '\310', '\001', '\000', 'R', '\004', 'p', 'a', 't', 'h', '\022', '=', '\n', '\004', 's', 'e', 'n', 'd', '\030', '\003', ' ', '\001', '(', '\013',
+'2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H',
+'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\004', 's', 'e', 'n', 'd', '\022',
+'C', '\n', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c',
+'k', '.', 'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', '\022', 'g', '\n', '\026', 'r', 'e', 'q',
+'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\006', ' ', '\003', '(', '\013',
+'2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H',
+'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020',
+'\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', 'K',
+'\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o',
+'v', 'e', '\030', '\010', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001', '\001', '\310', '\001',
+'\000', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e',
+'\022', 'F', '\n', '\021', 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd', '_', 's', 't', 'a', 't', 'u', 's', 'e', 's', '\030', '\t', ' ', '\003',
+'(', '\013', '2', '\031', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'I', 'n', 't', '6', '4', 'R',
+'a', 'n', 'g', 'e', 'R', '\020', 'e', 'x', 'p', 'e', 'c', 't', 'e', 'd', 'S', 't', 'a', 't', 'u', 's', 'e', 's', '\022', 'T', '\n',
+'\021', 'c', 'o', 'd', 'e', 'c', '_', 'c', 'l', 'i', 'e', 'n', 't', '_', 't', 'y', 'p', 'e', '\030', '\n', ' ', '\001', '(', '\016', '2',
+'\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'C', 'o', 'd', 'e', 'c', 'C', 'l', 'i', 'e',
+'n', 't', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\017', 'c', 'o', 'd', 'e', 'c', 'C', 'l',
+'i', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\022', 'V', '\n', '\024', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '_',
+'m', 'a', 't', 'c', 'h', 'e', 'r', '\030', '\013', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p',
+'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e',
+'r', 'R', '\022', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', ':', '4', '\232', '\305',
+'\210', '\036', '/', '\n', '-', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e',
+'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'H', 't', 't', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k',
+'J', '\004', '\010', '\005', '\020', '\006', 'J', '\004', '\010', '\007', '\020', '\010', 'R', '\014', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm',
+'e', 'R', '\t', 'u', 's', 'e', '_', 'h', 't', 't', 'p', '2', '\032', '\311', '\001', '\n', '\016', 'T', 'c', 'p', 'H', 'e', 'a', 'l', 't',
+'h', 'C', 'h', 'e', 'c', 'k', '\022', '=', '\n', '\004', 's', 'e', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h',
+'C', 'h', 'e', 'c', 'k', '.', 'P', 'a', 'y', 'l', 'o', 'a', 'd', 'R', '\004', 's', 'e', 'n', 'd', '\022', 'C', '\n', '\007', 'r', 'e',
+'c', 'e', 'i', 'v', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'P', 'a', 'y',
+'l', 'o', 'a', 'd', 'R', '\007', 'r', 'e', 'c', 'e', 'i', 'v', 'e', ':', '3', '\232', '\305', '\210', '\036', '.', '\n', ',', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c',
+'k', '.', 'T', 'c', 'p', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\032', '[', '\n', '\020', 'R', 'e', 'd', 'i', 's',
+'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R',
+'\003', 'k', 'e', 'y', ':', '5', '\232', '\305', '\210', '\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2',
+'.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'R', 'e', 'd', 'i', 's', 'H', 'e',
+'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\032', '\225', '\001', '\n', '\017', 'G', 'r', 'p', 'c', 'H', 'e', 'a', 'l', 't', 'h', 'C',
+'h', 'e', 'c', 'k', '\022', '!', '\n', '\014', 's', 'e', 'r', 'v', 'i', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(',
+'\t', 'R', '\013', 's', 'e', 'r', 'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', '\022', ')', '\n', '\t', 'a', 'u', 't', 'h', 'o', 'r', 'i',
+'t', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\t', 'a', 'u',
+'t', 'h', 'o', 'r', 'i', 't', 'y', ':', '4', '\232', '\305', '\210', '\036', '/', '\n', '-', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i',
+'.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'G', 'r', 'p', 'c',
+'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\032', '\300', '\001', '\n', '\021', 'C', 'u', 's', 't', 'o', 'm', 'H', 'e', 'a',
+'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372',
+'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n',
+'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '6', '\232', '\305',
+'\210', '\036', '1', '\n', '/', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e',
+'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'C', 'u', 's', 't', 'o', 'm', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e',
+'c', 'k', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006',
+'c', 'o', 'n', 'f', 'i', 'g', '\032', 'd', '\n', '\n', 'T', 'l', 's', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\016', 'a',
+'l', 'p', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\001', ' ', '\003', '(', '\t', 'R', '\r', 'a', 'l', 'p', 'n',
+'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', ':', '/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', '.', 'T', 'l',
+'s', 'O', 'p', 't', 'i', 'o', 'n', 's', ':', '$', '\232', '\305', '\210', '\036', '\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'B', '\025', '\n', '\016',
+'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\n', '\020', '\013',
+'*', '`', '\n', '\014', 'H', 'e', 'a', 'l', 't', 'h', 'S', 't', 'a', 't', 'u', 's', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O',
+'W', 'N', '\020', '\000', '\022', '\013', '\n', '\007', 'H', 'E', 'A', 'L', 'T', 'H', 'Y', '\020', '\001', '\022', '\r', '\n', '\t', 'U', 'N', 'H', 'E',
+'A', 'L', 'T', 'H', 'Y', '\020', '\002', '\022', '\014', '\n', '\010', 'D', 'R', 'A', 'I', 'N', 'I', 'N', 'G', '\020', '\003', '\022', '\013', '\n', '\007',
+'T', 'I', 'M', 'E', 'O', 'U', 'T', '\020', '\004', '\022', '\014', '\n', '\010', 'D', 'E', 'G', 'R', 'A', 'D', 'E', 'D', '\020', '\005', 'B', '@',
+'\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\020', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'P',
+'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[13] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_event_service_config_proto_upbdefinit,
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &envoy_type_v3_http_proto_upbdefinit,
+ &envoy_type_v3_range_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_health_check_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/health_check.proto",
+ UPB_STRVIEW_INIT(descriptor, 4147)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h
new file mode 100644
index 00000000000..56f62d7b6df
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h
@@ -0,0 +1,70 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/health_check.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_HEALTH_CHECK_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_HEALTH_CHECK_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_def_init envoy_config_core_v3_health_check_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_Payload_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.Payload");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_HttpHealthCheck_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.HttpHealthCheck");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_TcpHealthCheck_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.TcpHealthCheck");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_RedisHealthCheck_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.RedisHealthCheck");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_GrpcHealthCheck_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.GrpcHealthCheck");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_CustomHealthCheck_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.CustomHealthCheck");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HealthCheck_TlsOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_health_check_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HealthCheck.TlsOptions");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_HEALTH_CHECK_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c
new file mode 100644
index 00000000000..3afce108f46
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c
@@ -0,0 +1,56 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/http_uri.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/http_uri.upbdefs.h"
+
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_HttpUri_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_core_v3_HttpUri_msginit,
+};
+
+static const char descriptor[454] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'h', 't',
+'t', 'p', '_', 'u', 'r', 'i', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\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', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n',
+'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\307', '\001', '\n', '\007', 'H', 't', 't', 'p', 'U', 'r', 'i', '\022', '\031', '\n', '\003', 'u', 'r',
+'i', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\003', 'u', 'r', 'i', '\022', '#', '\n', '\007',
+'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R',
+'\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', '?', '\n', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\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', 'B', '\n', '\372', 'B', '\007', '\252', '\001', '\004', '\010', '\001', '2', '\000', 'R', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', ':', ' ',
+'\232', '\305', '\210', '\036', '\033', '\n', '\031', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.',
+'H', 't', 't', 'p', 'U', 'r', 'i', 'B', '\031', '\n', '\022', 'h', 't', 't', 'p', '_', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_',
+'t', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', 'B', '<', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x',
+'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\014', 'H',
+'t', 't', 'p', 'U', 'r', 'i', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &google_protobuf_duration_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_http_uri_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/http_uri.proto",
+ UPB_STRVIEW_INIT(descriptor, 454)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h
new file mode 100644
index 00000000000..730b4350f9a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/http_uri.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_HTTP_URI_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_HTTP_URI_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_def_init envoy_config_core_v3_http_uri_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HttpUri_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_http_uri_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HttpUri");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_HTTP_URI_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c
new file mode 100644
index 00000000000..0f1096b5641
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c
@@ -0,0 +1,231 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/protocol.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/protocol.upbdefs.h"
+
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_TcpProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_HttpProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http1ProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit;
+extern const upb_msglayout envoy_config_core_v3_KeepaliveSettings_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http2ProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit;
+extern const upb_msglayout envoy_config_core_v3_GrpcProtocolOptions_msginit;
+extern const upb_msglayout envoy_config_core_v3_Http3ProtocolOptions_msginit;
+
+static const upb_msglayout *layouts[11] = {
+ &envoy_config_core_v3_TcpProtocolOptions_msginit,
+ &envoy_config_core_v3_UpstreamHttpProtocolOptions_msginit,
+ &envoy_config_core_v3_HttpProtocolOptions_msginit,
+ &envoy_config_core_v3_Http1ProtocolOptions_msginit,
+ &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_msginit,
+ &envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_msginit,
+ &envoy_config_core_v3_KeepaliveSettings_msginit,
+ &envoy_config_core_v3_Http2ProtocolOptions_msginit,
+ &envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_msginit,
+ &envoy_config_core_v3_GrpcProtocolOptions_msginit,
+ &envoy_config_core_v3_Http3ProtocolOptions_msginit,
+};
+
+static const char descriptor[4229] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'p', 'r',
+'o', 't', 'o', 'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/',
+'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o', 'o',
+'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't',
+'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'A', '\n', '\022', 'T', 'c', 'p',
+'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'T', 'c', 'p', 'P', 'r', 'o', 't', 'o',
+'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', '\236', '\001', '\n', '\033', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'H', 't',
+'t', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\031', '\n', '\010', 'a', 'u', 't', 'o',
+'_', 's', 'n', 'i', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\007', 'a', 'u', 't', 'o', 'S', 'n', 'i', '\022', '.', '\n', '\023', 'a', 'u',
+'t', 'o', '_', 's', 'a', 'n', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\021',
+'a', 'u', 't', 'o', 'S', 'a', 'n', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', ':', '4', '\232', '\305', '\210', '\036', '/', '\n',
+'-', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'U', 'p', 's', 't', 'r', 'e',
+'a', 'm', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', '\322', '\004', '\n',
+'\023', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '<', '\n', '\014', 'i',
+'d', 'l', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\001', ' ', '\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', '\013', 'i', 'd', 'l', 'e',
+'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'Q', '\n', '\027', 'm', 'a', 'x', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'_', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\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', '\025', 'm', 'a', 'x', 'C', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', 'Q', '\n', '\021', 'm', 'a', 'x', '_', 'h', 'e',
+'a', 'd', 'e', 'r', 's', '_', 'c', 'o', 'u', 'n', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372',
+'B', '\004', '*', '\002', '(', '\001', 'R', '\017', 'm', 'a', 'x', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'C', 'o', 'u', 'n', 't', '\022', 'I',
+'\n', '\023', 'm', 'a', 'x', '_', 's', 't', 'r', 'e', 'a', 'm', '_', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\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', '\021', 'm', 'a', 'x', 'S', 't', 'r', 'e', 'a', 'm', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\215',
+'\001', '\n', '\037', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 'w', 'i', 't', 'h', '_', 'u', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r',
+'e', 's', '_', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\005', ' ', '\001', '(', '\016', '2', 'F', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o',
+'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'W', 'i', 't', 'h', 'U', 'n', 'd', 'e', 'r',
+'s', 'c', 'o', 'r', 'e', 's', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\034', 'h', 'e', 'a', 'd', 'e', 'r', 's', 'W', 'i', 't', 'h',
+'U', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r', 'e', 's', 'A', 'c', 't', 'i', 'o', 'n', '\"', 'N', '\n', '\034', 'H', 'e', 'a', 'd',
+'e', 'r', 's', 'W', 'i', 't', 'h', 'U', 'n', 'd', 'e', 'r', 's', 'c', 'o', 'r', 'e', 's', 'A', 'c', 't', 'i', 'o', 'n', '\022',
+'\t', '\n', '\005', 'A', 'L', 'L', 'O', 'W', '\020', '\000', '\022', '\022', '\n', '\016', 'R', 'E', 'J', 'E', 'C', 'T', '_', 'R', 'E', 'Q', 'U',
+'E', 'S', 'T', '\020', '\001', '\022', '\017', '\n', '\013', 'D', 'R', 'O', 'P', '_', 'H', 'E', 'A', 'D', 'E', 'R', '\020', '\002', ':', ',', '\232',
+'\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H',
+'t', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', '\361', '\006', '\n', '\024', 'H', 't',
+'t', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'H', '\n', '\022', 'a', 'l', 'l',
+'o', 'w', '_', 'a', 'b', 's', 'o', 'l', 'u', 't', 'e', '_', 'u', 'r', 'l', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R',
+'\020', 'a', 'l', 'l', 'o', 'w', 'A', 'b', 's', 'o', 'l', 'u', 't', 'e', 'U', 'r', 'l', '\022', '$', '\n', '\016', 'a', 'c', 'c', 'e',
+'p', 't', '_', 'h', 't', 't', 'p', '_', '1', '0', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\014', 'a', 'c', 'c', 'e', 'p', 't', 'H',
+'t', 't', 'p', '1', '0', '\022', '6', '\n', '\030', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'h', 'o', 's', 't', '_', 'f', 'o', 'r',
+'_', 'h', 't', 't', 'p', '_', '1', '0', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\024', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'H', 'o',
+'s', 't', 'F', 'o', 'r', 'H', 't', 't', 'p', '1', '0', '\022', 'f', '\n', '\021', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'k', 'e', 'y',
+'_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l',
+'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', 'R', '\017',
+'h', 'e', 'a', 'd', 'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', '\022', '\'', '\n', '\017', 'e', 'n', 'a', 'b', 'l', 'e',
+'_', 't', 'r', 'a', 'i', 'l', 'e', 'r', 's', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\016', 'e', 'n', 'a', 'b', 'l', 'e', 'T', 'r',
+'a', 'i', 'l', 'e', 'r', 's', '\022', '0', '\n', '\024', 'a', 'l', 'l', 'o', 'w', '_', 'c', 'h', 'u', 'n', 'k', 'e', 'd', '_', 'l',
+'e', 'n', 'g', 't', 'h', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\022', 'a', 'l', 'l', 'o', 'w', 'C', 'h', 'u', 'n', 'k', 'e', 'd',
+'L', 'e', 'n', 'g', 't', 'h', '\022', 'z', '\n', '-', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '_', 's', 't', 'r', 'e', 'a', 'm',
+'_', 'e', 'r', 'r', 'o', 'r', '_', 'o', 'n', '_', 'i', 'n', 'v', 'a', 'l', 'i', 'd', '_', 'h', 't', 't', 'p', '_', 'm', 'e',
+'s', 's', 'a', 'g', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\'', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', 'S',
+'t', 'r', 'e', 'a', 'm', 'E', 'r', 'r', 'o', 'r', 'O', 'n', 'I', 'n', 'v', 'a', 'l', 'i', 'd', 'H', 't', 't', 'p', 'M', 'e',
+'s', 's', 'a', 'g', 'e', '\032', '\302', '\002', '\n', '\017', 'H', 'e', 'a', 'd', 'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't',
+'\022', 'x', '\n', '\021', 'p', 'r', 'o', 'p', 'e', 'r', '_', 'c', 'a', 's', 'e', '_', 'w', 'o', 'r', 'd', 's', '\030', '\001', ' ', '\001',
+'(', '\013', '2', 'J', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a',
+'d', 'e', 'r', 'K', 'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', '.', 'P', 'r', 'o', 'p', 'e', 'r', 'C', 'a', 's', 'e', 'W', 'o',
+'r', 'd', 's', 'H', '\000', 'R', '\017', 'p', 'r', 'o', 'p', 'e', 'r', 'C', 'a', 's', 'e', 'W', 'o', 'r', 'd', 's', '\032', '`', '\n',
+'\017', 'P', 'r', 'o', 'p', 'e', 'r', 'C', 'a', 's', 'e', 'W', 'o', 'r', 'd', 's', ':', 'M', '\232', '\305', '\210', '\036', 'H', '\n', 'F',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '1', 'P', 'r',
+'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'K', 'e', 'y', 'F', 'o',
+'r', 'm', 'a', 't', '.', 'P', 'r', 'o', 'p', 'e', 'r', 'C', 'a', 's', 'e', 'W', 'o', 'r', 'd', 's', ':', '=', '\232', '\305', '\210',
+'\036', '8', '\n', '6', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't',
+'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'K',
+'e', 'y', 'F', 'o', 'r', 'm', 'a', 't', 'B', '\024', '\n', '\r', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'f', 'o', 'r', 'm', 'a', 't',
+'\022', '\003', '\370', 'B', '\001', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v',
+'2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o',
+'n', 's', '\"', '\340', '\001', '\n', '\021', 'K', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\022',
+'E', '\n', '\010', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\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', 'B', '\016', '\372', 'B', '\013', '\252',
+'\001', '\010', '\010', '\001', '2', '\004', '\020', '\300', '\204', '=', 'R', '\010', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'C', '\n', '\007', 't',
+'i', 'm', 'e', 'o', 'u', 't', '\030', '\002', ' ', '\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', 'B', '\016', '\372', 'B', '\013', '\252', '\001', '\010', '\010', '\001', '2',
+'\004', '\020', '\300', '\204', '=', 'R', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\022', '?', '\n', '\017', 'i', 'n', 't', 'e', 'r', 'v', 'a',
+'l', '_', 'j', 'i', 't', 't', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', 'J', 'i',
+'t', 't', 'e', 'r', '\"', '\370', '\r', '\n', '\024', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't',
+'i', 'o', 'n', 's', '\022', 'F', '\n', '\020', 'h', 'p', 'a', 'c', 'k', '_', 't', 'a', 'b', 'l', 'e', '_', 's', 'i', 'z', 'e', '\030',
+'\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U',
+'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'h', 'p', 'a', 'c', 'k', 'T', 'a', 'b', 'l', 'e', 'S', 'i', 'z',
+'e', '\022', 'a', '\n', '\026', 'm', 'a', 'x', '_', 'c', 'o', 'n', 'c', 'u', 'r', 'r', 'e', 'n', 't', '_', 's', 't', 'r', 'e', 'a',
+'m', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\r', '\372', 'B', '\n', '*', '\010', '\030', '\377', '\377', '\377', '\377',
+'\007', '(', '\001', 'R', '\024', 'm', 'a', 'x', 'C', 'o', 'n', 'c', 'u', 'r', 'r', 'e', 'n', 't', 'S', 't', 'r', 'e', 'a', 'm', 's',
+'\022', 'j', '\n', '\032', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 's', 't', 'r', 'e', 'a', 'm', '_', 'w', 'i', 'n', 'd', 'o', 'w',
+'_', 's', 'i', 'z', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\017', '\372', 'B', '\014', '*', '\n', '\030', '\377',
+'\377', '\377', '\377', '\007', '(', '\377', '\377', '\003', 'R', '\027', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'S', 't', 'r', 'e', 'a', 'm', 'W', 'i',
+'n', 'd', 'o', 'w', 'S', 'i', 'z', 'e', '\022', 'r', '\n', '\036', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'c', 'o', 'n', 'n', 'e',
+'c', 't', 'i', 'o', 'n', '_', 'w', 'i', 'n', 'd', 'o', 'w', '_', 's', 'i', 'z', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a',
+'l', 'u', 'e', 'B', '\017', '\372', 'B', '\014', '*', '\n', '\030', '\377', '\377', '\377', '\377', '\007', '(', '\377', '\377', '\003', 'R', '\033', 'i', 'n', 'i',
+'t', 'i', 'a', 'l', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'W', 'i', 'n', 'd', 'o', 'w', 'S', 'i', 'z', 'e', '\022',
+'#', '\n', '\r', 'a', 'l', 'l', 'o', 'w', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\014', 'a',
+'l', 'l', 'o', 'w', 'C', 'o', 'n', 'n', 'e', 'c', 't', '\022', '%', '\n', '\016', 'a', 'l', 'l', 'o', 'w', '_', 'm', 'e', 't', 'a',
+'d', 'a', 't', 'a', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\r', 'a', 'l', 'l', 'o', 'w', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a',
+'\022', 'U', '\n', '\023', 'm', 'a', 'x', '_', 'o', 'u', 't', 'b', 'o', 'u', 'n', 'd', '_', 'f', 'r', 'a', 'm', 'e', 's', '\030', '\007',
+' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I',
+'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\021', 'm', 'a', 'x', 'O', 'u',
+'t', 'b', 'o', 'u', 'n', 'd', 'F', 'r', 'a', 'm', 'e', 's', '\022', 'd', '\n', '\033', 'm', 'a', 'x', '_', 'o', 'u', 't', 'b', 'o',
+'u', 'n', 'd', '_', 'c', 'o', 'n', 't', 'r', 'o', 'l', '_', 'f', 'r', 'a', 'm', 'e', 's', '\030', '\010', ' ', '\001', '(', '\013', '2',
+'\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V',
+'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\030', 'm', 'a', 'x', 'O', 'u', 't', 'b', 'o', 'u', 'n',
+'d', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'F', 'r', 'a', 'm', 'e', 's', '\022', '\204', '\001', '\n', '1', 'm', 'a', 'x', '_', 'c', 'o',
+'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', '_', 'i', 'n', 'b', 'o', 'u', 'n', 'd', '_', 'f', 'r', 'a', 'm', 'e', 's', '_',
+'w', 'i', 't', 'h', '_', 'e', 'm', 'p', 't', 'y', '_', 'p', 'a', 'y', 'l', 'o', 'a', 'd', '\030', '\t', ' ', '\001', '(', '\013', '2',
+'\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V',
+'a', 'l', 'u', 'e', 'R', '+', 'm', 'a', 'x', 'C', 'o', 'n', 's', 'e', 'c', 'u', 't', 'i', 'v', 'e', 'I', 'n', 'b', 'o', 'u',
+'n', 'd', 'F', 'r', 'a', 'm', 'e', 's', 'W', 'i', 't', 'h', 'E', 'm', 'p', 't', 'y', 'P', 'a', 'y', 'l', 'o', 'a', 'd', '\022',
+'o', '\n', '&', 'm', 'a', 'x', '_', 'i', 'n', 'b', 'o', 'u', 'n', 'd', '_', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '_', 'f',
+'r', 'a', 'm', 'e', 's', '_', 'p', 'e', 'r', '_', 's', 't', 'r', 'e', 'a', 'm', '\030', '\n', ' ', '\001', '(', '\013', '2', '\034', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l',
+'u', 'e', 'R', '!', 'm', 'a', 'x', 'I', 'n', 'b', 'o', 'u', 'n', 'd', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', 'F', 'r', 'a',
+'m', 'e', 's', 'P', 'e', 'r', 'S', 't', 'r', 'e', 'a', 'm', '\022', '\221', '\001', '\n', '4', 'm', 'a', 'x', '_', 'i', 'n', 'b', 'o',
+'u', 'n', 'd', '_', 'w', 'i', 'n', 'd', 'o', 'w', '_', 'u', 'p', 'd', 'a', 't', 'e', '_', 'f', 'r', 'a', 'm', 'e', 's', '_',
+'p', 'e', 'r', '_', 'd', 'a', 't', 'a', '_', 'f', 'r', 'a', 'm', 'e', '_', 's', 'e', 'n', 't', '\030', '\013', ' ', '\001', '(', '\013',
+'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2',
+'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', ',', 'm', 'a', 'x', 'I', 'n', 'b', 'o', 'u', 'n',
+'d', 'W', 'i', 'n', 'd', 'o', 'w', 'U', 'p', 'd', 'a', 't', 'e', 'F', 'r', 'a', 'm', 'e', 's', 'P', 'e', 'r', 'D', 'a', 't',
+'a', 'F', 'r', 'a', 'm', 'e', 'S', 'e', 'n', 't', '\022', 'U', '\n', '&', 's', 't', 'r', 'e', 'a', 'm', '_', 'e', 'r', 'r', 'o',
+'r', '_', 'o', 'n', '_', 'i', 'n', 'v', 'a', 'l', 'i', 'd', '_', 'h', 't', 't', 'p', '_', 'm', 'e', 's', 's', 'a', 'g', 'i',
+'n', 'g', '\030', '\014', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', 'R', '!', 's', 't', 'r', 'e', 'a', 'm', 'E', 'r', 'r', 'o', 'r',
+'O', 'n', 'I', 'n', 'v', 'a', 'l', 'i', 'd', 'H', 't', 't', 'p', 'M', 'e', 's', 's', 'a', 'g', 'i', 'n', 'g', '\022', 'z', '\n',
+'-', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '_', 's', 't', 'r', 'e', 'a', 'm', '_', 'e', 'r', 'r', 'o', 'r', '_', 'o', 'n',
+'_', 'i', 'n', 'v', 'a', 'l', 'i', 'd', '_', 'h', 't', 't', 'p', '_', 'm', 'e', 's', 's', 'a', 'g', 'e', '\030', '\016', ' ', '\001',
+'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l',
+'V', 'a', 'l', 'u', 'e', 'R', '\'', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', 'S', 't', 'r', 'e', 'a', 'm', 'E', 'r', 'r', 'o',
+'r', 'O', 'n', 'I', 'n', 'v', 'a', 'l', 'i', 'd', 'H', 't', 't', 'p', 'M', 'e', 's', 's', 'a', 'g', 'e', '\022', 'z', '\n', '\032',
+'c', 'u', 's', 't', 'o', 'm', '_', 's', 'e', 't', 't', 'i', 'n', 'g', 's', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r',
+'s', '\030', '\r', ' ', '\003', '(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n',
+'s', '.', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 'R', '\030', 'c', 'u', 's', 't',
+'o', 'm', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\022', 'Z', '\n', '\024', 'c',
+'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'k', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '\030', '\017', ' ', '\001', '(', '\013',
+'2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'K',
+'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'R', '\023', 'c', 'o', 'n', 'n', 'e', 'c', 't',
+'i', 'o', 'n', 'K', 'e', 'e', 'p', 'a', 'l', 'i', 'v', 'e', '\032', '\345', '\001', '\n', '\021', 'S', 'e', 't', 't', 'i', 'n', 'g', 's',
+'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\022', 'Q', '\n', '\n', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\030', '\001',
+' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I',
+'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\023', '\372', 'B', '\010', '*', '\006', '\030', '\377', '\377', '\003', '(', '\000', '\372', 'B', '\005',
+'\212', '\001', '\002', '\020', '\001', 'R', '\n', 'i', 'd', 'e', 'n', 't', 'i', 'f', 'i', 'e', 'r', '\022', '<', '\n', '\005', 'v', 'a', 'l', 'u',
+'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\005', 'v',
+'a', 'l', 'u', 'e', ':', '?', '\232', '\305', '\210', '\036', ':', '\n', '8', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2',
+'.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n',
+'s', '.', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', ':', '-', '\232', '\305', '\210', '\036',
+'(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'H', 't', 't', 'p',
+'2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', '\245', '\001', '\n', '\023', 'G', 'r', 'p', 'c',
+'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '`', '\n', '\026', 'h', 't', 't', 'p', '2', '_',
+'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '*', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p',
+'2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\024', 'h', 't', 't', 'p', '2', 'P', 'r',
+'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', ':', ',', '\232', '\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'G', 'r', 'p', 'c', 'P', 'r', 'o', 't', 'o', 'c',
+'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\"', '\026', '\n', '\024', 'H', 't', 't', 'p', '3', 'P', 'r', 'o', 't', 'o', 'c', 'o',
+'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B', '=', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\r', 'P', 'r',
+'o', 't', 'o', 'c', 'o', 'l', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[7] = {
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_protocol_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/protocol.proto",
+ UPB_STRVIEW_INIT(descriptor, 4229)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h
new file mode 100644
index 00000000000..ddc54578dfa
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h
@@ -0,0 +1,85 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/protocol.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_PROTOCOL_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_PROTOCOL_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_def_init envoy_config_core_v3_protocol_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_TcpProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.TcpProtocolOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_UpstreamHttpProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.UpstreamHttpProtocolOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_HttpProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.HttpProtocolOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Http1ProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Http1ProtocolOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Http1ProtocolOptions_HeaderKeyFormat_ProperCaseWords_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Http1ProtocolOptions.HeaderKeyFormat.ProperCaseWords");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_KeepaliveSettings_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.KeepaliveSettings");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Http2ProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Http2ProtocolOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Http2ProtocolOptions_SettingsParameter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Http2ProtocolOptions.SettingsParameter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_GrpcProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.GrpcProtocolOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_Http3ProtocolOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.Http3ProtocolOptions");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_PROTOCOL_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c
new file mode 100644
index 00000000000..f1c19dc7557
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c
@@ -0,0 +1,43 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/proxy_protocol.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/proxy_protocol.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_ProxyProtocolConfig_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_core_v3_ProxyProtocolConfig_msginit,
+};
+
+static const char descriptor[299] = {'\n', ')', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'p', 'r',
+'o', 'x', 'y', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n',
+'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\"', '}', '\n', '\023',
+'P', 'r', 'o', 'x', 'y', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'K', '\n', '\007', 'v', 'e',
+'r', 's', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\016', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'P', 'r', 'o', 'x', 'y', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'C', 'o',
+'n', 'f', 'i', 'g', '.', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\"', '\031', '\n', '\007',
+'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '\006', '\n', '\002', 'V', '1', '\020', '\000', '\022', '\006', '\n', '\002', 'V', '2', '\020', '\001', 'B', 'B',
+'\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\022', 'P', 'r', 'o', 'x', 'y', 'P', 'r', 'o', 't', 'o', 'c', 'o',
+'l', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_proxy_protocol_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/proxy_protocol.proto",
+ UPB_STRVIEW_INIT(descriptor, 299)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h
new file mode 100644
index 00000000000..5f9c1a6cfe7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/proxy_protocol.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_PROXY_PROTOCOL_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_PROXY_PROTOCOL_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_def_init envoy_config_core_v3_proxy_protocol_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_ProxyProtocolConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_proxy_protocol_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.ProxyProtocolConfig");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_PROXY_PROTOCOL_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c
new file mode 100644
index 00000000000..1ea0575c947
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c
@@ -0,0 +1,59 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/socket_option.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/socket_option.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_SocketOption_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_core_v3_SocketOption_msginit,
+};
+
+static const char descriptor[590] = {'\n', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 's', 'o',
+'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.',
+'p', 'r', 'o', 't', 'o', '\"', '\345', '\002', '\n', '\014', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', '\022', ' ', '\n',
+'\013', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013', 'd', 'e', 's', 'c', 'r',
+'i', 'p', 't', 'i', 'o', 'n', '\022', '\024', '\n', '\005', 'l', 'e', 'v', 'e', 'l', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\005', 'l', 'e',
+'v', 'e', 'l', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\003', ' ', '\001', '(', '\003', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\035',
+'\n', '\t', 'i', 'n', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', ' ', '\001', '(', '\003', 'H', '\000', 'R', '\010', 'i', 'n', 't', 'V',
+'a', 'l', 'u', 'e', '\022', '\035', '\n', '\t', 'b', 'u', 'f', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\005', ' ', '\001', '(', '\014', 'H', '\000',
+'R', '\010', 'b', 'u', 'f', 'V', 'a', 'l', 'u', 'e', '\022', 'N', '\n', '\005', 's', 't', 'a', 't', 'e', '\030', '\006', ' ', '\001', '(', '\016',
+'2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S',
+'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', '.', 'S', 'o', 'c', 'k', 'e', 't', 'S', 't', 'a', 't', 'e', 'B', '\010',
+'\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\005', 's', 't', 'a', 't', 'e', '\"', 'F', '\n', '\013', 'S', 'o', 'c', 'k', 'e', 't',
+'S', 't', 'a', 't', 'e', '\022', '\021', '\n', '\r', 'S', 'T', 'A', 'T', 'E', '_', 'P', 'R', 'E', 'B', 'I', 'N', 'D', '\020', '\000', '\022',
+'\017', '\n', '\013', 'S', 'T', 'A', 'T', 'E', '_', 'B', 'O', 'U', 'N', 'D', '\020', '\001', '\022', '\023', '\n', '\017', 'S', 'T', 'A', 'T', 'E',
+'_', 'L', 'I', 'S', 'T', 'E', 'N', 'I', 'N', 'G', '\020', '\002', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'c', 'o', 'r', 'e', '.', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o',
+'n', 'B', '\014', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\022', '\003', '\370', 'B', '\001', 'B', 'A', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v',
+'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', 'B', '\021', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272',
+'\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_socket_option_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/socket_option.proto",
+ UPB_STRVIEW_INIT(descriptor, 590)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h
new file mode 100644
index 00000000000..200f4a3b1ca
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/socket_option.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_SOCKET_OPTION_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_SOCKET_OPTION_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_def_init envoy_config_core_v3_socket_option_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_SocketOption_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_socket_option_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.SocketOption");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_SOCKET_OPTION_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c
new file mode 100644
index 00000000000..82062b6692b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c
@@ -0,0 +1,68 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/substitution_format_string.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/core/v3/substitution_format_string.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_core_v3_SubstitutionFormatString_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_core_v3_SubstitutionFormatString_msginit,
+};
+
+static const char descriptor[711] = {'\n', '5', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 's', 'u',
+'b', 's', 't', 'i', 't', 'u', 't', 'i', 'o', 'n', '_', 'f', 'o', 'r', 'm', 'a', 't', '_', 's', 't', 'r', 'i', 'n', 'g', '.',
+'p', 'r', 'o', 't', 'o', '\022', '\024', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/',
+'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/',
+'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034',
+'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a',
+'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\203', '\003', '\n', '\030', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'i', 'o',
+'n', 'F', 'o', 'r', 'm', 'a', 't', 'S', 't', 'r', 'i', 'n', 'g', '\022', '%', '\n', '\013', 't', 'e', 'x', 't', '_', 'f', 'o', 'r',
+'m', 'a', 't', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\002', '\030', '\001', 'H', '\000', 'R', '\n', 't', 'e', 'x', 't', 'F', 'o', 'r', 'm',
+'a', 't', '\022', 'D', '\n', '\013', 'j', 's', 'o', 'n', '_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'B', '\010',
+'\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\n', 'j', 's', 'o', 'n', 'F', 'o', 'r', 'm', 'a', 't', '\022', 'P', '\n',
+'\022', 't', 'e', 'x', 't', '_', 'f', 'o', 'r', 'm', 'a', 't', '_', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\005', ' ', '\001', '(', '\013',
+'2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D',
+'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\020', 't', 'e', 'x', 't', 'F', 'o', 'r', 'm', 'a', 't', 'S', 'o',
+'u', 'r', 'c', 'e', '\022', '*', '\n', '\021', 'o', 'm', 'i', 't', '_', 'e', 'm', 'p', 't', 'y', '_', 'v', 'a', 'l', 'u', 'e', 's',
+'\030', '\003', ' ', '\001', '(', '\010', 'R', '\017', 'o', 'm', 'i', 't', 'E', 'm', 'p', 't', 'y', 'V', 'a', 'l', 'u', 'e', 's', '\022', '!',
+'\n', '\014', 'c', 'o', 'n', 't', 'e', 'n', 't', '_', 't', 'y', 'p', 'e', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\013', 'c', 'o', 'n',
+'t', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\022', 'J', '\n', '\n', 'f', 'o', 'r', 'm', 'a', 't', 't', 'e', 'r', 's', '\030', '\006', ' ',
+'\003', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\n', 'f',
+'o', 'r', 'm', 'a', 't', 't', 'e', 'r', 's', 'B', '\r', '\n', '\006', 'f', 'o', 'r', 'm', 'a', 't', '\022', '\003', '\370', 'B', '\001', 'B',
+'M', '\n', '\"', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\035', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'i', 'o',
+'n', 'F', 'o', 'r', 'm', 'a', 't', 'S', 't', 'r', 'i', 'n', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006',
+'\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_core_v3_substitution_format_string_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/core/v3/substitution_format_string.proto",
+ UPB_STRVIEW_INIT(descriptor, 711)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h
new file mode 100644
index 00000000000..c3196bd327d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/core/v3/substitution_format_string.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_CORE_V3_SUBSTITUTION_FORMAT_STRING_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_CORE_V3_SUBSTITUTION_FORMAT_STRING_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_def_init envoy_config_core_v3_substitution_format_string_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_core_v3_SubstitutionFormatString_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_core_v3_substitution_format_string_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.core.v3.SubstitutionFormatString");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_CORE_V3_SUBSTITUTION_FORMAT_STRING_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c
new file mode 100644
index 00000000000..a140da45240
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c
@@ -0,0 +1,107 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/endpoint/v3/endpoint.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/endpoint/v3/endpoint.upbdefs.h"
+
+extern upb_def_init envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_msginit;
+
+static const upb_msglayout *layouts[4] = {
+ &envoy_config_endpoint_v3_ClusterLoadAssignment_msginit,
+ &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_msginit,
+ &envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_msginit,
+ &envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_msginit,
+};
+
+static const char descriptor[1443] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'v',
+'3', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\032', '2', 'e', 'n', 'v', 'o', 'y', '/',
+'c', 'o', 'n', 'f', 'i', 'g', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'v', '3', '/', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o',
+'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r',
+'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a',
+'t', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\"', '\246', '\010', '\n', '\025', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n',
+'m', 'e', 'n', 't', '\022', '*', '\n', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(',
+'\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\013', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', '\022', 'K',
+'\n', '\t', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'L', 'o', 'c', 'a', 'l',
+'i', 't', 'y', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'R', '\t', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's',
+'\022', 'l', '\n', '\017', 'n', 'a', 'm', 'e', 'd', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\030', '\005', ' ', '\003', '(', '\013',
+'2', 'C', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.',
+'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '.',
+'N', 'a', 'm', 'e', 'd', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'E', 'n', 't', 'r', 'y', 'R', '\016', 'n', 'a', 'm', 'e',
+'d', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', 'N', '\n', '\006', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\004', ' ', '\001', '(',
+'\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't',
+'.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't',
+'.', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\006', 'p', 'o', 'l', 'i', 'c', 'y', '\032', '\303', '\004', '\n', '\006', 'P', 'o', 'l', 'i', 'c',
+'y', '\022', 'j', '\n', '\016', 'd', 'r', 'o', 'p', '_', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 's', '\030', '\002', ' ', '\003', '(', '\013',
+'2', 'C', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.',
+'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '.',
+'P', 'o', 'l', 'i', 'c', 'y', '.', 'D', 'r', 'o', 'p', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'R', '\r', 'd', 'r', 'o', 'p',
+'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 's', '\022', '^', '\n', '\027', 'o', 'v', 'e', 'r', 'p', 'r', 'o', 'v', 'i', 's', 'i', 'o',
+'n', 'i', 'n', 'g', '_', 'f', 'a', 'c', 't', 'o', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372',
+'B', '\004', '*', '\002', ' ', '\000', 'R', '\026', 'o', 'v', 'e', 'r', 'p', 'r', 'o', 'v', 'i', 's', 'i', 'o', 'n', 'i', 'n', 'g', 'F',
+'a', 'c', 't', 'o', 'r', '\022', 'U', '\n', '\024', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 's', 't', 'a', 'l', 'e', '_', 'a',
+'f', 't', 'e', 'r', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\022', 'e',
+'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', 't', 'a', 'l', 'e', 'A', 'f', 't', 'e', 'r', '\032', '\275', '\001', '\n', '\014', 'D', 'r', 'o',
+'p', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '\022', '#', '\n', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\030', '\001', ' ', '\001',
+'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\022', 'I', '\n', '\017',
+'d', 'r', 'o', 'p', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', ' ', '.', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e',
+'r', 'c', 'e', 'n', 't', 'R', '\016', 'd', 'r', 'o', 'p', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', ':', '=', '\232', '\305',
+'\210', '\036', '8', '\n', '6', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r',
+'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', '.', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'D', 'r', 'o',
+'p', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', ':', '0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'a',
+'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e',
+'n', 't', '.', 'P', 'o', 'l', 'i', 'c', 'y', 'J', '\004', '\010', '\001', '\020', '\002', 'J', '\004', '\010', '\005', '\020', '\006', 'R', '\030', 'd', 'i',
+'s', 'a', 'b', 'l', 'e', '_', 'o', 'v', 'e', 'r', 'p', 'r', 'o', 'v', 'i', 's', 'i', 'o', 'n', 'i', 'n', 'g', '\032', 'e', '\n',
+'\023', 'N', 'a', 'm', 'e', 'd', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k',
+'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '8', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ',
+'\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001',
+':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'l', 'u',
+'s', 't', 'e', 'r', 'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', 'B', 'A', '\n', '&', 'i', 'o', '.',
+'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e',
+'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', 'B', '\r', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'P', 'r', 'o', 't', 'o',
+'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_endpoint_v3_endpoint_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/endpoint/v3/endpoint.proto",
+ UPB_STRVIEW_INIT(descriptor, 1443)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h
new file mode 100644
index 00000000000..9ac7a0e9417
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h
@@ -0,0 +1,50 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/endpoint/v3/endpoint.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_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_def_init envoy_config_endpoint_v3_endpoint_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_ClusterLoadAssignment_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.ClusterLoadAssignment");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.ClusterLoadAssignment.Policy.DropOverload");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_ClusterLoadAssignment_NamedEndpointsEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.ClusterLoadAssignment.NamedEndpointsEntry");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c
new file mode 100644
index 00000000000..ea1dc96f4f3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c
@@ -0,0 +1,113 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/endpoint/v3/endpoint_components.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/endpoint/v3/endpoint_components.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_health_check_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_endpoint_v3_Endpoint_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_LbEndpoint_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_LocalityLbEndpoints_msginit;
+
+static const upb_msglayout *layouts[4] = {
+ &envoy_config_endpoint_v3_Endpoint_msginit,
+ &envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_msginit,
+ &envoy_config_endpoint_v3_LbEndpoint_msginit,
+ &envoy_config_endpoint_v3_LocalityLbEndpoints_msginit,
+};
+
+static const char descriptor[1584] = {'\n', '2', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'v',
+'3', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't',
+'.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3',
+'/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n',
+'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\'', 'e',
+'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'h', 'e', 'a', 'l', 't',
+'h', '_', 'c', 'h', 'e', 'c', 'k', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't',
+'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i',
+'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l',
+'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\201', '\003', '\n', '\010', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\022',
+'7', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'R', '\007', 'a',
+'d', 'd', 'r', 'e', 's', 's', '\022', 'd', '\n', '\023', 'h', 'e', 'a', 'l', 't', 'h', '_', 'c', 'h', 'e', 'c', 'k', '_', 'c', 'o',
+'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'H', 'e', 'a',
+'l', 't', 'h', 'C', 'h', 'e', 'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\021', 'h', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e',
+'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\032', '\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\003', ' ', '\001', '(',
+'\t', 'R', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\032', '\222', '\001', '\n', '\021', 'H', 'e', 'a', 'l', 't', 'h', 'C', 'h', 'e',
+'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '(', '\n', '\n', 'p', 'o', 'r', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ',
+'\001', '(', '\r', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '\377', '\377', '\003', 'R', '\t', 'p', 'o', 'r', 't', 'V', 'a', 'l', 'u', 'e',
+'\022', '\032', '\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'h', 'o', 's', 't', 'n',
+'a', 'm', 'e', ':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'H', 'e', 'a', 'l', 't', 'h', 'C',
+'h', 'e', 'c', 'k', 'C', 'o', 'n', 'f', 'i', 'g', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.',
+'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\"',
+'\221', '\003', '\n', '\n', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', '\022', '@', '\n', '\010', 'e', 'n', 'd', 'p', 'o', 'i', 'n',
+'t', '\030', '\001', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n',
+'d', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'H', '\000', 'R', '\010', 'e', 'n', 'd',
+'p', 'o', 'i', 'n', 't', '\022', '%', '\n', '\r', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ',
+'\001', '(', '\t', 'H', '\000', 'R', '\014', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'N', 'a', 'm', 'e', '\022', 'G', '\n', '\r', 'h', 'e',
+'a', 'l', 't', 'h', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\002', ' ', '\001', '(', '\016', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'l', 't', 'h', 'S', 't', 'a',
+'t', 'u', 's', 'R', '\014', 'h', 'e', 'a', 'l', 't', 'h', 'S', 't', 'a', 't', 'u', 's', '\022', ':', '\n', '\010', 'm', 'e', 't', 'a',
+'d', 'a', 't', 'a', '\030', '\003', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a',
+'t', 'a', '\022', 'Y', '\n', '\025', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', '_', 'w', 'e', 'i', 'g',
+'h', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\023', 'l',
+'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'W', 'e', 'i', 'g', 'h', 't', ':', '\'', '\232', '\305', '\210', '\036', '\"',
+'\n', ' ', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'L',
+'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'B', '\021', '\n', '\017', 'h', 'o', 's', 't', '_', 'i', 'd', 'e', 'n', 't', 'i', 'f',
+'i', 'e', 'r', '\"', '\211', '\003', '\n', '\023', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n',
+'t', 's', '\022', ':', '\n', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\030', '\001', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'L', 'o', 'c', 'a', 'l', 'i',
+'t', 'y', 'R', '\010', 'l', 'o', 'c', 'a', 'l', 'i', 't', 'y', '\022', 'G', '\n', '\014', 'l', 'b', '_', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'R', '\013', 'l',
+'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', 'Y', '\n', '\025', 'l', 'o', 'a', 'd', '_', 'b', 'a', 'l', 'a', 'n', 'c',
+'i', 'n', 'g', '_', 'w', 'e', 'i', 'g', 'h', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B',
+'\004', '*', '\002', '(', '\001', 'R', '\023', 'l', 'o', 'a', 'd', 'B', 'a', 'l', 'a', 'n', 'c', 'i', 'n', 'g', 'W', 'e', 'i', 'g', 'h',
+'t', '\022', '$', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\005', ' ', '\001', '(', '\r', 'B', '\010', '\372', 'B', '\005', '*',
+'\003', '\030', '\200', '\001', 'R', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', ':', '\n', '\t', 'p', 'r', 'o', 'x', 'i', 'm', 'i',
+'t', 'y', '\030', '\006', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'p', 'r', 'o', 'x', 'i', 'm', 'i', 't', 'y', ':',
+'0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p',
+'o', 'i', 'n', 't', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'L', 'b', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'B',
+'K', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', 'B', '\027', 'E', 'n', 'd', 'p', 'o', 'i', 'n',
+'t', 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020',
+'\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_health_check_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/endpoint/v3/endpoint_components.proto",
+ UPB_STRVIEW_INIT(descriptor, 1584)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h
new file mode 100644
index 00000000000..0173282c2d7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h
@@ -0,0 +1,50 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/endpoint/v3/endpoint_components.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_COMPONENTS_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_COMPONENTS_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_def_init envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_Endpoint_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.Endpoint");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_Endpoint_HealthCheckConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.Endpoint.HealthCheckConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_LbEndpoint_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.LbEndpoint");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_LocalityLbEndpoints_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_endpoint_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.LocalityLbEndpoints");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ENDPOINT_V3_ENDPOINT_COMPONENTS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c
new file mode 100644
index 00000000000..a0fb711a7e4
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c
@@ -0,0 +1,146 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/endpoint/v3/load_report.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/endpoint/v3/load_report.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_endpoint_v3_UpstreamLocalityStats_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_UpstreamEndpointStats_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_ClusterStats_msginit;
+extern const upb_msglayout envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit;
+
+static const upb_msglayout *layouts[5] = {
+ &envoy_config_endpoint_v3_UpstreamLocalityStats_msginit,
+ &envoy_config_endpoint_v3_UpstreamEndpointStats_msginit,
+ &envoy_config_endpoint_v3_EndpointLoadMetricStats_msginit,
+ &envoy_config_endpoint_v3_ClusterStats_msginit,
+ &envoy_config_endpoint_v3_ClusterStats_DroppedRequests_msginit,
+};
+
+static const char descriptor[2351] = {'\n', '*', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/', 'v',
+'3', '/', 'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\032', '\"', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'd', 'd', 'r', 'e', 's', 's',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e',
+'/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\034', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't',
+'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u',
+'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's',
+'/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a',
+'t', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\312', '\004', '\n', '\025', 'U', 'p', 's',
+'t', 'r', 'e', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'S', 't', 'a', 't', 's', '\022', ':', '\n', '\010', 'l', 'o', 'c',
+'a', 'l', 'i', 't', 'y', '\030', '\001', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'R', '\010', 'l', 'o', 'c', 'a', 'l',
+'i', 't', 'y', '\022', ':', '\n', '\031', 't', 'o', 't', 'a', 'l', '_', 's', 'u', 'c', 'c', 'e', 's', 's', 'f', 'u', 'l', '_', 'r',
+'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\027', 't', 'o', 't', 'a', 'l', 'S', 'u', 'c', 'c', 'e',
+'s', 's', 'f', 'u', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', ';', '\n', '\032', 't', 'o', 't', 'a', 'l', '_', 'r', 'e',
+'q', 'u', 'e', 's', 't', 's', '_', 'i', 'n', '_', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\030', '\003', ' ', '\001', '(', '\004', 'R',
+'\027', 't', 'o', 't', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'I', 'n', 'P', 'r', 'o', 'g', 'r', 'e', 's', 's', '\022',
+'0', '\n', '\024', 't', 'o', 't', 'a', 'l', '_', 'e', 'r', 'r', 'o', 'r', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\004',
+' ', '\001', '(', '\004', 'R', '\022', 't', 'o', 't', 'a', 'l', 'E', 'r', 'r', 'o', 'r', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022',
+'2', '\n', '\025', 't', 'o', 't', 'a', 'l', '_', 'i', 's', 's', 'u', 'e', 'd', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030',
+'\010', ' ', '\001', '(', '\004', 'R', '\023', 't', 'o', 't', 'a', 'l', 'I', 's', 's', 'u', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't',
+'s', '\022', ']', '\n', '\021', 'l', 'o', 'a', 'd', '_', 'm', 'e', 't', 'r', 'i', 'c', '_', 's', 't', 'a', 't', 's', '\030', '\005', ' ',
+'\003', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'L', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S',
+'t', 'a', 't', 's', 'R', '\017', 'l', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', '\022', 'g', '\n', '\027',
+'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 's', 't', 'a', 't', 's', '\030', '\007',
+' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o',
+'i', 'n', 't', '.', 'v', '3', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', 't',
+'a', 't', 's', 'R', '\025', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', 't', 'a', 't',
+'s', '\022', '\032', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\006', ' ', '\001', '(', '\r', 'R', '\010', 'p', 'r', 'i', 'o',
+'r', 'i', 't', 'y', ':', '2', '\232', '\305', '\210', '\036', '-', '\n', '+', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2',
+'.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', 't',
+'y', 'S', 't', 'a', 't', 's', '\"', '\367', '\003', '\n', '\025', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i',
+'n', 't', 'S', 't', 'a', 't', 's', '\022', '7', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2',
+'\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd',
+'d', 'r', 'e', 's', 's', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '3', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't',
+'a', '\030', '\006', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', ':', '\n', '\031', 't', 'o', 't', 'a',
+'l', '_', 's', 'u', 'c', 'c', 'e', 's', 's', 'f', 'u', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\002', ' ', '\001',
+'(', '\004', 'R', '\027', 't', 'o', 't', 'a', 'l', 'S', 'u', 'c', 'c', 'e', 's', 's', 'f', 'u', 'l', 'R', 'e', 'q', 'u', 'e', 's',
+'t', 's', '\022', ';', '\n', '\032', 't', 'o', 't', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '_', 'i', 'n', '_', 'p',
+'r', 'o', 'g', 'r', 'e', 's', 's', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\027', 't', 'o', 't', 'a', 'l', 'R', 'e', 'q', 'u', 'e',
+'s', 't', 's', 'I', 'n', 'P', 'r', 'o', 'g', 'r', 'e', 's', 's', '\022', '0', '\n', '\024', 't', 'o', 't', 'a', 'l', '_', 'e', 'r',
+'r', 'o', 'r', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\022', 't', 'o', 't', 'a', 'l',
+'E', 'r', 'r', 'o', 'r', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '2', '\n', '\025', 't', 'o', 't', 'a', 'l', '_', 'i', 's',
+'s', 'u', 'e', 'd', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\007', ' ', '\001', '(', '\004', 'R', '\023', 't', 'o', 't', 'a',
+'l', 'I', 's', 's', 'u', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', ']', '\n', '\021', 'l', 'o', 'a', 'd', '_', 'm',
+'e', 't', 'r', 'i', 'c', '_', 's', 't', 'a', 't', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o',
+'i', 'n', 't', 'L', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', 'R', '\017', 'l', 'o', 'a', 'd', 'M',
+'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', ':', '2', '\232', '\305', '\210', '\036', '-', '\n', '+', 'e', 'n', 'v', 'o', 'y', '.',
+'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'E',
+'n', 'd', 'p', 'o', 'i', 'n', 't', 'S', 't', 'a', 't', 's', '\"', '\350', '\001', '\n', '\027', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't',
+'L', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', '\022', '\037', '\n', '\013', 'm', 'e', 't', 'r', 'i', 'c',
+'_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\n', 'm', 'e', 't', 'r', 'i', 'c', 'N', 'a', 'm', 'e', '\022', 'H',
+'\n', '!', 'n', 'u', 'm', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '_', 'f', 'i', 'n', 'i', 's', 'h', 'e', 'd', '_', 'w',
+'i', 't', 'h', '_', 'm', 'e', 't', 'r', 'i', 'c', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\035', 'n', 'u', 'm', 'R', 'e', 'q', 'u',
+'e', 's', 't', 's', 'F', 'i', 'n', 'i', 's', 'h', 'e', 'd', 'W', 'i', 't', 'h', 'M', 'e', 't', 'r', 'i', 'c', '\022', ',', '\n',
+'\022', 't', 'o', 't', 'a', 'l', '_', 'm', 'e', 't', 'r', 'i', 'c', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\001',
+'R', '\020', 't', 'o', 't', 'a', 'l', 'M', 'e', 't', 'r', 'i', 'c', 'V', 'a', 'l', 'u', 'e', ':', '4', '\232', '\305', '\210', '\036', '/',
+'\n', '-', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'E',
+'n', 'd', 'p', 'o', 'i', 'n', 't', 'L', 'o', 'a', 'd', 'M', 'e', 't', 'r', 'i', 'c', 'S', 't', 'a', 't', 's', '\"', '\211', '\005',
+'\n', '\014', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', '\022', '*', '\n', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r',
+'_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\013', 'c', 'l', 'u',
+'s', 't', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '0', '\n', '\024', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 's', 'e', 'r', 'v', 'i',
+'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\022', 'c', 'l', 'u', 's', 't', 'e', 'r', 'S', 'e', 'r',
+'v', 'i', 'c', 'e', 'N', 'a', 'm', 'e', '\022', 'q', '\n', '\027', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'l', 'o', 'c', 'a',
+'l', 'i', 't', 'y', '_', 's', 't', 'a', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'U', 'p', 's', 't', 'r', 'e',
+'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'S', 't', 'a', 't', 's', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001',
+'R', '\025', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'c', 'a', 'l', 'i', 't', 'y', 'S', 't', 'a', 't', 's', '\022', '4',
+'\n', '\026', 't', 'o', 't', 'a', 'l', '_', 'd', 'r', 'o', 'p', 'p', 'e', 'd', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030',
+'\003', ' ', '\001', '(', '\004', 'R', '\024', 't', 'o', 't', 'a', 'l', 'D', 'r', 'o', 'p', 'p', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's',
+'t', 's', '\022', 'a', '\n', '\020', 'd', 'r', 'o', 'p', 'p', 'e', 'd', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\005', ' ',
+'\003', '(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', '.', 'D', 'r', 'o', 'p', 'p', 'e',
+'d', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', 'R', '\017', 'd', 'r', 'o', 'p', 'p', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't',
+'s', '\022', 'K', '\n', '\024', 'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', 't', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l',
+'\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', '\022', 'l', 'o', 'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', 'I', 'n', 't', 'e', 'r',
+'v', 'a', 'l', '\032', '\226', '\001', '\n', '\017', 'D', 'r', 'o', 'p', 'p', 'e', 'd', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '#',
+'\n', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001',
+'R', '\010', 'c', 'a', 't', 'e', 'g', 'o', 'r', 'y', '\022', '#', '\n', '\r', 'd', 'r', 'o', 'p', 'p', 'e', 'd', '_', 'c', 'o', 'u',
+'n', 't', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\014', 'd', 'r', 'o', 'p', 'p', 'e', 'd', 'C', 'o', 'u', 'n', 't', ':', '9', '\232',
+'\305', '\210', '\036', '4', '\n', '2', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i',
+'n', 't', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', '.', 'D', 'r', 'o', 'p', 'p', 'e', 'd', 'R', 'e',
+'q', 'u', 'e', 's', 't', 's', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.',
+'v', '2', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', 'B',
+'C', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', 'B', '\017', 'L', 'o', 'a', 'd', 'R', 'e', 'p',
+'o', 'r', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_endpoint_v3_load_report_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/endpoint/v3/load_report.proto",
+ UPB_STRVIEW_INIT(descriptor, 2351)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h
new file mode 100644
index 00000000000..0a9b30473f9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h
@@ -0,0 +1,55 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/endpoint/v3/load_report.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ENDPOINT_V3_LOAD_REPORT_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ENDPOINT_V3_LOAD_REPORT_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_def_init envoy_config_endpoint_v3_load_report_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_UpstreamLocalityStats_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_load_report_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.UpstreamLocalityStats");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_UpstreamEndpointStats_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_load_report_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.UpstreamEndpointStats");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_EndpointLoadMetricStats_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_load_report_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.EndpointLoadMetricStats");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_ClusterStats_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_load_report_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.ClusterStats");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_endpoint_v3_ClusterStats_DroppedRequests_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_endpoint_v3_load_report_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.endpoint.v3.ClusterStats.DroppedRequests");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ENDPOINT_V3_LOAD_REPORT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c
new file mode 100644
index 00000000000..088a1389231
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c
@@ -0,0 +1,50 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/api_listener.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/listener/v3/api_listener.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_config_listener_v3_ApiListener_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_config_listener_v3_ApiListener_msginit,
+};
+
+static const char descriptor[359] = {'\n', '+', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v',
+'3', '/', 'a', 'p', 'i', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '\032', '\031', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035',
+'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p',
+'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e',
+'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', 's', '\n', '\013', 'A', 'p', 'i', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', '\022', '7', '\n', '\014', 'a', 'p', 'i', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\030', '\001', ' ', '\001', '(',
+'\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013',
+'a', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '2', '.', 'A', 'p', 'i', 'L', 'i',
+'s', 't', 'e', 'n', 'e', 'r', 'B', 'D', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', 'B', '\020',
+'A', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020',
+'\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_listener_v3_api_listener_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/listener/v3/api_listener.proto",
+ UPB_STRVIEW_INIT(descriptor, 359)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h
new file mode 100644
index 00000000000..54558997f34
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/api_listener.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_LISTENER_V3_API_LISTENER_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_LISTENER_V3_API_LISTENER_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_def_init envoy_config_listener_v3_api_listener_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_ApiListener_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_api_listener_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.ApiListener");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_LISTENER_V3_API_LISTENER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c
new file mode 100644
index 00000000000..f1d684a89d9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c
@@ -0,0 +1,195 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/listener.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/listener/v3/listener.upbdefs.h"
+
+extern upb_def_init envoy_config_accesslog_v3_accesslog_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_socket_option_proto_upbdefinit;
+extern upb_def_init envoy_config_listener_v3_api_listener_proto_upbdefinit;
+extern upb_def_init envoy_config_listener_v3_listener_components_proto_upbdefinit;
+extern upb_def_init envoy_config_listener_v3_udp_listener_config_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init xds_core_v3_collection_entry_proto_upbdefinit;
+extern upb_def_init udpa_annotations_security_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_listener_v3_ListenerCollection_msginit;
+extern const upb_msglayout envoy_config_listener_v3_Listener_msginit;
+extern const upb_msglayout envoy_config_listener_v3_Listener_DeprecatedV1_msginit;
+extern const upb_msglayout envoy_config_listener_v3_Listener_ConnectionBalanceConfig_msginit;
+extern const upb_msglayout envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_msginit;
+
+static const upb_msglayout *layouts[5] = {
+ &envoy_config_listener_v3_ListenerCollection_msginit,
+ &envoy_config_listener_v3_Listener_msginit,
+ &envoy_config_listener_v3_Listener_DeprecatedV1_msginit,
+ &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_msginit,
+ &envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_msginit,
+};
+
+static const char descriptor[3185] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v',
+'3', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/',
+'c', 'o', 'n', 'f', 'i', 'g', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '/', 'v', '3', '/', 'a', 'c', 'c', 'e', 's',
+'s', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/',
+'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n',
+'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p',
+'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v',
+'3', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/',
+'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't',
+'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '+', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l',
+'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v', '3', '/', 'a', 'p', 'i', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'p',
+'r', 'o', 't', 'o', '\032', '2', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n',
+'e', 'r', '/', 'v', '3', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '2', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't',
+'e', 'n', 'e', 'r', '/', 'v', '3', '/', 'u', 'd', 'p', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'x',
+'d', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '_', 'e', 'n', 't',
+'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '/', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n',
+'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'L', '\n', '\022', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'l', 'l', 'e', 'c',
+'t', 'i', 'o', 'n', '\022', '6', '\n', '\007', 'e', 'n', 't', 'r', 'i', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\034', '.', 'x',
+'d', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r',
+'y', 'R', '\007', 'e', 'n', 't', 'r', 'i', 'e', 's', '\"', '\335', '\022', '\n', '\010', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022', '\022',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'A', '\n', '\007', 'a', 'd', 'd',
+'r', 'e', 's', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020',
+'\001', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', 'J', '\n', '\r', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'h', 'a', 'i',
+'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l',
+'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'R', '\014', 'f',
+'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 's', '\022', 'D', '\n', '\020', 'u', 's', 'e', '_', 'o', 'r', 'i', 'g', 'i', 'n',
+'a', 'l', '_', 'd', 's', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'u', 's', 'e', 'O', 'r', 'i', 'g', 'i',
+'n', 'a', 'l', 'D', 's', 't', '\022', 'W', '\n', '\024', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'f', 'i', 'l', 't', 'e', 'r', '_',
+'c', 'h', 'a', 'i', 'n', '\030', '\031', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n',
+'R', '\022', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', '\022', 'o', '\n', '!', 'p',
+'e', 'r', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i',
+'t', '_', 'b', 'y', 't', 'e', 's', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\212', '\223', '\267', '*', '\002',
+'\010', '\001', 'R', '\035', 'p', 'e', 'r', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i',
+'m', 'i', 't', 'B', 'y', 't', 'e', 's', '\022', ':', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\006', ' ', '\001', '(',
+'\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'X', '\n', '\r', 'd', 'e', 'p',
+'r', 'e', 'c', 'a', 't', 'e', 'd', '_', 'v', '1', '\030', '\007', ' ', '\001', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n',
+'e', 'r', '.', 'D', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', 'V', '1', 'B', '\002', '\030', '\001', 'R', '\014', 'd', 'e', 'p', 'r',
+'e', 'c', 'a', 't', 'e', 'd', 'V', '1', '\022', 'K', '\n', '\n', 'd', 'r', 'a', 'i', 'n', '_', 't', 'y', 'p', 'e', '\030', '\010', ' ',
+'\001', '(', '\016', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n',
+'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'D', 'r', 'a', 'i', 'n', 'T', 'y', 'p', 'e', 'R',
+'\t', 'd', 'r', 'a', 'i', 'n', 'T', 'y', 'p', 'e', '\022', 'S', '\n', '\020', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'f', 'i',
+'l', 't', 'e', 'r', 's', '\030', '\t', ' ', '\003', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l',
+'t', 'e', 'r', 'R', '\017', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 's', '\022', 'S', '\n', '\030', 'l',
+'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', 's', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\017',
+' ', '\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', '\026', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 's', 'T', 'i',
+'m', 'e', 'o', 'u', 't', '\022', 'N', '\n', '$', 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '_', 'o', 'n', '_', 'l', 'i', 's', 't',
+'e', 'n', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', 's', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\021', ' ', '\001', '(',
+'\010', 'R', ' ', 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', 'O', 'n', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't',
+'e', 'r', 's', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '<', '\n', '\013', 't', 'r', 'a', 'n', 's', 'p', 'a', 'r', 'e', 'n', 't',
+'\030', '\n', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\013', 't', 'r', 'a', 'n', 's', 'p', 'a', 'r', 'e', 'n', 't', '\022', '6', '\n',
+'\010', 'f', 'r', 'e', 'e', 'b', 'i', 'n', 'd', '\030', '\013', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\010', 'f', 'r', 'e', 'e', 'b',
+'i', 'n', 'd', '\022', 'I', '\n', '\016', 's', 'o', 'c', 'k', 'e', 't', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\r', ' ', '\003',
+'(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'.', 'S', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\r', 's', 'o', 'c', 'k', 'e', 't', 'O', 'p', 't', 'i',
+'o', 'n', 's', '\022', 'X', '\n', '\032', 't', 'c', 'p', '_', 'f', 'a', 's', 't', '_', 'o', 'p', 'e', 'n', '_', 'q', 'u', 'e', 'u',
+'e', '_', 'l', 'e', 'n', 'g', 't', 'h', '\030', '\014', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\026', 't', 'c', 'p', 'F',
+'a', 's', 't', 'O', 'p', 'e', 'n', 'Q', 'u', 'e', 'u', 'e', 'L', 'e', 'n', 'g', 't', 'h', '\022', 'S', '\n', '\021', 't', 'r', 'a',
+'f', 'f', 'i', 'c', '_', 'd', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', '\030', '\020', ' ', '\001', '(', '\016', '2', '&', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'r', 'a', 'f', 'f', 'i',
+'c', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'o', 'n', 'R', '\020', 't', 'r', 'a', 'f', 'f', 'i', 'c', 'D', 'i', 'r', 'e', 'c', 't',
+'i', 'o', 'n', '\022', '[', '\n', '\023', 'u', 'd', 'p', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\022', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i',
+'s', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f',
+'i', 'g', 'R', '\021', 'u', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'H', '\n', '\014',
+'a', 'p', 'i', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '\030', '\023', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'A', 'p', 'i', 'L',
+'i', 's', 't', 'e', 'n', 'e', 'r', 'R', '\013', 'a', 'p', 'i', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '\022', 'v', '\n', '\031', 'c',
+'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030',
+'\024', ' ', '\001', '(', '\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't',
+'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\027', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\035', '\n', '\n', 'r', 'e', 'u', 's', 'e', '_',
+'p', 'o', 'r', 't', '\030', '\025', ' ', '\001', '(', '\010', 'R', '\t', 'r', 'e', 'u', 's', 'e', 'P', 'o', 'r', 't', '\022', 'C', '\n', '\n',
+'a', 'c', 'c', 'e', 's', 's', '_', 'l', 'o', 'g', '\030', '\026', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'A', 'c', 'c', 'e', 's',
+'s', 'L', 'o', 'g', 'R', '\t', 'a', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', '\022', 'V', '\n', '\021', 'u', 'd', 'p', '_', 'w', 'r',
+'i', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\027', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e',
+'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\017', 'u', 'd', 'p', 'W', 'r', 'i', 't', 'e', 'r', 'C', 'o', 'n',
+'f', 'i', 'g', '\022', 'F', '\n', '\020', 't', 'c', 'p', '_', 'b', 'a', 'c', 'k', 'l', 'o', 'g', '_', 's', 'i', 'z', 'e', '\030', '\030',
+' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I',
+'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 't', 'c', 'p', 'B', 'a', 'c', 'k', 'l', 'o', 'g', 'S', 'i', 'z', 'e',
+'\022', '<', '\n', '\014', 'b', 'i', 'n', 'd', '_', 't', 'o', '_', 'p', 'o', 'r', 't', '\030', '\032', ' ', '\001', '(', '\013', '2', '\032', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e',
+'R', '\n', 'b', 'i', 'n', 'd', 'T', 'o', 'P', 'o', 'r', 't', '\032', 'w', '\n', '\014', 'D', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e',
+'d', 'V', '1', '\022', '<', '\n', '\014', 'b', 'i', 'n', 'd', '_', 't', 'o', '_', 'p', 'o', 'r', 't', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a',
+'l', 'u', 'e', 'R', '\n', 'b', 'i', 'n', 'd', 'T', 'o', 'P', 'o', 'r', 't', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'D', 'e', 'p', 'r',
+'e', 'c', 'a', 't', 'e', 'd', 'V', '1', '\032', '\247', '\002', '\n', '\027', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'a',
+'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'n', '\n', '\r', 'e', 'x', 'a', 'c', 't', '_', 'b', 'a', 'l', 'a',
+'n', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'C', 'o', 'n', 'n',
+'e', 'c', 't', 'i', 'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'E', 'x', 'a', 'c', 't',
+'B', 'a', 'l', 'a', 'n', 'c', 'e', 'H', '\000', 'R', '\014', 'e', 'x', 'a', 'c', 't', 'B', 'a', 'l', 'a', 'n', 'c', 'e', '\032', 'Q',
+'\n', '\014', 'E', 'x', 'a', 'c', 't', 'B', 'a', 'l', 'a', 'n', 'c', 'e', ':', 'A', '\232', '\305', '\210', '\036', '<', '\n', ':', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'C', 'o', 'n', 'n', 'e',
+'c', 't', 'i', 'o', 'n', 'B', 'a', 'l', 'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'E', 'x', 'a', 'c', 't', 'B',
+'a', 'l', 'a', 'n', 'c', 'e', ':', '4', '\232', '\305', '\210', '\036', '/', '\n', '-', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.',
+'v', '2', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'B', 'a', 'l',
+'a', 'n', 'c', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\023', '\n', '\014', 'b', 'a', 'l', 'a', 'n', 'c', 'e', '_', 't', 'y', 'p',
+'e', '\022', '\003', '\370', 'B', '\001', '\"', ')', '\n', '\t', 'D', 'r', 'a', 'i', 'n', 'T', 'y', 'p', 'e', '\022', '\013', '\n', '\007', 'D', 'E',
+'F', 'A', 'U', 'L', 'T', '\020', '\000', '\022', '\017', '\n', '\013', 'M', 'O', 'D', 'I', 'F', 'Y', '_', 'O', 'N', 'L', 'Y', '\020', '\001', ':',
+'\034', '\232', '\305', '\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', 'J', '\004', '\010', '\016', '\020', '\017', 'B', 'A', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o',
+'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.',
+'v', '3', 'B', '\r', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002',
+'\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[16] = {
+ &envoy_config_accesslog_v3_accesslog_proto_upbdefinit,
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_config_core_v3_socket_option_proto_upbdefinit,
+ &envoy_config_listener_v3_api_listener_proto_upbdefinit,
+ &envoy_config_listener_v3_listener_components_proto_upbdefinit,
+ &envoy_config_listener_v3_udp_listener_config_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &xds_core_v3_collection_entry_proto_upbdefinit,
+ &udpa_annotations_security_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_listener_v3_listener_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/listener/v3/listener.proto",
+ UPB_STRVIEW_INIT(descriptor, 3185)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h
new file mode 100644
index 00000000000..535d37a3308
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h
@@ -0,0 +1,55 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/listener.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_LISTENER_V3_LISTENER_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_LISTENER_V3_LISTENER_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_def_init envoy_config_listener_v3_listener_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_ListenerCollection_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.ListenerCollection");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_Listener_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.Listener");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_Listener_DeprecatedV1_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.Listener.DeprecatedV1");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_Listener_ConnectionBalanceConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.Listener.ConnectionBalanceConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_Listener_ConnectionBalanceConfig_ExactBalance_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.Listener.ConnectionBalanceConfig.ExactBalance");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_LISTENER_V3_LISTENER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c
new file mode 100644
index 00000000000..ffe22ce9b6d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c
@@ -0,0 +1,193 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/listener_components.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/listener/v3/listener_components.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_range_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_listener_v3_Filter_msginit;
+extern const upb_msglayout envoy_config_listener_v3_FilterChainMatch_msginit;
+extern const upb_msglayout envoy_config_listener_v3_FilterChain_msginit;
+extern const upb_msglayout envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit;
+extern const upb_msglayout envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit;
+extern const upb_msglayout envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit;
+extern const upb_msglayout envoy_config_listener_v3_ListenerFilter_msginit;
+
+static const upb_msglayout *layouts[7] = {
+ &envoy_config_listener_v3_Filter_msginit,
+ &envoy_config_listener_v3_FilterChainMatch_msginit,
+ &envoy_config_listener_v3_FilterChain_msginit,
+ &envoy_config_listener_v3_FilterChain_OnDemandConfiguration_msginit,
+ &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_msginit,
+ &envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_msginit,
+ &envoy_config_listener_v3_ListenerFilter_msginit,
+};
+
+static const char descriptor[3284] = {'\n', '2', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v',
+'3', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r',
+'.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3',
+'/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n',
+'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e',
+'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x', 't', 'e', 'n',
+'s', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3',
+'/', 'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a',
+'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\202', '\002', '\n', '\006', 'F',
+'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r',
+'\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g',
+'\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'X', '\n', '\020', 'c', 'o', 'n',
+'f', 'i', 'g', '_', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '\030', '\005', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'E', 'x', 't', 'e', 'n', 's', 'i',
+'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\017', 'c', 'o', 'n', 'f', 'i', 'g', 'D',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', '#', '\232', '\305', '\210', '\036', '\036', '\n', '\034', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\r', '\n', '\013', 'c',
+'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\003', '\020', '\004', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c',
+'o', 'n', 'f', 'i', 'g', '\"', '\212', '\006', '\n', '\020', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c',
+'h', '\022', 'T', '\n', '\020', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', '_', 'p', 'o', 'r', 't', '\030', '\010', ' ', '\001',
+'(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't',
+'3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\013', '\372', 'B', '\010', '*', '\006', '\030', '\377', '\377', '\003', '(', '\001', 'R', '\017', 'd', 'e', 's',
+'t', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'P', 'o', 'r', 't', '\022', 'D', '\n', '\r', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'a',
+'n', 'g', 'e', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\037', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'i', 'd', 'r', 'R', 'a', 'n', 'g', 'e', 'R', '\014', 'p', 'r', 'e', 'f', 'i',
+'x', 'R', 'a', 'n', 'g', 'e', 's', '\022', '%', '\n', '\016', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', 's', 'u', 'f', 'f', 'i', 'x',
+'\030', '\004', ' ', '\001', '(', '\t', 'R', '\r', 'a', 'd', 'd', 'r', 'e', 's', 's', 'S', 'u', 'f', 'f', 'i', 'x', '\022', ';', '\n', '\n',
+'s', 'u', 'f', 'f', 'i', 'x', '_', 'l', 'e', 'n', '\030', '\005', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 's', 'u',
+'f', 'f', 'i', 'x', 'L', 'e', 'n', '\022', 'j', '\n', '\013', 's', 'o', 'u', 'r', 'c', 'e', '_', 't', 'y', 'p', 'e', '\030', '\014', ' ',
+'\001', '(', '\016', '2', '?', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n',
+'e', 'r', '.', 'v', '3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', '.', 'C', 'o',
+'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'S', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001',
+'\002', '\020', '\001', 'R', '\n', 's', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', '\022', 'Q', '\n', '\024', 's', 'o', 'u', 'r', 'c', 'e',
+'_', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'a', 'n', 'g', 'e', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', '\037', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'i', 'd', 'r', 'R', 'a',
+'n', 'g', 'e', 'R', '\022', 's', 'o', 'u', 'r', 'c', 'e', 'P', 'r', 'e', 'f', 'i', 'x', 'R', 'a', 'n', 'g', 'e', 's', '\022', '3',
+'\n', '\014', 's', 'o', 'u', 'r', 'c', 'e', '_', 'p', 'o', 'r', 't', 's', '\030', '\007', ' ', '\003', '(', '\r', 'B', '\020', '\372', 'B', '\r',
+'\222', '\001', '\n', '\"', '\010', '*', '\006', '\030', '\377', '\377', '\003', '(', '\001', 'R', '\013', 's', 'o', 'u', 'r', 'c', 'e', 'P', 'o', 'r', 't',
+'s', '\022', '!', '\n', '\014', 's', 'e', 'r', 'v', 'e', 'r', '_', 'n', 'a', 'm', 'e', 's', '\030', '\013', ' ', '\003', '(', '\t', 'R', '\013',
+'s', 'e', 'r', 'v', 'e', 'r', 'N', 'a', 'm', 'e', 's', '\022', '-', '\n', '\022', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_',
+'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\021', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't',
+'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '3', '\n', '\025', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i', 'o', 'n', '_', 'p',
+'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\n', ' ', '\003', '(', '\t', 'R', '\024', 'a', 'p', 'p', 'l', 'i', 'c', 'a', 't', 'i',
+'o', 'n', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\"', 'F', '\n', '\024', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'S', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', '\022', '\007', '\n', '\003', 'A', 'N', 'Y', '\020', '\000', '\022', '\027', '\n', '\023', 'S', 'A',
+'M', 'E', '_', 'I', 'P', '_', 'O', 'R', '_', 'L', 'O', 'O', 'P', 'B', 'A', 'C', 'K', '\020', '\001', '\022', '\014', '\n', '\010', 'E', 'X',
+'T', 'E', 'R', 'N', 'A', 'L', '\020', '\002', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n',
+'M', 'a', 't', 'c', 'h', 'J', '\004', '\010', '\001', '\020', '\002', '\"', '\200', '\006', '\n', '\013', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a',
+'i', 'n', '\022', 'X', '\n', '\022', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'h', 'a', 'i', 'n', '_', 'm', 'a', 't', 'c', 'h', '\030',
+'\001', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't',
+'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'R',
+'\020', 'f', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', '\022', ':', '\n', '\007', 'f', 'i', 'l', 't',
+'e', 'r', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\007', 'f', 'i', 'l', 't', 'e',
+'r', 's', '\022', 'F', '\n', '\017', 'u', 's', 'e', '_', 'p', 'r', 'o', 'x', 'y', '_', 'p', 'r', 'o', 't', 'o', '\030', '\004', ' ', '\001',
+'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l',
+'V', 'a', 'l', 'u', 'e', 'B', '\002', '\030', '\001', 'R', '\r', 'u', 's', 'e', 'P', 'r', 'o', 'x', 'y', 'P', 'r', 'o', 't', 'o', '\022',
+':', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\005', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R',
+'\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'P', '\n', '\020', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o',
+'c', 'k', 'e', 't', '\030', '\006', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', 'R',
+'\017', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k', 'e', 't', '\022', 'b', '\n', ' ', 't', 'r', 'a', 'n', 's',
+'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', '_', 't', 'i', 'm', 'e', 'o',
+'u', 't', '\030', '\t', ' ', '\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', '\035', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', 'S', 'o', 'c', 'k',
+'e', 't', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030',
+'\007', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 's', '\n', '\027', 'o', 'n', '_', 'd', 'e', 'm', 'a', 'n', 'd', '_',
+'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\010', ' ', '\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'F', 'i', 'l',
+'t', 'e', 'r', 'C', 'h', 'a', 'i', 'n', '.', 'O', 'n', 'D', 'e', 'm', 'a', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r',
+'a', 't', 'i', 'o', 'n', 'R', '\025', 'o', 'n', 'D', 'e', 'm', 'a', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't',
+'i', 'o', 'n', '\032', '[', '\n', '\025', 'O', 'n', 'D', 'e', 'm', 'a', 'n', 'd', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't',
+'i', 'o', 'n', '\022', 'B', '\n', '\017', 'r', 'e', 'b', 'u', 'i', 'l', 'd', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\001', ' ',
+'\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', '\016', 'r', 'e', 'b', 'u', 'i', 'l', 'd', 'T', 'i', 'm', 'e', 'o', 'u', 't', ':', '(', '\232', '\305',
+'\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e',
+'r', '.', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\013', 't', 'l', 's', '_',
+'c', 'o', 'n', 't', 'e', 'x', 't', '\"', '\302', '\005', '\n', '!', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e',
+'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '\022', 'a', '\n', '\010', 'o',
+'r', '_', 'm', 'a', 't', 'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', 'D', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F',
+'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '.',
+'M', 'a', 't', 'c', 'h', 'S', 'e', 't', 'H', '\000', 'R', '\007', 'o', 'r', 'M', 'a', 't', 'c', 'h', '\022', 'c', '\n', '\t', 'a', 'n',
+'d', '_', 'm', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', 'D', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F',
+'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '.',
+'M', 'a', 't', 'c', 'h', 'S', 'e', 't', 'H', '\000', 'R', '\010', 'a', 'n', 'd', 'M', 'a', 't', 'c', 'h', '\022', 'Z', '\n', '\t', 'n',
+'o', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r',
+'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e',
+'H', '\000', 'R', '\010', 'n', 'o', 't', 'M', 'a', 't', 'c', 'h', '\022', '&', '\n', '\t', 'a', 'n', 'y', '_', 'm', 'a', 't', 'c', 'h',
+'\030', '\004', ' ', '\001', '(', '\010', 'B', '\007', '\372', 'B', '\004', 'j', '\002', '\010', '\001', 'H', '\000', 'R', '\010', 'a', 'n', 'y', 'M', 'a', 't',
+'c', 'h', '\022', 'Q', '\n', '\026', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', '_', 'p', 'o', 'r', 't', '_', 'r', 'a',
+'n', 'g', 'e', '\030', '\005', ' ', '\001', '(', '\013', '2', '\031', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3',
+'.', 'I', 'n', 't', '3', '2', 'R', 'a', 'n', 'g', 'e', 'H', '\000', 'R', '\024', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o',
+'n', 'P', 'o', 'r', 't', 'R', 'a', 'n', 'g', 'e', '\032', '\260', '\001', '\n', '\010', 'M', 'a', 't', 'c', 'h', 'S', 'e', 't', '\022', '[',
+'\n', '\005', 'r', 'u', 'l', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F',
+'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 'B',
+'\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\002', 'R', '\005', 'r', 'u', 'l', 'e', 's', ':', 'G', '\232', '\305', '\210', '\036', 'B', '\n', '@',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's',
+'t', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd',
+'i', 'c', 'a', 't', 'e', '.', 'M', 'a', 't', 'c', 'h', 'S', 'e', 't', ':', '>', '\232', '\305', '\210', '\036', '9', '\n', '7', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e',
+'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h', 'P', 'r', 'e', 'd', 'i', 'c',
+'a', 't', 'e', 'B', '\013', '\n', '\004', 'r', 'u', 'l', 'e', '\022', '\003', '\370', 'B', '\001', '\"', '\230', '\002', '\n', '\016', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c',
+'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'd',
+'\n', '\017', 'f', 'i', 'l', 't', 'e', 'r', '_', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'd', '\030', '\004', ' ', '\001', '(', '\013', '2', ';',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3',
+'.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'h', 'a', 'i', 'n', 'M', 'a', 't', 'c', 'h',
+'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 'R', '\016', 'f', 'i', 'l', 't', 'e', 'r', 'D', 'i', 's', 'a', 'b', 'l', 'e', 'd',
+':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's',
+'t', 'e', 'n', 'e', 'r', '.', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\r', '\n', '\013', 'c',
+'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', 'B',
+'K', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', 'B', '\027', 'L', 'i', 's', 't', 'e', 'n', 'e',
+'r', 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020',
+'\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[11] = {
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_type_v3_range_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_listener_v3_listener_components_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/listener/v3/listener_components.proto",
+ UPB_STRVIEW_INIT(descriptor, 3284)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h
new file mode 100644
index 00000000000..a09ef60c480
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h
@@ -0,0 +1,65 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/listener_components.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_LISTENER_V3_LISTENER_COMPONENTS_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_LISTENER_V3_LISTENER_COMPONENTS_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_def_init envoy_config_listener_v3_listener_components_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_Filter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.Filter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_FilterChainMatch_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.FilterChainMatch");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_FilterChain_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.FilterChain");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_FilterChain_OnDemandConfiguration_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.FilterChain.OnDemandConfiguration");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_ListenerFilterChainMatchPredicate_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.ListenerFilterChainMatchPredicate");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_ListenerFilterChainMatchPredicate_MatchSet_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.ListenerFilterChainMatchPredicate.MatchSet");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_ListenerFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_listener_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.ListenerFilter");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_LISTENER_V3_LISTENER_COMPONENTS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c
new file mode 100644
index 00000000000..525a38a51a8
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c
@@ -0,0 +1,59 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/udp_listener_config.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/listener/v3/udp_listener_config.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_config_listener_v3_UdpListenerConfig_msginit;
+extern const upb_msglayout envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_config_listener_v3_UdpListenerConfig_msginit,
+ &envoy_config_listener_v3_ActiveRawUdpListenerConfig_msginit,
+};
+
+static const char descriptor[544] = {'\n', '2', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/', 'v',
+'3', '/', 'u', 'd', 'p', '_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'p', 'r', 'o',
+'t', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r',
+'.', 'v', '3', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's',
+'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '\307', '\001', '\n',
+'\021', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '*', '\n', '\021', 'u', 'd', 'p',
+'_', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\017', 'u', 'd', 'p',
+'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n',
+'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '.', '\232', '\305',
+'\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'l', 'i', 's', 't', 'e', 'n', 'e',
+'r', '.', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\013', 'c', 'o',
+'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\"', 'U',
+'\n', '\032', 'A', 'c', 't', 'i', 'v', 'e', 'R', 'a', 'w', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n',
+'f', 'i', 'g', ':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'A', 'c', 't', 'i', 'v', 'e', 'R', 'a', 'w', 'U', 'd', 'p', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'B', 'J', '\n', '&', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o',
+'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.',
+'v', '3', 'B', '\026', 'U', 'd', 'p', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'P', 'r', 'o', 't',
+'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_listener_v3_udp_listener_config_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/listener/v3/udp_listener_config.proto",
+ UPB_STRVIEW_INIT(descriptor, 544)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h
new file mode 100644
index 00000000000..3246d91688e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/listener/v3/udp_listener_config.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_LISTENER_V3_UDP_LISTENER_CONFIG_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_LISTENER_V3_UDP_LISTENER_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_def_init envoy_config_listener_v3_udp_listener_config_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_UdpListenerConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_udp_listener_config_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.UdpListenerConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_listener_v3_ActiveRawUdpListenerConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_listener_v3_udp_listener_config_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.listener.v3.ActiveRawUdpListenerConfig");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_LISTENER_V3_UDP_LISTENER_CONFIG_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c
new file mode 100644
index 00000000000..e49149aad7b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c
@@ -0,0 +1,141 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/metrics/v3/stats.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/metrics/v3/stats.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_address_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsSink_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsConfig_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsMatcher_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_TagSpecifier_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_HistogramBucketSettings_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_StatsdSink_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_DogStatsdSink_msginit;
+extern const upb_msglayout envoy_config_metrics_v3_HystrixSink_msginit;
+
+static const upb_msglayout *layouts[8] = {
+ &envoy_config_metrics_v3_StatsSink_msginit,
+ &envoy_config_metrics_v3_StatsConfig_msginit,
+ &envoy_config_metrics_v3_StatsMatcher_msginit,
+ &envoy_config_metrics_v3_TagSpecifier_msginit,
+ &envoy_config_metrics_v3_HistogramBucketSettings_msginit,
+ &envoy_config_metrics_v3_StatsdSink_msginit,
+ &envoy_config_metrics_v3_DogStatsdSink_msginit,
+ &envoy_config_metrics_v3_HystrixSink_msginit,
+};
+
+static const char descriptor[2091] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'm', 'e', 't', 'r', 'i', 'c', 's', '/', 'v', '3',
+'/', 's', 't', 'a', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'm', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i',
+'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'd', 'd', 'r', 'e', 's', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"',
+'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's', 't', 'r',
+'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n',
+'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\241', '\001', '\n', '\t', 'S', 't', 'a', 't', 's', 'S', 'i', 'n', 'k', '\022', '\022',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p',
+'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f',
+'i', 'g', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm',
+'e', 't', 'r', 'i', 'c', 's', '.', 'v', '2', '.', 'S', 't', 'a', 't', 's', 'S', 'i', 'n', 'k', 'B', '\r', '\n', '\013', 'c', 'o',
+'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\"', '\206',
+'\003', '\n', '\013', 'S', 't', 'a', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'D', '\n', '\n', 's', 't', 'a', 't', 's', '_', 't',
+'a', 'g', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'m', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '3', '.', 'T', 'a', 'g', 'S', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'R', '\t',
+'s', 't', 'a', 't', 's', 'T', 'a', 'g', 's', '\022', 'K', '\n', '\024', 'u', 's', 'e', '_', 'a', 'l', 'l', '_', 'd', 'e', 'f', 'a',
+'u', 'l', 't', '_', 't', 'a', 'g', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\021', 'u', 's', 'e', 'A', 'l', 'l',
+'D', 'e', 'f', 'a', 'u', 'l', 't', 'T', 'a', 'g', 's', '\022', 'J', '\n', '\r', 's', 't', 'a', 't', 's', '_', 'm', 'a', 't', 'c',
+'h', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'m', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '3', '.', 'S', 't', 'a', 't', 's', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\014',
+'s', 't', 'a', 't', 's', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'l', '\n', '\031', 'h', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm',
+'_', 'b', 'u', 'c', 'k', 'e', 't', '_', 's', 'e', 't', 't', 'i', 'n', 'g', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '0', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '3', '.', 'H',
+'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'B', 'u', 'c', 'k', 'e', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', 'R', '\027', 'h',
+'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'B', 'u', 'c', 'k', 'e', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', ':', '*', '\232',
+'\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c',
+'s', '.', 'v', '2', '.', 'S', 't', 'a', 't', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\"', '\230', '\002', '\n', '\014', 'S', 't', 'a', 't',
+'s', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '\037', '\n', '\n', 'r', 'e', 'j', 'e', 'c', 't', '_', 'a', 'l', 'l', '\030', '\001', ' ',
+'\001', '(', '\010', 'H', '\000', 'R', '\t', 'r', 'e', 'j', 'e', 'c', 't', 'A', 'l', 'l', '\022', 'Q', '\n', '\016', 'e', 'x', 'c', 'l', 'u',
+'s', 'i', 'o', 'n', '_', 'l', 'i', 's', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'S', 't', 'r', 'i', 'n', 'g',
+'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\r', 'e', 'x', 'c', 'l', 'u', 's', 'i', 'o', 'n', 'L', 'i', 's', 't', '\022',
+'Q', '\n', '\016', 'i', 'n', 'c', 'l', 'u', 's', 'i', 'o', 'n', '_', 'l', 'i', 's', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '(',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'L', 'i',
+'s', 't', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\r', 'i', 'n', 'c', 'l', 'u', 's',
+'i', 'o', 'n', 'L', 'i', 's', 't', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '2', '.', 'S', 't', 'a', 't', 's', 'M', 'a', 't', 'c', 'h',
+'e', 'r', 'B', '\024', '\n', '\r', 's', 't', 'a', 't', 's', '_', 'm', 'a', 't', 'c', 'h', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\"',
+'\250', '\001', '\n', '\014', 'T', 'a', 'g', 'S', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\031', '\n', '\010', 't', 'a', 'g', '_', 'n',
+'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 't', 'a', 'g', 'N', 'a', 'm', 'e', '\022', ' ', '\n', '\005', 'r', 'e', 'g',
+'e', 'x', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\010', '\372', 'B', '\005', 'r', '\003', '(', '\200', '\010', 'H', '\000', 'R', '\005', 'r', 'e', 'g',
+'e', 'x', '\022', '!', '\n', '\013', 'f', 'i', 'x', 'e', 'd', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'H', '\000',
+'R', '\n', 'f', 'i', 'x', 'e', 'd', 'V', 'a', 'l', 'u', 'e', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '2', '.', 'T', 'a', 'g', 'S', 'p',
+'e', 'c', 'i', 'f', 'i', 'e', 'r', 'B', '\013', '\n', '\t', 't', 'a', 'g', '_', 'v', 'a', 'l', 'u', 'e', '\"', '\222', '\001', '\n', '\027',
+'H', 'i', 's', 't', 'o', 'g', 'r', 'a', 'm', 'B', 'u', 'c', 'k', 'e', 't', 'S', 'e', 't', 't', 'i', 'n', 'g', 's', '\022', 'D',
+'\n', '\005', 'm', 'a', 't', 'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p',
+'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e',
+'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\005', 'm', 'a', 't', 'c', 'h', '\022', '1', '\n', '\007', 'b', 'u', 'c',
+'k', 'e', 't', 's', '\030', '\002', ' ', '\003', '(', '\001', 'B', '\027', '\372', 'B', '\024', '\222', '\001', '\021', '\010', '\001', '\030', '\001', '\"', '\013', '\022',
+'\t', '!', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', 'R', '\007', 'b', 'u', 'c', 'k', 'e', 't', 's', '\"', '\317', '\001', '\n', '\n', 'S',
+'t', 'a', 't', 's', 'd', 'S', 'i', 'n', 'k', '\022', '9', '\n', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(',
+'\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'A', 'd', 'd', 'r', 'e', 's', 's', 'H', '\000', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '*', '\n', '\020', 't', 'c', 'p',
+'_', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\016', 't', 'c',
+'p', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '\026', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\003', ' ',
+'\001', '(', '\t', 'R', '\006', 'p', 'r', 'e', 'f', 'i', 'x', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '2', '.', 'S', 't', 'a', 't', 's', 'd',
+'S', 'i', 'n', 'k', 'B', '\027', '\n', '\020', 's', 't', 'a', 't', 's', 'd', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022',
+'\003', '\370', 'B', '\001', '\"', '\217', '\002', '\n', '\r', 'D', 'o', 'g', 'S', 't', 'a', 't', 's', 'd', 'S', 'i', 'n', 'k', '\022', '9', '\n',
+'\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\035', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'A', 'd', 'd', 'r', 'e', 's', 's', 'H', '\000', 'R', '\007', 'a',
+'d', 'd', 'r', 'e', 's', 's', '\022', '\026', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\006', 'p',
+'r', 'e', 'f', 'i', 'x', '\022', 'Z', '\n', '\026', 'm', 'a', 'x', '_', 'b', 'y', 't', 'e', 's', '_', 'p', 'e', 'r', '_', 'd', 'a',
+'t', 'a', 'g', 'r', 'a', 'm', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '2', '\002', ' ',
+'\000', 'R', '\023', 'm', 'a', 'x', 'B', 'y', 't', 'e', 's', 'P', 'e', 'r', 'D', 'a', 't', 'a', 'g', 'r', 'a', 'm', ':', ',', '\232',
+'\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e', 't', 'r', 'i', 'c',
+'s', '.', 'v', '2', '.', 'D', 'o', 'g', 'S', 't', 'a', 't', 's', 'd', 'S', 'i', 'n', 'k', 'B', '\033', '\n', '\024', 'd', 'o', 'g',
+'_', 's', 't', 'a', 't', 's', 'd', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010',
+'\002', '\020', '\003', '\"', 'Z', '\n', '\013', 'H', 'y', 's', 't', 'r', 'i', 'x', 'S', 'i', 'n', 'k', '\022', '\037', '\n', '\013', 'n', 'u', 'm',
+'_', 'b', 'u', 'c', 'k', 'e', 't', 's', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\n', 'n', 'u', 'm', 'B', 'u', 'c', 'k', 'e', 't',
+'s', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'm', 'e',
+'t', 'r', 'i', 'c', 's', '.', 'v', '2', '.', 'H', 'y', 's', 't', 'r', 'i', 'x', 'S', 'i', 'n', 'k', 'B', '=', '\n', '%', 'i',
+'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'm', 'e', 't', 'r', 'i', 'c', 's', '.', 'v', '3', 'B', '\n', 'S', 't', 'a', 't', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001',
+'\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_core_v3_address_proto_upbdefinit,
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_metrics_v3_stats_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/metrics/v3/stats.proto",
+ UPB_STRVIEW_INIT(descriptor, 2091)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h
new file mode 100644
index 00000000000..0432cfd1f06
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h
@@ -0,0 +1,70 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/metrics/v3/stats.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_METRICS_V3_STATS_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_def_init envoy_config_metrics_v3_stats_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_StatsSink_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.StatsSink");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_StatsConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.StatsConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_StatsMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.StatsMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_TagSpecifier_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.TagSpecifier");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_HistogramBucketSettings_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.HistogramBucketSettings");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_StatsdSink_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.StatsdSink");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_DogStatsdSink_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.DogStatsdSink");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_metrics_v3_HystrixSink_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_metrics_v3_stats_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.metrics.v3.HystrixSink");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_METRICS_V3_STATS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c
new file mode 100644
index 00000000000..e189d990001
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c
@@ -0,0 +1,141 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/overload/v3/overload.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/overload/v3/overload.upbdefs.h"
+
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_overload_v3_ResourceMonitor_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ThresholdTrigger_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ScaledTrigger_msginit;
+extern const upb_msglayout envoy_config_overload_v3_Trigger_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit;
+extern const upb_msglayout envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit;
+extern const upb_msglayout envoy_config_overload_v3_OverloadAction_msginit;
+extern const upb_msglayout envoy_config_overload_v3_OverloadManager_msginit;
+
+static const upb_msglayout *layouts[8] = {
+ &envoy_config_overload_v3_ResourceMonitor_msginit,
+ &envoy_config_overload_v3_ThresholdTrigger_msginit,
+ &envoy_config_overload_v3_ScaledTrigger_msginit,
+ &envoy_config_overload_v3_Trigger_msginit,
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_msginit,
+ &envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_msginit,
+ &envoy_config_overload_v3_OverloadAction_msginit,
+ &envoy_config_overload_v3_OverloadManager_msginit,
+};
+
+static const char descriptor[2145] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '/', 'v',
+'3', '/', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/',
+'t', 'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's',
+'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\274', '\001', '\n',
+'\017', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'M', 'o', 'n', 'i', 't', 'o', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030',
+'\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't',
+'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o',
+'n', 'f', 'i', 'g', ':', '4', '\232', '\305', '\210', '\036', '/', '\n', '-', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c',
+'e', 'M', 'o', 'n', 'i', 't', 'o', 'r', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004',
+'\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\"', 'x', '\n', '\020', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd',
+'T', 'r', 'i', 'g', 'g', 'e', 'r', '\022', '-', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\001', 'B', '\027', '\372',
+'B', '\024', '\022', '\022', '\031', '\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', 'R', '\005', 'v',
+'a', 'l', 'u', 'e', ':', '5', '\232', '\305', '\210', '\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'T', 'h', 'r', 'e', 's', 'h', 'o',
+'l', 'd', 'T', 'r', 'i', 'g', 'g', 'e', 'r', '\"', '\241', '\001', '\n', '\r', 'S', 'c', 'a', 'l', 'e', 'd', 'T', 'r', 'i', 'g', 'g',
+'e', 'r', '\022', 'D', '\n', '\021', 's', 'c', 'a', 'l', 'i', 'n', 'g', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\001',
+' ', '\001', '(', '\001', 'B', '\027', '\372', 'B', '\024', '\022', '\022', '\031', '\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', ')', '\000', '\000', '\000', '\000',
+'\000', '\000', '\000', '\000', 'R', '\020', 's', 'c', 'a', 'l', 'i', 'n', 'g', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'J', '\n',
+'\024', 's', 'a', 't', 'u', 'r', 'a', 't', 'i', 'o', 'n', '_', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\030', '\002', ' ', '\001',
+'(', '\001', 'B', '\027', '\372', 'B', '\024', '\022', '\022', '\031', '\000', '\000', '\000', '\000', '\000', '\000', '\360', '?', ')', '\000', '\000', '\000', '\000', '\000', '\000',
+'\000', '\000', 'R', '\023', 's', 'a', 't', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\"', '\371',
+'\001', '\n', '\007', 'T', 'r', 'i', 'g', 'g', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'J', '\n', '\t', 't', 'h', 'r', 'e', 's', 'h', 'o',
+'l', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o',
+'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'T', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', 'T', 'r', 'i', 'g', 'g',
+'e', 'r', 'H', '\000', 'R', '\t', 't', 'h', 'r', 'e', 's', 'h', 'o', 'l', 'd', '\022', 'A', '\n', '\006', 's', 'c', 'a', 'l', 'e', 'd',
+'\030', '\003', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e',
+'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'S', 'c', 'a', 'l', 'e', 'd', 'T', 'r', 'i', 'g', 'g', 'e', 'r', 'H', '\000', 'R',
+'\006', 's', 'c', 'a', 'l', 'e', 'd', ':', ',', '\232', '\305', '\210', '\036', '\'', '\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'T', 'r', 'i', 'g',
+'g', 'e', 'r', 'B', '\024', '\n', '\r', 't', 'r', 'i', 'g', 'g', 'e', 'r', '_', 'o', 'n', 'e', 'o', 'f', '\022', '\003', '\370', 'B', '\001',
+'\"', '\247', '\004', '\n', '\037', 'S', 'c', 'a', 'l', 'e', 'T', 'i', 'm', 'e', 'r', 's', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'A',
+'c', 't', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '~', '\n', '\023', 't', 'i', 'm', 'e', 'r', '_', 's', 'c', 'a', 'l',
+'e', '_', 'f', 'a', 'c', 't', 'o', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', 'D', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'S', 'c', 'a', 'l', 'e', 'T', 'i',
+'m', 'e', 'r', 's', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'A', 'c', 't', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', '.',
+'S', 'c', 'a', 'l', 'e', 'T', 'i', 'm', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\021', 't', 'i', 'm',
+'e', 'r', 'S', 'c', 'a', 'l', 'e', 'F', 'a', 'c', 't', 'o', 'r', 's', '\032', '\200', '\002', '\n', '\n', 'S', 'c', 'a', 'l', 'e', 'T',
+'i', 'm', 'e', 'r', '\022', 'e', '\n', '\005', 't', 'i', 'm', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\016', '2', 'C', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'S', 'c', 'a',
+'l', 'e', 'T', 'i', 'm', 'e', 'r', 's', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'A', 'c', 't', 'i', 'o', 'n', 'C', 'o', 'n',
+'f', 'i', 'g', '.', 'T', 'i', 'm', 'e', 'r', 'T', 'y', 'p', 'e', 'B', '\n', '\372', 'B', '\007', '\202', '\001', '\004', '\020', '\001', ' ', '\000',
+'R', '\005', 't', 'i', 'm', 'e', 'r', '\022', '<', '\n', '\013', 'm', 'i', 'n', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\002', ' ',
+'\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', 'H', '\000', 'R', '\n', 'm', 'i', 'n', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '5', '\n', '\t', 'm', 'i',
+'n', '_', 's', 'c', 'a', 'l', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p',
+'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'H', '\000', 'R', '\010', 'm', 'i', 'n', 'S', 'c', 'a', 'l', 'e', 'B',
+'\026', '\n', '\017', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '_', 'a', 'd', 'j', 'u', 's', 't', '\022', '\003', '\370', 'B', '\001', '\"', '\200',
+'\001', '\n', '\t', 'T', 'i', 'm', 'e', 'r', 'T', 'y', 'p', 'e', '\022', '\017', '\n', '\013', 'U', 'N', 'S', 'P', 'E', 'C', 'I', 'F', 'I',
+'E', 'D', '\020', '\000', '\022', '#', '\n', '\037', 'H', 'T', 'T', 'P', '_', 'D', 'O', 'W', 'N', 'S', 'T', 'R', 'E', 'A', 'M', '_', 'C',
+'O', 'N', 'N', 'E', 'C', 'T', 'I', 'O', 'N', '_', 'I', 'D', 'L', 'E', '\020', '\001', '\022', '\037', '\n', '\033', 'H', 'T', 'T', 'P', '_',
+'D', 'O', 'W', 'N', 'S', 'T', 'R', 'E', 'A', 'M', '_', 'S', 'T', 'R', 'E', 'A', 'M', '_', 'I', 'D', 'L', 'E', '\020', '\002', '\022',
+'\034', '\n', '\030', 'T', 'R', 'A', 'N', 'S', 'P', 'O', 'R', 'T', '_', 'S', 'O', 'C', 'K', 'E', 'T', '_', 'C', 'O', 'N', 'N', 'E',
+'C', 'T', '\020', '\003', '\"', '\344', '\001', '\n', '\016', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'A', 'c', 't', 'i', 'o', 'n', '\022', '\033',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a',
+'m', 'e', '\022', 'G', '\n', '\010', 't', 'r', 'i', 'g', 'g', 'e', 'r', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '!', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'T', 'r',
+'i', 'g', 'g', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\010', 't', 'r', 'i', 'g', 'g', 'e', 'r', 's',
+'\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013', 't', 'y', 'p', 'e',
+'d', 'C', 'o', 'n', 'f', 'i', 'g', ':', '3', '\232', '\305', '\210', '\036', '.', '\n', ',', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'O', 'v', 'e', 'r',
+'l', 'o', 'a', 'd', 'A', 'c', 't', 'i', 'o', 'n', '\"', '\263', '\002', '\n', '\017', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'M', 'a',
+'n', 'a', 'g', 'e', 'r', '\022', 'D', '\n', '\020', 'r', 'e', 'f', 'r', 'e', 's', 'h', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l',
+'\030', '\001', ' ', '\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', '\017', 'r', 'e', 'f', 'r', 'e', 's', 'h', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l',
+'\022', '`', '\n', '\021', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'm', 'o', 'n', 'i', 't', 'o', 'r', 's', '\030', '\002', ' ', '\003',
+'(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a',
+'d', '.', 'v', '3', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'M', 'o', 'n', 'i', 't', 'o', 'r', 'B', '\010', '\372', 'B', '\005',
+'\222', '\001', '\002', '\010', '\001', 'R', '\020', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'M', 'o', 'n', 'i', 't', 'o', 'r', 's', '\022', 'B',
+'\n', '\007', 'a', 'c', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', '.', 'O', 'v', 'e', 'r', 'l', 'o', 'a',
+'d', 'A', 'c', 't', 'i', 'o', 'n', 'R', '\007', 'a', 'c', 't', 'i', 'o', 'n', 's', ':', '4', '\232', '\305', '\210', '\036', '/', '\n', '-',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '2', 'a',
+'l', 'p', 'h', 'a', '.', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'M', 'a', 'n', 'a', 'g', 'e', 'r', 'B', 'A', '\n', '&', 'i',
+'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'o', 'v', 'e', 'r', 'l', 'o', 'a', 'd', '.', 'v', '3', 'B', '\r', 'O', 'v', 'e', 'r', 'l', 'o', 'a', 'd', 'P', 'r', 'o',
+'t', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[7] = {
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_overload_v3_overload_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/overload/v3/overload.proto",
+ UPB_STRVIEW_INIT(descriptor, 2145)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h
new file mode 100644
index 00000000000..ca1dc51729c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h
@@ -0,0 +1,70 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/overload/v3/overload.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_OVERLOAD_V3_OVERLOAD_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_OVERLOAD_V3_OVERLOAD_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_def_init envoy_config_overload_v3_overload_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_ResourceMonitor_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.ResourceMonitor");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_ThresholdTrigger_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.ThresholdTrigger");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_ScaledTrigger_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.ScaledTrigger");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_Trigger_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.Trigger");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.ScaleTimersOverloadActionConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_ScaleTimersOverloadActionConfig_ScaleTimer_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.ScaleTimersOverloadActionConfig.ScaleTimer");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_OverloadAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.OverloadAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_overload_v3_OverloadManager_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_overload_v3_overload_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.overload.v3.OverloadManager");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_OVERLOAD_V3_OVERLOAD_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c
new file mode 100644
index 00000000000..8e6490aa8d7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c
@@ -0,0 +1,101 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/route/v3/route.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/route/v3/route.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+extern upb_def_init envoy_config_route_v3_route_components_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_route_v3_RouteConfiguration_msginit;
+extern const upb_msglayout envoy_config_route_v3_Vhds_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_config_route_v3_RouteConfiguration_msginit,
+ &envoy_config_route_v3_Vhds_msginit,
+};
+
+static const char descriptor[1389] = {'\n', '!', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/', 'r',
+'o', 'u', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o',
+'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c',
+'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r',
+'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', ',', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o',
+'u', 't', 'e', '/', 'v', '3', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p',
+'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a',
+'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\"', '\202', '\007', '\n', '\022', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n',
+'\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'G', '\n', '\r', 'v',
+'i', 'r', 't', 'u', 'a', 'l', '_', 'h', 'o', 's', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l',
+'H', 'o', 's', 't', 'R', '\014', 'v', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', 's', '\022', '/', '\n', '\004', 'v', 'h', 'd',
+'s', '\030', '\t', ' ', '\001', '(', '\013', '2', '\033', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o',
+'u', 't', 'e', '.', 'v', '3', '.', 'V', 'h', 'd', 's', 'R', '\004', 'v', 'h', 'd', 's', '\022', 'D', '\n', '\025', 'i', 'n', 't', 'e',
+'r', 'n', 'a', 'l', '_', 'o', 'n', 'l', 'y', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\003', '(', '\t', 'B', '\020',
+'\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\023', 'i', 'n', 't', 'e', 'r', 'n', 'a',
+'l', 'O', 'n', 'l', 'y', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'i', '\n', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_',
+'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\004', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r',
+'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\024', 'r',
+'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', 'M', '\n', '\032', 'r', 'e',
+'s', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030',
+'\005', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\027',
+'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', 'g',
+'\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030',
+'\006', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B',
+'\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o',
+'A', 'd', 'd', '\022', 'K', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o',
+'_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\010', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006',
+'\300', '\001', '\001', '\310', '\001', '\000', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R',
+'e', 'm', 'o', 'v', 'e', '\022', 'L', '\n', '#', 'm', 'o', 's', 't', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'c', '_', 'h', 'e',
+'a', 'd', 'e', 'r', '_', 'm', 'u', 't', 'a', 't', 'i', 'o', 'n', 's', '_', 'w', 'i', 'n', 's', '\030', '\n', ' ', '\001', '(', '\010',
+'R', '\037', 'm', 'o', 's', 't', 'S', 'p', 'e', 'c', 'i', 'f', 'i', 'c', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'u', 't', 'a', 't',
+'i', 'o', 'n', 's', 'W', 'i', 'n', 's', '\022', 'G', '\n', '\021', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '_', 'c', 'l', 'u', 's',
+'t', 'e', 'r', 's', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'C', 'l',
+'u', 's', 't', 'e', 'r', 's', '\022', 'i', '\n', '#', 'm', 'a', 'x', '_', 'd', 'i', 'r', 'e', 'c', 't', '_', 'r', 'e', 's', 'p',
+'o', 'n', 's', 'e', '_', 'b', 'o', 'd', 'y', '_', 's', 'i', 'z', 'e', '_', 'b', 'y', 't', 'e', 's', '\030', '\013', ' ', '\001', '(',
+'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3',
+'2', 'V', 'a', 'l', 'u', 'e', 'R', '\036', 'm', 'a', 'x', 'D', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e',
+'B', 'o', 'd', 'y', 'S', 'i', 'z', 'e', 'B', 'y', 't', 'e', 's', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't',
+'i', 'o', 'n', '\"', 's', '\n', '\004', 'V', 'h', 'd', 's', '\022', 'Q', '\n', '\r', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u',
+'r', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005',
+'\212', '\001', '\002', '\020', '\001', 'R', '\014', 'c', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', ':', '\030', '\232', '\305', '\210', '\036',
+'\023', '\n', '\021', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'V', 'h', 'd', 's', 'B', ';', '\n', '#', 'i',
+'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', 'B', '\n', 'R', 'o', 'u', 't', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_config_source_proto_upbdefinit,
+ &envoy_config_route_v3_route_components_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_route_v3_route_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/route/v3/route.proto",
+ UPB_STRVIEW_INIT(descriptor, 1389)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h
new file mode 100644
index 00000000000..30b5dd5ec3f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/route/v3/route.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ROUTE_V3_ROUTE_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ROUTE_V3_ROUTE_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_def_init envoy_config_route_v3_route_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteConfiguration_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteConfiguration");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_Vhds_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.Vhds");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ROUTE_V3_ROUTE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c
new file mode 100644
index 00000000000..b9e231614b1
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c
@@ -0,0 +1,944 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/route/v3/route_components.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/route/v3/route_components.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_proxy_protocol_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_regex_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init envoy_type_metadata_v3_metadata_proto_upbdefinit;
+extern upb_def_init envoy_type_tracing_v3_custom_tag_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_range_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init envoy_annotations_deprecation_proto_upbdefinit;
+extern upb_def_init udpa_annotations_migrate_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_route_v3_VirtualHost_msginit;
+extern const upb_msglayout envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_msginit;
+extern const upb_msglayout envoy_config_route_v3_FilterAction_msginit;
+extern const upb_msglayout envoy_config_route_v3_Route_msginit;
+extern const upb_msglayout envoy_config_route_v3_Route_TypedPerFilterConfigEntry_msginit;
+extern const upb_msglayout envoy_config_route_v3_WeightedCluster_msginit;
+extern const upb_msglayout envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit;
+extern const upb_msglayout envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteMatch_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteMatch_ConnectMatcher_msginit;
+extern const upb_msglayout envoy_config_route_v3_CorsPolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_Header_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_Cookie_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_HashPolicy_FilterState_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_UpgradeConfig_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_msginit;
+extern const upb_msglayout envoy_config_route_v3_RouteAction_MaxStreamDuration_msginit;
+extern const upb_msglayout envoy_config_route_v3_RetryPolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_RetryPolicy_RetryPriority_msginit;
+extern const upb_msglayout envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit;
+extern const upb_msglayout envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit;
+extern const upb_msglayout envoy_config_route_v3_RetryPolicy_ResetHeader_msginit;
+extern const upb_msglayout envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit;
+extern const upb_msglayout envoy_config_route_v3_HedgePolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_RedirectAction_msginit;
+extern const upb_msglayout envoy_config_route_v3_DirectResponseAction_msginit;
+extern const upb_msglayout envoy_config_route_v3_Decorator_msginit;
+extern const upb_msglayout envoy_config_route_v3_Tracing_msginit;
+extern const upb_msglayout envoy_config_route_v3_VirtualCluster_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_GenericKey_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Action_MetaData_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Override_msginit;
+extern const upb_msglayout envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit;
+extern const upb_msglayout envoy_config_route_v3_HeaderMatcher_msginit;
+extern const upb_msglayout envoy_config_route_v3_QueryParameterMatcher_msginit;
+extern const upb_msglayout envoy_config_route_v3_InternalRedirectPolicy_msginit;
+extern const upb_msglayout envoy_config_route_v3_FilterConfig_msginit;
+
+static const upb_msglayout *layouts[52] = {
+ &envoy_config_route_v3_VirtualHost_msginit,
+ &envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_msginit,
+ &envoy_config_route_v3_FilterAction_msginit,
+ &envoy_config_route_v3_Route_msginit,
+ &envoy_config_route_v3_Route_TypedPerFilterConfigEntry_msginit,
+ &envoy_config_route_v3_WeightedCluster_msginit,
+ &envoy_config_route_v3_WeightedCluster_ClusterWeight_msginit,
+ &envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_msginit,
+ &envoy_config_route_v3_RouteMatch_msginit,
+ &envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_msginit,
+ &envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_msginit,
+ &envoy_config_route_v3_RouteMatch_ConnectMatcher_msginit,
+ &envoy_config_route_v3_CorsPolicy_msginit,
+ &envoy_config_route_v3_RouteAction_msginit,
+ &envoy_config_route_v3_RouteAction_RequestMirrorPolicy_msginit,
+ &envoy_config_route_v3_RouteAction_HashPolicy_msginit,
+ &envoy_config_route_v3_RouteAction_HashPolicy_Header_msginit,
+ &envoy_config_route_v3_RouteAction_HashPolicy_Cookie_msginit,
+ &envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_msginit,
+ &envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_msginit,
+ &envoy_config_route_v3_RouteAction_HashPolicy_FilterState_msginit,
+ &envoy_config_route_v3_RouteAction_UpgradeConfig_msginit,
+ &envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_msginit,
+ &envoy_config_route_v3_RouteAction_MaxStreamDuration_msginit,
+ &envoy_config_route_v3_RetryPolicy_msginit,
+ &envoy_config_route_v3_RetryPolicy_RetryPriority_msginit,
+ &envoy_config_route_v3_RetryPolicy_RetryHostPredicate_msginit,
+ &envoy_config_route_v3_RetryPolicy_RetryBackOff_msginit,
+ &envoy_config_route_v3_RetryPolicy_ResetHeader_msginit,
+ &envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_msginit,
+ &envoy_config_route_v3_HedgePolicy_msginit,
+ &envoy_config_route_v3_RedirectAction_msginit,
+ &envoy_config_route_v3_DirectResponseAction_msginit,
+ &envoy_config_route_v3_Decorator_msginit,
+ &envoy_config_route_v3_Tracing_msginit,
+ &envoy_config_route_v3_VirtualCluster_msginit,
+ &envoy_config_route_v3_RateLimit_msginit,
+ &envoy_config_route_v3_RateLimit_Action_msginit,
+ &envoy_config_route_v3_RateLimit_Action_SourceCluster_msginit,
+ &envoy_config_route_v3_RateLimit_Action_DestinationCluster_msginit,
+ &envoy_config_route_v3_RateLimit_Action_RequestHeaders_msginit,
+ &envoy_config_route_v3_RateLimit_Action_RemoteAddress_msginit,
+ &envoy_config_route_v3_RateLimit_Action_GenericKey_msginit,
+ &envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_msginit,
+ &envoy_config_route_v3_RateLimit_Action_DynamicMetaData_msginit,
+ &envoy_config_route_v3_RateLimit_Action_MetaData_msginit,
+ &envoy_config_route_v3_RateLimit_Override_msginit,
+ &envoy_config_route_v3_RateLimit_Override_DynamicMetadata_msginit,
+ &envoy_config_route_v3_HeaderMatcher_msginit,
+ &envoy_config_route_v3_QueryParameterMatcher_msginit,
+ &envoy_config_route_v3_InternalRedirectPolicy_msginit,
+ &envoy_config_route_v3_FilterConfig_msginit,
+};
+
+static const char descriptor[19463] = {'\n', ',', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/', 'r',
+'o', 'u', 't', 'e', '_', 'c', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v', 'o',
+'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '$', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o',
+'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'p', 'r', 'o', 'x', 'y', '_', 'p', 'r', 'o', 't', 'o', 'c',
+'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c',
+'h', 'e', 'r', '/', 'v', '3', '/', 'r', 'e', 'g', 'e', 'x', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o', 'y',
+'/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'i', 'n', 'g', '.', 'p',
+'r', 'o', 't', 'o', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a',
+'/', 'v', '3', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', 't', 'o', '\032', '&', 'e', 'n', 'v', 'o', 'y',
+'/', 't', 'y', 'p', 'e', '/', 't', 'r', 'a', 'c', 'i', 'n', 'g', '/', 'v', '3', '/', 'c', 'u', 's', 't', 'o', 'm', '_', 't',
+'a', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'p',
+'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/',
+'v', '3', '/', 'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036',
+'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.',
+'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/',
+'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.',
+'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v',
+'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\324', '\014', '\n', '\013', 'V', 'i', 'r', 't', 'u',
+'a', 'l', 'H', 'o', 's', 't', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ',', '\n', '\007', 'd', 'o', 'm', 'a', 'i', 'n', 's', '\030', '\002', ' ', '\003',
+'(', '\t', 'B', '\022', '\372', 'B', '\017', '\222', '\001', '\014', '\010', '\001', '\"', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\007', 'd',
+'o', 'm', 'a', 'i', 'n', 's', '\022', '4', '\n', '\006', 'r', 'o', 'u', 't', 'e', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\034', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u',
+'t', 'e', 'R', '\006', 'r', 'o', 'u', 't', 'e', 's', '\022', '`', '\n', '\013', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 't', 'l', 's',
+'\030', '\004', ' ', '\001', '(', '\016', '2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u',
+'t', 'e', '.', 'v', '3', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', '.', 'T', 'l', 's', 'R', 'e', 'q', 'u',
+'i', 'r', 'e', 'm', 'e', 'n', 't', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\n', 'r', 'e',
+'q', 'u', 'i', 'r', 'e', 'T', 'l', 's', '\022', 'P', '\n', '\020', 'v', 'i', 'r', 't', 'u', 'a', 'l', '_', 'c', 'l', 'u', 's', 't',
+'e', 'r', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', 'R', '\017',
+'v', 'i', 'r', 't', 'u', 'a', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', 'A', '\n', '\013', 'r', 'a', 't', 'e', '_', 'l',
+'i', 'm', 'i', 't', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'R', '\n', 'r', 'a', 't',
+'e', 'L', 'i', 'm', 'i', 't', 's', '\022', 'g', '\n', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r',
+'s', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\007', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O',
+'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't',
+'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', 'M', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h',
+'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\r', ' ', '\003', '(', '\t', 'B', '\022', '\372',
+'B', '\017', '\222', '\001', '\014', '\"', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's',
+'t', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', 'i', '\n', '\027', 'r', 'e', 's', 'p', 'o',
+'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\n', ' ', '\003', '(', '\013', '2',
+'\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e',
+'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350',
+'\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', 'O',
+'\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm',
+'o', 'v', 'e', '\030', '\013', ' ', '\003', '(', '\t', 'B', '\022', '\372', 'B', '\017', '\222', '\001', '\014', '\"', '\n', 'r', '\010', '\020', '\001', '\300', '\001',
+'\001', '\310', '\001', '\000', 'R', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e',
+'m', 'o', 'v', 'e', '\022', '5', '\n', '\004', 'c', 'o', 'r', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'C', 'o', 'r', 's', 'P', 'o', 'l',
+'i', 'c', 'y', 'R', '\004', 'c', 'o', 'r', 's', '\022', 's', '\n', '\027', 't', 'y', 'p', 'e', 'd', '_', 'p', 'e', 'r', '_', 'f', 'i',
+'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\017', ' ', '\003', '(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H',
+'o', 's', 't', '.', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E',
+'n', 't', 'r', 'y', 'R', '\024', 't', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i',
+'g', '\022', 'A', '\n', '\035', 'i', 'n', 'c', 'l', 'u', 'd', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'a', 't', 't', 'e',
+'m', 'p', 't', '_', 'c', 'o', 'u', 'n', 't', '\030', '\016', ' ', '\001', '(', '\010', 'R', '\032', 'i', 'n', 'c', 'l', 'u', 'd', 'e', 'R',
+'e', 'q', 'u', 'e', 's', 't', 'A', 't', 't', 'e', 'm', 'p', 't', 'C', 'o', 'u', 'n', 't', '\022', 'H', '\n', '!', 'i', 'n', 'c',
+'l', 'u', 'd', 'e', '_', 'a', 't', 't', 'e', 'm', 'p', 't', '_', 'c', 'o', 'u', 'n', 't', '_', 'i', 'n', '_', 'r', 'e', 's',
+'p', 'o', 'n', 's', 'e', '\030', '\023', ' ', '\001', '(', '\010', 'R', '\035', 'i', 'n', 'c', 'l', 'u', 'd', 'e', 'A', 't', 't', 'e', 'm',
+'p', 't', 'C', 'o', 'u', 'n', 't', 'I', 'n', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', 'E', '\n', '\014', 'r', 'e', 't', 'r',
+'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\020', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y',
+'R', '\013', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'O', '\n', '\031', 'r', 'e', 't', 'r', 'y', '_', 'p', 'o',
+'l', 'i', 'c', 'y', '_', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\024', ' ', '\001', '(', '\013', '2', '\024',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\026', 'r', 'e', 't',
+'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'T', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'E', '\n', '\014', 'h', 'e',
+'d', 'g', 'e', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\021', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i',
+'c', 'y', 'R', '\013', 'h', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '`', '\n', '\036', 'p', 'e', 'r', '_', 'r', 'e',
+'q', 'u', 'e', 's', 't', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b', 'y', 't', 'e', 's', '\030',
+'\022', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U',
+'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\032', 'p', 'e', 'r', 'R', 'e', 'q', 'u', 'e', 's', 't', 'B', 'u', 'f',
+'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's', '\032', ']', '\n', '\031', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r',
+'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030',
+'\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013',
+'2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\005', 'v',
+'a', 'l', 'u', 'e', ':', '\002', '8', '\001', '\"', ':', '\n', '\022', 'T', 'l', 's', 'R', 'e', 'q', 'u', 'i', 'r', 'e', 'm', 'e', 'n',
+'t', 'T', 'y', 'p', 'e', '\022', '\010', '\n', '\004', 'N', 'O', 'N', 'E', '\020', '\000', '\022', '\021', '\n', '\r', 'E', 'X', 'T', 'E', 'R', 'N',
+'A', 'L', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\007', '\n', '\003', 'A', 'L', 'L', '\020', '\002', ':', '%', '\232', '\305', '\210', '\036', ' ',
+'\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'V', 'i', 'r', 't',
+'u', 'a', 'l', 'H', 'o', 's', 't', 'J', '\004', '\010', '\t', '\020', '\n', 'J', '\004', '\010', '\014', '\020', '\r', 'R', '\021', 'p', 'e', 'r', '_',
+'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\"', 'd', '\n', '\014', 'F', 'i', 'l', 't', 'e', 'r', 'A', 'c',
+'t', 'i', 'o', 'n', '\022', ',', '\n', '\006', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\006', 'a', 'c', 't', 'i', 'o', 'n',
+':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u',
+'t', 'e', '.', 'F', 'i', 'l', 't', 'e', 'r', 'A', 'c', 't', 'i', 'o', 'n', '\"', '\254', '\n', '\n', '\005', 'R', 'o', 'u', 't', 'e',
+'\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\016', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'A', '\n', '\005', 'm',
+'a', 't', 'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'B', '\010', '\372', 'B', '\005',
+'\212', '\001', '\002', '\020', '\001', 'R', '\005', 'm', 'a', 't', 'c', 'h', '\022', ':', '\n', '\005', 'r', 'o', 'u', 't', 'e', '\030', '\002', ' ', '\001',
+'(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v',
+'3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\005', 'r', 'o', 'u', 't', 'e', '\022', 'C', '\n',
+'\010', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c',
+'t', 'i', 'o', 'n', 'H', '\000', 'R', '\010', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', 'V', '\n', '\017', 'd', 'i', 'r', 'e', 'c',
+'t', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'D', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's',
+'p', 'o', 'n', 's', 'e', 'A', 'c', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\016', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p',
+'o', 'n', 's', 'e', '\022', 'J', '\n', '\r', 'f', 'i', 'l', 't', 'e', 'r', '_', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\021', ' ', '\001',
+'(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v',
+'3', '.', 'F', 'i', 'l', 't', 'e', 'r', 'A', 'c', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\014', 'f', 'i', 'l', 't', 'e', 'r', 'A',
+'c', 't', 'i', 'o', 'n', '\022', ':', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\004', ' ', '\001', '(', '\013', '2', '\036',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e', 't',
+'a', 'd', 'a', 't', 'a', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', '>', '\n', '\t', 'd', 'e', 'c', 'o', 'r', 'a',
+'t', 'o', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'o', 'r', 'R', '\t', 'd', 'e', 'c', 'o', 'r',
+'a', 't', 'o', 'r', '\022', 'm', '\n', '\027', 't', 'y', 'p', 'e', 'd', '_', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_',
+'c', 'o', 'n', 'f', 'i', 'g', '\030', '\r', ' ', '\003', '(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', '.', 'T', 'y', 'p', 'e', 'd', 'P', 'e',
+'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', 'R', '\024', 't', 'y', 'p', 'e', 'd',
+'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'g', '\n', '\026', 'r', 'e', 'q', 'u', 'e', 's',
+'t', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\t', ' ', '\003', '(', '\013', '2', '\'', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd',
+'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R',
+'\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', 'M', '\n', '\031', 'r',
+'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030',
+'\014', ' ', '\003', '(', '\t', 'B', '\022', '\372', 'B', '\017', '\222', '\001', '\014', '\"', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000',
+'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022',
+'i', '\n', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd',
+'d', '\030', '\n', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t',
+'\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a', 'd', 'e', 'r',
+'s', 'T', 'o', 'A', 'd', 'd', '\022', 'O', '\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r',
+'s', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\013', ' ', '\003', '(', '\t', 'B', '\022', '\372', 'B', '\017', '\222', '\001', '\014',
+'\"', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e', 'a',
+'d', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', '8', '\n', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\030', '\017',
+' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'v', '3', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', 'R', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\022', '`', '\n', '\036', 'p',
+'e', 'r', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'b', 'u', 'f', 'f', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '_', 'b',
+'y', 't', 'e', 's', '\030', '\020', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\032', 'p', 'e', 'r', 'R', 'e', 'q', 'u', 'e',
+'s', 't', 'B', 'u', 'f', 'f', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'B', 'y', 't', 'e', 's', '\032', ']', '\n', '\031', 'T', 'y', 'p',
+'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n',
+'\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030',
+'\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A',
+'n', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', ':', '\037', '\232', '\305', '\210', '\036', '\032', '\n', '\030', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'B', '\r', '\n', '\006',
+'a', 'c', 't', 'i', 'o', 'n', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\006', '\020', '\007', 'J', '\004', '\010', '\010', '\020', '\t', 'R', '\021',
+'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\"', '\353', '\010', '\n', '\017', 'W', 'e', 'i',
+'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', 'Z', '\n', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\030',
+'\001', ' ', '\003', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't',
+'e', '.', 'v', '3', '.', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's',
+'t', 'e', 'r', 'W', 'e', 'i', 'g', 'h', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\010', 'c', 'l', 'u', 's',
+'t', 'e', 'r', 's', '\022', 'H', '\n', '\014', 't', 'o', 't', 'a', 'l', '_', 'w', 'e', 'i', 'g', 'h', 't', '\030', '\003', ' ', '\001', '(',
+'\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3',
+'2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002', '(', '\001', 'R', '\013', 't', 'o', 't', 'a', 'l', 'W', 'e', 'i',
+'g', 'h', 't', '\022', ',', '\n', '\022', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '_', 'p', 'r', 'e', 'f', 'i', 'x',
+'\030', '\002', ' ', '\001', '(', '\t', 'R', '\020', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'K', 'e', 'y', 'P', 'r', 'e', 'f', 'i', 'x', '\032',
+'\330', '\006', '\n', '\r', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', 'i', 'g', 'h', 't', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e',
+'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '4', '\n', '\006',
+'w', 'e', 'i', 'g', 'h', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\006', 'w', 'e', 'i', 'g', 'h', 't',
+'\022', 'E', '\n', '\016', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\013', '2',
+'\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e',
+'t', 'a', 'd', 'a', 't', 'a', 'R', '\r', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', 'c', 'h', '\022', 'g', '\n', '\026',
+'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\004', ' ',
+'\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222',
+'\001', '\003', '\020', '\350', '\007', 'R', '\023', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd',
+'d', '\022', 'K', '\n', '\031', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r',
+'e', 'm', 'o', 'v', 'e', '\030', '\t', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B', '\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001',
+'\001', '\310', '\001', '\000', 'R', '\026', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm',
+'o', 'v', 'e', '\022', 'i', '\n', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't',
+'o', '_', 'a', 'd', 'd', '\030', '\005', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i',
+'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\024', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H', 'e',
+'a', 'd', 'e', 'r', 's', 'T', 'o', 'A', 'd', 'd', '\022', 'M', '\n', '\032', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'h', 'e',
+'a', 'd', 'e', 'r', 's', '_', 't', 'o', '_', 'r', 'e', 'm', 'o', 'v', 'e', '\030', '\006', ' ', '\003', '(', '\t', 'B', '\020', '\372', 'B',
+'\r', '\222', '\001', '\n', '\"', '\010', 'r', '\006', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\027', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'H',
+'e', 'a', 'd', 'e', 'r', 's', 'T', 'o', 'R', 'e', 'm', 'o', 'v', 'e', '\022', '\205', '\001', '\n', '\027', 't', 'y', 'p', 'e', 'd', '_',
+'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\n', ' ', '\003', '(', '\013', '2', 'N',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'W', 'e',
+'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', 'i', 'g',
+'h', 't', '.', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E', 'n',
+'t', 'r', 'y', 'R', '\024', 't', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g',
+'\032', ']', '\n', '\031', 'T', 'y', 'p', 'e', 'd', 'P', 'e', 'r', 'F', 'i', 'l', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', 'E',
+'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k', 'e', 'y', '\022', '*', '\n',
+'\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002', '8', '\001', ':', '7', '\232', '\305', '\210',
+'\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'W', 'e',
+'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'W', 'e', 'i', 'g',
+'h', 't', 'J', '\004', '\010', '\007', '\020', '\010', 'J', '\004', '\010', '\010', '\020', '\t', 'R', '\021', 'p', 'e', 'r', '_', 'f', 'i', 'l', 't', 'e',
+'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e',
+'r', '\"', '\313', '\010', '\n', '\n', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', '\022', '\030', '\n', '\006', 'p', 'r', 'e', 'f', 'i',
+'x', '\030', '\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\022', '\024', '\n', '\004', 'p', 'a', 't', 'h',
+'\030', '\002', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\004', 'p', 'a', 't', 'h', '\022', 'N', '\n', '\n', 's', 'a', 'f', 'e', '_', 'r', 'e',
+'g', 'e', 'x', '\030', '\n', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a',
+'t', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B',
+'\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\t', 's', 'a', 'f', 'e', 'R', 'e', 'g', 'e', 'x', '\022', '[', '\n', '\017', 'c', 'o',
+'n', 'n', 'e', 'c', 't', '_', 'm', 'a', 't', 'c', 'h', 'e', 'r', '\030', '\014', ' ', '\001', '(', '\013', '2', '0', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'M',
+'a', 't', 'c', 'h', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\016', 'c', 'o',
+'n', 'n', 'e', 'c', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'A', '\n', '\016', 'c', 'a', 's', 'e', '_', 's', 'e', 'n', 's',
+'i', 't', 'i', 'v', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\r', 'c', 'a', 's', 'e', 'S', 'e', 'n', 's', 'i',
+'t', 'i', 'v', 'e', '\022', 'Y', '\n', '\020', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'f', 'r', 'a', 'c', 't', 'i', 'o', 'n', '\030',
+'\t', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c',
+'e', 'n', 't', 'R', '\017', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', '\022', '>', '\n', '\007', 'h',
+'e', 'a', 'd', 'e', 'r', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r',
+'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'W', '\n', '\020', 'q', 'u', 'e', 'r', 'y', '_', 'p', 'a', 'r', 'a', 'm', 'e',
+'t', 'e', 'r', 's', '\030', '\007', ' ', '\003', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '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', 'K',
+'\n', '\004', 'g', 'r', 'p', 'c', '\030', '\010', ' ', '\001', '(', '\013', '2', '7', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', '.', 'G', 'r',
+'p', 'c', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\004', 'g', 'r', 'p', 'c',
+'\022', 'Y', '\n', '\013', 't', 'l', 's', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\013', ' ', '\001', '(', '\013', '2', '8', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't',
+'e', 'M', 'a', 't', 'c', 'h', '.', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't',
+'i', 'o', 'n', 's', 'R', '\n', 't', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\032', 'S', '\n', '\025', 'G', 'r', 'p', 'c', 'R',
+'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i', 'o', 'n', 's', ':', ':', '\232', '\305', '\210', '\036', '5', '\n', '3',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'M',
+'a', 't', 'c', 'h', '.', 'G', 'r', 'p', 'c', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i', 'o', 'n',
+'s', '\032', '\311', '\001', '\n', '\026', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'M', 'a', 't', 'c', 'h', 'O', 'p', 't', 'i',
+'o', 'n', 's', '\022', '8', '\n', '\t', 'p', 'r', 'e', 's', 'e', 'n', 't', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e',
+'R', '\t', 'p', 'r', 'e', 's', 'e', 'n', 't', 'e', 'd', '\022', '8', '\n', '\t', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'd', '\030',
+'\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B',
+'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', 'd', ':', ';', '\232', '\305', '\210', '\036',
+'6', '\n', '4', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u',
+'t', 'e', 'M', 'a', 't', 'c', 'h', '.', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'M', 'a', 't', 'c', 'h', 'O', 'p',
+'t', 'i', 'o', 'n', 's', '\032', '\020', '\n', '\016', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r', ':', '$',
+'\232', '\305', '\210', '\036', '\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'R', 'o', 'u', 't', 'e', 'M', 'a', 't', 'c', 'h', 'B', '\025', '\n', '\016', 'p', 'a', 't', 'h', '_', 's', 'p', 'e', 'c', 'i',
+'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\005', '\020', '\006', 'J', '\004', '\010', '\003', '\020', '\004', 'R', '\005', 'r', 'e',
+'g', 'e', 'x', '\"', '\350', '\004', '\n', '\n', 'C', 'o', 'r', 's', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '_', '\n', '\031', 'a', 'l', 'l',
+'o', 'w', '_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 's', 't', 'r', 'i', 'n', 'g', '_', 'm', 'a', 't', 'c', 'h', '\030', '\013', ' ',
+'\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\026', 'a', 'l', 'l', 'o', 'w', 'O', 'r',
+'i', 'g', 'i', 'n', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', '\022', '#', '\n', '\r', 'a', 'l', 'l', 'o', 'w', '_',
+'m', 'e', 't', 'h', 'o', 'd', 's', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 'a', 'l', 'l', 'o', 'w', 'M', 'e', 't', 'h', 'o',
+'d', 's', '\022', '#', '\n', '\r', 'a', 'l', 'l', 'o', 'w', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\001', '(', '\t',
+'R', '\014', 'a', 'l', 'l', 'o', 'w', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '%', '\n', '\016', 'e', 'x', 'p', 'o', 's', 'e', '_',
+'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\r', 'e', 'x', 'p', 'o', 's', 'e', 'H', 'e', 'a', 'd',
+'e', 'r', 's', '\022', '\027', '\n', '\007', 'm', 'a', 'x', '_', 'a', 'g', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\006', 'm', 'a', 'x',
+'A', 'g', 'e', '\022', 'G', '\n', '\021', 'a', 'l', 'l', 'o', 'w', '_', 'c', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l', 's', '\030',
+'\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B',
+'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'a', 'l', 'l', 'o', 'w', 'C', 'r', 'e', 'd', 'e', 'n', 't', 'i', 'a', 'l',
+'s', '\022', 'W', '\n', '\016', 'f', 'i', 'l', 't', 'e', 'r', '_', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\t', ' ', '\001', '(', '\013',
+'2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R',
+'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'H', '\000',
+'R', '\r', 'f', 'i', 'l', 't', 'e', 'r', 'E', 'n', 'a', 'b', 'l', 'e', 'd', '\022', 'U', '\n', '\016', 's', 'h', 'a', 'd', 'o', 'w',
+'_', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030', '\n', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't',
+'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\r', 's', 'h', 'a', 'd', 'o', 'w', 'E', 'n', 'a', 'b', 'l',
+'e', 'd', ':', '$', '\232', '\305', '\210', '\036', '\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r',
+'o', 'u', 't', 'e', '.', 'C', 'o', 'r', 's', 'P', 'o', 'l', 'i', 'c', 'y', 'B', '\023', '\n', '\021', 'e', 'n', 'a', 'b', 'l', 'e',
+'d', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'J', '\004', '\010', '\001', '\020', '\002', 'J', '\004', '\010', '\010', '\020', '\t', 'J', '\004',
+'\010', '\007', '\020', '\010', 'R', '\014', 'a', 'l', 'l', 'o', 'w', '_', 'o', 'r', 'i', 'g', 'i', 'n', 'R', '\022', 'a', 'l', 'l', 'o', 'w',
+'_', 'o', 'r', 'i', 'g', 'i', 'n', '_', 'r', 'e', 'g', 'e', 'x', 'R', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\"', '\310', '&',
+'\n', '\013', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '\022', '#', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030',
+'\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r',
+'\022', '6', '\n', '\016', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'B',
+'\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'H', '\000', 'R', '\r', 'c', 'l', 'u', 's', 't', 'e', 'r',
+'H', 'e', 'a', 'd', 'e', 'r', '\022', 'U', '\n', '\021', 'w', 'e', 'i', 'g', 'h', 't', 'e', 'd', '_', 'c', 'l', 'u', 's', 't', 'e',
+'r', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r',
+'o', 'u', 't', 'e', '.', 'v', '3', '.', 'W', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', 'H', '\000',
+'R', '\020', 'w', 'e', 'i', 'g', 'h', 't', 'e', 'd', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '\216', '\001', '\n', '\037', 'c', 'l',
+'u', 's', 't', 'e', 'r', '_', 'n', 'o', 't', '_', 'f', 'o', 'u', 'n', 'd', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_',
+'c', 'o', 'd', 'e', '\030', '\024', ' ', '\001', '(', '\016', '2', '>', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'C', 'l', 'u',
+'s', 't', 'e', 'r', 'N', 'o', 't', 'F', 'o', 'u', 'n', 'd', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', 'B',
+'\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\033', 'c', 'l', 'u', 's', 't', 'e', 'r', 'N', 'o', 't', 'F', 'o', 'u', 'n',
+'d', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', '\022', 'E', '\n', '\016', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a',
+'_', 'm', 'a', 't', 'c', 'h', '\030', '\004', ' ', '\001', '(', '\013', '2', '\036', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'R', '\r', 'm', 'e', 't', 'a',
+'d', 'a', 't', 'a', 'M', 'a', 't', 'c', 'h', '\022', '2', '\n', '\016', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'e', 'w', 'r', 'i',
+'t', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\r', 'p', 'r',
+'e', 'f', 'i', 'x', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', 'S', '\n', '\r', 'r', 'e', 'g', 'e', 'x', '_', 'r', 'e', 'w', 'r',
+'i', 't', 'e', '\030', ' ', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a',
+'t', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b',
+'s', 't', 'i', 't', 'u', 't', 'e', 'R', '\014', 'r', 'e', 'g', 'e', 'x', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', '?', '\n', '\024',
+'h', 'o', 's', 't', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\030', '\006', ' ', '\001', '(',
+'\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'H', '\001', 'R', '\022', 'h', 'o', 's', 't', 'R', 'e', 'w',
+'r', 'i', 't', 'e', 'L', 'i', 't', 'e', 'r', 'a', 'l', '\022', 'H', '\n', '\021', 'a', 'u', 't', 'o', '_', 'h', 'o', 's', 't', '_',
+'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'H', '\001', 'R', '\017', 'a', 'u', 't', 'o', 'H',
+'o', 's', 't', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', '=', '\n', '\023', 'h', 'o', 's', 't', '_', 'r', 'e', 'w', 'r', 'i', 't',
+'e', '_', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\035', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\001', '\310',
+'\001', '\000', 'H', '\001', 'R', '\021', 'h', 'o', 's', 't', 'R', 'e', 'w', 'r', 'i', 't', 'e', 'H', 'e', 'a', 'd', 'e', 'r', '\022', 'g',
+'\n', '\027', 'h', 'o', 's', 't', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 'p', 'a', 't', 'h', '_', 'r', 'e', 'g', 'e', 'x',
+'\030', '#', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h',
+'e', 'r', '.', 'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b', 's', 't', 'i',
+'t', 'u', 't', 'e', 'H', '\001', 'R', '\024', 'h', 'o', 's', 't', 'R', 'e', 'w', 'r', 'i', 't', 'e', 'P', 'a', 't', 'h', 'R', 'e',
+'g', 'e', 'x', '\022', '3', '\n', '\007', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\010', ' ', '\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', '\007', 't',
+'i', 'm', 'e', 'o', 'u', 't', '\022', '<', '\n', '\014', 'i', 'd', 'l', 'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\030', ' ',
+'\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', '\013', 'i', 'd', 'l', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'E', '\n', '\014', 'r', 'e', 't',
+'r', 'y', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\t', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c',
+'y', 'R', '\013', 'r', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'O', '\n', '\031', 'r', 'e', 't', 'r', 'y', '_', 'p',
+'o', 'l', 'i', 'c', 'y', '_', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '!', ' ', '\001', '(', '\013', '2',
+'\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\026', 'r', 'e',
+'t', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', 'T', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'n', '\n', '\027', 'r',
+'e', 'q', 'u', 'e', 's', 't', '_', 'm', 'i', 'r', 'r', 'o', 'r', '_', 'p', 'o', 'l', 'i', 'c', 'i', 'e', 's', '\030', '\036', ' ',
+'\003', '(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.',
+'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', 'r',
+'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\025', 'r', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', 'r', 'r', 'o', 'r', 'P',
+'o', 'l', 'i', 'c', 'i', 'e', 's', '\022', 'K', '\n', '\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\013', ' ', '\001', '(', '\016',
+'2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R',
+'o', 'u', 't', 'i', 'n', 'g', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R',
+'\010', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', 'A', '\n', '\013', 'r', 'a', 't', 'e', '_', 'l', 'i', 'm', 'i', 't', 's', '\030',
+'\r', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't',
+'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'R', '\n', 'r', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't',
+'s', '\022', 'S', '\n', '\026', 'i', 'n', 'c', 'l', 'u', 'd', 'e', '_', 'v', 'h', '_', 'r', 'a', 't', 'e', '_', 'l', 'i', 'm', 'i',
+'t', 's', '\030', '\016', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'B', '\002', '\030', '\001', 'R', '\023', 'i', 'n', 'c', 'l', 'u', 'd', 'e', 'V',
+'h', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 's', '\022', 'N', '\n', '\013', 'h', 'a', 's', 'h', '_', 'p', 'o', 'l', 'i', 'c',
+'y', '\030', '\017', ' ', '\003', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o',
+'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o',
+'l', 'i', 'c', 'y', 'R', '\n', 'h', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '\022', '5', '\n', '\004', 'c', 'o', 'r', 's', '\030',
+'\021', ' ', '\001', '(', '\013', '2', '!', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't',
+'e', '.', 'v', '3', '.', 'C', 'o', 'r', 's', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\004', 'c', 'o', 'r', 's', '\022', 'G', '\n', '\020',
+'m', 'a', 'x', '_', 'g', 'r', 'p', 'c', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\027', ' ', '\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', 'B',
+'\002', '\030', '\001', 'R', '\016', 'm', 'a', 'x', 'G', 'r', 'p', 'c', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'M', '\n', '\023', 'g', 'r',
+'p', 'c', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '_', 'o', 'f', 'f', 's', 'e', 't', '\030', '\034', ' ', '\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',
+'B', '\002', '\030', '\001', 'R', '\021', 'g', 'r', 'p', 'c', 'T', 'i', 'm', 'e', 'o', 'u', 't', 'O', 'f', 'f', 's', 'e', 't', '\022', 'Y',
+'\n', '\017', 'u', 'p', 'g', 'r', 'a', 'd', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\031', ' ', '\003', '(', '\013', '2', '0',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o',
+'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016',
+'u', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', 'g', '\n', '\030', 'i', 'n', 't', 'e', 'r', 'n', 'a',
+'l', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\"', ' ', '\001', '(', '\013', '2', '-',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'I', 'n',
+'t', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\026', 'i', 'n', 't',
+'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'w', '\n', '\030', 'i', 'n',
+'t', 'e', 'r', 'n', 'a', 'l', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '_', 'a', 'c', 't', 'i', 'o', 'n', '\030', '\032', ' ',
+'\001', '(', '\016', '2', '9', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.',
+'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e',
+'d', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', 'B', '\002', '\030', '\001', 'R', '\026', 'i', 'n', 't', 'e', 'r', 'n', 'a',
+'l', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', '\022', 'V', '\n', '\026', 'm', 'a', 'x', '_', 'i', 'n',
+'t', 'e', 'r', 'n', 'a', 'l', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', 's', '\030', '\037', ' ', '\001', '(', '\013', '2', '\034', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l',
+'u', 'e', 'B', '\002', '\030', '\001', 'R', '\024', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i', 'r', 'e',
+'c', 't', 's', '\022', 'E', '\n', '\014', 'h', 'e', 'd', 'g', 'e', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\033', ' ', '\001', '(', '\013',
+'2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.',
+'H', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', 'R', '\013', 'h', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\022',
+'d', '\n', '\023', 'm', 'a', 'x', '_', 's', 't', 'r', 'e', 'a', 'm', '_', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '$', ' ',
+'\001', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.',
+'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'M', 'a', 'x', 'S', 't', 'r', 'e', 'a', 'm', 'D',
+'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', '\021', 'm', 'a', 'x', 'S', 't', 'r', 'e', 'a', 'm', 'D', 'u', 'r', 'a', 't', 'i', 'o',
+'n', '\032', '\242', '\002', '\n', '\023', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', 'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y',
+'\022', '!', '\n', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020',
+'\001', 'R', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', 'Y', '\n', '\020', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'f', 'r', 'a',
+'c', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n',
+'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'r', 'u', 'n', 't', 'i', 'm', 'e', 'F', 'r', 'a', 'c', 't', 'i', 'o',
+'n', '\022', '?', '\n', '\r', 't', 'r', 'a', 'c', 'e', '_', 's', 'a', 'm', 'p', 'l', 'e', 'd', '\030', '\004', ' ', '\001', '(', '\013', '2',
+'\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l',
+'u', 'e', 'R', '\014', 't', 'r', 'a', 'c', 'e', 'S', 'a', 'm', 'p', 'l', 'e', 'd', ':', '9', '\232', '\305', '\210', '\036', '4', '\n', '2',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A',
+'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'M', 'i', 'r', 'r', 'o', 'r', 'P', 'o', 'l', 'i', 'c', 'y',
+'J', '\004', '\010', '\002', '\020', '\003', 'R', '\013', 'r', 'u', 'n', 't', 'i', 'm', 'e', '_', 'k', 'e', 'y', '\032', '\226', '\n', '\n', '\n', 'H',
+'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'N', '\n', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013',
+'2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.',
+'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'H', 'e',
+'a', 'd', 'e', 'r', 'H', '\000', 'R', '\006', 'h', 'e', 'a', 'd', 'e', 'r', '\022', 'N', '\n', '\006', 'c', 'o', 'o', 'k', 'i', 'e', '\030',
+'\002', ' ', '\001', '(', '\013', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't',
+'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i',
+'c', 'y', '.', 'C', 'o', 'o', 'k', 'i', 'e', 'H', '\000', 'R', '\006', 'c', 'o', 'o', 'k', 'i', 'e', '\022', 'y', '\n', '\025', 'c', 'o',
+'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'p', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\030', '\003', ' ', '\001', '(', '\013',
+'2', 'B', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.',
+'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'C', 'o',
+'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', 'H', '\000', 'R', '\024', 'c', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'r', 'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\022', 'g', '\n', '\017', 'q', 'u', 'e', 'r',
+'y', '_', 'p', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\030', '\005', ' ', '\001', '(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't',
+'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm',
+'e', 't', 'e', 'r', 'H', '\000', 'R', '\016', 'q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\022', '^', '\n',
+'\014', 'f', 'i', 'l', 't', 'e', 'r', '_', 's', 't', 'a', 't', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '9', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'A',
+'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'F', 'i', 'l', 't', 'e', 'r', 'S', 't',
+'a', 't', 'e', 'H', '\000', 'R', '\013', 'f', 'i', 'l', 't', 'e', 'r', 'S', 't', 'a', 't', 'e', '\022', '\032', '\n', '\010', 't', 'e', 'r',
+'m', 'i', 'n', 'a', 'l', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\010', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l', '\032', '\306', '\001', '\n',
+'\006', 'H', 'e', 'a', 'd', 'e', 'r', '\022', '.', '\n', '\013', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ',
+'\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\n', 'h', 'e', 'a', 'd', 'e',
+'r', 'N', 'a', 'm', 'e', '\022', 'S', '\n', '\r', 'r', 'e', 'g', 'e', 'x', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', '\002', ' ',
+'\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't',
+'e', 'R', '\014', 'r', 'e', 'g', 'e', 'x', 'R', 'e', 'w', 'r', 'i', 't', 'e', ':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c',
+'t', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'H', 'e', 'a', 'd', 'e', 'r', '\032', '\237', '\001',
+'\n', '\006', 'C', 'o', 'o', 'k', 'i', 'e', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372',
+'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '+', '\n', '\003', 't', 't', 'l', '\030', '\002', ' ', '\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', '\003', 't', 't', 'l', '\022', '\022', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\004', 'p', 'a',
+'t', 'h', ':', '7', '\232', '\305', '\210', '\036', '2', '\n', '0', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r',
+'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i',
+'c', 'y', '.', 'C', 'o', 'o', 'k', 'i', 'e', '\032', 'z', '\n', '\024', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'r',
+'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\022', '\033', '\n', '\t', 's', 'o', 'u', 'r', 'c', 'e', '_', 'i', 'p', '\030', '\001', ' ', '\001',
+'(', '\010', 'R', '\010', 's', 'o', 'u', 'r', 'c', 'e', 'I', 'p', ':', 'E', '\232', '\305', '\210', '\036', '@', '\n', '>', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o',
+'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'P', 'r',
+'o', 'p', 'e', 'r', 't', 'i', 'e', 's', '\032', 'n', '\n', '\016', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e',
+'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R',
+'\004', 'n', 'a', 'm', 'e', ':', '?', '\232', '\305', '\210', '\036', ':', '\n', '8', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v',
+'2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P',
+'o', 'l', 'i', 'c', 'y', '.', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', '\032', 'f', '\n', '\013', 'F',
+'i', 'l', 't', 'e', 'r', 'S', 't', 'a', 't', 'e', '\022', '\031', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007',
+'\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\003', 'k', 'e', 'y', ':', '<', '\232', '\305', '\210', '\036', '7', '\n', '5', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o',
+'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'F', 'i', 'l', 't', 'e', 'r', 'S', 't', 'a', 't', 'e', ':',
+'0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't',
+'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'a', 's', 'h', 'P', 'o', 'l', 'i', 'c', 'y', 'B',
+'\027', '\n', '\020', 'p', 'o', 'l', 'i', 'c', 'y', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', '\032',
+'\243', '\003', '\n', '\r', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '0', '\n', '\014', 'u', 'p', 'g', 'r',
+'a', 'd', 'e', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300', '\001',
+'\002', '\310', '\001', '\000', 'R', '\013', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'T', 'y', 'p', 'e', '\022', '4', '\n', '\007', 'e', 'n', 'a', 'b',
+'l', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\022', 'e', '\n', '\016',
+'c', 'o', 'n', 'n', 'e', 'c', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '>', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e',
+'A', 'c', 't', 'i', 'o', 'n', '.', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '.', 'C', 'o', 'n', 'n',
+'e', 'c', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\r', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\032',
+'\215', '\001', '\n', '\r', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', ']', '\n', '\025', 'p', 'r', 'o', 'x',
+'y', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', ')',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'P', 'r', 'o',
+'x', 'y', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\023', 'p', 'r', 'o', 'x', 'y', 'P', 'r',
+'o', 't', 'o', 'c', 'o', 'l', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\035', '\n', '\n', 'a', 'l', 'l', 'o', 'w', '_', 'p', 'o', 's',
+'t', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\t', 'a', 'l', 'l', 'o', 'w', 'P', 'o', 's', 't', ':', '3', '\232', '\305', '\210', '\036', '.',
+'\n', ',', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't',
+'e', 'A', 'c', 't', 'i', 'o', 'n', '.', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\032', '\210', '\002', '\n',
+'\021', 'M', 'a', 'x', 'S', 't', 'r', 'e', 'a', 'm', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', 'I', '\n', '\023', 'm', 'a', 'x',
+'_', 's', 't', 'r', 'e', 'a', 'm', '_', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\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',
+'\021', 'm', 'a', 'x', 'S', 't', 'r', 'e', 'a', 'm', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', 'P', '\n', '\027', 'g', 'r', 'p',
+'c', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'm', 'a', 'x', '\030', '\002', ' ', '\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', 'g', 'r', 'p', 'c', 'T', 'i', 'm', 'e', 'o', 'u', 't', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 'x',
+'\022', 'V', '\n', '\032', 'g', 'r', 'p', 'c', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'o',
+'f', 'f', 's', 'e', 't', '\030', '\003', ' ', '\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', '\027', 'g', 'r', 'p', 'c', 'T', 'i', 'm', 'e', 'o', 'u',
+'t', 'H', 'e', 'a', 'd', 'e', 'r', 'O', 'f', 'f', 's', 'e', 't', '\"', 'E', '\n', '\033', 'C', 'l', 'u', 's', 't', 'e', 'r', 'N',
+'o', 't', 'F', 'o', 'u', 'n', 'd', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', '\022', '\027', '\n', '\023', 'S', 'E',
+'R', 'V', 'I', 'C', 'E', '_', 'U', 'N', 'A', 'V', 'A', 'I', 'L', 'A', 'B', 'L', 'E', '\020', '\000', '\022', '\r', '\n', '\t', 'N', 'O',
+'T', '_', 'F', 'O', 'U', 'N', 'D', '\020', '\001', '\"', '^', '\n', '\026', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i',
+'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', '\022', '\"', '\n', '\036', 'P', 'A', 'S', 'S', '_', 'T', 'H', 'R', 'O', 'U', 'G',
+'H', '_', 'I', 'N', 'T', 'E', 'R', 'N', 'A', 'L', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C', 'T', '\020', '\000', '\022', '\034', '\n', '\030',
+'H', 'A', 'N', 'D', 'L', 'E', '_', 'I', 'N', 'T', 'E', 'R', 'N', 'A', 'L', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C', 'T', '\020',
+'\001', '\032', '\002', '\030', '\001', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v',
+'2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'o', 'u', 't', 'e', 'A', 'c', 't', 'i', 'o', 'n', 'B', '\030', '\n', '\021', 'c', 'l',
+'u', 's', 't', 'e', 'r', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'B', '\030', '\n', '\026', 'h',
+'o', 's', 't', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'J', '\004', '\010', '\014',
+'\020', '\r', 'J', '\004', '\010', '\022', '\020', '\023', 'J', '\004', '\010', '\023', '\020', '\024', 'J', '\004', '\010', '\020', '\020', '\021', 'J', '\004', '\010', '\026', '\020',
+'\027', 'J', '\004', '\010', '\025', '\020', '\026', 'J', '\004', '\010', '\n', '\020', '\013', 'R', '\025', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'm', 'i',
+'r', 'r', 'o', 'r', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\"', '\215', '\017', '\n', '\013', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i',
+'c', 'y', '\022', '\031', '\n', '\010', 'r', 'e', 't', 'r', 'y', '_', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'r', 'e', 't',
+'r', 'y', 'O', 'n', '\022', 'R', '\n', '\013', 'n', 'u', 'm', '_', 'r', 'e', 't', 'r', 'i', 'e', 's', '\030', '\002', ' ', '\001', '(', '\013',
+'2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2',
+'V', 'a', 'l', 'u', 'e', 'B', '\023', '\362', '\230', '\376', '\217', '\005', '\r', '\n', '\013', 'm', 'a', 'x', '_', 'r', 'e', 't', 'r', 'i', 'e',
+'s', 'R', '\n', 'n', 'u', 'm', 'R', 'e', 't', 'r', 'i', 'e', 's', '\022', 'A', '\n', '\017', 'p', 'e', 'r', '_', 't', 'r', 'y', '_',
+'t', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\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', '\r', 'p', 'e', 'r', 'T', 'r', 'y', 'T', 'i',
+'m', 'e', 'o', 'u', 't', '\022', 'W', '\n', '\016', 'r', 'e', 't', 'r', 'y', '_', 'p', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\030', '\004',
+' ', '\001', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'v', '3', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'P', 'r', 'i', 'o',
+'r', 'i', 't', 'y', 'R', '\r', 'r', 'e', 't', 'r', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', 'g', '\n', '\024', 'r', 'e',
+'t', 'r', 'y', '_', 'h', 'o', 's', 't', '_', 'p', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '\030', '\005', ' ', '\003', '(', '\013', '2',
+'5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R',
+'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i',
+'c', 'a', 't', 'e', 'R', '\022', 'r', 'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', '\022',
+'H', '\n', '!', 'h', 'o', 's', 't', '_', 's', 'e', 'l', 'e', 'c', 't', 'i', 'o', 'n', '_', 'r', 'e', 't', 'r', 'y', '_', 'm',
+'a', 'x', '_', 'a', 't', 't', 'e', 'm', 'p', 't', 's', '\030', '\006', ' ', '\001', '(', '\003', 'R', '\035', 'h', 'o', 's', 't', 'S', 'e',
+'l', 'e', 'c', 't', 'i', 'o', 'n', 'R', 'e', 't', 'r', 'y', 'M', 'a', 'x', 'A', 't', 't', 'e', 'm', 'p', 't', 's', '\022', '4',
+'\n', '\026', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', '_', 's', 't', 'a', 't', 'u', 's', '_', 'c', 'o', 'd', 'e', 's', '\030',
+'\007', ' ', '\003', '(', '\r', 'R', '\024', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', 'S', 't', 'a', 't', 'u', 's', 'C', 'o', 'd',
+'e', 's', '\022', 'U', '\n', '\016', 'r', 'e', 't', 'r', 'y', '_', 'b', 'a', 'c', 'k', '_', 'o', 'f', 'f', '\030', '\010', ' ', '\001', '(',
+'\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3',
+'.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f',
+'R', '\014', 'r', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', '\022', 'x', '\n', '\033', 'r', 'a', 't', 'e', '_', 'l', 'i',
+'m', 'i', 't', 'e', 'd', '_', 'r', 'e', 't', 'r', 'y', '_', 'b', 'a', 'c', 'k', '_', 'o', 'f', 'f', '\030', '\013', ' ', '\001', '(',
+'\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3',
+'.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'e', 'd', 'R',
+'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', 'R', '\027', 'r', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'e', 'd', 'R',
+'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', '\022', 'Q', '\n', '\021', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', '_',
+'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\t', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e',
+'r', 'R', '\020', 'r', 'e', 't', 'r', 'i', 'a', 'b', 'l', 'e', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '`', '\n', '\031', 'r', 'e',
+'t', 'r', 'i', 'a', 'b', 'l', 'e', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\n',
+' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\027', 'r', 'e', 't', 'r', 'i', 'a',
+'b', 'l', 'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\032', '\271', '\001', '\n', '\r', 'R', 'e', 't',
+'r', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't', 'y', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c',
+'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '3',
+'\232', '\305', '\210', '\036', '.', '\n', ',', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'P', 'r', 'i', 'o', 'r', 'i', 't',
+'y', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c',
+'o', 'n', 'f', 'i', 'g', '\032', '\303', '\001', '\n', '\022', 'R', 'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i', 'c',
+'a', 't', 'e', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020',
+'\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003',
+' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n',
+'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '8', '\232', '\305', '\210', '\036', '3', '\n', '1',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 't', 'r', 'y', 'P',
+'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'H', 'o', 's', 't', 'P', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 'B',
+'\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n',
+'f', 'i', 'g', '\032', '\326', '\001', '\n', '\014', 'R', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', '\022', 'J', '\n', '\r', 'b',
+'a', 's', 'e', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\001', ' ', '\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', 'B', '\n', '\372', 'B', '\007',
+'\252', '\001', '\004', '\010', '\001', '*', '\000', 'R', '\014', 'b', 'a', 's', 'e', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', 'F', '\n', '\014',
+'m', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\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', 'B', '\010', '\372', 'B', '\005',
+'\252', '\001', '\002', '*', '\000', 'R', '\013', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', ':', '2', '\232', '\305', '\210', '\036', '-',
+'\n', '+', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 't', 'r',
+'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', '\032', '\210', '\001', '\n', '\013',
+'R', 'e', 's', 'e', 't', 'H', 'e', 'a', 'd', 'e', 'r', '\022', '!', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t',
+'B', '\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'V', '\n', '\006',
+'f', 'o', 'r', 'm', 'a', 't', '\030', '\002', ' ', '\001', '(', '\016', '2', '4', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R',
+'e', 's', 'e', 't', 'H', 'e', 'a', 'd', 'e', 'r', 'F', 'o', 'r', 'm', 'a', 't', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020',
+'\001', 'R', '\006', 'f', 'o', 'r', 'm', 'a', 't', '\032', '\300', '\001', '\n', '\027', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'e', 'd',
+'R', 'e', 't', 'r', 'y', 'B', 'a', 'c', 'k', 'O', 'f', 'f', '\022', ']', '\n', '\r', 'r', 'e', 's', 'e', 't', '_', 'h', 'e', 'a',
+'d', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '.', 'R', 'e', 's',
+'e', 't', 'H', 'e', 'a', 'd', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\014', 'r', 'e', 's', 'e', 't',
+'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', 'F', '\n', '\014', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002',
+' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'R', '\013', 'm', 'a', 'x', 'I', 'n', 't', 'e',
+'r', 'v', 'a', 'l', '\"', '4', '\n', '\021', 'R', 'e', 's', 'e', 't', 'H', 'e', 'a', 'd', 'e', 'r', 'F', 'o', 'r', 'm', 'a', 't',
+'\022', '\013', '\n', '\007', 'S', 'E', 'C', 'O', 'N', 'D', 'S', '\020', '\000', '\022', '\022', '\n', '\016', 'U', 'N', 'I', 'X', '_', 'T', 'I', 'M',
+'E', 'S', 'T', 'A', 'M', 'P', '\020', '\001', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 't', 'r', 'y', 'P', 'o', 'l', 'i', 'c', 'y', '\"', '\234', '\002',
+'\n', '\013', 'H', 'e', 'd', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\022', 'P', '\n', '\020', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_',
+'r', 'e', 'q', 'u', 'e', 's', 't', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*',
+'\002', '(', '\001', 'R', '\017', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 's', '\022', '\\', '\n', '\031', 'a',
+'d', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'c', 'h', 'a', 'n', 'c', 'e', '\030',
+'\002', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a',
+'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\027', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a',
+'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 'C', 'h', 'a', 'n', 'c', 'e', '\022', '6', '\n', '\030', 'h', 'e', 'd', 'g', 'e', '_', 'o',
+'n', '_', 'p', 'e', 'r', '_', 't', 'r', 'y', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\024',
+'h', 'e', 'd', 'g', 'e', 'O', 'n', 'P', 'e', 'r', 'T', 'r', 'y', 'T', 'i', 'm', 'e', 'o', 'u', 't', ':', '%', '\232', '\305', '\210',
+'\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', 'e',
+'d', 'g', 'e', 'P', 'o', 'l', 'i', 'c', 'y', '\"', '\341', '\005', '\n', '\016', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't',
+'i', 'o', 'n', '\022', '\'', '\n', '\016', 'h', 't', 't', 'p', 's', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\004', ' ', '\001',
+'(', '\010', 'H', '\000', 'R', '\r', 'h', 't', 't', 'p', 's', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', ')', '\n', '\017', 's', 'c',
+'h', 'e', 'm', 'e', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\007', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\016', 's', 'c',
+'h', 'e', 'm', 'e', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', '0', '\n', '\r', 'h', 'o', 's', 't', '_', 'r', 'e', 'd', 'i',
+'r', 'e', 'c', 't', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\014',
+'h', 'o', 's', 't', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022', '#', '\n', '\r', 'p', 'o', 'r', 't', '_', 'r', 'e', 'd', 'i',
+'r', 'e', 'c', 't', '\030', '\010', ' ', '\001', '(', '\r', 'R', '\014', 'p', 'o', 'r', 't', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\022',
+'2', '\n', '\r', 'p', 'a', 't', 'h', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\013', '\372',
+'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'H', '\001', 'R', '\014', 'p', 'a', 't', 'h', 'R', 'e', 'd', 'i', 'r', 'e', 'c',
+'t', '\022', '4', '\n', '\016', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', '\005', ' ', '\001', '(', '\t',
+'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'H', '\001', 'R', '\r', 'p', 'r', 'e', 'f', 'i', 'x', 'R', 'e',
+'w', 'r', 'i', 't', 'e', '\022', 'U', '\n', '\r', 'r', 'e', 'g', 'e', 'x', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '\030', '\t', ' ',
+'\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't',
+'e', 'H', '\001', 'R', '\014', 'r', 'e', 'g', 'e', 'x', 'R', 'e', 'w', 'r', 'i', 't', 'e', '\022', 'i', '\n', '\r', 'r', 'e', 's', 'p',
+'o', 'n', 's', 'e', '_', 'c', 'o', 'd', 'e', '\030', '\003', ' ', '\001', '(', '\016', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c',
+'t', 'i', 'o', 'n', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e',
+'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\014', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', '\022',
+'\037', '\n', '\013', 's', 't', 'r', 'i', 'p', '_', 'q', 'u', 'e', 'r', 'y', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\n', 's', 't', 'r',
+'i', 'p', 'Q', 'u', 'e', 'r', 'y', '\"', 'w', '\n', '\024', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n',
+'s', 'e', 'C', 'o', 'd', 'e', '\022', '\025', '\n', '\021', 'M', 'O', 'V', 'E', 'D', '_', 'P', 'E', 'R', 'M', 'A', 'N', 'E', 'N', 'T',
+'L', 'Y', '\020', '\000', '\022', '\t', '\n', '\005', 'F', 'O', 'U', 'N', 'D', '\020', '\001', '\022', '\r', '\n', '\t', 'S', 'E', 'E', '_', 'O', 'T',
+'H', 'E', 'R', '\020', '\002', '\022', '\026', '\n', '\022', 'T', 'E', 'M', 'P', 'O', 'R', 'A', 'R', 'Y', '_', 'R', 'E', 'D', 'I', 'R', 'E',
+'C', 'T', '\020', '\003', '\022', '\026', '\n', '\022', 'P', 'E', 'R', 'M', 'A', 'N', 'E', 'N', 'T', '_', 'R', 'E', 'D', 'I', 'R', 'E', 'C',
+'T', '\020', '\004', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.',
+'r', 'o', 'u', 't', 'e', '.', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'A', 'c', 't', 'i', 'o', 'n', 'B', '\032', '\n', '\030', 's',
+'c', 'h', 'e', 'm', 'e', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'B', '\030',
+'\n', '\026', 'p', 'a', 't', 'h', '_', 'r', 'e', 'w', 'r', 'i', 't', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\"',
+'\240', '\001', '\n', '\024', 'D', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'A', 'c', 't', 'i', 'o', 'n', '\022',
+'\"', '\n', '\006', 's', 't', 'a', 't', 'u', 's', '\030', '\001', ' ', '\001', '(', '\r', 'B', '\n', '\372', 'B', '\007', '*', '\005', '\020', '\330', '\004',
+'(', 'd', 'R', '\006', 's', 't', 'a', 't', 'u', 's', '\022', '4', '\n', '\004', 'b', 'o', 'd', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2',
+' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a',
+'t', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\004', 'b', 'o', 'd', 'y', ':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'D', 'i', 'r', 'e', 'c', 't', 'R', 'e',
+'s', 'p', 'o', 'n', 's', 'e', 'A', 'c', 't', 'i', 'o', 'n', '\"', '\221', '\001', '\n', '\t', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'o',
+'r', '\022', '%', '\n', '\t', 'o', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'R', '\t', 'o', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', '\022', '8', '\n', '\t', 'p', 'r', 'o', 'p', 'a', 'g',
+'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\t', 'p', 'r', 'o', 'p', 'a', 'g', 'a', 't', 'e', ':', '#',
+'\232', '\305', '\210', '\036', '\036', '\n', '\034', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'D', 'e', 'c', 'o', 'r', 'a', 't', 'o', 'r', '\"', '\322', '\002', '\n', '\007', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '\022', 'I', '\n',
+'\017', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.',
+'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P',
+'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'c', 'l', 'i', 'e', 'n', 't', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022', 'I', '\n',
+'\017', 'r', 'a', 'n', 'd', 'o', 'm', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', ' ', '.',
+'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P',
+'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'r', 'a', 'n', 'd', 'o', 'm', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022', 'K', '\n',
+'\020', 'o', 'v', 'e', 'r', 'a', 'l', 'l', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', ' ',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l',
+'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'o', 'v', 'e', 'r', 'a', 'l', 'l', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022',
+'A', '\n', '\013', 'c', 'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n',
+'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', '.', 'C', 'u', 's', 't', 'o',
+'m', 'T', 'a', 'g', 'R', '\n', 'c', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 's', ':', '!', '\232', '\305', '\210', '\036', '\034', '\n', '\032',
+'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'T', 'r', 'a', 'c', 'i', 'n',
+'g', '\"', '\264', '\001', '\n', '\016', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', '>', '\n', '\007', 'h',
+'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r',
+'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007',
+'\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', ':', '(', '\232', '\305', '\210', '\036', '#', '\n', '!', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'C', 'l',
+'u', 's', 't', 'e', 'r', 'J', '\004', '\010', '\001', '\020', '\002', 'J', '\004', '\010', '\003', '\020', '\004', 'R', '\007', 'p', 'a', 't', 't', 'e', 'r',
+'n', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\"', '\241', '\026', '\n', '\t', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '\022', ';',
+'\n', '\005', 's', 't', 'a', 'g', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\372', 'B', '\004', '*', '\002',
+'\030', '\n', 'R', '\005', 's', 't', 'a', 'g', 'e', '\022', '\037', '\n', '\013', 'd', 'i', 's', 'a', 'b', 'l', 'e', '_', 'k', 'e', 'y', '\030',
+'\002', ' ', '\001', '(', '\t', 'R', '\n', 'd', 'i', 's', 'a', 'b', 'l', 'e', 'K', 'e', 'y', '\022', 'K', '\n', '\007', 'a', 'c', 't', 'i',
+'o', 'n', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n',
+'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\007', 'a', 'c', 't', 'i', 'o', 'n', 's', '\022', '?', '\n', '\005', 'l', 'i',
+'m', 'i', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'O', 'v', 'e', 'r', 'r', 'i',
+'d', 'e', 'R', '\005', 'l', 'i', 'm', 'i', 't', '\032', '\215', '\022', '\n', '\006', 'A', 'c', 't', 'i', 'o', 'n', '\022', '^', '\n', '\016', 's',
+'o', 'u', 'r', 'c', 'e', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '5', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i',
+'m', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'l', 'u', 's', 't', 'e', 'r', 'H',
+'\000', 'R', '\r', 's', 'o', 'u', 'r', 'c', 'e', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022', 'm', '\n', '\023', 'd', 'e', 's', 't', 'i',
+'n', 'a', 't', 'i', 'o', 'n', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\013', '2', ':', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L',
+'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'D', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'C', 'l',
+'u', 's', 't', 'e', 'r', 'H', '\000', 'R', '\022', 'd', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'C', 'l', 'u', 's', 't',
+'e', 'r', '\022', 'a', '\n', '\017', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\001',
+'(', '\013', '2', '6', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v',
+'3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'q', 'u', 'e', 's',
+'t', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'H', '\000', 'R', '\016', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r',
+'s', '\022', '^', '\n', '\016', 'r', 'e', 'm', 'o', 't', 'e', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '\030', '\004', ' ', '\001', '(', '\013',
+'2', '5', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.',
+'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd',
+'d', 'r', 'e', 's', 's', 'H', '\000', 'R', '\r', 'r', 'e', 'm', 'o', 't', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', 'U', '\n',
+'\013', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 'k', 'e', 'y', '\030', '\005', ' ', '\001', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm',
+'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', 'H', '\000', 'R', '\n', 'g',
+'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', '\022', 'h', '\n', '\022', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'v', 'a', 'l', 'u', 'e',
+'_', 'm', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't',
+'i', 'o', 'n', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'H', '\000', 'R', '\020', 'h',
+'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', '\022', 'n', '\n', '\020', 'd', 'y', 'n', 'a', 'm', 'i',
+'c', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\007', ' ', '\001', '(', '\013', '2', '7', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't',
+'.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'M', 'e', 't', 'a', 'D', 'a', 't', 'a', 'B', '\010',
+'\030', '\001', '\270', '\356', '\362', '\322', '\005', '\001', 'H', '\000', 'R', '\017', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'M', 'e', 't', 'a', 'd', 'a',
+'t', 'a', '\022', 'N', '\n', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\010', ' ', '\001', '(', '\013', '2', '0', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L',
+'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'M', 'e', 't', 'a', 'D', 'a', 't', 'a', 'H', '\000', 'R', '\010', 'm',
+'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'J', '\n', '\t', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\t', ' ', '\001', '(',
+'\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\000', 'R', '\t', 'e',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\032', 'I', '\n', '\r', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'l', 'u', 's', 't', 'e', 'r',
+':', '8', '\232', '\305', '\210', '\036', '3', '\n', '1', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u',
+'t', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'S', 'o', 'u', 'r', 'c',
+'e', 'C', 'l', 'u', 's', 't', 'e', 'r', '\032', 'S', '\n', '\022', 'D', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'C', 'l',
+'u', 's', 't', 'e', 'r', ':', '=', '\232', '\305', '\210', '\036', '8', '\n', '6', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v',
+'2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.',
+'D', 'e', 's', 't', 'i', 'n', 'a', 't', 'i', 'o', 'n', 'C', 'l', 'u', 's', 't', 'e', 'r', '\032', '\321', '\001', '\n', '\016', 'R', 'e',
+'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '.', '\n', '\013', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'n', 'a',
+'m', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\n',
+'h', 'e', 'a', 'd', 'e', 'r', 'N', 'a', 'm', 'e', '\022', '.', '\n', '\016', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_',
+'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\r', 'd', 'e', 's', 'c', 'r',
+'i', 'p', 't', 'o', 'r', 'K', 'e', 'y', '\022', '$', '\n', '\016', 's', 'k', 'i', 'p', '_', 'i', 'f', '_', 'a', 'b', 's', 'e', 'n',
+'t', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\014', 's', 'k', 'i', 'p', 'I', 'f', 'A', 'b', 's', 'e', 'n', 't', ':', '9', '\232', '\305',
+'\210', '\036', '4', '\n', '2', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R',
+'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e',
+'a', 'd', 'e', 'r', 's', '\032', 'I', '\n', '\r', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', ':', '8', '\232',
+'\305', '\210', '\036', '3', '\n', '1', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.',
+'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd',
+'d', 'r', 'e', 's', 's', '\032', '\236', '\001', '\n', '\n', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', '\022', '2', '\n', '\020', 'd',
+'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B',
+'\004', 'r', '\002', '\020', '\001', 'R', '\017', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'V', 'a', 'l', 'u', 'e', '\022', '%', '\n',
+'\016', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\r', 'd', 'e',
+'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'K', 'e', 'y', ':', '5', '\232', '\305', '\210', '\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A',
+'c', 't', 'i', 'o', 'n', '.', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'K', 'e', 'y', '\032', '\214', '\002', '\n', '\020', 'H', 'e', 'a', 'd',
+'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', '\022', '2', '\n', '\020', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o',
+'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\017', 'd',
+'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'V', 'a', 'l', 'u', 'e', '\022', '=', '\n', '\014', 'e', 'x', 'p', 'e', 'c', 't', '_',
+'m', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\013', 'e', 'x', 'p', 'e', 'c', 't', 'M', 'a', 't',
+'c', 'h', '\022', 'H', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r',
+'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r',
+'s', ':', ';', '\232', '\305', '\210', '\036', '6', '\n', '4', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o',
+'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'H', 'e', 'a', 'd',
+'e', 'r', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', '\032', '\270', '\001', '\n', '\017', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'M',
+'e', 't', 'a', 'D', 'a', 't', 'a', '\022', '.', '\n', '\016', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'k', 'e', 'y',
+'\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\r', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't',
+'o', 'r', 'K', 'e', 'y', '\022', 'P', '\n', '\014', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001',
+'(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.',
+'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R',
+'\013', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v',
+'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\032',
+'\264', '\002', '\n', '\010', 'M', 'e', 't', 'a', 'D', 'a', 't', 'a', '\022', '.', '\n', '\016', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o',
+'r', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\r', 'd', 'e', 's',
+'c', 'r', 'i', 'p', 't', 'o', 'r', 'K', 'e', 'y', '\022', 'P', '\n', '\014', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'k', 'e',
+'y', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a',
+'d', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', 'B', '\010', '\372', 'B', '\005', '\212',
+'\001', '\002', '\020', '\001', 'R', '\013', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a',
+'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V',
+'a', 'l', 'u', 'e', '\022', 'Y', '\n', '\006', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\004', ' ', '\001', '(', '\016', '2', '7', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L',
+'i', 'm', 'i', 't', '.', 'A', 'c', 't', 'i', 'o', 'n', '.', 'M', 'e', 't', 'a', 'D', 'a', 't', 'a', '.', 'S', 'o', 'u', 'r',
+'c', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\006', 's', 'o', 'u', 'r', 'c', 'e', '\"', '&', '\n', '\006', 'S',
+'o', 'u', 'r', 'c', 'e', '\022', '\013', '\n', '\007', 'D', 'Y', 'N', 'A', 'M', 'I', 'C', '\020', '\000', '\022', '\017', '\n', '\013', 'R', 'O', 'U',
+'T', 'E', '_', 'E', 'N', 'T', 'R', 'Y', '\020', '\001', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.',
+'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'A', 'c',
+'t', 'i', 'o', 'n', 'B', '\027', '\n', '\020', 'a', 'c', 't', 'i', 'o', 'n', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022',
+'\003', '\370', 'B', '\001', '\032', '\362', '\001', '\n', '\010', 'O', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\022', 'f', '\n', '\020', 'd', 'y', 'n', 'a',
+'m', 'i', 'c', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\030', '\001', ' ', '\001', '(', '\013', '2', '9', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm',
+'i', 't', '.', 'O', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '.', 'D', 'y', 'n', 'a', 'm', 'i', 'c', 'M', 'e', 't', 'a', 'd', 'a',
+'t', 'a', 'H', '\000', 'R', '\017', 'd', 'y', 'n', 'a', 'm', 'i', 'c', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\032', 'c', '\n', '\017',
+'D', 'y', 'n', 'a', 'm', 'i', 'c', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', '\022', 'P', '\n', '\014', 'm', 'e', 't', 'a', 'd', 'a',
+'t', 'a', '_', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', 'B',
+'\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\013', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', 'B', '\031', '\n',
+'\022', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', ':',
+'#', '\232', '\305', '\210', '\036', '\036', '\n', '\034', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't',
+'e', '.', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '\"', '\236', '\004', '\n', '\r', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't',
+'c', 'h', 'e', 'r', '\022', '!', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010',
+'\020', '\001', '\300', '\001', '\001', '\310', '\001', '\000', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '!', '\n', '\013', 'e', 'x', 'a', 'c', 't', '_', 'm',
+'a', 't', 'c', 'h', '\030', '\004', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\n', 'e', 'x', 'a', 'c', 't', 'M', 'a', 't', 'c', 'h', '\022',
+'O', '\n', '\020', 's', 'a', 'f', 'e', '_', 'r', 'e', 'g', 'e', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\013', ' ', '\001', '(', '\013',
+'2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.',
+'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\016', 's', 'a', 'f', 'e', 'R', 'e', 'g', 'e', 'x',
+'M', 'a', 't', 'c', 'h', '\022', '<', '\n', '\013', 'r', 'a', 'n', 'g', 'e', '_', 'm', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(',
+'\013', '2', '\031', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'I', 'n', 't', '6', '4', 'R', 'a',
+'n', 'g', 'e', 'H', '\000', 'R', '\n', 'r', 'a', 'n', 'g', 'e', 'M', 'a', 't', 'c', 'h', '\022', '%', '\n', '\r', 'p', 'r', 'e', 's',
+'e', 'n', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\007', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\014', 'p', 'r', 'e', 's', 'e', 'n',
+'t', 'M', 'a', 't', 'c', 'h', '\022', ',', '\n', '\014', 'p', 'r', 'e', 'f', 'i', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\t', ' ',
+'\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\013', 'p', 'r', 'e', 'f', 'i', 'x', 'M', 'a', 't',
+'c', 'h', '\022', ',', '\n', '\014', 's', 'u', 'f', 'f', 'i', 'x', '_', 'm', 'a', 't', 'c', 'h', '\030', '\n', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\013', 's', 'u', 'f', 'f', 'i', 'x', 'M', 'a', 't', 'c', 'h', '\022', '0',
+'\n', '\016', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '_', 'm', 'a', 't', 'c', 'h', '\030', '\014', ' ', '\001', '(', '\t', 'B', '\007', '\372',
+'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\r', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', 'M', 'a', 't', 'c', 'h', '\022', '!',
+'\n', '\014', 'i', 'n', 'v', 'e', 'r', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\010', ' ', '\001', '(', '\010', 'R', '\013', 'i', 'n', 'v',
+'e', 'r', 't', 'M', 'a', 't', 'c', 'h', ':', '\'', '\232', '\305', '\210', '\036', '\"', '\n', ' ', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B',
+'\030', '\n', '\026', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'm', 'a', 't', 'c', 'h', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r',
+'J', '\004', '\010', '\002', '\020', '\003', 'J', '\004', '\010', '\003', '\020', '\004', 'J', '\004', '\010', '\005', '\020', '\006', 'R', '\013', 'r', 'e', 'g', 'e', 'x',
+'_', 'm', 'a', 't', 'c', 'h', '\"', '\241', '\002', '\n', '\025', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r',
+'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '\036', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\n', '\372', 'B',
+'\007', 'r', '\005', '\020', '\001', '(', '\200', '\010', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'S', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_',
+'m', 'a', 't', 'c', 'h', '\030', '\005', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.',
+'m', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B',
+'\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', '\022',
+'%', '\n', '\r', 'p', 'r', 'e', 's', 'e', 'n', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(', '\010', 'H', '\000', 'R',
+'\014', 'p', 'r', 'e', 's', 'e', 'n', 't', 'M', 'a', 't', 'c', 'h', ':', '/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'r', 'o', 'u', 't', 'e', '.', 'Q', 'u', 'e', 'r', 'y', 'P', 'a', 'r', 'a',
+'m', 'e', 't', 'e', 'r', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '!', '\n', '\037', 'q', 'u', 'e', 'r', 'y', '_', 'p', 'a', 'r',
+'a', 'm', 'e', 't', 'e', 'r', '_', 'm', 'a', 't', 'c', 'h', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'J', '\004', '\010',
+'\003', '\020', '\004', 'J', '\004', '\010', '\004', '\020', '\005', 'R', '\005', 'v', 'a', 'l', 'u', 'e', 'R', '\005', 'r', 'e', 'g', 'e', 'x', '\"', '\271',
+'\002', '\n', '\026', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'P', 'o', 'l', 'i', 'c', 'y',
+'\022', 'R', '\n', '\026', 'm', 'a', 'x', '_', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', '_', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't',
+'s', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\024', 'm', 'a', 'x', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l',
+'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', 's', '\022', '@', '\n', '\027', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', '_', 'r', 'e', 's',
+'p', 'o', 'n', 's', 'e', '_', 'c', 'o', 'd', 'e', 's', '\030', '\002', ' ', '\003', '(', '\r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002',
+'\020', '\005', 'R', '\025', 'r', 'e', 'd', 'i', 'r', 'e', 'c', 't', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'C', 'o', 'd', 'e', 's',
+'\022', 'J', '\n', '\n', 'p', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '*', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\n', 'p', 'r', 'e', 'd', 'i', 'c', 'a', 't', 'e',
+'s', '\022', '=', '\n', '\033', 'a', 'l', 'l', 'o', 'w', '_', 'c', 'r', 'o', 's', 's', '_', 's', 'c', 'h', 'e', 'm', 'e', '_', 'r',
+'e', 'd', 'i', 'r', 'e', 'c', 't', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\030', 'a', 'l', 'l', 'o', 'w', 'C', 'r', 'o', 's', 's',
+'S', 'c', 'h', 'e', 'm', 'e', 'R', 'e', 'd', 'i', 'r', 'e', 'c', 't', '\"', ']', '\n', '\014', 'F', 'i', 'l', 't', 'e', 'r', 'C',
+'o', 'n', 'f', 'i', 'g', '\022', ',', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\006', 'c', 'o', 'n', 'f', 'i',
+'g', '\022', '\037', '\n', '\013', 'i', 's', '_', 'o', 'p', 't', 'i', 'o', 'n', 'a', 'l', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\n', 'i',
+'s', 'O', 'p', 't', 'i', 'o', 'n', 'a', 'l', 'B', 'E', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x',
+'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', 'B', '\024',
+'R', 'o', 'u', 't', 'e', 'C', 'o', 'm', 'p', 'o', 'n', 'e', 'n', 't', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310',
+'\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[18] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_config_core_v3_proxy_protocol_proto_upbdefinit,
+ &envoy_type_matcher_v3_regex_proto_upbdefinit,
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &envoy_type_metadata_v3_metadata_proto_upbdefinit,
+ &envoy_type_tracing_v3_custom_tag_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &envoy_type_v3_range_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &envoy_annotations_deprecation_proto_upbdefinit,
+ &udpa_annotations_migrate_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_route_v3_route_components_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/route/v3/route_components.proto",
+ UPB_STRVIEW_INIT(descriptor, 19463)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h
new file mode 100644
index 00000000000..a3cce451d37
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h
@@ -0,0 +1,290 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/route/v3/route_components.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ROUTE_V3_ROUTE_COMPONENTS_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ROUTE_V3_ROUTE_COMPONENTS_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_def_init envoy_config_route_v3_route_components_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_VirtualHost_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.VirtualHost");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.VirtualHost.TypedPerFilterConfigEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_FilterAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.FilterAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_Route_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.Route");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_Route_TypedPerFilterConfigEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.Route.TypedPerFilterConfigEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_WeightedCluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.WeightedCluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_WeightedCluster_ClusterWeight_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.WeightedCluster.ClusterWeight");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.WeightedCluster.ClusterWeight.TypedPerFilterConfigEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteMatch_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteMatch");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteMatch_GrpcRouteMatchOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteMatch.GrpcRouteMatchOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteMatch_TlsContextMatchOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteMatch.TlsContextMatchOptions");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteMatch_ConnectMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteMatch.ConnectMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_CorsPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.CorsPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_RequestMirrorPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.RequestMirrorPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_HashPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.HashPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_HashPolicy_Header_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.HashPolicy.Header");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_HashPolicy_Cookie_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.HashPolicy.Cookie");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_HashPolicy_ConnectionProperties_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.HashPolicy.ConnectionProperties");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_HashPolicy_QueryParameter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.HashPolicy.QueryParameter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_HashPolicy_FilterState_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.HashPolicy.FilterState");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_UpgradeConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.UpgradeConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_UpgradeConfig_ConnectConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.UpgradeConfig.ConnectConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RouteAction_MaxStreamDuration_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RouteAction.MaxStreamDuration");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RetryPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RetryPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RetryPolicy_RetryPriority_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RetryPolicy.RetryPriority");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RetryPolicy_RetryHostPredicate_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RetryPolicy.RetryHostPredicate");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RetryPolicy_RetryBackOff_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RetryPolicy.RetryBackOff");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RetryPolicy_ResetHeader_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RetryPolicy.ResetHeader");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RetryPolicy_RateLimitedRetryBackOff_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RetryPolicy.RateLimitedRetryBackOff");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_HedgePolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.HedgePolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RedirectAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RedirectAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_DirectResponseAction_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.DirectResponseAction");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_Decorator_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.Decorator");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_Tracing_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.Tracing");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_VirtualCluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.VirtualCluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_SourceCluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.SourceCluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_DestinationCluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.DestinationCluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_RequestHeaders_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.RequestHeaders");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_RemoteAddress_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.RemoteAddress");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_GenericKey_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.GenericKey");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_HeaderValueMatch_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.HeaderValueMatch");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_DynamicMetaData_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.DynamicMetaData");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Action_MetaData_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Action.MetaData");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Override_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Override");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_RateLimit_Override_DynamicMetadata_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.RateLimit.Override.DynamicMetadata");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_HeaderMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.HeaderMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_QueryParameterMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.QueryParameterMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_InternalRedirectPolicy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.InternalRedirectPolicy");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_FilterConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_route_components_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.FilterConfig");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ROUTE_V3_ROUTE_COMPONENTS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c
new file mode 100644
index 00000000000..202945e8f19
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c
@@ -0,0 +1,71 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/route/v3/scoped_route.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/route/v3/scoped_route.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_route_v3_ScopedRouteConfiguration_msginit;
+extern const upb_msglayout envoy_config_route_v3_ScopedRouteConfiguration_Key_msginit;
+extern const upb_msglayout envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_config_route_v3_ScopedRouteConfiguration_msginit,
+ &envoy_config_route_v3_ScopedRouteConfiguration_Key_msginit,
+ &envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_msginit,
+};
+
+static const char descriptor[789] = {'\n', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/', 's',
+'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n',
+'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'.', 'p', 'r', 'o', 't', 'o', '\"', '\253', '\004', '\n', '\030', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n',
+'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\033', '\n', '\t', 'o', 'n', '_', 'd', 'e', 'm', 'a', 'n', 'd', '\030', '\004',
+' ', '\001', '(', '\010', 'R', '\010', 'o', 'n', 'D', 'e', 'm', 'a', 'n', 'd', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ',
+'\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'A', '\n', '\030', 'r', 'o', 'u',
+'t', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001',
+'(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\026', 'r', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u',
+'r', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '\022', 'O', '\n', '\003', 'k', 'e', 'y', '\030', '\003', ' ', '\001', '(', '\013', '2', '3',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'S', 'c',
+'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'K', 'e',
+'y', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\003', 'k', 'e', 'y', '\032', '\222', '\002', '\n', '\003', 'K', 'e', 'y', '\022',
+'d', '\n', '\t', 'f', 'r', 'a', 'g', 'm', 'e', 'n', 't', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '<', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R',
+'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'K', 'e', 'y', '.', 'F', 'r', 'a',
+'g', 'm', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\t', 'f', 'r', 'a', 'g', 'm', 'e', 'n', 't',
+'s', '\032', 's', '\n', '\010', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', '\022', '\037', '\n', '\n', 's', 't', 'r', 'i', 'n', 'g', '_', 'k',
+'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\t', 's', 't', 'r', 'i', 'n', 'g', 'K', 'e', 'y', ':', '9', '\232', '\305',
+'\210', '\036', '4', '\n', '2', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R',
+'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'K', 'e', 'y', '.', 'F', 'r', 'a',
+'g', 'm', 'e', 'n', 't', 'B', '\013', '\n', '\004', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', ':', '0', '\232', '\305', '\210', '\036', '+',
+'\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't',
+'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '.', 'K', 'e', 'y', ':', ',', '\232', '\305', '\210', '\036', '\'',
+'\n', '%', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't',
+'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'B', 'A', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o',
+'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e',
+'.', 'v', '3', 'B', '\020', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_route_v3_scoped_route_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/route/v3/scoped_route.proto",
+ UPB_STRVIEW_INIT(descriptor, 789)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h
new file mode 100644
index 00000000000..2c3d4d02868
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/route/v3/scoped_route.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_ROUTE_V3_SCOPED_ROUTE_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_ROUTE_V3_SCOPED_ROUTE_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_def_init envoy_config_route_v3_scoped_route_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_ScopedRouteConfiguration_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_scoped_route_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.ScopedRouteConfiguration");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_ScopedRouteConfiguration_Key_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_scoped_route_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.ScopedRouteConfiguration.Key");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_route_v3_ScopedRouteConfiguration_Key_Fragment_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_route_v3_scoped_route_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.route.v3.ScopedRouteConfiguration.Key.Fragment");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_ROUTE_V3_SCOPED_ROUTE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c
new file mode 100644
index 00000000000..3817a57292b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c
@@ -0,0 +1,61 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/trace/v3/http_tracer.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/config/trace/v3/http_tracer.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_config_trace_v3_Tracing_msginit;
+extern const upb_msglayout envoy_config_trace_v3_Tracing_Http_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_config_trace_v3_Tracing_msginit,
+ &envoy_config_trace_v3_Tracing_Http_msginit,
+};
+
+static const char descriptor[532] = {'\n', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 't', 'r', 'a', 'c', 'e', '/', 'v', '3', '/', 'h',
+'t', 't', 'p', '_', 't', 'r', 'a', 'c', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', 'v', '3', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n',
+'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\221', '\002', '\n', '\007', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '\022', '7', '\n', '\004', 'h', 't',
+'t', 'p', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't',
+'r', 'a', 'c', 'e', '.', 'v', '3', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'H', 't', 't', 'p', 'R', '\004', 'h', 't', 't',
+'p', '\032', '\246', '\001', '\n', '\004', 'H', 't', 't', 'p', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c',
+'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', ')',
+'\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e',
+'.', 'v', '2', '.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'H', 't', 't', 'p', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i',
+'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', ':', '$', '\232', '\305', '\210',
+'\036', '\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', 'v', '2',
+'.', 'T', 'r', 'a', 'c', 'i', 'n', 'g', 'B', '@', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', 'v', '3', 'B', '\017', 'H',
+'t', 't', 'p', 'T', 'r', 'a', 'c', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b',
+'\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_config_trace_v3_http_tracer_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/config/trace/v3/http_tracer.proto",
+ UPB_STRVIEW_INIT(descriptor, 532)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h
new file mode 100644
index 00000000000..39ffc13819d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/config/trace/v3/http_tracer.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_CONFIG_TRACE_V3_HTTP_TRACER_PROTO_UPBDEFS_H_
+#define ENVOY_CONFIG_TRACE_V3_HTTP_TRACER_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_def_init envoy_config_trace_v3_http_tracer_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_config_trace_v3_Tracing_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_trace_v3_http_tracer_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.trace.v3.Tracing");
+}
+
+UPB_INLINE const upb_msgdef *envoy_config_trace_v3_Tracing_Http_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_config_trace_v3_http_tracer_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.config.trace.v3.Tracing.Http");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_CONFIG_TRACE_V3_HTTP_TRACER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c
new file mode 100644
index 00000000000..d159a9920d9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c
@@ -0,0 +1,51 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/clusters/aggregate/v3/cluster.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_extensions_clusters_aggregate_v3_ClusterConfig_msginit,
+};
+
+static const char descriptor[389] = {'\n', '4', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'c', 'l', 'u', 's', 't', 'e',
+'r', 's', '/', 'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', '/', 'v', '3', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'p',
+'r', 'o', 't', 'o', '\022', '&', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'c', 'l',
+'u', 's', 't', 'e', 'r', 's', '.', 'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a',
+'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o',
+'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'r', '\n', '\r', 'C', 'l', 'u', 's', 't', 'e', 'r', 'C', 'o', 'n', 'f',
+'i', 'g', '\022', '$', '\n', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\t', 'B', '\010', '\372', 'B', '\005',
+'\222', '\001', '\002', '\010', '\001', 'R', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', ':', ';', '\232', '\305', '\210', '\036', '6', '\n', '4', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'a', 'g', 'g', 'r', 'e',
+'g', 'a', 't', 'e', '.', 'v', '2', 'a', 'l', 'p', 'h', 'a', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i',
+'g', 'B', 'N', '\n', '4', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '.', 'a', 'g', 'g', 'r', 'e',
+'g', 'a', 't', 'e', '.', 'v', '3', 'B', '\014', 'C', 'l', 'u', 's', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_clusters_aggregate_v3_cluster_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/clusters/aggregate/v3/cluster.proto",
+ UPB_STRVIEW_INIT(descriptor, 389)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h
new file mode 100644
index 00000000000..fd6d1b87c83
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/clusters/aggregate/v3/cluster.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_CLUSTERS_AGGREGATE_V3_CLUSTER_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_CLUSTERS_AGGREGATE_V3_CLUSTER_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_def_init envoy_extensions_clusters_aggregate_v3_cluster_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_clusters_aggregate_v3_ClusterConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_clusters_aggregate_v3_cluster_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.clusters.aggregate.v3.ClusterConfig");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_CLUSTERS_AGGREGATE_V3_CLUSTER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c
new file mode 100644
index 00000000000..1ee8a91170c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c
@@ -0,0 +1,102 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/common/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/filters/common/fault/v3/fault.upbdefs.h"
+
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit;
+extern const upb_msglayout envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit;
+
+static const upb_msglayout *layouts[5] = {
+ &envoy_extensions_filters_common_fault_v3_FaultDelay_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_msginit,
+ &envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_msginit,
+};
+
+static const char descriptor[1354] = {'\n', '4', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r',
+'s', '/', 'c', 'o', 'm', 'm', 'o', 'n', '/', 'f', 'a', 'u', 'l', 't', '/', 'v', '3', '/', 'f', 'a', 'u', 'l', 't', '.', 'p',
+'r', 'o', 't', 'o', '\022', '(', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i',
+'l', 't', 'e', 'r', 's', '.', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', '\032', '\033', 'e', 'n',
+'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o',
+'\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', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's',
+'/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027',
+'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\304',
+'\003', '\n', '\n', 'F', 'a', 'u', 'l', 't', 'D', 'e', 'l', 'a', 'y', '\022', 'F', '\n', '\013', 'f', 'i', 'x', 'e', 'd', '_', 'd', 'e',
+'l', 'a', 'y', '\030', '\003', ' ', '\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', 'B', '\010', '\372', 'B', '\005', '\252', '\001', '\002', '*', '\000', 'H', '\000', 'R', '\n',
+'f', 'i', 'x', 'e', 'd', 'D', 'e', 'l', 'a', 'y', '\022', 'e', '\n', '\014', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'd', 'e', 'l', 'a',
+'y', '\030', '\005', ' ', '\001', '(', '\013', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n',
+'s', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3',
+'.', 'F', 'a', 'u', 'l', 't', 'D', 'e', 'l', 'a', 'y', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'D', 'e', 'l', 'a', 'y', 'H', '\000',
+'R', '\013', 'h', 'e', 'a', 'd', 'e', 'r', 'D', 'e', 'l', 'a', 'y', '\022', '@', '\n', '\n', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a',
+'g', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.',
+'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\n', 'p', 'e', 'r', 'c', 'e', 'n',
+'t', 'a', 'g', 'e', '\032', 'I', '\n', '\013', 'H', 'e', 'a', 'd', 'e', 'r', 'D', 'e', 'l', 'a', 'y', ':', ':', '\232', '\305', '\210', '\036',
+'5', '\n', '3', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'f', 'a',
+'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l', 't', 'D', 'e', 'l', 'a', 'y', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'D',
+'e', 'l', 'a', 'y', '\"', '\033', '\n', '\016', 'F', 'a', 'u', 'l', 't', 'D', 'e', 'l', 'a', 'y', 'T', 'y', 'p', 'e', '\022', '\t', '\n',
+'\005', 'F', 'I', 'X', 'E', 'D', '\020', '\000', ':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l',
+'t', 'D', 'e', 'l', 'a', 'y', 'B', '\033', '\n', '\024', 'f', 'a', 'u', 'l', 't', '_', 'd', 'e', 'l', 'a', 'y', '_', 's', 'e', 'c',
+'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\002', '\020', '\003', 'J', '\004', '\010', '\001', '\020', '\002', 'R', '\004', 't',
+'y', 'p', 'e', '\"', '\260', '\004', '\n', '\016', 'F', 'a', 'u', 'l', 't', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '\022', 'f', '\n',
+'\013', 'f', 'i', 'x', 'e', 'd', '_', 'l', 'i', 'm', 'i', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', 'C', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'c', 'o', 'm', 'm',
+'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', '.', 'F', 'a', 'u', 'l', 't', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i',
+'t', '.', 'F', 'i', 'x', 'e', 'd', 'L', 'i', 'm', 'i', 't', 'H', '\000', 'R', '\n', 'f', 'i', 'x', 'e', 'd', 'L', 'i', 'm', 'i',
+'t', '\022', 'i', '\n', '\014', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'l', 'i', 'm', 'i', 't', '\030', '\003', ' ', '\001', '(', '\013', '2', 'D',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's',
+'.', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', '.', 'F', 'a', 'u', 'l', 't', 'R', 'a', 't',
+'e', 'L', 'i', 'm', 'i', 't', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'L', 'i', 'm', 'i', 't', 'H', '\000', 'R', '\013', 'h', 'e', 'a',
+'d', 'e', 'r', 'L', 'i', 'm', 'i', 't', '\022', '@', '\n', '\n', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\030', '\002', ' ',
+'\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't',
+'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\n', 'p', 'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\032',
+'s', '\n', '\n', 'F', 'i', 'x', 'e', 'd', 'L', 'i', 'm', 'i', 't', '\022', '&', '\n', '\n', 'l', 'i', 'm', 'i', 't', '_', 'k', 'b',
+'p', 's', '\030', '\001', ' ', '\001', '(', '\004', 'B', '\007', '\372', 'B', '\004', '2', '\002', '(', '\001', 'R', '\t', 'l', 'i', 'm', 'i', 't', 'K',
+'b', 'p', 's', ':', '=', '\232', '\305', '\210', '\036', '8', '\n', '6', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'f', 'i', 'l', 't', 'e', 'r', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l', 't', 'R', 'a', 't', 'e',
+'L', 'i', 'm', 'i', 't', '.', 'F', 'i', 'x', 'e', 'd', 'L', 'i', 'm', 'i', 't', '\032', 'M', '\n', '\013', 'H', 'e', 'a', 'd', 'e',
+'r', 'L', 'i', 'm', 'i', 't', ':', '>', '\232', '\305', '\210', '\036', '9', '\n', '7', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l', 't', 'R',
+'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'L', 'i', 'm', 'i', 't', ':', '2', '\232', '\305', '\210',
+'\036', '-', '\n', '+', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'f',
+'a', 'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l', 't', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'B', '\021', '\n',
+'\n', 'l', 'i', 'm', 'i', 't', '_', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', 'B', 'N', '\n', '6', 'i', 'o', '.', 'e', 'n',
+'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's',
+'.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', 'B',
+'\n', 'F', 'a', 'u', 'l', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/filters/common/fault/v3/fault.proto",
+ UPB_STRVIEW_INIT(descriptor, 1354)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h
new file mode 100644
index 00000000000..f3d64b4f3b2
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h
@@ -0,0 +1,55 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/common/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_COMMON_FAULT_V3_FAULT_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_FILTERS_COMMON_FAULT_V3_FAULT_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_def_init envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_common_fault_v3_FaultDelay_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.common.fault.v3.FaultDelay");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_common_fault_v3_FaultDelay_HeaderDelay_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.common.fault.v3.FaultDelay.HeaderDelay");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_common_fault_v3_FaultRateLimit_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.common.fault.v3.FaultRateLimit");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_common_fault_v3_FaultRateLimit_FixedLimit_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.common.fault.v3.FaultRateLimit.FixedLimit");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_common_fault_v3_FaultRateLimit_HeaderLimit_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.common.fault.v3.FaultRateLimit.HeaderLimit");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_COMMON_FAULT_V3_FAULT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c
new file mode 100644
index 00000000000..cd46e9352e3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c
@@ -0,0 +1,120 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/filters/http/fault/v3/fault.upbdefs.h"
+
+extern upb_def_init envoy_config_route_v3_route_components_proto_upbdefinit;
+extern upb_def_init envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_filters_http_fault_v3_FaultAbort_msginit;
+extern const upb_msglayout envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit;
+extern const upb_msglayout envoy_extensions_filters_http_fault_v3_HTTPFault_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_extensions_filters_http_fault_v3_FaultAbort_msginit,
+ &envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_msginit,
+ &envoy_extensions_filters_http_fault_v3_HTTPFault_msginit,
+};
+
+static const char descriptor[1812] = {'\n', '2', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r',
+'s', '/', 'h', 't', 't', 'p', '/', 'f', 'a', 'u', 'l', 't', '/', 'v', '3', '/', 'f', 'a', 'u', 'l', 't', '.', 'p', 'r', 'o',
+'t', 'o', '\022', '&', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't',
+'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', '\032', ',', 'e', 'n', 'v', 'o', 'y', '/',
+'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'm',
+'p', 'o', 'n', 'e', 'n', 't', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '4', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e',
+'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r', 's', '/', 'c', 'o', 'm', 'm', 'o', 'n', '/', 'f', 'a', 'u',
+'l', 't', '/', 'v', '3', '/', 'f', 'a', 'u', 'l', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/',
+'t', 'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a',
+'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\244', '\003', '\n', '\n', 'F',
+'a', 'u', 'l', 't', 'A', 'b', 'o', 'r', 't', '\022', '.', '\n', '\013', 'h', 't', 't', 'p', '_', 's', 't', 'a', 't', 'u', 's', '\030',
+'\002', ' ', '\001', '(', '\r', 'B', '\013', '\372', 'B', '\010', '*', '\006', '\020', '\330', '\004', '(', '\310', '\001', 'H', '\000', 'R', '\n', 'h', 't', 't',
+'p', 'S', 't', 'a', 't', 'u', 's', '\022', '!', '\n', '\013', 'g', 'r', 'p', 'c', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\005', ' ',
+'\001', '(', '\r', 'H', '\000', 'R', '\n', 'g', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', '\022', 'c', '\n', '\014', 'h', 'e', 'a', 'd',
+'e', 'r', '_', 'a', 'b', 'o', 'r', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '>', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 'f', 'a', 'u',
+'l', 't', '.', 'v', '3', '.', 'F', 'a', 'u', 'l', 't', 'A', 'b', 'o', 'r', 't', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'A', 'b',
+'o', 'r', 't', 'H', '\000', 'R', '\013', 'h', 'e', 'a', 'd', 'e', 'r', 'A', 'b', 'o', 'r', 't', '\022', '@', '\n', '\n', 'p', 'e', 'r',
+'c', 'e', 'n', 't', 'a', 'g', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p',
+'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\n', 'p',
+'e', 'r', 'c', 'e', 'n', 't', 'a', 'g', 'e', '\032', 'N', '\n', '\013', 'H', 'e', 'a', 'd', 'e', 'r', 'A', 'b', 'o', 'r', 't', ':',
+'?', '\232', '\305', '\210', '\036', ':', '\n', '8', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't',
+'e', 'r', '.', 'h', 't', 't', 'p', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l', 't', 'A', 'b', 'o',
+'r', 't', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'A', 'b', 'o', 'r', 't', ':', '3', '\232', '\305', '\210', '\036', '.', '\n', ',', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'h', 't', 't', 'p', '.', 'f', 'a',
+'u', 'l', 't', '.', 'v', '2', '.', 'F', 'a', 'u', 'l', 't', 'A', 'b', 'o', 'r', 't', 'B', '\021', '\n', '\n', 'e', 'r', 'r', 'o',
+'r', '_', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\001', '\020', '\002', '\"', '\274', '\007', '\n', '\t', 'H', 'T', 'T',
+'P', 'F', 'a', 'u', 'l', 't', '\022', 'J', '\n', '\005', 'd', 'e', 'l', 'a', 'y', '\030', '\001', ' ', '\001', '(', '\013', '2', '4', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'c',
+'o', 'm', 'm', 'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', '.', 'F', 'a', 'u', 'l', 't', 'D', 'e', 'l', 'a', 'y',
+'R', '\005', 'd', 'e', 'l', 'a', 'y', '\022', 'H', '\n', '\005', 'a', 'b', 'o', 'r', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '2', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.',
+'h', 't', 't', 'p', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '3', '.', 'F', 'a', 'u', 'l', 't', 'A', 'b', 'o', 'r', 't', 'R',
+'\005', 'a', 'b', 'o', 'r', 't', '\022', ')', '\n', '\020', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'c', 'l', 'u', 's', 't', 'e',
+'r', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'C', 'l', 'u', 's', 't', 'e', 'r', '\022',
+'>', '\n', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\030', '\004', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'M', 'a', 't',
+'c', 'h', 'e', 'r', 'R', '\007', 'h', 'e', 'a', 'd', 'e', 'r', 's', '\022', ')', '\n', '\020', 'd', 'o', 'w', 'n', 's', 't', 'r', 'e',
+'a', 'm', '_', 'n', 'o', 'd', 'e', 's', '\030', '\005', ' ', '\003', '(', '\t', 'R', '\017', 'd', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a',
+'m', 'N', 'o', 'd', 'e', 's', '\022', 'H', '\n', '\021', 'm', 'a', 'x', '_', 'a', 'c', 't', 'i', 'v', 'e', '_', 'f', 'a', 'u', 'l',
+'t', 's', '\030', '\006', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\017', 'm', 'a', 'x', 'A', 'c', 't', 'i', 'v', 'e', 'F',
+'a', 'u', 'l', 't', 's', '\022', 'h', '\n', '\023', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'r', 'a', 't', 'e', '_', 'l', 'i',
+'m', 'i', 't', '\030', '\007', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i',
+'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'f', 'a', 'u', 'l', 't', '.',
+'v', '3', '.', 'F', 'a', 'u', 'l', 't', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', 'R', '\021', 'r', 'e', 's', 'p', 'o', 'n',
+'s', 'e', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i', 't', '\022', '2', '\n', '\025', 'd', 'e', 'l', 'a', 'y', '_', 'p', 'e', 'r', 'c',
+'e', 'n', 't', '_', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\023', 'd', 'e', 'l', 'a', 'y', 'P',
+'e', 'r', 'c', 'e', 'n', 't', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', '2', '\n', '\025', 'a', 'b', 'o', 'r', 't', '_', 'p', 'e',
+'r', 'c', 'e', 'n', 't', '_', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\023', 'a', 'b', 'o', 'r',
+'t', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', '4', '\n', '\026', 'd', 'e', 'l', 'a', 'y', '_',
+'d', 'u', 'r', 'a', 't', 'i', 'o', 'n', '_', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\n', ' ', '\001', '(', '\t', 'R', '\024', 'd',
+'e', 'l', 'a', 'y', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', '9', '\n', '\031', 'a', 'b',
+'o', 'r', 't', '_', 'h', 't', 't', 'p', '_', 's', 't', 'a', 't', 'u', 's', '_', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\013',
+' ', '\001', '(', '\t', 'R', '\026', 'a', 'b', 'o', 'r', 't', 'H', 't', 't', 'p', 'S', 't', 'a', 't', 'u', 's', 'R', 'u', 'n', 't',
+'i', 'm', 'e', '\022', '9', '\n', '\031', 'm', 'a', 'x', '_', 'a', 'c', 't', 'i', 'v', 'e', '_', 'f', 'a', 'u', 'l', 't', 's', '_',
+'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\014', ' ', '\001', '(', '\t', 'R', '\026', 'm', 'a', 'x', 'A', 'c', 't', 'i', 'v', 'e', 'F',
+'a', 'u', 'l', 't', 's', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', 'L', '\n', '#', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_',
+'r', 'a', 't', 'e', '_', 'l', 'i', 'm', 'i', 't', '_', 'p', 'e', 'r', 'c', 'e', 'n', 't', '_', 'r', 'u', 'n', 't', 'i', 'm',
+'e', '\030', '\r', ' ', '\001', '(', '\t', 'R', '\037', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'R', 'a', 't', 'e', 'L', 'i', 'm', 'i',
+'t', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', 'u', 'n', 't', 'i', 'm', 'e', '\022', '9', '\n', '\031', 'a', 'b', 'o', 'r', 't', '_',
+'g', 'r', 'p', 'c', '_', 's', 't', 'a', 't', 'u', 's', '_', 'r', 'u', 'n', 't', 'i', 'm', 'e', '\030', '\016', ' ', '\001', '(', '\t',
+'R', '\026', 'a', 'b', 'o', 'r', 't', 'G', 'r', 'p', 'c', 'S', 't', 'a', 't', 'u', 's', 'R', 'u', 'n', 't', 'i', 'm', 'e', ':',
+'2', '\232', '\305', '\210', '\036', '-', '\n', '+', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't',
+'e', 'r', '.', 'h', 't', 't', 'p', '.', 'f', 'a', 'u', 'l', 't', '.', 'v', '2', '.', 'H', 'T', 'T', 'P', 'F', 'a', 'u', 'l',
+'t', 'B', 'L', '\n', '4', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 'f',
+'a', 'u', 'l', 't', '.', 'v', '3', 'B', '\n', 'F', 'a', 'u', 'l', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321',
+'\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_route_v3_route_components_proto_upbdefinit,
+ &envoy_extensions_filters_common_fault_v3_fault_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_filters_http_fault_v3_fault_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/filters/http/fault/v3/fault.proto",
+ UPB_STRVIEW_INIT(descriptor, 1812)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h
new file mode 100644
index 00000000000..0beb986b665
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/fault/v3/fault.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_FAULT_V3_FAULT_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_FILTERS_HTTP_FAULT_V3_FAULT_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_def_init envoy_extensions_filters_http_fault_v3_fault_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_http_fault_v3_FaultAbort_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_http_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.http.fault.v3.FaultAbort");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_http_fault_v3_FaultAbort_HeaderAbort_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_http_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.http.fault.v3.FaultAbort.HeaderAbort");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_http_fault_v3_HTTPFault_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_http_fault_v3_fault_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.http.fault.v3.HTTPFault");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_HTTP_FAULT_V3_FAULT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c
new file mode 100644
index 00000000000..f1d9a578077
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c
@@ -0,0 +1,76 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/router/v3/router.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/filters/http/router/v3/router.upbdefs.h"
+
+extern upb_def_init envoy_config_accesslog_v3_accesslog_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_filters_http_router_v3_Router_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_extensions_filters_http_router_v3_Router_msginit,
+};
+
+static const char descriptor[909] = {'\n', '4', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r',
+'s', '/', 'h', 't', 't', 'p', '/', 'r', 'o', 'u', 't', 'e', 'r', '/', 'v', '3', '/', 'r', 'o', 'u', 't', 'e', 'r', '.', 'p',
+'r', 'o', 't', 'o', '\022', '\'', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i',
+'l', 't', 'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 'r', 'o', 'u', 't', 'e', 'r', '.', 'v', '3', '\032', ')', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '/', 'v', '3', '/', 'a', 'c',
+'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't',
+'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i',
+'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l',
+'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\255', '\004', '\n', '\006', 'R', 'o', 'u', 't', 'e', 'r', '\022', '?', '\n',
+'\r', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_', 's', 't', 'a', 't', 's', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\014',
+'d', 'y', 'n', 'a', 'm', 'i', 'c', 'S', 't', 'a', 't', 's', '\022', '(', '\n', '\020', 's', 't', 'a', 'r', 't', '_', 'c', 'h', 'i',
+'l', 'd', '_', 's', 'p', 'a', 'n', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\016', 's', 't', 'a', 'r', 't', 'C', 'h', 'i', 'l', 'd',
+'S', 'p', 'a', 'n', '\022', 'G', '\n', '\014', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '_', 'l', 'o', 'g', '\030', '\003', ' ', '\003', '(',
+'\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o',
+'g', '.', 'v', '3', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'R', '\013', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', 'L',
+'o', 'g', '\022', '4', '\n', '\026', 's', 'u', 'p', 'p', 'r', 'e', 's', 's', '_', 'e', 'n', 'v', 'o', 'y', '_', 'h', 'e', 'a', 'd',
+'e', 'r', 's', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\024', 's', 'u', 'p', 'p', 'r', 'e', 's', 's', 'E', 'n', 'v', 'o', 'y', 'H',
+'e', 'a', 'd', 'e', 'r', 's', '\022', '\307', '\001', '\n', '\024', 's', 't', 'r', 'i', 'c', 't', '_', 'c', 'h', 'e', 'c', 'k', '_', 'h',
+'e', 'a', 'd', 'e', 'r', 's', '\030', '\005', ' ', '\003', '(', '\t', 'B', '\224', '\001', '\372', 'B', '\220', '\001', '\222', '\001', '\214', '\001', '\"', '\211',
+'\001', 'r', '\206', '\001', 'R', '\036', 'x', '-', 'e', 'n', 'v', 'o', 'y', '-', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '-', 'r', 'q',
+'-', 't', 'i', 'm', 'e', 'o', 'u', 't', '-', 'm', 's', 'R', '&', 'x', '-', 'e', 'n', 'v', 'o', 'y', '-', 'u', 'p', 's', 't',
+'r', 'e', 'a', 'm', '-', 'r', 'q', '-', 'p', 'e', 'r', '-', 't', 'r', 'y', '-', 't', 'i', 'm', 'e', 'o', 'u', 't', '-', 'm',
+'s', 'R', '\023', 'x', '-', 'e', 'n', 'v', 'o', 'y', '-', 'm', 'a', 'x', '-', 'r', 'e', 't', 'r', 'i', 'e', 's', 'R', '\025', 'x',
+'-', 'e', 'n', 'v', 'o', 'y', '-', 'r', 'e', 't', 'r', 'y', '-', 'g', 'r', 'p', 'c', '-', 'o', 'n', 'R', '\020', 'x', '-', 'e',
+'n', 'v', 'o', 'y', '-', 'r', 'e', 't', 'r', 'y', '-', 'o', 'n', 'R', '\022', 's', 't', 'r', 'i', 'c', 't', 'C', 'h', 'e', 'c',
+'k', 'H', 'e', 'a', 'd', 'e', 'r', 's', '\022', '=', '\n', '\033', 'r', 'e', 's', 'p', 'e', 'c', 't', '_', 'e', 'x', 'p', 'e', 'c',
+'t', 'e', 'd', '_', 'r', 'q', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\030', 'r', 'e', 's',
+'p', 'e', 'c', 't', 'E', 'x', 'p', 'e', 'c', 't', 'e', 'd', 'R', 'q', 'T', 'i', 'm', 'e', 'o', 'u', 't', ':', '0', '\232', '\305',
+'\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.',
+'h', 't', 't', 'p', '.', 'r', 'o', 'u', 't', 'e', 'r', '.', 'v', '2', '.', 'R', 'o', 'u', 't', 'e', 'r', 'B', 'N', '\n', '5',
+'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n',
+'s', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'h', 't', 't', 'p', '.', 'r', 'o', 'u', 't', 'e', 'r',
+'.', 'v', '3', 'B', '\013', 'R', 'o', 'u', 't', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020',
+'\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_config_accesslog_v3_accesslog_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_filters_http_router_v3_router_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/filters/http/router/v3/router.proto",
+ UPB_STRVIEW_INIT(descriptor, 909)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h
new file mode 100644
index 00000000000..dc91890ed65
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/http/router/v3/router.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_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_def_init envoy_extensions_filters_http_router_v3_router_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_http_router_v3_Router_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_http_router_v3_router_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.http.router.v3.Router");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_HTTP_ROUTER_V3_ROUTER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c
new file mode 100644
index 00000000000..916044e9f43
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c
@@ -0,0 +1,505 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h"
+
+extern upb_def_init envoy_config_accesslog_v3_accesslog_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_protocol_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_substitution_format_string_proto_upbdefinit;
+extern upb_def_init envoy_config_route_v3_route_proto_upbdefinit;
+extern upb_def_init envoy_config_route_v3_scoped_route_proto_upbdefinit;
+extern upb_def_init envoy_config_trace_v3_http_tracer_proto_upbdefinit;
+extern upb_def_init envoy_type_tracing_v3_custom_tag_proto_upbdefinit;
+extern upb_def_init envoy_type_v3_percent_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_migrate_proto_upbdefinit;
+extern upb_def_init udpa_annotations_security_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_Rds_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit;
+extern const upb_msglayout envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_msginit;
+
+static const upb_msglayout *layouts[17] = {
+ &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_Rds_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_msginit,
+ &envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_msginit,
+};
+
+static const char descriptor[10141] = {'\n', 'Y', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 'f', 'i', 'l', 't', 'e', 'r',
+'s', '/', 'n', 'e', 't', 'w', 'o', 'r', 'k', '/', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '/', 'v', '3', '/', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', ';', 'e', 'n', 'v', 'o', 'y', '.', 'e',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k',
+'.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.',
+'v', '3', '\032', ')', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o',
+'g', '/', 'v', '3', '/', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3',
+'/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '$', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x', 't', 'e', 'n', 's', 'i',
+'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '#', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o',
+'r', 'e', '/', 'v', '3', '/', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '.', 'p', 'r', 'o', 't', 'o', '\032', '5', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 's', 'u', 'b', 's', 't', 'i', 't',
+'u', 't', 'i', 'o', 'n', '_', 'f', 'o', 'r', 'm', 'a', 't', '_', 's', 't', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/', 'r',
+'o', 'u', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/',
+'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\'', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 't', 'r', 'a', 'c', 'e', '/', 'v', '3',
+'/', 'h', 't', 't', 'p', '_', 't', 'r', 'a', 'c', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '&', 'e', 'n', 'v', 'o', 'y',
+'/', 't', 'y', 'p', 'e', '/', 't', 'r', 'a', 'c', 'i', 'n', 'g', '/', 'v', '3', '/', 'c', 'u', 's', 't', 'o', 'm', '_', 't',
+'a', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'p',
+'e', 'r', 'c', 'e', 'n', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o',
+'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g',
+'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '/', 's', 'e', 'c', 'u', 'r', 'i', 't', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n',
+'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\222', '+', '\n', '\025', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't',
+'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '\022', '\205', '\001', '\n', '\n', 'c', 'o', 'd', 'e', 'c', '_', 't', 'y', 'p', 'e',
+'\030', '\001', ' ', '\001', '(', '\016', '2', '\\', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's',
+'.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'H', 't', 't', 'p', 'C', 'o',
+'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'C', 'o', 'd', 'e', 'c', 'T', 'y', 'p', 'e',
+'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\t', 'c', 'o', 'd', 'e', 'c', 'T', 'y', 'p', 'e', '\022', '(', '\n', '\013',
+'s', 't', 'a', 't', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020',
+'\001', 'R', '\n', 's', 't', 'a', 't', 'P', 'r', 'e', 'f', 'i', 'x', '\022', 'T', '\n', '\003', 'r', 'd', 's', '\030', '\003', ' ', '\001', '(',
+'\013', '2', '@', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't',
+'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'R', 'd', 's', 'H', '\000', 'R', '\003', 'r', 'd', 's', '\022',
+'N', '\n', '\014', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', ' ', '\001', '(', '\013', '2', ')', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't',
+'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'H', '\000', 'R', '\013', 'r', 'o', 'u', 't', 'e', 'C', 'o',
+'n', 'f', 'i', 'g', '\022', 'p', '\n', '\r', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', 's', '\030', '\037', ' ', '\001',
+'(', '\013', '2', 'I', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l',
+'t', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't',
+'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't',
+'e', 's', 'H', '\000', 'R', '\014', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', 'j', '\n', '\014', 'h', 't', 't',
+'p', '_', 'f', 'i', 'l', 't', 'e', 'r', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k',
+'.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.',
+'v', '3', '.', 'H', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r', 'R', '\013', 'h', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r',
+'s', '\022', '@', '\n', '\016', 'a', 'd', 'd', '_', 'u', 's', 'e', 'r', '_', 'a', 'g', 'e', 'n', 't', '\030', '\006', ' ', '\001', '(', '\013',
+'2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a',
+'l', 'u', 'e', 'R', '\014', 'a', 'd', 'd', 'U', 's', 'e', 'r', 'A', 'g', 'e', 'n', 't', '\022', 't', '\n', '\007', 't', 'r', 'a', 'c',
+'i', 'n', 'g', '\030', '\007', ' ', '\001', '(', '\013', '2', 'Z', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i',
+'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_',
+'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'H', 't', 't',
+'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'T', 'r', 'a', 'c', 'i', 'n',
+'g', 'R', '\007', 't', 'r', 'a', 'c', 'i', 'n', 'g', '\022', 's', '\n', '\034', 'c', 'o', 'm', 'm', 'o', 'n', '_', 'h', 't', 't', 'p',
+'_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '#', ' ', '\001', '(', '\013', '2', ')',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't',
+'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B', '\007', '\212', '\223', '\267', '*', '\002', '\010', '\001',
+'R', '\031', 'c', 'o', 'm', 'm', 'o', 'n', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o',
+'n', 's', '\022', '^', '\n', '\025', 'h', 't', 't', 'p', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o',
+'n', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c',
+'o', 'r', 'e', '.', 'v', '3', '.', 'H', 't', 't', 'p', '1', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o',
+'n', 's', 'R', '\023', 'h', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'i',
+'\n', '\026', 'h', 't', 't', 'p', '2', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030',
+'\t', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e',
+'.', 'v', '3', '.', 'H', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p', 't', 'i', 'o', 'n', 's', 'B',
+'\007', '\212', '\223', '\267', '*', '\002', '\010', '\001', 'R', '\024', 'h', 't', 't', 'p', '2', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'O', 'p',
+'t', 'i', 'o', 'n', 's', '\022', ',', '\n', '\013', 's', 'e', 'r', 'v', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\n', ' ', '\001', '(',
+'\t', 'B', '\013', '\372', 'B', '\010', 'r', '\006', '\300', '\001', '\002', '\310', '\001', '\000', 'R', '\n', 's', 'e', 'r', 'v', 'e', 'r', 'N', 'a', 'm',
+'e', '\022', '\271', '\001', '\n', '\034', 's', 'e', 'r', 'v', 'e', 'r', '_', 'h', 'e', 'a', 'd', 'e', 'r', '_', 't', 'r', 'a', 'n', 's',
+'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', '\030', '\"', ' ', '\001', '(', '\016', '2', 'm', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k',
+'.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.',
+'v', '3', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.',
+'S', 'e', 'r', 'v', 'e', 'r', 'H', 'e', 'a', 'd', 'e', 'r', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o',
+'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\032', 's', 'e', 'r', 'v', 'e', 'r', 'H', 'e', 'a', 'd', 'e', 'r',
+'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', 'i', 'o', 'n', '\022', '\\', '\n', '\026', 'm', 'a', 'x', '_', 'r', 'e', 'q',
+'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 'k', 'b', '\030', '\035', ' ', '\001', '(', '\013', '2', '\034', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u',
+'e', 'B', '\t', '\372', 'B', '\006', '*', '\004', '\030', '`', ' ', '\000', 'R', '\023', 'm', 'a', 'x', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H',
+'e', 'a', 'd', 'e', 'r', 's', 'K', 'b', '\022', 'R', '\n', '\023', 's', 't', 'r', 'e', 'a', 'm', '_', 'i', 'd', 'l', 'e', '_', 't',
+'i', 'm', 'e', 'o', 'u', 't', '\030', '\030', ' ', '\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', 'B', '\007', '\212', '\223', '\267', '*', '\002', '\010', '\001', 'R', '\021',
+'s', 't', 'r', 'e', 'a', 'm', 'I', 'd', 'l', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'K', '\n', '\017', 'r', 'e', 'q', 'u',
+'e', 's', 't', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\034', ' ', '\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', 'B', '\007', '\212', '\223', '\267', '*',
+'\002', '\010', '\001', 'R', '\016', 'r', 'e', 'q', 'u', 'e', 's', 't', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'b', '\n', '\027', 'r', 'e',
+'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r', 's', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', ')', ' ', '\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', 'B', '\017', '\372', 'B', '\005', '\252', '\001', '\002', '2', '\000', '\212', '\223', '\267', '*', '\002', '\010', '\001', 'R', '\025', 'r', 'e',
+'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', 's', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '>', '\n', '\r', 'd', 'r',
+'a', 'i', 'n', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\014', ' ', '\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', '\014', 'd', 'r', 'a', 'i',
+'n', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'M', '\n', '\025', 'd', 'e', 'l', 'a', 'y', 'e', 'd', '_', 'c', 'l', 'o', 's', 'e',
+'_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\030', '\032', ' ', '\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', '\023', 'd', 'e', 'l', 'a', 'y', 'e', 'd',
+'C', 'l', 'o', 's', 'e', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', 'C', '\n', '\n', 'a', 'c', 'c', 'e', 's', 's', '_', 'l', 'o',
+'g', '\030', '\r', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c',
+'c', 'e', 's', 's', 'l', 'o', 'g', '.', 'v', '3', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'R', '\t', 'a', 'c', 'c',
+'e', 's', 's', 'L', 'o', 'g', '\022', 'Q', '\n', '\022', 'u', 's', 'e', '_', 'r', 'e', 'm', 'o', 't', 'e', '_', 'a', 'd', 'd', 'r',
+'e', 's', 's', '\030', '\016', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'B', '\007', '\212', '\223', '\267', '*', '\002', '\010', '\001', 'R', '\020', 'u', 's',
+'e', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', '\022', '/', '\n', '\024', 'x', 'f', 'f', '_', 'n', 'u', 'm',
+'_', 't', 'r', 'u', 's', 't', 'e', 'd', '_', 'h', 'o', 'p', 's', '\030', '\023', ' ', '\001', '(', '\r', 'R', '\021', 'x', 'f', 'f', 'N',
+'u', 'm', 'T', 'r', 'u', 's', 't', 'e', 'd', 'H', 'o', 'p', 's', '\022', '\240', '\001', '\n', '\027', 'i', 'n', 't', 'e', 'r', 'n', 'a',
+'l', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\031', ' ', '\001', '(', '\013', '2', 'h', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.',
+'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm',
+'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M',
+'a', 'n', 'a', 'g', 'e', 'r', '.', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', 'C', 'o', 'n',
+'f', 'i', 'g', 'R', '\025', 'i', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', 'C', 'o', 'n', 'f', 'i',
+'g', '\022', '&', '\n', '\017', 's', 'k', 'i', 'p', '_', 'x', 'f', 'f', '_', 'a', 'p', 'p', 'e', 'n', 'd', '\030', '\025', ' ', '\001', '(',
+'\010', 'R', '\r', 's', 'k', 'i', 'p', 'X', 'f', 'f', 'A', 'p', 'p', 'e', 'n', 'd', '\022', '\020', '\n', '\003', 'v', 'i', 'a', '\030', '\026',
+' ', '\001', '(', '\t', 'R', '\003', 'v', 'i', 'a', '\022', 'J', '\n', '\023', 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', '_', 'r', 'e', 'q',
+'u', 'e', 's', 't', '_', 'i', 'd', '\030', '\017', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\021', 'g', 'e', 'n', 'e', 'r', 'a', 't',
+'e', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'd', '\022', '?', '\n', '\034', 'p', 'r', 'e', 's', 'e', 'r', 'v', 'e', '_', 'e', 'x',
+'t', 'e', 'r', 'n', 'a', 'l', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'i', 'd', '\030', ' ', ' ', '\001', '(', '\010', 'R', '\031',
+'p', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'E', 'x', 't', 'e', 'r', 'n', 'a', 'l', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'd',
+'\022', 'G', '\n', '!', 'a', 'l', 'w', 'a', 'y', 's', '_', 's', 'e', 't', '_', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'i', 'd',
+'_', 'i', 'n', '_', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '\030', '%', ' ', '\001', '(', '\010', 'R', '\034', 'a', 'l', 'w', 'a', 'y',
+'s', 'S', 'e', 't', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'd', 'I', 'n', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', '\264',
+'\001', '\n', '\033', 'f', 'o', 'r', 'w', 'a', 'r', 'd', '_', 'c', 'l', 'i', 'e', 'n', 't', '_', 'c', 'e', 'r', 't', '_', 'd', 'e',
+'t', 'a', 'i', 'l', 's', '\030', '\020', ' ', '\001', '(', '\016', '2', 'k', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n',
+'s', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't',
+'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'H',
+'t', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'F', 'o', 'r', 'w',
+'a', 'r', 'd', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', 'B', '\010', '\372', 'B', '\005',
+'\202', '\001', '\002', '\020', '\001', 'R', '\030', 'f', 'o', 'r', 'w', 'a', 'r', 'd', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D',
+'e', 't', 'a', 'i', 'l', 's', '\022', '\264', '\001', '\n', '\037', 's', 'e', 't', '_', 'c', 'u', 'r', 'r', 'e', 'n', 't', '_', 'c', 'l',
+'i', 'e', 'n', 't', '_', 'c', 'e', 'r', 't', '_', 'd', 'e', 't', 'a', 'i', 'l', 's', '\030', '\021', ' ', '\001', '(', '\013', '2', 'n',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's',
+'.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_',
+'m', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'S', 'e', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'C', 'l', 'i', 'e', 'n', 't', 'C',
+'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', 'R', '\033', 's', 'e', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'C', 'l', 'i',
+'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', '\022', ',', '\n', '\022', 'p', 'r', 'o', 'x', 'y', '_', '1',
+'0', '0', '_', 'c', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\030', '\022', ' ', '\001', '(', '\010', 'R', '\020', 'p', 'r', 'o', 'x', 'y', '1',
+'0', '0', 'C', 'o', 'n', 't', 'i', 'n', 'u', 'e', '\022', 'e', '\n', '1', 'r', 'e', 'p', 'r', 'e', 's', 'e', 'n', 't', '_', 'i',
+'p', 'v', '4', '_', 'r', 'e', 'm', 'o', 't', 'e', '_', 'a', 'd', 'd', 'r', 'e', 's', 's', '_', 'a', 's', '_', 'i', 'p', 'v',
+'4', '_', 'm', 'a', 'p', 'p', 'e', 'd', '_', 'i', 'p', 'v', '6', '\030', '\024', ' ', '\001', '(', '\010', 'R', '*', 'r', 'e', 'p', 'r',
+'e', 's', 'e', 'n', 't', 'I', 'p', 'v', '4', 'R', 'e', 'm', 'o', 't', 'e', 'A', 'd', 'd', 'r', 'e', 's', 's', 'A', 's', 'I',
+'p', 'v', '4', 'M', 'a', 'p', 'p', 'e', 'd', 'I', 'p', 'v', '6', '\022', '\211', '\001', '\n', '\017', 'u', 'p', 'g', 'r', 'a', 'd', 'e',
+'_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\027', ' ', '\003', '(', '\013', '2', '`', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.',
+'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v',
+'3', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'U',
+'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\016', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f',
+'i', 'g', 's', '\022', 'A', '\n', '\016', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', '_', 'p', 'a', 't', 'h', '\030', '\036', ' ', '\001',
+'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l',
+'V', 'a', 'l', 'u', 'e', 'R', '\r', 'n', 'o', 'r', 'm', 'a', 'l', 'i', 'z', 'e', 'P', 'a', 't', 'h', '\022', '#', '\n', '\r', 'm',
+'e', 'r', 'g', 'e', '_', 's', 'l', 'a', 's', 'h', 'e', 's', '\030', '!', ' ', '\001', '(', '\010', 'R', '\014', 'm', 'e', 'r', 'g', 'e',
+'S', 'l', 'a', 's', 'h', 'e', 's', '\022', '\201', '\001', '\n', '\024', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'i', 'd', '_', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', '\030', '$', ' ', '\001', '(', '\013', '2', 'O', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't',
+'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h',
+'t', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3',
+'.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'D', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', '\022', 'r', 'e', 'q', 'u',
+'e', 's', 't', 'I', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\022', '{', '\n', '\022', 'l', 'o', 'c', 'a', 'l', '_', 'r',
+'e', 'p', 'l', 'y', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '&', ' ', '\001', '(', '\013', '2', 'M', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o',
+'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e',
+'r', '.', 'v', '3', '.', 'L', 'o', 'c', 'a', 'l', 'R', 'e', 'p', 'l', 'y', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\020', 'l', 'o',
+'c', 'a', 'l', 'R', 'e', 'p', 'l', 'y', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'P', '\n', '\030', 's', 't', 'r', 'i', 'p', '_', 'm',
+'a', 't', 'c', 'h', 'i', 'n', 'g', '_', 'h', 'o', 's', 't', '_', 'p', 'o', 'r', 't', '\030', '\'', ' ', '\001', '(', '\010', 'B', '\027',
+'\362', '\230', '\376', '\217', '\005', '\021', '\022', '\017', 's', 't', 'r', 'i', 'p', '_', 'p', 'o', 'r', 't', '_', 'm', 'o', 'd', 'e', 'R', '\025',
+'s', 't', 'r', 'i', 'p', 'M', 'a', 't', 'c', 'h', 'i', 'n', 'g', 'H', 'o', 's', 't', 'P', 'o', 'r', 't', '\022', '/', '\n', '\023',
+'s', 't', 'r', 'i', 'p', '_', 'a', 'n', 'y', '_', 'h', 'o', 's', 't', '_', 'p', 'o', 'r', 't', '\030', '*', ' ', '\001', '(', '\010',
+'H', '\001', 'R', '\020', 's', 't', 'r', 'i', 'p', 'A', 'n', 'y', 'H', 'o', 's', 't', 'P', 'o', 'r', 't', '\022', 'i', '\n', '$', 's',
+'t', 'r', 'e', 'a', 'm', '_', 'e', 'r', 'r', 'o', 'r', '_', 'o', 'n', '_', 'i', 'n', 'v', 'a', 'l', 'i', 'd', '_', 'h', 't',
+'t', 'p', '_', 'm', 'e', 's', 's', 'a', 'g', 'e', '\030', '(', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\037', 's', 't', 'r', 'e',
+'a', 'm', 'E', 'r', 'r', 'o', 'r', 'O', 'n', 'I', 'n', 'v', 'a', 'l', 'i', 'd', 'H', 't', 't', 'p', 'M', 'e', 's', 's', 'a',
+'g', 'e', '\032', '\366', '\004', '\n', '\007', 'T', 'r', 'a', 'c', 'i', 'n', 'g', '\022', '?', '\n', '\017', 'c', 'l', 'i', 'e', 'n', 't', '_',
+'s', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\016', 'c', 'l', 'i', 'e', 'n', 't', 'S', 'a', 'm', 'p',
+'l', 'i', 'n', 'g', '\022', '?', '\n', '\017', 'r', 'a', 'n', 'd', 'o', 'm', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\004',
+' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c',
+'e', 'n', 't', 'R', '\016', 'r', 'a', 'n', 'd', 'o', 'm', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022', 'A', '\n', '\020', 'o', 'v',
+'e', 'r', 'a', 'l', 'l', '_', 's', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\030', '\005', ' ', '\001', '(', '\013', '2', '\026', '.', 'e', 'n',
+'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'R', '\017', 'o', 'v', 'e', 'r',
+'a', 'l', 'l', 'S', 'a', 'm', 'p', 'l', 'i', 'n', 'g', '\022', '\030', '\n', '\007', 'v', 'e', 'r', 'b', 'o', 's', 'e', '\030', '\006', ' ',
+'\001', '(', '\010', 'R', '\007', 'v', 'e', 'r', 'b', 'o', 's', 'e', '\022', 'K', '\n', '\023', 'm', 'a', 'x', '_', 'p', 'a', 't', 'h', '_',
+'t', 'a', 'g', '_', 'l', 'e', 'n', 'g', 't', 'h', '\030', '\007', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\020', 'm', 'a',
+'x', 'P', 'a', 't', 'h', 'T', 'a', 'g', 'L', 'e', 'n', 'g', 't', 'h', '\022', 'A', '\n', '\013', 'c', 'u', 's', 't', 'o', 'm', '_',
+'t', 'a', 'g', 's', '\030', '\010', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't',
+'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 'R', '\n', 'c', 'u', 's', 't',
+'o', 'm', 'T', 'a', 'g', 's', '\022', '?', '\n', '\010', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2',
+'#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 't', 'r', 'a', 'c', 'e', '.', 'v', '3', '.', 'T',
+'r', 'a', 'c', 'i', 'n', 'g', '.', 'H', 't', 't', 'p', 'R', '\010', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\"', '(', '\n', '\r',
+'O', 'p', 'e', 'r', 'a', 't', 'i', 'o', 'n', 'N', 'a', 'm', 'e', '\022', '\013', '\n', '\007', 'I', 'N', 'G', 'R', 'E', 'S', 'S', '\020',
+'\000', '\022', '\n', '\n', '\006', 'E', 'G', 'R', 'E', 'S', 'S', '\020', '\001', ':', '[', '\232', '\305', '\210', '\036', 'V', '\n', 'T', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.',
+'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v',
+'2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'T',
+'r', 'a', 'c', 'i', 'n', 'g', 'J', '\004', '\010', '\001', '\020', '\002', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\016', 'o', 'p', 'e', 'r', 'a',
+'t', 'i', 'o', 'n', '_', 'n', 'a', 'm', 'e', 'R', '\030', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e', 'a', 'd', 'e', 'r',
+'s', '_', 'f', 'o', 'r', '_', 't', 'a', 'g', 's', '\032', '\245', '\001', '\n', '\025', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd',
+'d', 'r', 'e', 's', 's', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '!', '\n', '\014', 'u', 'n', 'i', 'x', '_', 's', 'o', 'c', 'k', 'e',
+'t', 's', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\013', 'u', 'n', 'i', 'x', 'S', 'o', 'c', 'k', 'e', 't', 's', ':', 'i', '\232', '\305',
+'\210', '\036', 'd', '\n', 'b', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.',
+'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm',
+'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M',
+'a', 'n', 'a', 'g', 'e', 'r', '.', 'I', 'n', 't', 'e', 'r', 'n', 'a', 'l', 'A', 'd', 'd', 'r', 'e', 's', 's', 'C', 'o', 'n',
+'f', 'i', 'g', '\032', '\230', '\002', '\n', '\033', 'S', 'e', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'C', 'l', 'i', 'e', 'n', 't', 'C',
+'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', '\022', '4', '\n', '\007', 's', 'u', 'b', 'j', 'e', 'c', 't', '\030', '\001', ' ', '\001',
+'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l',
+'V', 'a', 'l', 'u', 'e', 'R', '\007', 's', 'u', 'b', 'j', 'e', 'c', 't', '\022', '\022', '\n', '\004', 'c', 'e', 'r', 't', '\030', '\003', ' ',
+'\001', '(', '\010', 'R', '\004', 'c', 'e', 'r', 't', '\022', '\024', '\n', '\005', 'c', 'h', 'a', 'i', 'n', '\030', '\006', ' ', '\001', '(', '\010', 'R',
+'\005', 'c', 'h', 'a', 'i', 'n', '\022', '\020', '\n', '\003', 'd', 'n', 's', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\003', 'd', 'n', 's', '\022',
+'\020', '\n', '\003', 'u', 'r', 'i', '\030', '\005', ' ', '\001', '(', '\010', 'R', '\003', 'u', 'r', 'i', ':', 'o', '\232', '\305', '\210', '\036', 'j', '\n',
+'h', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w',
+'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g',
+'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g',
+'e', 'r', '.', 'S', 'e', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'D', 'e',
+'t', 'a', 'i', 'l', 's', 'J', '\004', '\010', '\002', '\020', '\003', '\032', '\256', '\002', '\n', '\r', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o',
+'n', 'f', 'i', 'g', '\022', '!', '\n', '\014', 'u', 'p', 'g', 'r', 'a', 'd', 'e', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(',
+'\t', 'R', '\013', 'u', 'p', 'g', 'r', 'a', 'd', 'e', 'T', 'y', 'p', 'e', '\022', 'a', '\n', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's',
+'\030', '\002', ' ', '\003', '(', '\013', '2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's',
+'.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'H', 't', 't', 'p', 'F', 'i',
+'l', 't', 'e', 'r', 'R', '\007', 'f', 'i', 'l', 't', 'e', 'r', 's', '\022', '4', '\n', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', '\030',
+'\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B',
+'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '\007', 'e', 'n', 'a', 'b', 'l', 'e', 'd', ':', 'a', '\232', '\305', '\210', '\036', '\\', '\n',
+'Z', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w',
+'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g',
+'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g',
+'e', 'r', '.', 'U', 'p', 'g', 'r', 'a', 'd', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\"', '6', '\n', '\t', 'C', 'o', 'd', 'e', 'c',
+'T', 'y', 'p', 'e', '\022', '\010', '\n', '\004', 'A', 'U', 'T', 'O', '\020', '\000', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '1', '\020', '\001',
+'\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '2', '\020', '\002', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '3', '\020', '\003', '\"', 'S', '\n',
+'\032', 'S', 'e', 'r', 'v', 'e', 'r', 'H', 'e', 'a', 'd', 'e', 'r', 'T', 'r', 'a', 'n', 's', 'f', 'o', 'r', 'm', 'a', 't', 'i',
+'o', 'n', '\022', '\r', '\n', '\t', 'O', 'V', 'E', 'R', 'W', 'R', 'I', 'T', 'E', '\020', '\000', '\022', '\024', '\n', '\020', 'A', 'P', 'P', 'E',
+'N', 'D', '_', 'I', 'F', '_', 'A', 'B', 'S', 'E', 'N', 'T', '\020', '\001', '\022', '\020', '\n', '\014', 'P', 'A', 'S', 'S', '_', 'T', 'H',
+'R', 'O', 'U', 'G', 'H', '\020', '\002', '\"', 'y', '\n', '\030', 'F', 'o', 'r', 'w', 'a', 'r', 'd', 'C', 'l', 'i', 'e', 'n', 't', 'C',
+'e', 'r', 't', 'D', 'e', 't', 'a', 'i', 'l', 's', '\022', '\014', '\n', '\010', 'S', 'A', 'N', 'I', 'T', 'I', 'Z', 'E', '\020', '\000', '\022',
+'\020', '\n', '\014', 'F', 'O', 'R', 'W', 'A', 'R', 'D', '_', 'O', 'N', 'L', 'Y', '\020', '\001', '\022', '\022', '\n', '\016', 'A', 'P', 'P', 'E',
+'N', 'D', '_', 'F', 'O', 'R', 'W', 'A', 'R', 'D', '\020', '\002', '\022', '\020', '\n', '\014', 'S', 'A', 'N', 'I', 'T', 'I', 'Z', 'E', '_',
+'S', 'E', 'T', '\020', '\003', '\022', '\027', '\n', '\023', 'A', 'L', 'W', 'A', 'Y', 'S', '_', 'F', 'O', 'R', 'W', 'A', 'R', 'D', '_', 'O',
+'N', 'L', 'Y', '\020', '\004', ':', 'S', '\232', '\305', '\210', '\036', 'N', '\n', 'L', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'C', 'o',
+'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', 'B', '\026', '\n', '\017', 'r', 'o', 'u', 't', 'e', '_',
+'s', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'B', '\021', '\n', '\017', 's', 't', 'r', 'i', 'p', '_', 'p',
+'o', 'r', 't', '_', 'm', 'o', 'd', 'e', 'J', '\004', '\010', '\033', '\020', '\034', 'J', '\004', '\010', '\013', '\020', '\014', 'R', '\014', 'i', 'd', 'l',
+'e', '_', 't', 'i', 'm', 'e', 'o', 'u', 't', '\"', '\312', '\001', '\n', '\020', 'L', 'o', 'c', 'a', 'l', 'R', 'e', 'p', 'l', 'y', 'C',
+'o', 'n', 'f', 'i', 'g', '\022', 'e', '\n', '\007', 'm', 'a', 'p', 'p', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', 'K', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.',
+'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm',
+'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', 'M', 'a', 'p', 'p', 'e', 'r', 'R',
+'\007', 'm', 'a', 'p', 'p', 'e', 'r', 's', '\022', 'O', '\n', '\013', 'b', 'o', 'd', 'y', '_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\002',
+' ', '\001', '(', '\013', '2', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'i', 'o', 'n', 'F', 'o', 'r', 'm', 'a', 't', 'S', 't', 'r', 'i',
+'n', 'g', 'R', '\n', 'b', 'o', 'd', 'y', 'F', 'o', 'r', 'm', 'a', 't', '\"', '\234', '\003', '\n', '\016', 'R', 'e', 's', 'p', 'o', 'n',
+'s', 'e', 'M', 'a', 'p', 'p', 'e', 'r', '\022', 'L', '\n', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\013', '2',
+'*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'a', 'c', 'c', 'e', 's', 's', 'l', 'o', 'g', '.',
+'v', '3', '.', 'A', 'c', 'c', 'e', 's', 's', 'L', 'o', 'g', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001',
+'\002', '\020', '\001', 'R', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\022', 'J', '\n', '\013', 's', 't', 'a', 't', 'u', 's', '_', 'c', 'o', 'd',
+'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\013', '\372', 'B', '\010', '*', '\006', '\020', '\330', '\004', '(', '\310', '\001',
+'R', '\n', 's', 't', 'a', 't', 'u', 's', 'C', 'o', 'd', 'e', '\022', '4', '\n', '\004', 'b', 'o', 'd', 'y', '\030', '\003', ' ', '\001', '(',
+'\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\004', 'b', 'o', 'd', 'y', '\022', '`', '\n', '\024', 'b', 'o', 'd', 'y', '_',
+'f', 'o', 'r', 'm', 'a', 't', '_', 'o', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', '.', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'S', 'u', 'b', 's', 't',
+'i', 't', 'u', 't', 'i', 'o', 'n', 'F', 'o', 'r', 'm', 'a', 't', 'S', 't', 'r', 'i', 'n', 'g', 'R', '\022', 'b', 'o', 'd', 'y',
+'F', 'o', 'r', 'm', 'a', 't', 'O', 'v', 'e', 'r', 'r', 'i', 'd', 'e', '\022', 'X', '\n', '\016', 'h', 'e', 'a', 'd', 'e', 'r', 's',
+'_', 't', 'o', '_', 'a', 'd', 'd', '\030', '\005', ' ', '\003', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'O', 'p',
+'t', 'i', 'o', 'n', 'B', '\t', '\372', 'B', '\006', '\222', '\001', '\003', '\020', '\350', '\007', 'R', '\014', 'h', 'e', 'a', 'd', 'e', 'r', 's', 'T',
+'o', 'A', 'd', 'd', '\"', '\307', '\001', '\n', '\003', 'R', 'd', 's', '\022', 'Q', '\n', '\r', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o',
+'u', 'r', 'c', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B',
+'\005', '\212', '\001', '\002', '\020', '\001', 'R', '\014', 'c', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '*', '\n', '\021', 'r',
+'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\017', 'r',
+'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'N', 'a', 'm', 'e', ':', 'A', '\232', '\305', '\210', '\036', '<', '\n', ':', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k',
+'.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.',
+'v', '2', '.', 'R', 'd', 's', '\"', '\367', '\001', '\n', '\035', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n',
+'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', 'L', 'i', 's', 't', '\022', 'y', '\n', '\033', 's', 'c', 'o', 'p', 'e', 'd',
+'_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', '\030', '\001', ' ', '\003',
+'(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v',
+'3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o',
+'n', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\031', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C',
+'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', ':', '[', '\232', '\305', '\210', '\036', 'V', '\n', 'T', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.',
+'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v',
+'2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o',
+'n', 's', 'L', 'i', 's', 't', '\"', '\351', '\016', '\n', '\014', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', '\033',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a',
+'m', 'e', '\022', '\217', '\001', '\n', '\021', 's', 'c', 'o', 'p', 'e', '_', 'k', 'e', 'y', '_', 'b', 'u', 'i', 'l', 'd', 'e', 'r', '\030',
+'\002', ' ', '\001', '(', '\013', '2', 'Y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.',
+'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n',
+'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R',
+'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'B', '\010', '\372', 'B',
+'\005', '\212', '\001', '\002', '\020', '\001', 'R', '\017', 's', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '\022', 'X',
+'\n', '\021', 'r', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\003', ' ', '\001', '(', '\013',
+'2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C',
+'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\017', 'r', 'd',
+'s', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', '\022', '\245', '\001', '\n', ' ', 's', 'c', 'o', 'p', 'e', 'd', '_',
+'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', '_', 'l', 'i', 's', 't',
+'\030', '\004', ' ', '\001', '(', '\013', '2', 'Z', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's',
+'.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd',
+'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', 's', 'L', 'i', 's', 't', 'H', '\000',
+'R', '\035', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o',
+'n', 's', 'L', 'i', 's', 't', '\022', 'g', '\n', '\n', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'd', 's', '\030', '\005', ' ', '\001', '(',
+'\013', '2', 'F', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't',
+'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', 'H', '\000',
+'R', '\t', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', '\032', '\331', '\t', '\n', '\017', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B',
+'u', 'i', 'l', 'd', 'e', 'r', '\022', '\221', '\001', '\n', '\t', 'f', 'r', 'a', 'g', 'm', 'e', 'n', 't', 's', '\030', '\001', ' ', '\003', '(',
+'\013', '2', 'i', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't',
+'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e',
+'s', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n',
+'t', 'B', 'u', 'i', 'l', 'd', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\t', 'f', 'r', 'a', 'g', 'm',
+'e', 'n', 't', 's', '\032', '\325', '\007', '\n', '\017', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '\022',
+'\266', '\001', '\n', '\026', 'h', 'e', 'a', 'd', 'e', 'r', '_', 'v', 'a', 'l', 'u', 'e', '_', 'e', 'x', 't', 'r', 'a', 'c', 't', 'o',
+'r', '\030', '\001', ' ', '\001', '(', '\013', '2', '~', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n',
+'s', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o',
+'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e',
+'d', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'F',
+'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u',
+'e', 'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', 'H', '\000', 'R', '\024', 'h', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e',
+'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', '\032', '\217', '\005', '\n', '\024', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e',
+'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007',
+'\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '+', '\n', '\021', 'e', 'l', 'e', 'm', 'e', 'n', 't', '_',
+'s', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\020', 'e', 'l', 'e', 'm', 'e', 'n', 't', 'S',
+'e', 'p', 'a', 'r', 'a', 't', 'o', 'r', '\022', '\026', '\n', '\005', 'i', 'n', 'd', 'e', 'x', '\030', '\003', ' ', '\001', '(', '\r', 'H', '\000',
+'R', '\005', 'i', 'n', 'd', 'e', 'x', '\022', '\245', '\001', '\n', '\007', 'e', 'l', 'e', 'm', 'e', 'n', 't', '\030', '\004', ' ', '\001', '(', '\013',
+'2', '\210', '\001', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 'f', 'i', 'l', 't',
+'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i',
+'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e',
+'s', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n',
+'t', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'E', 'x', 't', 'r', 'a',
+'c', 't', 'o', 'r', '.', 'K', 'v', 'E', 'l', 'e', 'm', 'e', 'n', 't', 'H', '\000', 'R', '\007', 'e', 'l', 'e', 'm', 'e', 'n', 't',
+'\032', '\333', '\001', '\n', '\t', 'K', 'v', 'E', 'l', 'e', 'm', 'e', 'n', 't', '\022', '%', '\n', '\t', 's', 'e', 'p', 'a', 'r', 'a', 't',
+'o', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\t', 's', 'e', 'p', 'a', 'r', 'a',
+'t', 'o', 'r', '\022', '\031', '\n', '\003', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001',
+'R', '\003', 'k', 'e', 'y', ':', '\213', '\001', '\232', '\305', '\210', '\036', '\205', '\001', '\n', '\202', '\001', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o',
+'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_',
+'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o',
+'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r',
+'.', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a',
+'l', 'u', 'e', 'E', 'x', 't', 'r', 'a', 'c', 't', 'o', 'r', '.', 'K', 'v', 'E', 'l', 'e', 'm', 'e', 'n', 't', ':', '\177', '\232',
+'\305', '\210', '\036', 'z', '\n', 'x', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r',
+'.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_',
+'m', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S',
+'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u',
+'i', 'l', 'd', 'e', 'r', '.', 'H', 'e', 'a', 'd', 'e', 'r', 'V', 'a', 'l', 'u', 'e', 'E', 'x', 't', 'r', 'a', 'c', 't', 'o',
+'r', 'B', '\016', '\n', '\014', 'e', 'x', 't', 'r', 'a', 'c', 't', '_', 't', 'y', 'p', 'e', ':', 'j', '\232', '\305', '\210', '\036', 'e', '\n',
+'c', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w',
+'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g',
+'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K',
+'e', 'y', 'B', 'u', 'i', 'l', 'd', 'e', 'r', '.', 'F', 'r', 'a', 'g', 'm', 'e', 'n', 't', 'B', 'u', 'i', 'l', 'd', 'e', 'r',
+'B', '\013', '\n', '\004', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', ':', 'Z', '\232', '\305', '\210', '\036', 'U', '\n', 'S', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.',
+'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v',
+'2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '.', 'S', 'c', 'o', 'p', 'e', 'K', 'e', 'y', 'B', 'u',
+'i', 'l', 'd', 'e', 'r', ':', 'J', '\232', '\305', '\210', '\036', 'E', '\n', 'C', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n',
+'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd',
+'R', 'o', 'u', 't', 'e', 's', 'B', '\027', '\n', '\020', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e',
+'r', '\022', '\003', '\370', 'B', '\001', '\"', '\273', '\001', '\n', '\t', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', '\022', 'e', '\n', '\030', 's',
+'c', 'o', 'p', 'e', 'd', '_', 'r', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '\030', '\001',
+' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001',
+'R', '\025', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', ':', 'G',
+'\232', '\305', '\210', '\036', 'B', '\n', '@', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e',
+'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n',
+'_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'd', 's', '\"', '\314', '\002', '\n',
+'\n', 'H', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t',
+'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '9', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_',
+'c', 'o', 'n', 'f', 'i', 'g', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', '\022',
+'X', '\n', '\020', 'c', 'o', 'n', 'f', 'i', 'g', '_', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '\030', '\005', ' ', '\001', '(', '\013',
+'2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'E',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'H', '\000', 'R', '\017', 'c',
+'o', 'n', 'f', 'i', 'g', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '\022', '\037', '\n', '\013', 'i', 's', '_', 'o', 'p', 't', 'i',
+'o', 'n', 'a', 'l', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\n', 'i', 's', 'O', 'p', 't', 'i', 'o', 'n', 'a', 'l', ':', 'H', '\232',
+'\305', '\210', '\036', 'C', '\n', 'A', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r',
+'.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_',
+'m', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.', 'H', 't', 't', 'p', 'F', 'i', 'l', 't', 'e', 'r', 'B', '\r', '\n', '\013',
+'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\003', '\020', '\004', 'J', '\004', '\010', '\002', '\020', '\003', 'R', '\006',
+'c', 'o', 'n', 'f', 'i', 'g', '\"', '\237', '\001', '\n', '\022', 'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'D', 'E', 'x', 't', 'e', 'n',
+'s', 'i', 'o', 'n', '\022', '7', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\001', ' ', '\001', '(',
+'\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\013',
+'t', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', 'P', '\232', '\305', '\210', '\036', 'K', '\n', 'I', 'e', 'n', 'v', 'o', 'y',
+'.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'f', 'i', 'l', 't', 'e', 'r', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't',
+'t', 'p', '_', 'c', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '2', '.',
+'R', 'e', 'q', 'u', 'e', 's', 't', 'I', 'D', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'B', 'q', '\n', 'I', 'i', 'o', '.',
+'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', 's', '.', 'f', 'i', 'l', 't', 'e', 'r', 's', '.', 'n', 'e', 't', 'w', 'o', 'r', 'k', '.', 'h', 't', 't', 'p', '_', 'c',
+'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', '_', 'm', 'a', 'n', 'a', 'g', 'e', 'r', '.', 'v', '3', 'B', '\032', 'H', 't', 't',
+'p', 'C', 'o', 'n', 'n', 'e', 'c', 't', 'i', 'o', 'n', 'M', 'a', 'n', 'a', 'g', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001',
+'\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[20] = {
+ &envoy_config_accesslog_v3_accesslog_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_config_source_proto_upbdefinit,
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_config_core_v3_protocol_proto_upbdefinit,
+ &envoy_config_core_v3_substitution_format_string_proto_upbdefinit,
+ &envoy_config_route_v3_route_proto_upbdefinit,
+ &envoy_config_route_v3_scoped_route_proto_upbdefinit,
+ &envoy_config_trace_v3_http_tracer_proto_upbdefinit,
+ &envoy_type_tracing_v3_custom_tag_proto_upbdefinit,
+ &envoy_type_v3_percent_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_migrate_proto_upbdefinit,
+ &udpa_annotations_security_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto",
+ UPB_STRVIEW_INIT(descriptor, 10141)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h
new file mode 100644
index 00000000000..bf8b017acf6
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h
@@ -0,0 +1,115 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_FILTERS_NETWORK_HTTP_CONNECTION_MANAGER_V3_HTTP_CONNECTION_MANAGER_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_FILTERS_NETWORK_HTTP_CONNECTION_MANAGER_V3_HTTP_CONNECTION_MANAGER_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_def_init envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_Tracing_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.Tracing");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_InternalAddressConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.InternalAddressConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_SetCurrentClientCertDetails_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.SetCurrentClientCertDetails");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_UpgradeConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.UpgradeConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_LocalReplyConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ResponseMapper_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_Rds_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.Rds");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRouteConfigurationsList_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRouteConfigurationsList");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRoutes_ScopeKeyBuilder_FragmentBuilder_HeaderValueExtractor_KvElement_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRoutes.ScopeKeyBuilder.FragmentBuilder.HeaderValueExtractor.KvElement");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_ScopedRds_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.ScopedRds");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.HttpFilter");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_filters_network_http_connection_manager_v3_RequestIDExtension_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_filters_network_http_connection_manager_v3_http_connection_manager_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.filters.network.http_connection_manager.v3.RequestIDExtension");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_FILTERS_NETWORK_HTTP_CONNECTION_MANAGER_V3_HTTP_CONNECTION_MANAGER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c
new file mode 100644
index 00000000000..c5af26143a0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c
@@ -0,0 +1,44 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/cert.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h"
+
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit;
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit;
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit;
+
+static const char descriptor[348] = {'\n', '4', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p',
+'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 'c', 'e', 'r', 't', '.', 'p',
+'r', 'o', 't', 'o', '\022', ')', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r',
+'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '\032', '6', 'e',
+'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't',
+'_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'p', 'r',
+'o', 't', 'o', '\032', '6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a',
+'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 's', 'e', 'c',
+'r', 'e', 't', '.', 'p', 'r', 'o', 't', 'o', '\032', '3', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/',
+'v', '3', '/', 't', 'l', 's', '.', 'p', 'r', 'o', 't', 'o', 'B', 'F', '\n', '7', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p',
+'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a',
+'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', 'B', '\t', 'C', 'e',
+'r', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'P', '\000', 'P', '\001', 'P', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit,
+ &envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit,
+ &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_transport_sockets_tls_v3_cert_proto_upbdefinit = {
+ deps,
+ NULL,
+ "envoy/extensions/transport_sockets/tls/v3/cert.proto",
+ UPB_STRVIEW_INIT(descriptor, 348)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h
new file mode 100644
index 00000000000..524d994a2d2
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h
@@ -0,0 +1,30 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/cert.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_CERT_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_CERT_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_def_init envoy_extensions_transport_sockets_tls_v3_cert_proto_upbdefinit;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_CERT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c
new file mode 100644
index 00000000000..dbf238cbbec
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c
@@ -0,0 +1,170 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/common.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit;
+
+static const upb_msglayout *layouts[5] = {
+ &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit,
+};
+
+static const char descriptor[2914] = {'\n', '6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p',
+'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 'c', 'o', 'm', 'm', 'o', 'n',
+'.', 'p', 'r', 'o', 't', 'o', '\022', ')', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.',
+'t', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '\032',
+'\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h',
+'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l',
+'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'g', 'o', 'o',
+'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\032', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'n', 's',
+'i', 't', 'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\"', '\362', '\003', '\n', '\r', 'T', 'l', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '\022', '\217', '\001', '\n', '\034',
+'t', 'l', 's', '_', 'm', 'i', 'n', 'i', 'm', 'u', 'm', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'v', 'e', 'r', 's',
+'i', 'o', 'n', '\030', '\001', ' ', '\001', '(', '\016', '2', 'D', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i',
+'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's',
+'.', 'v', '3', '.', 'T', 'l', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '.', 'T', 'l', 's', 'P', 'r', 'o', 't',
+'o', 'c', 'o', 'l', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\031', 't', 'l', 's', 'M', 'i', 'n', 'i', 'm', 'u',
+'m', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '\217', '\001', '\n', '\034', 't', 'l', 's', '_',
+'m', 'a', 'x', 'i', 'm', 'u', 'm', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\030',
+'\002', ' ', '\001', '(', '\016', '2', 'D', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.',
+'t', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.',
+'T', 'l', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', '.', 'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l',
+'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\031', 't', 'l', 's', 'M', 'a', 'x', 'i', 'm', 'u', 'm', 'P', 'r', 'o',
+'t', 'o', 'c', 'o', 'l', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '#', '\n', '\r', 'c', 'i', 'p', 'h', 'e', 'r', '_', 's', 'u',
+'i', 't', 'e', 's', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\014', 'c', 'i', 'p', 'h', 'e', 'r', 'S', 'u', 'i', 't', 'e', 's', '\022',
+'\037', '\n', '\013', 'e', 'c', 'd', 'h', '_', 'c', 'u', 'r', 'v', 'e', 's', '\030', '\004', ' ', '\003', '(', '\t', 'R', '\n', 'e', 'c', 'd',
+'h', 'C', 'u', 'r', 'v', 'e', 's', '\"', 'O', '\n', '\013', 'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'c', 'o', 'l', '\022', '\014', '\n',
+'\010', 'T', 'L', 'S', '_', 'A', 'U', 'T', 'O', '\020', '\000', '\022', '\013', '\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '0', '\020', '\001', '\022',
+'\013', '\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '1', '\020', '\002', '\022', '\013', '\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '2', '\020', '\003',
+'\022', '\013', '\n', '\007', 'T', 'L', 'S', 'v', '1', '_', '3', '\020', '\004', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', 's', 'P', 'a', 'r', 'a', 'm', 'e', 't',
+'e', 'r', 's', '\"', '\317', '\001', '\n', '\022', 'P', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', 'y', 'P', 'r', 'o', 'v', 'i', 'd', 'e',
+'r', '\022', ',', '\n', '\r', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\014', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'N', 'a', 'm', 'e', '\022', 'A', '\n',
+'\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o',
+'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'H',
+'\000', 'R', '\013', 't', 'y', 'p', 'e', 'd', 'C', 'o', 'n', 'f', 'i', 'g', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'P', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e',
+'y', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'B', '\r', '\n', '\013', 'c', 'o', 'n', 'f', 'i', 'g', '_', 't', 'y', 'p', 'e', 'J',
+'\004', '\010', '\002', '\020', '\003', 'R', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\"', '\206', '\005', '\n', '\016', 'T', 'l', 's', 'C', 'e', 'r', 't',
+'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', 'M', '\n', '\021', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'c', 'h',
+'a', 'i', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\020', 'c', 'e', 'r', 't', 'i',
+'f', 'i', 'c', 'a', 't', 'e', 'C', 'h', 'a', 'i', 'n', '\022', 'I', '\n', '\013', 'p', 'r', 'i', 'v', 'a', 't', 'e', '_', 'k', 'e',
+'y', '\030', '\002', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'R',
+'\n', 'p', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e', 'y', '\022', 'S', '\n', '\021', 'w', 'a', 't', 'c', 'h', 'e', 'd', '_', 'd', 'i',
+'r', 'e', 'c', 't', 'o', 'r', 'y', '\030', '\007', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'W', 'a', 't', 'c', 'h', 'e', 'd', 'D', 'i', 'r', 'e', 'c', 't',
+'o', 'r', 'y', 'R', '\020', 'w', 'a', 't', 'c', 'h', 'e', 'd', 'D', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\022', 'o', '\n', '\024',
+'p', 'r', 'i', 'v', 'a', 't', 'e', '_', 'k', 'e', 'y', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\006', ' ', '\001', '(',
+'\013', '2', '=', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n',
+'s', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'P', 'r', 'i', 'v',
+'a', 't', 'e', 'K', 'e', 'y', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'R', '\022', 'p', 'r', 'i', 'v', 'a', 't', 'e', 'K', 'e',
+'y', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\022', 'D', '\n', '\010', 'p', 'a', 's', 's', 'w', 'o', 'r', 'd', '\030', '\003', ' ', '\001',
+'(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270', '\267', '\213', '\244', '\002', '\001', 'R', '\010', 'p', 'a', 's', 's',
+'w', 'o', 'r', 'd', '\022', 'A', '\n', '\013', 'o', 'c', 's', 'p', '_', 's', 't', 'a', 'p', 'l', 'e', '\030', '\004', ' ', '\001', '(', '\013',
+'2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D',
+'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\n', 'o', 'c', 's', 'p', 'S', 't', 'a', 'p', 'l', 'e', '\022', 'b', '\n', '\034',
+'s', 'i', 'g', 'n', 'e', 'd', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 't', 'i', 'm', 'e', 's', 't',
+'a', 'm', 'p', '\030', '\005', ' ', '\003', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\032', 's', 'i', 'g', 'n', 'e',
+'d', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', ':', '\'', '\232', '\305',
+'\210', '\036', '\"', '\n', ' ', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l',
+'s', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\"', '\213', '\001', '\n', '\024', 'T', 'l', 's', 'S', 'e', 's', 's', 'i',
+'o', 'n', 'T', 'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', '\022', 'D', '\n', '\004', 'k', 'e', 'y', 's', '\030', '\001', ' ', '\003', '(',
+'\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\016', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', '\270', '\267', '\213', '\244', '\002',
+'\001', 'R', '\004', 'k', 'e', 'y', 's', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i',
+'.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'T', 'l', 's', 'S', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', 'k', 'e', 't',
+'K', 'e', 'y', 's', '\"', '\307', '\007', '\n', '\034', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd',
+'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '?', '\n', '\n', 't', 'r', 'u', 's', 't', 'e', 'd', '_', 'c',
+'a', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 't', 'r', 'u', 's', 't', 'e', 'd',
+'C', 'a', '\022', 'S', '\n', '\021', 'w', 'a', 't', 'c', 'h', 'e', 'd', '_', 'd', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\030', '\013',
+' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'W', 'a', 't', 'c', 'h', 'e', 'd', 'D', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', 'R', '\020', 'w', 'a', 't', 'c',
+'h', 'e', 'd', 'D', 'i', 'r', 'e', 'c', 't', 'o', 'r', 'y', '\022', 'F', '\n', '\027', 'v', 'e', 'r', 'i', 'f', 'y', '_', 'c', 'e',
+'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 's', 'p', 'k', 'i', '\030', '\003', ' ', '\003', '(', '\t', 'B', '\016', '\372', 'B', '\013',
+'\222', '\001', '\010', '\"', '\006', 'r', '\004', '\020', ',', '(', ',', 'R', '\025', 'v', 'e', 'r', 'i', 'f', 'y', 'C', 'e', 'r', 't', 'i', 'f',
+'i', 'c', 'a', 't', 'e', 'S', 'p', 'k', 'i', '\022', 'F', '\n', '\027', 'v', 'e', 'r', 'i', 'f', 'y', '_', 'c', 'e', 'r', 't', 'i',
+'f', 'i', 'c', 'a', 't', 'e', '_', 'h', 'a', 's', 'h', '\030', '\002', ' ', '\003', '(', '\t', 'B', '\016', '\372', 'B', '\013', '\222', '\001', '\010',
+'\"', '\006', 'r', '\004', '\020', '@', '(', '_', 'R', '\025', 'v', 'e', 'r', 'i', 'f', 'y', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a',
+'t', 'e', 'H', 'a', 's', 'h', '\022', '[', '\n', '\027', 'm', 'a', 't', 'c', 'h', '_', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', 'a',
+'l', 't', '_', 'n', 'a', 'm', 'e', 's', '\030', '\t', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h',
+'e', 'r', 'R', '\024', 'm', 'a', 't', 'c', 'h', 'S', 'u', 'b', 'j', 'e', 'c', 't', 'A', 'l', 't', 'N', 'a', 'm', 'e', 's', '\022',
+'k', '\n', '$', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 's', 'i', 'g', 'n', 'e', 'd', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i',
+'c', 'a', 't', 'e', '_', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a', 'l', 'u', 'e', 'R', '!',
+'r', 'e', 'q', 'u', 'i', 'r', 'e', 'S', 'i', 'g', 'n', 'e', 'd', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'T',
+'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '2', '\n', '\003', 'c', 'r', 'l', '\030', '\007', ' ', '\001', '(', '\013', '2', ' ', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S',
+'o', 'u', 'r', 'c', 'e', 'R', '\003', 'c', 'r', 'l', '\022', ':', '\n', '\031', 'a', 'l', 'l', 'o', 'w', '_', 'e', 'x', 'p', 'i', 'r',
+'e', 'd', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\030', '\010', ' ', '\001', '(', '\010', 'R', '\027', 'a', 'l', 'l',
+'o', 'w', 'E', 'x', 'p', 'i', 'r', 'e', 'd', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', '\242', '\001', '\n', '\030',
+'t', 'r', 'u', 's', 't', '_', 'c', 'h', 'a', 'i', 'n', '_', 'v', 'e', 'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', '\030',
+'\n', ' ', '\001', '(', '\016', '2', '^', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.',
+'t', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.',
+'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't',
+'e', 'x', 't', '.', 'T', 'r', 'u', 's', 't', 'C', 'h', 'a', 'i', 'n', 'V', 'e', 'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o',
+'n', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\026', 't', 'r', 'u', 's', 't', 'C', 'h', 'a', 'i', 'n', 'V', 'e',
+'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', '\"', 'F', '\n', '\026', 'T', 'r', 'u', 's', 't', 'C', 'h', 'a', 'i', 'n', 'V',
+'e', 'r', 'i', 'f', 'i', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\022', 'V', 'E', 'R', 'I', 'F', 'Y', '_', 'T', 'R', 'U',
+'S', 'T', '_', 'C', 'H', 'A', 'I', 'N', '\020', '\000', '\022', '\024', '\n', '\020', 'A', 'C', 'C', 'E', 'P', 'T', '_', 'U', 'N', 'T', 'R',
+'U', 'S', 'T', 'E', 'D', '\020', '\001', ':', '5', '\232', '\305', '\210', '\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i',
+'.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd',
+'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'J', '\004', '\010', '\004', '\020', '\005', 'J', '\004', '\010', '\005', '\020', '\006', 'R',
+'\027', 'v', 'e', 'r', 'i', 'f', 'y', '_', 's', 'u', 'b', 'j', 'e', 'c', 't', '_', 'a', 'l', 't', '_', 'n', 'a', 'm', 'e', 'B',
+'P', '\n', '7', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't',
+'s', '.', 't', 'l', 's', '.', 'v', '3', 'B', '\013', 'C', 'o', 'm', 'm', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[9] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_sensitive_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/transport_sockets/tls/v3/common.proto",
+ UPB_STRVIEW_INIT(descriptor, 2914)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h
new file mode 100644
index 00000000000..b289899d806
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h
@@ -0,0 +1,55 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/common.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_COMMON_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_COMMON_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_def_init envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_TlsParameters_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.TlsParameters");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_TlsCertificate_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.TlsCertificate");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_COMMON_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c
new file mode 100644
index 00000000000..5623e1bc881
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c
@@ -0,0 +1,97 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/secret.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_config_source_proto_upbdefinit;
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit;
+extern upb_def_init udpa_annotations_sensitive_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_GenericSecret_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_Secret_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_extensions_transport_sockets_tls_v3_GenericSecret_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_Secret_msginit,
+};
+
+static const char descriptor[1236] = {'\n', '6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p',
+'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 's', 'e', 'c', 'r', 'e', 't',
+'.', 'p', 'r', 'o', 't', 'o', '\022', ')', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.',
+'t', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '\032',
+'\037', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '(', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r',
+'e', '/', 'v', '3', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p', 'o',
+'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 'c', 'o', 'm', 'm', 'o', 'n', '.',
+'p', 'r', 'o', 't', 'o', '\032', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's',
+'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.',
+'p', 'r', 'o', 't', 'o', '\"', 'y', '\n', '\r', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', '\022', '@', '\n',
+'\006', 's', 'e', 'c', 'r', 'e', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n',
+'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'D', 'a', 't', 'a', 'S', 'o', 'u', 'r', 'c', 'e', 'B', '\006', '\270',
+'\267', '\213', '\244', '\002', '\001', 'R', '\006', 's', 'e', 'c', 'r', 'e', 't', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v',
+'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'c',
+'r', 'e', 't', '\"', '\233', '\001', '\n', '\017', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\033',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a',
+'m', 'e', '\022', 'A', '\n', '\n', 's', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '\"', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 'f',
+'i', 'g', 'S', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 's', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', ':', '(', '\232', '\305', '\210', '\036',
+'#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'S', 'd', 's', 'S',
+'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\"', '\373', '\003', '\n', '\006', 'S', 'e', 'c', 'r', 'e', 't', '\022', '\022', '\n',
+'\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', 'd', '\n', '\017', 't', 'l', 's', '_',
+'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '9', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c',
+'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'T', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't',
+'e', 'H', '\000', 'R', '\016', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\022', 'q', '\n', '\023', 's', 'e',
+'s', 's', 'i', 'o', 'n', '_', 't', 'i', 'c', 'k', 'e', 't', '_', 'k', 'e', 'y', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '?',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o',
+'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'T', 'l', 's', 'S', 'e', 's', 's',
+'i', 'o', 'n', 'T', 'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', 'H', '\000', 'R', '\021', 's', 'e', 's', 's', 'i', 'o', 'n', 'T',
+'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', '\022', 'x', '\n', '\022', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c',
+'o', 'n', 't', 'e', 'x', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e',
+'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.',
+'t', 'l', 's', '.', 'v', '3', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't',
+'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'H', '\000', 'R', '\021', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C',
+'o', 'n', 't', 'e', 'x', 't', '\022', 'a', '\n', '\016', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'c', 'r', 'e', 't', '\030',
+'\005', ' ', '\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.',
+'t', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.',
+'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'c', 'r', 'e', 't', 'H', '\000', 'R', '\r', 'g', 'e', 'n', 'e', 'r', 'i', 'c', 'S',
+'e', 'c', 'r', 'e', 't', ':', '\037', '\232', '\305', '\210', '\036', '\032', '\n', '\030', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v',
+'2', '.', 'a', 'u', 't', 'h', '.', 'S', 'e', 'c', 'r', 'e', 't', 'B', '\006', '\n', '\004', 't', 'y', 'p', 'e', 'B', 'P', '\n', '7',
+'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n',
+'s', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't',
+'l', 's', '.', 'v', '3', 'B', '\013', 'S', 'e', 'c', 'r', 'e', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006',
+'\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_core_v3_config_source_proto_upbdefinit,
+ &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit,
+ &udpa_annotations_sensitive_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/transport_sockets/tls/v3/secret.proto",
+ UPB_STRVIEW_INIT(descriptor, 1236)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h
new file mode 100644
index 00000000000..40daa22fed0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/secret.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_SECRET_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_SECRET_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_def_init envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_GenericSecret_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.GenericSecret");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_SdsSecretConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.SdsSecretConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_Secret_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.Secret");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_SECRET_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c
new file mode 100644
index 00000000000..a4651fcd688
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c
@@ -0,0 +1,246 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/tls.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_extension_proto_upbdefinit;
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit;
+extern upb_def_init envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_migrate_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_msginit;
+extern const upb_msglayout envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_msginit;
+
+static const upb_msglayout *layouts[6] = {
+ &envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_msginit,
+ &envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_msginit,
+};
+
+static const char descriptor[4707] = {'\n', '3', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p',
+'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/', 'v', '3', '/', 't', 'l', 's', '.', 'p', 'r',
+'o', 't', 'o', '\022', ')', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a',
+'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '\032', '$', 'e', 'n',
+'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'e', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o',
+'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '/', 't', 'l', 's', '/',
+'v', '3', '/', 'c', 'o', 'm', 'm', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\032', '6', 'e', 'n', 'v', 'o', 'y', '/', 'e', 'x',
+'t', 'e', 'n', 's', 'i', 'o', 'n', 's', '/', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't',
+'s', '/', 't', 'l', 's', '/', 'v', '3', '/', 's', 'e', 'c', 'r', 'e', 't', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p',
+'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!',
+'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i',
+'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a',
+'t', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\301', '\002', '\n', '\022', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'T', 'l', 's', 'C',
+'o', 'n', 't', 'e', 'x', 't', '\022', 'i', '\n', '\022', 'c', 'o', 'm', 'm', 'o', 'n', '_', 't', 'l', 's', '_', 'c', 'o', 'n', 't',
+'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i',
+'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's',
+'.', 'v', '3', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'R', '\020', 'c', 'o', 'm',
+'m', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\032', '\n', '\003', 's', 'n', 'i', '\030', '\002', ' ', '\001', '(',
+'\t', 'B', '\010', '\372', 'B', '\005', 'r', '\003', '(', '\377', '\001', 'R', '\003', 's', 'n', 'i', '\022', '/', '\n', '\023', 'a', 'l', 'l', 'o', 'w',
+'_', 'r', 'e', 'n', 'e', 'g', 'o', 't', 'i', 'a', 't', 'i', 'o', 'n', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\022', 'a', 'l', 'l',
+'o', 'w', 'R', 'e', 'n', 'e', 'g', 'o', 't', 'i', 'a', 't', 'i', 'o', 'n', '\022', 'F', '\n', '\020', 'm', 'a', 'x', '_', 's', 'e',
+'s', 's', 'i', 'o', 'n', '_', 'k', 'e', 'y', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'R', '\016', 'm', 'a',
+'x', 'S', 'e', 's', 's', 'i', 'o', 'n', 'K', 'e', 'y', 's', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', 'T', 'l', 's',
+'C', 'o', 'n', 't', 'e', 'x', 't', '\"', '\352', '\007', '\n', '\024', 'D', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', 'T', 'l', 's',
+'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'i', '\n', '\022', 'c', 'o', 'm', 'm', 'o', 'n', '_', 't', 'l', 's', '_', 'c', 'o', 'n',
+'t', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', ';', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l',
+'s', '.', 'v', '3', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'R', '\020', 'c', 'o',
+'m', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'X', '\n', '\032', 'r', 'e', 'q', 'u', 'i', 'r', 'e',
+'_', 'c', 'l', 'i', 'e', 'n', 't', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013',
+'2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a',
+'l', 'u', 'e', 'R', '\030', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'e', 'r', 't', 'i', 'f', 'i',
+'c', 'a', 't', 'e', '\022', ';', '\n', '\013', 'r', 'e', 'q', 'u', 'i', 'r', 'e', '_', 's', 'n', 'i', '\030', '\003', ' ', '\001', '(', '\013',
+'2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'B', 'o', 'o', 'l', 'V', 'a',
+'l', 'u', 'e', 'R', '\n', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'S', 'n', 'i', '\022', 'q', '\n', '\023', 's', 'e', 's', 's', 'i', 'o',
+'n', '_', 't', 'i', 'c', 'k', 'e', 't', '_', 'k', 'e', 'y', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '?', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's',
+'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'T', 'l', 's', 'S', 'e', 's', 's', 'i', 'o', 'n', 'T',
+'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', 'H', '\000', 'R', '\021', 's', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'c', 'k', 'e',
+'t', 'K', 'e', 'y', 's', '\022', '\215', '\001', '\n', '%', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 't', 'i', 'c', 'k', 'e', 't', '_',
+'k', 'e', 'y', 's', '_', 's', 'd', 's', '_', 's', 'e', 'c', 'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\005', ' ',
+'\001', '(', '\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r',
+'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'S', 'd',
+'s', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\000', 'R', ' ', 's', 'e', 's', 's', 'i', 'o', 'n', 'T',
+'i', 'c', 'k', 'e', 't', 'K', 'e', 'y', 's', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022',
+'Q', '\n', '$', 'd', 'i', 's', 'a', 'b', 'l', 'e', '_', 's', 't', 'a', 't', 'e', 'l', 'e', 's', 's', '_', 's', 'e', 's', 's',
+'i', 'o', 'n', '_', 'r', 'e', 's', 'u', 'm', 'p', 't', 'i', 'o', 'n', '\030', '\007', ' ', '\001', '(', '\010', 'H', '\000', 'R', '!', 'd',
+'i', 's', 'a', 'b', 'l', 'e', 'S', 't', 'a', 't', 'e', 'l', 'e', 's', 's', 'S', 'e', 's', 's', 'i', 'o', 'n', 'R', 'e', 's',
+'u', 'm', 'p', 't', 'i', 'o', 'n', '\022', 'T', '\n', '\017', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 't', 'i', 'm', 'e', 'o', 'u',
+'t', '\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', 'B', '\020', '\372', 'B', '\r', '\252', '\001', '\n', '\032', '\006', '\010', '\200', '\200', '\200', '\200', '\020',
+'2', '\000', 'R', '\016', 's', 'e', 's', 's', 'i', 'o', 'n', 'T', 'i', 'm', 'e', 'o', 'u', 't', '\022', '\210', '\001', '\n', '\022', 'o', 'c',
+'s', 'p', '_', 's', 't', 'a', 'p', 'l', 'e', '_', 'p', 'o', 'l', 'i', 'c', 'y', '\030', '\010', ' ', '\001', '(', '\016', '2', 'P', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r',
+'t', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'D', 'o', 'w', 'n', 's', 't', 'r', 'e',
+'a', 'm', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'O', 'c', 's', 'p', 'S', 't', 'a', 'p', 'l', 'e', 'P', 'o',
+'l', 'i', 'c', 'y', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\020', 'o', 'c', 's', 'p', 'S', 't', 'a', 'p', 'l',
+'e', 'P', 'o', 'l', 'i', 'c', 'y', '\"', 'N', '\n', '\020', 'O', 'c', 's', 'p', 'S', 't', 'a', 'p', 'l', 'e', 'P', 'o', 'l', 'i',
+'c', 'y', '\022', '\024', '\n', '\020', 'L', 'E', 'N', 'I', 'E', 'N', 'T', '_', 'S', 'T', 'A', 'P', 'L', 'I', 'N', 'G', '\020', '\000', '\022',
+'\023', '\n', '\017', 'S', 'T', 'R', 'I', 'C', 'T', '_', 'S', 'T', 'A', 'P', 'L', 'I', 'N', 'G', '\020', '\001', '\022', '\017', '\n', '\013', 'M',
+'U', 'S', 'T', '_', 'S', 'T', 'A', 'P', 'L', 'E', '\020', '\002', ':', '-', '\232', '\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'D', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', 'T',
+'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'B', '\032', '\n', '\030', 's', 'e', 's', 's', 'i', 'o', 'n', '_', 't', 'i', 'c', 'k',
+'e', 't', '_', 'k', 'e', 'y', 's', '_', 't', 'y', 'p', 'e', '\"', '\247', '\026', '\n', '\020', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l',
+'s', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'W', '\n', '\n', 't', 'l', 's', '_', 'p', 'a', 'r', 'a', 'm', 's', '\030', '\001', ' ',
+'\001', '(', '\013', '2', '8', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r',
+'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'T', 'l',
+'s', 'P', 'a', 'r', 'a', 'm', 'e', 't', 'e', 'r', 's', 'R', '\t', 't', 'l', 's', 'P', 'a', 'r', 'a', 'm', 's', '\022', 'd', '\n',
+'\020', 't', 'l', 's', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '9',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o',
+'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'T', 'l', 's', 'C', 'e', 'r', 't',
+'i', 'f', 'i', 'c', 'a', 't', 'e', 'R', '\017', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 's', '\022',
+'\220', '\001', '\n', '\"', 't', 'l', 's', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 's', 'd', 's', '_', 's',
+'e', 'c', 'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', ':', '.', 'e', 'n', 'v',
+'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's',
+'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o',
+'n', 'f', 'i', 'g', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\020', '\001', 'R', '\036', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f',
+'i', 'c', 'a', 't', 'e', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', 's', '\022', '\240', '\001', '\n',
+'$', 't', 'l', 's', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c',
+'a', 't', 'e', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\t', ' ', '\001', '(', '\013', '2', 'O', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o',
+'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n',
+'t', 'e', 'x', 't', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'R',
+'!', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't',
+'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\022', '\271', '\001', '\n', '-', 't', 'l', 's', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i',
+'c', 'a', 't', 'e', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r',
+'_', 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', '\030', '\013', ' ', '\001', '(', '\013', '2', 'W', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e',
+'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e',
+'t', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x',
+'t', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't',
+'a', 'n', 'c', 'e', 'R', ')', 't', 'l', 's', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'C', 'e', 'r', 't', 'i',
+'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', '\022', 'x', '\n',
+'\022', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\003', ' ', '\001', '(', '\013',
+'2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's',
+'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C', 'e', 'r', 't', 'i',
+'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'H', '\000',
+'R', '\021', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\214', '\001', '\n', '$', 'v',
+'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 's', 'd', 's', '_', 's', 'e', 'c',
+'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\007', ' ', '\001', '(', '\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k',
+'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i',
+'g', 'H', '\000', 'R', ' ', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'S', 'd', 's',
+'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\022', '\242', '\001', '\n', '\033', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'd',
+'_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\010', ' ', '\001', '(', '\013',
+'2', '`', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's',
+'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C', 'o', 'm', 'm', 'o',
+'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'd', 'C', 'e', 'r', 't', 'i',
+'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'H', '\000',
+'R', '\031', 'c', 'o', 'm', 'b', 'i', 'n', 'e', 'd', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e',
+'x', 't', '\022', '\250', '\001', '\n', '\'', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't',
+'_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\n', ' ', '\001',
+'(', '\013', '2', 'O', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a',
+'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C', 'o', 'm',
+'m', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e',
+'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'H', '\000', 'R', '$', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n',
+'t', 'e', 'x', 't', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\022', '\301',
+'\001', '\n', '0', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 'c', 'e', 'r',
+'t', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '_', 'i', 'n', 's', 't', 'a', 'n', 'c',
+'e', '\030', '\014', ' ', '\001', '(', '\013', '2', 'W', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n',
+'s', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v',
+'3', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'C', 'e', 'r', 't', 'i', 'f',
+'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', 'H', '\000', 'R', ',',
+'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c',
+'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', '\022', '%', '\n', '\016', 'a', 'l',
+'p', 'n', '_', 'p', 'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\030', '\004', ' ', '\003', '(', '\t', 'R', '\r', 'a', 'l', 'p', 'n', 'P',
+'r', 'o', 't', 'o', 'c', 'o', 'l', 's', '\022', 'W', '\n', '\021', 'c', 'u', 's', 't', 'o', 'm', '_', 'h', 'a', 'n', 'd', 's', 'h',
+'a', 'k', 'e', 'r', '\030', '\r', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e', 'd', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o',
+'n', 'f', 'i', 'g', 'R', '\020', 'c', 'u', 's', 't', 'o', 'm', 'H', 'a', 'n', 'd', 's', 'h', 'a', 'k', 'e', 'r', '\032', '\222', '\001',
+'\n', '\023', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\022', '\033', '\n', '\004',
+'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e',
+'\022', 'O', '\n', '\014', 't', 'y', 'p', 'e', 'd', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', '*', '.',
+'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'T', 'y', 'p', 'e',
+'d', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'C', 'o', 'n', 'f', 'i', 'g', 'H', '\000', 'R', '\013', 't', 'y', 'p', 'e', 'd',
+'C', 'o', 'n', 'f', 'i', 'g', 'B', '\r', '\n', '\006', 'c', 'o', 'n', 'f', 'i', 'g', '\022', '\003', '\370', 'B', '\001', '\032', 'm', '\n', '\033',
+'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n',
+'c', 'e', '\022', '#', '\n', '\r', 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t',
+'R', '\014', 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', 'N', 'a', 'm', 'e', '\022', ')', '\n', '\020', 'c', 'e', 'r', 't', 'i', 'f', 'i',
+'c', 'a', 't', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\017', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c',
+'a', 't', 'e', 'N', 'a', 'm', 'e', '\032', '\364', '\006', '\n', '$', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'd', 'C', 'e', 'r', 't', 'i',
+'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\217',
+'\001', '\n', '\032', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n',
+'t', 'e', 'x', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', 'G', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l',
+'s', '.', 'v', '3', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o',
+'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\030', 'd', 'e', 'f', 'a', 'u',
+'l', 't', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', '\266', '\001', '\n', '$', 'v',
+'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 's', 'd', 's', '_', 's', 'e', 'c',
+'r', 'e', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\001', '(', '\013', '2', ':', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k',
+'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o', 'n', 'f', 'i',
+'g', 'B', '*', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', '\362', '\230', '\376', '\217', '\005', '\034', '\022', '\032', 'd', 'y', 'n', 'a', 'm', 'i',
+'c', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', 'R', ' ', 'v', 'a', 'l',
+'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'S', 'd', 's', 'S', 'e', 'c', 'r', 'e', 't', 'C', 'o',
+'n', 'f', 'i', 'g', '\022', '\312', '\001', '\n', '\'', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e',
+'x', 't', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'p', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\030', '\003',
+' ', '\001', '(', '\013', '2', 'O', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't',
+'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C',
+'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a',
+'t', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'B', '\"', '\362', '\230', '\376', '\217', '\005', '\034', '\022', '\032', 'd', 'y', 'n', 'a', 'm',
+'i', 'c', '_', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', 'R', '$', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't',
+'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', '\022', '\343', '\001', '\n', '0', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_',
+'c', 'o', 'n', 't', 'e', 'x', 't', '_', 'c', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', '_', 'p', 'r', 'o', 'v', 'i',
+'d', 'e', 'r', '_', 'i', 'n', 's', 't', 'a', 'n', 'c', 'e', '\030', '\004', ' ', '\001', '(', '\013', '2', 'W', '.', 'e', 'n', 'v', 'o',
+'y', '.', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o',
+'c', 'k', 'e', 't', 's', '.', 't', 'l', 's', '.', 'v', '3', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's', 'C', 'o', 'n',
+'t', 'e', 'x', 't', '.', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r', 'o', 'v', 'i', 'd', 'e', 'r', 'I',
+'n', 's', 't', 'a', 'n', 'c', 'e', 'B', '\"', '\362', '\230', '\376', '\217', '\005', '\034', '\022', '\032', 'd', 'y', 'n', 'a', 'm', 'i', 'c', '_',
+'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', 'R', ',', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a', 't', 'e', 'P', 'r',
+'o', 'v', 'i', 'd', 'e', 'r', 'I', 'n', 's', 't', 'a', 'n', 'c', 'e', ':', 'N', '\232', '\305', '\210', '\036', 'I', '\n', 'G', 'e', 'n',
+'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'o', 'm', 'm', 'o', 'n', 'T', 'l', 's',
+'C', 'o', 'n', 't', 'e', 'x', 't', '.', 'C', 'o', 'm', 'b', 'i', 'n', 'e', 'd', 'C', 'e', 'r', 't', 'i', 'f', 'i', 'c', 'a',
+'t', 'e', 'V', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o', 'n', 'C', 'o', 'n', 't', 'e', 'x', 't', ':', ')', '\232', '\305', '\210', '\036',
+'$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'a', 'u', 't', 'h', '.', 'C', 'o', 'm', 'm',
+'o', 'n', 'T', 'l', 's', 'C', 'o', 'n', 't', 'e', 'x', 't', 'B', '\031', '\n', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'i', 'o',
+'n', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 't', 'y', 'p', 'e', 'J', '\004', '\010', '\005', '\020', '\006', 'B', 'M', '\n', '7', 'i',
+'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 'e', 'x', 't', 'e', 'n', 's',
+'i', 'o', 'n', 's', '.', 't', 'r', 'a', 'n', 's', 'p', 'o', 'r', 't', '_', 's', 'o', 'c', 'k', 'e', 't', 's', '.', 't', 'l',
+'s', '.', 'v', '3', 'B', '\010', 'T', 'l', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b',
+'\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[10] = {
+ &envoy_config_core_v3_extension_proto_upbdefinit,
+ &envoy_extensions_transport_sockets_tls_v3_common_proto_upbdefinit,
+ &envoy_extensions_transport_sockets_tls_v3_secret_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_migrate_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/extensions/transport_sockets/tls/v3/tls.proto",
+ UPB_STRVIEW_INIT(descriptor, 4707)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h
new file mode 100644
index 00000000000..c11d6752524
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h
@@ -0,0 +1,60 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/extensions/transport_sockets/tls/v3/tls.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_TLS_PROTO_UPBDEFS_H_
+#define ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_TLS_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_def_init envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.UpstreamTlsContext");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProvider_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProvider");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CertificateProviderInstance");
+}
+
+UPB_INLINE const upb_msgdef *envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_extensions_transport_sockets_tls_v3_tls_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.extensions.transport_sockets.tls.v3.CommonTlsContext.CombinedCertificateValidationContext");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_TLS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c
new file mode 100644
index 00000000000..6fbd46bf3be
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c
@@ -0,0 +1,72 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/cluster/v3/cds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/cluster/v3/cds.upbdefs.h"
+
+extern upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+extern upb_def_init google_api_annotations_proto_upbdefinit;
+extern upb_def_init envoy_annotations_resource_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_cluster_v3_CdsDummy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_service_cluster_v3_CdsDummy_msginit,
+};
+
+static const char descriptor[815] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'c', 'l', 'u', 's', 't', 'e', 'r', '/', 'v',
+'3', '/', 'c', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\030', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c',
+'e', '.', 'c', 'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i',
+'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a',
+'t', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a',
+'t', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't',
+'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i',
+'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '(', '\n', '\010', 'C', 'd', 's', 'D', 'u', 'm', 'm', 'y', ':', '\034',
+'\232', '\305', '\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'C', 'd', 's', 'D', 'u',
+'m', 'm', 'y', '2', '\315', '\003', '\n', '\027', 'C', 'l', 'u', 's', 't', 'e', 'r', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S',
+'e', 'r', 'v', 'i', 'c', 'e', '\022', 's', '\n', '\016', 'S', 't', 'r', 'e', 'a', 'm', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022',
+',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n',
+'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.',
+'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '|',
+'\n', '\r', 'D', 'e', 'l', 't', 'a', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 's',
+'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a',
+'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '2', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'s', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't',
+'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022',
+'\225', '\001', '\n', '\r', 'F', 'e', 't', 'c', 'h', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r',
+'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\'', '\202', '\323', '\344', '\223', '\002', '\030', '\"', '\026', '/', 'v', '3', '/', 'd',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001',
+'*', '\032', '\'', '\212', '\244', '\226', '\363', '\007', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c',
+'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'B', '?', '\n', '&', 'i', 'o', '.', 'e',
+'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'c',
+'l', 'u', 's', 't', 'e', 'r', '.', 'v', '3', 'B', '\010', 'C', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272',
+'\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_service_discovery_v3_discovery_proto_upbdefinit,
+ &google_api_annotations_proto_upbdefinit,
+ &envoy_annotations_resource_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_cluster_v3_cds_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/cluster/v3/cds.proto",
+ UPB_STRVIEW_INIT(descriptor, 815)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h
new file mode 100644
index 00000000000..dd2964937d3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/cluster/v3/cds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_CLUSTER_V3_CDS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_CLUSTER_V3_CDS_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_def_init envoy_service_cluster_v3_cds_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_cluster_v3_CdsDummy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_cluster_v3_cds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.cluster.v3.CdsDummy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_CLUSTER_V3_CDS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c
new file mode 100644
index 00000000000..f741848c631
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c
@@ -0,0 +1,60 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/discovery/v3/ads.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/discovery/v3/ads.upbdefs.h"
+
+extern upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_discovery_v3_AdsDummy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_service_discovery_v3_AdsDummy_msginit,
+};
+
+static const char descriptor[604] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'/', 'v', '3', '/', 'a', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\032', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v',
+'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 's',
+'e', 'r', 'v', 'i', 'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o',
+'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't',
+'o', '\"', '6', '\n', '\010', 'A', 'd', 's', 'D', 'u', 'm', 'm', 'y', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v',
+'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '2', '.', 'A',
+'d', 's', 'D', 'u', 'm', 'm', 'y', '2', '\246', '\002', '\n', '\032', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'D', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '~', '\n', '\031', 'S', 't', 'r', 'e', 'a', 'm', 'A', 'g',
+'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r',
+'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '\207', '\001', '\n', '\030', 'D', 'e', 'l', 't',
+'a', 'A', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', 'd', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '1', '.', 'e', 'n',
+'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.',
+'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '2', '.', 'e',
+'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3',
+'.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000',
+'(', '\001', '0', '\001', 'B', 'A', '\n', '(', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v',
+'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', 'B', '\010',
+'A', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &envoy_service_discovery_v3_discovery_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_discovery_v3_ads_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/discovery/v3/ads.proto",
+ UPB_STRVIEW_INIT(descriptor, 604)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h
new file mode 100644
index 00000000000..de50c9f6e12
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/discovery/v3/ads.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_DISCOVERY_V3_ADS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_DISCOVERY_V3_ADS_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_def_init envoy_service_discovery_v3_ads_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_AdsDummy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_ads_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.AdsDummy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_DISCOVERY_V3_ADS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c
new file mode 100644
index 00000000000..0df3b7b3cb9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c
@@ -0,0 +1,142 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/discovery/v3/discovery.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/discovery/v3/discovery.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_rpc_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_discovery_v3_DiscoveryRequest_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_DiscoveryResponse_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_Resource_msginit;
+extern const upb_msglayout envoy_service_discovery_v3_Resource_CacheControl_msginit;
+
+static const upb_msglayout *layouts[7] = {
+ &envoy_service_discovery_v3_DiscoveryRequest_msginit,
+ &envoy_service_discovery_v3_DiscoveryResponse_msginit,
+ &envoy_service_discovery_v3_DeltaDiscoveryRequest_msginit,
+ &envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry_msginit,
+ &envoy_service_discovery_v3_DeltaDiscoveryResponse_msginit,
+ &envoy_service_discovery_v3_Resource_msginit,
+ &envoy_service_discovery_v3_Resource_CacheControl_msginit,
+};
+
+static const char descriptor[2206] = {'\n', '*', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\022', '\032', 'e', 'n', 'v', 'o',
+'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '\032', '\037', 'e',
+'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n',
+'y', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\027', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'r', 'p',
+'c', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p',
+'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.',
+'p', 'r', 'o', 't', 'o', '\"', '\253', '\002', '\n', '\020', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's',
+'t', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\013',
+'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '.', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\002', ' ', '\001', '(', '\013',
+'2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'N',
+'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e', '\022', '%', '\n', '\016', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a', 'm',
+'e', 's', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\r', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e', 's', '\022', '\031',
+'\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l',
+'\022', '%', '\n', '\016', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', '_', 'n', 'o', 'n', 'c', 'e', '\030', '\005', ' ', '\001', '(', '\t', 'R',
+'\r', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'N', 'o', 'n', 'c', 'e', '\022', '5', '\n', '\014', 'e', 'r', 'r', 'o', 'r', '_', 'd',
+'e', 't', 'a', 'i', 'l', '\030', '\006', ' ', '\001', '(', '\013', '2', '\022', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', '.',
+'S', 't', 'a', 't', 'u', 's', 'R', '\013', 'e', 'r', 'r', 'o', 'r', 'D', 'e', 't', 'a', 'i', 'l', ':', '$', '\232', '\305', '\210', '\036',
+'\037', '\n', '\035', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'R', 'e', 'q', 'u', 'e', 's', 't', '\"', '\243', '\002', '\n', '\021', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p',
+'o', 'n', 's', 'e', '\022', '!', '\n', '\014', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f', 'o', '\030', '\001', ' ', '\001', '(',
+'\t', 'R', '\013', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f', 'o', '\022', '2', '\n', '\t', 'r', 'e', 's', 'o', 'u', 'r', 'c',
+'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'A', 'n', 'y', 'R', '\t', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '\026', '\n', '\006', 'c', 'a', 'n', 'a', 'r',
+'y', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\006', 'c', 'a', 'n', 'a', 'r', 'y', '\022', '\031', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u',
+'r', 'l', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l', '\022', '\024', '\n', '\005', 'n', 'o', 'n', 'c',
+'e', '\030', '\005', ' ', '\001', '(', '\t', 'R', '\005', 'n', 'o', 'n', 'c', 'e', '\022', 'G', '\n', '\r', 'c', 'o', 'n', 't', 'r', 'o', 'l',
+'_', 'p', 'l', 'a', 'n', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f',
+'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', 'R', '\014',
+'c', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o',
+'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's',
+'e', '\"', '\274', '\004', '\n', '\025', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e',
+'s', 't', '\022', '.', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'N', 'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e',
+'\022', '\031', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U',
+'r', 'l', '\022', '8', '\n', '\030', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a', 'm', 'e', 's', '_', 's', 'u', 'b', 's',
+'c', 'r', 'i', 'b', 'e', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\026', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e',
+'s', 'S', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e', '\022', '<', '\n', '\032', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a',
+'m', 'e', 's', '_', 'u', 'n', 's', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e', '\030', '\004', ' ', '\003', '(', '\t', 'R', '\030', 'r', 'e',
+'s', 'o', 'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e', 's', 'U', 'n', 's', 'u', 'b', 's', 'c', 'r', 'i', 'b', 'e', '\022', '\212', '\001',
+'\n', '\031', 'i', 'n', 'i', 't', 'i', 'a', 'l', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'v', 'e', 'r', 's', 'i', 'o',
+'n', 's', '\030', '\005', ' ', '\003', '(', '\013', '2', 'N', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.',
+'d', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '.', 'I', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e',
+'V', 'e', 'r', 's', 'i', 'o', 'n', 's', 'E', 'n', 't', 'r', 'y', 'R', '\027', 'i', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', 's',
+'o', 'u', 'r', 'c', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 's', '\022', '%', '\n', '\016', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e',
+'_', 'n', 'o', 'n', 'c', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\r', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'N', 'o', 'n',
+'c', 'e', '\022', '5', '\n', '\014', 'e', 'r', 'r', 'o', 'r', '_', 'd', 'e', 't', 'a', 'i', 'l', '\030', '\007', ' ', '\001', '(', '\013', '2',
+'\022', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', '.', 'S', 't', 'a', 't', 'u', 's', 'R', '\013', 'e', 'r', 'r', 'o',
+'r', 'D', 'e', 't', 'a', 'i', 'l', '\032', 'J', '\n', '\034', 'I', 'n', 'i', 't', 'i', 'a', 'l', 'R', 'e', 's', 'o', 'u', 'r', 'c',
+'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', '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', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p',
+'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's',
+'t', '\"', '\337', '\002', '\n', '\026', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o',
+'n', 's', 'e', '\022', '.', '\n', '\023', 's', 'y', 's', 't', 'e', 'm', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 'i', 'n', 'f',
+'o', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\021', 's', 'y', 's', 't', 'e', 'm', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'I', 'n', 'f',
+'o', '\022', 'B', '\n', '\t', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n',
+'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.',
+'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'R', '\t', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '\031', '\n', '\010', 't', 'y',
+'p', 'e', '_', 'u', 'r', 'l', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l', '\022', '+', '\n', '\021',
+'r', 'e', 'm', 'o', 'v', 'e', 'd', '_', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\030', '\006', ' ', '\003', '(', '\t', 'R', '\020',
+'r', 'e', 'm', 'o', 'v', 'e', 'd', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 's', '\022', '\024', '\n', '\005', 'n', 'o', 'n', 'c', 'e',
+'\030', '\005', ' ', '\001', '(', '\t', 'R', '\005', 'n', 'o', 'n', 'c', 'e', '\022', 'G', '\n', '\r', 'c', 'o', 'n', 't', 'r', 'o', 'l', '_',
+'p', 'l', 'a', 'n', 'e', '\030', '\007', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i',
+'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', 'R', '\014', 'c',
+'o', 'n', 't', 'r', 'o', 'l', 'P', 'l', 'a', 'n', 'e', ':', '*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y',
+'.', 'a', 'p', 'i', '.', 'v', '2', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's',
+'p', 'o', 'n', 's', 'e', '\"', '\331', '\002', '\n', '\010', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\022', '\022', '\n', '\004', 'n', 'a', 'm',
+'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\030', '\n', '\007', 'a', 'l', 'i', 'a', 's', 'e', 's', '\030',
+'\004', ' ', '\003', '(', '\t', 'R', '\007', 'a', 'l', 'i', 'a', 's', 'e', 's', '\022', '\030', '\n', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n',
+'\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', '0', '\n', '\010', 'r', 'e', 's', 'o', 'u', 'r',
+'c', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'A', 'n', 'y', 'R', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\022', '+', '\n', '\003', 't', 't', 'l', '\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', '\003', 't', 't', 'l', '\022', 'V', '\n', '\r', 'c', 'a', 'c', 'h', 'e', '_', 'c', 'o', 'n', 't', 'r',
+'o', 'l', '\030', '\007', ' ', '\001', '(', '\013', '2', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.',
+'d', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'C', 'a', 'c',
+'h', 'e', 'C', 'o', 'n', 't', 'r', 'o', 'l', 'R', '\014', 'c', 'a', 'c', 'h', 'e', 'C', 'o', 'n', 't', 'r', 'o', 'l', '\032', '0',
+'\n', '\014', 'C', 'a', 'c', 'h', 'e', 'C', 'o', 'n', 't', 'r', 'o', 'l', '\022', ' ', '\n', '\014', 'd', 'o', '_', 'n', 'o', 't', '_',
+'c', 'a', 'c', 'h', 'e', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\n', 'd', 'o', 'N', 'o', 't', 'C', 'a', 'c', 'h', 'e', ':', '\034',
+'\232', '\305', '\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'R', 'e', 's', 'o', 'u',
+'r', 'c', 'e', 'B', 'D', '\n', '(', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o',
+'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', 'B', '\016', 'D',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006',
+'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[7] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_rpc_status_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/discovery/v3/discovery.proto",
+ UPB_STRVIEW_INIT(descriptor, 2206)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h
new file mode 100644
index 00000000000..770d46d6703
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h
@@ -0,0 +1,65 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/discovery/v3/discovery.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_DISCOVERY_V3_DISCOVERY_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_DISCOVERY_V3_DISCOVERY_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_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_DiscoveryRequest_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.DiscoveryRequest");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_DiscoveryResponse_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.DiscoveryResponse");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_DeltaDiscoveryRequest_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.DeltaDiscoveryRequest");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_DeltaDiscoveryRequest_InitialResourceVersionsEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.DeltaDiscoveryRequest.InitialResourceVersionsEntry");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_DeltaDiscoveryResponse_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.DeltaDiscoveryResponse");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_Resource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.Resource");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_discovery_v3_Resource_CacheControl_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_discovery_v3_discovery_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.discovery.v3.Resource.CacheControl");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_DISCOVERY_V3_DISCOVERY_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c
new file mode 100644
index 00000000000..c76678797be
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c
@@ -0,0 +1,73 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/endpoint/v3/eds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/endpoint/v3/eds.upbdefs.h"
+
+extern upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+extern upb_def_init google_api_annotations_proto_upbdefinit;
+extern upb_def_init envoy_annotations_resource_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_endpoint_v3_EdsDummy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_service_endpoint_v3_EdsDummy_msginit,
+};
+
+static const char descriptor[838] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/',
+'v', '3', '/', 'e', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\031', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i',
+'c', 'e', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r',
+'v', 'i', 'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r',
+'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r',
+'s', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '(', '\n', '\010', 'E', 'd', 's', 'D', 'u', 'm', 'm', 'y',
+':', '\034', '\232', '\305', '\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'E', 'd', 's',
+'D', 'u', 'm', 'm', 'y', '2', '\341', '\003', '\n', '\030', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'D', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 't', '\n', '\017', 'S', 't', 'r', 'e', 'a', 'm', 'E', 'n', 'd', 'p', 'o', 'i',
+'n', 't', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o',
+'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032',
+'-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001',
+'0', '\001', '\022', '}', '\n', '\016', 'D', 'e', 'l', 't', 'a', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', '1', '.', 'e', 'n',
+'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.',
+'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '2', '.', 'e',
+'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3',
+'.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000',
+'(', '\001', '0', '\001', '\022', '\227', '\001', '\n', '\016', 'F', 'e', 't', 'c', 'h', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\022', ',',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.',
+'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v',
+'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '(', '\202', '\323', '\344', '\223', '\002', '\031', '\"',
+'\027', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', '\202',
+'\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '6', '\212', '\244', '\226', '\363', '\007', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r',
+'L', 'o', 'a', 'd', 'A', 's', 's', 'i', 'g', 'n', 'm', 'e', 'n', 't', 'B', '@', '\n', '\'', 'i', 'o', '.', 'e', 'n', 'v', 'o',
+'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'e', 'n', 'd', 'p',
+'o', 'i', 'n', 't', '.', 'v', '3', 'B', '\010', 'E', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310',
+'\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_service_discovery_v3_discovery_proto_upbdefinit,
+ &google_api_annotations_proto_upbdefinit,
+ &envoy_annotations_resource_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_endpoint_v3_eds_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/endpoint/v3/eds.proto",
+ UPB_STRVIEW_INIT(descriptor, 838)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h
new file mode 100644
index 00000000000..c2804136b1a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/endpoint/v3/eds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_ENDPOINT_V3_EDS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_ENDPOINT_V3_EDS_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_def_init envoy_service_endpoint_v3_eds_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_endpoint_v3_EdsDummy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_endpoint_v3_eds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.endpoint.v3.EdsDummy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_ENDPOINT_V3_EDS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c
new file mode 100644
index 00000000000..c0a9934266f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c
@@ -0,0 +1,72 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/listener/v3/lds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/listener/v3/lds.upbdefs.h"
+
+extern upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+extern upb_def_init google_api_annotations_proto_upbdefinit;
+extern upb_def_init envoy_annotations_resource_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_listener_v3_LdsDummy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_service_listener_v3_LdsDummy_msginit,
+};
+
+static const char descriptor[825] = {'\n', '#', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '/',
+'v', '3', '/', 'l', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\031', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i',
+'c', 'e', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r',
+'v', 'i', 'c', 'e', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r',
+'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r',
+'s', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '(', '\n', '\010', 'L', 'd', 's', 'D', 'u', 'm', 'm', 'y',
+':', '\034', '\232', '\305', '\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'L', 'd', 's',
+'D', 'u', 'm', 'm', 'y', '2', '\324', '\003', '\n', '\030', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 'D', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '}', '\n', '\016', 'D', 'e', 'l', 't', 'a', 'L', 'i', 's', 't', 'e', 'n', 'e',
+'r', 's', '\022', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v',
+'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u',
+'e', 's', 't', '\032', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o',
+'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's',
+'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', 't', '\n', '\017', 'S', 't', 'r', 'e', 'a', 'm', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's',
+'t', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000',
+'(', '\001', '0', '\001', '\022', '\227', '\001', '\n', '\016', 'F', 'e', 't', 'c', 'h', 'L', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\022', ',',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.',
+'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v',
+'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '(', '\202', '\323', '\344', '\223', '\002', '\031', '\"',
+'\027', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', 's', '\202',
+'\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', ')', '\212', '\244', '\226', '\363', '\007', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'c',
+'o', 'n', 'f', 'i', 'g', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'e', 'n', 'e',
+'r', 'B', '@', '\n', '\'', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'s', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '.', 'v', '3', 'B', '\010', 'L', 'd', 's', 'P',
+'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_service_discovery_v3_discovery_proto_upbdefinit,
+ &google_api_annotations_proto_upbdefinit,
+ &envoy_annotations_resource_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_listener_v3_lds_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/listener/v3/lds.proto",
+ UPB_STRVIEW_INIT(descriptor, 825)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h
new file mode 100644
index 00000000000..7c15300371f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/listener/v3/lds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_LISTENER_V3_LDS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_LISTENER_V3_LDS_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_def_init envoy_service_listener_v3_lds_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_listener_v3_LdsDummy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_listener_v3_lds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.listener.v3.LdsDummy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_LISTENER_V3_LDS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c
new file mode 100644
index 00000000000..830b3987115
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c
@@ -0,0 +1,80 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/load_stats/v3/lrs.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/load_stats/v3/lrs.upbdefs.h"
+
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_config_endpoint_v3_load_report_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_load_stats_v3_LoadStatsRequest_msginit;
+extern const upb_msglayout envoy_service_load_stats_v3_LoadStatsResponse_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_service_load_stats_v3_LoadStatsRequest_msginit,
+ &envoy_service_load_stats_v3_LoadStatsResponse_msginit,
+};
+
+static const char descriptor[958] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't',
+'s', '/', 'v', '3', '/', 'l', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\033', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r',
+'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '.', 'v', '3', '\032', '\037', 'e', 'n', 'v', 'o', 'y',
+'/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r', 'o', 't',
+'o', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '/',
+'v', '3', '/', 'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r', 't', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't',
+'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '\304', '\001', '\n', '\020', 'L', 'o',
+'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', '.', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\001', ' ',
+'\001', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'N', 'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e', '\022', 'K', '\n', '\r', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 's',
+'t', 'a', 't', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g',
+'.', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '.', 'v', '3', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's',
+'R', '\014', 'c', 'l', 'u', 's', 't', 'e', 'r', 'S', 't', 'a', 't', 's', ':', '3', '\232', '\305', '\210', '\036', '.', '\n', ',', 'e', 'n',
+'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '.', 'v', '2',
+'.', 'L', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\"', '\244', '\002', '\n', '\021', 'L', 'o', 'a',
+'d', 'S', 't', 'a', 't', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', '\032', '\n', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r',
+'s', '\030', '\001', ' ', '\003', '(', '\t', 'R', '\010', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', '*', '\n', '\021', 's', 'e', 'n', 'd',
+'_', 'a', 'l', 'l', '_', 'c', 'l', 'u', 's', 't', 'e', 'r', 's', '\030', '\004', ' ', '\001', '(', '\010', 'R', '\017', 's', 'e', 'n', 'd',
+'A', 'l', 'l', 'C', 'l', 'u', 's', 't', 'e', 'r', 's', '\022', 'Q', '\n', '\027', 'l', 'o', 'a', 'd', '_', 'r', 'e', 'p', 'o', 'r',
+'t', 'i', 'n', 'g', '_', 'i', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\030', '\002', ' ', '\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', '\025', 'l', 'o',
+'a', 'd', 'R', 'e', 'p', 'o', 'r', 't', 'i', 'n', 'g', 'I', 'n', 't', 'e', 'r', 'v', 'a', 'l', '\022', '>', '\n', '\033', 'r', 'e',
+'p', 'o', 'r', 't', '_', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'g', 'r', 'a', 'n', 'u', 'l', 'a', 'r', 'i', 't', 'y',
+'\030', '\003', ' ', '\001', '(', '\010', 'R', '\031', 'r', 'e', 'p', 'o', 'r', 't', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'G', 'r', 'a',
+'n', 'u', 'l', 'a', 'r', 'i', 't', 'y', ':', '4', '\232', '\305', '\210', '\036', '/', '\n', '-', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e',
+'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '.', 'v', '2', '.', 'L', 'o', 'a', 'd', 'S',
+'t', 'a', 't', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '2', '\216', '\001', '\n', '\024', 'L', 'o', 'a', 'd', 'R', 'e', 'p', 'o',
+'r', 't', 'i', 'n', 'g', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'v', '\n', '\017', 'S', 't', 'r', 'e', 'a', 'm', 'L', 'o', 'a',
+'d', 'S', 't', 'a', 't', 's', '\022', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o',
+'a', 'd', '_', 's', 't', 'a', 't', 's', '.', 'v', '3', '.', 'L', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 'q', 'u',
+'e', 's', 't', '\032', '.', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_',
+'s', 't', 'a', 't', 's', '.', 'v', '3', '.', 'L', 'o', 'a', 'd', 'S', 't', 'a', 't', 's', 'R', 'e', 's', 'p', 'o', 'n', 's',
+'e', '\"', '\000', '(', '\001', '0', '\001', 'B', 'B', '\n', ')', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.',
+'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'l', 'o', 'a', 'd', '_', 's', 't', 'a', 't', 's', '.',
+'v', '3', 'B', '\010', 'L', 'r', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002',
+'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_config_endpoint_v3_load_report_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_load_stats_v3_lrs_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/load_stats/v3/lrs.proto",
+ UPB_STRVIEW_INIT(descriptor, 958)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h
new file mode 100644
index 00000000000..ac71694db1a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/load_stats/v3/lrs.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_LOAD_STATS_V3_LRS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_LOAD_STATS_V3_LRS_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_def_init envoy_service_load_stats_v3_lrs_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_load_stats_v3_LoadStatsRequest_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_load_stats_v3_lrs_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.load_stats.v3.LoadStatsRequest");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_load_stats_v3_LoadStatsResponse_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_load_stats_v3_lrs_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.load_stats.v3.LoadStatsResponse");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_LOAD_STATS_V3_LRS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c
new file mode 100644
index 00000000000..d6f94655e5b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c
@@ -0,0 +1,80 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/route/v3/rds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/route/v3/rds.upbdefs.h"
+
+extern upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+extern upb_def_init google_api_annotations_proto_upbdefinit;
+extern upb_def_init envoy_annotations_resource_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_route_v3_RdsDummy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_service_route_v3_RdsDummy_msginit,
+};
+
+static const char descriptor[1014] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/',
+'r', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\026', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'd',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n',
+'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '(', '\n', '\010', 'R', 'd', 's', 'D', 'u', 'm', 'm', 'y', ':', '\034', '\232', '\305', '\210', '\036',
+'\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'R', 'd', 's', 'D', 'u', 'm', 'm', 'y', '2',
+'\314', '\003', '\n', '\025', 'R', 'o', 'u', 't', 'e', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e',
+'\022', 'q', '\n', '\014', 'S', 't', 'r', 'e', 'a', 'm', 'R', 'o', 'u', 't', 'e', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'s', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c',
+'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v',
+'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r',
+'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', 'z', '\n', '\013', 'D', 'e', 'l', 't', 'a', 'R',
+'o', 'u', 't', 'e', 's', '\022', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R',
+'e', 'q', 'u', 'e', 's', 't', '\032', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i',
+'s', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '\221', '\001', '\n', '\013', 'F', 'e', 't', 'c', 'h', 'R',
+'o', 'u', 't', 'e', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's',
+'t', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e',
+'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '%',
+'\202', '\323', '\344', '\223', '\002', '\026', '\"', '\024', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', ':', 'r', 'o', 'u',
+'t', 'e', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '0', '\212', '\244', '\226', '\363', '\007', '*', '\n', '(', 'e', 'n', 'v',
+'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '.', 'R', 'o', 'u', 't', 'e', 'C',
+'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a', 't', 'i', 'o', 'n', '2', '\313', '\001', '\n', '\033', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H',
+'o', 's', 't', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', '\200', '\001', '\n', '\021', 'D',
+'e', 'l', 't', 'a', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', 's', '\022', '1', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'s', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't',
+'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '2', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l',
+'t', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001',
+'\032', ')', '\212', '\244', '\226', '\363', '\007', '#', '\n', '!', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o',
+'u', 't', 'e', '.', 'v', '3', '.', 'V', 'i', 'r', 't', 'u', 'a', 'l', 'H', 'o', 's', 't', 'B', '=', '\n', '$', 'i', 'o', '.',
+'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.',
+'r', 'o', 'u', 't', 'e', '.', 'v', '3', 'B', '\010', 'R', 'd', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_service_discovery_v3_discovery_proto_upbdefinit,
+ &google_api_annotations_proto_upbdefinit,
+ &envoy_annotations_resource_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_route_v3_rds_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/route/v3/rds.proto",
+ UPB_STRVIEW_INIT(descriptor, 1014)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h
new file mode 100644
index 00000000000..c302bdc0609
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/route/v3/rds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_ROUTE_V3_RDS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_ROUTE_V3_RDS_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_def_init envoy_service_route_v3_rds_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_route_v3_RdsDummy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_route_v3_rds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.route.v3.RdsDummy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_ROUTE_V3_RDS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c
new file mode 100644
index 00000000000..a0609a2f485
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c
@@ -0,0 +1,74 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/route/v3/srds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/route/v3/srds.upbdefs.h"
+
+extern upb_def_init envoy_service_discovery_v3_discovery_proto_upbdefinit;
+extern upb_def_init google_api_annotations_proto_upbdefinit;
+extern upb_def_init envoy_annotations_resource_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_route_v3_SrdsDummy_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_service_route_v3_SrdsDummy_msginit,
+};
+
+static const char descriptor[851] = {'\n', '!', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 'r', 'o', 'u', 't', 'e', '/', 'v', '3', '/',
+'s', 'r', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\026', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e',
+'.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', '\032', '*', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/',
+'d', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'p', 'r',
+'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!',
+'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i',
+'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '*', '\n', '\t', 'S', 'r', 'd', 's', 'D', 'u', 'm', 'm', 'y', ':', '\035', '\232', '\305',
+'\210', '\036', '\030', '\n', '\026', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'p', 'i', '.', 'v', '2', '.', 'S', 'r', 'd', 's', 'D', 'u', 'm',
+'m', 'y', '2', '\363', '\003', '\n', '\034', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'D', 'i', 's', 'c', 'o', 'v',
+'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'w', '\n', '\022', 'S', 't', 'r', 'e', 'a', 'm', 'S', 'c', 'o', 'p', 'e',
+'d', 'R', 'o', 'u', 't', 'e', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd',
+'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q', 'u',
+'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o',
+'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e',
+'\"', '\000', '(', '\001', '0', '\001', '\022', '\200', '\001', '\n', '\021', 'D', 'e', 'l', 't', 'a', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u',
+'t', 'e', 's', '\022', '1', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c', 'o',
+'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 'q',
+'u', 'e', 's', 't', '\032', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's', 'c',
+'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'e', 'l', 't', 'a', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e',
+'s', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '\236', '\001', '\n', '\021', 'F', 'e', 't', 'c', 'h', 'S', 'c', 'o',
+'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e',
+'.', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e',
+'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'd', 'i', 's',
+'c', 'o', 'v', 'e', 'r', 'y', '.', 'v', '3', '.', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'R', 'e', 's', 'p', 'o', 'n',
+'s', 'e', '\"', ',', '\202', '\323', '\344', '\223', '\002', '\035', '\"', '\033', '/', 'v', '3', '/', 'd', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y',
+':', 's', 'c', 'o', 'p', 'e', 'd', '-', 'r', 'o', 'u', 't', 'e', 's', '\202', '\323', '\344', '\223', '\002', '\003', ':', '\001', '*', '\032', '6',
+'\212', '\244', '\226', '\363', '\007', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'r', 'o', 'u', 't',
+'e', '.', 'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'a',
+'t', 'i', 'o', 'n', 'B', '>', '\n', '$', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v',
+'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 'r', 'o', 'u', 't', 'e', '.', 'v', '3', 'B', '\t', 'S', 'r', 'd', 's',
+'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_service_discovery_v3_discovery_proto_upbdefinit,
+ &google_api_annotations_proto_upbdefinit,
+ &envoy_annotations_resource_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_route_v3_srds_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/route/v3/srds.proto",
+ UPB_STRVIEW_INIT(descriptor, 851)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h
new file mode 100644
index 00000000000..3e2be9dce61
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/route/v3/srds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_ROUTE_V3_SRDS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_ROUTE_V3_SRDS_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_def_init envoy_service_route_v3_srds_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_route_v3_SrdsDummy_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_route_v3_srds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.route.v3.SrdsDummy");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_ROUTE_V3_SRDS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c
new file mode 100644
index 00000000000..2673ebbbdee
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c
@@ -0,0 +1,130 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/status/v3/csds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/service/status/v3/csds.upbdefs.h"
+
+extern upb_def_init envoy_admin_v3_config_dump_proto_upbdefinit;
+extern upb_def_init envoy_config_core_v3_base_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_node_proto_upbdefinit;
+extern upb_def_init google_api_annotations_proto_upbdefinit;
+extern upb_def_init udpa_annotations_migrate_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_service_status_v3_ClientStatusRequest_msginit;
+extern const upb_msglayout envoy_service_status_v3_PerXdsConfig_msginit;
+extern const upb_msglayout envoy_service_status_v3_ClientConfig_msginit;
+extern const upb_msglayout envoy_service_status_v3_ClientStatusResponse_msginit;
+
+static const upb_msglayout *layouts[4] = {
+ &envoy_service_status_v3_ClientStatusRequest_msginit,
+ &envoy_service_status_v3_PerXdsConfig_msginit,
+ &envoy_service_status_v3_ClientConfig_msginit,
+ &envoy_service_status_v3_ClientStatusResponse_msginit,
+};
+
+static const char descriptor[2001] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 's', 'e', 'r', 'v', 'i', 'c', 'e', '/', 's', 't', 'a', 't', 'u', 's', '/', 'v', '3',
+'/', 'c', 's', 'd', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\027', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c',
+'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 'a', 'd', 'm', 'i', 'n', '/',
+'v', '3', '/', 'c', 'o', 'n', 'f', 'i', 'g', '_', 'd', 'u', 'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\032', '\037', 'e', 'n', 'v',
+'o', 'y', '/', 'c', 'o', 'n', 'f', 'i', 'g', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'b', 'a', 's', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\032', ' ', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v',
+'3', '/', 'n', 'o', 'd', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\036', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.',
+'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v',
+'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '\302', '\001', '\n', '\023', 'C', 'l', 'i', 'e', 'n',
+'t', 'S', 't', 'a', 't', 'u', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\022', 'G', '\n', '\r', 'n', 'o', 'd', 'e', '_', 'm', 'a',
+'t', 'c', 'h', 'e', 'r', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'N', 'o', 'd', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\014',
+'n', 'o', 'd', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 's', '\022', '.', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\002', ' ', '\001', '(',
+'\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.',
+'N', 'o', 'd', 'e', 'R', '\004', 'n', 'o', 'd', 'e', ':', '2', '\232', '\305', '\210', '\036', '-', '\n', '+', 'e', 'n', 'v', 'o', 'y', '.',
+'s', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '2', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S',
+'t', 'a', 't', 'u', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\"', '\360', '\004', '\n', '\014', 'P', 'e', 'r', 'X', 'd', 's', 'C', 'o',
+'n', 'f', 'i', 'g', '\022', '=', '\n', '\006', 's', 't', 'a', 't', 'u', 's', '\030', '\001', ' ', '\001', '(', '\016', '2', '%', '.', 'e', 'n',
+'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'o', 'n',
+'f', 'i', 'g', 'S', 't', 'a', 't', 'u', 's', 'R', '\006', 's', 't', 'a', 't', 'u', 's', '\022', 'T', '\n', '\r', 'c', 'l', 'i', 'e',
+'n', 't', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\007', ' ', '\001', '(', '\016', '2', '+', '.', 'e', 'n', 'v', 'o', 'y', '.', 's',
+'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'o',
+'n', 'f', 'i', 'g', 'S', 't', 'a', 't', 'u', 's', 'B', '\002', '\030', '\001', 'R', '\014', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a',
+'t', 'u', 's', '\022', 'N', '\n', '\017', 'l', 'i', 's', 't', 'e', 'n', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ',
+'\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'L', 'i', 's', 't',
+'e', 'n', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', 'H', '\000', 'R', '\016', 'l', 'i', 's', 't', 'e', 'n',
+'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'K', '\n', '\016', 'c', 'l', 'u', 's', 't', 'e', 'r', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\003', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.',
+'C', 'l', 'u', 's', 't', 'e', 'r', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', 'H', '\000', 'R', '\r', 'c', 'l', 'u',
+'s', 't', 'e', 'r', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'E', '\n', '\014', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o', 'n', 'f', 'i',
+'g', '\030', '\004', ' ', '\001', '(', '\013', '2', ' ', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.',
+'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', 'H', '\000', 'R', '\013', 'r', 'o', 'u', 't', 'e',
+'C', 'o', 'n', 'f', 'i', 'g', '\022', 'X', '\n', '\023', 's', 'c', 'o', 'p', 'e', 'd', '_', 'r', 'o', 'u', 't', 'e', '_', 'c', 'o',
+'n', 'f', 'i', 'g', '\030', '\005', ' ', '\001', '(', '\013', '2', '&', '.', 'e', 'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.',
+'v', '3', '.', 'S', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p',
+'H', '\000', 'R', '\021', 's', 'c', 'o', 'p', 'e', 'd', 'R', 'o', 'u', 't', 'e', 'C', 'o', 'n', 'f', 'i', 'g', '\022', 'N', '\n', '\017',
+'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\006', ' ', '\001', '(', '\013', '2', '#', '.', 'e',
+'n', 'v', 'o', 'y', '.', 'a', 'd', 'm', 'i', 'n', '.', 'v', '3', '.', 'E', 'n', 'd', 'p', 'o', 'i', 'n', 't', 's', 'C', 'o',
+'n', 'f', 'i', 'g', 'D', 'u', 'm', 'p', 'H', '\000', 'R', '\016', 'e', 'n', 'd', 'p', 'o', 'i', 'n', 't', 'C', 'o', 'n', 'f', 'i',
+'g', ':', '+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's',
+'t', 'a', 't', 'u', 's', '.', 'v', '2', '.', 'P', 'e', 'r', 'X', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'B', '\020', '\n', '\016',
+'p', 'e', 'r', '_', 'x', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\"', '\261', '\001', '\n', '\014', 'C', 'l', 'i', 'e', 'n', 't',
+'C', 'o', 'n', 'f', 'i', 'g', '\022', '.', '\n', '\004', 'n', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n',
+'v', 'o', 'y', '.', 'c', 'o', 'n', 'f', 'i', 'g', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'N', 'o', 'd', 'e', 'R', '\004',
+'n', 'o', 'd', 'e', '\022', 'D', '\n', '\n', 'x', 'd', 's', '_', 'c', 'o', 'n', 'f', 'i', 'g', '\030', '\002', ' ', '\003', '(', '\013', '2',
+'%', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3',
+'.', 'P', 'e', 'r', 'X', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', 'R', '\t', 'x', 'd', 's', 'C', 'o', 'n', 'f', 'i', 'g', ':',
+'+', '\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a',
+'t', 'u', 's', '.', 'v', '2', '.', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', '\"', '\212', '\001', '\n', '\024', 'C',
+'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\022', '=', '\n', '\006', 'c', 'o',
+'n', 'f', 'i', 'g', '\030', '\001', ' ', '\003', '(', '\013', '2', '%', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c',
+'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'o', 'n', 'f', 'i', 'g', 'R',
+'\006', 'c', 'o', 'n', 'f', 'i', 'g', ':', '3', '\232', '\305', '\210', '\036', '.', '\n', ',', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r',
+'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '2', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't',
+'u', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '*', 'K', '\n', '\014', 'C', 'o', 'n', 'f', 'i', 'g', 'S', 't', 'a', 't', 'u',
+'s', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022', '\n', '\n', '\006', 'S', 'Y', 'N', 'C', 'E', 'D', '\020',
+'\001', '\022', '\014', '\n', '\010', 'N', 'O', 'T', '_', 'S', 'E', 'N', 'T', '\020', '\002', '\022', '\t', '\n', '\005', 'S', 'T', 'A', 'L', 'E', '\020',
+'\003', '\022', '\t', '\n', '\005', 'E', 'R', 'R', 'O', 'R', '\020', '\004', '*', 'c', '\n', '\022', 'C', 'l', 'i', 'e', 'n', 't', 'C', 'o', 'n',
+'f', 'i', 'g', 'S', 't', 'a', 't', 'u', 's', '\022', '\022', '\n', '\016', 'C', 'L', 'I', 'E', 'N', 'T', '_', 'U', 'N', 'K', 'N', 'O',
+'W', 'N', '\020', '\000', '\022', '\024', '\n', '\020', 'C', 'L', 'I', 'E', 'N', 'T', '_', 'R', 'E', 'Q', 'U', 'E', 'S', 'T', 'E', 'D', '\020',
+'\001', '\022', '\020', '\n', '\014', 'C', 'L', 'I', 'E', 'N', 'T', '_', 'A', 'C', 'K', 'E', 'D', '\020', '\002', '\022', '\021', '\n', '\r', 'C', 'L',
+'I', 'E', 'N', 'T', '_', 'N', 'A', 'C', 'K', 'E', 'D', '\020', '\003', '2', '\270', '\002', '\n', '\034', 'C', 'l', 'i', 'e', 'n', 't', 'S',
+'t', 'a', 't', 'u', 's', 'D', 'i', 's', 'c', 'o', 'v', 'e', 'r', 'y', 'S', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'w', '\n', '\022',
+'S', 't', 'r', 'e', 'a', 'm', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', '\022', ',', '.', 'e', 'n', 'v', 'o',
+'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n',
+'t', 'S', 't', 'a', 't', 'u', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e',
+'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a',
+'t', 'u', 's', 'R', 'e', 's', 'p', 'o', 'n', 's', 'e', '\"', '\000', '(', '\001', '0', '\001', '\022', '\236', '\001', '\n', '\021', 'F', 'e', 't',
+'c', 'h', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', '\022', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e',
+'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a',
+'t', 'u', 's', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 's', 'e', 'r', 'v', 'i', 'c',
+'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', '.', 'C', 'l', 'i', 'e', 'n', 't', 'S', 't', 'a', 't', 'u', 's', 'R',
+'e', 's', 'p', 'o', 'n', 's', 'e', '\"', ',', '\202', '\323', '\344', '\223', '\002', '\035', '\"', '\033', '/', 'v', '3', '/', 'd', 'i', 's', 'c',
+'o', 'v', 'e', 'r', 'y', ':', 'c', 'l', 'i', 'e', 'n', 't', '_', 's', 't', 'a', 't', 'u', 's', '\202', '\323', '\344', '\223', '\002', '\003',
+':', '\001', '*', 'B', '?', '\n', '%', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o',
+'y', '.', 's', 'e', 'r', 'v', 'i', 'c', 'e', '.', 's', 't', 'a', 't', 'u', 's', '.', 'v', '3', 'B', '\t', 'C', 's', 'd', 's',
+'P', 'r', 'o', 't', 'o', 'P', '\001', '\210', '\001', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[8] = {
+ &envoy_admin_v3_config_dump_proto_upbdefinit,
+ &envoy_config_core_v3_base_proto_upbdefinit,
+ &envoy_type_matcher_v3_node_proto_upbdefinit,
+ &google_api_annotations_proto_upbdefinit,
+ &udpa_annotations_migrate_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_service_status_v3_csds_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/service/status/v3/csds.proto",
+ UPB_STRVIEW_INIT(descriptor, 2001)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h
new file mode 100644
index 00000000000..91723cc10ae
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h
@@ -0,0 +1,50 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/service/status/v3/csds.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_SERVICE_STATUS_V3_CSDS_PROTO_UPBDEFS_H_
+#define ENVOY_SERVICE_STATUS_V3_CSDS_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_def_init envoy_service_status_v3_csds_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_service_status_v3_ClientStatusRequest_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_status_v3_csds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.status.v3.ClientStatusRequest");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_status_v3_PerXdsConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_status_v3_csds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.status.v3.PerXdsConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_status_v3_ClientConfig_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_status_v3_csds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.status.v3.ClientConfig");
+}
+
+UPB_INLINE const upb_msgdef *envoy_service_status_v3_ClientStatusResponse_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_service_status_v3_csds_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.service.status.v3.ClientStatusResponse");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_SERVICE_STATUS_V3_CSDS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c
new file mode 100644
index 00000000000..f4afda70f59
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c
@@ -0,0 +1,64 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/metadata.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/metadata.upbdefs.h"
+
+extern upb_def_init envoy_type_matcher_v3_value_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_MetadataMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_type_matcher_v3_MetadataMatcher_msginit,
+ &envoy_type_matcher_v3_MetadataMatcher_PathSegment_msginit,
+};
+
+static const char descriptor[621] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'm',
+'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm',
+'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'v', 'a', 'l', 'u', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's',
+'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\347', '\002', '\n', '\017', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a',
+'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '\037', '\n', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007',
+'\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\006', 'f', 'i', 'l', 't', 'e', 'r', '\022', 'P', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\002',
+' ', '\003', '(', '\013', '2', '2', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r',
+'.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', 'c', 'h', 'e', 'r', '.', 'P', 'a', 't', 'h', 'S',
+'e', 'g', 'm', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', 'C', '\n',
+'\005', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B',
+'\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\032', 'q', '\n', '\013', 'P', 'a', 't', 'h', 'S',
+'e', 'g', 'm', 'e', 'n', 't', '\022', '\033', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r',
+'\002', '\020', '\001', 'H', '\000', 'R', '\003', 'k', 'e', 'y', ':', '5', '\232', '\305', '\210', '\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'t', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', 'c',
+'h', 'e', 'r', '.', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', 'B', '\016', '\n', '\007', 's', 'e', 'g', 'm', 'e', 'n',
+'t', '\022', '\003', '\370', 'B', '\001', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B',
+'>', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\r', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'P', 'r',
+'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_matcher_v3_value_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_metadata_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/metadata.proto",
+ UPB_STRVIEW_INIT(descriptor, 621)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h
new file mode 100644
index 00000000000..c7154a71bbc
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/metadata.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_METADATA_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_METADATA_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_def_init envoy_type_matcher_v3_metadata_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_MetadataMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.MetadataMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_MetadataMatcher_PathSegment_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.MetadataMatcher.PathSegment");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_METADATA_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c
new file mode 100644
index 00000000000..8b0ecb58151
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c
@@ -0,0 +1,56 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/node.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/node.upbdefs.h"
+
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_struct_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_NodeMatcher_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_type_matcher_v3_NodeMatcher_msginit,
+};
+
+static const char descriptor[458] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'n',
+'o', 'd', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't',
+'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h',
+'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o', 'y',
+'/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p',
+'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't',
+'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '\300', '\001', '\n', '\013',
+'N', 'o', 'd', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '=', '\n', '\007', 'n', 'o', 'd', 'e', '_', 'i', 'd', '\030', '\001', ' ',
+'\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\006', 'n', 'o', 'd', 'e', 'I', 'd', '\022',
+'K', '\n', '\016', 'n', 'o', 'd', 'e', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 's', '\030', '\002', ' ', '\003', '(', '\013', '2', '$',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't',
+'r', 'u', 'c', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'R', '\r', 'n', 'o', 'd', 'e', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a',
+'s', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c',
+'h', 'e', 'r', '.', 'N', 'o', 'd', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', ':', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v',
+'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e',
+'r', '.', 'v', '3', 'B', '\t', 'N', 'o', 'd', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002',
+'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &envoy_type_matcher_v3_struct_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_node_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/node.proto",
+ UPB_STRVIEW_INIT(descriptor, 458)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h
new file mode 100644
index 00000000000..9ec4a6def6a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/node.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_NODE_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_NODE_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_def_init envoy_type_matcher_v3_node_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_NodeMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_node_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.NodeMatcher");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_NODE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c
new file mode 100644
index 00000000000..a7f8fda0087
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c
@@ -0,0 +1,54 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/number.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/number.upbdefs.h"
+
+extern upb_def_init envoy_type_v3_range_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_DoubleMatcher_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_type_matcher_v3_DoubleMatcher_msginit,
+};
+
+static const char descriptor[404] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'n',
+'u', 'm', 'b', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm',
+'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '\031', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/',
+'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\"', '\232', '\001', '\n', '\r', 'D', 'o', 'u', 'b', 'l', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', '2', '\n', '\005', 'r',
+'a', 'n', 'g', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\032', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v',
+'3', '.', 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'a', 'n', 'g', 'e', 'H', '\000', 'R', '\005', 'r', 'a', 'n', 'g', 'e', '\022', '\026', '\n',
+'\005', 'e', 'x', 'a', 'c', 't', '\030', '\002', ' ', '\001', '(', '\001', 'H', '\000', 'R', '\005', 'e', 'x', 'a', 'c', 't', ':', '\'', '\232', '\305',
+'\210', '\036', '\"', '\n', ' ', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'D',
+'o', 'u', 'b', 'l', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\024', '\n', '\r', 'm', 'a', 't', 'c', 'h', '_', 'p', 'a', 't',
+'t', 'e', 'r', 'n', '\022', '\003', '\370', 'B', '\001', 'B', '<', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x',
+'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\013',
+'N', 'u', 'm', 'b', 'e', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_v3_range_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_number_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/number.proto",
+ UPB_STRVIEW_INIT(descriptor, 404)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h
new file mode 100644
index 00000000000..0700bd6b89f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/number.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_NUMBER_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_NUMBER_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_def_init envoy_type_matcher_v3_number_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_DoubleMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_number_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.DoubleMatcher");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_NUMBER_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c
new file mode 100644
index 00000000000..f003b0464a3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c
@@ -0,0 +1,53 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/path.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/path.upbdefs.h"
+
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_PathMatcher_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_type_matcher_v3_PathMatcher_msginit,
+};
+
+static const char descriptor[390] = {'\n', ' ', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'p',
+'a', 't', 'h', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't',
+'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h',
+'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n',
+'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\207', '\001', '\n', '\013', 'P', 'a', 't', 'h', 'M', 'a', 't', 'c', 'h', 'e', 'r',
+'\022', 'D', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h',
+'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\004', 'p', 'a', 't', 'h', ':', '%', '\232', '\305', '\210',
+'\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'P', 'a',
+'t', 'h', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\013', '\n', '\004', 'r', 'u', 'l', 'e', '\022', '\003', '\370', 'B', '\001', 'B', ':', '\n',
+'#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\t', 'P', 'a', 't', 'h', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272',
+'\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_path_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/path.proto",
+ UPB_STRVIEW_INIT(descriptor, 390)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h
new file mode 100644
index 00000000000..a73daa4c57a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/path.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_PATH_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_PATH_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_def_init envoy_type_matcher_v3_path_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_PathMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_path_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.PathMatcher");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_PATH_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c
new file mode 100644
index 00000000000..8805d24c6f0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c
@@ -0,0 +1,73 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/regex.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/regex.upbdefs.h"
+
+extern upb_def_init google_protobuf_wrappers_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_RegexMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_type_matcher_v3_RegexMatcher_msginit,
+ &envoy_type_matcher_v3_RegexMatcher_GoogleRE2_msginit,
+ &envoy_type_matcher_v3_RegexMatchAndSubstitute_msginit,
+};
+
+static const char descriptor[776] = {'\n', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'r',
+'e', 'g', 'e', 'x', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a',
+'t', 'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n',
+'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g',
+'.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'.', 'p', 'r', 'o', 't', 'o', '\"', '\317', '\002', '\n', '\014', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'X',
+'\n', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '_', 'r', 'e', '2', '\030', '\001', ' ', '\001', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o',
+'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a',
+'t', 'c', 'h', 'e', 'r', '.', 'G', 'o', 'o', 'g', 'l', 'e', 'R', 'E', '2', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001',
+'H', '\000', 'R', '\t', 'g', 'o', 'o', 'g', 'l', 'e', 'R', 'e', '2', '\022', '\035', '\n', '\005', 'r', 'e', 'g', 'e', 'x', '\030', '\002', ' ',
+'\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\005', 'r', 'e', 'g', 'e', 'x', '\032', '\211', '\001', '\n', '\t', 'G',
+'o', 'o', 'g', 'l', 'e', 'R', 'E', '2', '\022', 'J', '\n', '\020', 'm', 'a', 'x', '_', 'p', 'r', 'o', 'g', 'r', 'a', 'm', '_', 's',
+'i', 'z', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', 'B', '\002', '\030', '\001', 'R', '\016', 'm', 'a', 'x', 'P', 'r',
+'o', 'g', 'r', 'a', 'm', 'S', 'i', 'z', 'e', ':', '0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'G', 'o', 'o', 'g', 'l', 'e', 'R', 'E', '2', ':', '&', '\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B',
+'\022', '\n', '\013', 'e', 'n', 'g', 'i', 'n', 'e', '_', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B', '\001', '\"', '\271', '\001', '\n', '\027', 'R',
+'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b', 's', 't', 'i', 't', 'u', 't', 'e', '\022', 'G', '\n',
+'\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'e',
+'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\"', '\n', '\014', 's',
+'u', 'b', 's', 't', 'i', 't', 'u', 't', 'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 's', 'u', 'b', 's', 't', 'i',
+'t', 'u', 't', 'i', 'o', 'n', ':', '1', '\232', '\305', '\210', '\036', ',', '\n', '*', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't', 'c', 'h', 'A', 'n', 'd', 'S', 'u', 'b',
+'s', 't', 'i', 't', 'u', 't', 'e', 'B', ';', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.',
+'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\n', 'R', 'e',
+'g', 'e', 'x', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[5] = {
+ &google_protobuf_wrappers_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_regex_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/regex.proto",
+ UPB_STRVIEW_INIT(descriptor, 776)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h
new file mode 100644
index 00000000000..200737c6587
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/regex.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_REGEX_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_REGEX_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_def_init envoy_type_matcher_v3_regex_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_RegexMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_regex_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.RegexMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_RegexMatcher_GoogleRE2_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_regex_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.RegexMatcher.GoogleRE2");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_RegexMatchAndSubstitute_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_regex_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.RegexMatchAndSubstitute");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_REGEX_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c
new file mode 100644
index 00000000000..4844b106143
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c
@@ -0,0 +1,69 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/string.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/string.upbdefs.h"
+
+extern upb_def_init envoy_type_matcher_v3_regex_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_StringMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_ListStringMatcher_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_type_matcher_v3_StringMatcher_msginit,
+ &envoy_type_matcher_v3_ListStringMatcher_msginit,
+};
+
+static const char descriptor[738] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's',
+'t', 'r', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm',
+'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't',
+'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'r', 'e', 'g', 'e', 'x', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a',
+'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o',
+'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\321', '\002', '\n', '\r', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c',
+'h', 'e', 'r', '\022', '\026', '\n', '\005', 'e', 'x', 'a', 'c', 't', '\030', '\001', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\005', 'e', 'x', 'a',
+'c', 't', '\022', '!', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002',
+'\020', '\001', 'H', '\000', 'R', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\022', '!', '\n', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\003', ' ',
+'\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\022', 'N', '\n',
+'\n', 's', 'a', 'f', 'e', '_', 'r', 'e', 'g', 'e', 'x', '\030', '\005', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'R', 'e', 'g', 'e', 'x', 'M', 'a', 't',
+'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'H', '\000', 'R', '\t', 's', 'a', 'f', 'e', 'R', 'e', 'g',
+'e', 'x', '\022', '%', '\n', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\007', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'H', '\000', 'R', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\022', '\037', '\n', '\013', 'i', 'g', 'n', 'o', 'r',
+'e', '_', 'c', 'a', 's', 'e', '\030', '\006', ' ', '\001', '(', '\010', 'R', '\n', 'i', 'g', 'n', 'o', 'r', 'e', 'C', 'a', 's', 'e', ':',
+'\'', '\232', '\305', '\210', '\036', '\"', '\n', ' ', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e',
+'r', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\024', '\n', '\r', 'm', 'a', 't', 'c', 'h', '_',
+'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\003', '\370', 'B', '\001', 'J', '\004', '\010', '\004', '\020', '\005', 'R', '\005', 'r', 'e', 'g', 'e', 'x',
+'\"', '\214', '\001', '\n', '\021', 'L', 'i', 's', 't', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'J', '\n',
+'\010', 'p', 'a', 't', 't', 'e', 'r', 'n', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c',
+'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\010', 'p', 'a', 't', 't', 'e', 'r', 'n', 's', ':', '+',
+'\232', '\305', '\210', '\036', '&', '\n', '$', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r',
+'.', 'L', 'i', 's', 't', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '<', '\n', '#', 'i', 'o', '.',
+'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't',
+'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\013', 'S', 't', 'r', 'i', 'n', 'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310',
+'\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_matcher_v3_regex_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/string.proto",
+ UPB_STRVIEW_INIT(descriptor, 738)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h
new file mode 100644
index 00000000000..b0da1e7db7d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/string.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_STRING_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_STRING_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_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_StringMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_string_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.StringMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_ListStringMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_string_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.ListStringMatcher");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_STRING_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c
new file mode 100644
index 00000000000..6660ffad3a1
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c
@@ -0,0 +1,63 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/struct.upbdefs.h"
+
+extern upb_def_init envoy_type_matcher_v3_value_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_StructMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_StructMatcher_PathSegment_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_type_matcher_v3_StructMatcher_msginit,
+ &envoy_type_matcher_v3_StructMatcher_PathSegment_msginit,
+};
+
+static const char descriptor[576] = {'\n', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's',
+'t', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm',
+'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't',
+'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'v', 'a', 'l', 'u', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a',
+'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o',
+'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\276', '\002', '\n', '\r', 'S', 't', 'r', 'u', 'c', 't', 'M', 'a', 't', 'c',
+'h', 'e', 'r', '\022', 'N', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\002', ' ', '\003', '(', '\013', '2', '0', '.', 'e', 'n', 'v', 'o', 'y',
+'.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'u', 'c', 't', 'M', 'a',
+'t', 'c', 'h', 'e', 'r', '.', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002',
+'\010', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', 'C', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '#',
+'.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'V', 'a',
+'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\010', '\372', 'B', '\005', '\212', '\001', '\002', '\020', '\001', 'R', '\005', 'v', 'a', 'l',
+'u', 'e', '\032', 'o', '\n', '\013', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', '\022', '\033', '\n', '\003', 'k', 'e', 'y', '\030',
+'\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\003', 'k', 'e', 'y', ':', '3', '\232', '\305',
+'\210', '\036', '.', '\n', ',', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'S',
+'t', 'r', 'u', 'c', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r', '.', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', 'B',
+'\016', '\n', '\007', 's', 'e', 'g', 'm', 'e', 'n', 't', '\022', '\003', '\370', 'B', '\001', ':', '\'', '\232', '\305', '\210', '\036', '\"', '\n', ' ', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'S', 't', 'r', 'u', 'c', 't', 'M',
+'a', 't', 'c', 'h', 'e', 'r', 'B', '<', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\013', 'S', 't', 'r',
+'u', 'c', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_matcher_v3_value_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_struct_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/struct.proto",
+ UPB_STRVIEW_INIT(descriptor, 576)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h
new file mode 100644
index 00000000000..472d486aa8b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_STRUCT_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_STRUCT_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_def_init envoy_type_matcher_v3_struct_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_StructMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.StructMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_StructMatcher_PathSegment_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.StructMatcher.PathSegment");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_STRUCT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c
new file mode 100644
index 00000000000..ae8789941ef
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c
@@ -0,0 +1,81 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/value.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/matcher/v3/value.upbdefs.h"
+
+extern upb_def_init envoy_type_matcher_v3_number_proto_upbdefinit;
+extern upb_def_init envoy_type_matcher_v3_string_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_matcher_v3_ValueMatcher_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit;
+extern const upb_msglayout envoy_type_matcher_v3_ListMatcher_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_type_matcher_v3_ValueMatcher_msginit,
+ &envoy_type_matcher_v3_ValueMatcher_NullMatch_msginit,
+ &envoy_type_matcher_v3_ListMatcher_msginit,
+};
+
+static const char descriptor[942] = {'\n', '!', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 'v',
+'a', 'l', 'u', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a',
+'t', 'c', 'h', 'e', 'r', '.', 'v', '3', '\032', '\"', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c',
+'h', 'e', 'r', '/', 'v', '3', '/', 'n', 'u', 'm', 'b', 'e', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'e', 'n', 'v', 'o',
+'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'a', 't', 'c', 'h', 'e', 'r', '/', 'v', '3', '/', 's', 't', 'r', 'i', 'n', 'g', '.',
+'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's',
+'t', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\376', '\003', '\n',
+'\014', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', '\022', 'N', '\n', '\n', 'n', 'u', 'l', 'l', '_', 'm', 'a', 't',
+'c', 'h', '\030', '\001', ' ', '\001', '(', '\013', '2', '-', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't',
+'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', '.', 'N', 'u', 'l', 'l',
+'M', 'a', 't', 'c', 'h', 'H', '\000', 'R', '\t', 'n', 'u', 'l', 'l', 'M', 'a', 't', 'c', 'h', '\022', 'I', '\n', '\014', 'd', 'o', 'u',
+'b', 'l', 'e', '_', 'm', 'a', 't', 'c', 'h', '\030', '\002', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'D', 'o', 'u', 'b', 'l', 'e', 'M', 'a', 't', 'c',
+'h', 'e', 'r', 'H', '\000', 'R', '\013', 'd', 'o', 'u', 'b', 'l', 'e', 'M', 'a', 't', 'c', 'h', '\022', 'I', '\n', '\014', 's', 't', 'r',
+'i', 'n', 'g', '_', 'm', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\013', '2', '$', '.', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'S', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c',
+'h', 'e', 'r', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'M', 'a', 't', 'c', 'h', '\022', '\037', '\n', '\n', 'b', 'o', 'o',
+'l', '_', 'm', 'a', 't', 'c', 'h', '\030', '\004', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\t', 'b', 'o', 'o', 'l', 'M', 'a', 't', 'c',
+'h', '\022', '%', '\n', '\r', 'p', 'r', 'e', 's', 'e', 'n', 't', '_', 'm', 'a', 't', 'c', 'h', '\030', '\005', ' ', '\001', '(', '\010', 'H',
+'\000', 'R', '\014', 'p', 'r', 'e', 's', 'e', 'n', 't', 'M', 'a', 't', 'c', 'h', '\022', 'C', '\n', '\n', 'l', 'i', 's', 't', '_', 'm',
+'a', 't', 'c', 'h', '\030', '\006', ' ', '\001', '(', '\013', '2', '\"', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm',
+'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'L', 'i', 's', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'H', '\000', 'R', '\t',
+'l', 'i', 's', 't', 'M', 'a', 't', 'c', 'h', '\032', '=', '\n', '\t', 'N', 'u', 'l', 'l', 'M', 'a', 't', 'c', 'h', ':', '0', '\232',
+'\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', '.', 'N', 'u', 'l', 'l', 'M', 'a', 't', 'c', 'h', ':', '&', '\232',
+'\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.',
+'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c', 'h', 'e', 'r', 'B', '\024', '\n', '\r', 'm', 'a', 't', 'c', 'h', '_', 'p', 'a', 't',
+'t', 'e', 'r', 'n', '\022', '\003', '\370', 'B', '\001', '\"', '\210', '\001', '\n', '\013', 'L', 'i', 's', 't', 'M', 'a', 't', 'c', 'h', 'e', 'r',
+'\022', '<', '\n', '\006', 'o', 'n', 'e', '_', 'o', 'f', '\030', '\001', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'t', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', '.', 'V', 'a', 'l', 'u', 'e', 'M', 'a', 't', 'c',
+'h', 'e', 'r', 'H', '\000', 'R', '\005', 'o', 'n', 'e', 'O', 'f', ':', '%', '\232', '\305', '\210', '\036', ' ', '\n', '\036', 'e', 'n', 'v', 'o',
+'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'L', 'i', 's', 't', 'M', 'a', 't', 'c', 'h', 'e',
+'r', 'B', '\024', '\n', '\r', 'm', 'a', 't', 'c', 'h', '_', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\003', '\370', 'B', '\001', 'B', ';',
+'\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p',
+'e', '.', 'm', 'a', 't', 'c', 'h', 'e', 'r', '.', 'v', '3', 'B', '\n', 'V', 'a', 'l', 'u', 'e', 'P', 'r', 'o', 't', 'o', 'P',
+'\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[6] = {
+ &envoy_type_matcher_v3_number_proto_upbdefinit,
+ &envoy_type_matcher_v3_string_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_matcher_v3_value_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/matcher/v3/value.proto",
+ UPB_STRVIEW_INIT(descriptor, 942)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h
new file mode 100644
index 00000000000..c049f62f2f5
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/matcher/v3/value.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_MATCHER_V3_VALUE_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_MATCHER_V3_VALUE_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_def_init envoy_type_matcher_v3_value_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_ValueMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_value_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.ValueMatcher");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_ValueMatcher_NullMatch_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_value_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.ValueMatcher.NullMatch");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_matcher_v3_ListMatcher_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_matcher_v3_value_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.matcher.v3.ListMatcher");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_MATCHER_V3_VALUE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c
new file mode 100644
index 00000000000..9b08fcaf746
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c
@@ -0,0 +1,92 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/metadata/v3/metadata.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/metadata/v3/metadata.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKey_msginit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKey_PathSegment_msginit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKind_msginit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKind_Request_msginit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKind_Route_msginit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKind_Cluster_msginit;
+extern const upb_msglayout envoy_type_metadata_v3_MetadataKind_Host_msginit;
+
+static const upb_msglayout *layouts[7] = {
+ &envoy_type_metadata_v3_MetadataKey_msginit,
+ &envoy_type_metadata_v3_MetadataKey_PathSegment_msginit,
+ &envoy_type_metadata_v3_MetadataKind_msginit,
+ &envoy_type_metadata_v3_MetadataKind_Request_msginit,
+ &envoy_type_metadata_v3_MetadataKind_Route_msginit,
+ &envoy_type_metadata_v3_MetadataKind_Cluster_msginit,
+ &envoy_type_metadata_v3_MetadataKind_Host_msginit,
+};
+
+static const char descriptor[1104] = {'\n', '%', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '/', 'v', '3', '/',
+'m', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o', 't', 'o', '\022', '\026', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p',
+'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a',
+'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p',
+'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p',
+'r', 'o', 't', 'o', '\"', '\225', '\002', '\n', '\013', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '\022', '\031', '\n', '\003', 'k',
+'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\003', 'k', 'e', 'y', '\022', 'M', '\n',
+'\004', 'p', 'a', 't', 'h', '\030', '\002', ' ', '\003', '(', '\013', '2', '/', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.',
+'m', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '.', 'P',
+'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', 'B', '\010', '\372', 'B', '\005', '\222', '\001', '\002', '\010', '\001', 'R', '\004', 'p', 'a', 't',
+'h', '\032', 'q', '\n', '\013', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't', '\022', '\033', '\n', '\003', 'k', 'e', 'y', '\030', '\001',
+' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'H', '\000', 'R', '\003', 'k', 'e', 'y', ':', '5', '\232', '\305', '\210',
+'\036', '0', '\n', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v',
+'2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '.', 'P', 'a', 't', 'h', 'S', 'e', 'g', 'm', 'e', 'n', 't',
+'B', '\016', '\n', '\007', 's', 'e', 'g', 'm', 'e', 'n', 't', '\022', '\003', '\370', 'B', '\001', ':', ')', '\232', '\305', '\210', '\036', '$', '\n', '\"',
+'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e',
+'t', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '\"', '\322', '\004', '\n', '\014', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n',
+'d', '\022', 'H', '\n', '\007', 'r', 'e', 'q', 'u', 'e', 's', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o',
+'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a',
+'t', 'a', 'K', 'i', 'n', 'd', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', 'H', '\000', 'R', '\007', 'r', 'e', 'q', 'u', 'e', 's', 't',
+'\022', 'B', '\n', '\005', 'r', 'o', 'u', 't', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '*', '.', 'e', 'n', 'v', 'o', 'y', '.', 't',
+'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K',
+'i', 'n', 'd', '.', 'R', 'o', 'u', 't', 'e', 'H', '\000', 'R', '\005', 'r', 'o', 'u', 't', 'e', '\022', 'H', '\n', '\007', 'c', 'l', 'u',
+'s', 't', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\013', '2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm',
+'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'C',
+'l', 'u', 's', 't', 'e', 'r', 'H', '\000', 'R', '\007', 'c', 'l', 'u', 's', 't', 'e', 'r', '\022', '?', '\n', '\004', 'h', 'o', 's', 't',
+'\030', '\004', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd',
+'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'H', 'o', 's', 't', 'H',
+'\000', 'R', '\004', 'h', 'o', 's', 't', '\032', '=', '\n', '\007', 'R', 'e', 'q', 'u', 'e', 's', 't', ':', '2', '\232', '\305', '\210', '\036', '-',
+'\n', '+', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.',
+'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'R', 'e', 'q', 'u', 'e', 's', 't', '\032', '9', '\n', '\005', 'R',
+'o', 'u', 't', 'e', ':', '0', '\232', '\305', '\210', '\036', '+', '\n', ')', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm',
+'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'R',
+'o', 'u', 't', 'e', '\032', '=', '\n', '\007', 'C', 'l', 'u', 's', 't', 'e', 'r', ':', '2', '\232', '\305', '\210', '\036', '-', '\n', '+', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't',
+'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'C', 'l', 'u', 's', 't', 'e', 'r', '\032', '7', '\n', '\004', 'H', 'o', 's', 't',
+':', '/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd',
+'a', 't', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', '.', 'H', 'o', 's', 't', ':',
+'*', '\232', '\305', '\210', '\036', '%', '\n', '#', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a',
+'t', 'a', '.', 'v', '2', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', 'B', '\013', '\n', '\004', 'k', 'i', 'n',
+'d', '\022', '\003', '\370', 'B', '\001', 'B', '?', '\n', '$', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', 'B', '\r', 'M', 'e',
+'t', 'a', 'd', 'a', 't', 'a', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_metadata_v3_metadata_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/metadata/v3/metadata.proto",
+ UPB_STRVIEW_INIT(descriptor, 1104)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h
new file mode 100644
index 00000000000..f263f942bb5
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h
@@ -0,0 +1,65 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/metadata/v3/metadata.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_METADATA_V3_METADATA_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_METADATA_V3_METADATA_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_def_init envoy_type_metadata_v3_metadata_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKey_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKey");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKey_PathSegment_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKey.PathSegment");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKind_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKind");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKind_Request_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKind.Request");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKind_Route_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKind.Route");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKind_Cluster_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKind.Cluster");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_metadata_v3_MetadataKind_Host_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_metadata_v3_metadata_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.metadata.v3.MetadataKind.Host");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_METADATA_V3_METADATA_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c
new file mode 100644
index 00000000000..27c5118a35b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c
@@ -0,0 +1,95 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/tracing/v3/custom_tag.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/tracing/v3/custom_tag.upbdefs.h"
+
+extern upb_def_init envoy_type_metadata_v3_metadata_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_tracing_v3_CustomTag_msginit;
+extern const upb_msglayout envoy_type_tracing_v3_CustomTag_Literal_msginit;
+extern const upb_msglayout envoy_type_tracing_v3_CustomTag_Environment_msginit;
+extern const upb_msglayout envoy_type_tracing_v3_CustomTag_Header_msginit;
+extern const upb_msglayout envoy_type_tracing_v3_CustomTag_Metadata_msginit;
+
+static const upb_msglayout *layouts[5] = {
+ &envoy_type_tracing_v3_CustomTag_msginit,
+ &envoy_type_tracing_v3_CustomTag_Literal_msginit,
+ &envoy_type_tracing_v3_CustomTag_Environment_msginit,
+ &envoy_type_tracing_v3_CustomTag_Header_msginit,
+ &envoy_type_tracing_v3_CustomTag_Metadata_msginit,
+};
+
+static const char descriptor[1249] = {'\n', '&', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 't', 'r', 'a', 'c', 'i', 'n', 'g', '/', 'v', '3', '/', 'c',
+'u', 's', 't', 'o', 'm', '_', 't', 'a', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', '\032', '%', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e',
+'/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '/', 'v', '3', '/', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'p', 'r', 'o',
+'t', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't',
+'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\324', '\007', '\n', '\t', 'C', 'u',
+'s', 't', 'o', 'm', 'T', 'a', 'g', '\022', '\031', '\n', '\003', 't', 'a', 'g', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004',
+'r', '\002', '\020', '\001', 'R', '\003', 't', 'a', 'g', '\022', 'D', '\n', '\007', 'l', 'i', 't', 'e', 'r', 'a', 'l', '\030', '\002', ' ', '\001', '(',
+'\013', '2', '(', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3',
+'.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'L', 'i', 't', 'e', 'r', 'a', 'l', 'H', '\000', 'R', '\007', 'l', 'i', 't',
+'e', 'r', 'a', 'l', '\022', 'P', '\n', '\013', 'e', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', '\030', '\003', ' ', '\001', '(', '\013',
+'2', ',', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', '.',
+'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'E', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', 'H', '\000', 'R', '\013',
+'e', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', '\022', 'P', '\n', '\016', 'r', 'e', 'q', 'u', 'e', 's', 't', '_', 'h', 'e',
+'a', 'd', 'e', 'r', '\030', '\004', ' ', '\001', '(', '\013', '2', '\'', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't',
+'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'H', 'e', 'a', 'd', 'e',
+'r', 'H', '\000', 'R', '\r', 'r', 'e', 'q', 'u', 'e', 's', 't', 'H', 'e', 'a', 'd', 'e', 'r', '\022', 'G', '\n', '\010', 'm', 'e', 't',
+'a', 'd', 'a', 't', 'a', '\030', '\005', ' ', '\001', '(', '\013', '2', ')', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.',
+'t', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'M', 'e', 't', 'a',
+'d', 'a', 't', 'a', 'H', '\000', 'R', '\010', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '\032', 'X', '\n', '\007', 'L', 'i', 't', 'e', 'r',
+'a', 'l', '\022', '\035', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020',
+'\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '.', '\232', '\305', '\210', '\036', ')', '\n', '\'', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'L',
+'i', 't', 'e', 'r', 'a', 'l', '\032', '\203', '\001', '\n', '\013', 'E', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', '\022', '\033', '\n',
+'\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm',
+'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R',
+'\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', ':', '2', '\232', '\305', '\210', '\036', '-', '\n', '+', 'e', 'n', 'v',
+'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm',
+'T', 'a', 'g', '.', 'E', 'n', 'v', 'i', 'r', 'o', 'n', 'm', 'e', 'n', 't', '\032', '\177', '\n', '\006', 'H', 'e', 'a', 'd', 'e', 'r',
+'\022', '!', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'B', '\r', '\372', 'B', '\n', 'r', '\010', '\020', '\001', '\300', '\001',
+'\001', '\310', '\001', '\000', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l',
+'u', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', ':', '-', '\232',
+'\305', '\210', '\036', '(', '\n', '&', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.',
+'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'H', 'e', 'a', 'd', 'e', 'r', '\032', '\342', '\001', '\n', '\010', 'M',
+'e', 't', 'a', 'd', 'a', 't', 'a', '\022', '8', '\n', '\004', 'k', 'i', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\013', '2', '$', '.', 'e',
+'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't',
+'a', 'd', 'a', 't', 'a', 'K', 'i', 'n', 'd', 'R', '\004', 'k', 'i', 'n', 'd', '\022', 'F', '\n', '\014', 'm', 'e', 't', 'a', 'd', 'a',
+'t', 'a', '_', 'k', 'e', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2', '#', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '.', 'v', '3', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', 'R',
+'\013', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', 'K', 'e', 'y', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v',
+'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', ':',
+'/', '\232', '\305', '\210', '\036', '*', '\n', '(', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n',
+'g', '.', 'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', '.', 'M', 'e', 't', 'a', 'd', 'a', 't', 'a', ':', '&',
+'\232', '\305', '\210', '\036', '!', '\n', '\037', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g',
+'.', 'v', '2', '.', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a', 'g', 'B', '\013', '\n', '\004', 't', 'y', 'p', 'e', '\022', '\003', '\370', 'B',
+'\001', 'B', '?', '\n', '#', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.',
+'t', 'y', 'p', 'e', '.', 't', 'r', 'a', 'c', 'i', 'n', 'g', '.', 'v', '3', 'B', '\016', 'C', 'u', 's', 't', 'o', 'm', 'T', 'a',
+'g', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &envoy_type_metadata_v3_metadata_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_tracing_v3_custom_tag_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/tracing/v3/custom_tag.proto",
+ UPB_STRVIEW_INIT(descriptor, 1249)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h
new file mode 100644
index 00000000000..96203233ec2
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h
@@ -0,0 +1,55 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/tracing/v3/custom_tag.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_TRACING_V3_CUSTOM_TAG_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_TRACING_V3_CUSTOM_TAG_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_def_init envoy_type_tracing_v3_custom_tag_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_tracing_v3_CustomTag_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_tracing_v3_custom_tag_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.tracing.v3.CustomTag");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_tracing_v3_CustomTag_Literal_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_tracing_v3_custom_tag_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.tracing.v3.CustomTag.Literal");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_tracing_v3_CustomTag_Environment_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_tracing_v3_custom_tag_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.tracing.v3.CustomTag.Environment");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_tracing_v3_CustomTag_Header_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_tracing_v3_custom_tag_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.tracing.v3.CustomTag.Header");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_tracing_v3_CustomTag_Metadata_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_tracing_v3_custom_tag_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.tracing.v3.CustomTag.Metadata");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_TRACING_V3_CUSTOM_TAG_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c
new file mode 100644
index 00000000000..4dd38687ad4
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c
@@ -0,0 +1,34 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/http.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/v3/http.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+
+static const char descriptor[184] = {'\n', '\030', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'h', 't', 't', 'p', '.', 'p', 'r', 'o', 't',
+'o', '\022', '\r', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '*', '2', '\n',
+'\017', 'C', 'o', 'd', 'e', 'c', 'C', 'l', 'i', 'e', 'n', 't', 'T', 'y', 'p', 'e', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '1',
+'\020', '\000', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '2', '\020', '\001', '\022', '\t', '\n', '\005', 'H', 'T', 'T', 'P', '3', '\020', '\002', 'B',
+'2', '\n', '\033', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y',
+'p', 'e', '.', 'v', '3', 'B', '\t', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020',
+'\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_v3_http_proto_upbdefinit = {
+ deps,
+ NULL,
+ "envoy/type/v3/http.proto",
+ UPB_STRVIEW_INIT(descriptor, 184)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h
new file mode 100644
index 00000000000..c71ed1bb04e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.h
@@ -0,0 +1,30 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/http.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_V3_HTTP_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_V3_HTTP_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_def_init envoy_type_v3_http_proto_upbdefinit;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_V3_HTTP_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c
new file mode 100644
index 00000000000..d15de820957
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c
@@ -0,0 +1,59 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/percent.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/v3/percent.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout envoy_type_v3_Percent_msginit;
+extern const upb_msglayout envoy_type_v3_FractionalPercent_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &envoy_type_v3_Percent_msginit,
+ &envoy_type_v3_FractionalPercent_msginit,
+};
+
+static const char descriptor[529] = {'\n', '\033', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'p', 'e', 'r', 'c', 'e', 'n', 't', '.', 'p',
+'r', 'o', 't', 'o', '\022', '\r', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a',
+'/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o',
+'\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o',
+'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i',
+'d', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', 'S', '\n', '\007', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', '-', '\n', '\005',
+'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\001', 'B', '\027', '\372', 'B', '\024', '\022', '\022', '\031', '\000', '\000', '\000', '\000', '\000', '\000',
+'Y', '@', ')', '\000', '\000', '\000', '\000', '\000', '\000', '\000', '\000', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\031', '\232', '\305', '\210', '\036', '\024',
+'\n', '\022', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\"', '\363', '\001', '\n', '\021',
+'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', '\022', '\034', '\n', '\t', 'n', 'u', 'm', 'e',
+'r', 'a', 't', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\t', 'n', 'u', 'm', 'e', 'r', 'a', 't', 'o', 'r', '\022', '\\', '\n',
+'\013', 'd', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\016', '2', '0', '.', 'e', 'n', 'v', 'o',
+'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '.', 'F', 'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e',
+'n', 't', '.', 'D', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', 'T', 'y', 'p', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001',
+'\002', '\020', '\001', 'R', '\013', 'd', 'e', 'n', 'o', 'm', 'i', 'n', 'a', 't', 'o', 'r', '\"', '=', '\n', '\017', 'D', 'e', 'n', 'o', 'm',
+'i', 'n', 'a', 't', 'o', 'r', 'T', 'y', 'p', 'e', '\022', '\013', '\n', '\007', 'H', 'U', 'N', 'D', 'R', 'E', 'D', '\020', '\000', '\022', '\020',
+'\n', '\014', 'T', 'E', 'N', '_', 'T', 'H', 'O', 'U', 'S', 'A', 'N', 'D', '\020', '\001', '\022', '\013', '\n', '\007', 'M', 'I', 'L', 'L', 'I',
+'O', 'N', '\020', '\002', ':', '#', '\232', '\305', '\210', '\036', '\036', '\n', '\034', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'F',
+'r', 'a', 'c', 't', 'i', 'o', 'n', 'a', 'l', 'P', 'e', 'r', 'c', 'e', 'n', 't', 'B', '5', '\n', '\033', 'i', 'o', '.', 'e', 'n',
+'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', 'B', '\014', 'P',
+'e', 'r', 'c', 'e', 'n', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_v3_percent_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/v3/percent.proto",
+ UPB_STRVIEW_INIT(descriptor, 529)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h
new file mode 100644
index 00000000000..67987c9e0d9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/percent.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_V3_PERCENT_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_V3_PERCENT_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_def_init envoy_type_v3_percent_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_v3_Percent_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_v3_percent_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.v3.Percent");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_v3_FractionalPercent_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_v3_percent_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.v3.FractionalPercent");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_V3_PERCENT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c
new file mode 100644
index 00000000000..5a4db5c4029
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c
@@ -0,0 +1,54 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/range.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/v3/range.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_type_v3_Int64Range_msginit;
+extern const upb_msglayout envoy_type_v3_Int32Range_msginit;
+extern const upb_msglayout envoy_type_v3_DoubleRange_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &envoy_type_v3_Int64Range_msginit,
+ &envoy_type_v3_Int32Range_msginit,
+ &envoy_type_v3_DoubleRange_msginit,
+};
+
+static const char descriptor[423] = {'\n', '\031', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 'r', 'a', 'n', 'g', 'e', '.', 'p', 'r', 'o',
+'t', 'o', '\022', '\r', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!',
+'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i',
+'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', 'R', '\n', '\n', 'I', 'n', 't', '6', '4', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n',
+'\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\005', 's', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n',
+'d', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\003', 'e', 'n', 'd', ':', '\034', '\232', '\305', '\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o',
+'y', '.', 't', 'y', 'p', 'e', '.', 'I', 'n', 't', '6', '4', 'R', 'a', 'n', 'g', 'e', '\"', 'R', '\n', '\n', 'I', 'n', 't', '3',
+'2', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\005', 's', 't',
+'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', ':', '\034', '\232', '\305',
+'\210', '\036', '\027', '\n', '\025', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'I', 'n', 't', '3', '2', 'R', 'a', 'n', 'g',
+'e', '\"', 'T', '\n', '\013', 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't',
+'\030', '\001', ' ', '\001', '(', '\001', 'R', '\005', 's', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(',
+'\001', 'R', '\003', 'e', 'n', 'd', ':', '\035', '\232', '\305', '\210', '\036', '\030', '\n', '\026', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'a', 'n', 'g', 'e', 'B', '3', '\n', '\033', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p',
+'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', 'B', '\n', 'R', 'a', 'n', 'g', 'e',
+'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[3] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_v3_range_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/v3/range.proto",
+ UPB_STRVIEW_INIT(descriptor, 423)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h
new file mode 100644
index 00000000000..403b7c5dd0e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/range.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_V3_RANGE_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_V3_RANGE_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_def_init envoy_type_v3_range_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_v3_Int64Range_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_v3_range_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.v3.Int64Range");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_v3_Int32Range_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_v3_range_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.v3.Int32Range");
+}
+
+UPB_INLINE const upb_msgdef *envoy_type_v3_DoubleRange_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_v3_range_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.v3.DoubleRange");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_V3_RANGE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c
new file mode 100644
index 00000000000..f97b1b4ff54
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c
@@ -0,0 +1,47 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/semantic_version.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "envoy/type/v3/semantic_version.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init udpa_annotations_versioning_proto_upbdefinit;
+extern const upb_msglayout envoy_type_v3_SemanticVersion_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &envoy_type_v3_SemanticVersion_msginit,
+};
+
+static const char descriptor[337] = {'\n', '$', 'e', 'n', 'v', 'o', 'y', '/', 't', 'y', 'p', 'e', '/', 'v', '3', '/', 's', 'e', 'm', 'a', 'n', 't', 'i', 'c', '_',
+'v', 'e', 'r', 's', 'i', 'o', 'n', '.', 'p', 'r', 'o', 't', 'o', '\022', '\r', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a',
+'t', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\"', '\220', '\001', '\n', '\017', 'S',
+'e', 'm', 'a', 'n', 't', 'i', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', '\022', '!', '\n', '\014', 'm', 'a', 'j', 'o', 'r', '_', 'n',
+'u', 'm', 'b', 'e', 'r', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\013', 'm', 'a', 'j', 'o', 'r', 'N', 'u', 'm', 'b', 'e', 'r', '\022',
+'!', '\n', '\014', 'm', 'i', 'n', 'o', 'r', '_', 'n', 'u', 'm', 'b', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\r', 'R', '\013', 'm', 'i',
+'n', 'o', 'r', 'N', 'u', 'm', 'b', 'e', 'r', '\022', '\024', '\n', '\005', 'p', 'a', 't', 'c', 'h', '\030', '\003', ' ', '\001', '(', '\r', 'R',
+'\005', 'p', 'a', 't', 'c', 'h', ':', '!', '\232', '\305', '\210', '\036', '\034', '\n', '\032', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e',
+'.', 'S', 'e', 'm', 'a', 'n', 't', 'i', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'B', '=', '\n', '\033', 'i', 'o', '.', 'e', 'n',
+'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'e', 'n', 'v', 'o', 'y', '.', 't', 'y', 'p', 'e', '.', 'v', '3', 'B', '\024', 'S',
+'e', 'm', 'a', 'n', 't', 'i', 'c', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321',
+'\006', '\002', '\020', '\002', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[3] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &udpa_annotations_versioning_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init envoy_type_v3_semantic_version_proto_upbdefinit = {
+ deps,
+ layouts,
+ "envoy/type/v3/semantic_version.proto",
+ UPB_STRVIEW_INIT(descriptor, 337)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h
new file mode 100644
index 00000000000..ca21dbd95e7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * envoy/type/v3/semantic_version.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef ENVOY_TYPE_V3_SEMANTIC_VERSION_PROTO_UPBDEFS_H_
+#define ENVOY_TYPE_V3_SEMANTIC_VERSION_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_def_init envoy_type_v3_semantic_version_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *envoy_type_v3_SemanticVersion_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &envoy_type_v3_semantic_version_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "envoy.type.v3.SemanticVersion");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* ENVOY_TYPE_V3_SEMANTIC_VERSION_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c
new file mode 100644
index 00000000000..f1b69216546
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/api/annotations.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/api/annotations.upbdefs.h"
+
+extern upb_def_init google_api_http_proto_upbdefinit;
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+
+static const char descriptor[296] = {'\n', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.',
+'p', 'r', 'o', 't', 'o', '\022', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '\032', '\025', 'g', 'o', 'o', 'g', 'l', 'e',
+'/', 'a', 'p', 'i', '/', 'h', 't', 't', 'p', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':',
+'K', '\n', '\004', 'h', 't', 't', 'p', '\022', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\260', '\312', '\274', '\"', ' ', '\001', '(', '\013', '2', '\024',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'H', 't', 't', 'p', 'R', 'u', 'l', 'e', 'R', '\004', 'h', 't', 't',
+'p', 'B', 'n', '\n', '\016', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', 'B', '\020', 'A', 'n', 'n', 'o',
+'t', 'a', 't', 'i', 'o', 'n', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', 'A', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o',
+'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'e', 'n', 'p', 'r', 'o', 't', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a',
+'p', 'i', 's', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', ';', 'a', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', 's', '\242', '\002', '\004', 'G', 'A', 'P', 'I', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[3] = {
+ &google_api_http_proto_upbdefinit,
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init google_api_annotations_proto_upbdefinit = {
+ deps,
+ NULL,
+ "google/api/annotations.proto",
+ UPB_STRVIEW_INIT(descriptor, 296)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h
new file mode 100644
index 00000000000..8b5f25a4fd9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h
@@ -0,0 +1,30 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/api/annotations.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_API_ANNOTATIONS_PROTO_UPBDEFS_H_
+#define GOOGLE_API_ANNOTATIONS_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_def_init google_api_annotations_proto_upbdefinit;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_API_ANNOTATIONS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c
new file mode 100644
index 00000000000..232fd18de88
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c
@@ -0,0 +1,61 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/api/http.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/api/http.upbdefs.h"
+
+extern const upb_msglayout google_api_Http_msginit;
+extern const upb_msglayout google_api_HttpRule_msginit;
+extern const upb_msglayout google_api_CustomHttpPattern_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &google_api_Http_msginit,
+ &google_api_HttpRule_msginit,
+ &google_api_CustomHttpPattern_msginit,
+};
+
+static const char descriptor[684] = {'\n', '\025', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'a', 'p', 'i', '/', 'h', 't', 't', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\n',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '\"', 'y', '\n', '\004', 'H', 't', 't', 'p', '\022', '*', '\n', '\005', 'r', 'u', 'l',
+'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'H', 't', 't',
+'p', 'R', 'u', 'l', 'e', 'R', '\005', 'r', 'u', 'l', 'e', 's', '\022', 'E', '\n', '\037', 'f', 'u', 'l', 'l', 'y', '_', 'd', 'e', 'c',
+'o', 'd', 'e', '_', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'e', 'x', 'p', 'a', 'n', 's', 'i', 'o', 'n', '\030', '\002', ' ',
+'\001', '(', '\010', 'R', '\034', 'f', 'u', 'l', 'l', 'y', 'D', 'e', 'c', 'o', 'd', 'e', 'R', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'E',
+'x', 'p', 'a', 'n', 's', 'i', 'o', 'n', '\"', '\332', '\002', '\n', '\010', 'H', 't', 't', 'p', 'R', 'u', 'l', 'e', '\022', '\032', '\n', '\010',
+'s', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\010', 's', 'e', 'l', 'e', 'c', 't', 'o', 'r', '\022',
+'\022', '\n', '\003', 'g', 'e', 't', '\030', '\002', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\003', 'g', 'e', 't', '\022', '\022', '\n', '\003', 'p', 'u',
+'t', '\030', '\003', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\003', 'p', 'u', 't', '\022', '\024', '\n', '\004', 'p', 'o', 's', 't', '\030', '\004', ' ',
+'\001', '(', '\t', 'H', '\000', 'R', '\004', 'p', 'o', 's', 't', '\022', '\030', '\n', '\006', 'd', 'e', 'l', 'e', 't', 'e', '\030', '\005', ' ', '\001',
+'(', '\t', 'H', '\000', 'R', '\006', 'd', 'e', 'l', 'e', 't', 'e', '\022', '\026', '\n', '\005', 'p', 'a', 't', 'c', 'h', '\030', '\006', ' ', '\001',
+'(', '\t', 'H', '\000', 'R', '\005', 'p', 'a', 't', 'c', 'h', '\022', '7', '\n', '\006', 'c', 'u', 's', 't', 'o', 'm', '\030', '\010', ' ', '\001',
+'(', '\013', '2', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'C', 'u', 's', 't', 'o', 'm', 'H', 't', 't',
+'p', 'P', 'a', 't', 't', 'e', 'r', 'n', 'H', '\000', 'R', '\006', 'c', 'u', 's', 't', 'o', 'm', '\022', '\022', '\n', '\004', 'b', 'o', 'd',
+'y', '\030', '\007', ' ', '\001', '(', '\t', 'R', '\004', 'b', 'o', 'd', 'y', '\022', '#', '\n', '\r', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e',
+'_', 'b', 'o', 'd', 'y', '\030', '\014', ' ', '\001', '(', '\t', 'R', '\014', 'r', 'e', 's', 'p', 'o', 'n', 's', 'e', 'B', 'o', 'd', 'y',
+'\022', 'E', '\n', '\023', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', '_', 'b', 'i', 'n', 'd', 'i', 'n', 'g', 's', '\030', '\013',
+' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', '.', 'H', 't', 't', 'p', 'R', 'u', 'l',
+'e', 'R', '\022', 'a', 'd', 'd', 'i', 't', 'i', 'o', 'n', 'a', 'l', 'B', 'i', 'n', 'd', 'i', 'n', 'g', 's', 'B', '\t', '\n', '\007',
+'p', 'a', 't', 't', 'e', 'r', 'n', '\"', ';', '\n', '\021', 'C', 'u', 's', 't', 'o', 'm', 'H', 't', 't', 'p', 'P', 'a', 't', 't',
+'e', 'r', 'n', '\022', '\022', '\n', '\004', 'k', 'i', 'n', 'd', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'k', 'i', 'n', 'd', '\022', '\022',
+'\n', '\004', 'p', 'a', 't', 'h', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\004', 'p', 'a', 't', 'h', 'B', 'j', '\n', '\016', 'c', 'o', 'm',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'a', 'p', 'i', 'B', '\t', 'H', 't', 't', 'p', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z',
+'A', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'e', 'n', 'p', 'r', 'o',
+'t', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a', 'p', 'i', 's', '/', 'a', 'p', 'i', '/', 'a', 'n', 'n', 'o', 't', 'a', 't',
+'i', 'o', 'n', 's', ';', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '\370', '\001', '\001', '\242', '\002', '\004', 'G', 'A', 'P',
+'I', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_api_http_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/api/http.proto",
+ UPB_STRVIEW_INIT(descriptor, 684)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h
new file mode 100644
index 00000000000..872706b42bb
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/api/http.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_API_HTTP_PROTO_UPBDEFS_H_
+#define GOOGLE_API_HTTP_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_def_init google_api_http_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_api_Http_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_api_http_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.api.Http");
+}
+
+UPB_INLINE const upb_msgdef *google_api_HttpRule_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_api_http_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.api.HttpRule");
+}
+
+UPB_INLINE const upb_msgdef *google_api_CustomHttpPattern_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_api_http_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.api.CustomHttpPattern");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_API_HTTP_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c
new file mode 100644
index 00000000000..7db348329ac
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c
@@ -0,0 +1,39 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/any.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/any.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_Any_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &google_protobuf_Any_msginit,
+};
+
+static const char descriptor[228] = {'\n', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o',
+'t', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', '6', '\n', '\003', 'A', 'n',
+'y', '\022', '\031', '\n', '\010', 't', 'y', 'p', 'e', '_', 'u', 'r', 'l', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e',
+'U', 'r', 'l', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\014', 'R', '\005', 'v', 'a', 'l', 'u', 'e',
+'B', 'v', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\010',
+'A', 'n', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', ',', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g',
+'.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o', 'w', 'n',
+'/', 'a', 'n', 'y', 'p', 'b', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o',
+'t', 'o', '3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_any_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/any.proto",
+ UPB_STRVIEW_INIT(descriptor, 228)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h
new file mode 100644
index 00000000000..35fb19152ff
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/any.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_ANY_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_ANY_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_def_init google_protobuf_any_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_Any_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_any_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Any");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_ANY_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c
new file mode 100644
index 00000000000..9026d56d621
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c
@@ -0,0 +1,386 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/descriptor.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/descriptor.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_FileDescriptorSet_msginit;
+extern const upb_msglayout google_protobuf_FileDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_DescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_DescriptorProto_ExtensionRange_msginit;
+extern const upb_msglayout google_protobuf_DescriptorProto_ReservedRange_msginit;
+extern const upb_msglayout google_protobuf_ExtensionRangeOptions_msginit;
+extern const upb_msglayout google_protobuf_FieldDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_OneofDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_EnumDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit;
+extern const upb_msglayout google_protobuf_EnumValueDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_ServiceDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_MethodDescriptorProto_msginit;
+extern const upb_msglayout google_protobuf_FileOptions_msginit;
+extern const upb_msglayout google_protobuf_MessageOptions_msginit;
+extern const upb_msglayout google_protobuf_FieldOptions_msginit;
+extern const upb_msglayout google_protobuf_OneofOptions_msginit;
+extern const upb_msglayout google_protobuf_EnumOptions_msginit;
+extern const upb_msglayout google_protobuf_EnumValueOptions_msginit;
+extern const upb_msglayout google_protobuf_ServiceOptions_msginit;
+extern const upb_msglayout google_protobuf_MethodOptions_msginit;
+extern const upb_msglayout google_protobuf_UninterpretedOption_msginit;
+extern const upb_msglayout google_protobuf_UninterpretedOption_NamePart_msginit;
+extern const upb_msglayout google_protobuf_SourceCodeInfo_msginit;
+extern const upb_msglayout google_protobuf_SourceCodeInfo_Location_msginit;
+extern const upb_msglayout google_protobuf_GeneratedCodeInfo_msginit;
+extern const upb_msglayout google_protobuf_GeneratedCodeInfo_Annotation_msginit;
+
+static const upb_msglayout *layouts[27] = {
+ &google_protobuf_FileDescriptorSet_msginit,
+ &google_protobuf_FileDescriptorProto_msginit,
+ &google_protobuf_DescriptorProto_msginit,
+ &google_protobuf_DescriptorProto_ExtensionRange_msginit,
+ &google_protobuf_DescriptorProto_ReservedRange_msginit,
+ &google_protobuf_ExtensionRangeOptions_msginit,
+ &google_protobuf_FieldDescriptorProto_msginit,
+ &google_protobuf_OneofDescriptorProto_msginit,
+ &google_protobuf_EnumDescriptorProto_msginit,
+ &google_protobuf_EnumDescriptorProto_EnumReservedRange_msginit,
+ &google_protobuf_EnumValueDescriptorProto_msginit,
+ &google_protobuf_ServiceDescriptorProto_msginit,
+ &google_protobuf_MethodDescriptorProto_msginit,
+ &google_protobuf_FileOptions_msginit,
+ &google_protobuf_MessageOptions_msginit,
+ &google_protobuf_FieldOptions_msginit,
+ &google_protobuf_OneofOptions_msginit,
+ &google_protobuf_EnumOptions_msginit,
+ &google_protobuf_EnumValueOptions_msginit,
+ &google_protobuf_ServiceOptions_msginit,
+ &google_protobuf_MethodOptions_msginit,
+ &google_protobuf_UninterpretedOption_msginit,
+ &google_protobuf_UninterpretedOption_NamePart_msginit,
+ &google_protobuf_SourceCodeInfo_msginit,
+ &google_protobuf_SourceCodeInfo_Location_msginit,
+ &google_protobuf_GeneratedCodeInfo_msginit,
+ &google_protobuf_GeneratedCodeInfo_Annotation_msginit,
+};
+
+static const char descriptor[7601] = {'\n', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p',
+'t', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '\"', 'M', '\n', '\021', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'S', 'e', 't', '\022', '8', '\n',
+'\004', 'f', 'i', 'l', 'e', '\030', '\001', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R',
+'\004', 'f', 'i', 'l', 'e', '\"', '\344', '\004', '\n', '\023', 'F', 'i', 'l', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P',
+'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022',
+'\030', '\n', '\007', 'p', 'a', 'c', 'k', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'p', 'a', 'c', 'k', 'a', 'g', 'e',
+'\022', '\036', '\n', '\n', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'y', '\030', '\003', ' ', '\003', '(', '\t', 'R', '\n', 'd', 'e', 'p',
+'e', 'n', 'd', 'e', 'n', 'c', 'y', '\022', '+', '\n', '\021', 'p', 'u', 'b', 'l', 'i', 'c', '_', 'd', 'e', 'p', 'e', 'n', 'd', 'e',
+'n', 'c', 'y', '\030', '\n', ' ', '\003', '(', '\005', 'R', '\020', 'p', 'u', 'b', 'l', 'i', 'c', 'D', 'e', 'p', 'e', 'n', 'd', 'e', 'n',
+'c', 'y', '\022', '\'', '\n', '\017', 'w', 'e', 'a', 'k', '_', 'd', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'y', '\030', '\013', ' ', '\003',
+'(', '\005', 'R', '\016', 'w', 'e', 'a', 'k', 'D', 'e', 'p', 'e', 'n', 'd', 'e', 'n', 'c', 'y', '\022', 'C', '\n', '\014', 'm', 'e', 's',
+'s', 'a', 'g', 'e', '_', 't', 'y', 'p', 'e', '\030', '\004', ' ', '\003', '(', '\013', '2', ' ', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R',
+'\013', 'm', 'e', 's', 's', 'a', 'g', 'e', 'T', 'y', 'p', 'e', '\022', 'A', '\n', '\t', 'e', 'n', 'u', 'm', '_', 't', 'y', 'p', 'e',
+'\030', '\005', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'E', 'n', 'u', 'm', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\010', 'e', 'n', 'u', 'm',
+'T', 'y', 'p', 'e', '\022', 'A', '\n', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\030', '\006', ' ', '\003', '(', '\013', '2', '\'', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'D', 'e', 's',
+'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\007', 's', 'e', 'r', 'v', 'i', 'c', 'e', '\022', 'C', '\n', '\t',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\007', ' ', '\003', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P',
+'r', 'o', 't', 'o', 'R', '\t', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\022', '6', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n',
+'s', '\030', '\010', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'F', 'i', 'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', 'I', '\n', '\020',
+'s', 'o', 'u', 'r', 'c', 'e', '_', 'c', 'o', 'd', 'e', '_', 'i', 'n', 'f', 'o', '\030', '\t', ' ', '\001', '(', '\013', '2', '\037', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd',
+'e', 'I', 'n', 'f', 'o', 'R', '\016', 's', 'o', 'u', 'r', 'c', 'e', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', '\026', '\n', '\006',
+'s', 'y', 'n', 't', 'a', 'x', '\030', '\014', ' ', '\001', '(', '\t', 'R', '\006', 's', 'y', 'n', 't', 'a', 'x', '\"', '\271', '\006', '\n', '\017',
+'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001',
+' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ';', '\n', '\005', 'f', 'i', 'e', 'l', 'd', '\030', '\002', ' ', '\003', '(', '\013',
+'2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D',
+'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\005', 'f', 'i', 'e', 'l', 'd', '\022', 'C', '\n', '\t',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\006', ' ', '\003', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P',
+'r', 'o', 't', 'o', 'R', '\t', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\022', 'A', '\n', '\013', 'n', 'e', 's', 't', 'e', 'd',
+'_', 't', 'y', 'p', 'e', '\030', '\003', ' ', '\003', '(', '\013', '2', ' ', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\n', 'n', 'e', 's',
+'t', 'e', 'd', 'T', 'y', 'p', 'e', '\022', 'A', '\n', '\t', 'e', 'n', 'u', 'm', '_', 't', 'y', 'p', 'e', '\030', '\004', ' ', '\003', '(',
+'\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'D',
+'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\010', 'e', 'n', 'u', 'm', 'T', 'y', 'p', 'e', '\022',
+'X', '\n', '\017', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\005', ' ', '\003', '(', '\013', '2',
+'/', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p',
+'t', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', 'R', '\016',
+'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\022', 'D', '\n', '\n', 'o', 'n', 'e', 'o', 'f', '_', 'd',
+'e', 'c', 'l', '\030', '\010', ' ', '\003', '(', '\013', '2', '%', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'O', 'n', 'e', 'o', 'f', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\t',
+'o', 'n', 'e', 'o', 'f', 'D', 'e', 'c', 'l', '\022', '9', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\007', ' ', '\001', '(',
+'\013', '2', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a',
+'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', 'U', '\n', '\016', 'r', 'e', 's',
+'e', 'r', 'v', 'e', 'd', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\t', ' ', '\003', '(', '\013', '2', '.', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't',
+'o', '.', 'R', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'R', 'a', 'n', 'g', 'e', 'R', '\r', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd',
+'R', 'a', 'n', 'g', 'e', '\022', '#', '\n', '\r', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'n', 'a', 'm', 'e', '\030', '\n', ' ',
+'\003', '(', '\t', 'R', '\014', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'N', 'a', 'm', 'e', '\032', 'z', '\n', '\016', 'E', 'x', 't', 'e',
+'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005',
+'R', '\005', 's', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd',
+'\022', '@', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '&', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e',
+'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\032', '7', '\n', '\r', 'R', 'e', 's', 'e', 'r',
+'v', 'e', 'd', 'R', 'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\005',
+'s', 't', 'a', 'r', 't', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', '\"', '|',
+'\n', '\025', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', 'R', 'a', 'n', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'X',
+'\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007',
+' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n',
+'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e',
+'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"',
+'\301', '\006', '\n', '\024', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022',
+'\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\026', '\n', '\006', 'n', 'u',
+'m', 'b', 'e', 'r', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\022', 'A', '\n', '\005', 'l', 'a', 'b',
+'e', 'l', '\030', '\004', ' ', '\001', '(', '\016', '2', '+', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'L', 'a',
+'b', 'e', 'l', 'R', '\005', 'l', 'a', 'b', 'e', 'l', '\022', '>', '\n', '\004', 't', 'y', 'p', 'e', '\030', '\005', ' ', '\001', '(', '\016', '2',
+'*', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'D', 'e',
+'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'T', 'y', 'p', 'e', 'R', '\004', 't', 'y', 'p', 'e', '\022',
+'\033', '\n', '\t', 't', 'y', 'p', 'e', '_', 'n', 'a', 'm', 'e', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\010', 't', 'y', 'p', 'e', 'N',
+'a', 'm', 'e', '\022', '\032', '\n', '\010', 'e', 'x', 't', 'e', 'n', 'd', 'e', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\010', 'e', 'x',
+'t', 'e', 'n', 'd', 'e', 'e', '\022', '#', '\n', '\r', 'd', 'e', 'f', 'a', 'u', 'l', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\007',
+' ', '\001', '(', '\t', 'R', '\014', 'd', 'e', 'f', 'a', 'u', 'l', 't', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n', '\013', 'o', 'n', 'e',
+'o', 'f', '_', 'i', 'n', 'd', 'e', 'x', '\030', '\t', ' ', '\001', '(', '\005', 'R', '\n', 'o', 'n', 'e', 'o', 'f', 'I', 'n', 'd', 'e',
+'x', '\022', '\033', '\n', '\t', 'j', 's', 'o', 'n', '_', 'n', 'a', 'm', 'e', '\030', '\n', ' ', '\001', '(', '\t', 'R', '\010', 'j', 's', 'o',
+'n', 'N', 'a', 'm', 'e', '\022', '7', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\010', ' ', '\001', '(', '\013', '2', '\035', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i',
+'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', '\'', '\n', '\017', 'p', 'r', 'o', 't', 'o', '3', '_', 'o', 'p',
+'t', 'i', 'o', 'n', 'a', 'l', '\030', '\021', ' ', '\001', '(', '\010', 'R', '\016', 'p', 'r', 'o', 't', 'o', '3', 'O', 'p', 't', 'i', 'o',
+'n', 'a', 'l', '\"', '\266', '\002', '\n', '\004', 'T', 'y', 'p', 'e', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'D', 'O', 'U', 'B',
+'L', 'E', '\020', '\001', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'F', 'L', 'O', 'A', 'T', '\020', '\002', '\022', '\016', '\n', '\n', 'T',
+'Y', 'P', 'E', '_', 'I', 'N', 'T', '6', '4', '\020', '\003', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T', '6',
+'4', '\020', '\004', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'I', 'N', 'T', '3', '2', '\020', '\005', '\022', '\020', '\n', '\014', 'T', 'Y',
+'P', 'E', '_', 'F', 'I', 'X', 'E', 'D', '6', '4', '\020', '\006', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'F', 'I', 'X', 'E',
+'D', '3', '2', '\020', '\007', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', 'E', '_', 'B', 'O', 'O', 'L', '\020', '\010', '\022', '\017', '\n', '\013', 'T',
+'Y', 'P', 'E', '_', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\t', '\022', '\016', '\n', '\n', 'T', 'Y', 'P', 'E', '_', 'G', 'R', 'O', 'U',
+'P', '\020', '\n', '\022', '\020', '\n', '\014', 'T', 'Y', 'P', 'E', '_', 'M', 'E', 'S', 'S', 'A', 'G', 'E', '\020', '\013', '\022', '\016', '\n', '\n',
+'T', 'Y', 'P', 'E', '_', 'B', 'Y', 'T', 'E', 'S', '\020', '\014', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'U', 'I', 'N', 'T',
+'3', '2', '\020', '\r', '\022', '\r', '\n', '\t', 'T', 'Y', 'P', 'E', '_', 'E', 'N', 'U', 'M', '\020', '\016', '\022', '\021', '\n', '\r', 'T', 'Y',
+'P', 'E', '_', 'S', 'F', 'I', 'X', 'E', 'D', '3', '2', '\020', '\017', '\022', '\021', '\n', '\r', 'T', 'Y', 'P', 'E', '_', 'S', 'F', 'I',
+'X', 'E', 'D', '6', '4', '\020', '\020', '\022', '\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '3', '2', '\020', '\021', '\022',
+'\017', '\n', '\013', 'T', 'Y', 'P', 'E', '_', 'S', 'I', 'N', 'T', '6', '4', '\020', '\022', '\"', 'C', '\n', '\005', 'L', 'a', 'b', 'e', 'l',
+'\022', '\022', '\n', '\016', 'L', 'A', 'B', 'E', 'L', '_', 'O', 'P', 'T', 'I', 'O', 'N', 'A', 'L', '\020', '\001', '\022', '\022', '\n', '\016', 'L',
+'A', 'B', 'E', 'L', '_', 'R', 'E', 'Q', 'U', 'I', 'R', 'E', 'D', '\020', '\002', '\022', '\022', '\n', '\016', 'L', 'A', 'B', 'E', 'L', '_',
+'R', 'E', 'P', 'E', 'A', 'T', 'E', 'D', '\020', '\003', '\"', 'c', '\n', '\024', 'O', 'n', 'e', 'o', 'f', 'D', 'e', 's', 'c', 'r', 'i',
+'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004',
+'n', 'a', 'm', 'e', '\022', '7', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\002', ' ', '\001', '(', '\013', '2', '\035', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'n', 'e', 'o', 'f', 'O', 'p', 't', 'i', 'o',
+'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\"', '\343', '\002', '\n', '\023', 'E', 'n', 'u', 'm', 'D', 'e', 's', 'c', 'r',
+'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R',
+'\004', 'n', 'a', 'm', 'e', '\022', '?', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', ')', '.', 'g', 'o',
+'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'D', 'e',
+'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\022', '6', '\n', '\007', 'o',
+'p', 't', 'i', 'o', 'n', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n',
+'s', '\022', ']', '\n', '\016', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'r', 'a', 'n', 'g', 'e', '\030', '\004', ' ', '\003', '(', '\013',
+'2', '6', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'D', 'e',
+'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '.', 'E', 'n', 'u', 'm', 'R', 'e', 's', 'e', 'r', 'v', 'e',
+'d', 'R', 'a', 'n', 'g', 'e', 'R', '\r', 'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'R', 'a', 'n', 'g', 'e', '\022', '#', '\n', '\r',
+'r', 'e', 's', 'e', 'r', 'v', 'e', 'd', '_', 'n', 'a', 'm', 'e', '\030', '\005', ' ', '\003', '(', '\t', 'R', '\014', 'r', 'e', 's', 'e',
+'r', 'v', 'e', 'd', 'N', 'a', 'm', 'e', '\032', ';', '\n', '\021', 'E', 'n', 'u', 'm', 'R', 'e', 's', 'e', 'r', 'v', 'e', 'd', 'R',
+'a', 'n', 'g', 'e', '\022', '\024', '\n', '\005', 's', 't', 'a', 'r', 't', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\005', 's', 't', 'a', 'r',
+'t', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', '\"', '\203', '\001', '\n', '\030', 'E',
+'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022', '\022',
+'\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\026', '\n', '\006', 'n', 'u', 'm',
+'b', 'e', 'r', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\006', 'n', 'u', 'm', 'b', 'e', 'r', '\022', ';', '\n', '\007', 'o', 'p', 't', 'i',
+'o', 'n', 's', '\030', '\003', ' ', '\001', '(', '\013', '2', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i',
+'o', 'n', 's', '\"', '\247', '\001', '\n', '\026', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r',
+'P', 'r', 'o', 't', 'o', '\022', '\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e',
+'\022', '>', '\n', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\030', '\002', ' ', '\003', '(', '\013', '2', '&', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 't', 'h', 'o', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o',
+'r', 'P', 'r', 'o', 't', 'o', 'R', '\006', 'm', 'e', 't', 'h', 'o', 'd', '\022', '9', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's',
+'\030', '\003', ' ', '\001', '(', '\013', '2', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\"', '\211',
+'\002', '\n', '\025', 'M', 'e', 't', 'h', 'o', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', '\022',
+'\022', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\035', '\n', '\n', 'i', 'n',
+'p', 'u', 't', '_', 't', 'y', 'p', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\t', 'i', 'n', 'p', 'u', 't', 'T', 'y', 'p', 'e',
+'\022', '\037', '\n', '\013', 'o', 'u', 't', 'p', 'u', 't', '_', 't', 'y', 'p', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\n', 'o', 'u',
+'t', 'p', 'u', 't', 'T', 'y', 'p', 'e', '\022', '8', '\n', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\030', '\004', ' ', '\001', '(', '\013',
+'2', '\036', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 't', 'h', 'o', 'd',
+'O', 'p', 't', 'i', 'o', 'n', 's', 'R', '\007', 'o', 'p', 't', 'i', 'o', 'n', 's', '\022', '0', '\n', '\020', 'c', 'l', 'i', 'e', 'n',
+'t', '_', 's', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\030', '\005', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R',
+'\017', 'c', 'l', 'i', 'e', 'n', 't', 'S', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\022', '0', '\n', '\020', 's', 'e', 'r', 'v', 'e',
+'r', '_', 's', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\030', '\006', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R',
+'\017', 's', 'e', 'r', 'v', 'e', 'r', 'S', 't', 'r', 'e', 'a', 'm', 'i', 'n', 'g', '\"', '\221', '\t', '\n', '\013', 'F', 'i', 'l', 'e',
+'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '!', '\n', '\014', 'j', 'a', 'v', 'a', '_', 'p', 'a', 'c', 'k', 'a', 'g', 'e', '\030', '\001',
+' ', '\001', '(', '\t', 'R', '\013', 'j', 'a', 'v', 'a', 'P', 'a', 'c', 'k', 'a', 'g', 'e', '\022', '0', '\n', '\024', 'j', 'a', 'v', 'a',
+'_', 'o', 'u', 't', 'e', 'r', '_', 'c', 'l', 'a', 's', 's', 'n', 'a', 'm', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\022', 'j',
+'a', 'v', 'a', 'O', 'u', 't', 'e', 'r', 'C', 'l', 'a', 's', 's', 'n', 'a', 'm', 'e', '\022', '5', '\n', '\023', 'j', 'a', 'v', 'a',
+'_', 'm', 'u', 'l', 't', 'i', 'p', 'l', 'e', '_', 'f', 'i', 'l', 'e', 's', '\030', '\n', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a',
+'l', 's', 'e', 'R', '\021', 'j', 'a', 'v', 'a', 'M', 'u', 'l', 't', 'i', 'p', 'l', 'e', 'F', 'i', 'l', 'e', 's', '\022', 'D', '\n',
+'\035', 'j', 'a', 'v', 'a', '_', 'g', 'e', 'n', 'e', 'r', 'a', 't', 'e', '_', 'e', 'q', 'u', 'a', 'l', 's', '_', 'a', 'n', 'd',
+'_', 'h', 'a', 's', 'h', '\030', '\024', ' ', '\001', '(', '\010', 'B', '\002', '\030', '\001', 'R', '\031', 'j', 'a', 'v', 'a', 'G', 'e', 'n', 'e',
+'r', 'a', 't', 'e', 'E', 'q', 'u', 'a', 'l', 's', 'A', 'n', 'd', 'H', 'a', 's', 'h', '\022', ':', '\n', '\026', 'j', 'a', 'v', 'a',
+'_', 's', 't', 'r', 'i', 'n', 'g', '_', 'c', 'h', 'e', 'c', 'k', '_', 'u', 't', 'f', '8', '\030', '\033', ' ', '\001', '(', '\010', ':',
+'\005', 'f', 'a', 'l', 's', 'e', 'R', '\023', 'j', 'a', 'v', 'a', 'S', 't', 'r', 'i', 'n', 'g', 'C', 'h', 'e', 'c', 'k', 'U', 't',
+'f', '8', '\022', 'S', '\n', '\014', 'o', 'p', 't', 'i', 'm', 'i', 'z', 'e', '_', 'f', 'o', 'r', '\030', '\t', ' ', '\001', '(', '\016', '2',
+')', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p', 't',
+'i', 'o', 'n', 's', '.', 'O', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'M', 'o', 'd', 'e', ':', '\005', 'S', 'P', 'E', 'E', 'D', 'R',
+'\013', 'o', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'F', 'o', 'r', '\022', '\035', '\n', '\n', 'g', 'o', '_', 'p', 'a', 'c', 'k', 'a', 'g',
+'e', '\030', '\013', ' ', '\001', '(', '\t', 'R', '\t', 'g', 'o', 'P', 'a', 'c', 'k', 'a', 'g', 'e', '\022', '5', '\n', '\023', 'c', 'c', '_',
+'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '\020', ' ', '\001', '(', '\010', ':', '\005', 'f',
+'a', 'l', 's', 'e', 'R', '\021', 'c', 'c', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '9',
+'\n', '\025', 'j', 'a', 'v', 'a', '_', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '\021',
+' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\023', 'j', 'a', 'v', 'a', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S',
+'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '5', '\n', '\023', 'p', 'y', '_', 'g', 'e', 'n', 'e', 'r', 'i', 'c', '_', 's', 'e', 'r',
+'v', 'i', 'c', 'e', 's', '\030', '\022', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\021', 'p', 'y', 'G', 'e', 'n',
+'e', 'r', 'i', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '7', '\n', '\024', 'p', 'h', 'p', '_', 'g', 'e', 'n', 'e', 'r',
+'i', 'c', '_', 's', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\030', '*', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R',
+'\022', 'p', 'h', 'p', 'G', 'e', 'n', 'e', 'r', 'i', 'c', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 's', '\022', '%', '\n', '\n', 'd', 'e',
+'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\027', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e',
+'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', '.', '\n', '\020', 'c', 'c', '_', 'e', 'n', 'a', 'b', 'l', 'e', '_', 'a', 'r', 'e',
+'n', 'a', 's', '\030', '\037', ' ', '\001', '(', '\010', ':', '\004', 't', 'r', 'u', 'e', 'R', '\016', 'c', 'c', 'E', 'n', 'a', 'b', 'l', 'e',
+'A', 'r', 'e', 'n', 'a', 's', '\022', '*', '\n', '\021', 'o', 'b', 'j', 'c', '_', 'c', 'l', 'a', 's', 's', '_', 'p', 'r', 'e', 'f',
+'i', 'x', '\030', '$', ' ', '\001', '(', '\t', 'R', '\017', 'o', 'b', 'j', 'c', 'C', 'l', 'a', 's', 's', 'P', 'r', 'e', 'f', 'i', 'x',
+'\022', ')', '\n', '\020', 'c', 's', 'h', 'a', 'r', 'p', '_', 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\030', '%', ' ', '\001', '(',
+'\t', 'R', '\017', 'c', 's', 'h', 'a', 'r', 'p', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\022', '!', '\n', '\014', 's', 'w', 'i',
+'f', 't', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\'', ' ', '\001', '(', '\t', 'R', '\013', 's', 'w', 'i', 'f', 't', 'P', 'r', 'e',
+'f', 'i', 'x', '\022', '(', '\n', '\020', 'p', 'h', 'p', '_', 'c', 'l', 'a', 's', 's', '_', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '(',
+' ', '\001', '(', '\t', 'R', '\016', 'p', 'h', 'p', 'C', 'l', 'a', 's', 's', 'P', 'r', 'e', 'f', 'i', 'x', '\022', '#', '\n', '\r', 'p',
+'h', 'p', '_', 'n', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\030', ')', ' ', '\001', '(', '\t', 'R', '\014', 'p', 'h', 'p', 'N', 'a',
+'m', 'e', 's', 'p', 'a', 'c', 'e', '\022', '4', '\n', '\026', 'p', 'h', 'p', '_', 'm', 'e', 't', 'a', 'd', 'a', 't', 'a', '_', 'n',
+'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\030', ',', ' ', '\001', '(', '\t', 'R', '\024', 'p', 'h', 'p', 'M', 'e', 't', 'a', 'd', 'a',
+'t', 'a', 'N', 'a', 'm', 'e', 's', 'p', 'a', 'c', 'e', '\022', '!', '\n', '\014', 'r', 'u', 'b', 'y', '_', 'p', 'a', 'c', 'k', 'a',
+'g', 'e', '\030', '-', ' ', '\001', '(', '\t', 'R', '\013', 'r', 'u', 'b', 'y', 'P', 'a', 'c', 'k', 'a', 'g', 'e', '\022', 'X', '\n', '\024',
+'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003',
+'(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n',
+'t', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p',
+'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', ':', '\n', '\014', 'O', 'p', 't', 'i', 'm', 'i', 'z', 'e', 'M', 'o',
+'d', 'e', '\022', '\t', '\n', '\005', 'S', 'P', 'E', 'E', 'D', '\020', '\001', '\022', '\r', '\n', '\t', 'C', 'O', 'D', 'E', '_', 'S', 'I', 'Z',
+'E', '\020', '\002', '\022', '\020', '\n', '\014', 'L', 'I', 'T', 'E', '_', 'R', 'U', 'N', 'T', 'I', 'M', 'E', '\020', '\003', '*', '\t', '\010', '\350',
+'\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '&', '\020', '\'', '\"', '\321', '\002', '\n', '\016', 'M', 'e', 's', 's', 'a', 'g', 'e',
+'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '<', '\n', '\027', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 's', 'e', 't', '_', 'w', 'i',
+'r', 'e', '_', 'f', 'o', 'r', 'm', 'a', 't', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\024', 'm',
+'e', 's', 's', 'a', 'g', 'e', 'S', 'e', 't', 'W', 'i', 'r', 'e', 'F', 'o', 'r', 'm', 'a', 't', '\022', 'L', '\n', '\037', 'n', 'o',
+'_', 's', 't', 'a', 'n', 'd', 'a', 'r', 'd', '_', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '_', 'a', 'c', 'c', 'e',
+'s', 's', 'o', 'r', '\030', '\002', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\034', 'n', 'o', 'S', 't', 'a', 'n',
+'d', 'a', 'r', 'd', 'D', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'A', 'c', 'c', 'e', 's', 's', 'o', 'r', '\022', '%', '\n',
+'\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R',
+'\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', '\033', '\n', '\t', 'm', 'a', 'p', '_', 'e', 'n', 't', 'r', 'y', '\030',
+'\007', ' ', '\001', '(', '\010', 'R', '\010', 'm', 'a', 'p', 'E', 'n', 't', 'r', 'y', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e',
+'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g',
+'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e',
+'t', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O',
+'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\010', '\020', '\t', 'J', '\004', '\010',
+'\t', '\020', '\n', '\"', '\342', '\003', '\n', '\014', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', 'A', '\n', '\005', 'c',
+'t', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '#', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'C', 'T', 'y', 'p', 'e', ':', '\006', 'S',
+'T', 'R', 'I', 'N', 'G', 'R', '\005', 'c', 't', 'y', 'p', 'e', '\022', '\026', '\n', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\030', '\002', ' ',
+'\001', '(', '\010', 'R', '\006', 'p', 'a', 'c', 'k', 'e', 'd', '\022', 'G', '\n', '\006', 'j', 's', 't', 'y', 'p', 'e', '\030', '\006', ' ', '\001',
+'(', '\016', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l',
+'d', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'J', 'S', 'T', 'y', 'p', 'e', ':', '\t', 'J', 'S', '_', 'N', 'O', 'R', 'M', 'A',
+'L', 'R', '\006', 'j', 's', 't', 'y', 'p', 'e', '\022', '\031', '\n', '\004', 'l', 'a', 'z', 'y', '\030', '\005', ' ', '\001', '(', '\010', ':', '\005',
+'f', 'a', 'l', 's', 'e', 'R', '\004', 'l', 'a', 'z', 'y', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd',
+'\030', '\003', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd',
+'\022', '\031', '\n', '\004', 'w', 'e', 'a', 'k', '\030', '\n', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\004', 'w', 'e',
+'a', 'k', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o',
+'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n',
+'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\"', '/', '\n', '\005', 'C', 'T', 'y', 'p',
+'e', '\022', '\n', '\n', '\006', 'S', 'T', 'R', 'I', 'N', 'G', '\020', '\000', '\022', '\010', '\n', '\004', 'C', 'O', 'R', 'D', '\020', '\001', '\022', '\020',
+'\n', '\014', 'S', 'T', 'R', 'I', 'N', 'G', '_', 'P', 'I', 'E', 'C', 'E', '\020', '\002', '\"', '5', '\n', '\006', 'J', 'S', 'T', 'y', 'p',
+'e', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'N', 'O', 'R', 'M', 'A', 'L', '\020', '\000', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'S', 'T',
+'R', 'I', 'N', 'G', '\020', '\001', '\022', '\r', '\n', '\t', 'J', 'S', '_', 'N', 'U', 'M', 'B', 'E', 'R', '\020', '\002', '*', '\t', '\010', '\350',
+'\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\004', '\020', '\005', '\"', 's', '\n', '\014', 'O', 'n', 'e', 'o', 'f', 'O', 'p', 't',
+'i', 'o', 'n', 's', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't',
+'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023',
+'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020',
+'\200', '\200', '\200', '\200', '\002', '\"', '\300', '\001', '\n', '\013', 'E', 'n', 'u', 'm', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '\037', '\n', '\013',
+'a', 'l', 'l', 'o', 'w', '_', 'a', 'l', 'i', 'a', 's', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\n', 'a', 'l', 'l', 'o', 'w', 'A',
+'l', 'i', 'a', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\003', ' ', '\001', '(', '\010', ':',
+'\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i',
+'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2',
+'$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r',
+'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't',
+'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', 'J', '\004', '\010', '\005', '\020', '\006',
+'\"', '\236', '\001', '\n', '\020', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n',
+'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n',
+'d', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't',
+'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p',
+'t', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n',
+'*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\234', '\001', '\n', '\016', 'S', 'e', 'r', 'v', 'i', 'c', 'e', 'O', 'p',
+'t', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\030', '!', ' ', '\001', '(', '\010',
+':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't', 'e', 'd', '\022', 'X', '\n', '\024', 'u', 'n',
+'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013',
+'2', '$', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e',
+'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e',
+'t', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002', '\"', '\340', '\002', '\n', '\r',
+'M', 'e', 't', 'h', 'o', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\022', '%', '\n', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't',
+'e', 'd', '\030', '!', ' ', '\001', '(', '\010', ':', '\005', 'f', 'a', 'l', 's', 'e', 'R', '\n', 'd', 'e', 'p', 'r', 'e', 'c', 'a', 't',
+'e', 'd', '\022', 'q', '\n', '\021', 'i', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', '_', 'l', 'e', 'v', 'e', 'l', '\030', '\"',
+' ', '\001', '(', '\016', '2', '/', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e',
+'t', 'h', 'o', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '.', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e',
+'v', 'e', 'l', ':', '\023', 'I', 'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N', 'R',
+'\020', 'i', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v', 'e', 'l', '\022', 'X', '\n', '\024', 'u', 'n', 'i', 'n',
+'t', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', '_', 'o', 'p', 't', 'i', 'o', 'n', '\030', '\347', '\007', ' ', '\003', '(', '\013', '2', '$',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p',
+'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', 'R', '\023', 'u', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e',
+'d', 'O', 'p', 't', 'i', 'o', 'n', '\"', 'P', '\n', '\020', 'I', 'd', 'e', 'm', 'p', 'o', 't', 'e', 'n', 'c', 'y', 'L', 'e', 'v',
+'e', 'l', '\022', '\027', '\n', '\023', 'I', 'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'C', 'Y', '_', 'U', 'N', 'K', 'N', 'O', 'W', 'N',
+'\020', '\000', '\022', '\023', '\n', '\017', 'N', 'O', '_', 'S', 'I', 'D', 'E', '_', 'E', 'F', 'F', 'E', 'C', 'T', 'S', '\020', '\001', '\022', '\016',
+'\n', '\n', 'I', 'D', 'E', 'M', 'P', 'O', 'T', 'E', 'N', 'T', '\020', '\002', '*', '\t', '\010', '\350', '\007', '\020', '\200', '\200', '\200', '\200', '\002',
+'\"', '\232', '\003', '\n', '\023', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o', 'n', '\022',
+'A', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\002', ' ', '\003', '(', '\013', '2', '-', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '.', 'U', 'n', 'i', 'n', 't', 'e', 'r', 'p', 'r', 'e', 't', 'e', 'd', 'O', 'p', 't', 'i', 'o',
+'n', '.', 'N', 'a', 'm', 'e', 'P', 'a', 'r', 't', 'R', '\004', 'n', 'a', 'm', 'e', '\022', ')', '\n', '\020', 'i', 'd', 'e', 'n', 't',
+'i', 'f', 'i', 'e', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'i', 'd', 'e', 'n', 't', 'i',
+'f', 'i', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\022', ',', '\n', '\022', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', '_', 'i', 'n', 't',
+'_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\020', 'p', 'o', 's', 'i', 't', 'i', 'v', 'e', 'I', 'n', 't',
+'V', 'a', 'l', 'u', 'e', '\022', ',', '\n', '\022', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', '_', 'i', 'n', 't', '_', 'v', 'a', 'l',
+'u', 'e', '\030', '\005', ' ', '\001', '(', '\003', 'R', '\020', 'n', 'e', 'g', 'a', 't', 'i', 'v', 'e', 'I', 'n', 't', 'V', 'a', 'l', 'u',
+'e', '\022', '!', '\n', '\014', 'd', 'o', 'u', 'b', 'l', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\001', 'R', '\013',
+'d', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', '\022', '!', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l',
+'u', 'e', '\030', '\007', ' ', '\001', '(', '\014', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\'', '\n', '\017',
+'a', 'g', 'g', 'r', 'e', 'g', 'a', 't', 'e', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\016', 'a', 'g',
+'g', 'r', 'e', 'g', 'a', 't', 'e', 'V', 'a', 'l', 'u', 'e', '\032', 'J', '\n', '\010', 'N', 'a', 'm', 'e', 'P', 'a', 'r', 't', '\022',
+'\033', '\n', '\t', 'n', 'a', 'm', 'e', '_', 'p', 'a', 'r', 't', '\030', '\001', ' ', '\002', '(', '\t', 'R', '\010', 'n', 'a', 'm', 'e', 'P',
+'a', 'r', 't', '\022', '!', '\n', '\014', 'i', 's', '_', 'e', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\030', '\002', ' ', '\002', '(', '\010',
+'R', '\013', 'i', 's', 'E', 'x', 't', 'e', 'n', 's', 'i', 'o', 'n', '\"', '\247', '\002', '\n', '\016', 'S', 'o', 'u', 'r', 'c', 'e', 'C',
+'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', 'D', '\n', '\010', 'l', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ', '\003', '(', '\013',
+'2', '(', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 'o', 'u', 'r', 'c', 'e',
+'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', 'R', '\010', 'l', 'o', 'c', 'a', 't', 'i',
+'o', 'n', '\032', '\316', '\001', '\n', '\010', 'L', 'o', 'c', 'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001',
+' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h', '\022', '\026', '\n', '\004', 's', 'p', 'a', 'n', '\030', '\002', ' ',
+'\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 's', 'p', 'a', 'n', '\022', ')', '\n', '\020', 'l', 'e', 'a', 'd', 'i', 'n', 'g', '_',
+'c', 'o', 'm', 'm', 'e', 'n', 't', 's', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\017', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'C', 'o',
+'m', 'm', 'e', 'n', 't', 's', '\022', '+', '\n', '\021', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', '_', 'c', 'o', 'm', 'm', 'e', 'n',
+'t', 's', '\030', '\004', ' ', '\001', '(', '\t', 'R', '\020', 't', 'r', 'a', 'i', 'l', 'i', 'n', 'g', 'C', 'o', 'm', 'm', 'e', 'n', 't',
+'s', '\022', ':', '\n', '\031', 'l', 'e', 'a', 'd', 'i', 'n', 'g', '_', 'd', 'e', 't', 'a', 'c', 'h', 'e', 'd', '_', 'c', 'o', 'm',
+'m', 'e', 'n', 't', 's', '\030', '\006', ' ', '\003', '(', '\t', 'R', '\027', 'l', 'e', 'a', 'd', 'i', 'n', 'g', 'D', 'e', 't', 'a', 'c',
+'h', 'e', 'd', 'C', 'o', 'm', 'm', 'e', 'n', 't', 's', '\"', '\321', '\001', '\n', '\021', 'G', 'e', 'n', 'e', 'r', 'a', 't', 'e', 'd',
+'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '\022', 'M', '\n', '\n', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\030', '\001', ' ',
+'\003', '(', '\013', '2', '-', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'G', 'e', 'n',
+'e', 'r', 'a', 't', 'e', 'd', 'C', 'o', 'd', 'e', 'I', 'n', 'f', 'o', '.', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'R', '\n', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\032', 'm', '\n', '\n', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', '\022', '\026', '\n', '\004', 'p', 'a', 't', 'h', '\030', '\001', ' ', '\003', '(', '\005', 'B', '\002', '\020', '\001', 'R', '\004', 'p', 'a', 't', 'h',
+'\022', '\037', '\n', '\013', 's', 'o', 'u', 'r', 'c', 'e', '_', 'f', 'i', 'l', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\n', 's', 'o',
+'u', 'r', 'c', 'e', 'F', 'i', 'l', 'e', '\022', '\024', '\n', '\005', 'b', 'e', 'g', 'i', 'n', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\005',
+'b', 'e', 'g', 'i', 'n', '\022', '\020', '\n', '\003', 'e', 'n', 'd', '\030', '\004', ' ', '\001', '(', '\005', 'R', '\003', 'e', 'n', 'd', 'B', '~',
+'\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\020', 'D', 'e',
+'s', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 's', 'H', '\001', 'Z', '-', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's',
+'/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\032',
+'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'R', 'e', 'f', 'l', 'e', 'c', 't', 'i', 'o',
+'n',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_descriptor_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/descriptor.proto",
+ UPB_STRVIEW_INIT(descriptor, 7601)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h
new file mode 100644
index 00000000000..285d84e97b0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h
@@ -0,0 +1,165 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/descriptor.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_DESCRIPTOR_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_def_init google_protobuf_descriptor_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_FileDescriptorSet_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.FileDescriptorSet");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_FileDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.FileDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_DescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.DescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_DescriptorProto_ExtensionRange_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.DescriptorProto.ExtensionRange");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_DescriptorProto_ReservedRange_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.DescriptorProto.ReservedRange");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_ExtensionRangeOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.ExtensionRangeOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_FieldDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.FieldDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_OneofDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.OneofDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_EnumDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.EnumDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_EnumDescriptorProto_EnumReservedRange_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.EnumDescriptorProto.EnumReservedRange");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_EnumValueDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.EnumValueDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_ServiceDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.ServiceDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_MethodDescriptorProto_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.MethodDescriptorProto");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_FileOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.FileOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_MessageOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.MessageOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_FieldOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.FieldOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_OneofOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.OneofOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_EnumOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.EnumOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_EnumValueOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.EnumValueOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_ServiceOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.ServiceOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_MethodOptions_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.MethodOptions");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_UninterpretedOption_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.UninterpretedOption");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_UninterpretedOption_NamePart_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.UninterpretedOption.NamePart");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_SourceCodeInfo_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.SourceCodeInfo");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_SourceCodeInfo_Location_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.SourceCodeInfo.Location");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_GeneratedCodeInfo_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.GeneratedCodeInfo");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_GeneratedCodeInfo_Annotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_descriptor_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.GeneratedCodeInfo.Annotation");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_DESCRIPTOR_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c
new file mode 100644
index 00000000000..4cfdc7580ee
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/duration.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/duration.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_Duration_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &google_protobuf_Duration_msginit,
+};
+
+static const char descriptor[251] = {'\n', '\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', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"',
+':', '\n', '\010', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '\030', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030', '\001', ' ',
+'\001', '(', '\003', 'R', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\022', '\024', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002', ' ', '\001',
+'(', '\005', 'R', '\005', 'n', 'a', 'n', 'o', 's', 'B', '\203', '\001', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\r', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'P', 'r', 'o', 't', 'o', 'P', '\001',
+'Z', '1', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o', 'w', 'n', '/', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'p',
+'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_duration_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/duration.proto",
+ UPB_STRVIEW_INIT(descriptor, 251)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h
new file mode 100644
index 00000000000..8cc191bf507
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/duration.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_DURATION_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_DURATION_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_def_init google_protobuf_duration_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_Duration_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_duration_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Duration");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_DURATION_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c
new file mode 100644
index 00000000000..8f974d9600f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c
@@ -0,0 +1,37 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/empty.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/empty.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_Empty_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &google_protobuf_Empty_msginit,
+};
+
+static const char descriptor[190] = {'\n', '\033', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'e', 'm', 'p', 't', 'y', '.', 'p',
+'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', '\007', '\n', '\005',
+'E', 'm', 'p', 't', 'y', 'B', '}', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', 'B', '\n', 'E', 'm', 'p', 't', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e',
+'s', '/', 'k', 'n', 'o', 'w', 'n', '/', 'e', 'm', 'p', 't', 'y', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252',
+'\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o',
+'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_empty_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/empty.proto",
+ UPB_STRVIEW_INIT(descriptor, 190)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h
new file mode 100644
index 00000000000..9e6b0d0560d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/empty.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_EMPTY_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_EMPTY_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_def_init google_protobuf_empty_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_Empty_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_empty_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Empty");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_EMPTY_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c
new file mode 100644
index 00000000000..6f2f13c5501
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c
@@ -0,0 +1,65 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/struct.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_Struct_msginit;
+extern const upb_msglayout google_protobuf_Struct_FieldsEntry_msginit;
+extern const upb_msglayout google_protobuf_Value_msginit;
+extern const upb_msglayout google_protobuf_ListValue_msginit;
+
+static const upb_msglayout *layouts[4] = {
+ &google_protobuf_Struct_msginit,
+ &google_protobuf_Struct_FieldsEntry_msginit,
+ &google_protobuf_Value_msginit,
+ &google_protobuf_ListValue_msginit,
+};
+
+static const char descriptor[738] = {'\n', '\034', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.',
+'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"', '\230', '\001',
+'\n', '\006', 'S', 't', 'r', 'u', 'c', 't', '\022', ';', '\n', '\006', 'f', 'i', 'e', 'l', 'd', 's', '\030', '\001', ' ', '\003', '(', '\013', '2',
+'#', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', '.',
+'F', 'i', 'e', 'l', 'd', 's', 'E', 'n', 't', 'r', 'y', 'R', '\006', 'f', 'i', 'e', 'l', 'd', 's', '\032', 'Q', '\n', '\013', 'F', 'i',
+'e', 'l', 'd', 's', 'E', 'n', 't', 'r', 'y', '\022', '\020', '\n', '\003', 'k', 'e', 'y', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\003', 'k',
+'e', 'y', '\022', ',', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'V', 'a', 'l', 'u', 'e', 'R', '\005', 'v', 'a', 'l', 'u', 'e', ':', '\002',
+'8', '\001', '\"', '\262', '\002', '\n', '\005', 'V', 'a', 'l', 'u', 'e', '\022', ';', '\n', '\n', 'n', 'u', 'l', 'l', '_', 'v', 'a', 'l', 'u',
+'e', '\030', '\001', ' ', '\001', '(', '\016', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'N', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', 'H', '\000', 'R', '\t', 'n', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', '\022', '#',
+'\n', '\014', 'n', 'u', 'm', 'b', 'e', 'r', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\001', 'H', '\000', 'R', '\013', 'n',
+'u', 'm', 'b', 'e', 'r', 'V', 'a', 'l', 'u', 'e', '\022', '#', '\n', '\014', 's', 't', 'r', 'i', 'n', 'g', '_', 'v', 'a', 'l', 'u',
+'e', '\030', '\003', ' ', '\001', '(', '\t', 'H', '\000', 'R', '\013', 's', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\037', '\n',
+'\n', 'b', 'o', 'o', 'l', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\004', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\t', 'b', 'o', 'o', 'l',
+'V', 'a', 'l', 'u', 'e', '\022', '<', '\n', '\014', 's', 't', 'r', 'u', 'c', 't', '_', 'v', 'a', 'l', 'u', 'e', '\030', '\005', ' ', '\001',
+'(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'S', 't', 'r', 'u',
+'c', 't', 'H', '\000', 'R', '\013', 's', 't', 'r', 'u', 'c', 't', 'V', 'a', 'l', 'u', 'e', '\022', ';', '\n', '\n', 'l', 'i', 's', 't',
+'_', 'v', 'a', 'l', 'u', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'L', 'i', 's', 't', 'V', 'a', 'l', 'u', 'e', 'H', '\000', 'R', '\t', 'l', 'i', 's', 't', 'V', 'a',
+'l', 'u', 'e', 'B', '\006', '\n', '\004', 'k', 'i', 'n', 'd', '\"', ';', '\n', '\t', 'L', 'i', 's', 't', 'V', 'a', 'l', 'u', 'e', '\022',
+'.', '\n', '\006', 'v', 'a', 'l', 'u', 'e', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '\026', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'V', 'a', 'l', 'u', 'e', 'R', '\006', 'v', 'a', 'l', 'u', 'e', 's', '*', '\033', '\n',
+'\t', 'N', 'u', 'l', 'l', 'V', 'a', 'l', 'u', 'e', '\022', '\016', '\n', '\n', 'N', 'U', 'L', 'L', '_', 'V', 'A', 'L', 'U', 'E', '\020',
+'\000', 'B', '\177', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B',
+'\013', 'S', 't', 'r', 'u', 'c', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '/', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o',
+'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k',
+'n', 'o', 'w', 'n', '/', 's', 't', 'r', 'u', 'c', 't', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036',
+'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n',
+'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_struct_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/struct.proto",
+ UPB_STRVIEW_INIT(descriptor, 738)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h
new file mode 100644
index 00000000000..4e170213f74
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h
@@ -0,0 +1,50 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_STRUCT_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_STRUCT_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_def_init google_protobuf_struct_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_Struct_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Struct");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_Struct_FieldsEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Struct.FieldsEntry");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_Value_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Value");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_ListValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.ListValue");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_STRUCT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c
new file mode 100644
index 00000000000..bc2f7af6fb5
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/timestamp.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/timestamp.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_Timestamp_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &google_protobuf_Timestamp_msginit,
+};
+
+static const char descriptor[255] = {'\n', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't', 'a',
+'m', 'p', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'\"', ';', '\n', '\t', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', '\022', '\030', '\n', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\030',
+'\001', ' ', '\001', '(', '\003', 'R', '\007', 's', 'e', 'c', 'o', 'n', 'd', 's', '\022', '\024', '\n', '\005', 'n', 'a', 'n', 'o', 's', '\030', '\002',
+' ', '\001', '(', '\005', 'R', '\005', 'n', 'a', 'n', 'o', 's', 'B', '\205', '\001', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', 'B', '\016', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'P', 'r', 'o', 't',
+'o', 'P', '\001', 'Z', '2', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r',
+'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e', 's', '/', 'k', 'n', 'o', 'w', 'n', '/', 't', 'i', 'm', 'e', 's', 't',
+'a', 'm', 'p', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G', 'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l', 'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p',
+'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_timestamp_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/timestamp.proto",
+ UPB_STRVIEW_INIT(descriptor, 255)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h
new file mode 100644
index 00000000000..0e375559738
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/timestamp.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_TIMESTAMP_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_def_init google_protobuf_timestamp_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_Timestamp_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_timestamp_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Timestamp");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_TIMESTAMP_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c
new file mode 100644
index 00000000000..59a598ad0de
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c
@@ -0,0 +1,66 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/wrappers.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/protobuf/wrappers.upbdefs.h"
+
+extern const upb_msglayout google_protobuf_DoubleValue_msginit;
+extern const upb_msglayout google_protobuf_FloatValue_msginit;
+extern const upb_msglayout google_protobuf_Int64Value_msginit;
+extern const upb_msglayout google_protobuf_UInt64Value_msginit;
+extern const upb_msglayout google_protobuf_Int32Value_msginit;
+extern const upb_msglayout google_protobuf_UInt32Value_msginit;
+extern const upb_msglayout google_protobuf_BoolValue_msginit;
+extern const upb_msglayout google_protobuf_StringValue_msginit;
+extern const upb_msglayout google_protobuf_BytesValue_msginit;
+
+static const upb_msglayout *layouts[9] = {
+ &google_protobuf_DoubleValue_msginit,
+ &google_protobuf_FloatValue_msginit,
+ &google_protobuf_Int64Value_msginit,
+ &google_protobuf_UInt64Value_msginit,
+ &google_protobuf_Int32Value_msginit,
+ &google_protobuf_UInt32Value_msginit,
+ &google_protobuf_BoolValue_msginit,
+ &google_protobuf_StringValue_msginit,
+ &google_protobuf_BytesValue_msginit,
+};
+
+static const char descriptor[518] = {'\n', '\036', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r',
+'s', '.', 'p', 'r', 'o', 't', 'o', '\022', '\017', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '\"',
+'#', '\n', '\013', 'D', 'o', 'u', 'b', 'l', 'e', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001',
+' ', '\001', '(', '\001', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', '\n', 'F', 'l', 'o', 'a', 't', 'V', 'a', 'l', 'u', 'e',
+'\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\002', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n',
+'\n', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(',
+'\003', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '#', '\n', '\013', 'U', 'I', 'n', 't', '6', '4', 'V', 'a', 'l', 'u', 'e', '\022', '\024',
+'\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\004', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', '\n', 'I',
+'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\005', 'R',
+'\005', 'v', 'a', 'l', 'u', 'e', '\"', '#', '\n', '\013', 'U', 'I', 'n', 't', '3', '2', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005',
+'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '!', '\n', '\t', 'B', 'o', 'o',
+'l', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\005', 'v', 'a',
+'l', 'u', 'e', '\"', '#', '\n', '\013', 'S', 't', 'r', 'i', 'n', 'g', 'V', 'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l',
+'u', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\005', 'v', 'a', 'l', 'u', 'e', '\"', '\"', '\n', '\n', 'B', 'y', 't', 'e', 's', 'V',
+'a', 'l', 'u', 'e', '\022', '\024', '\n', '\005', 'v', 'a', 'l', 'u', 'e', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\005', 'v', 'a', 'l', 'u',
+'e', 'B', '\203', '\001', '\n', '\023', 'c', 'o', 'm', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'B', '\r', 'W', 'r', 'a', 'p', 'p', 'e', 'r', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'Z', '1', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'y', 'p', 'e',
+'s', '/', 'k', 'n', 'o', 'w', 'n', '/', 'w', 'r', 'a', 'p', 'p', 'e', 'r', 's', 'p', 'b', '\370', '\001', '\001', '\242', '\002', '\003', 'G',
+'P', 'B', '\252', '\002', '\036', 'G', 'o', 'o', 'g', 'l', 'e', '.', 'P', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'W', 'e', 'l', 'l',
+'K', 'n', 'o', 'w', 'n', 'T', 'y', 'p', 'e', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[1] = {
+ NULL
+};
+
+upb_def_init google_protobuf_wrappers_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/protobuf/wrappers.proto",
+ UPB_STRVIEW_INIT(descriptor, 518)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h
new file mode 100644
index 00000000000..9cfcb290134
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h
@@ -0,0 +1,75 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/protobuf/wrappers.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPBDEFS_H_
+#define GOOGLE_PROTOBUF_WRAPPERS_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_def_init google_protobuf_wrappers_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_protobuf_DoubleValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.DoubleValue");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_FloatValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.FloatValue");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_Int64Value_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Int64Value");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_UInt64Value_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.UInt64Value");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_Int32Value_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.Int32Value");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_UInt32Value_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.UInt32Value");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_BoolValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.BoolValue");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_StringValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.StringValue");
+}
+
+UPB_INLINE const upb_msgdef *google_protobuf_BytesValue_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_protobuf_wrappers_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.protobuf.BytesValue");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_PROTOBUF_WRAPPERS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c
new file mode 100644
index 00000000000..a4300a1eb45
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c
@@ -0,0 +1,42 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/rpc/status.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "google/rpc/status.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern const upb_msglayout google_rpc_Status_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &google_rpc_Status_msginit,
+};
+
+static const char descriptor[272] = {'\n', '\027', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'r', 'p', 'c', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o',
+'\022', '\n', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\"', 'f', '\n', '\006', 'S', 't', 'a', 't', 'u', 's', '\022',
+'\022', '\n', '\004', 'c', 'o', 'd', 'e', '\030', '\001', ' ', '\001', '(', '\005', 'R', '\004', 'c', 'o', 'd', 'e', '\022', '\030', '\n', '\007', 'm', 'e',
+'s', 's', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'm', 'e', 's', 's', 'a', 'g', 'e', '\022', '.', '\n', '\007', 'd',
+'e', 't', 'a', 'i', 'l', 's', '\030', '\003', ' ', '\003', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o',
+'t', 'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\007', 'd', 'e', 't', 'a', 'i', 'l', 's', 'B', '^', '\n', '\016', 'c', 'o', 'm',
+'.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'r', 'p', 'c', 'B', '\013', 'S', 't', 'a', 't', 'u', 's', 'P', 'r', 'o', 't', 'o', 'P',
+'\001', 'Z', '7', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'g', 'o', 'l', 'a', 'n', 'g', '.', 'o', 'r', 'g', '/', 'g', 'e', 'n', 'p',
+'r', 'o', 't', 'o', '/', 'g', 'o', 'o', 'g', 'l', 'e', 'a', 'p', 'i', 's', '/', 'r', 'p', 'c', '/', 's', 't', 'a', 't', 'u',
+'s', ';', 's', 't', 'a', 't', 'u', 's', '\242', '\002', '\003', 'R', 'P', 'C', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_any_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init google_rpc_status_proto_upbdefinit = {
+ deps,
+ layouts,
+ "google/rpc/status.proto",
+ UPB_STRVIEW_INIT(descriptor, 272)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h
new file mode 100644
index 00000000000..6a39edd9f6a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * google/rpc/status.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef GOOGLE_RPC_STATUS_PROTO_UPBDEFS_H_
+#define GOOGLE_RPC_STATUS_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_def_init google_rpc_status_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *google_rpc_Status_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &google_rpc_status_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "google.rpc.Status");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* GOOGLE_RPC_STATUS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c
new file mode 100644
index 00000000000..6cfd7ee470c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c
@@ -0,0 +1,70 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/migrate.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "udpa/annotations/migrate.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+extern const upb_msglayout udpa_annotations_MigrateAnnotation_msginit;
+extern const upb_msglayout udpa_annotations_FieldMigrateAnnotation_msginit;
+extern const upb_msglayout udpa_annotations_FileMigrateAnnotation_msginit;
+
+static const upb_msglayout *layouts[3] = {
+ &udpa_annotations_MigrateAnnotation_msginit,
+ &udpa_annotations_FieldMigrateAnnotation_msginit,
+ &udpa_annotations_FileMigrateAnnotation_msginit,
+};
+
+static const char descriptor[855] = {'\n', '\036', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'm', 'i', 'g', 'r', 'a', 't',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's',
+'\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p',
+'t', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '+', '\n', '\021', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\006', 'r', 'e', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\006', 'r', 'e',
+'n', 'a', 'm', 'e', '\"', 'Y', '\n', '\026', 'F', 'i', 'e', 'l', 'd', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't',
+'a', 't', 'i', 'o', 'n', '\022', '\026', '\n', '\006', 'r', 'e', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\006', 'r', 'e',
+'n', 'a', 'm', 'e', '\022', '\'', '\n', '\017', 'o', 'n', 'e', 'o', 'f', '_', 'p', 'r', 'o', 'm', 'o', 't', 'i', 'o', 'n', '\030', '\002',
+' ', '\001', '(', '\t', 'R', '\016', 'o', 'n', 'e', 'o', 'f', 'P', 'r', 'o', 'm', 'o', 't', 'i', 'o', 'n', '\"', '?', '\n', '\025', 'F',
+'i', 'l', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '&', '\n', '\017', 'm',
+'o', 'v', 'e', '_', 't', 'o', '_', 'p', 'a', 'c', 'k', 'a', 'g', 'e', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\r', 'm', 'o', 'v',
+'e', 'T', 'o', 'P', 'a', 'c', 'k', 'a', 'g', 'e', ':', 'p', '\n', '\017', 'm', 'e', 's', 's', 'a', 'g', 'e', '_', 'm', 'i', 'g',
+'r', 'a', 't', 'e', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e',
+'s', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '#', '.', 'u',
+'d', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n',
+'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\016', 'm', 'e', 's', 's', 'a', 'g', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':',
+'o', '\n', '\r', 'f', 'i', 'e', 'l', 'd', '_', 'm', 'i', 'g', 'r', 'a', 't', 'e', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e',
+'.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343',
+'\377', 'Q', ' ', '\001', '(', '\013', '2', '(', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's',
+'.', 'F', 'i', 'e', 'l', 'd', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\014',
+'f', 'i', 'e', 'l', 'd', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', 'g', '\n', '\014', 'e', 'n', 'u', 'm', '_', 'm', 'i', 'g', 'r',
+'a', 't', 'e', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u',
+'m', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '#', '.', 'u', 'd', 'p', 'a', '.',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a',
+'t', 'i', 'o', 'n', 'R', '\013', 'e', 'n', 'u', 'm', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', 'w', '\n', '\022', 'e', 'n', 'u', 'm',
+'_', 'v', 'a', 'l', 'u', 'e', '_', 'm', 'i', 'g', 'r', 'a', 't', 'e', '\022', '!', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p',
+'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'E', 'n', 'u', 'm', 'V', 'a', 'l', 'u', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030',
+'\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '#', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '.', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\020', 'e', 'n', 'u',
+'m', 'V', 'a', 'l', 'u', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', ':', 'k', '\n', '\014', 'f', 'i', 'l', 'e', '_', 'm', 'i', 'g',
+'r', 'a', 't', 'e', '\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i',
+'l', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\216', '\343', '\377', 'Q', ' ', '\001', '(', '\013', '2', '\'', '.', 'u', 'd', 'p', 'a',
+'.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'F', 'i', 'l', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'A',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\013', 'f', 'i', 'l', 'e', 'M', 'i', 'g', 'r', 'a', 't', 'e', 'b', '\006', 'p',
+'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init udpa_annotations_migrate_proto_upbdefinit = {
+ deps,
+ layouts,
+ "udpa/annotations/migrate.proto",
+ UPB_STRVIEW_INIT(descriptor, 855)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h
new file mode 100644
index 00000000000..a12d772fe38
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/migrate.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_ANNOTATIONS_MIGRATE_PROTO_UPBDEFS_H_
+#define UDPA_ANNOTATIONS_MIGRATE_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_def_init udpa_annotations_migrate_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *udpa_annotations_MigrateAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_annotations_migrate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.annotations.MigrateAnnotation");
+}
+
+UPB_INLINE const upb_msgdef *udpa_annotations_FieldMigrateAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_annotations_migrate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.annotations.FieldMigrateAnnotation");
+}
+
+UPB_INLINE const upb_msgdef *udpa_annotations_FileMigrateAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_annotations_migrate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.annotations.FileMigrateAnnotation");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_ANNOTATIONS_MIGRATE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c
new file mode 100644
index 00000000000..6616936e3a4
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c
@@ -0,0 +1,56 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/security.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "udpa/annotations/security.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout udpa_annotations_FieldSecurityAnnotation_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &udpa_annotations_FieldSecurityAnnotation_msginit,
+};
+
+static const char descriptor[469] = {'\n', '\037', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'c', 'u', 'r', 'i',
+'t', 'y', '.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'s', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u',
+'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/',
+'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\257', '\001', '\n', '\027', 'F', 'i',
+'e', 'l', 'd', 'S', 'e', 'c', 'u', 'r', 'i', 't', 'y', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', 'K', '\n', '\"',
+'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'e', '_', 'f', 'o', 'r', '_', 'u', 'n', 't', 'r', 'u', 's', 't', 'e', 'd', '_', 'd',
+'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\037', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r',
+'e', 'F', 'o', 'r', 'U', 'n', 't', 'r', 'u', 's', 't', 'e', 'd', 'D', 'o', 'w', 'n', 's', 't', 'r', 'e', 'a', 'm', '\022', 'G',
+'\n', ' ', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r', 'e', '_', 'f', 'o', 'r', '_', 'u', 'n', 't', 'r', 'u', 's', 't', 'e', 'd',
+'_', 'u', 'p', 's', 't', 'r', 'e', 'a', 'm', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\035', 'c', 'o', 'n', 'f', 'i', 'g', 'u', 'r',
+'e', 'F', 'o', 'r', 'U', 'n', 't', 'r', 'u', 's', 't', 'e', 'd', 'U', 'p', 's', 't', 'r', 'e', 'a', 'm', ':', 'g', '\n', '\010',
+'s', 'e', 'c', 'u', 'r', 'i', 't', 'y', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u',
+'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\261', '\362', '\246', '\005', ' ', '\001', '(', '\013', '2', ')',
+'.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'F', 'i', 'e', 'l', 'd', 'S', 'e',
+'c', 'u', 'r', 'i', 't', 'y', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\010', 's', 'e', 'c', 'u', 'r', 'i', 't',
+'y', 'B', '\010', '\272', '\200', '\310', '\321', '\006', '\002', '\010', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &google_protobuf_any_proto_upbdefinit,
+ &google_protobuf_descriptor_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init udpa_annotations_security_proto_upbdefinit = {
+ deps,
+ layouts,
+ "udpa/annotations/security.proto",
+ UPB_STRVIEW_INIT(descriptor, 469)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h
new file mode 100644
index 00000000000..c5cc8fec26b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/security.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_ANNOTATIONS_SECURITY_PROTO_UPBDEFS_H_
+#define UDPA_ANNOTATIONS_SECURITY_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_def_init udpa_annotations_security_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *udpa_annotations_FieldSecurityAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_annotations_security_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.annotations.FieldSecurityAnnotation");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_ANNOTATIONS_SECURITY_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c
new file mode 100644
index 00000000000..4e6416b21df
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c
@@ -0,0 +1,33 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/sensitive.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "udpa/annotations/sensitive.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+
+static const char descriptor[158] = {'\n', ' ', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 'e', 'n', 's', 'i', 't',
+'i', 'v', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o',
+'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r',
+'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', ':', '>', '\n', '\t', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e', '\022',
+'\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p',
+'t', 'i', 'o', 'n', 's', '\030', '\367', '\266', '\301', '$', ' ', '\001', '(', '\010', 'R', '\t', 's', 'e', 'n', 's', 'i', 't', 'i', 'v', 'e',
+'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init udpa_annotations_sensitive_proto_upbdefinit = {
+ deps,
+ NULL,
+ "udpa/annotations/sensitive.proto",
+ UPB_STRVIEW_INIT(descriptor, 158)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h
new file mode 100644
index 00000000000..099a5782d51
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h
@@ -0,0 +1,30 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/sensitive.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPBDEFS_H_
+#define UDPA_ANNOTATIONS_SENSITIVE_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_def_init udpa_annotations_sensitive_proto_upbdefinit;
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_ANNOTATIONS_SENSITIVE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c
new file mode 100644
index 00000000000..f130145dd2d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c
@@ -0,0 +1,49 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/status.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "udpa/annotations/status.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+extern const upb_msglayout udpa_annotations_StatusAnnotation_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &udpa_annotations_StatusAnnotation_msginit,
+};
+
+static const char descriptor[445] = {'\n', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's',
+'.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '\032',
+' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't',
+'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', '\232', '\001', '\n', '\020', 'S', 't', 'a', 't', 'u', 's', 'A', 'n', 'n', 'o', 't', 'a',
+'t', 'i', 'o', 'n', '\022', '(', '\n', '\020', 'w', 'o', 'r', 'k', '_', 'i', 'n', '_', 'p', 'r', 'o', 'g', 'r', 'e', 's', 's', '\030',
+'\001', ' ', '\001', '(', '\010', 'R', '\016', 'w', 'o', 'r', 'k', 'I', 'n', 'P', 'r', 'o', 'g', 'r', 'e', 's', 's', '\022', '\\', '\n', '\026',
+'p', 'a', 'c', 'k', 'a', 'g', 'e', '_', 'v', 'e', 'r', 's', 'i', 'o', 'n', '_', 's', 't', 'a', 't', 'u', 's', '\030', '\002', ' ',
+'\001', '(', '\016', '2', '&', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'P', 'a',
+'c', 'k', 'a', 'g', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', 'R', '\024', 'p', 'a', 'c', 'k', 'a',
+'g', 'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', '*', ']', '\n', '\024', 'P', 'a', 'c', 'k', 'a', 'g',
+'e', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'S', 't', 'a', 't', 'u', 's', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N',
+'\020', '\000', '\022', '\n', '\n', '\006', 'F', 'R', 'O', 'Z', 'E', 'N', '\020', '\001', '\022', '\n', '\n', '\006', 'A', 'C', 'T', 'I', 'V', 'E', '\020',
+'\002', '\022', ' ', '\n', '\034', 'N', 'E', 'X', 'T', '_', 'M', 'A', 'J', 'O', 'R', '_', 'V', 'E', 'R', 'S', 'I', 'O', 'N', '_', 'C',
+'A', 'N', 'D', 'I', 'D', 'A', 'T', 'E', '\020', '\003', ':', 'd', '\n', '\013', 'f', 'i', 'l', 'e', '_', 's', 't', 'a', 't', 'u', 's',
+'\022', '\034', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'F', 'i', 'l', 'e', 'O', 'p',
+'t', 'i', 'o', 'n', 's', '\030', '\207', '\200', '\231', 'j', ' ', '\001', '(', '\013', '2', '\"', '.', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n',
+'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'S', 't', 'a', 't', 'u', 's', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n',
+'R', '\n', 'f', 'i', 'l', 'e', 'S', 't', 'a', 't', 'u', 's', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init udpa_annotations_status_proto_upbdefinit = {
+ deps,
+ layouts,
+ "udpa/annotations/status.proto",
+ UPB_STRVIEW_INIT(descriptor, 445)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h
new file mode 100644
index 00000000000..80f165f20fa
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/status.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_ANNOTATIONS_STATUS_PROTO_UPBDEFS_H_
+#define UDPA_ANNOTATIONS_STATUS_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_def_init udpa_annotations_status_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *udpa_annotations_StatusAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_annotations_status_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.annotations.StatusAnnotation");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_ANNOTATIONS_STATUS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c
new file mode 100644
index 00000000000..b6de8fb0bb0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c
@@ -0,0 +1,43 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/versioning.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "udpa/annotations/versioning.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+extern const upb_msglayout udpa_annotations_VersioningAnnotation_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &udpa_annotations_VersioningAnnotation_msginit,
+};
+
+static const char descriptor[279] = {'\n', '!', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 'v', 'e', 'r', 's', 'i', 'o',
+'n', 'i', 'n', 'g', '.', 'p', 'r', 'o', 't', 'o', '\022', '\020', 'u', 'd', 'p', 'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i',
+'o', 'n', 's', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'd', 'e', 's', 'c',
+'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\"', 'J', '\n', '\024', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n',
+'g', 'A', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', '\022', '2', '\n', '\025', 'p', 'r', 'e', 'v', 'i', 'o', 'u', 's', '_', 'm',
+'e', 's', 's', 'a', 'g', 'e', '_', 't', 'y', 'p', 'e', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\023', 'p', 'r', 'e', 'v', 'i', 'o',
+'u', 's', 'M', 'e', 's', 's', 'a', 'g', 'e', 'T', 'y', 'p', 'e', ':', 'j', '\n', '\n', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i',
+'n', 'g', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's',
+'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\323', '\210', '\341', '\003', ' ', '\001', '(', '\013', '2', '&', '.', 'u', 'd', 'p',
+'a', '.', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '.', 'V', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', 'A',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 'R', '\n', 'v', 'e', 'r', 's', 'i', 'o', 'n', 'i', 'n', 'g', 'b', '\006', 'p', 'r',
+'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init udpa_annotations_versioning_proto_upbdefinit = {
+ deps,
+ layouts,
+ "udpa/annotations/versioning.proto",
+ UPB_STRVIEW_INIT(descriptor, 279)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h
new file mode 100644
index 00000000000..c354431b8f6
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/annotations/versioning.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_ANNOTATIONS_VERSIONING_PROTO_UPBDEFS_H_
+#define UDPA_ANNOTATIONS_VERSIONING_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_def_init udpa_annotations_versioning_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *udpa_annotations_VersioningAnnotation_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_annotations_versioning_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.annotations.VersioningAnnotation");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_ANNOTATIONS_VERSIONING_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c
new file mode 100644
index 00000000000..f786bff37ab
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c
@@ -0,0 +1,44 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/type/v1/typed_struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "udpa/type/v1/typed_struct.upbdefs.h"
+
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern upb_def_init google_protobuf_struct_proto_upbdefinit;
+extern const upb_msglayout udpa_type_v1_TypedStruct_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &udpa_type_v1_TypedStruct_msginit,
+};
+
+static const char descriptor[251] = {'\n', '\037', 'u', 'd', 'p', 'a', '/', 't', 'y', 'p', 'e', '/', 'v', '1', '/', 't', 'y', 'p', 'e', 'd', '_', 's', 't', 'r', 'u',
+'c', 't', '.', 'p', 'r', 'o', 't', 'o', '\022', '\014', 'u', 'd', 'p', 'a', '.', 't', 'y', 'p', 'e', '.', 'v', '1', '\032', '\027', 'v',
+'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\032', '\034', 'g',
+'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 's', 't', 'r', 'u', 'c', 't', '.', 'p', 'r', 'o',
+'t', 'o', '\"', 'W', '\n', '\013', 'T', 'y', 'p', 'e', 'd', 'S', 't', 'r', 'u', 'c', 't', '\022', '\031', '\n', '\010', 't', 'y', 'p', 'e',
+'_', 'u', 'r', 'l', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\007', 't', 'y', 'p', 'e', 'U', 'r', 'l', '\022', '-', '\n', '\005', 'v', 'a',
+'l', 'u', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\027', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '.', 'S', 't', 'r', 'u', 'c', 't', 'R', '\005', 'v', 'a', 'l', 'u', 'e', 'B', '2', '\n', '\034', 'c', 'o', 'm', '.', 'g',
+'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'u', 'd', 'p', 'a', '.', 't', 'y', 'p', 'e', '.', 'v', '1', 'B', '\020',
+'T', 'y', 'p', 'e', 'd', 'S', 't', 'r', 'u', 'c', 't', 'P', 'r', 'o', 't', 'o', 'P', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o',
+'3',
+};
+
+static upb_def_init *deps[3] = {
+ &validate_validate_proto_upbdefinit,
+ &google_protobuf_struct_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init udpa_type_v1_typed_struct_proto_upbdefinit = {
+ deps,
+ layouts,
+ "udpa/type/v1/typed_struct.proto",
+ UPB_STRVIEW_INIT(descriptor, 251)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h
new file mode 100644
index 00000000000..d30baef2b22
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * udpa/type/v1/typed_struct.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef UDPA_TYPE_V1_TYPED_STRUCT_PROTO_UPBDEFS_H_
+#define UDPA_TYPE_V1_TYPED_STRUCT_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_def_init udpa_type_v1_typed_struct_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *udpa_type_v1_TypedStruct_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &udpa_type_v1_typed_struct_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "udpa.type.v1.TypedStruct");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* UDPA_TYPE_V1_TYPED_STRUCT_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c
new file mode 100644
index 00000000000..dc751fa62b9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c
@@ -0,0 +1,310 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * validate/validate.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "validate/validate.upbdefs.h"
+
+extern upb_def_init google_protobuf_descriptor_proto_upbdefinit;
+extern upb_def_init google_protobuf_duration_proto_upbdefinit;
+extern upb_def_init google_protobuf_timestamp_proto_upbdefinit;
+extern const upb_msglayout validate_FieldRules_msginit;
+extern const upb_msglayout validate_FloatRules_msginit;
+extern const upb_msglayout validate_DoubleRules_msginit;
+extern const upb_msglayout validate_Int32Rules_msginit;
+extern const upb_msglayout validate_Int64Rules_msginit;
+extern const upb_msglayout validate_UInt32Rules_msginit;
+extern const upb_msglayout validate_UInt64Rules_msginit;
+extern const upb_msglayout validate_SInt32Rules_msginit;
+extern const upb_msglayout validate_SInt64Rules_msginit;
+extern const upb_msglayout validate_Fixed32Rules_msginit;
+extern const upb_msglayout validate_Fixed64Rules_msginit;
+extern const upb_msglayout validate_SFixed32Rules_msginit;
+extern const upb_msglayout validate_SFixed64Rules_msginit;
+extern const upb_msglayout validate_BoolRules_msginit;
+extern const upb_msglayout validate_StringRules_msginit;
+extern const upb_msglayout validate_BytesRules_msginit;
+extern const upb_msglayout validate_EnumRules_msginit;
+extern const upb_msglayout validate_MessageRules_msginit;
+extern const upb_msglayout validate_RepeatedRules_msginit;
+extern const upb_msglayout validate_MapRules_msginit;
+extern const upb_msglayout validate_AnyRules_msginit;
+extern const upb_msglayout validate_DurationRules_msginit;
+extern const upb_msglayout validate_TimestampRules_msginit;
+
+static const upb_msglayout *layouts[23] = {
+ &validate_FieldRules_msginit,
+ &validate_FloatRules_msginit,
+ &validate_DoubleRules_msginit,
+ &validate_Int32Rules_msginit,
+ &validate_Int64Rules_msginit,
+ &validate_UInt32Rules_msginit,
+ &validate_UInt64Rules_msginit,
+ &validate_SInt32Rules_msginit,
+ &validate_SInt64Rules_msginit,
+ &validate_Fixed32Rules_msginit,
+ &validate_Fixed64Rules_msginit,
+ &validate_SFixed32Rules_msginit,
+ &validate_SFixed64Rules_msginit,
+ &validate_BoolRules_msginit,
+ &validate_StringRules_msginit,
+ &validate_BytesRules_msginit,
+ &validate_EnumRules_msginit,
+ &validate_MessageRules_msginit,
+ &validate_RepeatedRules_msginit,
+ &validate_MapRules_msginit,
+ &validate_AnyRules_msginit,
+ &validate_DurationRules_msginit,
+ &validate_TimestampRules_msginit,
+};
+
+static const char descriptor[5759] = {'\n', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'\022', '\010', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '\032', ' ', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b',
+'u', 'f', '/', 'd', 'e', 's', 'c', 'r', 'i', 'p', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\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', '\032', '\037', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 't', 'i', 'm', 'e', 's', 't',
+'a', 'm', 'p', '.', 'p', 'r', 'o', 't', 'o', '\"', '\310', '\010', '\n', '\n', 'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', '\022',
+'0', '\n', '\007', 'm', 'e', 's', 's', 'a', 'g', 'e', '\030', '\021', ' ', '\001', '(', '\013', '2', '\026', '.', 'v', 'a', 'l', 'i', 'd', 'a',
+'t', 'e', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'R', 'u', 'l', 'e', 's', 'R', '\007', 'm', 'e', 's', 's', 'a', 'g', 'e', '\022',
+',', '\n', '\005', 'f', 'l', 'o', 'a', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'.', 'F', 'l', 'o', 'a', 't', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\005', 'f', 'l', 'o', 'a', 't', '\022', '/', '\n', '\006', 'd',
+'o', 'u', 'b', 'l', 'e', '\030', '\002', ' ', '\001', '(', '\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'D', 'o',
+'u', 'b', 'l', 'e', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\006', 'd', 'o', 'u', 'b', 'l', 'e', '\022', ',', '\n', '\005', 'i', 'n',
+'t', '3', '2', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'I', 'n', 't', '3',
+'2', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\005', 'i', 'n', 't', '3', '2', '\022', ',', '\n', '\005', 'i', 'n', 't', '6', '4', '\030',
+'\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'I', 'n', 't', '6', '4', 'R', 'u', 'l',
+'e', 's', 'H', '\000', 'R', '\005', 'i', 'n', 't', '6', '4', '\022', '/', '\n', '\006', 'u', 'i', 'n', 't', '3', '2', '\030', '\005', ' ', '\001',
+'(', '\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'U', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's',
+'H', '\000', 'R', '\006', 'u', 'i', 'n', 't', '3', '2', '\022', '/', '\n', '\006', 'u', 'i', 'n', 't', '6', '4', '\030', '\006', ' ', '\001', '(',
+'\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'U', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', 'H',
+'\000', 'R', '\006', 'u', 'i', 'n', 't', '6', '4', '\022', '/', '\n', '\006', 's', 'i', 'n', 't', '3', '2', '\030', '\007', ' ', '\001', '(', '\013',
+'2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', 'H', '\000',
+'R', '\006', 's', 'i', 'n', 't', '3', '2', '\022', '/', '\n', '\006', 's', 'i', 'n', 't', '6', '4', '\030', '\010', ' ', '\001', '(', '\013', '2',
+'\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R',
+'\006', 's', 'i', 'n', 't', '6', '4', '\022', '2', '\n', '\007', 'f', 'i', 'x', 'e', 'd', '3', '2', '\030', '\t', ' ', '\001', '(', '\013', '2',
+'\026', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'x', 'e', 'd', '3', '2', 'R', 'u', 'l', 'e', 's', 'H', '\000',
+'R', '\007', 'f', 'i', 'x', 'e', 'd', '3', '2', '\022', '2', '\n', '\007', 'f', 'i', 'x', 'e', 'd', '6', '4', '\030', '\n', ' ', '\001', '(',
+'\013', '2', '\026', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'x', 'e', 'd', '6', '4', 'R', 'u', 'l', 'e', 's',
+'H', '\000', 'R', '\007', 'f', 'i', 'x', 'e', 'd', '6', '4', '\022', '5', '\n', '\010', 's', 'f', 'i', 'x', 'e', 'd', '3', '2', '\030', '\013',
+' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'F', 'i', 'x', 'e', 'd', '3', '2', 'R',
+'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 's', 'f', 'i', 'x', 'e', 'd', '3', '2', '\022', '5', '\n', '\010', 's', 'f', 'i', 'x', 'e',
+'d', '6', '4', '\030', '\014', ' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 'F', 'i', 'x',
+'e', 'd', '6', '4', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 's', 'f', 'i', 'x', 'e', 'd', '6', '4', '\022', ')', '\n', '\004',
+'b', 'o', 'o', 'l', '\030', '\r', ' ', '\001', '(', '\013', '2', '\023', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'B', 'o', 'o',
+'l', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\004', 'b', 'o', 'o', 'l', '\022', '/', '\n', '\006', 's', 't', 'r', 'i', 'n', 'g', '\030',
+'\016', ' ', '\001', '(', '\013', '2', '\025', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'S', 't', 'r', 'i', 'n', 'g', 'R', 'u',
+'l', 'e', 's', 'H', '\000', 'R', '\006', 's', 't', 'r', 'i', 'n', 'g', '\022', ',', '\n', '\005', 'b', 'y', 't', 'e', 's', '\030', '\017', ' ',
+'\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'B', 'y', 't', 'e', 's', 'R', 'u', 'l', 'e', 's',
+'H', '\000', 'R', '\005', 'b', 'y', 't', 'e', 's', '\022', ')', '\n', '\004', 'e', 'n', 'u', 'm', '\030', '\020', ' ', '\001', '(', '\013', '2', '\023',
+'.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'E', 'n', 'u', 'm', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\004', 'e', 'n',
+'u', 'm', '\022', '5', '\n', '\010', 'r', 'e', 'p', 'e', 'a', 't', 'e', 'd', '\030', '\022', ' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '.', 'R', 'e', 'p', 'e', 'a', 't', 'e', 'd', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 'r',
+'e', 'p', 'e', 'a', 't', 'e', 'd', '\022', '&', '\n', '\003', 'm', 'a', 'p', '\030', '\023', ' ', '\001', '(', '\013', '2', '\022', '.', 'v', 'a',
+'l', 'i', 'd', 'a', 't', 'e', '.', 'M', 'a', 'p', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\003', 'm', 'a', 'p', '\022', '&', '\n',
+'\003', 'a', 'n', 'y', '\030', '\024', ' ', '\001', '(', '\013', '2', '\022', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'A', 'n', 'y',
+'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\003', 'a', 'n', 'y', '\022', '5', '\n', '\010', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\030',
+'\025', ' ', '\001', '(', '\013', '2', '\027', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n',
+'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\010', 'd', 'u', 'r', 'a', 't', 'i', 'o', 'n', '\022', '8', '\n', '\t', 't', 'i', 'm', 'e',
+'s', 't', 'a', 'm', 'p', '\030', '\026', ' ', '\001', '(', '\013', '2', '\030', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'T', 'i',
+'m', 'e', 's', 't', 'a', 'm', 'p', 'R', 'u', 'l', 'e', 's', 'H', '\000', 'R', '\t', 't', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p',
+'B', '\006', '\n', '\004', 't', 'y', 'p', 'e', '\"', '\215', '\001', '\n', '\n', 'F', 'l', 'o', 'a', 't', 'R', 'u', 'l', 'e', 's', '\022', '\024',
+'\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\002', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l',
+'t', '\030', '\002', ' ', '\001', '(', '\002', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\002', 'R',
+'\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\002', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g',
+'t', 'e', '\030', '\005', ' ', '\001', '(', '\002', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\002',
+'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\002', 'R', '\005', 'n', 'o', 't',
+'I', 'n', '\"', '\216', '\001', '\n', '\013', 'D', 'o', 'u', 'b', 'l', 'e', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n',
+'s', 't', '\030', '\001', ' ', '\001', '(', '\001', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001',
+'(', '\001', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\001', 'R', '\003', 'l', 't', 'e', '\022',
+'\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\001', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ',
+'\001', '(', '\001', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\001', 'R', '\002', 'i', 'n', '\022',
+'\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\001', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\215', '\001',
+'\n', '\n', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001',
+'(', '\005', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\005', 'R', '\002', 'l', 't',
+'\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\005', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030',
+'\004', ' ', '\001', '(', '\005', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\005', 'R', '\003', 'g',
+'t', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\005', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't',
+'_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\005', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\215', '\001', '\n', '\n', 'I', 'n', 't', '6',
+'4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\003', 'R', '\005', 'c', 'o',
+'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\003', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't',
+'e', '\030', '\003', ' ', '\001', '(', '\003', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\003', 'R',
+'\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\003', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002',
+'i', 'n', '\030', '\006', ' ', '\003', '(', '\003', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ',
+'\003', '(', '\003', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\216', '\001', '\n', '\013', 'U', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e',
+'s', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\r', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016',
+'\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\r', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001',
+'(', '\r', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\r', 'R', '\002', 'g', 't', '\022', '\020',
+'\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\r', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ',
+'\003', '(', '\r', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\r', 'R', '\005',
+'n', 'o', 't', 'I', 'n', '\"', '\216', '\001', '\n', '\013', 'U', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005',
+'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\004', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030',
+'\002', ' ', '\001', '(', '\004', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\003', 'l',
+'t', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e',
+'\030', '\005', ' ', '\001', '(', '\004', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\004', 'R', '\002',
+'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\004', 'R', '\005', 'n', 'o', 't', 'I', 'n',
+'\"', '\216', '\001', '\n', '\013', 'S', 'I', 'n', 't', '3', '2', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't',
+'\030', '\001', ' ', '\001', '(', '\021', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\021',
+'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\021', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n',
+'\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\021', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(',
+'\021', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\021', 'R', '\002', 'i', 'n', '\022', '\025', '\n',
+'\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\021', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\216', '\001', '\n', '\013',
+'S', 'I', 'n', 't', '6', '4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(',
+'\022', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\022', 'R', '\002', 'l', 't', '\022',
+'\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\022', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004',
+' ', '\001', '(', '\022', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\022', 'R', '\003', 'g', 't',
+'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\022', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_',
+'i', 'n', '\030', '\007', ' ', '\003', '(', '\022', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\217', '\001', '\n', '\014', 'F', 'i', 'x', 'e', 'd',
+'3', '2', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\007', 'R', '\005', 'c',
+'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\007', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l',
+'t', 'e', '\030', '\003', ' ', '\001', '(', '\007', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\007',
+'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\007', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n',
+'\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\007', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007',
+' ', '\003', '(', '\007', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\217', '\001', '\n', '\014', 'F', 'i', 'x', 'e', 'd', '6', '4', 'R', 'u',
+'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\006', 'R', '\005', 'c', 'o', 'n', 's', 't',
+'\022', '\016', '\n', '\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\006', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003',
+' ', '\001', '(', '\006', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\006', 'R', '\002', 'g', 't',
+'\022', '\020', '\n', '\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\006', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030',
+'\006', ' ', '\003', '(', '\006', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\006',
+'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\220', '\001', '\n', '\r', 'S', 'F', 'i', 'x', 'e', 'd', '3', '2', 'R', 'u', 'l', 'e', 's',
+'\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\017', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n',
+'\002', 'l', 't', '\030', '\002', ' ', '\001', '(', '\017', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(',
+'\017', 'R', '\003', 'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\017', 'R', '\002', 'g', 't', '\022', '\020', '\n',
+'\003', 'g', 't', 'e', '\030', '\005', ' ', '\001', '(', '\017', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003',
+'(', '\017', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\017', 'R', '\005', 'n',
+'o', 't', 'I', 'n', '\"', '\220', '\001', '\n', '\r', 'S', 'F', 'i', 'x', 'e', 'd', '6', '4', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n',
+'\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\020', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\016', '\n', '\002', 'l', 't',
+'\030', '\002', ' ', '\001', '(', '\020', 'R', '\002', 'l', 't', '\022', '\020', '\n', '\003', 'l', 't', 'e', '\030', '\003', ' ', '\001', '(', '\020', 'R', '\003',
+'l', 't', 'e', '\022', '\016', '\n', '\002', 'g', 't', '\030', '\004', ' ', '\001', '(', '\020', 'R', '\002', 'g', 't', '\022', '\020', '\n', '\003', 'g', 't',
+'e', '\030', '\005', ' ', '\001', '(', '\020', 'R', '\003', 'g', 't', 'e', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\006', ' ', '\003', '(', '\020', 'R',
+'\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\020', 'R', '\005', 'n', 'o', 't', 'I',
+'n', '\"', '!', '\n', '\t', 'B', 'o', 'o', 'l', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001',
+' ', '\001', '(', '\010', 'R', '\005', 'c', 'o', 'n', 's', 't', '\"', '\261', '\005', '\n', '\013', 'S', 't', 'r', 'i', 'n', 'g', 'R', 'u', 'l',
+'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022',
+'\020', '\n', '\003', 'l', 'e', 'n', '\030', '\023', ' ', '\001', '(', '\004', 'R', '\003', 'l', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'i', 'n', '_',
+'l', 'e', 'n', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\006', 'm', 'i', 'n', 'L', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'a', 'x', '_',
+'l', 'e', 'n', '\030', '\003', ' ', '\001', '(', '\004', 'R', '\006', 'm', 'a', 'x', 'L', 'e', 'n', '\022', '\033', '\n', '\t', 'l', 'e', 'n', '_',
+'b', 'y', 't', 'e', 's', '\030', '\024', ' ', '\001', '(', '\004', 'R', '\010', 'l', 'e', 'n', 'B', 'y', 't', 'e', 's', '\022', '\033', '\n', '\t',
+'m', 'i', 'n', '_', 'b', 'y', 't', 'e', 's', '\030', '\004', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'i', 'n', 'B', 'y', 't', 'e', 's',
+'\022', '\033', '\n', '\t', 'm', 'a', 'x', '_', 'b', 'y', 't', 'e', 's', '\030', '\005', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'a', 'x', 'B',
+'y', 't', 'e', 's', '\022', '\030', '\n', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\030', '\006', ' ', '\001', '(', '\t', 'R', '\007', 'p', 'a',
+'t', 't', 'e', 'r', 'n', '\022', '\026', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\007', ' ', '\001', '(', '\t', 'R', '\006', 'p', 'r',
+'e', 'f', 'i', 'x', '\022', '\026', '\n', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\010', ' ', '\001', '(', '\t', 'R', '\006', 's', 'u', 'f',
+'f', 'i', 'x', '\022', '\032', '\n', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\t', ' ', '\001', '(', '\t', 'R', '\010', 'c', 'o',
+'n', 't', 'a', 'i', 'n', 's', '\022', '!', '\n', '\014', 'n', 'o', 't', '_', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\027', ' ',
+'\001', '(', '\t', 'R', '\013', 'n', 'o', 't', 'C', 'o', 'n', 't', 'a', 'i', 'n', 's', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\n', ' ',
+'\003', '(', '\t', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\013', ' ', '\003', '(', '\t', 'R', '\005',
+'n', 'o', 't', 'I', 'n', '\022', '\026', '\n', '\005', 'e', 'm', 'a', 'i', 'l', '\030', '\014', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\005', 'e',
+'m', 'a', 'i', 'l', '\022', '\034', '\n', '\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\030', '\r', ' ', '\001', '(', '\010', 'H', '\000', 'R',
+'\010', 'h', 'o', 's', 't', 'n', 'a', 'm', 'e', '\022', '\020', '\n', '\002', 'i', 'p', '\030', '\016', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\002',
+'i', 'p', '\022', '\024', '\n', '\004', 'i', 'p', 'v', '4', '\030', '\017', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '4', '\022',
+'\024', '\n', '\004', 'i', 'p', 'v', '6', '\030', '\020', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '6', '\022', '\022', '\n', '\003',
+'u', 'r', 'i', '\030', '\021', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\003', 'u', 'r', 'i', '\022', '\031', '\n', '\007', 'u', 'r', 'i', '_', 'r',
+'e', 'f', '\030', '\022', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\006', 'u', 'r', 'i', 'R', 'e', 'f', '\022', '\032', '\n', '\007', 'a', 'd', 'd',
+'r', 'e', 's', 's', '\030', '\025', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\007', 'a', 'd', 'd', 'r', 'e', 's', 's', '\022', '\024', '\n', '\004',
+'u', 'u', 'i', 'd', '\030', '\026', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'u', 'u', 'i', 'd', '\022', '@', '\n', '\020', 'w', 'e', 'l',
+'l', '_', 'k', 'n', 'o', 'w', 'n', '_', 'r', 'e', 'g', 'e', 'x', '\030', '\030', ' ', '\001', '(', '\016', '2', '\024', '.', 'v', 'a', 'l',
+'i', 'd', 'a', 't', 'e', '.', 'K', 'n', 'o', 'w', 'n', 'R', 'e', 'g', 'e', 'x', 'H', '\000', 'R', '\016', 'w', 'e', 'l', 'l', 'K',
+'n', 'o', 'w', 'n', 'R', 'e', 'g', 'e', 'x', '\022', '\034', '\n', '\006', 's', 't', 'r', 'i', 'c', 't', '\030', '\031', ' ', '\001', '(', '\010',
+':', '\004', 't', 'r', 'u', 'e', 'R', '\006', 's', 't', 'r', 'i', 'c', 't', 'B', '\014', '\n', '\n', 'w', 'e', 'l', 'l', '_', 'k', 'n',
+'o', 'w', 'n', '\"', '\277', '\002', '\n', '\n', 'B', 'y', 't', 'e', 's', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n',
+'s', 't', '\030', '\001', ' ', '\001', '(', '\014', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '\020', '\n', '\003', 'l', 'e', 'n', '\030', '\r', ' ',
+'\001', '(', '\004', 'R', '\003', 'l', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'i', 'n', '_', 'l', 'e', 'n', '\030', '\002', ' ', '\001', '(', '\004',
+'R', '\006', 'm', 'i', 'n', 'L', 'e', 'n', '\022', '\027', '\n', '\007', 'm', 'a', 'x', '_', 'l', 'e', 'n', '\030', '\003', ' ', '\001', '(', '\004',
+'R', '\006', 'm', 'a', 'x', 'L', 'e', 'n', '\022', '\030', '\n', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\030', '\004', ' ', '\001', '(', '\t',
+'R', '\007', 'p', 'a', 't', 't', 'e', 'r', 'n', '\022', '\026', '\n', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\030', '\005', ' ', '\001', '(', '\014',
+'R', '\006', 'p', 'r', 'e', 'f', 'i', 'x', '\022', '\026', '\n', '\006', 's', 'u', 'f', 'f', 'i', 'x', '\030', '\006', ' ', '\001', '(', '\014', 'R',
+'\006', 's', 'u', 'f', 'f', 'i', 'x', '\022', '\032', '\n', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\030', '\007', ' ', '\001', '(', '\014',
+'R', '\010', 'c', 'o', 'n', 't', 'a', 'i', 'n', 's', '\022', '\016', '\n', '\002', 'i', 'n', '\030', '\010', ' ', '\003', '(', '\014', 'R', '\002', 'i',
+'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\t', ' ', '\003', '(', '\014', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\022',
+'\020', '\n', '\002', 'i', 'p', '\030', '\n', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\002', 'i', 'p', '\022', '\024', '\n', '\004', 'i', 'p', 'v', '4',
+'\030', '\013', ' ', '\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '4', '\022', '\024', '\n', '\004', 'i', 'p', 'v', '6', '\030', '\014', ' ',
+'\001', '(', '\010', 'H', '\000', 'R', '\004', 'i', 'p', 'v', '6', 'B', '\014', '\n', '\n', 'w', 'e', 'l', 'l', '_', 'k', 'n', 'o', 'w', 'n',
+'\"', 'k', '\n', '\t', 'E', 'n', 'u', 'm', 'R', 'u', 'l', 'e', 's', '\022', '\024', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\001', ' ',
+'\001', '(', '\005', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '!', '\n', '\014', 'd', 'e', 'f', 'i', 'n', 'e', 'd', '_', 'o', 'n', 'l',
+'y', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\013', 'd', 'e', 'f', 'i', 'n', 'e', 'd', 'O', 'n', 'l', 'y', '\022', '\016', '\n', '\002', 'i',
+'n', '\030', '\003', ' ', '\003', '(', '\005', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\004', ' ', '\003',
+'(', '\005', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '>', '\n', '\014', 'M', 'e', 's', 's', 'a', 'g', 'e', 'R', 'u', 'l', 'e', 's',
+'\022', '\022', '\n', '\004', 's', 'k', 'i', 'p', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\004', 's', 'k', 'i', 'p', '\022', '\032', '\n', '\010', 'r',
+'e', 'q', 'u', 'i', 'r', 'e', 'd', '\030', '\002', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\"', '\215',
+'\001', '\n', '\r', 'R', 'e', 'p', 'e', 'a', 't', 'e', 'd', 'R', 'u', 'l', 'e', 's', '\022', '\033', '\n', '\t', 'm', 'i', 'n', '_', 'i',
+'t', 'e', 'm', 's', '\030', '\001', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'i', 'n', 'I', 't', 'e', 'm', 's', '\022', '\033', '\n', '\t', 'm',
+'a', 'x', '_', 'i', 't', 'e', 'm', 's', '\030', '\002', ' ', '\001', '(', '\004', 'R', '\010', 'm', 'a', 'x', 'I', 't', 'e', 'm', 's', '\022',
+'\026', '\n', '\006', 'u', 'n', 'i', 'q', 'u', 'e', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\006', 'u', 'n', 'i', 'q', 'u', 'e', '\022', '*',
+'\n', '\005', 'i', 't', 'e', 'm', 's', '\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.',
+'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', 'R', '\005', 'i', 't', 'e', 'm', 's', '\"', '\271', '\001', '\n', '\010', 'M', 'a', 'p',
+'R', 'u', 'l', 'e', 's', '\022', '\033', '\n', '\t', 'm', 'i', 'n', '_', 'p', 'a', 'i', 'r', 's', '\030', '\001', ' ', '\001', '(', '\004', 'R',
+'\010', 'm', 'i', 'n', 'P', 'a', 'i', 'r', 's', '\022', '\033', '\n', '\t', 'm', 'a', 'x', '_', 'p', 'a', 'i', 'r', 's', '\030', '\002', ' ',
+'\001', '(', '\004', 'R', '\010', 'm', 'a', 'x', 'P', 'a', 'i', 'r', 's', '\022', '\033', '\n', '\t', 'n', 'o', '_', 's', 'p', 'a', 'r', 's',
+'e', '\030', '\003', ' ', '\001', '(', '\010', 'R', '\010', 'n', 'o', 'S', 'p', 'a', 'r', 's', 'e', '\022', '(', '\n', '\004', 'k', 'e', 'y', 's',
+'\030', '\004', ' ', '\001', '(', '\013', '2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'e', 'l', 'd', 'R', 'u',
+'l', 'e', 's', 'R', '\004', 'k', 'e', 'y', 's', '\022', ',', '\n', '\006', 'v', 'a', 'l', 'u', 'e', 's', '\030', '\005', ' ', '\001', '(', '\013',
+'2', '\024', '.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', 'R', '\006', 'v',
+'a', 'l', 'u', 'e', 's', '\"', 'M', '\n', '\010', 'A', 'n', 'y', 'R', 'u', 'l', 'e', 's', '\022', '\032', '\n', '\010', 'r', 'e', 'q', 'u',
+'i', 'r', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\022', '\016', '\n', '\002', 'i',
+'n', '\030', '\002', ' ', '\003', '(', '\t', 'R', '\002', 'i', 'n', '\022', '\025', '\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\003', ' ', '\003',
+'(', '\t', 'R', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\351', '\002', '\n', '\r', 'D', 'u', 'r', 'a', 't', 'i', 'o', 'n', 'R', 'u', 'l',
+'e', 's', '\022', '\032', '\n', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q',
+'u', 'i', 'r', 'e', 'd', '\022', '/', '\n', '\005', 'c', 'o', 'n', 's', 't', '\030', '\002', ' ', '\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', '\005', 'c',
+'o', 'n', 's', 't', '\022', ')', '\n', '\002', 'l', 't', '\030', '\003', ' ', '\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', '\002', 'l', 't', '\022', '+', '\n',
+'\003', 'l', 't', 'e', '\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', '\003', 'l', 't', 'e', '\022', ')', '\n', '\002', 'g', 't', '\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', '\002', 'g', 't', '\022', '+', '\n', '\003', 'g', 't', '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', '\003', 'g', 't', 'e', '\022', ')', '\n', '\002', 'i', 'n', '\030', '\007', ' ', '\003', '(', '\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', '\002', 'i', 'n', '\022', '0',
+'\n', '\006', 'n', 'o', 't', '_', 'i', 'n', '\030', '\010', ' ', '\003', '(', '\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', '\005', 'n', 'o', 't', 'I', 'n', '\"', '\363',
+'\002', '\n', '\016', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', 'u', 'l', 'e', 's', '\022', '\032', '\n', '\010', 'r', 'e', 'q', 'u',
+'i', 'r', 'e', 'd', '\030', '\001', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e', 'd', '\022', '0', '\n', '\005', 'c',
+'o', 'n', 's', 't', '\030', '\002', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\005', 'c', 'o', 'n', 's', 't', '\022', '*', '\n', '\002', 'l',
+'t', '\030', '\003', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f',
+'.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\002', 'l', 't', '\022', ',', '\n', '\003', 'l', 't', 'e', '\030', '\004', ' ', '\001',
+'(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e',
+'s', 't', 'a', 'm', 'p', 'R', '\003', 'l', 't', 'e', '\022', '*', '\n', '\002', 'g', 't', '\030', '\005', ' ', '\001', '(', '\013', '2', '\032', '.',
+'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p',
+'R', '\002', 'g', 't', '\022', ',', '\n', '\003', 'g', 't', 'e', '\030', '\006', ' ', '\001', '(', '\013', '2', '\032', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'T', 'i', 'm', 'e', 's', 't', 'a', 'm', 'p', 'R', '\003', 'g', 't', 'e',
+'\022', '\025', '\n', '\006', 'l', 't', '_', 'n', 'o', 'w', '\030', '\007', ' ', '\001', '(', '\010', 'R', '\005', 'l', 't', 'N', 'o', 'w', '\022', '\025',
+'\n', '\006', 'g', 't', '_', 'n', 'o', 'w', '\030', '\010', ' ', '\001', '(', '\010', 'R', '\005', 'g', 't', 'N', 'o', 'w', '\022', '1', '\n', '\006',
+'w', 'i', 't', 'h', 'i', 'n', '\030', '\t', ' ', '\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', 'w', 'i', 't', 'h', 'i', 'n', '*', 'F', '\n',
+'\n', 'K', 'n', 'o', 'w', 'n', 'R', 'e', 'g', 'e', 'x', '\022', '\013', '\n', '\007', 'U', 'N', 'K', 'N', 'O', 'W', 'N', '\020', '\000', '\022',
+'\024', '\n', '\020', 'H', 'T', 'T', 'P', '_', 'H', 'E', 'A', 'D', 'E', 'R', '_', 'N', 'A', 'M', 'E', '\020', '\001', '\022', '\025', '\n', '\021',
+'H', 'T', 'T', 'P', '_', 'H', 'E', 'A', 'D', 'E', 'R', '_', 'V', 'A', 'L', 'U', 'E', '\020', '\002', ':', '<', '\n', '\010', 'd', 'i',
+'s', 'a', 'b', 'l', 'e', 'd', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.',
+'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\257', '\010', ' ', '\001', '(', '\010', 'R', '\010', 'd', 'i',
+'s', 'a', 'b', 'l', 'e', 'd', ':', ':', '\n', '\007', 'i', 'g', 'n', 'o', 'r', 'e', 'd', '\022', '\037', '.', 'g', 'o', 'o', 'g', 'l',
+'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'M', 'e', 's', 's', 'a', 'g', 'e', 'O', 'p', 't', 'i', 'o', 'n', 's',
+'\030', '\260', '\010', ' ', '\001', '(', '\010', 'R', '\007', 'i', 'g', 'n', 'o', 'r', 'e', 'd', ':', ':', '\n', '\010', 'r', 'e', 'q', 'u', 'i',
+'r', 'e', 'd', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '.', 'O', 'n', 'e',
+'o', 'f', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\257', '\010', ' ', '\001', '(', '\010', 'R', '\010', 'r', 'e', 'q', 'u', 'i', 'r', 'e',
+'d', ':', 'J', '\n', '\005', 'r', 'u', 'l', 'e', 's', '\022', '\035', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'F', 'i', 'e', 'l', 'd', 'O', 'p', 't', 'i', 'o', 'n', 's', '\030', '\257', '\010', ' ', '\001', '(', '\013', '2', '\024',
+'.', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'F', 'i', 'e', 'l', 'd', 'R', 'u', 'l', 'e', 's', 'R', '\005', 'r', 'u', 'l',
+'e', 's', 'B', 'P', '\n', '\032', 'i', 'o', '.', 'e', 'n', 'v', 'o', 'y', 'p', 'r', 'o', 'x', 'y', '.', 'p', 'g', 'v', '.', 'v',
+'a', 'l', 'i', 'd', 'a', 't', 'e', 'Z', '2', 'g', 'i', 't', 'h', 'u', 'b', '.', 'c', 'o', 'm', '/', 'e', 'n', 'v', 'o', 'y',
+'p', 'r', 'o', 'x', 'y', '/', 'p', 'r', 'o', 't', 'o', 'c', '-', 'g', 'e', 'n', '-', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+'/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e',
+};
+
+static upb_def_init *deps[4] = {
+ &google_protobuf_descriptor_proto_upbdefinit,
+ &google_protobuf_duration_proto_upbdefinit,
+ &google_protobuf_timestamp_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init validate_validate_proto_upbdefinit = {
+ deps,
+ layouts,
+ "validate/validate.proto",
+ UPB_STRVIEW_INIT(descriptor, 5759)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h
new file mode 100644
index 00000000000..2637121f90f
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h
@@ -0,0 +1,145 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * validate/validate.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef VALIDATE_VALIDATE_PROTO_UPBDEFS_H_
+#define VALIDATE_VALIDATE_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_def_init validate_validate_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *validate_FieldRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.FieldRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_FloatRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.FloatRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_DoubleRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.DoubleRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_Int32Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.Int32Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_Int64Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.Int64Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_UInt32Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.UInt32Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_UInt64Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.UInt64Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_SInt32Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.SInt32Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_SInt64Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.SInt64Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_Fixed32Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.Fixed32Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_Fixed64Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.Fixed64Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_SFixed32Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.SFixed32Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_SFixed64Rules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.SFixed64Rules");
+}
+
+UPB_INLINE const upb_msgdef *validate_BoolRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.BoolRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_StringRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.StringRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_BytesRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.BytesRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_EnumRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.EnumRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_MessageRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.MessageRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_RepeatedRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.RepeatedRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_MapRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.MapRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_AnyRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.AnyRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_DurationRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.DurationRules");
+}
+
+UPB_INLINE const upb_msgdef *validate_TimestampRules_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &validate_validate_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "validate.TimestampRules");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* VALIDATE_VALIDATE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c
new file mode 100644
index 00000000000..699ae7d9968
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c
@@ -0,0 +1,42 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/authority.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "xds/core/v3/authority.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout xds_core_v3_Authority_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &xds_core_v3_Authority_msginit,
+};
+
+static const char descriptor[205] = {'\n', '\033', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '.', 'p',
+'r', 'o', 't', 'o', '\022', '\013', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a',
+'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027',
+'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '(',
+'\n', '\t', 'A', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '\022', '\033', '\n', '\004', 'n', 'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\t',
+'B', '\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\004', 'n', 'a', 'm', 'e', 'B', '7', '\n', '\033', 'c', 'o', 'm', '.', 'g', 'i',
+'t', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B', '\016', 'A', 'u',
+'t', 'h', 'o', 'r', 'i', 't', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\010', '\001', 'b', '\006', 'p',
+'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[3] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init xds_core_v3_authority_proto_upbdefinit = {
+ deps,
+ layouts,
+ "xds/core/v3/authority.proto",
+ UPB_STRVIEW_INIT(descriptor, 205)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h
new file mode 100644
index 00000000000..191ee65b8b9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/authority.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_AUTHORITY_PROTO_UPBDEFS_H_
+#define XDS_CORE_V3_AUTHORITY_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_def_init xds_core_v3_authority_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *xds_core_v3_Authority_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_authority_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.Authority");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_AUTHORITY_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c
new file mode 100644
index 00000000000..93d0581f8ea
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c
@@ -0,0 +1,62 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/collection_entry.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "xds/core/v3/collection_entry.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init xds_core_v3_resource_locator_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout xds_core_v3_CollectionEntry_msginit;
+extern const upb_msglayout xds_core_v3_CollectionEntry_InlineEntry_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &xds_core_v3_CollectionEntry_msginit,
+ &xds_core_v3_CollectionEntry_InlineEntry_msginit,
+};
+
+static const char descriptor[565] = {'\n', '\"', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', '_',
+'e', 'n', 't', 'r', 'y', '.', 'p', 'r', 'o', 't', 'o', '\022', '\013', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032',
+'\031', 'g', 'o', 'o', 'g', 'l', 'e', '/', 'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't',
+'o', '\032', '\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u',
+'s', '.', 'p', 'r', 'o', 't', 'o', '\032', '\"', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'r', 'e', 's', 'o',
+'u', 'r', 'c', 'e', '_', 'l', 'o', 'c', 'a', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd',
+'a', 't', 'e', '/', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\303', '\002', '\n', '\017', 'C', 'o',
+'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r', 'y', '\022', '8', '\n', '\007', 'l', 'o', 'c', 'a', 't', 'o', 'r', '\030',
+'\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'e', 's', 'o', 'u',
+'r', 'c', 'e', 'L', 'o', 'c', 'a', 't', 'o', 'r', 'H', '\000', 'R', '\007', 'l', 'o', 'c', 'a', 't', 'o', 'r', '\022', 'M', '\n', '\014',
+'i', 'n', 'l', 'i', 'n', 'e', '_', 'e', 'n', 't', 'r', 'y', '\030', '\002', ' ', '\001', '(', '\013', '2', '(', '.', 'x', 'd', 's', '.',
+'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r', 'y', '.', 'I',
+'n', 'l', 'i', 'n', 'e', 'E', 'n', 't', 'r', 'y', 'H', '\000', 'R', '\013', 'i', 'n', 'l', 'i', 'n', 'e', 'E', 'n', 't', 'r', 'y',
+'\032', '\213', '\001', '\n', '\013', 'I', 'n', 'l', 'i', 'n', 'e', 'E', 'n', 't', 'r', 'y', '\022', '0', '\n', '\004', 'n', 'a', 'm', 'e', '\030',
+'\001', ' ', '\001', '(', '\t', 'B', '\034', '\372', 'B', '\031', 'r', '\027', '2', '\025', '^', '[', '0', '-', '9', 'a', '-', 'z', 'A', '-', 'Z',
+'_', '\\', '-', '\\', '.', '~', ':', ']', '+', '$', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\030', '\n', '\007', 'v', 'e', 'r', 's', 'i',
+'o', 'n', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', '0', '\n', '\010', 'r', 'e', 's', 'o',
+'u', 'r', 'c', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't', 'o',
+'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'B', '\031', '\n', '\022', 'r', 'e', 's', 'o',
+'u', 'r', 'c', 'e', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', '\022', '\003', '\370', 'B', '\001', 'B', '=', '\n', '\033', 'c', 'o',
+'m', '.', 'g', 'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'B', '\024', 'C', 'o', 'l', 'l', 'e', 'c', 't', 'i', 'o', 'n', 'E', 'n', 't', 'r', 'y', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272',
+'\200', '\310', '\321', '\006', '\002', '\010', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[5] = {
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &xds_core_v3_resource_locator_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init xds_core_v3_collection_entry_proto_upbdefinit = {
+ deps,
+ layouts,
+ "xds/core/v3/collection_entry.proto",
+ UPB_STRVIEW_INIT(descriptor, 565)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h
new file mode 100644
index 00000000000..3efc453109e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/collection_entry.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_COLLECTION_ENTRY_PROTO_UPBDEFS_H_
+#define XDS_CORE_V3_COLLECTION_ENTRY_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_def_init xds_core_v3_collection_entry_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *xds_core_v3_CollectionEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_collection_entry_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.CollectionEntry");
+}
+
+UPB_INLINE const upb_msgdef *xds_core_v3_CollectionEntry_InlineEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_collection_entry_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.CollectionEntry.InlineEntry");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_COLLECTION_ENTRY_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c
new file mode 100644
index 00000000000..0c6584b0a43
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c
@@ -0,0 +1,45 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/context_params.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "xds/core/v3/context_params.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern const upb_msglayout xds_core_v3_ContextParams_msginit;
+extern const upb_msglayout xds_core_v3_ContextParams_ParamsEntry_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &xds_core_v3_ContextParams_msginit,
+ &xds_core_v3_ContextParams_ParamsEntry_msginit,
+};
+
+static const char descriptor[288] = {'\n', ' ', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 'p', 'a', 'r',
+'a', 'm', 's', '.', 'p', 'r', 'o', 't', 'o', '\022', '\013', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\035', 'u',
+'d', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r',
+'o', 't', 'o', '\"', '\212', '\001', '\n', '\r', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'a', 'r', 'a', 'm', 's', '\022', '>', '\n', '\006',
+'p', 'a', 'r', 'a', 'm', 's', '\030', '\001', ' ', '\003', '(', '\013', '2', '&', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'a', 'r', 'a', 'm', 's', '.', 'P', 'a', 'r', 'a', 'm', 's', 'E', 'n', 't',
+'r', 'y', 'R', '\006', 'p', 'a', 'r', 'a', 'm', 's', '\032', '9', '\n', '\013', 'P', 'a', 'r', 'a', 'm', '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', 'B', ';', '\n', '\033', 'c', 'o',
+'m', '.', 'g', 'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3',
+'B', '\022', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'a', 'r', 'a', 'm', 's', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310',
+'\321', '\006', '\002', '\010', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[2] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init xds_core_v3_context_params_proto_upbdefinit = {
+ deps,
+ layouts,
+ "xds/core/v3/context_params.proto",
+ UPB_STRVIEW_INIT(descriptor, 288)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h
new file mode 100644
index 00000000000..e52928d418e
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/context_params.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_CONTEXT_PARAMS_PROTO_UPBDEFS_H_
+#define XDS_CORE_V3_CONTEXT_PARAMS_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_def_init xds_core_v3_context_params_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *xds_core_v3_ContextParams_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_context_params_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.ContextParams");
+}
+
+UPB_INLINE const upb_msgdef *xds_core_v3_ContextParams_ParamsEntry_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_context_params_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.ContextParams.ParamsEntry");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_CONTEXT_PARAMS_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c
new file mode 100644
index 00000000000..d299981d283
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c
@@ -0,0 +1,49 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "xds/core/v3/resource.upbdefs.h"
+
+extern upb_def_init google_protobuf_any_proto_upbdefinit;
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init xds_core_v3_resource_name_proto_upbdefinit;
+extern const upb_msglayout xds_core_v3_Resource_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &xds_core_v3_Resource_msginit,
+};
+
+static const char descriptor[332] = {'\n', '\032', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '.', 'p', 'r',
+'o', 't', 'o', '\022', '\013', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\031', 'g', 'o', 'o', 'g', 'l', 'e', '/',
+'p', 'r', 'o', 't', 'o', 'b', 'u', 'f', '/', 'a', 'n', 'y', '.', 'p', 'r', 'o', 't', 'o', '\032', '\035', 'u', 'd', 'p', 'a', '/',
+'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o', 't', 'o', '\032',
+'\037', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a', 'm',
+'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\205', '\001', '\n', '\010', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', '\022', '-', '\n', '\004', 'n',
+'a', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\013', '2', '\031', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R',
+'e', 's', 'o', 'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e', 'R', '\004', 'n', 'a', 'm', 'e', '\022', '\030', '\n', '\007', 'v', 'e', 'r', 's',
+'i', 'o', 'n', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\007', 'v', 'e', 'r', 's', 'i', 'o', 'n', '\022', '0', '\n', '\010', 'r', 'e', 's',
+'o', 'u', 'r', 'c', 'e', '\030', '\003', ' ', '\001', '(', '\013', '2', '\024', '.', 'g', 'o', 'o', 'g', 'l', 'e', '.', 'p', 'r', 'o', 't',
+'o', 'b', 'u', 'f', '.', 'A', 'n', 'y', 'R', '\010', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'B', '6', '\n', '\033', 'c', 'o', 'm',
+'.', 'g', 'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B',
+'\r', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200', '\310', '\321', '\006', '\002', '\010', '\001', 'b',
+'\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &google_protobuf_any_proto_upbdefinit,
+ &udpa_annotations_status_proto_upbdefinit,
+ &xds_core_v3_resource_name_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init xds_core_v3_resource_proto_upbdefinit = {
+ deps,
+ layouts,
+ "xds/core/v3/resource.proto",
+ UPB_STRVIEW_INIT(descriptor, 332)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h
new file mode 100644
index 00000000000..d508465eff1
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_RESOURCE_PROTO_UPBDEFS_H_
+#define XDS_CORE_V3_RESOURCE_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_def_init xds_core_v3_resource_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *xds_core_v3_Resource_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_resource_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.Resource");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_RESOURCE_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c
new file mode 100644
index 00000000000..fefa5a28cbf
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c
@@ -0,0 +1,67 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_locator.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "xds/core/v3/resource_locator.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init xds_core_v3_context_params_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout xds_core_v3_ResourceLocator_msginit;
+extern const upb_msglayout xds_core_v3_ResourceLocator_Directive_msginit;
+
+static const upb_msglayout *layouts[2] = {
+ &xds_core_v3_ResourceLocator_msginit,
+ &xds_core_v3_ResourceLocator_Directive_msginit,
+};
+
+static const char descriptor[739] = {'\n', '\"', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'l', 'o',
+'c', 'a', 't', 'o', 'r', '.', 'p', 'r', 'o', 't', 'o', '\022', '\013', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032',
+'\035', 'u', 'd', 'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.',
+'p', 'r', 'o', 't', 'o', '\032', ' ', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'n', 't', 'e', 'x',
+'t', '_', 'p', 'a', 'r', 'a', 'm', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/',
+'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\216', '\004', '\n', '\017', 'R', 'e', 's', 'o', 'u', 'r',
+'c', 'e', 'L', 'o', 'c', 'a', 't', 'o', 'r', '\022', 'E', '\n', '\006', 's', 'c', 'h', 'e', 'm', 'e', '\030', '\001', ' ', '\001', '(', '\016',
+'2', '#', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'L', 'o',
+'c', 'a', 't', 'o', 'r', '.', 'S', 'c', 'h', 'e', 'm', 'e', 'B', '\010', '\372', 'B', '\005', '\202', '\001', '\002', '\020', '\001', 'R', '\006', 's',
+'c', 'h', 'e', 'm', 'e', '\022', '\016', '\n', '\002', 'i', 'd', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\002', 'i', 'd', '\022', '\034', '\n', '\t',
+'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '\030', '\003', ' ', '\001', '(', '\t', 'R', '\t', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't',
+'y', '\022', ',', '\n', '\r', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 't', 'y', 'p', 'e', '\030', '\004', ' ', '\001', '(', '\t', 'B',
+'\007', '\372', 'B', '\004', 'r', '\002', '\020', '\001', 'R', '\014', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', '\022', 'A', '\n',
+'\r', 'e', 'x', 'a', 'c', 't', '_', 'c', 'o', 'n', 't', 'e', 'x', 't', '\030', '\005', ' ', '\001', '(', '\013', '2', '\032', '.', 'x', 'd',
+'s', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'a', 'r', 'a', 'm', 's', 'H', '\000',
+'R', '\014', 'e', 'x', 'a', 'c', 't', 'C', 'o', 'n', 't', 'e', 'x', 't', '\022', 'F', '\n', '\n', 'd', 'i', 'r', 'e', 'c', 't', 'i',
+'v', 'e', 's', '\030', '\006', ' ', '\003', '(', '\013', '2', '&', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '.', 'R',
+'e', 's', 'o', 'u', 'r', 'c', 'e', 'L', 'o', 'c', 'a', 't', 'o', 'r', '.', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'v', 'e', 'R',
+'\n', 'd', 'i', 'r', 'e', 'c', 't', 'i', 'v', 'e', 's', '\032', '\210', '\001', '\n', '\t', 'D', 'i', 'r', 'e', 'c', 't', 'i', 'v', 'e',
+'\022', '0', '\n', '\003', 'a', 'l', 't', '\030', '\001', ' ', '\001', '(', '\013', '2', '\034', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.',
+'v', '3', '.', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'L', 'o', 'c', 'a', 't', 'o', 'r', 'H', '\000', 'R', '\003', 'a', 'l', 't',
+'\022', '7', '\n', '\005', 'e', 'n', 't', 'r', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'B', '\037', '\372', 'B', '\034', 'r', '\032', '\020', '\001', '2',
+'\026', '^', '[', '0', '-', '9', 'a', '-', 'z', 'A', '-', 'Z', '_', '\\', '-', '\\', '.', '/', '~', ':', ']', '+', '$', 'H', '\000',
+'R', '\005', 'e', 'n', 't', 'r', 'y', 'B', '\020', '\n', '\t', 'd', 'i', 'r', 'e', 'c', 't', 'i', 'v', 'e', '\022', '\003', '\370', 'B', '\001',
+'\"', '\'', '\n', '\006', 'S', 'c', 'h', 'e', 'm', 'e', '\022', '\t', '\n', '\005', 'X', 'D', 'S', 'T', 'P', '\020', '\000', '\022', '\010', '\n', '\004',
+'H', 'T', 'T', 'P', '\020', '\001', '\022', '\010', '\n', '\004', 'F', 'I', 'L', 'E', '\020', '\002', 'B', '\031', '\n', '\027', 'c', 'o', 'n', 't', 'e',
+'x', 't', '_', 'p', 'a', 'r', 'a', 'm', '_', 's', 'p', 'e', 'c', 'i', 'f', 'i', 'e', 'r', 'B', '=', '\n', '\033', 'c', 'o', 'm',
+'.', 'g', 'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', 'B',
+'\024', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'L', 'o', 'c', 'a', 't', 'o', 'r', 'P', 'r', 'o', 't', 'o', 'P', '\001', '\272', '\200',
+'\310', '\321', '\006', '\002', '\010', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &xds_core_v3_context_params_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init xds_core_v3_resource_locator_proto_upbdefinit = {
+ deps,
+ layouts,
+ "xds/core/v3/resource_locator.proto",
+ UPB_STRVIEW_INIT(descriptor, 739)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h
new file mode 100644
index 00000000000..32e622a7342
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h
@@ -0,0 +1,40 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_locator.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_RESOURCE_LOCATOR_PROTO_UPBDEFS_H_
+#define XDS_CORE_V3_RESOURCE_LOCATOR_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_def_init xds_core_v3_resource_locator_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *xds_core_v3_ResourceLocator_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_resource_locator_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.ResourceLocator");
+}
+
+UPB_INLINE const upb_msgdef *xds_core_v3_ResourceLocator_Directive_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_resource_locator_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.ResourceLocator.Directive");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_RESOURCE_LOCATOR_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c
new file mode 100644
index 00000000000..7b27e3dbb10
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c
@@ -0,0 +1,50 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_name.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#include "upb/def.h"
+#include "xds/core/v3/resource_name.upbdefs.h"
+
+extern upb_def_init udpa_annotations_status_proto_upbdefinit;
+extern upb_def_init xds_core_v3_context_params_proto_upbdefinit;
+extern upb_def_init validate_validate_proto_upbdefinit;
+extern const upb_msglayout xds_core_v3_ResourceName_msginit;
+
+static const upb_msglayout *layouts[1] = {
+ &xds_core_v3_ResourceName_msginit,
+};
+
+static const char descriptor[367] = {'\n', '\037', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 'n', 'a',
+'m', 'e', '.', 'p', 'r', 'o', 't', 'o', '\022', '\013', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v', '3', '\032', '\035', 'u', 'd',
+'p', 'a', '/', 'a', 'n', 'n', 'o', 't', 'a', 't', 'i', 'o', 'n', 's', '/', 's', 't', 'a', 't', 'u', 's', '.', 'p', 'r', 'o',
+'t', 'o', '\032', ' ', 'x', 'd', 's', '/', 'c', 'o', 'r', 'e', '/', 'v', '3', '/', 'c', 'o', 'n', 't', 'e', 'x', 't', '_', 'p',
+'a', 'r', 'a', 'm', 's', '.', 'p', 'r', 'o', 't', 'o', '\032', '\027', 'v', 'a', 'l', 'i', 'd', 'a', 't', 'e', '/', 'v', 'a', 'l',
+'i', 'd', 'a', 't', 'e', '.', 'p', 'r', 'o', 't', 'o', '\"', '\240', '\001', '\n', '\014', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'N',
+'a', 'm', 'e', '\022', '\016', '\n', '\002', 'i', 'd', '\030', '\001', ' ', '\001', '(', '\t', 'R', '\002', 'i', 'd', '\022', '\034', '\n', '\t', 'a', 'u',
+'t', 'h', 'o', 'r', 'i', 't', 'y', '\030', '\002', ' ', '\001', '(', '\t', 'R', '\t', 'a', 'u', 't', 'h', 'o', 'r', 'i', 't', 'y', '\022',
+',', '\n', '\r', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', '_', 't', 'y', 'p', 'e', '\030', '\003', ' ', '\001', '(', '\t', 'B', '\007', '\372',
+'B', '\004', 'r', '\002', '\020', '\001', 'R', '\014', 'r', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'T', 'y', 'p', 'e', '\022', '4', '\n', '\007', 'c',
+'o', 'n', 't', 'e', 'x', 't', '\030', '\004', ' ', '\001', '(', '\013', '2', '\032', '.', 'x', 'd', 's', '.', 'c', 'o', 'r', 'e', '.', 'v',
+'3', '.', 'C', 'o', 'n', 't', 'e', 'x', 't', 'P', 'a', 'r', 'a', 'm', 's', 'R', '\007', 'c', 'o', 'n', 't', 'e', 'x', 't', 'B',
+':', '\n', '\033', 'c', 'o', 'm', '.', 'g', 'i', 't', 'h', 'u', 'b', '.', 'u', 'd', 'p', 'a', '.', 'x', 'd', 's', '.', 'c', 'o',
+'r', 'e', '.', 'v', '3', 'B', '\021', 'R', 'e', 's', 'o', 'u', 'r', 'c', 'e', 'N', 'a', 'm', 'e', 'P', 'r', 'o', 't', 'o', 'P',
+'\001', '\272', '\200', '\310', '\321', '\006', '\002', '\010', '\001', 'b', '\006', 'p', 'r', 'o', 't', 'o', '3',
+};
+
+static upb_def_init *deps[4] = {
+ &udpa_annotations_status_proto_upbdefinit,
+ &xds_core_v3_context_params_proto_upbdefinit,
+ &validate_validate_proto_upbdefinit,
+ NULL
+};
+
+upb_def_init xds_core_v3_resource_name_proto_upbdefinit = {
+ deps,
+ layouts,
+ "xds/core/v3/resource_name.proto",
+ UPB_STRVIEW_INIT(descriptor, 367)
+};
diff --git a/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h
new file mode 100644
index 00000000000..b52df0566c9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h
@@ -0,0 +1,35 @@
+/* This file was generated by upbc (the upb compiler) from the input
+ * file:
+ *
+ * xds/core/v3/resource_name.proto
+ *
+ * Do not edit -- your changes will be discarded when the file is
+ * regenerated. */
+
+#ifndef XDS_CORE_V3_RESOURCE_NAME_PROTO_UPBDEFS_H_
+#define XDS_CORE_V3_RESOURCE_NAME_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_def_init xds_core_v3_resource_name_proto_upbdefinit;
+
+UPB_INLINE const upb_msgdef *xds_core_v3_ResourceName_getmsgdef(upb_symtab *s) {
+ _upb_symtab_loaddefinit(s, &xds_core_v3_resource_name_proto_upbdefinit);
+ return upb_symtab_lookupmsg(s, "xds.core.v3.ResourceName");
+}
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#include "upb/port_undef.inc"
+
+#endif /* XDS_CORE_V3_RESOURCE_NAME_PROTO_UPBDEFS_H_ */
diff --git a/contrib/libs/grpc/src/core/ext/xds/certificate_provider_factory.h b/contrib/libs/grpc/src/core/ext/xds/certificate_provider_factory.h
index 244fdd9ff9d..af9085929c5 100644
--- a/contrib/libs/grpc/src/core/ext/xds/certificate_provider_factory.h
+++ b/contrib/libs/grpc/src/core/ext/xds/certificate_provider_factory.h
@@ -23,7 +23,7 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/json/json.h"
-#include "src/core/lib/security/certificate_provider.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
namespace grpc_core {
@@ -32,13 +32,15 @@ namespace grpc_core {
class CertificateProviderFactory {
public:
// Interface for configs for CertificateProviders.
- class Config {
+ class Config : public RefCounted<Config> {
public:
- virtual ~Config() = default;
+ ~Config() override = default;
// Name of the type of the CertificateProvider. Unique to each type of
// config.
virtual const char* name() const = 0;
+
+ virtual TString ToString() const = 0;
};
virtual ~CertificateProviderFactory() = default;
@@ -46,12 +48,12 @@ class CertificateProviderFactory {
// Name of the plugin.
virtual const char* name() const = 0;
- virtual std::unique_ptr<Config> CreateCertificateProviderConfig(
+ virtual RefCountedPtr<Config> CreateCertificateProviderConfig(
const Json& config_json, grpc_error** error) = 0;
// Create a CertificateProvider instance from config.
virtual RefCountedPtr<grpc_tls_certificate_provider>
- CreateCertificateProvider(std::unique_ptr<Config> config) = 0;
+ CreateCertificateProvider(RefCountedPtr<Config> config) = 0;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.cc b/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.cc
new file mode 100644
index 00000000000..cfa567c7863
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.cc
@@ -0,0 +1,87 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/certificate_provider_store.h"
+
+#include "src/core/ext/xds/certificate_provider_registry.h"
+
+namespace grpc_core {
+
+// If a certificate provider is created, the CertificateProviderStore
+// maintains a raw pointer to the created CertificateProviderWrapper so that
+// future calls to `CreateOrGetCertificateProvider()` with the same key result
+// in returning a ref to this created certificate provider. This entry is
+// deleted when the refcount to this provider reaches zero.
+RefCountedPtr<grpc_tls_certificate_provider>
+CertificateProviderStore::CreateOrGetCertificateProvider(
+ y_absl::string_view key) {
+ RefCountedPtr<CertificateProviderWrapper> result;
+ MutexLock lock(&mu_);
+ auto it = certificate_providers_map_.find(key);
+ if (it == certificate_providers_map_.end()) {
+ result = CreateCertificateProviderLocked(key);
+ if (result != nullptr) {
+ certificate_providers_map_.insert({result->key(), result.get()});
+ }
+ } else {
+ result = it->second->RefIfNonZero();
+ if (result == nullptr) {
+ result = CreateCertificateProviderLocked(key);
+ it->second = result.get();
+ }
+ }
+ return result;
+}
+
+RefCountedPtr<CertificateProviderStore::CertificateProviderWrapper>
+CertificateProviderStore::CreateCertificateProviderLocked(
+ y_absl::string_view key) {
+ auto plugin_config_it = plugin_config_map_.find(TString(key));
+ if (plugin_config_it == plugin_config_map_.end()) {
+ return nullptr;
+ }
+ CertificateProviderFactory* factory =
+ CertificateProviderRegistry::LookupCertificateProviderFactory(
+ plugin_config_it->second.plugin_name);
+ if (factory == nullptr) {
+ // This should never happen since an entry is only inserted in the
+ // plugin_config_map_ if the corresponding factory was found when parsing
+ // the xDS bootstrap file.
+ gpr_log(GPR_ERROR, "Certificate provider factory %s not found",
+ plugin_config_it->second.plugin_name.c_str());
+ return nullptr;
+ }
+ return MakeRefCounted<CertificateProviderWrapper>(
+ factory->CreateCertificateProvider(plugin_config_it->second.config),
+ Ref(), plugin_config_it->first);
+}
+
+void CertificateProviderStore::ReleaseCertificateProvider(
+ y_absl::string_view key, CertificateProviderWrapper* wrapper) {
+ MutexLock lock(&mu_);
+ auto it = certificate_providers_map_.find(key);
+ if (it != certificate_providers_map_.end()) {
+ if (it->second == wrapper) {
+ certificate_providers_map_.erase(it);
+ }
+ }
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.h b/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.h
new file mode 100644
index 00000000000..d374e982804
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/certificate_provider_store.h
@@ -0,0 +1,112 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_STORE_H
+#define GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_STORE_H
+
+#include <grpc/support/port_platform.h>
+
+#include <map>
+
+#include "y_absl/strings/string_view.h"
+
+#include "src/core/ext/xds/certificate_provider_factory.h"
+#include "src/core/lib/gprpp/orphanable.h"
+#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/gprpp/sync.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
+
+namespace grpc_core {
+
+// Map for xDS based grpc_tls_certificate_provider instances.
+class CertificateProviderStore
+ : public InternallyRefCounted<CertificateProviderStore> {
+ public:
+ struct PluginDefinition {
+ TString plugin_name;
+ RefCountedPtr<CertificateProviderFactory::Config> config;
+ };
+
+ // Maps plugin instance (opaque) name to plugin defition.
+ typedef std::map<TString, PluginDefinition> PluginDefinitionMap;
+
+ explicit CertificateProviderStore(PluginDefinitionMap plugin_config_map)
+ : plugin_config_map_(std::move(plugin_config_map)) {}
+
+ // If a certificate provider corresponding to the instance name \a key is
+ // found, a ref to the grpc_tls_certificate_provider is returned. If no
+ // provider is found for the key, a new provider is created from the plugin
+ // definition map.
+ // Returns nullptr on failure to get or create a new certificate provider.
+ RefCountedPtr<grpc_tls_certificate_provider> CreateOrGetCertificateProvider(
+ y_absl::string_view key);
+
+ void Orphan() override { Unref(); }
+
+ private:
+ // A thin wrapper around `grpc_tls_certificate_provider` which allows removing
+ // the entry from the CertificateProviderStore when the refcount reaches zero.
+ class CertificateProviderWrapper : public grpc_tls_certificate_provider {
+ public:
+ CertificateProviderWrapper(
+ RefCountedPtr<grpc_tls_certificate_provider> certificate_provider,
+ RefCountedPtr<CertificateProviderStore> store, y_absl::string_view key)
+ : certificate_provider_(std::move(certificate_provider)),
+ store_(std::move(store)),
+ key_(key) {}
+
+ ~CertificateProviderWrapper() override {
+ store_->ReleaseCertificateProvider(key_, this);
+ }
+
+ grpc_core::RefCountedPtr<grpc_tls_certificate_distributor> distributor()
+ const override {
+ return certificate_provider_->distributor();
+ }
+
+ grpc_pollset_set* interested_parties() const override {
+ return certificate_provider_->interested_parties();
+ }
+
+ y_absl::string_view key() const { return key_; }
+
+ private:
+ RefCountedPtr<grpc_tls_certificate_provider> certificate_provider_;
+ RefCountedPtr<CertificateProviderStore> store_;
+ y_absl::string_view key_;
+ };
+
+ RefCountedPtr<CertificateProviderWrapper> CreateCertificateProviderLocked(
+ y_absl::string_view key);
+
+ // Releases a previously created certificate provider from the certificate
+ // provider map if the value matches \a wrapper.
+ void ReleaseCertificateProvider(y_absl::string_view key,
+ CertificateProviderWrapper* wrapper);
+
+ Mutex mu_;
+ // Map of plugin configurations
+ PluginDefinitionMap plugin_config_map_;
+ // Underlying map for the providers.
+ std::map<y_absl::string_view, CertificateProviderWrapper*>
+ certificate_providers_map_;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_XDS_CERTIFICATE_PROVIDER_STORE_H
diff --git a/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.cc b/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.cc
new file mode 100644
index 00000000000..a10cfd261a7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.cc
@@ -0,0 +1,144 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/file_watcher_certificate_provider_factory.h"
+
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_join.h"
+
+#include "src/core/ext/xds/certificate_provider_registry.h"
+#include "src/core/lib/json/json_util.h"
+
+namespace grpc_core {
+
+namespace {
+
+const char* kFileWatcherPlugin = "file_watcher";
+
+} // namespace
+
+//
+// FileWatcherCertificateProviderFactory::Config
+//
+
+const char* FileWatcherCertificateProviderFactory::Config::name() const {
+ return kFileWatcherPlugin;
+}
+
+TString FileWatcherCertificateProviderFactory::Config::ToString() const {
+ std::vector<TString> parts;
+ parts.push_back("{");
+ if (!identity_cert_file_.empty()) {
+ parts.push_back(
+ y_absl::StrFormat("certificate_file=\"%s\", ", identity_cert_file_));
+ }
+ if (!identity_cert_file_.empty()) {
+ parts.push_back(
+ y_absl::StrFormat("private_key_file=\"%s\", ", private_key_file_));
+ }
+ if (!identity_cert_file_.empty()) {
+ parts.push_back(
+ y_absl::StrFormat("ca_certificate_file=\"%s\", ", root_cert_file_));
+ }
+ parts.push_back(
+ y_absl::StrFormat("refresh_interval=%ldms}", refresh_interval_ms_));
+ return y_absl::StrJoin(parts, "");
+}
+
+RefCountedPtr<FileWatcherCertificateProviderFactory::Config>
+FileWatcherCertificateProviderFactory::Config::Parse(const Json& config_json,
+ grpc_error** error) {
+ auto config = MakeRefCounted<FileWatcherCertificateProviderFactory::Config>();
+ if (config_json.type() != Json::Type::OBJECT) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "error:config type should be OBJECT.");
+ return nullptr;
+ }
+ std::vector<grpc_error*> error_list;
+ ParseJsonObjectField(config_json.object_value(), "certificate_file",
+ &config->identity_cert_file_, &error_list, false);
+ ParseJsonObjectField(config_json.object_value(), "private_key_file",
+ &config->private_key_file_, &error_list, false);
+ if (config->identity_cert_file_.empty() !=
+ config->private_key_file_.empty()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "fields \"certificate_file\" and \"private_key_file\" must be both set "
+ "or both unset."));
+ }
+ ParseJsonObjectField(config_json.object_value(), "ca_certificate_file",
+ &config->root_cert_file_, &error_list, false);
+ if (config->identity_cert_file_.empty() && config->root_cert_file_.empty()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "At least one of \"certificate_file\" and \"ca_certificate_file\" must "
+ "be specified."));
+ }
+ if (!ParseJsonObjectFieldAsDuration(
+ config_json.object_value(), "refresh_interval",
+ &config->refresh_interval_ms_, &error_list, false)) {
+ config->refresh_interval_ms_ = 10 * 60 * 1000; // 10 minutes default
+ }
+ if (!error_list.empty()) {
+ *error = GRPC_ERROR_CREATE_FROM_VECTOR(
+ "Error parsing file watcher certificate provider config", &error_list);
+ return nullptr;
+ }
+ return config;
+}
+
+//
+// FileWatcherCertificateProviderFactory
+//
+
+const char* FileWatcherCertificateProviderFactory::name() const {
+ return kFileWatcherPlugin;
+}
+
+RefCountedPtr<CertificateProviderFactory::Config>
+FileWatcherCertificateProviderFactory::CreateCertificateProviderConfig(
+ const Json& config_json, grpc_error** error) {
+ return FileWatcherCertificateProviderFactory::Config::Parse(config_json,
+ error);
+}
+
+RefCountedPtr<grpc_tls_certificate_provider>
+FileWatcherCertificateProviderFactory::CreateCertificateProvider(
+ RefCountedPtr<CertificateProviderFactory::Config> config) {
+ if (config->name() != name()) {
+ gpr_log(GPR_ERROR, "Wrong config type Actual:%s vs Expected:%s",
+ config->name(), name());
+ return nullptr;
+ }
+ auto* file_watcher_config =
+ static_cast<FileWatcherCertificateProviderFactory::Config*>(config.get());
+ return MakeRefCounted<FileWatcherCertificateProvider>(
+ file_watcher_config->private_key_file(),
+ file_watcher_config->identity_cert_file(),
+ file_watcher_config->root_cert_file(),
+ file_watcher_config->refresh_interval_ms() / GPR_MS_PER_SEC);
+}
+
+void FileWatcherCertificateProviderInit() {
+ CertificateProviderRegistry::RegisterCertificateProviderFactory(
+ y_absl::make_unique<FileWatcherCertificateProviderFactory>());
+}
+
+void FileWatcherCertificateProviderShutdown() {}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.h b/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.h
new file mode 100644
index 00000000000..1d636f118c0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/file_watcher_certificate_provider_factory.h
@@ -0,0 +1,69 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPC_CORE_EXT_XDS_FILE_WATCHER_CERTIFICATE_PROVIDER_FACTORY_H
+#define GRPC_CORE_EXT_XDS_FILE_WATCHER_CERTIFICATE_PROVIDER_FACTORY_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/certificate_provider_factory.h"
+
+namespace grpc_core {
+
+class FileWatcherCertificateProviderFactory
+ : public CertificateProviderFactory {
+ public:
+ class Config : public CertificateProviderFactory::Config {
+ public:
+ static RefCountedPtr<Config> Parse(const Json& config_json,
+ grpc_error** error);
+
+ const char* name() const override;
+
+ TString ToString() const override;
+
+ const TString& identity_cert_file() const {
+ return identity_cert_file_;
+ }
+
+ const TString& private_key_file() const { return private_key_file_; }
+
+ const TString& root_cert_file() const { return root_cert_file_; }
+
+ grpc_millis refresh_interval_ms() const { return refresh_interval_ms_; }
+
+ private:
+ TString identity_cert_file_;
+ TString private_key_file_;
+ TString root_cert_file_;
+ grpc_millis refresh_interval_ms_;
+ };
+
+ const char* name() const override;
+
+ RefCountedPtr<CertificateProviderFactory::Config>
+ CreateCertificateProviderConfig(const Json& config_json,
+ grpc_error** error) override;
+
+ RefCountedPtr<grpc_tls_certificate_provider> CreateCertificateProvider(
+ RefCountedPtr<CertificateProviderFactory::Config> config) override;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_XDS_FILE_WATCHER_CERTIFICATE_PROVIDER_FACTORY_H
diff --git a/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc b/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc
deleted file mode 100644
index ba927697b37..00000000000
--- a/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc
+++ /dev/null
@@ -1,377 +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 <grpc/support/port_platform.h>
-
-#include "src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h"
-
-#include <sstream>
-#include <type_traits>
-
-#include "y_absl/strings/str_cat.h"
-
-#include <grpc/support/string_util.h>
-
-#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/json/json_util.h"
-
-namespace grpc_core {
-
-namespace {
-
-const char* kMeshCaPlugin = "meshCA";
-
-//
-// Helper functions for extracting types from JSON
-//
-template <typename NumericType, typename ErrorVectorType>
-bool ExtractJsonType(const Json& json, const TString& field_name,
- NumericType* output, ErrorVectorType* error_list) {
- static_assert(std::is_integral<NumericType>::value, "Integral required");
- if (json.type() != Json::Type::NUMBER) {
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:type should be NUMBER")
- .c_str()));
- return false;
- }
- std::istringstream ss(json.string_value());
- ss >> *output;
- // The JSON parsing API should have dealt with parsing errors, but check
- // anyway
- if (GPR_UNLIKELY(ss.bad())) {
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:failed to parse.").c_str()));
- return false;
- }
- return true;
-}
-
-template <typename ErrorVectorType>
-bool ExtractJsonType(const Json& json, const TString& field_name,
- bool* output, ErrorVectorType* error_list) {
- switch (json.type()) {
- case Json::Type::JSON_TRUE:
- *output = true;
- return true;
- case Json::Type::JSON_FALSE:
- *output = false;
- return true;
- default:
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:type should be BOOLEAN")
- .c_str()));
- return false;
- }
-}
-
-template <typename ErrorVectorType>
-bool ExtractJsonType(const Json& json, const TString& field_name,
- TString* output, ErrorVectorType* error_list) {
- if (json.type() != Json::Type::STRING) {
- *output = "";
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:type should be STRING")
- .c_str()));
- return false;
- }
- *output = json.string_value();
- return true;
-}
-
-template <typename ErrorVectorType>
-bool ExtractJsonType(const Json& json, const TString& field_name,
- const Json::Array** output, ErrorVectorType* error_list) {
- if (json.type() != Json::Type::ARRAY) {
- *output = nullptr;
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:type should be ARRAY")
- .c_str()));
- return false;
- }
- *output = &json.array_value();
- return true;
-}
-
-template <typename ErrorVectorType>
-bool ExtractJsonType(const Json& json, const TString& field_name,
- const Json::Object** output, ErrorVectorType* error_list) {
- if (json.type() != Json::Type::OBJECT) {
- *output = nullptr;
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:type should be OBJECT")
- .c_str()));
- return false;
- }
- *output = &json.object_value();
- return true;
-}
-
-template <typename ErrorVectorType>
-bool ExtractJsonType(const Json& json, const TString& field_name,
- grpc_millis* output, ErrorVectorType* error_list) {
- if (!ParseDurationFromJson(json, output)) {
- *output = GRPC_MILLIS_INF_PAST;
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name,
- " error:type should be STRING of the form given by "
- "google.proto.Duration.")
- .c_str()));
- return false;
- }
- return true;
-}
-
-template <typename T, typename ErrorVectorType>
-bool ParseJsonObjectField(const Json::Object& object,
- const TString& field_name, T* output,
- ErrorVectorType* error_list, bool optional = false) {
- auto it = object.find(field_name);
- if (it == object.end()) {
- if (!optional) {
- error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("field:", field_name, " error:does not exist.")
- .c_str()));
- }
- return false;
- }
- auto& child_object_json = it->second;
- return ExtractJsonType(child_object_json, field_name, output, error_list);
-}
-
-} // namespace
-
-//
-// GoogleMeshCaCertificateProviderFactory::Config
-//
-
-const char* GoogleMeshCaCertificateProviderFactory::Config::name() const {
- return kMeshCaPlugin;
-}
-
-std::vector<grpc_error*>
-GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectStsService(
- const Json::Object& sts_service) {
- std::vector<grpc_error*> error_list_sts_service;
- if (!ParseJsonObjectField(sts_service, "token_exchange_service_uri",
- &sts_config_.token_exchange_service_uri,
- &error_list_sts_service, true)) {
- sts_config_.token_exchange_service_uri =
- "securetoken.googleapis.com"; // default
- }
- ParseJsonObjectField(sts_service, "resource", &sts_config_.resource,
- &error_list_sts_service, true);
- ParseJsonObjectField(sts_service, "audience", &sts_config_.audience,
- &error_list_sts_service, true);
- if (!ParseJsonObjectField(sts_service, "scope", &sts_config_.scope,
- &error_list_sts_service, true)) {
- sts_config_.scope =
- "https://www.googleapis.com/auth/cloud-platform"; // default
- }
- ParseJsonObjectField(sts_service, "requested_token_type",
- &sts_config_.requested_token_type,
- &error_list_sts_service, true);
- ParseJsonObjectField(sts_service, "subject_token_path",
- &sts_config_.subject_token_path,
- &error_list_sts_service);
- ParseJsonObjectField(sts_service, "subject_token_type",
- &sts_config_.subject_token_type,
- &error_list_sts_service);
- ParseJsonObjectField(sts_service, "actor_token_path",
- &sts_config_.actor_token_path, &error_list_sts_service,
- true);
- ParseJsonObjectField(sts_service, "actor_token_type",
- &sts_config_.actor_token_type, &error_list_sts_service,
- true);
- return error_list_sts_service;
-}
-
-std::vector<grpc_error*>
-GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectCallCredentials(
- const Json::Object& call_credentials) {
- std::vector<grpc_error*> error_list_call_credentials;
- const Json::Object* sts_service = nullptr;
- if (ParseJsonObjectField(call_credentials, "sts_service", &sts_service,
- &error_list_call_credentials)) {
- std::vector<grpc_error*> error_list_sts_service =
- ParseJsonObjectStsService(*sts_service);
- if (!error_list_sts_service.empty()) {
- error_list_call_credentials.push_back(GRPC_ERROR_CREATE_FROM_VECTOR(
- "field:sts_service", &error_list_sts_service));
- }
- }
- return error_list_call_credentials;
-}
-
-std::vector<grpc_error*>
-GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectGoogleGrpc(
- const Json::Object& google_grpc) {
- std::vector<grpc_error*> error_list_google_grpc;
- if (!ParseJsonObjectField(google_grpc, "target_uri", &endpoint_,
- &error_list_google_grpc, true)) {
- endpoint_ = "meshca.googleapis.com"; // Default target
- }
- const Json::Array* call_credentials_array = nullptr;
- if (ParseJsonObjectField(google_grpc, "call_credentials",
- &call_credentials_array, &error_list_google_grpc)) {
- if (call_credentials_array->size() != 1) {
- error_list_google_grpc.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:call_credentials error:Need exactly one entry."));
- } else {
- const Json::Object* call_credentials = nullptr;
- if (ExtractJsonType((*call_credentials_array)[0], "call_credentials[0]",
- &call_credentials, &error_list_google_grpc)) {
- std::vector<grpc_error*> error_list_call_credentials =
- ParseJsonObjectCallCredentials(*call_credentials);
- if (!error_list_call_credentials.empty()) {
- error_list_google_grpc.push_back(GRPC_ERROR_CREATE_FROM_VECTOR(
- "field:call_credentials", &error_list_call_credentials));
- }
- }
- }
- }
-
- return error_list_google_grpc;
-}
-
-std::vector<grpc_error*>
-GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectGrpcServices(
- const Json::Object& grpc_service) {
- std::vector<grpc_error*> error_list_grpc_services;
- const Json::Object* google_grpc = nullptr;
- if (ParseJsonObjectField(grpc_service, "google_grpc", &google_grpc,
- &error_list_grpc_services)) {
- std::vector<grpc_error*> error_list_google_grpc =
- ParseJsonObjectGoogleGrpc(*google_grpc);
- if (!error_list_google_grpc.empty()) {
- error_list_grpc_services.push_back(GRPC_ERROR_CREATE_FROM_VECTOR(
- "field:google_grpc", &error_list_google_grpc));
- }
- }
- if (!ParseJsonObjectField(grpc_service, "timeout", &timeout_,
- &error_list_grpc_services, true)) {
- timeout_ = 10 * 1000; // 10sec default
- }
- return error_list_grpc_services;
-}
-
-std::vector<grpc_error*>
-GoogleMeshCaCertificateProviderFactory::Config::ParseJsonObjectServer(
- const Json::Object& server) {
- std::vector<grpc_error*> error_list_server;
- TString api_type;
- if (ParseJsonObjectField(server, "api_type", &api_type, &error_list_server,
- true)) {
- if (api_type != "GRPC") {
- error_list_server.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:api_type error:Only GRPC is supported"));
- }
- }
- const Json::Array* grpc_services = nullptr;
- if (ParseJsonObjectField(server, "grpc_services", &grpc_services,
- &error_list_server)) {
- if (grpc_services->size() != 1) {
- error_list_server.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:grpc_services error:Need exactly one entry"));
- } else {
- const Json::Object* grpc_service = nullptr;
- if (ExtractJsonType((*grpc_services)[0], "grpc_services[0]",
- &grpc_service, &error_list_server)) {
- std::vector<grpc_error*> error_list_grpc_services =
- ParseJsonObjectGrpcServices(*grpc_service);
- if (!error_list_grpc_services.empty()) {
- error_list_server.push_back(GRPC_ERROR_CREATE_FROM_VECTOR(
- "field:grpc_services", &error_list_grpc_services));
- }
- }
- }
- }
- return error_list_server;
-}
-
-std::unique_ptr<GoogleMeshCaCertificateProviderFactory::Config>
-GoogleMeshCaCertificateProviderFactory::Config::Parse(const Json& config_json,
- grpc_error** error) {
- auto config =
- y_absl::make_unique<GoogleMeshCaCertificateProviderFactory::Config>();
- if (config_json.type() != Json::Type::OBJECT) {
- *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "error:config type should be OBJECT.");
- return nullptr;
- }
- std::vector<grpc_error*> error_list;
- const Json::Object* server = nullptr;
- if (ParseJsonObjectField(config_json.object_value(), "server", &server,
- &error_list)) {
- std::vector<grpc_error*> error_list_server =
- config->ParseJsonObjectServer(*server);
- if (!error_list_server.empty()) {
- error_list.push_back(
- GRPC_ERROR_CREATE_FROM_VECTOR("field:server", &error_list_server));
- }
- }
- if (!ParseJsonObjectField(config_json.object_value(), "certificate_lifetime",
- &config->certificate_lifetime_, &error_list,
- true)) {
- config->certificate_lifetime_ = 24 * 60 * 60 * 1000; // 24hrs default
- }
- if (!ParseJsonObjectField(config_json.object_value(), "renewal_grace_period",
- &config->renewal_grace_period_, &error_list,
- true)) {
- config->renewal_grace_period_ = 12 * 60 * 60 * 1000; // 12hrs default
- }
- TString key_type;
- if (ParseJsonObjectField(config_json.object_value(), "key_type", &key_type,
- &error_list, true)) {
- if (key_type != "RSA") {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "field:key_type error:Only RSA is supported."));
- }
- }
- if (!ParseJsonObjectField(config_json.object_value(), "key_size",
- &config->key_size_, &error_list, true)) {
- config->key_size_ = 2048; // default 2048 bit key size
- }
- if (!ParseJsonObjectField(config_json.object_value(), "location",
- &config->location_, &error_list, true)) {
- // GCE/GKE Metadata server needs to be contacted to get the value.
- }
- if (!error_list.empty()) {
- *error = GRPC_ERROR_CREATE_FROM_VECTOR(
- "Error parsing google Mesh CA config", &error_list);
- return nullptr;
- }
- return config;
-}
-
-//
-// GoogleMeshCaCertificateProviderFactory
-//
-
-const char* GoogleMeshCaCertificateProviderFactory::name() const {
- return kMeshCaPlugin;
-}
-
-std::unique_ptr<CertificateProviderFactory::Config>
-GoogleMeshCaCertificateProviderFactory::CreateCertificateProviderConfig(
- const Json& config_json, grpc_error** error) {
- return GoogleMeshCaCertificateProviderFactory::Config::Parse(config_json,
- error);
-}
-
-} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h b/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h
deleted file mode 100644
index fe256747367..00000000000
--- a/contrib/libs/grpc/src/core/ext/xds/google_mesh_ca_certificate_provider_factory.h
+++ /dev/null
@@ -1,102 +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.
-//
-//
-
-#ifndef GRPC_CORE_EXT_XDS_GOOGLE_MESH_CA_CERTIFICATE_PROVIDER_FACTORY_H
-#define GRPC_CORE_EXT_XDS_GOOGLE_MESH_CA_CERTIFICATE_PROVIDER_FACTORY_H
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/ext/xds/certificate_provider_factory.h"
-#include "src/core/lib/backoff/backoff.h"
-#include "src/core/lib/gprpp/ref_counted.h"
-
-namespace grpc_core {
-
-class GoogleMeshCaCertificateProviderFactory
- : public CertificateProviderFactory {
- public:
- class Config : public CertificateProviderFactory::Config {
- public:
- struct StsConfig {
- TString token_exchange_service_uri;
- TString resource;
- TString audience;
- TString scope;
- TString requested_token_type;
- TString subject_token_path;
- TString subject_token_type;
- TString actor_token_path;
- TString actor_token_type;
- };
-
- const char* name() const override;
-
- const TString& endpoint() const { return endpoint_; }
-
- const StsConfig& sts_config() const { return sts_config_; }
-
- grpc_millis timeout() const { return timeout_; }
-
- grpc_millis certificate_lifetime() const { return certificate_lifetime_; }
-
- grpc_millis renewal_grace_period() const { return renewal_grace_period_; }
-
- uint32_t key_size() const { return key_size_; }
-
- const TString& location() const { return location_; }
-
- static std::unique_ptr<Config> Parse(const Json& config_json,
- grpc_error** error);
-
- private:
- // Helpers for parsing the config
- std::vector<grpc_error*> ParseJsonObjectStsService(
- const Json::Object& sts_service);
- std::vector<grpc_error*> ParseJsonObjectCallCredentials(
- const Json::Object& call_credentials);
- std::vector<grpc_error*> ParseJsonObjectGoogleGrpc(
- const Json::Object& google_grpc);
- std::vector<grpc_error*> ParseJsonObjectGrpcServices(
- const Json::Object& grpc_service);
- std::vector<grpc_error*> ParseJsonObjectServer(const Json::Object& server);
-
- TString endpoint_;
- StsConfig sts_config_;
- grpc_millis timeout_;
- grpc_millis certificate_lifetime_;
- grpc_millis renewal_grace_period_;
- uint32_t key_size_;
- TString location_;
- };
-
- const char* name() const override;
-
- std::unique_ptr<CertificateProviderFactory::Config>
- CreateCertificateProviderConfig(const Json& config_json,
- grpc_error** error) override;
-
- RefCountedPtr<grpc_tls_certificate_provider> CreateCertificateProvider(
- std::unique_ptr<CertificateProviderFactory::Config> config) override {
- // TODO(yashykt) : To be implemented
- return nullptr;
- }
-};
-
-} // namespace grpc_core
-
-#endif // GRPC_CORE_EXT_XDS_GOOGLE_MESH_CA_CERTIFICATE_PROVIDER_FACTORY_H
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_api.cc b/contrib/libs/grpc/src/core/ext/xds/xds_api.cc
index 1abaf15f01f..b314f2ce2f1 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_api.cc
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_api.cc
@@ -28,42 +28,48 @@
#include "y_absl/strings/str_format.h"
#include "y_absl/strings/str_join.h"
#include "y_absl/strings/str_split.h"
-
-#include "upb/upb.hpp"
-
-#include <grpc/impl/codegen/log.h>
-#include <grpc/support/alloc.h>
-#include <grpc/support/string_util.h>
-
-#include "src/core/ext/xds/xds_api.h"
-#include "src/core/lib/gpr/env.h"
-#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gpr/useful.h"
-#include "src/core/lib/iomgr/error.h"
-#include "src/core/lib/iomgr/sockaddr_utils.h"
-
+#include "envoy/admin/v3/config_dump.upb.h"
#include "envoy/config/cluster/v3/circuit_breaker.upb.h"
#include "envoy/config/cluster/v3/cluster.upb.h"
+#include "envoy/config/cluster/v3/cluster.upbdefs.h"
#include "envoy/config/core/v3/address.upb.h"
#include "envoy/config/core/v3/base.upb.h"
+#include "envoy/config/core/v3/base.upbdefs.h"
#include "envoy/config/core/v3/config_source.upb.h"
#include "envoy/config/core/v3/health_check.upb.h"
+#include "envoy/config/core/v3/protocol.upb.h"
#include "envoy/config/endpoint/v3/endpoint.upb.h"
+#include "envoy/config/endpoint/v3/endpoint.upbdefs.h"
#include "envoy/config/endpoint/v3/endpoint_components.upb.h"
#include "envoy/config/endpoint/v3/load_report.upb.h"
#include "envoy/config/listener/v3/api_listener.upb.h"
#include "envoy/config/listener/v3/listener.upb.h"
+#include "envoy/config/listener/v3/listener.upbdefs.h"
+#include "envoy/config/listener/v3/listener_components.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"
+#include "envoy/config/route/v3/route_components.upbdefs.h"
+#include "envoy/extensions/clusters/aggregate/v3/cluster.upb.h"
+#include "envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h"
#include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h"
+#include "envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h"
#include "envoy/extensions/transport_sockets/tls/v3/common.upb.h"
#include "envoy/extensions/transport_sockets/tls/v3/tls.upb.h"
+#include "envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h"
#include "envoy/service/cluster/v3/cds.upb.h"
+#include "envoy/service/cluster/v3/cds.upbdefs.h"
#include "envoy/service/discovery/v3/discovery.upb.h"
+#include "envoy/service/discovery/v3/discovery.upbdefs.h"
#include "envoy/service/endpoint/v3/eds.upb.h"
+#include "envoy/service/endpoint/v3/eds.upbdefs.h"
#include "envoy/service/listener/v3/lds.upb.h"
#include "envoy/service/load_stats/v3/lrs.upb.h"
+#include "envoy/service/load_stats/v3/lrs.upbdefs.h"
#include "envoy/service/route/v3/rds.upb.h"
+#include "envoy/service/route/v3/rds.upbdefs.h"
+#include "envoy/service/status/v3/csds.upb.h"
+#include "envoy/service/status/v3/csds.upbdefs.h"
#include "envoy/type/matcher/v3/regex.upb.h"
#include "envoy/type/matcher/v3/string.upb.h"
#include "envoy/type/v3/percent.upb.h"
@@ -71,158 +77,141 @@
#include "google/protobuf/any.upb.h"
#include "google/protobuf/duration.upb.h"
#include "google/protobuf/struct.upb.h"
+#include "google/protobuf/timestamp.upb.h"
#include "google/protobuf/wrappers.upb.h"
#include "google/rpc/status.upb.h"
+#include "udpa/type/v1/typed_struct.upb.h"
+#include "upb/text_encode.h"
#include "upb/upb.h"
+#include "upb/upb.hpp"
+
+#include <grpc/impl/codegen/log.h>
+#include <grpc/support/alloc.h>
+#include <grpc/support/string_util.h>
+
+#include "src/core/ext/xds/xds_api.h"
+#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/gprpp/host_port.h"
+#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/iomgr/socket_utils.h"
+#include "src/core/lib/slice/slice_utils.h"
namespace grpc_core {
+// TODO(donnadionne): Check to see if cluster types aggregate_cluster and
+// logical_dns are enabled, this will be
+// removed once the cluster types are fully integration-tested and enabled by
+// default.
+bool XdsAggregateAndLogicalDnsClusterEnabled() {
+ char* value = gpr_getenv(
+ "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER");
+ bool parsed_value;
+ bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value);
+ gpr_free(value);
+ return parse_succeeded && parsed_value;
+}
+
+// TODO(donnadionne): Check to see if ring hash policy is enabled, this will be
+// removed once ring hash policy is fully integration-tested and enabled by
+// default.
+bool XdsRingHashEnabled() {
+ char* value = gpr_getenv("GRPC_XDS_EXPERIMENTAL_ENABLE_RING_HASH");
+ bool parsed_value;
+ bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value);
+ gpr_free(value);
+ return parse_succeeded && parsed_value;
+}
+
+// TODO(yashykt): Check to see if xDS security is enabled. This will be
+// removed once this feature is fully integration-tested and enabled by
+// default.
+bool XdsSecurityEnabled() {
+ char* value = gpr_getenv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT");
+ bool parsed_value;
+ bool parse_succeeded = gpr_parse_bool_value(value, &parsed_value);
+ gpr_free(value);
+ return parse_succeeded && parsed_value;
+}
+
//
-// XdsApi::Route::Matchers::PathMatcher
+// XdsApi::Route::HashPolicy
//
-XdsApi::Route::Matchers::PathMatcher::PathMatcher(const PathMatcher& other)
- : type(other.type) {
- if (type == PathMatcherType::REGEX) {
- regex_matcher = y_absl::make_unique<RE2>(other.regex_matcher->pattern());
- } else {
- string_matcher = other.string_matcher;
+XdsApi::Route::HashPolicy::HashPolicy(const HashPolicy& other)
+ : type(other.type),
+ header_name(other.header_name),
+ regex_substitution(other.regex_substitution) {
+ if (other.regex != nullptr) {
+ regex =
+ y_absl::make_unique<RE2>(other.regex->pattern(), other.regex->options());
}
}
-XdsApi::Route::Matchers::PathMatcher& XdsApi::Route::Matchers::PathMatcher::
-operator=(const PathMatcher& other) {
+XdsApi::Route::HashPolicy& XdsApi::Route::HashPolicy::operator=(
+ const HashPolicy& other) {
type = other.type;
- if (type == PathMatcherType::REGEX) {
- regex_matcher = y_absl::make_unique<RE2>(other.regex_matcher->pattern());
- } else {
- string_matcher = other.string_matcher;
+ header_name = other.header_name;
+ if (other.regex != nullptr) {
+ regex =
+ y_absl::make_unique<RE2>(other.regex->pattern(), other.regex->options());
}
+ regex_substitution = other.regex_substitution;
return *this;
}
-bool XdsApi::Route::Matchers::PathMatcher::operator==(
- const PathMatcher& other) const {
- if (type != other.type) return false;
- if (type == PathMatcherType::REGEX) {
- // Should never be null.
- if (regex_matcher == nullptr || other.regex_matcher == nullptr) {
- return false;
- }
- return regex_matcher->pattern() == other.regex_matcher->pattern();
- }
- return string_matcher == other.string_matcher;
-}
+XdsApi::Route::HashPolicy::HashPolicy(HashPolicy&& other) noexcept
+ : type(other.type),
+ header_name(std::move(other.header_name)),
+ regex(std::move(other.regex)),
+ regex_substitution(std::move(other.regex_substitution)) {}
-TString XdsApi::Route::Matchers::PathMatcher::ToString() const {
- TString path_type_string;
- switch (type) {
- case PathMatcherType::PATH:
- path_type_string = "path match";
- break;
- case PathMatcherType::PREFIX:
- path_type_string = "prefix match";
- break;
- case PathMatcherType::REGEX:
- path_type_string = "regex match";
- break;
- default:
- break;
- }
- return y_absl::StrFormat("Path %s:%s", path_type_string,
- type == PathMatcherType::REGEX
- ? regex_matcher->pattern()
- : string_matcher);
-}
-
-//
-// XdsApi::Route::Matchers::HeaderMatcher
-//
-
-XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcher(
- const HeaderMatcher& other)
- : name(other.name), type(other.type), invert_match(other.invert_match) {
- switch (type) {
- case HeaderMatcherType::REGEX:
- regex_match = y_absl::make_unique<RE2>(other.regex_match->pattern());
- break;
- case HeaderMatcherType::RANGE:
- range_start = other.range_start;
- range_end = other.range_end;
- break;
- case HeaderMatcherType::PRESENT:
- present_match = other.present_match;
- break;
- default:
- string_matcher = other.string_matcher;
- }
-}
-
-XdsApi::Route::Matchers::HeaderMatcher& XdsApi::Route::Matchers::HeaderMatcher::
-operator=(const HeaderMatcher& other) {
- name = other.name;
+XdsApi::Route::HashPolicy& XdsApi::Route::HashPolicy::operator=(
+ HashPolicy&& other) noexcept {
type = other.type;
- invert_match = other.invert_match;
- switch (type) {
- case HeaderMatcherType::REGEX:
- regex_match = y_absl::make_unique<RE2>(other.regex_match->pattern());
- break;
- case HeaderMatcherType::RANGE:
- range_start = other.range_start;
- range_end = other.range_end;
- break;
- case HeaderMatcherType::PRESENT:
- present_match = other.present_match;
- break;
- default:
- string_matcher = other.string_matcher;
- }
+ header_name = std::move(other.header_name);
+ regex = std::move(other.regex);
+ regex_substitution = std::move(other.regex_substitution);
return *this;
}
-bool XdsApi::Route::Matchers::HeaderMatcher::operator==(
- const HeaderMatcher& other) const {
- if (name != other.name) return false;
+bool XdsApi::Route::HashPolicy::HashPolicy::operator==(
+ const HashPolicy& other) const {
if (type != other.type) return false;
- if (invert_match != other.invert_match) return false;
- switch (type) {
- case HeaderMatcherType::REGEX:
- return regex_match->pattern() != other.regex_match->pattern();
- case HeaderMatcherType::RANGE:
- return range_start != other.range_start && range_end != other.range_end;
- case HeaderMatcherType::PRESENT:
- return present_match != other.present_match;
- default:
- return string_matcher != other.string_matcher;
+ if (type == Type::HEADER) {
+ if (regex == nullptr) {
+ if (other.regex != nullptr) return false;
+ } else {
+ if (other.regex == nullptr) return false;
+ return header_name == other.header_name &&
+ regex->pattern() == other.regex->pattern() &&
+ regex_substitution == other.regex_substitution;
+ }
}
+ return true;
}
-TString XdsApi::Route::Matchers::HeaderMatcher::ToString() const {
+TString XdsApi::Route::HashPolicy::ToString() const {
+ std::vector<TString> contents;
switch (type) {
- case HeaderMatcherType::EXACT:
- return y_absl::StrFormat("Header exact match:%s %s:%s",
- invert_match ? " not" : "", name, string_matcher);
- case HeaderMatcherType::REGEX:
- return y_absl::StrFormat("Header regex match:%s %s:%s",
- invert_match ? " not" : "", name,
- regex_match->pattern());
- case HeaderMatcherType::RANGE:
- return y_absl::StrFormat("Header range match:%s %s:[%d, %d)",
- invert_match ? " not" : "", name, range_start,
- range_end);
- case HeaderMatcherType::PRESENT:
- return y_absl::StrFormat("Header present match:%s %s:%s",
- invert_match ? " not" : "", name,
- present_match ? "true" : "false");
- case HeaderMatcherType::PREFIX:
- return y_absl::StrFormat("Header prefix match:%s %s:%s",
- invert_match ? " not" : "", name, string_matcher);
- case HeaderMatcherType::SUFFIX:
- return y_absl::StrFormat("Header suffix match:%s %s:%s",
- invert_match ? " not" : "", name, string_matcher);
- default:
- return "";
+ case Type::HEADER:
+ contents.push_back("type=HEADER");
+ break;
+ case Type::CHANNEL_ID:
+ contents.push_back("type=CHANNEL_ID");
+ break;
}
+ contents.push_back(
+ y_absl::StrFormat("terminal=%s", terminal ? "true" : "false"));
+ if (type == Type::HEADER) {
+ contents.push_back(y_absl::StrFormat(
+ "Header %s:/%s/%s", header_name,
+ (regex == nullptr) ? "" : regex->pattern(), regex_substitution));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
}
//
@@ -231,7 +220,8 @@ TString XdsApi::Route::Matchers::HeaderMatcher::ToString() const {
TString XdsApi::Route::Matchers::ToString() const {
std::vector<TString> contents;
- contents.push_back(path_matcher.ToString());
+ contents.push_back(
+ y_absl::StrFormat("PathMatcher{%s}", path_matcher.ToString()));
for (const HeaderMatcher& header_matcher : header_matchers) {
contents.push_back(header_matcher.ToString());
}
@@ -243,18 +233,46 @@ TString XdsApi::Route::Matchers::ToString() const {
}
TString XdsApi::Route::ClusterWeight::ToString() const {
- return y_absl::StrFormat("{cluster=%s, weight=%d}", name, weight);
+ std::vector<TString> contents;
+ contents.push_back(y_absl::StrCat("cluster=", name));
+ contents.push_back(y_absl::StrCat("weight=", weight));
+ if (!typed_per_filter_config.empty()) {
+ std::vector<TString> parts;
+ for (const auto& p : typed_per_filter_config) {
+ const TString& key = p.first;
+ const auto& config = p.second;
+ parts.push_back(y_absl::StrCat(key, "=", config.ToString()));
+ }
+ contents.push_back(y_absl::StrCat("typed_per_filter_config={",
+ y_absl::StrJoin(parts, ", "), "}"));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
}
TString XdsApi::Route::ToString() const {
std::vector<TString> contents;
contents.push_back(matchers.ToString());
+ for (const HashPolicy& hash_policy : hash_policies) {
+ contents.push_back(y_absl::StrCat("hash_policy=", hash_policy.ToString()));
+ }
if (!cluster_name.empty()) {
contents.push_back(y_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());
+ }
+ if (!typed_per_filter_config.empty()) {
+ contents.push_back("typed_per_filter_config={");
+ for (const auto& p : typed_per_filter_config) {
+ const TString& name = p.first;
+ const auto& config = p.second;
+ contents.push_back(y_absl::StrCat(" ", name, "=", config.ToString()));
+ }
+ contents.push_back("}");
+ }
return y_absl::StrJoin(contents, "\n");
}
@@ -277,6 +295,14 @@ TString XdsApi::RdsUpdate::ToString() const {
vhosts.push_back("\n }\n");
}
vhosts.push_back(" ]\n");
+ vhosts.push_back(" typed_per_filter_config={\n");
+ for (const auto& p : vhost.typed_per_filter_config) {
+ const TString& name = p.first;
+ const auto& config = p.second;
+ vhosts.push_back(
+ y_absl::StrCat(" ", name, "=", config.ToString(), "\n"));
+ }
+ vhosts.push_back(" }\n");
vhosts.push_back("]\n");
}
return y_absl::StrJoin(vhosts, "");
@@ -294,9 +320,11 @@ enum MatchType {
};
// Returns true if match succeeds.
-bool DomainMatch(MatchType match_type, TString domain_pattern,
- TString expected_host_name) {
+bool DomainMatch(MatchType match_type, const TString& domain_pattern_in,
+ const TString& expected_host_name_in) {
// Normalize the args to lower-case. Domain matching is case-insensitive.
+ TString domain_pattern = domain_pattern_in;
+ TString expected_host_name = expected_host_name_in;
std::transform(domain_pattern.cbegin(), domain_pattern.cend(),
domain_pattern.begin(),
[](unsigned char c) { return std::tolower(c); });
@@ -379,41 +407,312 @@ XdsApi::RdsUpdate::VirtualHost* XdsApi::RdsUpdate::FindVirtualHostForDomain(
}
//
-// XdsApi::StringMatcher
+// XdsApi::CommonTlsContext::CertificateValidationContext
//
-XdsApi::StringMatcher::StringMatcher(const StringMatcher& other)
- : type(other.type) {
- switch (type) {
- case StringMatcherType::SAFE_REGEX:
- regex_match = y_absl::make_unique<RE2>(other.regex_match->pattern());
- break;
- default:
- string_matcher = other.string_matcher;
+TString XdsApi::CommonTlsContext::CertificateValidationContext::ToString()
+ const {
+ std::vector<TString> contents;
+ for (const auto& match : match_subject_alt_names) {
+ contents.push_back(match.ToString());
}
+ return y_absl::StrFormat("{match_subject_alt_names=[%s]}",
+ y_absl::StrJoin(contents, ", "));
}
-XdsApi::StringMatcher& XdsApi::StringMatcher::operator=(
- const StringMatcher& other) {
- type = other.type;
- switch (type) {
- case StringMatcherType::SAFE_REGEX:
- regex_match = y_absl::make_unique<RE2>(other.regex_match->pattern());
- break;
- default:
- string_matcher = other.string_matcher;
+bool XdsApi::CommonTlsContext::CertificateValidationContext::Empty() const {
+ return match_subject_alt_names.empty();
+}
+
+//
+// XdsApi::CommonTlsContext::CertificateValidationContext
+//
+
+TString XdsApi::CommonTlsContext::CertificateProviderInstance::ToString()
+ const {
+ y_absl::InlinedVector<TString, 2> contents;
+ if (!instance_name.empty()) {
+ contents.push_back(y_absl::StrFormat("instance_name=%s", instance_name));
}
- return *this;
+ if (!certificate_name.empty()) {
+ contents.push_back(
+ y_absl::StrFormat("certificate_name=%s", certificate_name));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
}
-bool XdsApi::StringMatcher::operator==(const StringMatcher& other) const {
- if (type != other.type) return false;
- switch (type) {
- case StringMatcherType::SAFE_REGEX:
- return regex_match->pattern() != other.regex_match->pattern();
- default:
- return string_matcher != other.string_matcher;
+bool XdsApi::CommonTlsContext::CertificateProviderInstance::Empty() const {
+ return instance_name.empty() && certificate_name.empty();
+}
+
+//
+// XdsApi::CommonTlsContext::CombinedCertificateValidationContext
+//
+
+TString
+XdsApi::CommonTlsContext::CombinedCertificateValidationContext::ToString()
+ const {
+ y_absl::InlinedVector<TString, 2> contents;
+ if (!default_validation_context.Empty()) {
+ contents.push_back(y_absl::StrFormat("default_validation_context=%s",
+ default_validation_context.ToString()));
+ }
+ if (!validation_context_certificate_provider_instance.Empty()) {
+ contents.push_back(y_absl::StrFormat(
+ "validation_context_certificate_provider_instance=%s",
+ validation_context_certificate_provider_instance.ToString()));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
+}
+
+bool XdsApi::CommonTlsContext::CombinedCertificateValidationContext::Empty()
+ const {
+ return default_validation_context.Empty() &&
+ validation_context_certificate_provider_instance.Empty();
+}
+
+//
+// XdsApi::CommonTlsContext
+//
+
+TString XdsApi::CommonTlsContext::ToString() const {
+ y_absl::InlinedVector<TString, 2> contents;
+ if (!tls_certificate_certificate_provider_instance.Empty()) {
+ contents.push_back(y_absl::StrFormat(
+ "tls_certificate_certificate_provider_instance=%s",
+ tls_certificate_certificate_provider_instance.ToString()));
+ }
+ if (!combined_validation_context.Empty()) {
+ contents.push_back(y_absl::StrFormat("combined_validation_context=%s",
+ combined_validation_context.ToString()));
}
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
+}
+
+bool XdsApi::CommonTlsContext::Empty() const {
+ return tls_certificate_certificate_provider_instance.Empty() &&
+ combined_validation_context.Empty();
+}
+
+//
+// XdsApi::DownstreamTlsContext
+//
+
+TString XdsApi::DownstreamTlsContext::ToString() const {
+ return y_absl::StrFormat("common_tls_context=%s, require_client_certificate=%s",
+ common_tls_context.ToString(),
+ require_client_certificate ? "true" : "false");
+}
+
+bool XdsApi::DownstreamTlsContext::Empty() const {
+ return common_tls_context.Empty();
+}
+
+//
+// XdsApi::LdsUpdate::HttpConnectionManager
+//
+
+TString XdsApi::LdsUpdate::HttpConnectionManager::ToString() const {
+ y_absl::InlinedVector<TString, 4> contents;
+ contents.push_back(y_absl::StrFormat(
+ "route_config_name=%s",
+ !route_config_name.empty() ? route_config_name.c_str() : "<inlined>"));
+ contents.push_back(y_absl::StrFormat("http_max_stream_duration=%s",
+ http_max_stream_duration.ToString()));
+ if (rds_update.has_value()) {
+ contents.push_back(
+ y_absl::StrFormat("rds_update=%s", rds_update->ToString()));
+ }
+ if (!http_filters.empty()) {
+ std::vector<TString> filter_strings;
+ for (const auto& http_filter : http_filters) {
+ filter_strings.push_back(http_filter.ToString());
+ }
+ contents.push_back(y_absl::StrCat("http_filters=[",
+ y_absl::StrJoin(filter_strings, ", "), "]"));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
+}
+
+//
+// XdsApi::LdsUpdate::HttpFilter
+//
+
+TString XdsApi::LdsUpdate::HttpConnectionManager::HttpFilter::ToString()
+ const {
+ return y_absl::StrCat("{name=", name, ", config=", config.ToString(), "}");
+}
+
+//
+// XdsApi::LdsUpdate::FilterChainData
+//
+
+TString XdsApi::LdsUpdate::FilterChainData::ToString() const {
+ return y_absl::StrCat(
+ "{downstream_tls_context=", downstream_tls_context.ToString(),
+ " http_connection_manager=", http_connection_manager.ToString(), "}");
+}
+
+//
+// XdsApi::LdsUpdate::FilterChainMap::CidrRange
+//
+
+TString XdsApi::LdsUpdate::FilterChainMap::CidrRange::ToString() const {
+ return y_absl::StrCat(
+ "{address_prefix=", grpc_sockaddr_to_string(&address, false),
+ ", prefix_len=", prefix_len, "}");
+}
+
+//
+// FilterChain
+//
+
+struct FilterChain {
+ struct FilterChainMatch {
+ uint32_t destination_port = 0;
+ std::vector<XdsApi::LdsUpdate::FilterChainMap::CidrRange> prefix_ranges;
+ XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType source_type =
+ XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType::kAny;
+ std::vector<XdsApi::LdsUpdate::FilterChainMap::CidrRange>
+ source_prefix_ranges;
+ std::vector<uint32_t> source_ports;
+ std::vector<TString> server_names;
+ TString transport_protocol;
+ std::vector<TString> application_protocols;
+
+ TString ToString() const;
+ } filter_chain_match;
+
+ std::shared_ptr<XdsApi::LdsUpdate::FilterChainData> filter_chain_data;
+};
+
+TString FilterChain::FilterChainMatch::ToString() const {
+ y_absl::InlinedVector<TString, 8> contents;
+ if (destination_port != 0) {
+ contents.push_back(y_absl::StrCat("destination_port=", destination_port));
+ }
+ if (!prefix_ranges.empty()) {
+ std::vector<TString> prefix_ranges_content;
+ for (const auto& range : prefix_ranges) {
+ prefix_ranges_content.push_back(range.ToString());
+ }
+ contents.push_back(y_absl::StrCat(
+ "prefix_ranges={", y_absl::StrJoin(prefix_ranges_content, ", "), "}"));
+ }
+ if (source_type == XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType::
+ kSameIpOrLoopback) {
+ contents.push_back("source_type=SAME_IP_OR_LOOPBACK");
+ } else if (source_type == XdsApi::LdsUpdate::FilterChainMap::
+ ConnectionSourceType::kExternal) {
+ contents.push_back("source_type=EXTERNAL");
+ }
+ if (!source_prefix_ranges.empty()) {
+ std::vector<TString> source_prefix_ranges_content;
+ for (const auto& range : source_prefix_ranges) {
+ source_prefix_ranges_content.push_back(range.ToString());
+ }
+ contents.push_back(
+ y_absl::StrCat("source_prefix_ranges={",
+ y_absl::StrJoin(source_prefix_ranges_content, ", "), "}"));
+ }
+ if (!source_ports.empty()) {
+ contents.push_back(
+ y_absl::StrCat("source_ports={", y_absl::StrJoin(source_ports, ", "), "}"));
+ }
+ if (!server_names.empty()) {
+ contents.push_back(
+ y_absl::StrCat("server_names={", y_absl::StrJoin(server_names, ", "), "}"));
+ }
+ if (!transport_protocol.empty()) {
+ contents.push_back(y_absl::StrCat("transport_protocol=", transport_protocol));
+ }
+ if (!application_protocols.empty()) {
+ contents.push_back(y_absl::StrCat("application_protocols={",
+ y_absl::StrJoin(application_protocols, ", "),
+ "}"));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
+}
+
+//
+// XdsApi::LdsUpdate::FilterChainMap
+//
+
+TString XdsApi::LdsUpdate::FilterChainMap::ToString() const {
+ std::vector<TString> contents;
+ for (const auto& destination_ip : destination_ip_vector) {
+ for (int source_type = 0; source_type < 3; ++source_type) {
+ for (const auto& source_ip :
+ destination_ip.source_types_array[source_type]) {
+ for (const auto& source_port_pair : source_ip.ports_map) {
+ FilterChain::FilterChainMatch filter_chain_match;
+ if (destination_ip.prefix_range.has_value()) {
+ filter_chain_match.prefix_ranges.push_back(
+ *destination_ip.prefix_range);
+ }
+ filter_chain_match.source_type = static_cast<
+ XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType>(
+ source_type);
+ if (source_ip.prefix_range.has_value()) {
+ filter_chain_match.source_prefix_ranges.push_back(
+ *source_ip.prefix_range);
+ }
+ if (source_port_pair.first != 0) {
+ filter_chain_match.source_ports.push_back(source_port_pair.first);
+ }
+ contents.push_back(y_absl::StrCat(
+ "{filter_chain_match=", filter_chain_match.ToString(),
+ ", filter_chain=", source_port_pair.second.data->ToString(),
+ "}"));
+ }
+ }
+ }
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
+}
+
+//
+// XdsApi::LdsUpdate
+//
+
+TString XdsApi::LdsUpdate::ToString() const {
+ y_absl::InlinedVector<TString, 4> contents;
+ if (type == ListenerType::kTcpListener) {
+ contents.push_back(y_absl::StrCat("address=", address));
+ contents.push_back(
+ y_absl::StrCat("filter_chain_map=", filter_chain_map.ToString()));
+ if (default_filter_chain.has_value()) {
+ contents.push_back(y_absl::StrCat("default_filter_chain=",
+ default_filter_chain->ToString()));
+ }
+ } else if (type == ListenerType::kHttpApiListener) {
+ contents.push_back(y_absl::StrFormat("http_connection_manager=%s",
+ http_connection_manager.ToString()));
+ }
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
+}
+
+//
+// XdsApi::CdsUpdate
+//
+
+TString XdsApi::CdsUpdate::ToString() const {
+ y_absl::InlinedVector<TString, 4> contents;
+ if (!eds_service_name.empty()) {
+ contents.push_back(
+ y_absl::StrFormat("eds_service_name=%s", eds_service_name));
+ }
+ if (!common_tls_context.Empty()) {
+ contents.push_back(y_absl::StrFormat("common_tls_context=%s",
+ common_tls_context.ToString()));
+ }
+ if (lrs_load_reporting_server_name.has_value()) {
+ contents.push_back(y_absl::StrFormat("lrs_load_reporting_server_name=%s",
+ lrs_load_reporting_server_name.value()));
+ }
+ contents.push_back(
+ y_absl::StrFormat("max_concurrent_requests=%d", max_concurrent_requests));
+ return y_absl::StrCat("{", y_absl::StrJoin(contents, ", "), "}");
}
//
@@ -508,8 +807,13 @@ const char* kCdsV2TypeUrl = "type.googleapis.com/envoy.api.v2.Cluster";
const char* kEdsV2TypeUrl =
"type.googleapis.com/envoy.api.v2.ClusterLoadAssignment";
-bool IsLds(y_absl::string_view type_url) {
- return type_url == XdsApi::kLdsTypeUrl || type_url == kLdsV2TypeUrl;
+bool IsLds(y_absl::string_view type_url, bool* is_v2 = nullptr) {
+ if (type_url == XdsApi::kLdsTypeUrl) return true;
+ if (type_url == kLdsV2TypeUrl) {
+ if (is_v2 != nullptr) *is_v2 = true;
+ return true;
+ }
+ return false;
}
bool IsRds(y_absl::string_view type_url) {
@@ -527,46 +831,73 @@ bool IsEds(y_absl::string_view type_url) {
} // namespace
XdsApi::XdsApi(XdsClient* client, TraceFlag* tracer,
- const XdsBootstrap* bootstrap)
+ const XdsBootstrap::Node* node)
: client_(client),
tracer_(tracer),
- use_v3_(bootstrap != nullptr && bootstrap->server().ShouldUseV3()),
- bootstrap_(bootstrap),
+ node_(node),
build_version_(y_absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING, " ",
grpc_version_string())),
- user_agent_name_(y_absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING)) {}
+ user_agent_name_(y_absl::StrCat("gRPC C-core ", GPR_PLATFORM_STRING)) {
+ // Populate upb symtab with xDS proto messages that we want to print
+ // properly in logs.
+ // Note: This won't actually work properly until upb adds support for
+ // Any fields in textproto printing (internal b/178821188).
+ envoy_config_listener_v3_Listener_getmsgdef(symtab_.ptr());
+ envoy_config_route_v3_RouteConfiguration_getmsgdef(symtab_.ptr());
+ envoy_config_cluster_v3_Cluster_getmsgdef(symtab_.ptr());
+ envoy_extensions_clusters_aggregate_v3_ClusterConfig_getmsgdef(symtab_.ptr());
+ envoy_config_cluster_v3_Cluster_getmsgdef(symtab_.ptr());
+ envoy_config_endpoint_v3_ClusterLoadAssignment_getmsgdef(symtab_.ptr());
+ envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_getmsgdef(
+ symtab_.ptr());
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_getmsgdef(
+ symtab_.ptr());
+ // Load HTTP filter proto messages into the upb symtab.
+ XdsHttpFilterRegistry::PopulateSymtab(symtab_.ptr());
+}
namespace {
+struct EncodingContext {
+ XdsClient* client;
+ TraceFlag* tracer;
+ upb_symtab* symtab;
+ upb_arena* arena;
+ bool use_v3;
+};
+
// Works for both TString and y_absl::string_view.
template <typename T>
inline upb_strview StdStringToUpbString(const T& str) {
return upb_strview_make(str.data(), str.size());
}
-void PopulateMetadataValue(upb_arena* arena, google_protobuf_Value* value_pb,
- const Json& value);
+void PopulateMetadataValue(const EncodingContext& context,
+ google_protobuf_Value* value_pb, const Json& value);
-void PopulateListValue(upb_arena* arena, google_protobuf_ListValue* list_value,
+void PopulateListValue(const EncodingContext& context,
+ google_protobuf_ListValue* list_value,
const Json::Array& values) {
for (const auto& value : values) {
- auto* value_pb = google_protobuf_ListValue_add_values(list_value, arena);
- PopulateMetadataValue(arena, value_pb, value);
+ auto* value_pb =
+ google_protobuf_ListValue_add_values(list_value, context.arena);
+ PopulateMetadataValue(context, value_pb, value);
}
}
-void PopulateMetadata(upb_arena* arena, google_protobuf_Struct* metadata_pb,
+void PopulateMetadata(const EncodingContext& context,
+ google_protobuf_Struct* metadata_pb,
const Json::Object& metadata) {
for (const auto& p : metadata) {
- google_protobuf_Value* value = google_protobuf_Value_new(arena);
- PopulateMetadataValue(arena, value, p.second);
+ google_protobuf_Value* value = google_protobuf_Value_new(context.arena);
+ PopulateMetadataValue(context, value, p.second);
google_protobuf_Struct_fields_set(
- metadata_pb, StdStringToUpbString(p.first), value, arena);
+ metadata_pb, StdStringToUpbString(p.first), value, context.arena);
}
}
-void PopulateMetadataValue(upb_arena* arena, google_protobuf_Value* value_pb,
- const Json& value) {
+void PopulateMetadataValue(const EncodingContext& context,
+ google_protobuf_Value* value_pb, const Json& value) {
switch (value.type()) {
case Json::Type::JSON_NULL:
google_protobuf_Value_set_null_value(value_pb, 0);
@@ -587,14 +918,14 @@ void PopulateMetadataValue(upb_arena* arena, google_protobuf_Value* value_pb,
break;
case Json::Type::OBJECT: {
google_protobuf_Struct* struct_value =
- google_protobuf_Value_mutable_struct_value(value_pb, arena);
- PopulateMetadata(arena, struct_value, value.object_value());
+ google_protobuf_Value_mutable_struct_value(value_pb, context.arena);
+ PopulateMetadata(context, struct_value, value.object_value());
break;
}
case Json::Type::ARRAY: {
google_protobuf_ListValue* list_value =
- google_protobuf_Value_mutable_list_value(value_pb, arena);
- PopulateListValue(arena, list_value, value.array_value());
+ google_protobuf_Value_mutable_list_value(value_pb, context.arena);
+ PopulateListValue(context, list_value, value.array_value());
break;
}
}
@@ -621,7 +952,8 @@ TString EncodeStringField(uint32_t field_number, const TString& str) {
EncodeVarint(str.size()) + str;
}
-void PopulateBuildVersion(upb_arena* arena, envoy_config_core_v3_Node* node_msg,
+void PopulateBuildVersion(const EncodingContext& context,
+ envoy_config_core_v3_Node* node_msg,
const TString& build_version) {
TString encoded_build_version = EncodeStringField(5, build_version);
// TODO(roth): This should use upb_msg_addunknown(), but that API is
@@ -629,14 +961,14 @@ void PopulateBuildVersion(upb_arena* arena, envoy_config_core_v3_Node* node_msg,
// API for now. Change this once we upgrade to a version of upb that
// fixes this bug.
_upb_msg_addunknown(node_msg, encoded_build_version.data(),
- encoded_build_version.size(), arena);
+ encoded_build_version.size(), context.arena);
}
-void PopulateNode(upb_arena* arena, const XdsBootstrap* bootstrap,
+void PopulateNode(const EncodingContext& context,
+ const XdsBootstrap::Node* node,
const TString& build_version,
const TString& user_agent_name,
envoy_config_core_v3_Node* node_msg) {
- const XdsBootstrap::Node* node = bootstrap->node();
if (node != nullptr) {
if (!node->id.empty()) {
envoy_config_core_v3_Node_set_id(node_msg,
@@ -648,13 +980,13 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap* bootstrap,
}
if (!node->metadata.object_value().empty()) {
google_protobuf_Struct* metadata =
- envoy_config_core_v3_Node_mutable_metadata(node_msg, arena);
- PopulateMetadata(arena, metadata, node->metadata.object_value());
+ envoy_config_core_v3_Node_mutable_metadata(node_msg, context.arena);
+ PopulateMetadata(context, metadata, node->metadata.object_value());
}
if (!node->locality_region.empty() || !node->locality_zone.empty() ||
- !node->locality_subzone.empty()) {
+ !node->locality_sub_zone.empty()) {
envoy_config_core_v3_Locality* locality =
- envoy_config_core_v3_Node_mutable_locality(node_msg, arena);
+ envoy_config_core_v3_Node_mutable_locality(node_msg, context.arena);
if (!node->locality_region.empty()) {
envoy_config_core_v3_Locality_set_region(
locality, StdStringToUpbString(node->locality_region));
@@ -663,14 +995,14 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap* bootstrap,
envoy_config_core_v3_Locality_set_zone(
locality, StdStringToUpbString(node->locality_zone));
}
- if (!node->locality_subzone.empty()) {
+ if (!node->locality_sub_zone.empty()) {
envoy_config_core_v3_Locality_set_sub_zone(
- locality, StdStringToUpbString(node->locality_subzone));
+ locality, StdStringToUpbString(node->locality_sub_zone));
}
}
}
- if (!bootstrap->server().ShouldUseV3()) {
- PopulateBuildVersion(arena, node_msg, build_version);
+ if (!context.use_v3) {
+ PopulateBuildVersion(context, node_msg, build_version);
}
envoy_config_core_v3_Node_set_user_agent_name(
node_msg, StdStringToUpbString(user_agent_name));
@@ -678,7 +1010,7 @@ void PopulateNode(upb_arena* arena, const XdsBootstrap* bootstrap,
node_msg, upb_strview_makez(grpc_version_string()));
envoy_config_core_v3_Node_add_client_features(
node_msg, upb_strview_makez("envoy.lb.does_not_support_overprovisioning"),
- arena);
+ context.arena);
}
inline y_absl::string_view UpbStringToAbsl(const upb_strview& str) {
@@ -689,180 +1021,26 @@ inline TString UpbStringToStdString(const upb_strview& str) {
return TString(str.data, str.size);
}
-inline void AddStringField(const char* name, const upb_strview& value,
- std::vector<TString>* fields,
- bool add_if_empty = false) {
- if (value.size > 0 || add_if_empty) {
- fields->emplace_back(
- y_absl::StrCat(name, ": \"", UpbStringToAbsl(value), "\""));
- }
-}
-
-inline void AddUInt32ValueField(const char* name,
- const google_protobuf_UInt32Value* value,
- std::vector<TString>* fields) {
- if (value != nullptr) {
- fields->emplace_back(y_absl::StrCat(
- name, " { value: ", google_protobuf_UInt32Value_value(value), " }"));
- }
-}
-
-inline void AddLocalityField(int indent_level,
- const envoy_config_core_v3_Locality* locality,
- std::vector<TString>* fields) {
- TString indent =
- y_absl::StrJoin(std::vector<TString>(indent_level, " "), "");
- // region
- TString field = y_absl::StrCat(indent, "region");
- AddStringField(field.c_str(), envoy_config_core_v3_Locality_region(locality),
- fields);
- // zone
- field = y_absl::StrCat(indent, "zone");
- AddStringField(field.c_str(), envoy_config_core_v3_Locality_zone(locality),
- fields);
- // sub_zone
- field = y_absl::StrCat(indent, "sub_zone");
- AddStringField(field.c_str(),
- envoy_config_core_v3_Locality_sub_zone(locality), fields);
-}
-
-void AddNodeLogFields(const envoy_config_core_v3_Node* node,
- const TString& build_version,
- std::vector<TString>* fields) {
- fields->emplace_back("node {");
- // id
- AddStringField(" id", envoy_config_core_v3_Node_id(node), fields);
- // metadata
- const google_protobuf_Struct* metadata =
- envoy_config_core_v3_Node_metadata(node);
- if (metadata != nullptr) {
- fields->emplace_back(" metadata {");
- size_t entry_idx = UPB_MAP_BEGIN;
- while (true) {
- const google_protobuf_Struct_FieldsEntry* entry =
- google_protobuf_Struct_fields_next(metadata, &entry_idx);
- if (entry == nullptr) break;
- fields->emplace_back(" field {");
- // key
- AddStringField(" key", google_protobuf_Struct_FieldsEntry_key(entry),
- fields);
- // value
- const google_protobuf_Value* value =
- google_protobuf_Struct_FieldsEntry_value(entry);
- if (value != nullptr) {
- TString value_str;
- if (google_protobuf_Value_has_string_value(value)) {
- value_str = y_absl::StrCat(
- "string_value: \"",
- UpbStringToAbsl(google_protobuf_Value_string_value(value)), "\"");
- } else if (google_protobuf_Value_has_null_value(value)) {
- value_str = "null_value: NULL_VALUE";
- } else if (google_protobuf_Value_has_number_value(value)) {
- value_str = y_absl::StrCat("double_value: ",
- google_protobuf_Value_number_value(value));
- } else if (google_protobuf_Value_has_bool_value(value)) {
- value_str = y_absl::StrCat("bool_value: ",
- google_protobuf_Value_bool_value(value));
- } else if (google_protobuf_Value_has_struct_value(value)) {
- value_str = "struct_value: <not printed>";
- } else if (google_protobuf_Value_has_list_value(value)) {
- value_str = "list_value: <not printed>";
- } else {
- value_str = "<unknown>";
- }
- fields->emplace_back(y_absl::StrCat(" value { ", value_str, " }"));
- }
- fields->emplace_back(" }");
- }
- fields->emplace_back(" }");
- }
- // locality
- const envoy_config_core_v3_Locality* locality =
- envoy_config_core_v3_Node_locality(node);
- if (locality != nullptr) {
- fields->emplace_back(" locality {");
- AddLocalityField(2, locality, fields);
- fields->emplace_back(" }");
- }
- // build_version (doesn't exist in v3 proto; this is a horrible hack)
- if (!build_version.empty()) {
- fields->emplace_back(
- y_absl::StrCat(" build_version: \"", build_version, "\""));
- }
- // user_agent_name
- AddStringField(" user_agent_name",
- envoy_config_core_v3_Node_user_agent_name(node), fields);
- // user_agent_version
- AddStringField(" user_agent_version",
- envoy_config_core_v3_Node_user_agent_version(node), fields);
- // client_features
- size_t num_client_features;
- const upb_strview* client_features =
- envoy_config_core_v3_Node_client_features(node, &num_client_features);
- for (size_t i = 0; i < num_client_features; ++i) {
- AddStringField(" client_features", client_features[i], fields);
- }
- fields->emplace_back("}");
-}
-
void MaybeLogDiscoveryRequest(
- XdsClient* client, TraceFlag* tracer,
- const envoy_service_discovery_v3_DiscoveryRequest* request,
- const TString& build_version) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer) &&
+ const EncodingContext& context,
+ const envoy_service_discovery_v3_DiscoveryRequest* request) {
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
- // TODO(roth): When we can upgrade upb, use upb textformat code to dump
- // the raw proto instead of doing this manually.
- std::vector<TString> fields;
- // version_info
- AddStringField(
- "version_info",
- envoy_service_discovery_v3_DiscoveryRequest_version_info(request),
- &fields);
- // node
- const envoy_config_core_v3_Node* node =
- envoy_service_discovery_v3_DiscoveryRequest_node(request);
- if (node != nullptr) AddNodeLogFields(node, build_version, &fields);
- // resource_names
- size_t num_resource_names;
- const upb_strview* resource_names =
- envoy_service_discovery_v3_DiscoveryRequest_resource_names(
- request, &num_resource_names);
- for (size_t i = 0; i < num_resource_names; ++i) {
- AddStringField("resource_names", resource_names[i], &fields);
- }
- // type_url
- AddStringField(
- "type_url",
- envoy_service_discovery_v3_DiscoveryRequest_type_url(request), &fields);
- // response_nonce
- AddStringField(
- "response_nonce",
- envoy_service_discovery_v3_DiscoveryRequest_response_nonce(request),
- &fields);
- // error_detail
- const struct google_rpc_Status* error_detail =
- envoy_service_discovery_v3_DiscoveryRequest_error_detail(request);
- if (error_detail != nullptr) {
- fields.emplace_back("error_detail {");
- // code
- int32_t code = google_rpc_Status_code(error_detail);
- if (code != 0) fields.emplace_back(y_absl::StrCat(" code: ", code));
- // message
- AddStringField(" message", google_rpc_Status_message(error_detail),
- &fields);
- fields.emplace_back("}");
- }
- gpr_log(GPR_DEBUG, "[xds_client %p] constructed ADS request: %s", client,
- y_absl::StrJoin(fields, "\n").c_str());
+ const upb_msgdef* msg_type =
+ envoy_service_discovery_v3_DiscoveryRequest_getmsgdef(context.symtab);
+ char buf[10240];
+ upb_text_encode(request, msg_type, nullptr, 0, buf, sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] constructed ADS request: %s",
+ context.client, buf);
}
}
grpc_slice SerializeDiscoveryRequest(
- upb_arena* arena, envoy_service_discovery_v3_DiscoveryRequest* request) {
+ const EncodingContext& context,
+ envoy_service_discovery_v3_DiscoveryRequest* request) {
size_t output_length;
char* output = envoy_service_discovery_v3_DiscoveryRequest_serialize(
- request, arena, &output_length);
+ request, context.arena, &output_length);
return grpc_slice_from_copied_buffer(output, output_length);
}
@@ -888,17 +1066,19 @@ y_absl::string_view TypeUrlExternalToInternal(bool use_v3,
} // namespace
grpc_slice XdsApi::CreateAdsRequest(
- const TString& type_url,
+ const XdsBootstrap::XdsServer& server, const TString& type_url,
const std::set<y_absl::string_view>& resource_names,
const TString& version, const TString& nonce, grpc_error* error,
bool populate_node) {
upb::Arena arena;
+ const EncodingContext context = {client_, tracer_, symtab_.ptr(), arena.ptr(),
+ server.ShouldUseV3()};
// Create a request.
envoy_service_discovery_v3_DiscoveryRequest* request =
envoy_service_discovery_v3_DiscoveryRequest_new(arena.ptr());
// Set type_url.
y_absl::string_view real_type_url =
- TypeUrlExternalToInternal(use_v3_, type_url);
+ TypeUrlExternalToInternal(server.ShouldUseV3(), type_url);
envoy_service_discovery_v3_DiscoveryRequest_set_type_url(
request, StdStringToUpbString(real_type_url));
// Set version_info.
@@ -913,17 +1093,18 @@ grpc_slice XdsApi::CreateAdsRequest(
}
// Set error_detail if it's a NACK.
if (error != GRPC_ERROR_NONE) {
- grpc_slice error_description_slice;
- GPR_ASSERT(grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION,
- &error_description_slice));
- upb_strview error_description_strview =
- upb_strview_make(reinterpret_cast<const char*>(
- GPR_SLICE_START_PTR(error_description_slice)),
- GPR_SLICE_LENGTH(error_description_slice));
google_rpc_Status* error_detail =
envoy_service_discovery_v3_DiscoveryRequest_mutable_error_detail(
request, arena.ptr());
- google_rpc_Status_set_message(error_detail, error_description_strview);
+ // Hard-code INVALID_ARGUMENT as the status code.
+ // TODO(roth): If at some point we decide we care about this value,
+ // we could attach a status code to the individual errors where we
+ // generate them in the parsing code, and then use that here.
+ google_rpc_Status_set_code(error_detail, GRPC_STATUS_INVALID_ARGUMENT);
+ // Error description comes from the error that was passed in.
+ upb_strview error_description =
+ StdStringToUpbString(y_absl::string_view(grpc_error_string(error)));
+ google_rpc_Status_set_message(error_detail, error_description);
GRPC_ERROR_UNREF(error);
}
// Populate node.
@@ -931,401 +1112,106 @@ grpc_slice XdsApi::CreateAdsRequest(
envoy_config_core_v3_Node* node_msg =
envoy_service_discovery_v3_DiscoveryRequest_mutable_node(request,
arena.ptr());
- PopulateNode(arena.ptr(), bootstrap_, build_version_, user_agent_name_,
- node_msg);
+ PopulateNode(context, node_, build_version_, user_agent_name_, node_msg);
}
// Add resource_names.
for (const auto& resource_name : resource_names) {
envoy_service_discovery_v3_DiscoveryRequest_add_resource_names(
request, StdStringToUpbString(resource_name), arena.ptr());
}
- MaybeLogDiscoveryRequest(client_, tracer_, request, build_version_);
- return SerializeDiscoveryRequest(arena.ptr(), request);
+ MaybeLogDiscoveryRequest(context, request);
+ return SerializeDiscoveryRequest(context, request);
}
namespace {
void MaybeLogDiscoveryResponse(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_service_discovery_v3_DiscoveryResponse* response) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer) &&
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
+ gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
+ const upb_msgdef* msg_type =
+ envoy_service_discovery_v3_DiscoveryResponse_getmsgdef(context.symtab);
+ char buf[10240];
+ upb_text_encode(response, msg_type, nullptr, 0, buf, sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] received response: %s", context.client,
+ buf);
+ }
+}
+
+void MaybeLogHttpConnectionManager(
+ const EncodingContext& context,
+ const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager*
+ http_connection_manager_config) {
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
- // TODO(roth): When we can upgrade upb, use upb textformat code to dump
- // the raw proto instead of doing this manually.
- std::vector<TString> fields;
- // version_info
- AddStringField(
- "version_info",
- envoy_service_discovery_v3_DiscoveryResponse_version_info(response),
- &fields);
- // resources
- size_t num_resources;
- envoy_service_discovery_v3_DiscoveryResponse_resources(response,
- &num_resources);
- fields.emplace_back(
- y_absl::StrCat("resources: <", num_resources, " element(s)>"));
- // type_url
- AddStringField(
- "type_url",
- envoy_service_discovery_v3_DiscoveryResponse_type_url(response),
- &fields);
- // nonce
- AddStringField("nonce",
- envoy_service_discovery_v3_DiscoveryResponse_nonce(response),
- &fields);
- gpr_log(GPR_DEBUG, "[xds_client %p] received response: %s", client,
- y_absl::StrJoin(fields, "\n").c_str());
+ const upb_msgdef* msg_type =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_getmsgdef(
+ context.symtab);
+ char buf[10240];
+ upb_text_encode(http_connection_manager_config, msg_type, nullptr, 0, buf,
+ sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] HttpConnectionManager: %s",
+ context.client, buf);
}
}
void MaybeLogRouteConfiguration(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_config_route_v3_RouteConfiguration* route_config) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer) &&
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
- // TODO(roth): When we can upgrade upb, use upb textformat code to dump
- // the raw proto instead of doing this manually.
- std::vector<TString> fields;
- // name
- AddStringField("name",
- envoy_config_route_v3_RouteConfiguration_name(route_config),
- &fields);
- // virtual_hosts
- size_t num_virtual_hosts;
- const envoy_config_route_v3_VirtualHost* const* virtual_hosts =
- envoy_config_route_v3_RouteConfiguration_virtual_hosts(
- route_config, &num_virtual_hosts);
- for (size_t i = 0; i < num_virtual_hosts; ++i) {
- const auto* virtual_host = virtual_hosts[i];
- fields.push_back("virtual_hosts {");
- // name
- AddStringField(" name",
- envoy_config_route_v3_VirtualHost_name(virtual_host),
- &fields);
- // domains
- size_t num_domains;
- const upb_strview* const domains =
- envoy_config_route_v3_VirtualHost_domains(virtual_host, &num_domains);
- for (size_t j = 0; j < num_domains; ++j) {
- AddStringField(" domains", domains[j], &fields);
- }
- // routes
- size_t num_routes;
- const envoy_config_route_v3_Route* const* routes =
- envoy_config_route_v3_VirtualHost_routes(virtual_host, &num_routes);
- for (size_t j = 0; j < num_routes; ++j) {
- const auto* route = routes[j];
- fields.push_back(" route {");
- // name
- AddStringField(" name", envoy_config_route_v3_Route_name(route),
- &fields);
- // match
- const envoy_config_route_v3_RouteMatch* match =
- envoy_config_route_v3_Route_match(route);
- if (match != nullptr) {
- fields.emplace_back(" match {");
- // path matching
- if (envoy_config_route_v3_RouteMatch_has_prefix(match)) {
- AddStringField(" prefix",
- envoy_config_route_v3_RouteMatch_prefix(match),
- &fields,
- /*add_if_empty=*/true);
- } else if (envoy_config_route_v3_RouteMatch_has_path(match)) {
- AddStringField(" path",
- envoy_config_route_v3_RouteMatch_path(match),
- &fields,
- /*add_if_empty=*/true);
- } else if (envoy_config_route_v3_RouteMatch_has_safe_regex(match)) {
- fields.emplace_back(" safe_regex: <not printed>");
- } else {
- fields.emplace_back(" <unknown path matching type>");
- }
- // header matching
- size_t num_headers;
- envoy_config_route_v3_RouteMatch_headers(match, &num_headers);
- if (num_headers > 0) {
- fields.emplace_back(
- y_absl::StrCat(" headers: <", num_headers, " element(s)>"));
- }
- fields.emplace_back(" }");
- }
- // action
- if (envoy_config_route_v3_Route_has_route(route)) {
- const envoy_config_route_v3_RouteAction* action =
- envoy_config_route_v3_Route_route(route);
- fields.emplace_back(" route {");
- if (envoy_config_route_v3_RouteAction_has_cluster(action)) {
- AddStringField(" cluster",
- envoy_config_route_v3_RouteAction_cluster(action),
- &fields);
- } else if (envoy_config_route_v3_RouteAction_has_cluster_header(
- action)) {
- AddStringField(
- " cluster_header",
- envoy_config_route_v3_RouteAction_cluster_header(action),
- &fields);
- } else if (envoy_config_route_v3_RouteAction_has_weighted_clusters(
- action)) {
- const envoy_config_route_v3_WeightedCluster* weighted_clusters =
- envoy_config_route_v3_RouteAction_weighted_clusters(action);
- fields.emplace_back(" weighted_clusters {");
- size_t num_cluster_weights;
- const envoy_config_route_v3_WeightedCluster_ClusterWeight* const*
- cluster_weights =
- envoy_config_route_v3_WeightedCluster_clusters(
- weighted_clusters, &num_cluster_weights);
- for (size_t i = 0; i < num_cluster_weights; ++i) {
- const envoy_config_route_v3_WeightedCluster_ClusterWeight*
- cluster_weight = cluster_weights[i];
- fields.emplace_back(" clusters {");
- AddStringField(
- " name",
- envoy_config_route_v3_WeightedCluster_ClusterWeight_name(
- cluster_weight),
- &fields);
- AddUInt32ValueField(
- " weight",
- envoy_config_route_v3_WeightedCluster_ClusterWeight_weight(
- cluster_weight),
- &fields);
- fields.emplace_back(" }");
- }
- AddUInt32ValueField(
- " total_weight",
- envoy_config_route_v3_WeightedCluster_total_weight(
- weighted_clusters),
- &fields);
- fields.emplace_back(" }");
- }
- fields.emplace_back(" }");
- } else if (envoy_config_route_v3_Route_has_redirect(route)) {
- fields.emplace_back(" redirect: <not printed>");
- } else if (envoy_config_route_v3_Route_has_direct_response(route)) {
- fields.emplace_back(" direct_response: <not printed>");
- } else if (envoy_config_route_v3_Route_has_filter_action(route)) {
- fields.emplace_back(" filter_action: <not printed>");
- }
- fields.push_back(" }");
- }
- fields.push_back("}");
- }
- gpr_log(GPR_DEBUG, "[xds_client %p] RouteConfiguration: %s", client,
- y_absl::StrJoin(fields, "\n").c_str());
+ const upb_msgdef* msg_type =
+ envoy_config_route_v3_RouteConfiguration_getmsgdef(context.symtab);
+ char buf[10240];
+ upb_text_encode(route_config, msg_type, nullptr, 0, buf, sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] RouteConfiguration: %s", context.client,
+ buf);
}
}
-void MaybeLogCluster(XdsClient* client, TraceFlag* tracer,
+void MaybeLogCluster(const EncodingContext& context,
const envoy_config_cluster_v3_Cluster* cluster) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer) &&
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
- // TODO(roth): When we can upgrade upb, use upb textformat code to dump
- // the raw proto instead of doing this manually.
- std::vector<TString> fields;
- // name
- AddStringField("name", envoy_config_cluster_v3_Cluster_name(cluster),
- &fields);
- // type
- if (envoy_config_cluster_v3_Cluster_has_type(cluster)) {
- fields.emplace_back(y_absl::StrCat(
- "type: ", envoy_config_cluster_v3_Cluster_type(cluster)));
- } else if (envoy_config_cluster_v3_Cluster_has_cluster_type(cluster)) {
- fields.emplace_back("cluster_type: <not printed>");
- } else {
- fields.emplace_back("<unknown type>");
- }
- // eds_cluster_config
- const envoy_config_cluster_v3_Cluster_EdsClusterConfig* eds_cluster_config =
- envoy_config_cluster_v3_Cluster_eds_cluster_config(cluster);
- if (eds_cluster_config != nullptr) {
- fields.emplace_back("eds_cluster_config {");
- // eds_config
- const struct envoy_config_core_v3_ConfigSource* eds_config =
- envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(
- eds_cluster_config);
- if (eds_config != nullptr) {
- if (envoy_config_core_v3_ConfigSource_has_ads(eds_config)) {
- fields.emplace_back(" eds_config { ads {} }");
- } else {
- fields.emplace_back(" eds_config: <non-ADS type>");
- }
- }
- // service_name
- AddStringField(
- " service_name",
- envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name(
- eds_cluster_config),
- &fields);
- fields.emplace_back("}");
- }
- // lb_policy
- fields.emplace_back(y_absl::StrCat(
- "lb_policy: ", envoy_config_cluster_v3_Cluster_lb_policy(cluster)));
- // lrs_server
- const envoy_config_core_v3_ConfigSource* lrs_server =
- envoy_config_cluster_v3_Cluster_lrs_server(cluster);
- if (lrs_server != nullptr) {
- if (envoy_config_core_v3_ConfigSource_has_self(lrs_server)) {
- fields.emplace_back("lrs_server { self {} }");
- } else {
- fields.emplace_back("lrs_server: <non-self type>");
- }
- }
- gpr_log(GPR_DEBUG, "[xds_client %p] Cluster: %s", client,
- y_absl::StrJoin(fields, "\n").c_str());
+ const upb_msgdef* msg_type =
+ envoy_config_cluster_v3_Cluster_getmsgdef(context.symtab);
+ char buf[10240];
+ upb_text_encode(cluster, msg_type, nullptr, 0, buf, sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] Cluster: %s", context.client, buf);
}
}
void MaybeLogClusterLoadAssignment(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_config_endpoint_v3_ClusterLoadAssignment* cla) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer) &&
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
- // TODO(roth): When we can upgrade upb, use upb textformat code to dump
- // the raw proto instead of doing this manually.
- std::vector<TString> fields;
- // cluster_name
- AddStringField(
- "cluster_name",
- envoy_config_endpoint_v3_ClusterLoadAssignment_cluster_name(cla),
- &fields);
- // endpoints
- size_t num_localities;
- const struct envoy_config_endpoint_v3_LocalityLbEndpoints* const*
- locality_endpoints =
- envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints(
- cla, &num_localities);
- for (size_t i = 0; i < num_localities; ++i) {
- const auto* locality_endpoint = locality_endpoints[i];
- fields.emplace_back("endpoints {");
- // locality
- const auto* locality =
- envoy_config_endpoint_v3_LocalityLbEndpoints_locality(
- locality_endpoint);
- if (locality != nullptr) {
- fields.emplace_back(" locality {");
- AddLocalityField(2, locality, &fields);
- fields.emplace_back(" }");
- }
- // lb_endpoints
- size_t num_lb_endpoints;
- const envoy_config_endpoint_v3_LbEndpoint* const* lb_endpoints =
- envoy_config_endpoint_v3_LocalityLbEndpoints_lb_endpoints(
- locality_endpoint, &num_lb_endpoints);
- for (size_t j = 0; j < num_lb_endpoints; ++j) {
- const auto* lb_endpoint = lb_endpoints[j];
- fields.emplace_back(" lb_endpoints {");
- // health_status
- uint32_t health_status =
- envoy_config_endpoint_v3_LbEndpoint_health_status(lb_endpoint);
- if (health_status > 0) {
- fields.emplace_back(
- y_absl::StrCat(" health_status: ", health_status));
- }
- // endpoint
- const envoy_config_endpoint_v3_Endpoint* endpoint =
- envoy_config_endpoint_v3_LbEndpoint_endpoint(lb_endpoint);
- if (endpoint != nullptr) {
- fields.emplace_back(" endpoint {");
- // address
- const auto* address =
- envoy_config_endpoint_v3_Endpoint_address(endpoint);
- if (address != nullptr) {
- fields.emplace_back(" address {");
- // socket_address
- const auto* socket_address =
- envoy_config_core_v3_Address_socket_address(address);
- if (socket_address != nullptr) {
- fields.emplace_back(" socket_address {");
- // address
- AddStringField(
- " address",
- envoy_config_core_v3_SocketAddress_address(socket_address),
- &fields);
- // port_value
- if (envoy_config_core_v3_SocketAddress_has_port_value(
- socket_address)) {
- fields.emplace_back(
- y_absl::StrCat(" port_value: ",
- envoy_config_core_v3_SocketAddress_port_value(
- socket_address)));
- } else {
- fields.emplace_back(" <non-numeric port>");
- }
- fields.emplace_back(" }");
- } else {
- fields.emplace_back(" <non-socket address>");
- }
- fields.emplace_back(" }");
- }
- fields.emplace_back(" }");
- }
- fields.emplace_back(" }");
- }
- // load_balancing_weight
- AddUInt32ValueField(
- " load_balancing_weight",
- envoy_config_endpoint_v3_LocalityLbEndpoints_load_balancing_weight(
- locality_endpoint),
- &fields);
- // priority
- uint32_t priority = envoy_config_endpoint_v3_LocalityLbEndpoints_priority(
- locality_endpoint);
- if (priority > 0) {
- fields.emplace_back(y_absl::StrCat(" priority: ", priority));
- }
- fields.emplace_back("}");
- }
- // policy
- const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy* policy =
- envoy_config_endpoint_v3_ClusterLoadAssignment_policy(cla);
- if (policy != nullptr) {
- fields.emplace_back("policy {");
- // drop_overloads
- size_t num_drop_overloads;
- const envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload* const*
- drop_overloads =
- envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_drop_overloads(
- policy, &num_drop_overloads);
- for (size_t i = 0; i < num_drop_overloads; ++i) {
- auto* drop_overload = drop_overloads[i];
- fields.emplace_back(" drop_overloads {");
- // category
- AddStringField(
- " category",
- envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_category(
- drop_overload),
- &fields);
- // drop_percentage
- const auto* drop_percentage =
- envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_drop_percentage(
- drop_overload);
- if (drop_percentage != nullptr) {
- fields.emplace_back(" drop_percentage {");
- fields.emplace_back(y_absl::StrCat(
- " numerator: ",
- envoy_type_v3_FractionalPercent_numerator(drop_percentage)));
- fields.emplace_back(y_absl::StrCat(
- " denominator: ",
- envoy_type_v3_FractionalPercent_denominator(drop_percentage)));
- fields.emplace_back(" }");
- }
- fields.emplace_back(" }");
- }
- // overprovisioning_factor
- fields.emplace_back("}");
- }
- gpr_log(GPR_DEBUG, "[xds_client %p] ClusterLoadAssignment: %s", client,
- y_absl::StrJoin(fields, "\n").c_str());
+ const upb_msgdef* msg_type =
+ envoy_config_endpoint_v3_ClusterLoadAssignment_getmsgdef(
+ context.symtab);
+ char buf[10240];
+ upb_text_encode(cla, msg_type, nullptr, 0, buf, sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] ClusterLoadAssignment: %s",
+ context.client, buf);
}
}
grpc_error* RoutePathMatchParse(const envoy_config_route_v3_RouteMatch* match,
XdsApi::Route* route, bool* ignore_route) {
+ auto* case_sensitive_ptr =
+ envoy_config_route_v3_RouteMatch_case_sensitive(match);
+ bool case_sensitive = true;
+ if (case_sensitive_ptr != nullptr) {
+ case_sensitive = google_protobuf_BoolValue_value(case_sensitive_ptr);
+ }
+ StringMatcher::Type type;
+ TString match_string;
if (envoy_config_route_v3_RouteMatch_has_prefix(match)) {
y_absl::string_view prefix =
UpbStringToAbsl(envoy_config_route_v3_RouteMatch_prefix(match));
// Empty prefix "" is accepted.
- if (prefix.size() > 0) {
+ if (!prefix.empty()) {
// Prefix "/" is accepted.
if (prefix[0] != '/') {
// Prefix which does not start with a / will never match anything, so
@@ -1345,13 +1231,12 @@ grpc_error* RoutePathMatchParse(const envoy_config_route_v3_RouteMatch* match,
return GRPC_ERROR_NONE;
}
}
- route->matchers.path_matcher.type =
- XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PREFIX;
- route->matchers.path_matcher.string_matcher = TString(prefix);
+ type = StringMatcher::Type::PREFIX;
+ match_string = TString(prefix);
} else if (envoy_config_route_v3_RouteMatch_has_path(match)) {
y_absl::string_view path =
UpbStringToAbsl(envoy_config_route_v3_RouteMatch_path(match));
- if (path.size() == 0) {
+ if (path.empty()) {
// Path that is empty will never match anything, so ignore this route.
*ignore_route = true;
return GRPC_ERROR_NONE;
@@ -1380,27 +1265,28 @@ grpc_error* RoutePathMatchParse(const envoy_config_route_v3_RouteMatch* match,
*ignore_route = true;
return GRPC_ERROR_NONE;
}
- route->matchers.path_matcher.type =
- XdsApi::Route::Matchers::PathMatcher::PathMatcherType::PATH;
- route->matchers.path_matcher.string_matcher = TString(path);
+ type = StringMatcher::Type::EXACT;
+ match_string = TString(path);
} else if (envoy_config_route_v3_RouteMatch_has_safe_regex(match)) {
const envoy_type_matcher_v3_RegexMatcher* regex_matcher =
envoy_config_route_v3_RouteMatch_safe_regex(match);
GPR_ASSERT(regex_matcher != nullptr);
- TString matcher = UpbStringToStdString(
+ type = StringMatcher::Type::SAFE_REGEX;
+ match_string = UpbStringToStdString(
envoy_type_matcher_v3_RegexMatcher_regex(regex_matcher));
- std::unique_ptr<RE2> regex = y_absl::make_unique<RE2>(std::move(matcher));
- if (!regex->ok()) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid regex string specified in path matcher.");
- }
- route->matchers.path_matcher.type =
- XdsApi::Route::Matchers::PathMatcher::PathMatcherType::REGEX;
- route->matchers.path_matcher.regex_matcher = std::move(regex);
} else {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Invalid route path specifier specified.");
}
+ y_absl::StatusOr<StringMatcher> string_matcher =
+ StringMatcher::Create(type, match_string, case_sensitive);
+ if (!string_matcher.ok()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("path matcher: ", string_matcher.status().message())
+ .c_str());
+ ;
+ }
+ route->matchers.path_matcher = std::move(string_matcher.value());
return GRPC_ERROR_NONE;
}
@@ -1411,64 +1297,62 @@ grpc_error* RouteHeaderMatchersParse(
envoy_config_route_v3_RouteMatch_headers(match, &size);
for (size_t i = 0; i < size; ++i) {
const envoy_config_route_v3_HeaderMatcher* header = headers[i];
- XdsApi::Route::Matchers::HeaderMatcher header_matcher;
- header_matcher.name =
+ const TString name =
UpbStringToStdString(envoy_config_route_v3_HeaderMatcher_name(header));
+ HeaderMatcher::Type type;
+ TString match_string;
+ int64_t range_start = 0;
+ int64_t range_end = 0;
+ bool present_match = false;
if (envoy_config_route_v3_HeaderMatcher_has_exact_match(header)) {
- header_matcher.type =
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::EXACT;
- header_matcher.string_matcher = UpbStringToStdString(
+ type = HeaderMatcher::Type::EXACT;
+ match_string = UpbStringToStdString(
envoy_config_route_v3_HeaderMatcher_exact_match(header));
} else if (envoy_config_route_v3_HeaderMatcher_has_safe_regex_match(
header)) {
const envoy_type_matcher_v3_RegexMatcher* regex_matcher =
envoy_config_route_v3_HeaderMatcher_safe_regex_match(header);
GPR_ASSERT(regex_matcher != nullptr);
- const TString matcher = UpbStringToStdString(
+ type = HeaderMatcher::Type::SAFE_REGEX;
+ match_string = UpbStringToStdString(
envoy_type_matcher_v3_RegexMatcher_regex(regex_matcher));
- std::unique_ptr<RE2> regex = y_absl::make_unique<RE2>(matcher);
- if (!regex->ok()) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid regex string specified in header matcher.");
- }
- header_matcher.type =
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::REGEX;
- header_matcher.regex_match = std::move(regex);
} else if (envoy_config_route_v3_HeaderMatcher_has_range_match(header)) {
- header_matcher.type =
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::RANGE;
+ type = HeaderMatcher::Type::RANGE;
const envoy_type_v3_Int64Range* range_matcher =
envoy_config_route_v3_HeaderMatcher_range_match(header);
- header_matcher.range_start =
- envoy_type_v3_Int64Range_start(range_matcher);
- header_matcher.range_end = envoy_type_v3_Int64Range_end(range_matcher);
- if (header_matcher.range_end < header_matcher.range_start) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid range header matcher specifier specified: end "
- "cannot be smaller than start.");
- }
+ range_start = envoy_type_v3_Int64Range_start(range_matcher);
+ range_end = envoy_type_v3_Int64Range_end(range_matcher);
} else if (envoy_config_route_v3_HeaderMatcher_has_present_match(header)) {
- header_matcher.type =
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PRESENT;
- header_matcher.present_match =
- envoy_config_route_v3_HeaderMatcher_present_match(header);
+ type = HeaderMatcher::Type::PRESENT;
+ present_match = envoy_config_route_v3_HeaderMatcher_present_match(header);
} else if (envoy_config_route_v3_HeaderMatcher_has_prefix_match(header)) {
- header_matcher.type =
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::PREFIX;
- header_matcher.string_matcher = UpbStringToStdString(
+ type = HeaderMatcher::Type::PREFIX;
+ match_string = UpbStringToStdString(
envoy_config_route_v3_HeaderMatcher_prefix_match(header));
} else if (envoy_config_route_v3_HeaderMatcher_has_suffix_match(header)) {
- header_matcher.type =
- XdsApi::Route::Matchers::HeaderMatcher::HeaderMatcherType::SUFFIX;
- header_matcher.string_matcher = UpbStringToStdString(
+ type = HeaderMatcher::Type::SUFFIX;
+ match_string = UpbStringToStdString(
envoy_config_route_v3_HeaderMatcher_suffix_match(header));
+ } else if (envoy_config_route_v3_HeaderMatcher_has_contains_match(header)) {
+ type = HeaderMatcher::Type::CONTAINS;
+ match_string = UpbStringToStdString(
+ envoy_config_route_v3_HeaderMatcher_contains_match(header));
} else {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Invalid route header matcher specified.");
}
- header_matcher.invert_match =
+ bool invert_match =
envoy_config_route_v3_HeaderMatcher_invert_match(header);
- route->matchers.header_matchers.emplace_back(std::move(header_matcher));
+ y_absl::StatusOr<HeaderMatcher> header_matcher =
+ HeaderMatcher::Create(name, type, match_string, range_start, range_end,
+ present_match, invert_match);
+ if (!header_matcher.ok()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("header matcher: ", header_matcher.status().message())
+ .c_str());
+ }
+ route->matchers.header_matchers.emplace_back(
+ std::move(header_matcher.value()));
}
return GRPC_ERROR_NONE;
}
@@ -1506,7 +1390,96 @@ grpc_error* RouteRuntimeFractionParse(
return GRPC_ERROR_NONE;
}
-grpc_error* RouteActionParse(const envoy_config_route_v3_Route* route_msg,
+grpc_error* ExtractHttpFilterTypeName(const EncodingContext& context,
+ const google_protobuf_Any* any,
+ y_absl::string_view* filter_type) {
+ *filter_type = UpbStringToAbsl(google_protobuf_Any_type_url(any));
+ if (*filter_type == "type.googleapis.com/udpa.type.v1.TypedStruct") {
+ upb_strview any_value = google_protobuf_Any_value(any);
+ const auto* typed_struct = udpa_type_v1_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 filter config");
+ }
+ *filter_type =
+ UpbStringToAbsl(udpa_type_v1_TypedStruct_type_url(typed_struct));
+ }
+ *filter_type = y_absl::StripPrefix(*filter_type, "type.googleapis.com/");
+ return GRPC_ERROR_NONE;
+}
+
+template <typename ParentType, typename EntryType>
+grpc_error* ParseTypedPerFilterConfig(
+ const EncodingContext& context, const ParentType* parent,
+ const EntryType* (*entry_func)(const ParentType*, size_t*),
+ upb_strview (*key_func)(const EntryType*),
+ const google_protobuf_Any* (*value_func)(const EntryType*),
+ XdsApi::TypedPerFilterConfig* typed_per_filter_config) {
+ size_t filter_it = UPB_MAP_BEGIN;
+ while (true) {
+ const auto* filter_entry = entry_func(parent, &filter_it);
+ if (filter_entry == nullptr) break;
+ y_absl::string_view key = UpbStringToAbsl(key_func(filter_entry));
+ if (key.empty()) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING("empty filter name in map");
+ }
+ const google_protobuf_Any* any = value_func(filter_entry);
+ GPR_ASSERT(any != nullptr);
+ y_absl::string_view filter_type =
+ UpbStringToAbsl(google_protobuf_Any_type_url(any));
+ if (filter_type.empty()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("no filter config specified for filter name ", key)
+ .c_str());
+ }
+ bool is_optional = false;
+ if (filter_type ==
+ "type.googleapis.com/envoy.config.route.v3.FilterConfig") {
+ upb_strview any_value = google_protobuf_Any_value(any);
+ const auto* filter_config = envoy_config_route_v3_FilterConfig_parse(
+ any_value.data, any_value.size, context.arena);
+ if (filter_config == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("could not parse FilterConfig wrapper for ", key)
+ .c_str());
+ }
+ is_optional =
+ envoy_config_route_v3_FilterConfig_is_optional(filter_config);
+ any = envoy_config_route_v3_FilterConfig_config(filter_config);
+ if (any == nullptr) {
+ if (is_optional) continue;
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("no filter config specified for filter name ", key)
+ .c_str());
+ }
+ }
+ grpc_error* error = ExtractHttpFilterTypeName(context, any, &filter_type);
+ if (error != GRPC_ERROR_NONE) return error;
+ const XdsHttpFilterImpl* filter_impl =
+ XdsHttpFilterRegistry::GetFilterForType(filter_type);
+ if (filter_impl == nullptr) {
+ if (is_optional) continue;
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("no filter registered for config type ", filter_type)
+ .c_str());
+ }
+ y_absl::StatusOr<XdsHttpFilterImpl::FilterConfig> filter_config =
+ filter_impl->GenerateFilterConfigOverride(
+ google_protobuf_Any_value(any), context.arena);
+ if (!filter_config.ok()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("filter config for type ", filter_type,
+ " failed to parse: ", filter_config.status().ToString())
+ .c_str());
+ }
+ (*typed_per_filter_config)[TString(key)] = std::move(*filter_config);
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* RouteActionParse(const EncodingContext& context,
+ const envoy_config_route_v3_Route* route_msg,
XdsApi::Route* route, bool* ignore_route) {
if (!envoy_config_route_v3_Route_has_route(route_msg)) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -1518,7 +1491,7 @@ grpc_error* RouteActionParse(const envoy_config_route_v3_Route* route_msg,
if (envoy_config_route_v3_RouteAction_has_cluster(route_action)) {
route->cluster_name = UpbStringToStdString(
envoy_config_route_v3_RouteAction_cluster(route_action));
- if (route->cluster_name.size() == 0) {
+ if (route->cluster_name.empty()) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"RouteAction cluster contains empty cluster name.");
}
@@ -1557,7 +1530,19 @@ grpc_error* RouteActionParse(const envoy_config_route_v3_Route* route_msg,
"RouteAction weighted_cluster cluster missing weight");
}
cluster.weight = google_protobuf_UInt32Value_value(weight);
+ if (cluster.weight == 0) continue;
sum_of_weights += cluster.weight;
+ if (context.use_v3) {
+ grpc_error* error = ParseTypedPerFilterConfig<
+ envoy_config_route_v3_WeightedCluster_ClusterWeight,
+ envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry>(
+ context, cluster_weight,
+ envoy_config_route_v3_WeightedCluster_ClusterWeight_typed_per_filter_config_next,
+ envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_key,
+ envoy_config_route_v3_WeightedCluster_ClusterWeight_TypedPerFilterConfigEntry_value,
+ &cluster.typed_per_filter_config);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
route->weighted_clusters.emplace_back(std::move(cluster));
}
if (total_weight != sum_of_weights) {
@@ -1571,22 +1556,124 @@ grpc_error* RouteActionParse(const envoy_config_route_v3_Route* route_msg,
} else {
// No cluster or weighted_clusters found in RouteAction, ignore this route.
*ignore_route = true;
- return GRPC_ERROR_NONE;
+ }
+ if (!*ignore_route) {
+ const envoy_config_route_v3_RouteAction_MaxStreamDuration*
+ max_stream_duration =
+ envoy_config_route_v3_RouteAction_max_stream_duration(route_action);
+ if (max_stream_duration != nullptr) {
+ const google_protobuf_Duration* duration =
+ envoy_config_route_v3_RouteAction_MaxStreamDuration_grpc_timeout_header_max(
+ max_stream_duration);
+ if (duration == nullptr) {
+ duration =
+ envoy_config_route_v3_RouteAction_MaxStreamDuration_max_stream_duration(
+ max_stream_duration);
+ }
+ if (duration != nullptr) {
+ XdsApi::Duration duration_in_route;
+ duration_in_route.seconds = google_protobuf_Duration_seconds(duration);
+ duration_in_route.nanos = google_protobuf_Duration_nanos(duration);
+ route->max_stream_duration = duration_in_route;
+ }
+ }
+ }
+ // Get HashPolicy from RouteAction
+ if (XdsRingHashEnabled()) {
+ size_t size = 0;
+ const envoy_config_route_v3_RouteAction_HashPolicy* const* hash_policies =
+ envoy_config_route_v3_RouteAction_hash_policy(route_action, &size);
+ for (size_t i = 0; i < size; ++i) {
+ const envoy_config_route_v3_RouteAction_HashPolicy* hash_policy =
+ hash_policies[i];
+ XdsApi::Route::HashPolicy policy;
+ policy.terminal =
+ envoy_config_route_v3_RouteAction_HashPolicy_terminal(hash_policy);
+ const envoy_config_route_v3_RouteAction_HashPolicy_Header* header;
+ const envoy_config_route_v3_RouteAction_HashPolicy_FilterState*
+ filter_state;
+ if ((header = envoy_config_route_v3_RouteAction_HashPolicy_header(
+ hash_policy)) != nullptr) {
+ policy.type = XdsApi::Route::HashPolicy::Type::HEADER;
+ policy.header_name = UpbStringToStdString(
+ envoy_config_route_v3_RouteAction_HashPolicy_Header_header_name(
+ header));
+ const struct envoy_type_matcher_v3_RegexMatchAndSubstitute*
+ regex_rewrite =
+ envoy_config_route_v3_RouteAction_HashPolicy_Header_regex_rewrite(
+ header);
+ if (regex_rewrite == nullptr) {
+ gpr_log(
+ GPR_DEBUG,
+ "RouteAction HashPolicy contains policy specifier Header with "
+ "RegexMatchAndSubstitution but Regex is missing");
+ continue;
+ }
+ const envoy_type_matcher_v3_RegexMatcher* regex_matcher =
+ envoy_type_matcher_v3_RegexMatchAndSubstitute_pattern(
+ regex_rewrite);
+ if (regex_matcher == nullptr) {
+ gpr_log(
+ GPR_DEBUG,
+ "RouteAction HashPolicy contains policy specifier Header with "
+ "RegexMatchAndSubstitution but RegexMatcher pattern is "
+ "missing");
+ continue;
+ }
+ RE2::Options options;
+ policy.regex = y_absl::make_unique<RE2>(
+ UpbStringToStdString(
+ envoy_type_matcher_v3_RegexMatcher_regex(regex_matcher)),
+ options);
+ if (!policy.regex->ok()) {
+ gpr_log(
+ GPR_DEBUG,
+ "RouteAction HashPolicy contains policy specifier Header with "
+ "RegexMatchAndSubstitution but RegexMatcher pattern does not "
+ "compile");
+ continue;
+ }
+ policy.regex_substitution = UpbStringToStdString(
+ envoy_type_matcher_v3_RegexMatchAndSubstitute_substitution(
+ regex_rewrite));
+ } else if ((filter_state =
+ envoy_config_route_v3_RouteAction_HashPolicy_filter_state(
+ hash_policy)) != nullptr) {
+ TString key = UpbStringToStdString(
+ envoy_config_route_v3_RouteAction_HashPolicy_FilterState_key(
+ filter_state));
+ if (key == "io.grpc.channel_id") {
+ policy.type = XdsApi::Route::HashPolicy::Type::CHANNEL_ID;
+ } else {
+ gpr_log(GPR_DEBUG,
+ "RouteAction HashPolicy contains policy specifier "
+ "FilterState but "
+ "key is not io.grpc.channel_id.");
+ continue;
+ }
+ } else {
+ gpr_log(
+ GPR_DEBUG,
+ "RouteAction HashPolicy contains unsupported policy specifier.");
+ continue;
+ }
+ route->hash_policies.emplace_back(std::move(policy));
+ }
}
return GRPC_ERROR_NONE;
}
grpc_error* RouteConfigParse(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_config_route_v3_RouteConfiguration* route_config,
XdsApi::RdsUpdate* rds_update) {
- MaybeLogRouteConfiguration(client, tracer, route_config);
+ MaybeLogRouteConfiguration(context, route_config);
// Get the virtual hosts.
- size_t size;
+ size_t num_virtual_hosts;
const envoy_config_route_v3_VirtualHost* const* virtual_hosts =
- envoy_config_route_v3_RouteConfiguration_virtual_hosts(route_config,
- &size);
- for (size_t i = 0; i < size; ++i) {
+ envoy_config_route_v3_RouteConfiguration_virtual_hosts(
+ route_config, &num_virtual_hosts);
+ for (size_t i = 0; i < num_virtual_hosts; ++i) {
rds_update->virtual_hosts.emplace_back();
XdsApi::RdsUpdate::VirtualHost& vhost = rds_update->virtual_hosts.back();
// Parse domains.
@@ -1606,6 +1693,18 @@ grpc_error* RouteConfigParse(
if (vhost.domains.empty()) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("VirtualHost has no domains");
}
+ // Parse typed_per_filter_config.
+ if (context.use_v3) {
+ grpc_error* error = ParseTypedPerFilterConfig<
+ envoy_config_route_v3_VirtualHost,
+ envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry>(
+ context, virtual_hosts[i],
+ envoy_config_route_v3_VirtualHost_typed_per_filter_config_next,
+ envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_key,
+ envoy_config_route_v3_VirtualHost_TypedPerFilterConfigEntry_value,
+ &vhost.typed_per_filter_config);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
// Parse routes.
size_t num_routes;
const envoy_config_route_v3_Route* const* routes =
@@ -1618,6 +1717,9 @@ grpc_error* RouteConfigParse(
for (size_t j = 0; j < num_routes; ++j) {
const envoy_config_route_v3_RouteMatch* match =
envoy_config_route_v3_Route_match(routes[j]);
+ if (match == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Match can't be null.");
+ }
size_t query_parameters_size;
static_cast<void>(envoy_config_route_v3_RouteMatch_query_parameters(
match, &query_parameters_size));
@@ -1633,15 +1735,19 @@ grpc_error* RouteConfigParse(
if (error != GRPC_ERROR_NONE) return error;
error = RouteRuntimeFractionParse(match, &route);
if (error != GRPC_ERROR_NONE) return error;
- error = RouteActionParse(routes[j], &route, &ignore_route);
+ error = RouteActionParse(context, routes[j], &route, &ignore_route);
if (error != GRPC_ERROR_NONE) return error;
if (ignore_route) continue;
- const google_protobuf_BoolValue* case_sensitive =
- envoy_config_route_v3_RouteMatch_case_sensitive(match);
- if (case_sensitive != nullptr &&
- !google_protobuf_BoolValue_value(case_sensitive)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "case_sensitive if set must be set to true.");
+ if (context.use_v3) {
+ grpc_error* error = ParseTypedPerFilterConfig<
+ envoy_config_route_v3_Route,
+ envoy_config_route_v3_Route_TypedPerFilterConfigEntry>(
+ context, routes[j],
+ envoy_config_route_v3_Route_typed_per_filter_config_next,
+ envoy_config_route_v3_Route_TypedPerFilterConfigEntry_key,
+ envoy_config_route_v3_Route_TypedPerFilterConfigEntry_value,
+ &route.typed_per_filter_config);
+ if (error != GRPC_ERROR_NONE) return error;
}
vhost.routes.emplace_back(std::move(route));
}
@@ -1652,11 +1758,744 @@ grpc_error* RouteConfigParse(
return GRPC_ERROR_NONE;
}
+XdsApi::CommonTlsContext::CertificateProviderInstance
+CertificateProviderInstanceParse(
+ const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance*
+ certificate_provider_instance_proto) {
+ return {
+ UpbStringToStdString(
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_instance_name(
+ certificate_provider_instance_proto)),
+ UpbStringToStdString(
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_certificate_name(
+ certificate_provider_instance_proto))};
+}
+
+grpc_error* CommonTlsContextParse(
+ const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*
+ common_tls_context_proto,
+ XdsApi::CommonTlsContext* common_tls_context) GRPC_MUST_USE_RESULT;
+grpc_error* CommonTlsContextParse(
+ const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*
+ common_tls_context_proto,
+ XdsApi::CommonTlsContext* common_tls_context) {
+ auto* combined_validation_context =
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_combined_validation_context(
+ common_tls_context_proto);
+ if (combined_validation_context != nullptr) {
+ auto* default_validation_context =
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(
+ combined_validation_context);
+ if (default_validation_context != nullptr) {
+ size_t len = 0;
+ auto* subject_alt_names_matchers =
+ envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_match_subject_alt_names(
+ default_validation_context, &len);
+ for (size_t i = 0; i < len; ++i) {
+ StringMatcher::Type type;
+ TString matcher;
+ if (envoy_type_matcher_v3_StringMatcher_has_exact(
+ subject_alt_names_matchers[i])) {
+ type = StringMatcher::Type::EXACT;
+ matcher =
+ UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_exact(
+ subject_alt_names_matchers[i]));
+ } else if (envoy_type_matcher_v3_StringMatcher_has_prefix(
+ subject_alt_names_matchers[i])) {
+ type = StringMatcher::Type::PREFIX;
+ matcher =
+ UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_prefix(
+ subject_alt_names_matchers[i]));
+ } else if (envoy_type_matcher_v3_StringMatcher_has_suffix(
+ subject_alt_names_matchers[i])) {
+ type = StringMatcher::Type::SUFFIX;
+ matcher =
+ UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_suffix(
+ subject_alt_names_matchers[i]));
+ } else if (envoy_type_matcher_v3_StringMatcher_has_contains(
+ subject_alt_names_matchers[i])) {
+ type = StringMatcher::Type::CONTAINS;
+ matcher =
+ UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_contains(
+ subject_alt_names_matchers[i]));
+ } else if (envoy_type_matcher_v3_StringMatcher_has_safe_regex(
+ subject_alt_names_matchers[i])) {
+ type = StringMatcher::Type::SAFE_REGEX;
+ auto* regex_matcher = envoy_type_matcher_v3_StringMatcher_safe_regex(
+ subject_alt_names_matchers[i]);
+ matcher = UpbStringToStdString(
+ envoy_type_matcher_v3_RegexMatcher_regex(regex_matcher));
+ } else {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Invalid StringMatcher specified");
+ }
+ bool ignore_case = envoy_type_matcher_v3_StringMatcher_ignore_case(
+ subject_alt_names_matchers[i]);
+ y_absl::StatusOr<StringMatcher> string_matcher =
+ StringMatcher::Create(type, matcher,
+ /*case_sensitive=*/!ignore_case);
+ if (!string_matcher.ok()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("string matcher: ",
+ string_matcher.status().message())
+ .c_str());
+ }
+ if (type == StringMatcher::Type::SAFE_REGEX && ignore_case) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "StringMatcher: ignore_case has no effect for SAFE_REGEX.");
+ }
+ common_tls_context->combined_validation_context
+ .default_validation_context.match_subject_alt_names.push_back(
+ std::move(string_matcher.value()));
+ }
+ }
+ auto* validation_context_certificate_provider_instance =
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider_instance(
+ combined_validation_context);
+ if (validation_context_certificate_provider_instance != nullptr) {
+ common_tls_context->combined_validation_context
+ .validation_context_certificate_provider_instance =
+ CertificateProviderInstanceParse(
+ validation_context_certificate_provider_instance);
+ }
+ }
+ auto* tls_certificate_certificate_provider_instance =
+ envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider_instance(
+ common_tls_context_proto);
+ if (tls_certificate_certificate_provider_instance != nullptr) {
+ common_tls_context->tls_certificate_certificate_provider_instance =
+ CertificateProviderInstanceParse(
+ tls_certificate_certificate_provider_instance);
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* HttpConnectionManagerParse(
+ bool is_client, const EncodingContext& context,
+ const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager*
+ http_connection_manager_proto,
+ bool is_v2,
+ XdsApi::LdsUpdate::HttpConnectionManager* http_connection_manager) {
+ MaybeLogHttpConnectionManager(context, http_connection_manager_proto);
+ // Obtain max_stream_duration from Http Protocol Options.
+ const envoy_config_core_v3_HttpProtocolOptions* options =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_common_http_protocol_options(
+ http_connection_manager_proto);
+ if (options != nullptr) {
+ const google_protobuf_Duration* duration =
+ envoy_config_core_v3_HttpProtocolOptions_max_stream_duration(options);
+ if (duration != nullptr) {
+ http_connection_manager->http_max_stream_duration.seconds =
+ google_protobuf_Duration_seconds(duration);
+ http_connection_manager->http_max_stream_duration.nanos =
+ google_protobuf_Duration_nanos(duration);
+ }
+ }
+ // Parse filters.
+ if (!is_v2) {
+ size_t num_filters = 0;
+ const auto* http_filters =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_http_filters(
+ http_connection_manager_proto, &num_filters);
+ std::set<y_absl::string_view> names_seen;
+ for (size_t i = 0; i < num_filters; ++i) {
+ const auto* http_filter = http_filters[i];
+ y_absl::string_view name = UpbStringToAbsl(
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_name(
+ http_filter));
+ if (name.empty()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("empty filter name at index ", i).c_str());
+ }
+ if (names_seen.find(name) != names_seen.end()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("duplicate HTTP filter name: ", name).c_str());
+ }
+ names_seen.insert(name);
+ const bool is_optional =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_is_optional(
+ http_filter);
+ const google_protobuf_Any* any =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpFilter_typed_config(
+ http_filter);
+ if (any == nullptr) {
+ if (is_optional) continue;
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("no filter config specified for filter name ", name)
+ .c_str());
+ }
+ y_absl::string_view filter_type;
+ grpc_error* error = ExtractHttpFilterTypeName(context, any, &filter_type);
+ if (error != GRPC_ERROR_NONE) return error;
+ const XdsHttpFilterImpl* filter_impl =
+ XdsHttpFilterRegistry::GetFilterForType(filter_type);
+ if (filter_impl == nullptr) {
+ if (is_optional) continue;
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("no filter registered for config type ", filter_type)
+ .c_str());
+ }
+ if ((is_client && !filter_impl->IsSupportedOnClients()) ||
+ (!is_client && !filter_impl->IsSupportedOnServers())) {
+ if (is_optional) continue;
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Filter %s is not supported on %s", filter_type,
+ is_client ? "clients" : "servers")
+ .c_str());
+ }
+ y_absl::StatusOr<XdsHttpFilterImpl::FilterConfig> filter_config =
+ filter_impl->GenerateFilterConfig(google_protobuf_Any_value(any),
+ context.arena);
+ if (!filter_config.ok()) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(
+ "filter config for type ", filter_type,
+ " failed to parse: ", filter_config.status().ToString())
+ .c_str());
+ }
+ http_connection_manager->http_filters.emplace_back(
+ XdsApi::LdsUpdate::HttpConnectionManager::HttpFilter{
+ TString(name), std::move(*filter_config)});
+ }
+ } else {
+ // If using a v2 config, we just hard-code a list containing only the
+ // router filter without actually looking at the config. This ensures
+ // that the right thing happens in the xds resolver without having
+ // to expose whether the resource we received was v2 or v3.
+ http_connection_manager->http_filters.emplace_back(
+ XdsApi::LdsUpdate::HttpConnectionManager::HttpFilter{
+ "router", {kXdsHttpRouterFilterConfigName, Json()}});
+ }
+ if (is_client) {
+ // Found inlined route_config. Parse it to find the cluster_name.
+ if (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_route_config(
+ http_connection_manager_proto)) {
+ const envoy_config_route_v3_RouteConfiguration* route_config =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_config(
+ http_connection_manager_proto);
+ XdsApi::RdsUpdate rds_update;
+ grpc_error* error = RouteConfigParse(context, route_config, &rds_update);
+ if (error != GRPC_ERROR_NONE) return error;
+ http_connection_manager->rds_update = std::move(rds_update);
+ return GRPC_ERROR_NONE;
+ }
+ // Validate that RDS must be used to get the route_config dynamically.
+ const envoy_extensions_filters_network_http_connection_manager_v3_Rds* rds =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_rds(
+ http_connection_manager_proto);
+ if (rds == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "HttpConnectionManager neither has inlined route_config nor RDS.");
+ }
+ // Check that the ConfigSource specifies ADS.
+ const envoy_config_core_v3_ConfigSource* config_source =
+ envoy_extensions_filters_network_http_connection_manager_v3_Rds_config_source(
+ rds);
+ if (config_source == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "HttpConnectionManager missing config_source for RDS.");
+ }
+ if (!envoy_config_core_v3_ConfigSource_has_ads(config_source)) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "HttpConnectionManager ConfigSource for RDS does not specify ADS.");
+ }
+ // Get the route_config_name.
+ http_connection_manager->route_config_name = UpbStringToStdString(
+ envoy_extensions_filters_network_http_connection_manager_v3_Rds_route_config_name(
+ rds));
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* LdsResponseParseClient(
+ const EncodingContext& context,
+ const envoy_config_listener_v3_ApiListener* api_listener, bool is_v2,
+ XdsApi::LdsUpdate* lds_update) {
+ lds_update->type = XdsApi::LdsUpdate::ListenerType::kHttpApiListener;
+ const upb_strview encoded_api_listener = google_protobuf_Any_value(
+ envoy_config_listener_v3_ApiListener_api_listener(api_listener));
+ const auto* http_connection_manager =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_parse(
+ encoded_api_listener.data, encoded_api_listener.size, context.arena);
+ if (http_connection_manager == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Could not parse HttpConnectionManager config from ApiListener");
+ }
+ return HttpConnectionManagerParse(true /* is_client */, context,
+ http_connection_manager, is_v2,
+ &lds_update->http_connection_manager);
+}
+
+grpc_error* DownstreamTlsContextParse(
+ const EncodingContext& context,
+ const envoy_config_core_v3_TransportSocket* transport_socket,
+ XdsApi::DownstreamTlsContext* downstream_tls_context) {
+ y_absl::string_view name = UpbStringToAbsl(
+ envoy_config_core_v3_TransportSocket_name(transport_socket));
+ if (name == "envoy.transport_sockets.tls") {
+ auto* typed_config =
+ envoy_config_core_v3_TransportSocket_typed_config(transport_socket);
+ if (typed_config != nullptr) {
+ const upb_strview encoded_downstream_tls_context =
+ google_protobuf_Any_value(typed_config);
+ auto* downstream_tls_context_proto =
+ envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_parse(
+ encoded_downstream_tls_context.data,
+ encoded_downstream_tls_context.size, context.arena);
+ if (downstream_tls_context_proto == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Can't decode downstream tls context.");
+ }
+ auto* common_tls_context =
+ envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_common_tls_context(
+ downstream_tls_context_proto);
+ if (common_tls_context != nullptr) {
+ grpc_error* error = CommonTlsContextParse(
+ common_tls_context, &downstream_tls_context->common_tls_context);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
+ auto* require_client_certificate =
+ envoy_extensions_transport_sockets_tls_v3_DownstreamTlsContext_require_client_certificate(
+ downstream_tls_context_proto);
+ if (require_client_certificate != nullptr) {
+ downstream_tls_context->require_client_certificate =
+ google_protobuf_BoolValue_value(require_client_certificate);
+ }
+ }
+ if (downstream_tls_context->common_tls_context
+ .tls_certificate_certificate_provider_instance.instance_name
+ .empty()) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "TLS configuration provided but no "
+ "tls_certificate_certificate_provider_instance found.");
+ }
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* CidrRangeParse(
+ const envoy_config_core_v3_CidrRange* cidr_range_proto,
+ XdsApi::LdsUpdate::FilterChainMap::CidrRange* cidr_range) {
+ TString address_prefix = UpbStringToStdString(
+ envoy_config_core_v3_CidrRange_address_prefix(cidr_range_proto));
+ grpc_error* error = grpc_string_to_sockaddr_new(&cidr_range->address,
+ address_prefix.c_str(), 0);
+ if (error != GRPC_ERROR_NONE) return error;
+ cidr_range->prefix_len = 0;
+ auto* prefix_len_proto =
+ envoy_config_core_v3_CidrRange_prefix_len(cidr_range_proto);
+ if (prefix_len_proto != nullptr) {
+ cidr_range->prefix_len = std::min(
+ google_protobuf_UInt32Value_value(prefix_len_proto),
+ (reinterpret_cast<const grpc_sockaddr*>(cidr_range->address.addr))
+ ->sa_family == GRPC_AF_INET
+ ? uint32_t(32)
+ : uint32_t(128));
+ }
+ // Normalize the network address by masking it with prefix_len
+ grpc_sockaddr_mask_bits(&cidr_range->address, cidr_range->prefix_len);
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* FilterChainMatchParse(
+ const envoy_config_listener_v3_FilterChainMatch* filter_chain_match_proto,
+ FilterChain::FilterChainMatch* filter_chain_match) {
+ auto* destination_port =
+ envoy_config_listener_v3_FilterChainMatch_destination_port(
+ filter_chain_match_proto);
+ if (destination_port != nullptr) {
+ filter_chain_match->destination_port =
+ google_protobuf_UInt32Value_value(destination_port);
+ }
+ size_t size = 0;
+ auto* prefix_ranges = envoy_config_listener_v3_FilterChainMatch_prefix_ranges(
+ filter_chain_match_proto, &size);
+ filter_chain_match->prefix_ranges.reserve(size);
+ for (size_t i = 0; i < size; i++) {
+ XdsApi::LdsUpdate::FilterChainMap::CidrRange cidr_range;
+ grpc_error* error = CidrRangeParse(prefix_ranges[i], &cidr_range);
+ if (error != GRPC_ERROR_NONE) return error;
+ filter_chain_match->prefix_ranges.push_back(cidr_range);
+ }
+ filter_chain_match->source_type =
+ static_cast<XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType>(
+ envoy_config_listener_v3_FilterChainMatch_source_type(
+ filter_chain_match_proto));
+ auto* source_prefix_ranges =
+ envoy_config_listener_v3_FilterChainMatch_source_prefix_ranges(
+ filter_chain_match_proto, &size);
+ filter_chain_match->source_prefix_ranges.reserve(size);
+ for (size_t i = 0; i < size; i++) {
+ XdsApi::LdsUpdate::FilterChainMap::CidrRange cidr_range;
+ grpc_error* error = CidrRangeParse(source_prefix_ranges[i], &cidr_range);
+ if (error != GRPC_ERROR_NONE) return error;
+ filter_chain_match->source_prefix_ranges.push_back(cidr_range);
+ }
+ auto* source_ports = envoy_config_listener_v3_FilterChainMatch_source_ports(
+ filter_chain_match_proto, &size);
+ filter_chain_match->source_ports.reserve(size);
+ for (size_t i = 0; i < size; i++) {
+ filter_chain_match->source_ports.push_back(source_ports[i]);
+ }
+ auto* server_names = envoy_config_listener_v3_FilterChainMatch_server_names(
+ filter_chain_match_proto, &size);
+ for (size_t i = 0; i < size; i++) {
+ filter_chain_match->server_names.push_back(
+ UpbStringToStdString(server_names[i]));
+ }
+ filter_chain_match->transport_protocol = UpbStringToStdString(
+ envoy_config_listener_v3_FilterChainMatch_transport_protocol(
+ filter_chain_match_proto));
+ auto* application_protocols =
+ envoy_config_listener_v3_FilterChainMatch_application_protocols(
+ filter_chain_match_proto, &size);
+ for (size_t i = 0; i < size; i++) {
+ filter_chain_match->application_protocols.push_back(
+ UpbStringToStdString(application_protocols[i]));
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* FilterChainParse(
+ const EncodingContext& context,
+ const envoy_config_listener_v3_FilterChain* filter_chain_proto, bool is_v2,
+ FilterChain* filter_chain) {
+ grpc_error* error = GRPC_ERROR_NONE;
+ auto* filter_chain_match =
+ envoy_config_listener_v3_FilterChain_filter_chain_match(
+ filter_chain_proto);
+ if (filter_chain_match != nullptr) {
+ error = FilterChainMatchParse(filter_chain_match,
+ &filter_chain->filter_chain_match);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
+ // Parse the filters list. Currently we only support HttpConnectionManager.
+ size_t size = 0;
+ auto* filters =
+ envoy_config_listener_v3_FilterChain_filters(filter_chain_proto, &size);
+ if (size != 1) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "FilterChain should have exactly one filter: HttpConnectionManager; no "
+ "other filter is supported at the moment");
+ }
+ auto* typed_config = envoy_config_listener_v3_Filter_typed_config(filters[0]);
+ if (typed_config == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No typed_config found in filter.");
+ }
+ y_absl::string_view type_url =
+ UpbStringToAbsl(google_protobuf_Any_type_url(typed_config));
+ if (type_url !=
+ "type.googleapis.com/"
+ "envoy.extensions.filters.network.http_connection_manager.v3."
+ "HttpConnectionManager") {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Unsupported filter type ", type_url).c_str());
+ }
+ const upb_strview encoded_http_connection_manager =
+ google_protobuf_Any_value(typed_config);
+ const auto* http_connection_manager =
+ envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_parse(
+ encoded_http_connection_manager.data,
+ encoded_http_connection_manager.size, context.arena);
+ if (http_connection_manager == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Could not parse HttpConnectionManager config from filter "
+ "typed_config");
+ }
+ filter_chain->filter_chain_data =
+ std::make_shared<XdsApi::LdsUpdate::FilterChainData>();
+ error = HttpConnectionManagerParse(
+ false /* is_client */, context, http_connection_manager, is_v2,
+ &filter_chain->filter_chain_data->http_connection_manager);
+ if (error != GRPC_ERROR_NONE) return error;
+ // Get the DownstreamTlsContext for the filter chain
+ if (XdsSecurityEnabled()) {
+ auto* transport_socket =
+ envoy_config_listener_v3_FilterChain_transport_socket(
+ filter_chain_proto);
+ if (transport_socket != nullptr) {
+ error = DownstreamTlsContextParse(
+ context, transport_socket,
+ &filter_chain->filter_chain_data->downstream_tls_context);
+ }
+ }
+ return error;
+}
+
+grpc_error* AddressParse(const envoy_config_core_v3_Address* address_proto,
+ TString* address) {
+ const auto* socket_address =
+ envoy_config_core_v3_Address_socket_address(address_proto);
+ if (socket_address == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ "Address does not have socket_address");
+ }
+ if (envoy_config_core_v3_SocketAddress_protocol(socket_address) !=
+ envoy_config_core_v3_SocketAddress_TCP) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "SocketAddress protocol is not TCP");
+ }
+ uint32_t port = envoy_config_core_v3_SocketAddress_port_value(socket_address);
+ if (port > 65535) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid port");
+ }
+ *address = JoinHostPort(
+ UpbStringToAbsl(
+ envoy_config_core_v3_SocketAddress_address(socket_address)),
+ port);
+ return GRPC_ERROR_NONE;
+}
+
+// An intermediate map for filter chains that we create to validate the list of
+// filter chains received from the control plane and to finally create
+// XdsApi::LdsUpdate::FilterChainMap
+struct InternalFilterChainMap {
+ using SourceIpMap =
+ std::map<TString, XdsApi::LdsUpdate::FilterChainMap::SourceIp>;
+ using ConnectionSourceTypesArray = std::array<SourceIpMap, 3>;
+ struct DestinationIp {
+ y_absl::optional<XdsApi::LdsUpdate::FilterChainMap::CidrRange> prefix_range;
+ bool transport_protocol_raw_buffer_provided = false;
+ ConnectionSourceTypesArray source_types_array;
+ };
+ using DestinationIpMap = std::map<TString, DestinationIp>;
+ DestinationIpMap destination_ip_map;
+};
+
+grpc_error* AddFilterChainDataForSourcePort(
+ const FilterChain& filter_chain,
+ XdsApi::LdsUpdate::FilterChainMap::SourcePortsMap* ports_map,
+ uint32_t port) {
+ auto insert_result = ports_map->emplace(
+ port, XdsApi::LdsUpdate::FilterChainMap::FilterChainDataSharedPtr{
+ filter_chain.filter_chain_data});
+ if (!insert_result.second) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(
+ "Duplicate matching rules detected when adding filter chain: ",
+ filter_chain.filter_chain_match.ToString())
+ .c_str());
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* AddFilterChainDataForSourcePorts(
+ const FilterChain& filter_chain,
+ XdsApi::LdsUpdate::FilterChainMap::SourcePortsMap* ports_map) {
+ if (filter_chain.filter_chain_match.source_ports.empty()) {
+ return AddFilterChainDataForSourcePort(filter_chain, ports_map, 0);
+ } else {
+ for (uint32_t port : filter_chain.filter_chain_match.source_ports) {
+ grpc_error* error =
+ AddFilterChainDataForSourcePort(filter_chain, ports_map, port);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* AddFilterChainDataForSourceIpRange(
+ const FilterChain& filter_chain,
+ InternalFilterChainMap::SourceIpMap* source_ip_map) {
+ if (filter_chain.filter_chain_match.source_prefix_ranges.empty()) {
+ auto insert_result = source_ip_map->emplace(
+ "", XdsApi::LdsUpdate::FilterChainMap::SourceIp());
+ return AddFilterChainDataForSourcePorts(
+ filter_chain, &insert_result.first->second.ports_map);
+ } else {
+ for (const auto& prefix_range :
+ filter_chain.filter_chain_match.source_prefix_ranges) {
+ auto insert_result = source_ip_map->emplace(
+ y_absl::StrCat(grpc_sockaddr_to_string(&prefix_range.address, false),
+ "/", prefix_range.prefix_len),
+ XdsApi::LdsUpdate::FilterChainMap::SourceIp());
+ if (insert_result.second) {
+ insert_result.first->second.prefix_range.emplace(prefix_range);
+ }
+ grpc_error* error = AddFilterChainDataForSourcePorts(
+ filter_chain, &insert_result.first->second.ports_map);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
+ }
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* AddFilterChainDataForSourceType(
+ const FilterChain& filter_chain,
+ InternalFilterChainMap::DestinationIp* destination_ip) {
+ GPR_ASSERT(static_cast<unsigned int>(
+ filter_chain.filter_chain_match.source_type) < 3);
+ return AddFilterChainDataForSourceIpRange(
+ filter_chain, &destination_ip->source_types_array[static_cast<int>(
+ filter_chain.filter_chain_match.source_type)]);
+}
+
+grpc_error* AddFilterChainDataForApplicationProtocols(
+ const FilterChain& filter_chain,
+ InternalFilterChainMap::DestinationIp* destination_ip) {
+ // Only allow filter chains that do not mention application protocols
+ if (!filter_chain.filter_chain_match.application_protocols.empty()) {
+ return GRPC_ERROR_NONE;
+ }
+ return AddFilterChainDataForSourceType(filter_chain, destination_ip);
+}
+
+grpc_error* AddFilterChainDataForTransportProtocol(
+ const FilterChain& filter_chain,
+ InternalFilterChainMap::DestinationIp* destination_ip) {
+ const TString& transport_protocol =
+ filter_chain.filter_chain_match.transport_protocol;
+ // Only allow filter chains with no transport protocol or "raw_buffer"
+ if (!transport_protocol.empty() && transport_protocol != "raw_buffer") {
+ return GRPC_ERROR_NONE;
+ }
+ // If for this configuration, we've already seen filter chains that mention
+ // the transport protocol as "raw_buffer", we will never match filter chains
+ // that do not mention it.
+ if (destination_ip->transport_protocol_raw_buffer_provided &&
+ transport_protocol.empty()) {
+ return GRPC_ERROR_NONE;
+ }
+ if (!transport_protocol.empty() &&
+ !destination_ip->transport_protocol_raw_buffer_provided) {
+ destination_ip->transport_protocol_raw_buffer_provided = true;
+ // Clear out the previous entries if any since those entries did not mention
+ // "raw_buffer"
+ destination_ip->source_types_array =
+ InternalFilterChainMap::ConnectionSourceTypesArray();
+ }
+ return AddFilterChainDataForApplicationProtocols(filter_chain,
+ destination_ip);
+}
+
+grpc_error* AddFilterChainDataForServerNames(
+ const FilterChain& filter_chain,
+ InternalFilterChainMap::DestinationIp* destination_ip) {
+ // Don't continue adding filter chains with server names mentioned
+ if (!filter_chain.filter_chain_match.server_names.empty()) {
+ return GRPC_ERROR_NONE;
+ }
+ return AddFilterChainDataForTransportProtocol(filter_chain, destination_ip);
+}
+
+grpc_error* AddFilterChainDataForDestinationIpRange(
+ const FilterChain& filter_chain,
+ InternalFilterChainMap::DestinationIpMap* destination_ip_map) {
+ if (filter_chain.filter_chain_match.prefix_ranges.empty()) {
+ auto insert_result = destination_ip_map->emplace(
+ "", InternalFilterChainMap::DestinationIp());
+ return AddFilterChainDataForServerNames(filter_chain,
+ &insert_result.first->second);
+ } else {
+ for (const auto& prefix_range :
+ filter_chain.filter_chain_match.prefix_ranges) {
+ auto insert_result = destination_ip_map->emplace(
+ y_absl::StrCat(grpc_sockaddr_to_string(&prefix_range.address, false),
+ "/", prefix_range.prefix_len),
+ InternalFilterChainMap::DestinationIp());
+ if (insert_result.second) {
+ insert_result.first->second.prefix_range.emplace(prefix_range);
+ }
+ grpc_error* error = AddFilterChainDataForServerNames(
+ filter_chain, &insert_result.first->second);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
+ }
+ return GRPC_ERROR_NONE;
+}
+
+XdsApi::LdsUpdate::FilterChainMap BuildFromInternalFilterChainMap(
+ InternalFilterChainMap* internal_filter_chain_map) {
+ XdsApi::LdsUpdate::FilterChainMap filter_chain_map;
+ for (auto& destination_ip_pair :
+ internal_filter_chain_map->destination_ip_map) {
+ XdsApi::LdsUpdate::FilterChainMap::DestinationIp destination_ip;
+ destination_ip.prefix_range = destination_ip_pair.second.prefix_range;
+ for (int i = 0; i < 3; i++) {
+ auto& source_ip_map = destination_ip_pair.second.source_types_array[i];
+ for (auto& source_ip_pair : source_ip_map) {
+ destination_ip.source_types_array[i].push_back(
+ std::move(source_ip_pair.second));
+ }
+ }
+ filter_chain_map.destination_ip_vector.push_back(std::move(destination_ip));
+ }
+ return filter_chain_map;
+}
+
+grpc_error* BuildFilterChainMap(
+ const std::vector<FilterChain>& filter_chains,
+ XdsApi::LdsUpdate::FilterChainMap* filter_chain_map) {
+ InternalFilterChainMap internal_filter_chain_map;
+ for (const auto& filter_chain : filter_chains) {
+ // Discard filter chain entries that specify destination port
+ if (filter_chain.filter_chain_match.destination_port != 0) continue;
+ grpc_error* error = AddFilterChainDataForDestinationIpRange(
+ filter_chain, &internal_filter_chain_map.destination_ip_map);
+ if (error != GRPC_ERROR_NONE) return error;
+ }
+ *filter_chain_map =
+ BuildFromInternalFilterChainMap(&internal_filter_chain_map);
+ return GRPC_ERROR_NONE;
+}
+
+grpc_error* LdsResponseParseServer(
+ const EncodingContext& context,
+ const envoy_config_listener_v3_Listener* listener, bool is_v2,
+ XdsApi::LdsUpdate* lds_update) {
+ lds_update->type = XdsApi::LdsUpdate::ListenerType::kTcpListener;
+ grpc_error* error =
+ AddressParse(envoy_config_listener_v3_Listener_address(listener),
+ &lds_update->address);
+ if (error != GRPC_ERROR_NONE) return error;
+ const auto* use_original_dst =
+ envoy_config_listener_v3_Listener_use_original_dst(listener);
+ if (use_original_dst != nullptr) {
+ if (google_protobuf_BoolValue_value(use_original_dst)) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Field \'use_original_dst\' is not supported.");
+ }
+ }
+ size_t size = 0;
+ auto* filter_chains =
+ envoy_config_listener_v3_Listener_filter_chains(listener, &size);
+ std::vector<FilterChain> parsed_filter_chains;
+ parsed_filter_chains.reserve(size);
+ for (size_t i = 0; i < size; i++) {
+ FilterChain filter_chain;
+ error = FilterChainParse(context, filter_chains[i], is_v2, &filter_chain);
+ if (error != GRPC_ERROR_NONE) return error;
+ parsed_filter_chains.push_back(std::move(filter_chain));
+ }
+ error =
+ BuildFilterChainMap(parsed_filter_chains, &lds_update->filter_chain_map);
+ if (error != GRPC_ERROR_NONE) return error;
+ auto* default_filter_chain =
+ envoy_config_listener_v3_Listener_default_filter_chain(listener);
+ if (default_filter_chain != nullptr) {
+ FilterChain filter_chain;
+ error =
+ FilterChainParse(context, default_filter_chain, is_v2, &filter_chain);
+ if (error != GRPC_ERROR_NONE) return error;
+ if (filter_chain.filter_chain_data != nullptr) {
+ lds_update->default_filter_chain =
+ std::move(*filter_chain.filter_chain_data);
+ }
+ }
+ if (size == 0 && default_filter_chain == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING("No filter chain provided.");
+ }
+ return GRPC_ERROR_NONE;
+}
+
grpc_error* LdsResponseParse(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_service_discovery_v3_DiscoveryResponse* response,
const std::set<y_absl::string_view>& expected_listener_names,
- XdsApi::LdsUpdateMap* lds_update_map, upb_arena* arena) {
+ XdsApi::LdsUpdateMap* lds_update_map,
+ std::set<TString>* resource_names_failed) {
+ std::vector<grpc_error*> errors;
// Get the resources from the response.
size_t size;
const google_protobuf_Any* const* resources =
@@ -1665,17 +2504,24 @@ grpc_error* LdsResponseParse(
// Check the type_url of the resource.
y_absl::string_view type_url =
UpbStringToAbsl(google_protobuf_Any_type_url(resources[i]));
- if (!IsLds(type_url)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not LDS.");
+ bool is_v2 = false;
+ if (!IsLds(type_url, &is_v2)) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Resource is not LDS.")
+ .c_str()));
+ continue;
}
// Decode the listener.
const upb_strview encoded_listener =
google_protobuf_Any_value(resources[i]);
const envoy_config_listener_v3_Listener* listener =
- envoy_config_listener_v3_Listener_parse(encoded_listener.data,
- encoded_listener.size, arena);
+ envoy_config_listener_v3_Listener_parse(
+ encoded_listener.data, encoded_listener.size, context.arena);
if (listener == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode listener.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Can't decode listener.")
+ .c_str()));
+ continue;
}
// Check listener name. Ignore unexpected listeners.
TString listener_name =
@@ -1686,75 +2532,62 @@ grpc_error* LdsResponseParse(
}
// Fail if listener name is duplicated.
if (lds_update_map->find(listener_name) != lds_update_map->end()) {
- return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("duplicate listener name \"", listener_name, "\"")
- .c_str());
+ .c_str()));
+ resource_names_failed->insert(listener_name);
+ continue;
}
- XdsApi::LdsUpdate& lds_update = (*lds_update_map)[listener_name];
- // Get api_listener and decode it to http_connection_manager.
+ // Serialize into JSON and store it in the LdsUpdateMap
+ XdsApi::LdsResourceData& lds_resource_data =
+ (*lds_update_map)[listener_name];
+ XdsApi::LdsUpdate& lds_update = lds_resource_data.resource;
+ lds_resource_data.serialized_proto = UpbStringToStdString(encoded_listener);
+ // Check whether it's a client or server listener.
const envoy_config_listener_v3_ApiListener* api_listener =
envoy_config_listener_v3_Listener_api_listener(listener);
- if (api_listener == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Listener has no ApiListener.");
- }
- const upb_strview encoded_api_listener = google_protobuf_Any_value(
- envoy_config_listener_v3_ApiListener_api_listener(api_listener));
- const envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager*
- http_connection_manager =
- envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_parse(
- encoded_api_listener.data, encoded_api_listener.size, arena);
- if (http_connection_manager == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Could not parse HttpConnectionManager config from ApiListener");
- }
- // Found inlined route_config. Parse it to find the cluster_name.
- if (envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_route_config(
- http_connection_manager)) {
- const envoy_config_route_v3_RouteConfiguration* route_config =
- envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_route_config(
- http_connection_manager);
- XdsApi::RdsUpdate rds_update;
- grpc_error* error =
- RouteConfigParse(client, tracer, route_config, &rds_update);
- if (error != GRPC_ERROR_NONE) return error;
- lds_update.rds_update = std::move(rds_update);
+ const envoy_config_core_v3_Address* address =
+ envoy_config_listener_v3_Listener_address(listener);
+ if (api_listener != nullptr && address != nullptr) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(listener_name,
+ ": Listener has both address and ApiListener")
+ .c_str()));
+ resource_names_failed->insert(listener_name);
continue;
}
- // Validate that RDS must be used to get the route_config dynamically.
- if (!envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_has_rds(
- http_connection_manager)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "HttpConnectionManager neither has inlined route_config nor RDS.");
+ if (api_listener == nullptr && address == nullptr) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(listener_name,
+ ": Listener has neither address nor ApiListener")
+ .c_str()));
+ resource_names_failed->insert(listener_name);
+ continue;
}
- const envoy_extensions_filters_network_http_connection_manager_v3_Rds* rds =
- envoy_extensions_filters_network_http_connection_manager_v3_HttpConnectionManager_rds(
- http_connection_manager);
- // Check that the ConfigSource specifies ADS.
- const envoy_config_core_v3_ConfigSource* config_source =
- envoy_extensions_filters_network_http_connection_manager_v3_Rds_config_source(
- rds);
- if (config_source == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "HttpConnectionManager missing config_source for RDS.");
+ grpc_error* error = GRPC_ERROR_NONE;
+ if (api_listener != nullptr) {
+ error = LdsResponseParseClient(context, api_listener, is_v2, &lds_update);
+ } else {
+ error = LdsResponseParseServer(context, listener, is_v2, &lds_update);
}
- if (!envoy_config_core_v3_ConfigSource_has_ads(config_source)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "HttpConnectionManager ConfigSource for RDS does not specify ADS.");
+ if (error != GRPC_ERROR_NONE) {
+ errors.push_back(grpc_error_add_child(
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(listener_name, ": validation error").c_str()),
+ error));
+ resource_names_failed->insert(listener_name);
}
- // Get the route_config_name.
- lds_update.route_config_name = UpbStringToStdString(
- envoy_extensions_filters_network_http_connection_manager_v3_Rds_route_config_name(
- rds));
}
- return GRPC_ERROR_NONE;
+ return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing LDS response", &errors);
}
grpc_error* RdsResponseParse(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_service_discovery_v3_DiscoveryResponse* response,
const std::set<y_absl::string_view>& expected_route_configuration_names,
- XdsApi::RdsUpdateMap* rds_update_map, upb_arena* arena) {
+ XdsApi::RdsUpdateMap* rds_update_map,
+ std::set<TString>* resource_names_failed) {
+ std::vector<grpc_error*> errors;
// Get the resources from the response.
size_t size;
const google_protobuf_Any* const* resources =
@@ -1764,16 +2597,23 @@ grpc_error* RdsResponseParse(
y_absl::string_view type_url =
UpbStringToAbsl(google_protobuf_Any_type_url(resources[i]));
if (!IsRds(type_url)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not RDS.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Resource is not RDS.")
+ .c_str()));
+ continue;
}
// Decode the route_config.
const upb_strview encoded_route_config =
google_protobuf_Any_value(resources[i]);
const envoy_config_route_v3_RouteConfiguration* route_config =
envoy_config_route_v3_RouteConfiguration_parse(
- encoded_route_config.data, encoded_route_config.size, arena);
+ encoded_route_config.data, encoded_route_config.size,
+ context.arena);
if (route_config == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode route_config.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Can't decode route_config.")
+ .c_str()));
+ continue;
}
// Check route_config_name. Ignore unexpected route_config.
TString route_config_name = UpbStringToStdString(
@@ -1784,112 +2624,39 @@ grpc_error* RdsResponseParse(
}
// Fail if route config name is duplicated.
if (rds_update_map->find(route_config_name) != rds_update_map->end()) {
- return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("duplicate route config name \"", route_config_name,
"\"")
- .c_str());
+ .c_str()));
+ resource_names_failed->insert(route_config_name);
+ continue;
}
+ // Serialize into JSON and store it in the RdsUpdateMap
+ XdsApi::RdsResourceData& rds_resource_data =
+ (*rds_update_map)[route_config_name];
+ XdsApi::RdsUpdate& rds_update = rds_resource_data.resource;
+ rds_resource_data.serialized_proto =
+ UpbStringToStdString(encoded_route_config);
// Parse the route_config.
- XdsApi::RdsUpdate& rds_update =
- (*rds_update_map)[std::move(route_config_name)];
- grpc_error* error =
- RouteConfigParse(client, tracer, route_config, &rds_update);
- if (error != GRPC_ERROR_NONE) return error;
- }
- return GRPC_ERROR_NONE;
-}
-
-grpc_error* CommonTlsContextParse(
- const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*
- common_tls_context_proto,
- XdsApi::CommonTlsContext* common_tls_context) GRPC_MUST_USE_RESULT;
-grpc_error* CommonTlsContextParse(
- const envoy_extensions_transport_sockets_tls_v3_CommonTlsContext*
- common_tls_context_proto,
- XdsApi::CommonTlsContext* common_tls_context) {
- auto* combined_validation_context =
- envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_combined_validation_context(
- common_tls_context_proto);
- if (combined_validation_context != nullptr) {
- auto* default_validation_context =
- envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_default_validation_context(
- combined_validation_context);
- if (default_validation_context != nullptr) {
- size_t len = 0;
- auto* subject_alt_names_matchers =
- envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_match_subject_alt_names(
- default_validation_context, &len);
- for (size_t i = 0; i < len; ++i) {
- XdsApi::StringMatcher matcher;
- if (envoy_type_matcher_v3_StringMatcher_has_exact(
- subject_alt_names_matchers[i])) {
- matcher.type = XdsApi::StringMatcher::StringMatcherType::EXACT;
- matcher.string_matcher =
- UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_exact(
- subject_alt_names_matchers[i]));
- } else if (envoy_type_matcher_v3_StringMatcher_has_prefix(
- subject_alt_names_matchers[i])) {
- matcher.type = XdsApi::StringMatcher::StringMatcherType::PREFIX;
- matcher.string_matcher =
- UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_prefix(
- subject_alt_names_matchers[i]));
- } else if (envoy_type_matcher_v3_StringMatcher_has_suffix(
- subject_alt_names_matchers[i])) {
- matcher.type = XdsApi::StringMatcher::StringMatcherType::SUFFIX;
- matcher.string_matcher =
- UpbStringToStdString(envoy_type_matcher_v3_StringMatcher_suffix(
- subject_alt_names_matchers[i]));
- } else if (envoy_type_matcher_v3_StringMatcher_has_safe_regex(
- subject_alt_names_matchers[i])) {
- matcher.type = XdsApi::StringMatcher::StringMatcherType::SAFE_REGEX;
- auto* regex_matcher = envoy_type_matcher_v3_StringMatcher_safe_regex(
- subject_alt_names_matchers[i]);
- std::unique_ptr<RE2> regex =
- y_absl::make_unique<RE2>(UpbStringToStdString(
- envoy_type_matcher_v3_RegexMatcher_regex(regex_matcher)));
- if (!regex->ok()) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid regex string specified in string matcher.");
- }
- matcher.regex_match = std::move(regex);
- } else {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid StringMatcher specified");
- }
- matcher.ignore_case = envoy_type_matcher_v3_StringMatcher_ignore_case(
- subject_alt_names_matchers[i]);
- common_tls_context->combined_validation_context
- .default_validation_context.match_subject_alt_names.emplace_back(
- matcher);
- }
- }
- auto* validation_context_certificate_provider_instance =
- envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CombinedCertificateValidationContext_validation_context_certificate_provider_instance(
- combined_validation_context);
- if (validation_context_certificate_provider_instance != nullptr) {
- common_tls_context->combined_validation_context
- .validation_context_certificate_provider_instance = UpbStringToStdString(
- envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_instance_name(
- validation_context_certificate_provider_instance));
+ grpc_error* error = RouteConfigParse(context, route_config, &rds_update);
+ if (error != GRPC_ERROR_NONE) {
+ errors.push_back(grpc_error_add_child(
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(route_config_name, ": validation error").c_str()),
+ error));
+ resource_names_failed->insert(route_config_name);
}
}
- auto* tls_certificate_certificate_provider_instance =
- envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_tls_certificate_certificate_provider_instance(
- common_tls_context_proto);
- if (tls_certificate_certificate_provider_instance != nullptr) {
- common_tls_context
- ->tls_certificate_certificate_provider_instance = UpbStringToStdString(
- envoy_extensions_transport_sockets_tls_v3_CommonTlsContext_CertificateProviderInstance_instance_name(
- tls_certificate_certificate_provider_instance));
- }
- return GRPC_ERROR_NONE;
+ return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing RDS response", &errors);
}
grpc_error* CdsResponseParse(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_service_discovery_v3_DiscoveryResponse* response,
const std::set<y_absl::string_view>& expected_cluster_names,
- XdsApi::CdsUpdateMap* cds_update_map, upb_arena* arena) {
+ XdsApi::CdsUpdateMap* cds_update_map,
+ std::set<TString>* resource_names_failed) {
+ std::vector<grpc_error*> errors;
// Get the resources from the response.
size_t size;
const google_protobuf_Any* const* resources =
@@ -1900,17 +2667,23 @@ grpc_error* CdsResponseParse(
y_absl::string_view type_url =
UpbStringToAbsl(google_protobuf_Any_type_url(resources[i]));
if (!IsCds(type_url)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not CDS.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Resource is not CDS.")
+ .c_str()));
+ continue;
}
// Decode the cluster.
const upb_strview encoded_cluster = google_protobuf_Any_value(resources[i]);
const envoy_config_cluster_v3_Cluster* cluster =
- envoy_config_cluster_v3_Cluster_parse(encoded_cluster.data,
- encoded_cluster.size, arena);
+ envoy_config_cluster_v3_Cluster_parse(
+ encoded_cluster.data, encoded_cluster.size, context.arena);
if (cluster == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode cluster.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Can't decode cluster.")
+ .c_str()));
+ continue;
}
- MaybeLogCluster(client, tracer, cluster);
+ MaybeLogCluster(context, cluster);
// Ignore unexpected cluster names.
TString cluster_name =
UpbStringToStdString(envoy_config_cluster_v3_Cluster_name(cluster));
@@ -1920,69 +2693,249 @@ grpc_error* CdsResponseParse(
}
// Fail on duplicate resources.
if (cds_update_map->find(cluster_name) != cds_update_map->end()) {
- return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("duplicate resource name \"", cluster_name, "\"")
- .c_str());
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
}
- XdsApi::CdsUpdate& cds_update = (*cds_update_map)[std::move(cluster_name)];
+ // Serialize into JSON and store it in the CdsUpdateMap
+ XdsApi::CdsResourceData& cds_resource_data =
+ (*cds_update_map)[cluster_name];
+ XdsApi::CdsUpdate& cds_update = cds_resource_data.resource;
+ cds_resource_data.serialized_proto = UpbStringToStdString(encoded_cluster);
// Check the cluster_discovery_type.
- if (!envoy_config_cluster_v3_Cluster_has_type(cluster)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("DiscoveryType not found.");
+ if (!envoy_config_cluster_v3_Cluster_has_type(cluster) &&
+ !envoy_config_cluster_v3_Cluster_has_cluster_type(cluster)) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": DiscoveryType not found.").c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
}
- if (envoy_config_cluster_v3_Cluster_type(cluster) !=
+ if (envoy_config_cluster_v3_Cluster_type(cluster) ==
envoy_config_cluster_v3_Cluster_EDS) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("DiscoveryType is not EDS.");
- }
- // Check the EDS config source.
- const envoy_config_cluster_v3_Cluster_EdsClusterConfig* eds_cluster_config =
- envoy_config_cluster_v3_Cluster_eds_cluster_config(cluster);
- const envoy_config_core_v3_ConfigSource* eds_config =
- envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(
- eds_cluster_config);
- if (!envoy_config_core_v3_ConfigSource_has_ads(eds_config)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "EDS ConfigSource is not ADS.");
- }
- // Record EDS service_name (if any).
- upb_strview service_name =
- envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name(
- eds_cluster_config);
- if (service_name.size != 0) {
- cds_update.eds_service_name = UpbStringToStdString(service_name);
+ cds_update.cluster_type = XdsApi::CdsUpdate::ClusterType::EDS;
+ // Check the EDS config source.
+ const envoy_config_cluster_v3_Cluster_EdsClusterConfig*
+ eds_cluster_config =
+ envoy_config_cluster_v3_Cluster_eds_cluster_config(cluster);
+ const envoy_config_core_v3_ConfigSource* eds_config =
+ envoy_config_cluster_v3_Cluster_EdsClusterConfig_eds_config(
+ eds_cluster_config);
+ if (!envoy_config_core_v3_ConfigSource_has_ads(eds_config)) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": EDS ConfigSource is not ADS.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ // Record EDS service_name (if any).
+ upb_strview service_name =
+ envoy_config_cluster_v3_Cluster_EdsClusterConfig_service_name(
+ eds_cluster_config);
+ if (service_name.size != 0) {
+ cds_update.eds_service_name = UpbStringToStdString(service_name);
+ }
+ } else if (!XdsAggregateAndLogicalDnsClusterEnabled()) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": DiscoveryType is not valid.").c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ } else if (envoy_config_cluster_v3_Cluster_type(cluster) ==
+ envoy_config_cluster_v3_Cluster_LOGICAL_DNS) {
+ cds_update.cluster_type = XdsApi::CdsUpdate::ClusterType::LOGICAL_DNS;
+ } else {
+ if (envoy_config_cluster_v3_Cluster_has_cluster_type(cluster)) {
+ const envoy_config_cluster_v3_Cluster_CustomClusterType*
+ custom_cluster_type =
+ envoy_config_cluster_v3_Cluster_cluster_type(cluster);
+ upb_strview type_name =
+ envoy_config_cluster_v3_Cluster_CustomClusterType_name(
+ custom_cluster_type);
+ if (UpbStringToAbsl(type_name) == "envoy.clusters.aggregate") {
+ cds_update.cluster_type = XdsApi::CdsUpdate::ClusterType::AGGREGATE;
+ // Retrieve aggregate clusters.
+ const google_protobuf_Any* typed_config =
+ envoy_config_cluster_v3_Cluster_CustomClusterType_typed_config(
+ custom_cluster_type);
+ const upb_strview aggregate_cluster_config_upb_strview =
+ google_protobuf_Any_value(typed_config);
+ const envoy_extensions_clusters_aggregate_v3_ClusterConfig*
+ aggregate_cluster_config =
+ envoy_extensions_clusters_aggregate_v3_ClusterConfig_parse(
+ aggregate_cluster_config_upb_strview.data,
+ aggregate_cluster_config_upb_strview.size, context.arena);
+ if (aggregate_cluster_config == nullptr) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": Can't parse aggregate cluster.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ size_t size;
+ const upb_strview* clusters =
+ envoy_extensions_clusters_aggregate_v3_ClusterConfig_clusters(
+ aggregate_cluster_config, &size);
+ for (size_t i = 0; i < size; ++i) {
+ const upb_strview cluster = clusters[i];
+ cds_update.prioritized_cluster_names.emplace_back(
+ UpbStringToStdString(cluster));
+ }
+ } else {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": DiscoveryType is not valid.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ } else {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": DiscoveryType is not valid.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
}
// Check the LB policy.
- if (envoy_config_cluster_v3_Cluster_lb_policy(cluster) !=
+ if (envoy_config_cluster_v3_Cluster_lb_policy(cluster) ==
envoy_config_cluster_v3_Cluster_ROUND_ROBIN) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "LB policy is not ROUND_ROBIN.");
+ cds_update.lb_policy = "ROUND_ROBIN";
+ } else if (XdsRingHashEnabled() &&
+ envoy_config_cluster_v3_Cluster_lb_policy(cluster) ==
+ envoy_config_cluster_v3_Cluster_RING_HASH) {
+ cds_update.lb_policy = "RING_HASH";
+ // Record ring hash lb config
+ auto* ring_hash_config =
+ envoy_config_cluster_v3_Cluster_ring_hash_lb_config(cluster);
+ if (ring_hash_config == nullptr) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name,
+ ": ring hash lb config required but not present.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ const google_protobuf_UInt64Value* max_ring_size =
+ envoy_config_cluster_v3_Cluster_RingHashLbConfig_maximum_ring_size(
+ ring_hash_config);
+ if (max_ring_size != nullptr) {
+ cds_update.max_ring_size =
+ google_protobuf_UInt64Value_value(max_ring_size);
+ if (cds_update.max_ring_size > 8388608 ||
+ cds_update.max_ring_size == 0) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(
+ cluster_name,
+ ": max_ring_size is not in the range of 1 to 8388608.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ }
+ const google_protobuf_UInt64Value* min_ring_size =
+ envoy_config_cluster_v3_Cluster_RingHashLbConfig_minimum_ring_size(
+ ring_hash_config);
+ if (min_ring_size != nullptr) {
+ cds_update.min_ring_size =
+ google_protobuf_UInt64Value_value(min_ring_size);
+ if (cds_update.min_ring_size > 8388608 ||
+ cds_update.min_ring_size == 0) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(
+ cluster_name,
+ ": min_ring_size is not in the range of 1 to 8388608.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ if (cds_update.min_ring_size > cds_update.max_ring_size) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(
+ cluster_name,
+ ": min_ring_size cannot be greater than max_ring_size.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ }
+ if (envoy_config_cluster_v3_Cluster_RingHashLbConfig_hash_function(
+ ring_hash_config) ==
+ envoy_config_cluster_v3_Cluster_RingHashLbConfig_XX_HASH) {
+ cds_update.hash_function = XdsApi::CdsUpdate::HashFunction::XX_HASH;
+ } else if (
+ envoy_config_cluster_v3_Cluster_RingHashLbConfig_hash_function(
+ ring_hash_config) ==
+ envoy_config_cluster_v3_Cluster_RingHashLbConfig_MURMUR_HASH_2) {
+ cds_update.hash_function =
+ XdsApi::CdsUpdate::HashFunction::MURMUR_HASH_2;
+ } else {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name,
+ ": ring hash lb config has invalid hash function.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ } else {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": LB policy is not supported.").c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
}
- // Record Upstream tls context
- auto* transport_socket =
- envoy_config_cluster_v3_Cluster_transport_socket(cluster);
- if (transport_socket != nullptr) {
- y_absl::string_view name = UpbStringToAbsl(
- envoy_config_core_v3_TransportSocket_name(transport_socket));
- if (name == "tls") {
- auto* typed_config =
- envoy_config_core_v3_TransportSocket_typed_config(transport_socket);
- if (typed_config != nullptr) {
- const upb_strview encoded_upstream_tls_context =
- google_protobuf_Any_value(typed_config);
- auto* upstream_tls_context =
- envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_parse(
- encoded_upstream_tls_context.data,
- encoded_upstream_tls_context.size, arena);
- if (upstream_tls_context == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Can't decode upstream tls context.");
+ if (XdsSecurityEnabled()) {
+ // Record Upstream tls context
+ auto* transport_socket =
+ envoy_config_cluster_v3_Cluster_transport_socket(cluster);
+ if (transport_socket != nullptr) {
+ y_absl::string_view name = UpbStringToAbsl(
+ envoy_config_core_v3_TransportSocket_name(transport_socket));
+ if (name == "envoy.transport_sockets.tls") {
+ auto* typed_config =
+ envoy_config_core_v3_TransportSocket_typed_config(
+ transport_socket);
+ if (typed_config != nullptr) {
+ const upb_strview encoded_upstream_tls_context =
+ google_protobuf_Any_value(typed_config);
+ auto* upstream_tls_context =
+ envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_parse(
+ encoded_upstream_tls_context.data,
+ encoded_upstream_tls_context.size, context.arena);
+ if (upstream_tls_context == nullptr) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name,
+ ": Can't decode upstream tls context.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ auto* common_tls_context =
+ envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_common_tls_context(
+ upstream_tls_context);
+ if (common_tls_context != nullptr) {
+ grpc_error* error = CommonTlsContextParse(
+ common_tls_context, &cds_update.common_tls_context);
+ if (error != GRPC_ERROR_NONE) {
+ errors.push_back(grpc_error_add_child(
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": error in TLS context")
+ .c_str()),
+ error));
+ resource_names_failed->insert(cluster_name);
+ continue;
+ }
+ }
}
- auto* common_tls_context =
- envoy_extensions_transport_sockets_tls_v3_UpstreamTlsContext_common_tls_context(
- upstream_tls_context);
- if (common_tls_context != nullptr) {
- grpc_error* error = CommonTlsContextParse(
- common_tls_context, &cds_update.common_tls_context);
- if (error != GRPC_ERROR_NONE) return error;
+ if (cds_update.common_tls_context.combined_validation_context
+ .validation_context_certificate_provider_instance
+ .instance_name.empty()) {
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name,
+ "TLS configuration provided but no "
+ "validation_context_certificate_provider_instance "
+ "found.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
}
}
}
@@ -1992,8 +2945,11 @@ grpc_error* CdsResponseParse(
envoy_config_cluster_v3_Cluster_lrs_server(cluster);
if (lrs_server != nullptr) {
if (!envoy_config_core_v3_ConfigSource_has_self(lrs_server)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "LRS ConfigSource is not self.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(cluster_name, ": LRS ConfigSource is not self.")
+ .c_str()));
+ resource_names_failed->insert(cluster_name);
+ continue;
}
cds_update.lrs_load_reporting_server_name.emplace("");
}
@@ -2024,7 +2980,7 @@ grpc_error* CdsResponseParse(
}
}
}
- return GRPC_ERROR_NONE;
+ return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing CDS response", &errors);
}
grpc_error* ServerAddressParseAndAppend(
@@ -2052,7 +3008,9 @@ grpc_error* ServerAddressParseAndAppend(
}
// Populate grpc_resolved_address.
grpc_resolved_address addr;
- grpc_string_to_sockaddr(&addr, address_str.c_str(), port);
+ grpc_error* error =
+ grpc_string_to_sockaddr_new(&addr, address_str.c_str(), port);
+ if (error != GRPC_ERROR_NONE) return error;
// Append the address to the list.
list->emplace_back(addr, nullptr);
return GRPC_ERROR_NONE;
@@ -2075,6 +3033,9 @@ grpc_error* LocalityParse(
const envoy_config_core_v3_Locality* locality =
envoy_config_endpoint_v3_LocalityLbEndpoints_locality(
locality_lb_endpoints);
+ if (locality == nullptr) {
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Empty locality.");
+ }
TString region =
UpbStringToStdString(envoy_config_core_v3_Locality_region(locality));
TString zone =
@@ -2107,7 +3068,7 @@ grpc_error* DropParseAndAppend(
TString category = UpbStringToStdString(
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_DropOverload_category(
drop_overload));
- if (category.size() == 0) {
+ if (category.empty()) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Empty drop category name");
}
// Get the drop rate (per million).
@@ -2139,10 +3100,12 @@ grpc_error* DropParseAndAppend(
}
grpc_error* EdsResponseParse(
- XdsClient* client, TraceFlag* tracer,
+ const EncodingContext& context,
const envoy_service_discovery_v3_DiscoveryResponse* response,
const std::set<y_absl::string_view>& expected_eds_service_names,
- XdsApi::EdsUpdateMap* eds_update_map, upb_arena* arena) {
+ XdsApi::EdsUpdateMap* eds_update_map,
+ std::set<TString>* resource_names_failed) {
+ std::vector<grpc_error*> errors;
// Get the resources from the response.
size_t size;
const google_protobuf_Any* const* resources =
@@ -2152,7 +3115,10 @@ grpc_error* EdsResponseParse(
y_absl::string_view type_url =
UpbStringToAbsl(google_protobuf_Any_type_url(resources[i]));
if (!IsEds(type_url)) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Resource is not EDS.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i, ": Resource is not EDS.")
+ .c_str()));
+ continue;
}
// Get the cluster_load_assignment.
upb_strview encoded_cluster_load_assignment =
@@ -2160,12 +3126,15 @@ grpc_error* EdsResponseParse(
envoy_config_endpoint_v3_ClusterLoadAssignment* cluster_load_assignment =
envoy_config_endpoint_v3_ClusterLoadAssignment_parse(
encoded_cluster_load_assignment.data,
- encoded_cluster_load_assignment.size, arena);
+ encoded_cluster_load_assignment.size, context.arena);
if (cluster_load_assignment == nullptr) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Can't parse cluster_load_assignment.");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("resource index ", i,
+ ": Can't parse cluster_load_assignment.")
+ .c_str()));
+ continue;
}
- MaybeLogClusterLoadAssignment(client, tracer, cluster_load_assignment);
+ MaybeLogClusterLoadAssignment(context, cluster_load_assignment);
// Check the EDS service name. Ignore unexpected names.
TString eds_service_name = UpbStringToStdString(
envoy_config_endpoint_v3_ClusterLoadAssignment_cluster_name(
@@ -2176,22 +3145,29 @@ grpc_error* EdsResponseParse(
}
// Fail on duplicate resources.
if (eds_update_map->find(eds_service_name) != eds_update_map->end()) {
- return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("duplicate resource name \"", eds_service_name, "\"")
- .c_str());
+ .c_str()));
+ resource_names_failed->insert(eds_service_name);
+ continue;
}
- XdsApi::EdsUpdate& eds_update =
- (*eds_update_map)[std::move(eds_service_name)];
+ // Serialize into JSON and store it in the EdsUpdateMap
+ XdsApi::EdsResourceData& eds_resource_data =
+ (*eds_update_map)[eds_service_name];
+ XdsApi::EdsUpdate& eds_update = eds_resource_data.resource;
+ eds_resource_data.serialized_proto =
+ UpbStringToStdString(encoded_cluster_load_assignment);
// Get the endpoints.
size_t locality_size;
const envoy_config_endpoint_v3_LocalityLbEndpoints* const* endpoints =
envoy_config_endpoint_v3_ClusterLoadAssignment_endpoints(
cluster_load_assignment, &locality_size);
+ grpc_error* error = GRPC_ERROR_NONE;
for (size_t j = 0; j < locality_size; ++j) {
size_t priority;
XdsApi::EdsUpdate::Priority::Locality locality;
- grpc_error* error = LocalityParse(endpoints[j], &locality, &priority);
- if (error != GRPC_ERROR_NONE) return error;
+ error = LocalityParse(endpoints[j], &locality, &priority);
+ if (error != GRPC_ERROR_NONE) break;
// Filter out locality with weight 0.
if (locality.lb_weight == 0) continue;
// Make sure prorities is big enough. Note that they might not
@@ -2202,10 +3178,21 @@ grpc_error* EdsResponseParse(
eds_update.priorities[priority].localities.emplace(locality.name.get(),
std::move(locality));
}
+ if (error != GRPC_ERROR_NONE) {
+ errors.push_back(grpc_error_add_child(
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(eds_service_name, ": locality validation error")
+ .c_str()),
+ error));
+ resource_names_failed->insert(eds_service_name);
+ continue;
+ }
for (const auto& priority : eds_update.priorities) {
if (priority.localities.empty()) {
- return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "EDS update includes sparse priority list");
+ errors.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(eds_service_name, ": sparse priority list").c_str()));
+ resource_names_failed->insert(eds_service_name);
+ continue;
}
}
// Get the drop config.
@@ -2220,13 +3207,22 @@ grpc_error* EdsResponseParse(
envoy_config_endpoint_v3_ClusterLoadAssignment_Policy_drop_overloads(
policy, &drop_size);
for (size_t j = 0; j < drop_size; ++j) {
- grpc_error* error =
+ error =
DropParseAndAppend(drop_overload[j], eds_update.drop_config.get());
- if (error != GRPC_ERROR_NONE) return error;
+ if (error != GRPC_ERROR_NONE) break;
+ }
+ if (error != GRPC_ERROR_NONE) {
+ errors.push_back(grpc_error_add_child(
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat(eds_service_name, ": drop config validation error")
+ .c_str()),
+ error));
+ resource_names_failed->insert(eds_service_name);
+ continue;
}
}
}
- return GRPC_ERROR_NONE;
+ return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing EDS response", &errors);
}
TString TypeUrlInternalToExternal(y_absl::string_view type_url) {
@@ -2242,16 +3238,27 @@ TString TypeUrlInternalToExternal(y_absl::string_view type_url) {
return TString(type_url);
}
+template <typename UpdateMap>
+void MoveUpdatesToFailedSet(UpdateMap* update_map,
+ std::set<TString>* resource_names_failed) {
+ for (const auto& p : *update_map) {
+ resource_names_failed->insert(p.first);
+ }
+ update_map->clear();
+}
+
} // namespace
XdsApi::AdsParseResult XdsApi::ParseAdsResponse(
- const grpc_slice& encoded_response,
+ const XdsBootstrap::XdsServer& server, const grpc_slice& encoded_response,
const std::set<y_absl::string_view>& expected_listener_names,
const std::set<y_absl::string_view>& expected_route_configuration_names,
const std::set<y_absl::string_view>& expected_cluster_names,
const std::set<y_absl::string_view>& expected_eds_service_names) {
AdsParseResult result;
upb::Arena arena;
+ const EncodingContext context = {client_, tracer_, symtab_.ptr(), arena.ptr(),
+ server.ShouldUseV3()};
// Decode the response.
const envoy_service_discovery_v3_DiscoveryResponse* response =
envoy_service_discovery_v3_DiscoveryResponse_parse(
@@ -2263,7 +3270,7 @@ XdsApi::AdsParseResult XdsApi::ParseAdsResponse(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Can't decode DiscoveryResponse.");
return result;
}
- MaybeLogDiscoveryResponse(client_, tracer_, response);
+ MaybeLogDiscoveryResponse(context, response);
// Record the type_url, the version_info, and the nonce of the response.
result.type_url = TypeUrlInternalToExternal(UpbStringToAbsl(
envoy_service_discovery_v3_DiscoveryResponse_type_url(response)));
@@ -2274,20 +3281,36 @@ XdsApi::AdsParseResult XdsApi::ParseAdsResponse(
// Parse the response according to the resource type.
if (IsLds(result.type_url)) {
result.parse_error =
- LdsResponseParse(client_, tracer_, response, expected_listener_names,
- &result.lds_update_map, arena.ptr());
+ LdsResponseParse(context, response, expected_listener_names,
+ &result.lds_update_map, &result.resource_names_failed);
+ if (result.parse_error != GRPC_ERROR_NONE) {
+ MoveUpdatesToFailedSet(&result.lds_update_map,
+ &result.resource_names_failed);
+ }
} else if (IsRds(result.type_url)) {
- result.parse_error = RdsResponseParse(client_, tracer_, response,
- expected_route_configuration_names,
- &result.rds_update_map, arena.ptr());
+ result.parse_error =
+ RdsResponseParse(context, response, expected_route_configuration_names,
+ &result.rds_update_map, &result.resource_names_failed);
+ if (result.parse_error != GRPC_ERROR_NONE) {
+ MoveUpdatesToFailedSet(&result.rds_update_map,
+ &result.resource_names_failed);
+ }
} else if (IsCds(result.type_url)) {
result.parse_error =
- CdsResponseParse(client_, tracer_, response, expected_cluster_names,
- &result.cds_update_map, arena.ptr());
+ CdsResponseParse(context, response, expected_cluster_names,
+ &result.cds_update_map, &result.resource_names_failed);
+ if (result.parse_error != GRPC_ERROR_NONE) {
+ MoveUpdatesToFailedSet(&result.cds_update_map,
+ &result.resource_names_failed);
+ }
} else if (IsEds(result.type_url)) {
result.parse_error =
- EdsResponseParse(client_, tracer_, response, expected_eds_service_names,
- &result.eds_update_map, arena.ptr());
+ EdsResponseParse(context, response, expected_eds_service_names,
+ &result.eds_update_map, &result.resource_names_failed);
+ if (result.parse_error != GRPC_ERROR_NONE) {
+ MoveUpdatesToFailedSet(&result.eds_update_map,
+ &result.resource_names_failed);
+ }
}
return result;
}
@@ -2295,136 +3318,35 @@ XdsApi::AdsParseResult XdsApi::ParseAdsResponse(
namespace {
void MaybeLogLrsRequest(
- XdsClient* client, TraceFlag* tracer,
- const envoy_service_load_stats_v3_LoadStatsRequest* request,
- const TString& build_version) {
- if (GRPC_TRACE_FLAG_ENABLED(*tracer) &&
+ const EncodingContext& context,
+ const envoy_service_load_stats_v3_LoadStatsRequest* request) {
+ if (GRPC_TRACE_FLAG_ENABLED(*context.tracer) &&
gpr_should_log(GPR_LOG_SEVERITY_DEBUG)) {
- // TODO(roth): When we can upgrade upb, use upb textformat code to dump
- // the raw proto instead of doing this manually.
- std::vector<TString> fields;
- // node
- const auto* node =
- envoy_service_load_stats_v3_LoadStatsRequest_node(request);
- if (node != nullptr) {
- AddNodeLogFields(node, build_version, &fields);
- }
- // cluster_stats
- size_t num_cluster_stats;
- const struct envoy_config_endpoint_v3_ClusterStats* const* cluster_stats =
- envoy_service_load_stats_v3_LoadStatsRequest_cluster_stats(
- request, &num_cluster_stats);
- for (size_t i = 0; i < num_cluster_stats; ++i) {
- const auto* cluster_stat = cluster_stats[i];
- fields.emplace_back("cluster_stats {");
- // cluster_name
- AddStringField(
- " cluster_name",
- envoy_config_endpoint_v3_ClusterStats_cluster_name(cluster_stat),
- &fields);
- // cluster_service_name
- AddStringField(" cluster_service_name",
- envoy_config_endpoint_v3_ClusterStats_cluster_service_name(
- cluster_stat),
- &fields);
- // upstream_locality_stats
- size_t num_stats;
- const envoy_config_endpoint_v3_UpstreamLocalityStats* const* stats =
- envoy_config_endpoint_v3_ClusterStats_upstream_locality_stats(
- cluster_stat, &num_stats);
- for (size_t j = 0; j < num_stats; ++j) {
- const auto* stat = stats[j];
- fields.emplace_back(" upstream_locality_stats {");
- // locality
- const auto* locality =
- envoy_config_endpoint_v3_UpstreamLocalityStats_locality(stat);
- if (locality != nullptr) {
- fields.emplace_back(" locality {");
- AddLocalityField(3, locality, &fields);
- fields.emplace_back(" }");
- }
- // total_successful_requests
- fields.emplace_back(y_absl::StrCat(
- " total_successful_requests: ",
- envoy_config_endpoint_v3_UpstreamLocalityStats_total_successful_requests(
- stat)));
- // total_requests_in_progress
- fields.emplace_back(y_absl::StrCat(
- " total_requests_in_progress: ",
- envoy_config_endpoint_v3_UpstreamLocalityStats_total_requests_in_progress(
- stat)));
- // total_error_requests
- fields.emplace_back(y_absl::StrCat(
- " total_error_requests: ",
- envoy_config_endpoint_v3_UpstreamLocalityStats_total_error_requests(
- stat)));
- // total_issued_requests
- fields.emplace_back(y_absl::StrCat(
- " total_issued_requests: ",
- envoy_config_endpoint_v3_UpstreamLocalityStats_total_issued_requests(
- stat)));
- fields.emplace_back(" }");
- }
- // total_dropped_requests
- fields.emplace_back(y_absl::StrCat(
- " total_dropped_requests: ",
- envoy_config_endpoint_v3_ClusterStats_total_dropped_requests(
- cluster_stat)));
- // dropped_requests
- size_t num_drops;
- const envoy_config_endpoint_v3_ClusterStats_DroppedRequests* const*
- drops = envoy_config_endpoint_v3_ClusterStats_dropped_requests(
- cluster_stat, &num_drops);
- for (size_t j = 0; j < num_drops; ++j) {
- const auto* drop = drops[j];
- fields.emplace_back(" dropped_requests {");
- // category
- AddStringField(
- " category",
- envoy_config_endpoint_v3_ClusterStats_DroppedRequests_category(
- drop),
- &fields);
- // dropped_count
- fields.emplace_back(y_absl::StrCat(
- " dropped_count: ",
- envoy_config_endpoint_v3_ClusterStats_DroppedRequests_dropped_count(
- drop)));
- fields.emplace_back(" }");
- }
- // load_report_interval
- const auto* load_report_interval =
- envoy_config_endpoint_v3_ClusterStats_load_report_interval(
- cluster_stat);
- if (load_report_interval != nullptr) {
- fields.emplace_back(" load_report_interval {");
- fields.emplace_back(y_absl::StrCat(
- " seconds: ",
- google_protobuf_Duration_seconds(load_report_interval)));
- fields.emplace_back(
- y_absl::StrCat(" nanos: ",
- google_protobuf_Duration_nanos(load_report_interval)));
- fields.emplace_back(" }");
- }
- fields.emplace_back("}");
- }
- gpr_log(GPR_DEBUG, "[xds_client %p] constructed LRS request: %s", client,
- y_absl::StrJoin(fields, "\n").c_str());
+ const upb_msgdef* msg_type =
+ envoy_service_load_stats_v3_LoadStatsRequest_getmsgdef(context.symtab);
+ char buf[10240];
+ upb_text_encode(request, msg_type, nullptr, 0, buf, sizeof(buf));
+ gpr_log(GPR_DEBUG, "[xds_client %p] constructed LRS request: %s",
+ context.client, buf);
}
}
grpc_slice SerializeLrsRequest(
- const envoy_service_load_stats_v3_LoadStatsRequest* request,
- upb_arena* arena) {
+ const EncodingContext& context,
+ const envoy_service_load_stats_v3_LoadStatsRequest* request) {
size_t output_length;
char* output = envoy_service_load_stats_v3_LoadStatsRequest_serialize(
- request, arena, &output_length);
+ request, context.arena, &output_length);
return grpc_slice_from_copied_buffer(output, output_length);
}
} // namespace
-grpc_slice XdsApi::CreateLrsInitialRequest() {
+grpc_slice XdsApi::CreateLrsInitialRequest(
+ const XdsBootstrap::XdsServer& server) {
upb::Arena arena;
+ const EncodingContext context = {client_, tracer_, symtab_.ptr(), arena.ptr(),
+ server.ShouldUseV3()};
// Create a request.
envoy_service_load_stats_v3_LoadStatsRequest* request =
envoy_service_load_stats_v3_LoadStatsRequest_new(arena.ptr());
@@ -2432,25 +3354,25 @@ grpc_slice XdsApi::CreateLrsInitialRequest() {
envoy_config_core_v3_Node* node_msg =
envoy_service_load_stats_v3_LoadStatsRequest_mutable_node(request,
arena.ptr());
- PopulateNode(arena.ptr(), bootstrap_, build_version_, user_agent_name_,
- node_msg);
+ PopulateNode(context, node_, build_version_, user_agent_name_, node_msg);
envoy_config_core_v3_Node_add_client_features(
node_msg, upb_strview_makez("envoy.lrs.supports_send_all_clusters"),
arena.ptr());
- MaybeLogLrsRequest(client_, tracer_, request, build_version_);
- return SerializeLrsRequest(request, arena.ptr());
+ MaybeLogLrsRequest(context, request);
+ return SerializeLrsRequest(context, request);
}
namespace {
void LocalityStatsPopulate(
+ const EncodingContext& context,
envoy_config_endpoint_v3_UpstreamLocalityStats* output,
const XdsLocalityName& locality_name,
- const XdsClusterLocalityStats::Snapshot& snapshot, upb_arena* arena) {
+ const XdsClusterLocalityStats::Snapshot& snapshot) {
// Set locality.
envoy_config_core_v3_Locality* locality =
- envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality(output,
- arena);
+ envoy_config_endpoint_v3_UpstreamLocalityStats_mutable_locality(
+ output, context.arena);
if (!locality_name.region().empty()) {
envoy_config_core_v3_Locality_set_region(
locality, StdStringToUpbString(locality_name.region()));
@@ -2478,7 +3400,7 @@ void LocalityStatsPopulate(
const XdsClusterLocalityStats::BackendMetric& metric_value = p.second;
envoy_config_endpoint_v3_EndpointLoadMetricStats* load_metric =
envoy_config_endpoint_v3_UpstreamLocalityStats_add_load_metric_stats(
- output, arena);
+ output, context.arena);
envoy_config_endpoint_v3_EndpointLoadMetricStats_set_metric_name(
load_metric, StdStringToUpbString(metric_name));
envoy_config_endpoint_v3_EndpointLoadMetricStats_set_num_requests_finished_with_metric(
@@ -2493,6 +3415,8 @@ void LocalityStatsPopulate(
grpc_slice XdsApi::CreateLrsRequest(
ClusterLoadReportMap cluster_load_report_map) {
upb::Arena arena;
+ const EncodingContext context = {client_, tracer_, symtab_.ptr(), arena.ptr(),
+ false};
// Create a request.
envoy_service_load_stats_v3_LoadStatsRequest* request =
envoy_service_load_stats_v3_LoadStatsRequest_new(arena.ptr());
@@ -2519,8 +3443,7 @@ grpc_slice XdsApi::CreateLrsRequest(
envoy_config_endpoint_v3_UpstreamLocalityStats* locality_stats =
envoy_config_endpoint_v3_ClusterStats_add_upstream_locality_stats(
cluster_stats, arena.ptr());
- LocalityStatsPopulate(locality_stats, locality_name, snapshot,
- arena.ptr());
+ LocalityStatsPopulate(context, locality_stats, locality_name, snapshot);
}
// Add dropped requests.
uint64_t total_dropped_requests = 0;
@@ -2549,8 +3472,8 @@ grpc_slice XdsApi::CreateLrsRequest(
google_protobuf_Duration_set_seconds(load_report_interval, timespec.tv_sec);
google_protobuf_Duration_set_nanos(load_report_interval, timespec.tv_nsec);
}
- MaybeLogLrsRequest(client_, tracer_, request, build_version_);
- return SerializeLrsRequest(request, arena.ptr());
+ MaybeLogLrsRequest(context, request);
+ return SerializeLrsRequest(context, request);
}
grpc_error* XdsApi::ParseLrsResponse(const grpc_slice& encoded_response,
@@ -2593,4 +3516,276 @@ grpc_error* XdsApi::ParseLrsResponse(const grpc_slice& encoded_response,
return GRPC_ERROR_NONE;
}
+namespace {
+google_protobuf_Timestamp* GrpcMillisToTimestamp(const EncodingContext& context,
+ grpc_millis value) {
+ google_protobuf_Timestamp* timestamp =
+ google_protobuf_Timestamp_new(context.arena);
+ gpr_timespec timespec = grpc_millis_to_timespec(value, GPR_CLOCK_REALTIME);
+ google_protobuf_Timestamp_set_seconds(timestamp, timespec.tv_sec);
+ google_protobuf_Timestamp_set_nanos(timestamp, timespec.tv_nsec);
+ return timestamp;
+}
+
+envoy_admin_v3_UpdateFailureState* CreateUpdateFailureStateUpb(
+ const EncodingContext& context,
+ const XdsApi::ResourceMetadata* resource_metadata) {
+ auto* update_failure_state =
+ envoy_admin_v3_UpdateFailureState_new(context.arena);
+ envoy_admin_v3_UpdateFailureState_set_details(
+ update_failure_state,
+ StdStringToUpbString(resource_metadata->failed_details));
+ envoy_admin_v3_UpdateFailureState_set_version_info(
+ update_failure_state,
+ StdStringToUpbString(resource_metadata->failed_version));
+ envoy_admin_v3_UpdateFailureState_set_last_update_attempt(
+ update_failure_state,
+ GrpcMillisToTimestamp(context, resource_metadata->failed_update_time));
+ return update_failure_state;
+}
+
+void DumpLdsConfig(const EncodingContext& context,
+ const XdsApi::ResourceTypeMetadata& resource_type_metadata,
+ envoy_service_status_v3_PerXdsConfig* per_xds_config) {
+ upb_strview kLdsTypeUrlUpb = upb_strview_makez(XdsApi::kLdsTypeUrl);
+ auto* listener_config_dump =
+ envoy_service_status_v3_PerXdsConfig_mutable_listener_config(
+ per_xds_config, context.arena);
+ envoy_admin_v3_ListenersConfigDump_set_version_info(
+ listener_config_dump,
+ StdStringToUpbString(resource_type_metadata.version));
+ for (auto& p : resource_type_metadata.resource_metadata_map) {
+ y_absl::string_view name = p.first;
+ const XdsApi::ResourceMetadata* meta = p.second;
+ const upb_strview name_upb = StdStringToUpbString(name);
+ auto* dynamic_listener =
+ envoy_admin_v3_ListenersConfigDump_add_dynamic_listeners(
+ listener_config_dump, context.arena);
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_name(
+ dynamic_listener, name_upb);
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_client_status(
+ dynamic_listener, meta->client_status);
+ if (!meta->serialized_proto.empty()) {
+ // Set in-effective listeners
+ auto* dynamic_listener_state =
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_mutable_active_state(
+ dynamic_listener, context.arena);
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_version_info(
+ dynamic_listener_state, StdStringToUpbString(meta->version));
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState_set_last_updated(
+ dynamic_listener_state,
+ GrpcMillisToTimestamp(context, meta->update_time));
+ auto* listener_any =
+ envoy_admin_v3_ListenersConfigDump_DynamicListenerState_mutable_listener(
+ dynamic_listener_state, context.arena);
+ google_protobuf_Any_set_type_url(listener_any, kLdsTypeUrlUpb);
+ google_protobuf_Any_set_value(
+ listener_any, StdStringToUpbString(meta->serialized_proto));
+ }
+ if (meta->client_status == XdsApi::ResourceMetadata::NACKED) {
+ // Set error_state if NACKED
+ envoy_admin_v3_ListenersConfigDump_DynamicListener_set_error_state(
+ dynamic_listener, CreateUpdateFailureStateUpb(context, meta));
+ }
+ }
+}
+
+void DumpRdsConfig(const EncodingContext& context,
+ const XdsApi::ResourceTypeMetadata& resource_type_metadata,
+ envoy_service_status_v3_PerXdsConfig* per_xds_config) {
+ upb_strview kRdsTypeUrlUpb = upb_strview_makez(XdsApi::kRdsTypeUrl);
+ auto* route_config_dump =
+ envoy_service_status_v3_PerXdsConfig_mutable_route_config(per_xds_config,
+ context.arena);
+ for (auto& p : resource_type_metadata.resource_metadata_map) {
+ y_absl::string_view name = p.first;
+ const XdsApi::ResourceMetadata* meta = p.second;
+ const upb_strview name_upb = StdStringToUpbString(name);
+ auto* dynamic_route_config =
+ envoy_admin_v3_RoutesConfigDump_add_dynamic_route_configs(
+ route_config_dump, context.arena);
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_client_status(
+ dynamic_route_config, meta->client_status);
+ auto* route_config_any =
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_mutable_route_config(
+ dynamic_route_config, context.arena);
+ if (!meta->serialized_proto.empty()) {
+ // Set in-effective route configs
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_version_info(
+ dynamic_route_config, StdStringToUpbString(meta->version));
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_last_updated(
+ dynamic_route_config,
+ GrpcMillisToTimestamp(context, meta->update_time));
+ google_protobuf_Any_set_type_url(route_config_any, kRdsTypeUrlUpb);
+ google_protobuf_Any_set_value(
+ route_config_any, StdStringToUpbString(meta->serialized_proto));
+ } else {
+ // If there isn't a working route config, we still need to print the
+ // name.
+ auto* route_config =
+ envoy_config_route_v3_RouteConfiguration_new(context.arena);
+ envoy_config_route_v3_RouteConfiguration_set_name(route_config, name_upb);
+ size_t length;
+ char* bytes = envoy_config_route_v3_RouteConfiguration_serialize(
+ route_config, context.arena, &length);
+ google_protobuf_Any_set_type_url(route_config_any, kRdsTypeUrlUpb);
+ google_protobuf_Any_set_value(route_config_any,
+ upb_strview_make(bytes, length));
+ }
+ if (meta->client_status == XdsApi::ResourceMetadata::NACKED) {
+ // Set error_state if NACKED
+ envoy_admin_v3_RoutesConfigDump_DynamicRouteConfig_set_error_state(
+ dynamic_route_config, CreateUpdateFailureStateUpb(context, meta));
+ }
+ }
+}
+
+void DumpCdsConfig(const EncodingContext& context,
+ const XdsApi::ResourceTypeMetadata& resource_type_metadata,
+ envoy_service_status_v3_PerXdsConfig* per_xds_config) {
+ upb_strview kCdsTypeUrlUpb = upb_strview_makez(XdsApi::kCdsTypeUrl);
+ auto* cluster_config_dump =
+ envoy_service_status_v3_PerXdsConfig_mutable_cluster_config(
+ per_xds_config, context.arena);
+ envoy_admin_v3_ClustersConfigDump_set_version_info(
+ cluster_config_dump,
+ StdStringToUpbString(resource_type_metadata.version));
+ for (auto& p : resource_type_metadata.resource_metadata_map) {
+ y_absl::string_view name = p.first;
+ const XdsApi::ResourceMetadata* meta = p.second;
+ const upb_strview name_upb = StdStringToUpbString(name);
+ auto* dynamic_cluster =
+ envoy_admin_v3_ClustersConfigDump_add_dynamic_active_clusters(
+ cluster_config_dump, context.arena);
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_client_status(
+ dynamic_cluster, meta->client_status);
+ auto* cluster_any =
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_mutable_cluster(
+ dynamic_cluster, context.arena);
+ if (!meta->serialized_proto.empty()) {
+ // Set in-effective clusters
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_version_info(
+ dynamic_cluster, StdStringToUpbString(meta->version));
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_last_updated(
+ dynamic_cluster, GrpcMillisToTimestamp(context, meta->update_time));
+ google_protobuf_Any_set_type_url(cluster_any, kCdsTypeUrlUpb);
+ google_protobuf_Any_set_value(
+ cluster_any, StdStringToUpbString(meta->serialized_proto));
+ } else {
+ // If there isn't a working cluster, we still need to print the name.
+ auto* cluster = envoy_config_cluster_v3_Cluster_new(context.arena);
+ envoy_config_cluster_v3_Cluster_set_name(cluster, name_upb);
+ size_t length;
+ char* bytes = envoy_config_cluster_v3_Cluster_serialize(
+ cluster, context.arena, &length);
+ google_protobuf_Any_set_type_url(cluster_any, kCdsTypeUrlUpb);
+ google_protobuf_Any_set_value(cluster_any,
+ upb_strview_make(bytes, length));
+ }
+ if (meta->client_status == XdsApi::ResourceMetadata::NACKED) {
+ // Set error_state if NACKED
+ envoy_admin_v3_ClustersConfigDump_DynamicCluster_set_error_state(
+ dynamic_cluster, CreateUpdateFailureStateUpb(context, meta));
+ }
+ }
+}
+
+void DumpEdsConfig(const EncodingContext& context,
+ const XdsApi::ResourceTypeMetadata& resource_type_metadata,
+ envoy_service_status_v3_PerXdsConfig* per_xds_config) {
+ upb_strview kEdsTypeUrlUpb = upb_strview_makez(XdsApi::kEdsTypeUrl);
+ auto* endpoint_config_dump =
+ envoy_service_status_v3_PerXdsConfig_mutable_endpoint_config(
+ per_xds_config, context.arena);
+ for (auto& p : resource_type_metadata.resource_metadata_map) {
+ y_absl::string_view name = p.first;
+ const XdsApi::ResourceMetadata* meta = p.second;
+ const upb_strview name_upb = StdStringToUpbString(name);
+ auto* dynamic_endpoint =
+ envoy_admin_v3_EndpointsConfigDump_add_dynamic_endpoint_configs(
+ endpoint_config_dump, context.arena);
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_client_status(
+ dynamic_endpoint, meta->client_status);
+ auto* endpoint_any =
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_mutable_endpoint_config(
+ dynamic_endpoint, context.arena);
+ if (!meta->serialized_proto.empty()) {
+ // Set in-effective endpoints
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_version_info(
+ dynamic_endpoint, StdStringToUpbString(meta->version));
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_last_updated(
+ dynamic_endpoint, GrpcMillisToTimestamp(context, meta->update_time));
+ google_protobuf_Any_set_type_url(endpoint_any, kEdsTypeUrlUpb);
+ google_protobuf_Any_set_value(
+ endpoint_any, StdStringToUpbString(meta->serialized_proto));
+ } else {
+ // If there isn't a working endpoint, we still need to print the name.
+ auto* cluster_load_assignment =
+ envoy_config_endpoint_v3_ClusterLoadAssignment_new(context.arena);
+ envoy_config_endpoint_v3_ClusterLoadAssignment_set_cluster_name(
+ cluster_load_assignment, name_upb);
+ size_t length;
+ char* bytes = envoy_config_endpoint_v3_ClusterLoadAssignment_serialize(
+ cluster_load_assignment, context.arena, &length);
+ google_protobuf_Any_set_type_url(endpoint_any, kEdsTypeUrlUpb);
+ google_protobuf_Any_set_value(endpoint_any,
+ upb_strview_make(bytes, length));
+ }
+ if (meta->client_status == XdsApi::ResourceMetadata::NACKED) {
+ // Set error_state if NACKED
+ envoy_admin_v3_EndpointsConfigDump_DynamicEndpointConfig_set_error_state(
+ dynamic_endpoint, CreateUpdateFailureStateUpb(context, meta));
+ }
+ }
+}
+
+} // namespace
+
+TString XdsApi::AssembleClientConfig(
+ const ResourceTypeMetadataMap& resource_type_metadata_map) {
+ upb::Arena arena;
+ // Create the ClientConfig for resource metadata from XdsClient
+ auto* client_config = envoy_service_status_v3_ClientConfig_new(arena.ptr());
+ // Fill-in the node information
+ auto* node = envoy_service_status_v3_ClientConfig_mutable_node(client_config,
+ arena.ptr());
+ const EncodingContext context = {client_, tracer_, symtab_.ptr(), arena.ptr(),
+ true};
+ PopulateNode(context, node_, build_version_, user_agent_name_, node);
+ // Dump each xDS-type config into PerXdsConfig
+ for (auto& p : resource_type_metadata_map) {
+ y_absl::string_view type_url = p.first;
+ const ResourceTypeMetadata& resource_type_metadata = p.second;
+ if (type_url == kLdsTypeUrl) {
+ auto* per_xds_config =
+ envoy_service_status_v3_ClientConfig_add_xds_config(client_config,
+ context.arena);
+ DumpLdsConfig(context, resource_type_metadata, per_xds_config);
+ } else if (type_url == kRdsTypeUrl) {
+ auto* per_xds_config =
+ envoy_service_status_v3_ClientConfig_add_xds_config(client_config,
+ context.arena);
+ DumpRdsConfig(context, resource_type_metadata, per_xds_config);
+ } else if (type_url == kCdsTypeUrl) {
+ auto* per_xds_config =
+ envoy_service_status_v3_ClientConfig_add_xds_config(client_config,
+ context.arena);
+ DumpCdsConfig(context, resource_type_metadata, per_xds_config);
+ } else if (type_url == kEdsTypeUrl) {
+ auto* per_xds_config =
+ envoy_service_status_v3_ClientConfig_add_xds_config(client_config,
+ context.arena);
+ DumpEdsConfig(context, resource_type_metadata, per_xds_config);
+ } else {
+ gpr_log(GPR_ERROR, "invalid type_url %s", TString(type_url).c_str());
+ return "";
+ }
+ }
+ // Serialize the upb message to bytes
+ size_t output_length;
+ char* output = envoy_service_status_v3_ClientConfig_serialize(
+ client_config, arena.ptr(), &output_length);
+ return TString(output, output_length);
+}
+
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_api.h b/contrib/libs/grpc/src/core/ext/xds/xds_api.h
index e421f883939..37434c094ac 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_api.h
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_api.h
@@ -29,14 +29,24 @@
#include "y_absl/types/optional.h"
#include "re2/re2.h"
+#include "upb/def.hpp"
+
#include <grpc/slice_buffer.h>
+#include "envoy/admin/v3/config_dump.upb.h"
#include "src/core/ext/filters/client_channel/server_address.h"
#include "src/core/ext/xds/xds_bootstrap.h"
#include "src/core/ext/xds/xds_client_stats.h"
+#include "src/core/ext/xds/xds_http_filters.h"
+#include "src/core/lib/matchers/matchers.h"
namespace grpc_core {
+// TODO(yashykt): Check to see if xDS security is enabled. This will be
+// removed once this feature is fully integration-tested and enabled by
+// default.
+bool XdsSecurityEnabled();
+
class XdsClient;
class XdsApi {
@@ -46,68 +56,62 @@ class XdsApi {
static const char* kCdsTypeUrl;
static const char* kEdsTypeUrl;
+ struct Duration {
+ int64_t seconds = 0;
+ int32_t nanos = 0;
+ bool operator==(const Duration& other) const {
+ return seconds == other.seconds && nanos == other.nanos;
+ }
+ TString ToString() const {
+ return y_absl::StrFormat("Duration seconds: %ld, nanos %d", seconds, nanos);
+ }
+ };
+
+ using TypedPerFilterConfig =
+ std::map<TString, XdsHttpFilterImpl::FilterConfig>;
+
// TODO(donnadionne): When we can use y_absl::variant<>, consider using that
// for: PathMatcher, HeaderMatcher, cluster_name and weighted_clusters
struct Route {
// Matchers for this route.
struct Matchers {
- struct PathMatcher {
- enum class PathMatcherType {
- PATH, // path stored in string_matcher field
- PREFIX, // prefix stored in string_matcher field
- REGEX, // regex stored in regex_matcher field
- };
- PathMatcherType type;
- TString string_matcher;
- std::unique_ptr<RE2> regex_matcher;
-
- PathMatcher() = default;
- PathMatcher(const PathMatcher& other);
- PathMatcher& operator=(const PathMatcher& other);
- bool operator==(const PathMatcher& other) const;
- TString ToString() const;
- };
-
- struct HeaderMatcher {
- enum class HeaderMatcherType {
- EXACT, // value stored in string_matcher field
- REGEX, // uses regex_match field
- RANGE, // uses range_start and range_end fields
- PRESENT, // uses present_match field
- PREFIX, // prefix stored in string_matcher field
- SUFFIX, // suffix stored in string_matcher field
- };
- TString name;
- HeaderMatcherType type;
- int64_t range_start;
- int64_t range_end;
- TString string_matcher;
- std::unique_ptr<RE2> regex_match;
- bool present_match;
- // invert_match field may or may not exisit, so initialize it to
- // false.
- bool invert_match = false;
-
- HeaderMatcher() = default;
- HeaderMatcher(const HeaderMatcher& other);
- HeaderMatcher& operator=(const HeaderMatcher& other);
- bool operator==(const HeaderMatcher& other) const;
- TString ToString() const;
- };
-
- PathMatcher path_matcher;
+ StringMatcher path_matcher;
std::vector<HeaderMatcher> header_matchers;
y_absl::optional<uint32_t> fraction_per_million;
bool operator==(const Matchers& other) const {
- return (path_matcher == other.path_matcher &&
- header_matchers == other.header_matchers &&
- fraction_per_million == other.fraction_per_million);
+ return path_matcher == other.path_matcher &&
+ header_matchers == other.header_matchers &&
+ fraction_per_million == other.fraction_per_million;
}
TString ToString() const;
};
+ struct HashPolicy {
+ enum Type { HEADER, CHANNEL_ID };
+ Type type;
+ bool terminal = false;
+ // Fields used for type HEADER.
+ TString header_name;
+ std::unique_ptr<RE2> regex = nullptr;
+ TString regex_substitution;
+
+ HashPolicy() {}
+
+ // Copyable.
+ HashPolicy(const HashPolicy& other);
+ HashPolicy& operator=(const HashPolicy& other);
+
+ // Moveable.
+ HashPolicy(HashPolicy&& other) noexcept;
+ HashPolicy& operator=(HashPolicy&& other) noexcept;
+
+ bool operator==(const HashPolicy& other) const;
+ TString ToString() const;
+ };
+
Matchers matchers;
+ std::vector<HashPolicy> hash_policies;
// Action for this route.
// TODO(roth): When we can use y_absl::variant<>, consider using that
@@ -116,17 +120,28 @@ class XdsApi {
struct ClusterWeight {
TString name;
uint32_t weight;
+ TypedPerFilterConfig typed_per_filter_config;
+
bool operator==(const ClusterWeight& other) const {
- return (name == other.name && weight == other.weight);
+ return name == other.name && weight == other.weight &&
+ typed_per_filter_config == other.typed_per_filter_config;
}
TString ToString() const;
};
std::vector<ClusterWeight> 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
+ // not set.
+ y_absl::optional<Duration> max_stream_duration;
+
+ TypedPerFilterConfig typed_per_filter_config;
bool operator==(const Route& other) const {
- return (matchers == other.matchers &&
- cluster_name == other.cluster_name &&
- weighted_clusters == other.weighted_clusters);
+ return matchers == other.matchers && cluster_name == other.cluster_name &&
+ weighted_clusters == other.weighted_clusters &&
+ max_stream_duration == other.max_stream_duration &&
+ typed_per_filter_config == other.typed_per_filter_config;
}
TString ToString() const;
};
@@ -135,9 +150,11 @@ class XdsApi {
struct VirtualHost {
std::vector<TString> domains;
std::vector<Route> routes;
+ TypedPerFilterConfig typed_per_filter_config;
bool operator==(const VirtualHost& other) const {
- return domains == other.domains && routes == other.routes;
+ return domains == other.domains && routes == other.routes &&
+ typed_per_filter_config == other.typed_per_filter_config;
}
};
@@ -150,25 +167,6 @@ class XdsApi {
VirtualHost* FindVirtualHostForDomain(const TString& domain);
};
- struct StringMatcher {
- enum class StringMatcherType {
- EXACT, // value stored in string_matcher_field
- PREFIX, // value stored in string_matcher_field
- SUFFIX, // value stored in string_matcher_field
- SAFE_REGEX, // use regex_match field
- CONTAINS, // value stored in string_matcher_field
- };
- StringMatcherType type;
- TString string_matcher;
- std::unique_ptr<RE2> regex_match;
- bool ignore_case;
-
- StringMatcher() = default;
- StringMatcher(const StringMatcher& other);
- StringMatcher& operator=(const StringMatcher& other);
- bool operator==(const StringMatcher& other) const;
- };
-
struct CommonTlsContext {
struct CertificateValidationContext {
std::vector<StringMatcher> match_subject_alt_names;
@@ -176,20 +174,40 @@ class XdsApi {
bool operator==(const CertificateValidationContext& other) const {
return match_subject_alt_names == other.match_subject_alt_names;
}
+
+ TString ToString() const;
+ bool Empty() const;
+ };
+
+ struct CertificateProviderInstance {
+ TString instance_name;
+ TString certificate_name;
+
+ bool operator==(const CertificateProviderInstance& other) const {
+ return instance_name == other.instance_name &&
+ certificate_name == other.certificate_name;
+ }
+
+ TString ToString() const;
+ bool Empty() const;
};
struct CombinedCertificateValidationContext {
CertificateValidationContext default_validation_context;
- TString validation_context_certificate_provider_instance;
+ CertificateProviderInstance
+ validation_context_certificate_provider_instance;
bool operator==(const CombinedCertificateValidationContext& other) const {
return default_validation_context == other.default_validation_context &&
validation_context_certificate_provider_instance ==
other.validation_context_certificate_provider_instance;
}
+
+ TString ToString() const;
+ bool Empty() const;
};
- TString tls_certificate_certificate_provider_instance;
+ CertificateProviderInstance tls_certificate_certificate_provider_instance;
CombinedCertificateValidationContext combined_validation_context;
bool operator==(const CommonTlsContext& other) const {
@@ -197,28 +215,187 @@ class XdsApi {
other.tls_certificate_certificate_provider_instance &&
combined_validation_context == other.combined_validation_context;
}
+
+ TString ToString() const;
+ bool Empty() const;
+ };
+
+ struct DownstreamTlsContext {
+ CommonTlsContext common_tls_context;
+ bool require_client_certificate = false;
+
+ bool operator==(const DownstreamTlsContext& other) const {
+ return common_tls_context == other.common_tls_context &&
+ require_client_certificate == other.require_client_certificate;
+ }
+
+ TString ToString() const;
+ bool Empty() const;
};
// TODO(roth): When we can use y_absl::variant<>, consider using that
// here, to enforce the fact that only one of the two fields can be set.
struct LdsUpdate {
- // The name to use in the RDS request.
- TString route_config_name;
- // The RouteConfiguration to use for this listener.
- // Present only if it is inlined in the LDS response.
- y_absl::optional<RdsUpdate> rds_update;
+ enum class ListenerType {
+ kTcpListener = 0,
+ kHttpApiListener,
+ } type;
+
+ struct HttpConnectionManager {
+ // The name to use in the RDS request.
+ TString route_config_name;
+ // Storing the Http Connection Manager Common Http Protocol Option
+ // max_stream_duration
+ Duration http_max_stream_duration;
+ // The RouteConfiguration to use for this listener.
+ // Present only if it is inlined in the LDS response.
+ y_absl::optional<RdsUpdate> rds_update;
+
+ struct HttpFilter {
+ TString name;
+ XdsHttpFilterImpl::FilterConfig config;
+
+ bool operator==(const HttpFilter& other) const {
+ return name == other.name && config == other.config;
+ }
+
+ TString ToString() const;
+ };
+ std::vector<HttpFilter> http_filters;
+
+ bool operator==(const HttpConnectionManager& other) const {
+ return route_config_name == other.route_config_name &&
+ http_max_stream_duration == other.http_max_stream_duration &&
+ rds_update == other.rds_update &&
+ http_filters == other.http_filters;
+ }
+
+ TString ToString() const;
+ };
+
+ // Populated for type=kHttpApiListener.
+ HttpConnectionManager http_connection_manager;
+
+ // Populated for type=kTcpListener.
+ // host:port listening_address set when type is kTcpListener
+ TString address;
+
+ struct FilterChainData {
+ DownstreamTlsContext downstream_tls_context;
+ // This is in principle the filter list.
+ // We currently require exactly one filter, which is the HCM.
+ HttpConnectionManager http_connection_manager;
+
+ bool operator==(const FilterChainData& other) const {
+ return downstream_tls_context == other.downstream_tls_context &&
+ http_connection_manager == other.http_connection_manager;
+ }
+
+ TString ToString() const;
+ } filter_chain_data;
+
+ // A multi-level map used to determine which filter chain to use for a given
+ // incoming connection. Determining the right filter chain for a given
+ // connection checks the following properties, in order:
+ // - destination port (never matched, so not present in map)
+ // - destination IP address
+ // - server name (never matched, so not present in map)
+ // - transport protocol (allows only "raw_buffer" or unset, prefers the
+ // former, so only one of those two types is present in map)
+ // - application protocol (never matched, so not present in map)
+ // - connection source type (any, local or external)
+ // - source IP address
+ // - source port
+ // https://www.envoyproxy.io/docs/envoy/latest/api-v3/config/listener/v3/listener_components.proto#config-listener-v3-filterchainmatch
+ // for more details
+ struct FilterChainMap {
+ struct FilterChainDataSharedPtr {
+ std::shared_ptr<FilterChainData> data;
+ bool operator==(const FilterChainDataSharedPtr& other) const {
+ return *data == *other.data;
+ }
+ };
+ struct CidrRange {
+ grpc_resolved_address address;
+ uint32_t prefix_len;
+
+ bool operator==(const CidrRange& other) const {
+ return memcmp(&address, &other.address, sizeof(address)) == 0 &&
+ prefix_len == other.prefix_len;
+ }
+
+ TString ToString() const;
+ };
+ using SourcePortsMap = std::map<uint16_t, FilterChainDataSharedPtr>;
+ struct SourceIp {
+ y_absl::optional<CidrRange> prefix_range;
+ SourcePortsMap ports_map;
+
+ bool operator==(const SourceIp& other) const {
+ return prefix_range == other.prefix_range &&
+ ports_map == other.ports_map;
+ }
+ };
+ using SourceIpVector = std::vector<SourceIp>;
+ enum class ConnectionSourceType {
+ kAny = 0,
+ kSameIpOrLoopback,
+ kExternal
+ };
+ using ConnectionSourceTypesArray = std::array<SourceIpVector, 3>;
+ struct DestinationIp {
+ y_absl::optional<CidrRange> prefix_range;
+ // We always fail match on server name, so those filter chains are not
+ // included here.
+ ConnectionSourceTypesArray source_types_array;
+
+ bool operator==(const DestinationIp& other) const {
+ return prefix_range == other.prefix_range &&
+ source_types_array == other.source_types_array;
+ }
+ };
+ // We always fail match on destination ports map
+ using DestinationIpVector = std::vector<DestinationIp>;
+ DestinationIpVector destination_ip_vector;
+
+ bool operator==(const FilterChainMap& other) const {
+ return destination_ip_vector == other.destination_ip_vector;
+ }
+
+ TString ToString() const;
+ } filter_chain_map;
+
+ y_absl::optional<FilterChainData> default_filter_chain;
bool operator==(const LdsUpdate& other) const {
- return route_config_name == other.route_config_name &&
- rds_update == other.rds_update;
+ return http_connection_manager == other.http_connection_manager &&
+ address == other.address &&
+ filter_chain_map == other.filter_chain_map &&
+ default_filter_chain == other.default_filter_chain;
}
+
+ TString ToString() const;
};
- using LdsUpdateMap = std::map<TString /*server_name*/, LdsUpdate>;
+ struct LdsResourceData {
+ LdsUpdate resource;
+ TString serialized_proto;
+ };
+
+ using LdsUpdateMap = std::map<TString /*server_name*/, LdsResourceData>;
+
+ struct RdsResourceData {
+ RdsUpdate resource;
+ TString serialized_proto;
+ };
- using RdsUpdateMap = std::map<TString /*route_config_name*/, RdsUpdate>;
+ using RdsUpdateMap =
+ std::map<TString /*route_config_name*/, RdsResourceData>;
struct CdsUpdate {
+ enum ClusterType { EDS, LOGICAL_DNS, AGGREGATE };
+ ClusterType cluster_type;
+ // For cluster type EDS.
// The name to use in the EDS request.
// If empty, the cluster name will be used.
TString eds_service_name;
@@ -229,20 +406,39 @@ class XdsApi {
// If set to the empty string, will use the same server we obtained the CDS
// data from.
y_absl::optional<TString> lrs_load_reporting_server_name;
+ // The LB policy to use (e.g., "ROUND_ROBIN" or "RING_HASH").
+ TString lb_policy;
+ // Used for RING_HASH LB policy only.
+ uint64_t min_ring_size = 1024;
+ uint64_t max_ring_size = 8388608;
+ enum HashFunction { XX_HASH, MURMUR_HASH_2 };
+ HashFunction hash_function;
// Maximum number of outstanding requests can be made to the upstream
// cluster.
uint32_t max_concurrent_requests = 1024;
+ // For cluster type AGGREGATE.
+ // The prioritized list of cluster names.
+ std::vector<TString> prioritized_cluster_names;
bool operator==(const CdsUpdate& other) const {
- return eds_service_name == other.eds_service_name &&
+ return cluster_type == other.cluster_type &&
+ eds_service_name == other.eds_service_name &&
common_tls_context == other.common_tls_context &&
lrs_load_reporting_server_name ==
other.lrs_load_reporting_server_name &&
+ prioritized_cluster_names == other.prioritized_cluster_names &&
max_concurrent_requests == other.max_concurrent_requests;
}
+
+ TString ToString() const;
+ };
+
+ struct CdsResourceData {
+ CdsUpdate resource;
+ TString serialized_proto;
};
- using CdsUpdateMap = std::map<TString /*cluster_name*/, CdsUpdate>;
+ using CdsUpdateMap = std::map<TString /*cluster_name*/, CdsResourceData>;
struct EdsUpdate {
struct Priority {
@@ -326,7 +522,13 @@ class XdsApi {
TString ToString() const;
};
- using EdsUpdateMap = std::map<TString /*eds_service_name*/, EdsUpdate>;
+ struct EdsResourceData {
+ EdsUpdate resource;
+ TString serialized_proto;
+ };
+
+ using EdsUpdateMap =
+ std::map<TString /*eds_service_name*/, EdsResourceData>;
struct ClusterLoadReport {
XdsClusterDropStats::Snapshot dropped_requests;
@@ -339,19 +541,73 @@ class XdsApi {
std::pair<TString /*cluster_name*/, TString /*eds_service_name*/>,
ClusterLoadReport>;
- XdsApi(XdsClient* client, TraceFlag* tracer, const XdsBootstrap* bootstrap);
+ // The metadata of the xDS resource; used by the xDS config dump.
+ struct ResourceMetadata {
+ // Resource status from the view of a xDS client, which tells the
+ // synchronization status between the xDS client and the xDS server.
+ enum ClientResourceStatus {
+ // Client requested this resource but hasn't received any update from
+ // management server. The client will not fail requests, but will queue
+ // them
+ // until update arrives or the client times out waiting for the resource.
+ REQUESTED = 1,
+ // This resource has been requested by the client but has either not been
+ // delivered by the server or was previously delivered by the server and
+ // then subsequently removed from resources provided by the server.
+ DOES_NOT_EXIST,
+ // Client received this resource and replied with ACK.
+ ACKED,
+ // Client received this resource and replied with NACK.
+ NACKED
+ };
- // Creates an ADS request.
- // Takes ownership of \a error.
- grpc_slice CreateAdsRequest(const TString& type_url,
- const std::set<y_absl::string_view>& resource_names,
- const TString& version,
- const TString& nonce, grpc_error* error,
- bool populate_node);
+ // The client status of this resource.
+ ClientResourceStatus client_status = REQUESTED;
+ // The serialized bytes of the last successfully updated raw xDS resource.
+ TString serialized_proto;
+ // The timestamp when the resource was last successfully updated.
+ grpc_millis update_time = 0;
+ // The last successfully updated version of the resource.
+ TString version;
+ // The rejected version string of the last failed update attempt.
+ TString failed_version;
+ // Details about the last failed update attempt.
+ TString failed_details;
+ // Timestamp of the last failed update attempt.
+ grpc_millis failed_update_time = 0;
+ };
+ using ResourceMetadataMap =
+ std::map<y_absl::string_view /*resource_name*/, const ResourceMetadata*>;
+ struct ResourceTypeMetadata {
+ y_absl::string_view version;
+ ResourceMetadataMap resource_metadata_map;
+ };
+ using ResourceTypeMetadataMap =
+ std::map<y_absl::string_view /*type_url*/, ResourceTypeMetadata>;
+ static_assert(static_cast<ResourceMetadata::ClientResourceStatus>(
+ envoy_admin_v3_REQUESTED) ==
+ ResourceMetadata::ClientResourceStatus::REQUESTED,
+ "");
+ static_assert(static_cast<ResourceMetadata::ClientResourceStatus>(
+ envoy_admin_v3_DOES_NOT_EXIST) ==
+ ResourceMetadata::ClientResourceStatus::DOES_NOT_EXIST,
+ "");
+ static_assert(static_cast<ResourceMetadata::ClientResourceStatus>(
+ envoy_admin_v3_ACKED) ==
+ ResourceMetadata::ClientResourceStatus::ACKED,
+ "");
+ static_assert(static_cast<ResourceMetadata::ClientResourceStatus>(
+ envoy_admin_v3_NACKED) ==
+ ResourceMetadata::ClientResourceStatus::NACKED,
+ "");
- // Parses an ADS response.
// If the response can't be parsed at the top level, the resulting
// type_url will be empty.
+ // If there is any other type of validation error, the parse_error
+ // field will be set to something other than GRPC_ERROR_NONE and the
+ // resource_names_failed field will be populated.
+ // Otherwise, one of the *_update_map fields will be populated, based
+ // on the type_url field.
struct AdsParseResult {
grpc_error* parse_error = GRPC_ERROR_NONE;
TString version;
@@ -361,16 +617,30 @@ class XdsApi {
RdsUpdateMap rds_update_map;
CdsUpdateMap cds_update_map;
EdsUpdateMap eds_update_map;
+ std::set<TString> resource_names_failed;
};
+
+ XdsApi(XdsClient* client, TraceFlag* tracer, const XdsBootstrap::Node* node);
+
+ // Creates an ADS request.
+ // Takes ownership of \a error.
+ grpc_slice CreateAdsRequest(const XdsBootstrap::XdsServer& server,
+ const TString& type_url,
+ const std::set<y_absl::string_view>& resource_names,
+ const TString& version,
+ const TString& nonce, grpc_error* error,
+ bool populate_node);
+
+ // Parses an ADS response.
AdsParseResult ParseAdsResponse(
- const grpc_slice& encoded_response,
+ const XdsBootstrap::XdsServer& server, const grpc_slice& encoded_response,
const std::set<y_absl::string_view>& expected_listener_names,
const std::set<y_absl::string_view>& expected_route_configuration_names,
const std::set<y_absl::string_view>& expected_cluster_names,
const std::set<y_absl::string_view>& expected_eds_service_names);
// Creates an initial LRS request.
- grpc_slice CreateLrsInitialRequest();
+ grpc_slice CreateLrsInitialRequest(const XdsBootstrap::XdsServer& server);
// Creates an LRS request sending a client-side load report.
grpc_slice CreateLrsRequest(ClusterLoadReportMap cluster_load_report_map);
@@ -383,11 +653,15 @@ class XdsApi {
std::set<TString>* cluster_names,
grpc_millis* load_reporting_interval);
+ // Assemble the client config proto message and return the serialized result.
+ TString AssembleClientConfig(
+ const ResourceTypeMetadataMap& resource_type_metadata_map);
+
private:
XdsClient* client_;
TraceFlag* tracer_;
- const bool use_v3_;
- const XdsBootstrap* bootstrap_; // Do not own.
+ const XdsBootstrap::Node* node_; // Do not own.
+ upb::SymbolTable symtab_;
const TString build_version_;
const TString user_agent_name_;
};
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.cc b/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.cc
index e47fb78b0c6..e8ef70f4a8d 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.cc
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.cc
@@ -28,17 +28,59 @@
#include "y_absl/strings/str_join.h"
#include "y_absl/strings/string_view.h"
+#include "src/core/ext/xds/certificate_provider_registry.h"
+#include "src/core/ext/xds/xds_api.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/load_file.h"
+#include "src/core/lib/security/credentials/credentials.h"
+#include "src/core/lib/security/credentials/fake/fake_credentials.h"
#include "src/core/lib/slice/slice_internal.h"
namespace grpc_core {
+//
+// XdsChannelCredsRegistry
+//
+
+bool XdsChannelCredsRegistry::IsSupported(const TString& creds_type) {
+ return creds_type == "google_default" || creds_type == "insecure" ||
+ creds_type == "fake";
+}
+
+bool XdsChannelCredsRegistry::IsValidConfig(const TString& /*creds_type*/,
+ const Json& /*config*/) {
+ // Currently, none of the creds types actually take a config, but we
+ // ignore whatever might be specified in the bootstrap file for
+ // forward compatibility reasons.
+ return true;
+}
+
+RefCountedPtr<grpc_channel_credentials>
+XdsChannelCredsRegistry::MakeChannelCreds(const TString& creds_type,
+ const Json& /*config*/) {
+ if (creds_type == "google_default") {
+ return grpc_google_default_credentials_create(nullptr);
+ } else if (creds_type == "insecure") {
+ return grpc_insecure_credentials_create();
+ } else if (creds_type == "fake") {
+ return grpc_fake_transport_security_credentials_create();
+ }
+ return nullptr;
+}
+
+//
+// XdsBootstrap::XdsServer
+//
+
bool XdsBootstrap::XdsServer::ShouldUseV3() const {
return server_features.find("xds_v3") != server_features.end();
}
+//
+// XdsBootstrap
+//
+
namespace {
TString BootstrapString(const XdsBootstrap& bootstrap) {
@@ -51,64 +93,59 @@ TString BootstrapString(const XdsBootstrap& bootstrap) {
" locality={\n"
" region=\"%s\",\n"
" zone=\"%s\",\n"
- " subzone=\"%s\"\n"
+ " sub_zone=\"%s\"\n"
" },\n"
" metadata=%s,\n"
"},\n",
bootstrap.node()->id, bootstrap.node()->cluster,
bootstrap.node()->locality_region, bootstrap.node()->locality_zone,
- bootstrap.node()->locality_subzone, bootstrap.node()->metadata.Dump()));
- }
- parts.push_back(
- y_absl::StrFormat("servers=[\n"
- " {\n"
- " uri=\"%s\",\n"
- " creds=[\n",
- bootstrap.server().server_uri));
- for (const auto& creds : bootstrap.server().channel_creds) {
- parts.push_back(y_absl::StrFormat(" {type=\"%s\", config=%s},\n",
- creds.type, creds.config.Dump()));
- }
- parts.push_back(" ],\n");
+ bootstrap.node()->locality_sub_zone,
+ bootstrap.node()->metadata.Dump()));
+ }
+ parts.push_back(y_absl::StrFormat(
+ "servers=[\n"
+ " {\n"
+ " uri=\"%s\",\n"
+ " creds_type=%s,\n",
+ bootstrap.server().server_uri, bootstrap.server().channel_creds_type));
+ if (bootstrap.server().channel_creds_config.type() != Json::Type::JSON_NULL) {
+ parts.push_back(
+ y_absl::StrFormat(" creds_config=%s,",
+ bootstrap.server().channel_creds_config.Dump()));
+ }
if (!bootstrap.server().server_features.empty()) {
parts.push_back(y_absl::StrCat(
" server_features=[",
y_absl::StrJoin(bootstrap.server().server_features, ", "), "],\n"));
}
- parts.push_back(" }\n]");
+ parts.push_back(" }\n],\n");
+ if (!bootstrap.server_listener_resource_name_template().empty()) {
+ parts.push_back(
+ y_absl::StrFormat("server_listener_resource_name_template=\"%s\",\n",
+ bootstrap.server_listener_resource_name_template()));
+ }
+ parts.push_back("certificate_providers={\n");
+ for (const auto& entry : bootstrap.certificate_providers()) {
+ parts.push_back(
+ y_absl::StrFormat(" %s={\n"
+ " plugin_name=%s\n"
+ " config=%s\n"
+ " },\n",
+ entry.first, entry.second.plugin_name,
+ entry.second.config->ToString()));
+ }
+ parts.push_back("}");
return y_absl::StrJoin(parts, "");
}
-} // namespace
-
-std::unique_ptr<XdsBootstrap> XdsBootstrap::ReadFromFile(XdsClient* client,
- TraceFlag* tracer,
- grpc_error** error) {
- grpc_core::UniquePtr<char> path(gpr_getenv("GRPC_XDS_BOOTSTRAP"));
- if (path == nullptr) {
- *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Environment variable GRPC_XDS_BOOTSTRAP not defined");
- return nullptr;
- }
- if (GRPC_TRACE_FLAG_ENABLED(*tracer)) {
- gpr_log(GPR_INFO,
- "[xds_client %p] Got bootstrap file location from "
- "GRPC_XDS_BOOTSTRAP environment variable: %s",
- client, path.get());
- }
- grpc_slice contents;
- *error = grpc_load_file(path.get(), /*add_null_terminator=*/true, &contents);
- if (*error != GRPC_ERROR_NONE) return nullptr;
- y_absl::string_view contents_str_view = StringViewFromSlice(contents);
- if (GRPC_TRACE_FLAG_ENABLED(*tracer)) {
- gpr_log(GPR_DEBUG, "[xds_client %p] Bootstrap file contents: %s", client,
- TString(contents_str_view).c_str());
- }
- Json json = Json::Parse(contents_str_view, error);
- grpc_slice_unref_internal(contents);
+std::unique_ptr<XdsBootstrap> ParseJsonAndCreate(
+ XdsClient* client, TraceFlag* tracer, y_absl::string_view json_string,
+ y_absl::string_view bootstrap_source, grpc_error** error) {
+ Json json = Json::Parse(json_string, error);
if (*error != GRPC_ERROR_NONE) {
grpc_error* error_out = GRPC_ERROR_CREATE_REFERENCING_FROM_COPIED_STRING(
- y_absl::StrCat("Failed to parse bootstrap file ", path.get()).c_str(),
+ y_absl::StrCat("Failed to parse bootstrap from ", bootstrap_source)
+ .c_str(),
error, 1);
GRPC_ERROR_UNREF(*error);
*error = error_out;
@@ -124,6 +161,55 @@ std::unique_ptr<XdsBootstrap> XdsBootstrap::ReadFromFile(XdsClient* client,
return result;
}
+} // namespace
+
+std::unique_ptr<XdsBootstrap> XdsBootstrap::Create(XdsClient* client,
+ TraceFlag* tracer,
+ const char* fallback_config,
+ grpc_error** error) {
+ // First, try GRPC_XDS_BOOTSTRAP env var.
+ grpc_core::UniquePtr<char> path(gpr_getenv("GRPC_XDS_BOOTSTRAP"));
+ if (path != nullptr) {
+ if (GRPC_TRACE_FLAG_ENABLED(*tracer)) {
+ gpr_log(GPR_INFO,
+ "[xds_client %p] Got bootstrap file location from "
+ "GRPC_XDS_BOOTSTRAP environment variable: %s",
+ client, path.get());
+ }
+ grpc_slice contents;
+ *error =
+ grpc_load_file(path.get(), /*add_null_terminator=*/true, &contents);
+ if (*error != GRPC_ERROR_NONE) return nullptr;
+ y_absl::string_view contents_str_view = StringViewFromSlice(contents);
+ if (GRPC_TRACE_FLAG_ENABLED(*tracer)) {
+ gpr_log(GPR_DEBUG, "[xds_client %p] Bootstrap file contents: %s", client,
+ TString(contents_str_view).c_str());
+ }
+ TString bootstrap_source = y_absl::StrCat("file ", path.get());
+ auto result = ParseJsonAndCreate(client, tracer, contents_str_view,
+ bootstrap_source, error);
+ grpc_slice_unref_internal(contents);
+ return result;
+ }
+ // Next, try GRPC_XDS_BOOTSTRAP_CONFIG env var.
+ grpc_core::UniquePtr<char> env_config(
+ gpr_getenv("GRPC_XDS_BOOTSTRAP_CONFIG"));
+ if (env_config != nullptr) {
+ return ParseJsonAndCreate(client, tracer, env_config.get(),
+ "GRPC_XDS_BOOTSTRAP_CONFIG env var", error);
+ }
+ // Finally, try fallback config.
+ if (fallback_config != nullptr) {
+ return ParseJsonAndCreate(client, tracer, fallback_config,
+ "fallback config", error);
+ }
+ // No bootstrap config found.
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Environment variables GRPC_XDS_BOOTSTRAP or GRPC_XDS_BOOTSTRAP_CONFIG "
+ "not defined");
+ return nullptr;
+}
+
XdsBootstrap::XdsBootstrap(Json json, grpc_error** error) {
if (json.type() != Json::Type::OBJECT) {
*error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
@@ -152,6 +238,28 @@ XdsBootstrap::XdsBootstrap(Json json, grpc_error** error) {
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
}
}
+ it = json.mutable_object()->find("server_listener_resource_name_template");
+ if (it != json.mutable_object()->end()) {
+ if (it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"server_listener_resource_name_template\" field is not a string"));
+ } else {
+ server_listener_resource_name_template_ =
+ std::move(*it->second.mutable_string_value());
+ }
+ }
+ if (XdsSecurityEnabled()) {
+ it = json.mutable_object()->find("certificate_providers");
+ if (it != json.mutable_object()->end()) {
+ if (it->second.type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"certificate_providers\" field is not an object"));
+ } else {
+ grpc_error* parse_error = ParseCertificateProviders(&it->second);
+ if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
+ }
+ }
+ }
*error = GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing xds bootstrap file",
&error_list);
}
@@ -187,14 +295,15 @@ grpc_error* XdsBootstrap::ParseXdsServer(Json* json, size_t idx) {
server.server_uri = std::move(*it->second.mutable_string_value());
}
it = json->mutable_object()->find("channel_creds");
- if (it != json->mutable_object()->end()) {
- if (it->second.type() != Json::Type::ARRAY) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "\"channel_creds\" field is not an array"));
- } else {
- grpc_error* parse_error = ParseChannelCredsArray(&it->second, &server);
- if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
- }
+ if (it == json->mutable_object()->end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"channel_creds\" field not present"));
+ } else if (it->second.type() != Json::Type::ARRAY) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"channel_creds\" field is not an array"));
+ } else {
+ grpc_error* parse_error = ParseChannelCredsArray(&it->second, &server);
+ if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
}
it = json->mutable_object()->find("server_features");
if (it != json->mutable_object()->end()) {
@@ -230,6 +339,10 @@ grpc_error* XdsBootstrap::ParseChannelCredsArray(Json* json,
if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
}
}
+ if (server->channel_creds_type.empty()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "no known creds type found in \"channel_creds\""));
+ }
return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing \"channel_creds\" array",
&error_list);
}
@@ -237,7 +350,7 @@ grpc_error* XdsBootstrap::ParseChannelCredsArray(Json* json,
grpc_error* XdsBootstrap::ParseChannelCreds(Json* json, size_t idx,
XdsServer* server) {
std::vector<grpc_error*> error_list;
- ChannelCreds channel_creds;
+ TString type;
auto it = json->mutable_object()->find("type");
if (it == json->mutable_object()->end()) {
error_list.push_back(
@@ -246,19 +359,28 @@ grpc_error* XdsBootstrap::ParseChannelCreds(Json* json, size_t idx,
error_list.push_back(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("\"type\" field is not a string"));
} else {
- channel_creds.type = std::move(*it->second.mutable_string_value());
+ type = std::move(*it->second.mutable_string_value());
}
+ Json config;
it = json->mutable_object()->find("config");
if (it != json->mutable_object()->end()) {
if (it->second.type() != Json::Type::OBJECT) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"\"config\" field is not an object"));
} else {
- channel_creds.config = std::move(it->second);
+ config = std::move(it->second);
}
}
- if (!channel_creds.type.empty()) {
- server->channel_creds.emplace_back(std::move(channel_creds));
+ // Select the first channel creds type that we support.
+ if (server->channel_creds_type.empty() &&
+ XdsChannelCredsRegistry::IsSupported(type)) {
+ if (!XdsChannelCredsRegistry::IsValidConfig(type, config)) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("invalid config for channel creds type \"", type, "\"")
+ .c_str()));
+ }
+ server->channel_creds_type = std::move(type);
+ server->channel_creds_config = std::move(config);
}
// Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
// string is not static in this case.
@@ -278,15 +400,7 @@ grpc_error* XdsBootstrap::ParseServerFeaturesArray(Json* json,
Json& child = json->mutable_array()->at(i);
if (child.type() == Json::Type::STRING &&
child.string_value() == "xds_v3") {
- // TODO(roth): Remove env var check once we do interop testing and
- // are sure that the v3 code actually works.
- grpc_core::UniquePtr<char> enable_str(
- gpr_getenv("GRPC_XDS_EXPERIMENTAL_V3_SUPPORT"));
- bool enabled = false;
- if (gpr_parse_bool_value(enable_str.get(), &enabled) && enabled) {
- server->server_features.insert(
- std::move(*child.mutable_string_value()));
- }
+ server->server_features.insert(std::move(*child.mutable_string_value()));
}
}
return GRPC_ERROR_CREATE_FROM_VECTOR(
@@ -357,17 +471,85 @@ grpc_error* XdsBootstrap::ParseLocality(Json* json) {
node_->locality_zone = std::move(*it->second.mutable_string_value());
}
}
- it = json->mutable_object()->find("subzone");
+ it = json->mutable_object()->find("sub_zone");
if (it != json->mutable_object()->end()) {
if (it->second.type() != Json::Type::STRING) {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "\"subzone\" field is not a string"));
+ "\"sub_zone\" field is not a string"));
} else {
- node_->locality_subzone = std::move(*it->second.mutable_string_value());
+ node_->locality_sub_zone = std::move(*it->second.mutable_string_value());
}
}
return GRPC_ERROR_CREATE_FROM_VECTOR("errors parsing \"locality\" object",
&error_list);
}
+grpc_error* XdsBootstrap::ParseCertificateProviders(Json* json) {
+ std::vector<grpc_error*> error_list;
+ for (auto& certificate_provider : *(json->mutable_object())) {
+ if (certificate_provider.second.type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("element \"", certificate_provider.first,
+ "\" is not an object")
+ .c_str()));
+ } else {
+ grpc_error* parse_error = ParseCertificateProvider(
+ certificate_provider.first, &certificate_provider.second);
+ if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
+ }
+ }
+ return GRPC_ERROR_CREATE_FROM_VECTOR(
+ "errors parsing \"certificate_providers\" object", &error_list);
+}
+
+grpc_error* XdsBootstrap::ParseCertificateProvider(
+ const TString& instance_name, Json* certificate_provider_json) {
+ std::vector<grpc_error*> error_list;
+ auto it = certificate_provider_json->mutable_object()->find("plugin_name");
+ if (it == certificate_provider_json->mutable_object()->end()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"plugin_name\" field not present"));
+ } else if (it->second.type() != Json::Type::STRING) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"plugin_name\" field is not a string"));
+ } else {
+ TString plugin_name = std::move(*(it->second.mutable_string_value()));
+ CertificateProviderFactory* factory =
+ CertificateProviderRegistry::LookupCertificateProviderFactory(
+ plugin_name);
+ if (factory != nullptr) {
+ RefCountedPtr<CertificateProviderFactory::Config> config;
+ it = certificate_provider_json->mutable_object()->find("config");
+ if (it != certificate_provider_json->mutable_object()->end()) {
+ if (it->second.type() != Json::Type::OBJECT) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "\"config\" field is not an object"));
+ } else {
+ grpc_error* parse_error = GRPC_ERROR_NONE;
+ config = factory->CreateCertificateProviderConfig(it->second,
+ &parse_error);
+ if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
+ }
+ } else {
+ // "config" is an optional field, so create an empty JSON object.
+ grpc_error* parse_error = GRPC_ERROR_NONE;
+ config = factory->CreateCertificateProviderConfig(Json::Object(),
+ &parse_error);
+ if (parse_error != GRPC_ERROR_NONE) error_list.push_back(parse_error);
+ }
+ certificate_providers_.insert(
+ {instance_name, {std::move(plugin_name), std::move(config)}});
+ }
+ }
+ // Can't use GRPC_ERROR_CREATE_FROM_VECTOR() here, because the error
+ // string is not static in this case.
+ if (error_list.empty()) return GRPC_ERROR_NONE;
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("errors parsing element \"", instance_name, "\"").c_str());
+ for (size_t i = 0; i < error_list.size(); ++i) {
+ error = grpc_error_add_child(error, error_list[i]);
+ }
+ return error;
+}
+
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.h b/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.h
index e5d55dfc94e..ccee7372715 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.h
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_bootstrap.h
@@ -26,17 +26,27 @@
#include "y_absl/container/inlined_vector.h"
-#include <grpc/impl/codegen/slice.h>
+#include <grpc/slice.h>
-#include "src/core/lib/gprpp/map.h"
+#include "src/core/ext/xds/certificate_provider_store.h"
#include "src/core/lib/gprpp/memory.h"
+#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/json/json.h"
+#include "src/core/lib/security/credentials/credentials.h"
namespace grpc_core {
class XdsClient;
+class XdsChannelCredsRegistry {
+ public:
+ static bool IsSupported(const TString& creds_type);
+ static bool IsValidConfig(const TString& creds_type, const Json& config);
+ static RefCountedPtr<grpc_channel_credentials> MakeChannelCreds(
+ const TString& creds_type, const Json& config);
+};
+
class XdsBootstrap {
public:
struct Node {
@@ -44,28 +54,32 @@ class XdsBootstrap {
TString cluster;
TString locality_region;
TString locality_zone;
- TString locality_subzone;
+ TString locality_sub_zone;
Json metadata;
};
- struct ChannelCreds {
- TString type;
- Json config;
- };
-
struct XdsServer {
TString server_uri;
- y_absl::InlinedVector<ChannelCreds, 1> channel_creds;
+ TString channel_creds_type;
+ Json channel_creds_config;
std::set<TString> server_features;
bool ShouldUseV3() const;
};
+ // Creates bootstrap object, obtaining the bootstrap JSON as appropriate
+ // for the environment:
+ // - If the GRPC_XDS_BOOTSTRAP env var is set, reads the file it specifies
+ // to obtain the bootstrap JSON.
+ // - Otherwise, if the GRPC_XDS_BOOTSTRAP_CONFIG env var is set, reads the
+ // content of that env var to obtain the bootstrap JSON.
+ // - Otherwise, the JSON will be read from fallback_config (if non-null).
// If *error is not GRPC_ERROR_NONE after returning, then there was an
- // error reading the file.
- static std::unique_ptr<XdsBootstrap> ReadFromFile(XdsClient* client,
- TraceFlag* tracer,
- grpc_error** error);
+ // error (e.g., no config found or error reading the file).
+ static std::unique_ptr<XdsBootstrap> Create(XdsClient* client,
+ TraceFlag* tracer,
+ const char* fallback_config,
+ grpc_error** error);
// Do not instantiate directly -- use ReadFromFile() above instead.
XdsBootstrap(Json json, grpc_error** error);
@@ -74,6 +88,14 @@ class XdsBootstrap {
// add support for fallback for the xds channel.
const XdsServer& server() const { return servers_[0]; }
const Node* node() const { return node_.get(); }
+ const TString& server_listener_resource_name_template() const {
+ return server_listener_resource_name_template_;
+ }
+
+ const CertificateProviderStore::PluginDefinitionMap& certificate_providers()
+ const {
+ return certificate_providers_;
+ }
private:
grpc_error* ParseXdsServerList(Json* json);
@@ -83,9 +105,14 @@ class XdsBootstrap {
grpc_error* ParseServerFeaturesArray(Json* json, XdsServer* server);
grpc_error* ParseNode(Json* json);
grpc_error* ParseLocality(Json* json);
+ grpc_error* ParseCertificateProviders(Json* json);
+ grpc_error* ParseCertificateProvider(const TString& instance_name,
+ Json* certificate_provider_json);
y_absl::InlinedVector<XdsServer, 1> servers_;
std::unique_ptr<Node> node_;
+ TString server_listener_resource_name_template_;
+ CertificateProviderStore::PluginDefinitionMap certificate_providers_;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.cc b/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.cc
new file mode 100644
index 00000000000..92c68ab0b59
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.cc
@@ -0,0 +1,405 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/xds_certificate_provider.h"
+
+#include "y_absl/functional/bind_front.h"
+#include "y_absl/strings/str_cat.h"
+
+#include "src/core/lib/gpr/useful.h"
+
+namespace grpc_core {
+
+namespace {
+
+class RootCertificatesWatcher
+ : public grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface {
+ public:
+ // Takes a ref to \a parent instead of a raw pointer since the watcher is
+ // owned by the root certificate distributor and not by \a parent. Note that
+ // presently, the watcher is immediately deleted when
+ // CancelTlsCertificatesWatch() is called, but that can potentially change in
+ // the future.
+ RootCertificatesWatcher(
+ RefCountedPtr<grpc_tls_certificate_distributor> parent,
+ TString cert_name)
+ : parent_(std::move(parent)), cert_name_(std::move(cert_name)) {}
+
+ void OnCertificatesChanged(y_absl::optional<y_absl::string_view> root_certs,
+ y_absl::optional<PemKeyCertPairList>
+ /* key_cert_pairs */) override {
+ if (root_certs.has_value()) {
+ parent_->SetKeyMaterials(cert_name_, TString(root_certs.value()),
+ y_absl::nullopt);
+ }
+ }
+
+ void OnError(grpc_error* root_cert_error,
+ grpc_error* identity_cert_error) override {
+ if (root_cert_error != GRPC_ERROR_NONE) {
+ parent_->SetErrorForCert(cert_name_, root_cert_error /* pass the ref */,
+ y_absl::nullopt);
+ }
+ GRPC_ERROR_UNREF(identity_cert_error);
+ }
+
+ private:
+ RefCountedPtr<grpc_tls_certificate_distributor> parent_;
+ TString cert_name_;
+};
+
+class IdentityCertificatesWatcher
+ : public grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface {
+ public:
+ // Takes a ref to \a parent instead of a raw pointer since the watcher is
+ // owned by the root certificate distributor and not by \a parent. Note that
+ // presently, the watcher is immediately deleted when
+ // CancelTlsCertificatesWatch() is called, but that can potentially change in
+ // the future.
+ IdentityCertificatesWatcher(
+ RefCountedPtr<grpc_tls_certificate_distributor> parent,
+ TString cert_name)
+ : parent_(std::move(parent)), cert_name_(std::move(cert_name)) {}
+
+ void OnCertificatesChanged(
+ y_absl::optional<y_absl::string_view> /* root_certs */,
+ y_absl::optional<PemKeyCertPairList> key_cert_pairs) override {
+ if (key_cert_pairs.has_value()) {
+ parent_->SetKeyMaterials(cert_name_, y_absl::nullopt, key_cert_pairs);
+ }
+ }
+
+ void OnError(grpc_error* root_cert_error,
+ grpc_error* identity_cert_error) override {
+ if (identity_cert_error != GRPC_ERROR_NONE) {
+ parent_->SetErrorForCert(cert_name_, y_absl::nullopt,
+ identity_cert_error /* pass the ref */);
+ }
+ GRPC_ERROR_UNREF(root_cert_error);
+ }
+
+ private:
+ RefCountedPtr<grpc_tls_certificate_distributor> parent_;
+ TString cert_name_;
+};
+
+} // namespace
+
+//
+// XdsCertificateProvider::ClusterCertificateState
+//
+
+XdsCertificateProvider::ClusterCertificateState::~ClusterCertificateState() {
+ if (root_cert_watcher_ != nullptr) {
+ root_cert_distributor_->CancelTlsCertificatesWatch(root_cert_watcher_);
+ }
+ if (identity_cert_watcher_ != nullptr) {
+ identity_cert_distributor_->CancelTlsCertificatesWatch(
+ identity_cert_watcher_);
+ }
+}
+
+bool XdsCertificateProvider::ClusterCertificateState::IsSafeToRemove() const {
+ return !watching_root_certs_ && !watching_identity_certs_ &&
+ root_cert_distributor_ == nullptr &&
+ identity_cert_distributor_ == nullptr;
+}
+
+void XdsCertificateProvider::ClusterCertificateState::
+ UpdateRootCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view root_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor> root_cert_distributor) {
+ if (root_cert_name_ == root_cert_name &&
+ root_cert_distributor_ == root_cert_distributor) {
+ return;
+ }
+ root_cert_name_ = TString(root_cert_name);
+ if (watching_root_certs_) {
+ // The root certificates are being watched. Swap out the watcher.
+ if (root_cert_distributor_ != nullptr) {
+ root_cert_distributor_->CancelTlsCertificatesWatch(root_cert_watcher_);
+ }
+ if (root_cert_distributor != nullptr) {
+ UpdateRootCertWatcher(cert_name, root_cert_distributor.get());
+ } else {
+ root_cert_watcher_ = nullptr;
+ xds_certificate_provider_->distributor_->SetErrorForCert(
+ "",
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No certificate provider available for root certificates"),
+ y_absl::nullopt);
+ }
+ }
+ // Swap out the root certificate distributor
+ root_cert_distributor_ = std::move(root_cert_distributor);
+}
+
+void XdsCertificateProvider::ClusterCertificateState::
+ UpdateIdentityCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view identity_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor>
+ identity_cert_distributor) {
+ if (identity_cert_name_ == identity_cert_name &&
+ identity_cert_distributor_ == identity_cert_distributor) {
+ return;
+ }
+ identity_cert_name_ = TString(identity_cert_name);
+ if (watching_identity_certs_) {
+ // The identity certificates are being watched. Swap out the watcher.
+ if (identity_cert_distributor_ != nullptr) {
+ identity_cert_distributor_->CancelTlsCertificatesWatch(
+ identity_cert_watcher_);
+ }
+ if (identity_cert_distributor != nullptr) {
+ UpdateIdentityCertWatcher(cert_name, identity_cert_distributor.get());
+ } else {
+ identity_cert_watcher_ = nullptr;
+ xds_certificate_provider_->distributor_->SetErrorForCert(
+ "", y_absl::nullopt,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No certificate provider available for identity certificates"));
+ }
+ }
+ // Swap out the identity certificate distributor
+ identity_cert_distributor_ = std::move(identity_cert_distributor);
+}
+
+void XdsCertificateProvider::ClusterCertificateState::UpdateRootCertWatcher(
+ const TString& cert_name,
+ grpc_tls_certificate_distributor* root_cert_distributor) {
+ auto watcher = y_absl::make_unique<RootCertificatesWatcher>(
+ xds_certificate_provider_->distributor_, cert_name);
+ root_cert_watcher_ = watcher.get();
+ root_cert_distributor->WatchTlsCertificates(std::move(watcher),
+ root_cert_name_, y_absl::nullopt);
+}
+
+void XdsCertificateProvider::ClusterCertificateState::UpdateIdentityCertWatcher(
+ const TString& cert_name,
+ grpc_tls_certificate_distributor* identity_cert_distributor) {
+ auto watcher = y_absl::make_unique<IdentityCertificatesWatcher>(
+ xds_certificate_provider_->distributor_, cert_name);
+ identity_cert_watcher_ = watcher.get();
+ identity_cert_distributor->WatchTlsCertificates(
+ std::move(watcher), y_absl::nullopt, identity_cert_name_);
+}
+
+void XdsCertificateProvider::ClusterCertificateState::WatchStatusCallback(
+ const TString& cert_name, bool root_being_watched,
+ bool identity_being_watched) {
+ // We aren't specially handling the case where root_cert_distributor is same
+ // as identity_cert_distributor. Always using two separate watchers
+ // irrespective of the fact results in a straightforward design, and using a
+ // single watcher does not seem to provide any benefit other than cutting down
+ // on the number of callbacks.
+ if (root_being_watched && !watching_root_certs_) {
+ // We need to start watching root certs.
+ watching_root_certs_ = true;
+ if (root_cert_distributor_ == nullptr) {
+ xds_certificate_provider_->distributor_->SetErrorForCert(
+ cert_name,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No certificate provider available for root certificates"),
+ y_absl::nullopt);
+ } else {
+ UpdateRootCertWatcher(cert_name, root_cert_distributor_.get());
+ }
+ } else if (!root_being_watched && watching_root_certs_) {
+ // We need to cancel root certs watch.
+ watching_root_certs_ = false;
+ if (root_cert_distributor_ != nullptr) {
+ root_cert_distributor_->CancelTlsCertificatesWatch(root_cert_watcher_);
+ root_cert_watcher_ = nullptr;
+ }
+ GPR_ASSERT(root_cert_watcher_ == nullptr);
+ }
+ if (identity_being_watched && !watching_identity_certs_) {
+ watching_identity_certs_ = true;
+ if (identity_cert_distributor_ == nullptr) {
+ xds_certificate_provider_->distributor_->SetErrorForCert(
+ cert_name, y_absl::nullopt,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No certificate provider available for identity certificates"));
+ } else {
+ UpdateIdentityCertWatcher(cert_name, identity_cert_distributor_.get());
+ }
+ } else if (!identity_being_watched && watching_identity_certs_) {
+ watching_identity_certs_ = false;
+ if (identity_cert_distributor_ != nullptr) {
+ identity_cert_distributor_->CancelTlsCertificatesWatch(
+ identity_cert_watcher_);
+ identity_cert_watcher_ = nullptr;
+ }
+ GPR_ASSERT(identity_cert_watcher_ == nullptr);
+ }
+}
+
+//
+// XdsCertificateProvider
+//
+
+XdsCertificateProvider::XdsCertificateProvider()
+ : distributor_(MakeRefCounted<grpc_tls_certificate_distributor>()) {
+ distributor_->SetWatchStatusCallback(
+ y_absl::bind_front(&XdsCertificateProvider::WatchStatusCallback, this));
+}
+
+XdsCertificateProvider::~XdsCertificateProvider() {
+ distributor_->SetWatchStatusCallback(nullptr);
+}
+
+bool XdsCertificateProvider::ProvidesRootCerts(const TString& cert_name) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) return false;
+ return it->second->ProvidesRootCerts();
+}
+
+void XdsCertificateProvider::UpdateRootCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view root_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor> root_cert_distributor) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) {
+ it = certificate_state_map_
+ .emplace(cert_name,
+ y_absl::make_unique<ClusterCertificateState>(this))
+ .first;
+ }
+ it->second->UpdateRootCertNameAndDistributor(cert_name, root_cert_name,
+ root_cert_distributor);
+ // Delete unused entries.
+ if (it->second->IsSafeToRemove()) certificate_state_map_.erase(it);
+}
+
+bool XdsCertificateProvider::ProvidesIdentityCerts(
+ const TString& cert_name) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) return false;
+ return it->second->ProvidesIdentityCerts();
+}
+
+void XdsCertificateProvider::UpdateIdentityCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view identity_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor> identity_cert_distributor) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) {
+ it = certificate_state_map_
+ .emplace(cert_name,
+ y_absl::make_unique<ClusterCertificateState>(this))
+ .first;
+ }
+ it->second->UpdateIdentityCertNameAndDistributor(
+ cert_name, identity_cert_name, identity_cert_distributor);
+ // Delete unused entries.
+ if (it->second->IsSafeToRemove()) certificate_state_map_.erase(it);
+}
+
+bool XdsCertificateProvider::GetRequireClientCertificate(
+ const TString& cert_name) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) return false;
+ return it->second->require_client_certificate();
+}
+
+void XdsCertificateProvider::UpdateRequireClientCertificate(
+ const TString& cert_name, bool require_client_certificate) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) return;
+ it->second->set_require_client_certificate(require_client_certificate);
+}
+
+std::vector<StringMatcher> XdsCertificateProvider::GetSanMatchers(
+ const TString& cluster) {
+ MutexLock lock(&san_matchers_mu_);
+ auto it = san_matcher_map_.find(cluster);
+ if (it == san_matcher_map_.end()) return {};
+ return it->second;
+}
+
+void XdsCertificateProvider::UpdateSubjectAlternativeNameMatchers(
+ const TString& cluster, std::vector<StringMatcher> matchers) {
+ MutexLock lock(&san_matchers_mu_);
+ if (matchers.empty()) {
+ san_matcher_map_.erase(cluster);
+ } else {
+ san_matcher_map_[cluster] = std::move(matchers);
+ }
+}
+
+void XdsCertificateProvider::WatchStatusCallback(TString cert_name,
+ bool root_being_watched,
+ bool identity_being_watched) {
+ MutexLock lock(&mu_);
+ auto it = certificate_state_map_.find(cert_name);
+ if (it == certificate_state_map_.end()) {
+ it = certificate_state_map_
+ .emplace(cert_name,
+ y_absl::make_unique<ClusterCertificateState>(this))
+ .first;
+ }
+ it->second->WatchStatusCallback(cert_name, root_being_watched,
+ identity_being_watched);
+ // Delete unused entries.
+ if (it->second->IsSafeToRemove()) certificate_state_map_.erase(it);
+}
+
+namespace {
+
+void* XdsCertificateProviderArgCopy(void* p) {
+ XdsCertificateProvider* xds_certificate_provider =
+ static_cast<XdsCertificateProvider*>(p);
+ return xds_certificate_provider->Ref().release();
+}
+
+void XdsCertificateProviderArgDestroy(void* p) {
+ XdsCertificateProvider* xds_certificate_provider =
+ static_cast<XdsCertificateProvider*>(p);
+ xds_certificate_provider->Unref();
+}
+
+int XdsCertificateProviderArgCmp(void* p, void* q) { return GPR_ICMP(p, q); }
+
+const grpc_arg_pointer_vtable kChannelArgVtable = {
+ XdsCertificateProviderArgCopy, XdsCertificateProviderArgDestroy,
+ XdsCertificateProviderArgCmp};
+
+} // namespace
+
+grpc_arg XdsCertificateProvider::MakeChannelArg() const {
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_XDS_CERTIFICATE_PROVIDER),
+ const_cast<XdsCertificateProvider*>(this), &kChannelArgVtable);
+}
+
+RefCountedPtr<XdsCertificateProvider>
+XdsCertificateProvider::GetFromChannelArgs(const grpc_channel_args* args) {
+ XdsCertificateProvider* xds_certificate_provider =
+ grpc_channel_args_find_pointer<XdsCertificateProvider>(
+ args, GRPC_ARG_XDS_CERTIFICATE_PROVIDER);
+ return xds_certificate_provider != nullptr ? xds_certificate_provider->Ref()
+ : nullptr;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.h b/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.h
new file mode 100644
index 00000000000..915e8037f9b
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_certificate_provider.h
@@ -0,0 +1,151 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPC_CORE_EXT_XDS_XDS_CERTIFICATE_PROVIDER_H
+#define GRPC_CORE_EXT_XDS_XDS_CERTIFICATE_PROVIDER_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/xds_api.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
+
+#define GRPC_ARG_XDS_CERTIFICATE_PROVIDER \
+ "grpc.internal.xds_certificate_provider"
+
+namespace grpc_core {
+
+class XdsCertificateProvider : public grpc_tls_certificate_provider {
+ public:
+ XdsCertificateProvider();
+ ~XdsCertificateProvider() override;
+
+ grpc_core::RefCountedPtr<grpc_tls_certificate_distributor> distributor()
+ const override {
+ return distributor_;
+ }
+
+ bool ProvidesRootCerts(const TString& cert_name);
+ void UpdateRootCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view root_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor> root_cert_distributor);
+
+ bool ProvidesIdentityCerts(const TString& cert_name);
+ void UpdateIdentityCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view identity_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor>
+ identity_cert_distributor);
+
+ bool GetRequireClientCertificate(const TString& cert_name);
+ // Updating \a require_client_certificate for a non-existing \a cert_name has
+ // no effect.
+ void UpdateRequireClientCertificate(const TString& cert_name,
+ bool require_client_certificate);
+
+ std::vector<StringMatcher> GetSanMatchers(const TString& cluster);
+ void UpdateSubjectAlternativeNameMatchers(
+ const TString& cluster, std::vector<StringMatcher> matchers);
+
+ grpc_arg MakeChannelArg() const;
+
+ static RefCountedPtr<XdsCertificateProvider> GetFromChannelArgs(
+ const grpc_channel_args* args);
+
+ private:
+ class ClusterCertificateState {
+ public:
+ explicit ClusterCertificateState(
+ XdsCertificateProvider* xds_certificate_provider)
+ : xds_certificate_provider_(xds_certificate_provider) {}
+
+ ~ClusterCertificateState();
+
+ // Returns true if the certs aren't being watched and there are no
+ // distributors configured.
+ bool IsSafeToRemove() const;
+
+ bool ProvidesRootCerts() const { return root_cert_distributor_ != nullptr; }
+ bool ProvidesIdentityCerts() const {
+ return identity_cert_distributor_ != nullptr;
+ }
+
+ void UpdateRootCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view root_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor> root_cert_distributor);
+ void UpdateIdentityCertNameAndDistributor(
+ const TString& cert_name, y_absl::string_view identity_cert_name,
+ RefCountedPtr<grpc_tls_certificate_distributor>
+ identity_cert_distributor);
+
+ void UpdateRootCertWatcher(
+ const TString& cert_name,
+ grpc_tls_certificate_distributor* root_cert_distributor);
+ void UpdateIdentityCertWatcher(
+ const TString& cert_name,
+ grpc_tls_certificate_distributor* identity_cert_distributor);
+
+ bool require_client_certificate() const {
+ return require_client_certificate_;
+ }
+ void set_require_client_certificate(bool require_client_certificate) {
+ require_client_certificate_ = require_client_certificate;
+ }
+
+ void WatchStatusCallback(const TString& cert_name,
+ bool root_being_watched,
+ bool identity_being_watched);
+
+ private:
+ XdsCertificateProvider* xds_certificate_provider_;
+ bool watching_root_certs_ = false;
+ bool watching_identity_certs_ = false;
+ TString root_cert_name_;
+ TString identity_cert_name_;
+ RefCountedPtr<grpc_tls_certificate_distributor> root_cert_distributor_;
+ RefCountedPtr<grpc_tls_certificate_distributor> identity_cert_distributor_;
+ grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface*
+ root_cert_watcher_ = nullptr;
+ grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface*
+ identity_cert_watcher_ = nullptr;
+ bool require_client_certificate_ = false;
+ };
+
+ void WatchStatusCallback(TString cert_name, bool root_being_watched,
+ bool identity_being_watched);
+
+ Mutex mu_;
+ std::map<TString /*cert_name*/, std::unique_ptr<ClusterCertificateState>>
+ certificate_state_map_;
+
+ // Use a separate mutex for san_matchers_ to avoid deadlocks since
+ // san_matchers_ needs to be accessed when a handshake is being done and we
+ // run into a possible deadlock scenario if using the same mutex. The mutex
+ // deadlock cycle is formed as -
+ // WatchStatusCallback() -> SetKeyMaterials() ->
+ // TlsChannelSecurityConnector::TlsChannelCertificateWatcher::OnCertificatesChanged()
+ // -> HandshakeManager::Add() -> SecurityHandshaker::DoHandshake() ->
+ // subject_alternative_names_matchers()
+ Mutex san_matchers_mu_;
+ std::map<TString /*cluster_name*/, std::vector<StringMatcher>>
+ san_matcher_map_;
+
+ RefCountedPtr<grpc_tls_certificate_distributor> distributor_;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_EXT_XDS_XDS_CERTIFICATE_PROVIDER_H
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_client.cc b/contrib/libs/grpc/src/core/ext/xds/xds_client.cc
index 76eb4d7f009..7ea6894529d 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_client.cc
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_client.cc
@@ -35,14 +35,15 @@
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/ext/filters/client_channel/service_config.h"
#include "src/core/ext/xds/xds_api.h"
+#include "src/core/ext/xds/xds_bootstrap.h"
#include "src/core/ext/xds/xds_channel_args.h"
#include "src/core/ext/xds/xds_client.h"
#include "src/core/ext/xds/xds_client_stats.h"
+#include "src/core/ext/xds/xds_http_filters.h"
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -50,8 +51,6 @@
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/timer.h"
-#include "src/core/lib/security/credentials/credentials.h"
-#include "src/core/lib/security/credentials/fake/fake_credentials.h"
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/slice/slice_string_helpers.h"
#include "src/core/lib/surface/call.h"
@@ -68,12 +67,14 @@
namespace grpc_core {
TraceFlag grpc_xds_client_trace(false, "xds_client");
+TraceFlag grpc_xds_client_refcount_trace(false, "xds_client_refcount");
namespace {
Mutex* g_mu = nullptr;
const grpc_channel_args* g_channel_args = nullptr;
XdsClient* g_xds_client = nullptr;
+char* g_fallback_bootstrap_config = nullptr;
} // namespace
@@ -143,8 +144,11 @@ class XdsClient::ChannelState::AdsCallState
private:
class ResourceState : public InternallyRefCounted<ResourceState> {
public:
- ResourceState(const TString& type_url, const TString& name)
- : type_url_(type_url), name_(name) {
+ ResourceState(const TString& type_url, const TString& name,
+ bool sent_initial_request)
+ : type_url_(type_url),
+ name_(name),
+ sent_initial_request_(sent_initial_request) {
GRPC_CLOSURE_INIT(&timer_callback_, OnTimer, this,
grpc_schedule_on_exec_ctx);
}
@@ -155,8 +159,8 @@ class XdsClient::ChannelState::AdsCallState
}
void Start(RefCountedPtr<AdsCallState> ads_calld) {
- if (sent_) return;
- sent_ = true;
+ if (sent_initial_request_) return;
+ sent_initial_request_ = true;
ads_calld_ = std::move(ads_calld);
Ref(DEBUG_LOCATION, "timer").release();
timer_pending_ = true;
@@ -192,28 +196,34 @@ class XdsClient::ChannelState::AdsCallState
"timeout obtaining resource {type=%s name=%s} from xds server",
type_url_, name_)
.c_str());
+ watcher_error = grpc_error_set_int(
+ watcher_error, GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE);
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO, "[xds_client %p] %s", ads_calld_->xds_client(),
grpc_error_string(watcher_error));
}
if (type_url_ == XdsApi::kLdsTypeUrl) {
ListenerState& state = ads_calld_->xds_client()->listener_map_[name_];
+ state.meta.client_status = XdsApi::ResourceMetadata::DOES_NOT_EXIST;
for (const auto& p : state.watchers) {
p.first->OnError(GRPC_ERROR_REF(watcher_error));
}
} else if (type_url_ == XdsApi::kRdsTypeUrl) {
RouteConfigState& state =
ads_calld_->xds_client()->route_config_map_[name_];
+ state.meta.client_status = XdsApi::ResourceMetadata::DOES_NOT_EXIST;
for (const auto& p : state.watchers) {
p.first->OnError(GRPC_ERROR_REF(watcher_error));
}
} else if (type_url_ == XdsApi::kCdsTypeUrl) {
ClusterState& state = ads_calld_->xds_client()->cluster_map_[name_];
+ state.meta.client_status = XdsApi::ResourceMetadata::DOES_NOT_EXIST;
for (const auto& p : state.watchers) {
p.first->OnError(GRPC_ERROR_REF(watcher_error));
}
} else if (type_url_ == XdsApi::kEdsTypeUrl) {
EndpointState& state = ads_calld_->xds_client()->endpoint_map_[name_];
+ state.meta.client_status = XdsApi::ResourceMetadata::DOES_NOT_EXIST;
for (const auto& p : state.watchers) {
p.first->OnError(GRPC_ERROR_REF(watcher_error));
}
@@ -229,7 +239,7 @@ class XdsClient::ChannelState::AdsCallState
const TString name_;
RefCountedPtr<AdsCallState> ads_calld_;
- bool sent_ = false;
+ bool sent_initial_request_;
bool timer_pending_ = false;
grpc_timer timer_;
grpc_closure timer_callback_;
@@ -238,8 +248,7 @@ class XdsClient::ChannelState::AdsCallState
struct ResourceTypeState {
~ResourceTypeState() { GRPC_ERROR_UNREF(error); }
- // Version, nonce, and error for this resource type.
- TString version;
+ // Nonce and error for this resource type.
TString nonce;
grpc_error* error = GRPC_ERROR_NONE;
@@ -250,10 +259,14 @@ class XdsClient::ChannelState::AdsCallState
void SendMessageLocked(const TString& type_url);
- void AcceptLdsUpdate(XdsApi::LdsUpdateMap lds_update_map);
- void AcceptRdsUpdate(XdsApi::RdsUpdateMap rds_update_map);
- void AcceptCdsUpdate(XdsApi::CdsUpdateMap cds_update_map);
- void AcceptEdsUpdate(XdsApi::EdsUpdateMap eds_update_map);
+ void AcceptLdsUpdate(TString version, grpc_millis update_time,
+ XdsApi::LdsUpdateMap lds_update_map);
+ void AcceptRdsUpdate(TString version, grpc_millis update_time,
+ XdsApi::RdsUpdateMap rds_update_map);
+ void AcceptCdsUpdate(TString version, grpc_millis update_time,
+ XdsApi::CdsUpdateMap cds_update_map);
+ void AcceptEdsUpdate(TString version, grpc_millis update_time,
+ XdsApi::EdsUpdateMap eds_update_map);
static void OnRequestSent(void* arg, grpc_error* error);
void OnRequestSentLocked(grpc_error* error);
@@ -336,7 +349,7 @@ class XdsClient::ChannelState::LrsCallState
void ScheduleNextReportLocked();
static void OnNextReportTimer(void* arg, grpc_error* error);
bool OnNextReportTimerLocked(grpc_error* error);
- void SendReportLocked();
+ bool SendReportLocked();
static void OnReportDone(void* arg, grpc_error* error);
bool OnReportDoneLocked(grpc_error* error);
@@ -431,11 +444,45 @@ class XdsClient::ChannelState::StateWatcher
// XdsClient::ChannelState
//
+namespace {
+
+grpc_channel* CreateXdsChannel(const XdsBootstrap::XdsServer& server) {
+ // Build channel args.
+ y_absl::InlinedVector<grpc_arg, 2> args_to_add = {
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_KEEPALIVE_TIME_MS),
+ 5 * 60 * GPR_MS_PER_SEC),
+ grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_CHANNELZ_IS_INTERNAL_CHANNEL), 1),
+ };
+ grpc_channel_args* new_args = grpc_channel_args_copy_and_add(
+ g_channel_args, args_to_add.data(), args_to_add.size());
+ // Create channel creds.
+ RefCountedPtr<grpc_channel_credentials> channel_creds =
+ XdsChannelCredsRegistry::MakeChannelCreds(server.channel_creds_type,
+ server.channel_creds_config);
+ // Create channel.
+ grpc_channel* channel = grpc_secure_channel_create(
+ channel_creds.get(), server.server_uri.c_str(), new_args, nullptr);
+ grpc_channel_args_destroy(new_args);
+ return channel;
+}
+
+} // namespace
+
XdsClient::ChannelState::ChannelState(WeakRefCountedPtr<XdsClient> xds_client,
- grpc_channel* channel)
- : InternallyRefCounted<ChannelState>(&grpc_xds_client_trace),
+ const XdsBootstrap::XdsServer& server)
+ : InternallyRefCounted<ChannelState>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_refcount_trace)
+ ? "ChannelState"
+ : nullptr),
xds_client_(std::move(xds_client)),
- channel_(channel) {
+ server_(server) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO, "[xds_client %p] creating channel to %s",
+ xds_client_.get(), server.server_uri.c_str());
+ }
+ channel_ = CreateXdsChannel(server);
GPR_ASSERT(channel_ != nullptr);
StartConnectivityWatchLocked();
}
@@ -468,7 +515,7 @@ XdsClient::ChannelState::LrsCallState* XdsClient::ChannelState::lrs_calld()
}
bool XdsClient::ChannelState::HasActiveAdsCall() const {
- return ads_calld_->calld() != nullptr;
+ return ads_calld_ != nullptr && ads_calld_->calld() != nullptr;
}
void XdsClient::ChannelState::MaybeStartLrsCall() {
@@ -634,7 +681,10 @@ void XdsClient::ChannelState::RetryableCall<T>::OnRetryTimerLocked(
XdsClient::ChannelState::AdsCallState::AdsCallState(
RefCountedPtr<RetryableCall<AdsCallState>> parent)
- : InternallyRefCounted<AdsCallState>(&grpc_xds_client_trace),
+ : InternallyRefCounted<AdsCallState>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_refcount_trace)
+ ? "AdsCallState"
+ : nullptr),
parent_(std::move(parent)) {
// Init the ADS call. Note that the call will progress every time there's
// activity in xds_client()->interested_parties_, which is comprised of
@@ -642,7 +692,7 @@ XdsClient::ChannelState::AdsCallState::AdsCallState(
GPR_ASSERT(xds_client() != nullptr);
// Create a call with the specified method name.
const auto& method =
- xds_client()->bootstrap_->server().ShouldUseV3()
+ chand()->server_.ShouldUseV3()
? GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V3_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES
: GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_DISCOVERY_DOT_V2_DOT_AGGREGATEDDISCOVERYSERVICE_SLASH_STREAMAGGREGATEDRESOURCES;
call_ = grpc_channel_create_pollset_set_call(
@@ -672,8 +722,8 @@ XdsClient::ChannelState::AdsCallState::AdsCallState(
GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET;
op->reserved = nullptr;
op++;
- call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops),
- nullptr);
+ call_error = grpc_call_start_batch_and_execute(
+ call_, ops, static_cast<size_t>(op - ops), nullptr);
GPR_ASSERT(GRPC_CALL_OK == call_error);
// Op: send request message.
GRPC_CLOSURE_INIT(&on_request_sent_, OnRequestSent, this,
@@ -707,8 +757,8 @@ XdsClient::ChannelState::AdsCallState::AdsCallState(
Ref(DEBUG_LOCATION, "ADS+OnResponseReceivedLocked").release();
GRPC_CLOSURE_INIT(&on_response_received_, OnResponseReceived, this,
grpc_schedule_on_exec_ctx);
- call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops),
- &on_response_received_);
+ call_error = grpc_call_start_batch_and_execute(
+ call_, ops, static_cast<size_t>(op - ops), &on_response_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
// Op: recv server status.
op = ops;
@@ -724,8 +774,8 @@ XdsClient::ChannelState::AdsCallState::AdsCallState(
// unreffed.
GRPC_CLOSURE_INIT(&on_status_received_, OnStatusReceived, this,
grpc_schedule_on_exec_ctx);
- call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops),
- &on_status_received_);
+ call_error = grpc_call_start_batch_and_execute(
+ call_, ops, static_cast<size_t>(op - ops), &on_status_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
@@ -763,7 +813,8 @@ void XdsClient::ChannelState::AdsCallState::SendMessageLocked(
std::set<y_absl::string_view> resource_names =
ResourceNamesForRequest(type_url);
request_payload_slice = xds_client()->api_.CreateAdsRequest(
- type_url, resource_names, state.version, state.nonce,
+ chand()->server_, type_url, resource_names,
+ xds_client()->resource_version_map_[type_url], state.nonce,
GRPC_ERROR_REF(state.error), !sent_initial_message_);
if (type_url != XdsApi::kLdsTypeUrl && type_url != XdsApi::kRdsTypeUrl &&
type_url != XdsApi::kCdsTypeUrl && type_url != XdsApi::kEdsTypeUrl) {
@@ -774,7 +825,8 @@ void XdsClient::ChannelState::AdsCallState::SendMessageLocked(
gpr_log(GPR_INFO,
"[xds_client %p] sending ADS request: type=%s version=%s nonce=%s "
"error=%s resources=%s",
- xds_client(), type_url.c_str(), state.version.c_str(),
+ xds_client(), type_url.c_str(),
+ xds_client()->resource_version_map_[type_url].c_str(),
state.nonce.c_str(), grpc_error_string(state.error),
y_absl::StrJoin(resource_names, " ").c_str());
}
@@ -806,7 +858,8 @@ void XdsClient::ChannelState::AdsCallState::Subscribe(
const TString& type_url, const TString& name) {
auto& state = state_map_[type_url].subscribed_resources[name];
if (state == nullptr) {
- state = MakeOrphanable<ResourceState>(type_url, name);
+ state = MakeOrphanable<ResourceState>(
+ type_url, name, !xds_client()->resource_version_map_[type_url].empty());
SendMessageLocked(type_url);
}
}
@@ -825,7 +878,24 @@ bool XdsClient::ChannelState::AdsCallState::HasSubscribedResources() const {
return false;
}
+namespace {
+
+// Build a resource metadata struct for ADS result accepting methods and CSDS.
+XdsApi::ResourceMetadata CreateResourceMetadataAcked(
+ TString serialized_proto, TString version,
+ grpc_millis update_time) {
+ XdsApi::ResourceMetadata resource_metadata;
+ resource_metadata.serialized_proto = std::move(serialized_proto);
+ resource_metadata.update_time = update_time;
+ resource_metadata.version = std::move(version);
+ resource_metadata.client_status = XdsApi::ResourceMetadata::ACKED;
+ return resource_metadata;
+}
+
+} // namespace
+
void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate(
+ TString version, grpc_millis update_time,
XdsApi::LdsUpdateMap lds_update_map) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
@@ -837,23 +907,17 @@ void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate(
std::set<TString> rds_resource_names_seen;
for (auto& p : lds_update_map) {
const TString& listener_name = p.first;
- XdsApi::LdsUpdate& lds_update = p.second;
+ XdsApi::LdsUpdate& lds_update = p.second.resource;
auto& state = lds_state.subscribed_resources[listener_name];
if (state != nullptr) state->Finish();
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
- gpr_log(GPR_INFO, "[xds_client %p] LDS resource %s: route_config_name=%s",
- xds_client(), listener_name.c_str(),
- (!lds_update.route_config_name.empty()
- ? lds_update.route_config_name.c_str()
- : "<inlined>"));
- if (lds_update.rds_update.has_value()) {
- gpr_log(GPR_INFO, "RouteConfiguration: %s",
- lds_update.rds_update->ToString().c_str());
- }
+ gpr_log(GPR_INFO, "[xds_client %p] LDS resource %s: %s", xds_client(),
+ listener_name.c_str(), lds_update.ToString().c_str());
}
// Record the RDS resource names seen.
- if (!lds_update.route_config_name.empty()) {
- rds_resource_names_seen.insert(lds_update.route_config_name);
+ if (!lds_update.http_connection_manager.route_config_name.empty()) {
+ rds_resource_names_seen.insert(
+ lds_update.http_connection_manager.route_config_name);
}
// Ignore identical update.
ListenerState& listener_state = xds_client()->listener_map_[listener_name];
@@ -869,6 +933,8 @@ void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate(
}
// Update the listener state.
listener_state.update = std::move(lds_update);
+ listener_state.meta = CreateResourceMetadataAcked(
+ std::move(p.second.serialized_proto), version, update_time);
// Notify watchers.
for (const auto& p : listener_state.watchers) {
p.first->OnListenerChanged(*listener_state.update);
@@ -913,6 +979,7 @@ void XdsClient::ChannelState::AdsCallState::AcceptLdsUpdate(
}
void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate(
+ TString version, grpc_millis update_time,
XdsApi::RdsUpdateMap rds_update_map) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
@@ -923,7 +990,7 @@ void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate(
auto& rds_state = state_map_[XdsApi::kRdsTypeUrl];
for (auto& p : rds_update_map) {
const TString& route_config_name = p.first;
- XdsApi::RdsUpdate& rds_update = p.second;
+ XdsApi::RdsUpdate& rds_update = p.second.resource;
auto& state = rds_state.subscribed_resources[route_config_name];
if (state != nullptr) state->Finish();
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
@@ -944,6 +1011,8 @@ void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate(
}
// Update the cache.
route_config_state.update = std::move(rds_update);
+ route_config_state.meta = CreateResourceMetadataAcked(
+ std::move(p.second.serialized_proto), version, update_time);
// Notify all watchers.
for (const auto& p : route_config_state.watchers) {
p.first->OnRouteConfigChanged(*route_config_state.update);
@@ -952,6 +1021,7 @@ void XdsClient::ChannelState::AdsCallState::AcceptRdsUpdate(
}
void XdsClient::ChannelState::AdsCallState::AcceptCdsUpdate(
+ TString version, grpc_millis update_time,
XdsApi::CdsUpdateMap cds_update_map) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
@@ -963,17 +1033,12 @@ void XdsClient::ChannelState::AdsCallState::AcceptCdsUpdate(
std::set<TString> eds_resource_names_seen;
for (auto& p : cds_update_map) {
const char* cluster_name = p.first.c_str();
- XdsApi::CdsUpdate& cds_update = p.second;
+ XdsApi::CdsUpdate& cds_update = p.second.resource;
auto& state = cds_state.subscribed_resources[cluster_name];
if (state != nullptr) state->Finish();
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
- gpr_log(GPR_INFO,
- "[xds_client %p] cluster=%s: eds_service_name=%s, "
- "lrs_load_reporting_server_name=%s",
- xds_client(), cluster_name, cds_update.eds_service_name.c_str(),
- cds_update.lrs_load_reporting_server_name.has_value()
- ? cds_update.lrs_load_reporting_server_name.value().c_str()
- : "(N/A)");
+ gpr_log(GPR_INFO, "[xds_client %p] cluster=%s: %s", xds_client(),
+ cluster_name, cds_update.ToString().c_str());
}
// Record the EDS resource names seen.
eds_resource_names_seen.insert(cds_update.eds_service_name.empty()
@@ -992,6 +1057,8 @@ void XdsClient::ChannelState::AdsCallState::AcceptCdsUpdate(
}
// Update the cluster state.
cluster_state.update = std::move(cds_update);
+ cluster_state.meta = CreateResourceMetadataAcked(
+ std::move(p.second.serialized_proto), version, update_time);
// Notify all watchers.
for (const auto& p : cluster_state.watchers) {
p.first->OnClusterChanged(cluster_state.update.value());
@@ -1035,6 +1102,7 @@ void XdsClient::ChannelState::AdsCallState::AcceptCdsUpdate(
}
void XdsClient::ChannelState::AdsCallState::AcceptEdsUpdate(
+ TString version, grpc_millis update_time,
XdsApi::EdsUpdateMap eds_update_map) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO,
@@ -1045,7 +1113,7 @@ void XdsClient::ChannelState::AdsCallState::AcceptEdsUpdate(
auto& eds_state = state_map_[XdsApi::kEdsTypeUrl];
for (auto& p : eds_update_map) {
const char* eds_service_name = p.first.c_str();
- XdsApi::EdsUpdate& eds_update = p.second;
+ XdsApi::EdsUpdate& eds_update = p.second.resource;
auto& state = eds_state.subscribed_resources[eds_service_name];
if (state != nullptr) state->Finish();
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
@@ -1066,6 +1134,8 @@ void XdsClient::ChannelState::AdsCallState::AcceptEdsUpdate(
}
// Update the cluster state.
endpoint_state.update = std::move(eds_update);
+ endpoint_state.meta = CreateResourceMetadataAcked(
+ std::move(p.second.serialized_proto), version, update_time);
// Notify all watchers.
for (const auto& p : endpoint_state.watchers) {
p.first->OnEndpointChanged(endpoint_state.update.value());
@@ -1132,7 +1202,8 @@ bool XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked() {
recv_message_payload_ = nullptr;
// Parse and validate the response.
XdsApi::AdsParseResult result = xds_client()->api_.ParseAdsResponse(
- response_slice, ResourceNamesForRequest(XdsApi::kLdsTypeUrl),
+ chand()->server_, response_slice,
+ ResourceNamesForRequest(XdsApi::kLdsTypeUrl),
ResourceNamesForRequest(XdsApi::kRdsTypeUrl),
ResourceNamesForRequest(XdsApi::kCdsTypeUrl),
ResourceNamesForRequest(XdsApi::kEdsTypeUrl));
@@ -1144,11 +1215,14 @@ bool XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked() {
xds_client(), grpc_error_string(result.parse_error));
GRPC_ERROR_UNREF(result.parse_error);
} else {
+ grpc_millis update_time = grpc_core::ExecCtx::Get()->Now();
// Update nonce.
auto& state = state_map_[result.type_url];
state.nonce = std::move(result.nonce);
// NACK or ACK the response.
if (result.parse_error != GRPC_ERROR_NONE) {
+ xds_client()->UpdateResourceMetadataWithFailedParseResult(update_time,
+ result);
GRPC_ERROR_UNREF(state.error);
state.error = result.parse_error;
// NACK unacceptable update.
@@ -1162,15 +1236,20 @@ bool XdsClient::ChannelState::AdsCallState::OnResponseReceivedLocked() {
seen_response_ = true;
// Accept the ADS response according to the type_url.
if (result.type_url == XdsApi::kLdsTypeUrl) {
- AcceptLdsUpdate(std::move(result.lds_update_map));
+ AcceptLdsUpdate(result.version, update_time,
+ std::move(result.lds_update_map));
} else if (result.type_url == XdsApi::kRdsTypeUrl) {
- AcceptRdsUpdate(std::move(result.rds_update_map));
+ AcceptRdsUpdate(result.version, update_time,
+ std::move(result.rds_update_map));
} else if (result.type_url == XdsApi::kCdsTypeUrl) {
- AcceptCdsUpdate(std::move(result.cds_update_map));
+ AcceptCdsUpdate(result.version, update_time,
+ std::move(result.cds_update_map));
} else if (result.type_url == XdsApi::kEdsTypeUrl) {
- AcceptEdsUpdate(std::move(result.eds_update_map));
+ AcceptEdsUpdate(result.version, update_time,
+ std::move(result.eds_update_map));
}
- state.version = std::move(result.version);
+ xds_client()->resource_version_map_[result.type_url] =
+ std::move(result.version);
// ACK the update.
SendMessageLocked(result.type_url);
// Start load reporting if needed.
@@ -1287,8 +1366,7 @@ bool XdsClient::ChannelState::LrsCallState::Reporter::OnNextReportTimerLocked(
GRPC_ERROR_UNREF(error);
return true;
}
- SendReportLocked();
- return false;
+ return SendReportLocked();
}
namespace {
@@ -1307,7 +1385,7 @@ bool LoadReportCountersAreZero(const XdsApi::ClusterLoadReportMap& snapshot) {
} // namespace
-void XdsClient::ChannelState::LrsCallState::Reporter::SendReportLocked() {
+bool XdsClient::ChannelState::LrsCallState::Reporter::SendReportLocked() {
// Construct snapshot from all reported stats.
XdsApi::ClusterLoadReportMap snapshot =
xds_client()->BuildLoadReportSnapshotLocked(parent_->send_all_clusters_,
@@ -1317,8 +1395,12 @@ void XdsClient::ChannelState::LrsCallState::Reporter::SendReportLocked() {
const bool old_val = last_report_counters_were_zero_;
last_report_counters_were_zero_ = LoadReportCountersAreZero(snapshot);
if (old_val && last_report_counters_were_zero_) {
+ if (xds_client()->load_report_map_.empty()) {
+ parent_->chand()->StopLrsCall();
+ return true;
+ }
ScheduleNextReportLocked();
- return;
+ return false;
}
// Create a request that contains the snapshot.
grpc_slice request_payload_slice =
@@ -1339,6 +1421,7 @@ void XdsClient::ChannelState::LrsCallState::Reporter::SendReportLocked() {
xds_client(), this, call_error);
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
+ return false;
}
void XdsClient::ChannelState::LrsCallState::Reporter::OnReportDone(
@@ -1381,14 +1464,17 @@ bool XdsClient::ChannelState::LrsCallState::Reporter::OnReportDoneLocked(
XdsClient::ChannelState::LrsCallState::LrsCallState(
RefCountedPtr<RetryableCall<LrsCallState>> parent)
- : InternallyRefCounted<LrsCallState>(&grpc_xds_client_trace),
+ : InternallyRefCounted<LrsCallState>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_refcount_trace)
+ ? "LrsCallState"
+ : nullptr),
parent_(std::move(parent)) {
// Init the LRS call. Note that the call will progress every time there's
// activity in xds_client()->interested_parties_, which is comprised of
// the polling entities from client_channel.
GPR_ASSERT(xds_client() != nullptr);
const auto& method =
- xds_client()->bootstrap_->server().ShouldUseV3()
+ chand()->server_.ShouldUseV3()
? GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V3_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS
: GRPC_MDSTR_SLASH_ENVOY_DOT_SERVICE_DOT_LOAD_STATS_DOT_V2_DOT_LOADREPORTINGSERVICE_SLASH_STREAMLOADSTATS;
call_ = grpc_channel_create_pollset_set_call(
@@ -1398,7 +1484,7 @@ XdsClient::ChannelState::LrsCallState::LrsCallState(
GPR_ASSERT(call_ != nullptr);
// Init the request payload.
grpc_slice request_payload_slice =
- xds_client()->api_.CreateLrsInitialRequest();
+ xds_client()->api_.CreateLrsInitialRequest(chand()->server_);
send_message_payload_ =
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
grpc_slice_unref_internal(request_payload_slice);
@@ -1434,8 +1520,8 @@ XdsClient::ChannelState::LrsCallState::LrsCallState(
Ref(DEBUG_LOCATION, "LRS+OnInitialRequestSentLocked").release();
GRPC_CLOSURE_INIT(&on_initial_request_sent_, OnInitialRequestSent, this,
grpc_schedule_on_exec_ctx);
- call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops),
- &on_initial_request_sent_);
+ call_error = grpc_call_start_batch_and_execute(
+ call_, ops, static_cast<size_t>(op - ops), &on_initial_request_sent_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
// Op: recv initial metadata.
op = ops;
@@ -1454,8 +1540,8 @@ XdsClient::ChannelState::LrsCallState::LrsCallState(
Ref(DEBUG_LOCATION, "LRS+OnResponseReceivedLocked").release();
GRPC_CLOSURE_INIT(&on_response_received_, OnResponseReceived, this,
grpc_schedule_on_exec_ctx);
- call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops),
- &on_response_received_);
+ call_error = grpc_call_start_batch_and_execute(
+ call_, ops, static_cast<size_t>(op - ops), &on_response_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
// Op: recv server status.
op = ops;
@@ -1471,8 +1557,8 @@ XdsClient::ChannelState::LrsCallState::LrsCallState(
// unreffed.
GRPC_CLOSURE_INIT(&on_status_received_, OnStatusReceived, this,
grpc_schedule_on_exec_ctx);
- call_error = grpc_call_start_batch_and_execute(call_, ops, (size_t)(op - ops),
- &on_status_received_);
+ call_error = grpc_call_start_batch_and_execute(
+ call_, ops, static_cast<size_t>(op - ops), &on_status_received_);
GPR_ASSERT(GRPC_CALL_OK == call_error);
}
@@ -1689,56 +1775,22 @@ grpc_millis GetRequestTimeout() {
{15000, 0, INT_MAX});
}
-grpc_channel* CreateXdsChannel(const XdsBootstrap& bootstrap,
- grpc_error** error) {
- // Build channel args.
- y_absl::InlinedVector<grpc_arg, 2> args_to_add = {
- grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_KEEPALIVE_TIME_MS),
- 5 * 60 * GPR_MS_PER_SEC),
- grpc_channel_arg_integer_create(
- const_cast<char*>(GRPC_ARG_CHANNELZ_IS_INTERNAL_CHANNEL), 1),
- };
- grpc_channel_args* new_args = grpc_channel_args_copy_and_add(
- g_channel_args, args_to_add.data(), args_to_add.size());
- // Find credentials and create channel.
- RefCountedPtr<grpc_channel_credentials> creds;
- for (const auto& channel_creds : bootstrap.server().channel_creds) {
- if (channel_creds.type == "google_default") {
- creds.reset(grpc_google_default_credentials_create(nullptr));
- break;
- }
- if (channel_creds.type == "insecure") {
- grpc_channel* channel = grpc_insecure_channel_create(
- bootstrap.server().server_uri.c_str(), new_args, nullptr);
- grpc_channel_args_destroy(new_args);
- return channel;
- }
- if (channel_creds.type == "fake") {
- creds.reset(grpc_fake_transport_security_credentials_create());
- break;
- }
- }
- if (creds == nullptr) {
- *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "no supported credential types found");
- return nullptr;
- }
- grpc_channel* channel = grpc_secure_channel_create(
- creds.get(), bootstrap.server().server_uri.c_str(), new_args, nullptr);
- grpc_channel_args_destroy(new_args);
- return channel;
-}
-
} // namespace
XdsClient::XdsClient(grpc_error** error)
- : DualRefCounted<XdsClient>(&grpc_xds_client_trace),
+ : DualRefCounted<XdsClient>(
+ GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_refcount_trace) ? "XdsClient"
+ : nullptr),
request_timeout_(GetRequestTimeout()),
interested_parties_(grpc_pollset_set_create()),
- bootstrap_(
- XdsBootstrap::ReadFromFile(this, &grpc_xds_client_trace, error)),
- api_(this, &grpc_xds_client_trace, bootstrap_.get()) {
+ bootstrap_(XdsBootstrap::Create(this, &grpc_xds_client_trace,
+ g_fallback_bootstrap_config, error)),
+ certificate_provider_store_(MakeOrphanable<CertificateProviderStore>(
+ bootstrap_ == nullptr
+ ? CertificateProviderStore::PluginDefinitionMap()
+ : bootstrap_->certificate_providers())),
+ api_(this, &grpc_xds_client_trace,
+ bootstrap_ == nullptr ? nullptr : bootstrap_->node()) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
gpr_log(GPR_INFO, "[xds_client %p] creating xds client", this);
}
@@ -1747,19 +1799,9 @@ XdsClient::XdsClient(grpc_error** error)
this, grpc_error_string(*error));
return;
}
- if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
- gpr_log(GPR_INFO, "[xds_client %p] creating channel to %s", this,
- bootstrap_->server().server_uri.c_str());
- }
- grpc_channel* channel = CreateXdsChannel(*bootstrap_, error);
- if (*error != GRPC_ERROR_NONE) {
- gpr_log(GPR_ERROR, "[xds_client %p] failed to create xds channel: %s", this,
- grpc_error_string(*error));
- return;
- }
// Create ChannelState object.
chand_ = MakeOrphanable<ChannelState>(
- WeakRef(DEBUG_LOCATION, "XdsClient+ChannelState"), channel);
+ WeakRef(DEBUG_LOCATION, "XdsClient+ChannelState"), bootstrap_->server());
}
XdsClient::~XdsClient() {
@@ -1982,10 +2024,22 @@ RefCountedPtr<XdsClusterDropStats> XdsClient::AddClusterDropStats(
auto it = load_report_map_
.emplace(std::make_pair(std::move(key), LoadReportState()))
.first;
- auto cluster_drop_stats = MakeRefCounted<XdsClusterDropStats>(
- Ref(DEBUG_LOCATION, "DropStats"), lrs_server,
- it->first.first /*cluster_name*/, it->first.second /*eds_service_name*/);
- it->second.drop_stats.insert(cluster_drop_stats.get());
+ LoadReportState& load_report_state = it->second;
+ RefCountedPtr<XdsClusterDropStats> cluster_drop_stats;
+ if (load_report_state.drop_stats != nullptr) {
+ cluster_drop_stats = load_report_state.drop_stats->RefIfNonZero();
+ }
+ if (cluster_drop_stats == nullptr) {
+ if (load_report_state.drop_stats != nullptr) {
+ load_report_state.deleted_drop_stats +=
+ load_report_state.drop_stats->GetSnapshotAndReset();
+ }
+ cluster_drop_stats = MakeRefCounted<XdsClusterDropStats>(
+ Ref(DEBUG_LOCATION, "DropStats"), lrs_server,
+ it->first.first /*cluster_name*/,
+ it->first.second /*eds_service_name*/);
+ load_report_state.drop_stats = cluster_drop_stats.get();
+ }
chand_->MaybeStartLrsCall();
return cluster_drop_stats;
}
@@ -1995,19 +2049,18 @@ void XdsClient::RemoveClusterDropStats(
y_absl::string_view eds_service_name,
XdsClusterDropStats* cluster_drop_stats) {
MutexLock lock(&mu_);
- auto load_report_it = load_report_map_.find(
- std::make_pair(TString(cluster_name), TString(eds_service_name)));
- if (load_report_it == load_report_map_.end()) return;
- LoadReportState& load_report_state = load_report_it->second;
// TODO(roth): When we add support for direct federation, use the
// server name specified in lrs_server.
- auto it = load_report_state.drop_stats.find(cluster_drop_stats);
- if (it != load_report_state.drop_stats.end()) {
- // Record final drop stats in deleted_drop_stats, which will be
+ auto it = load_report_map_.find(
+ std::make_pair(TString(cluster_name), TString(eds_service_name)));
+ if (it == load_report_map_.end()) return;
+ LoadReportState& load_report_state = it->second;
+ if (load_report_state.drop_stats == cluster_drop_stats) {
+ // Record final snapshot in deleted_drop_stats, which will be
// added to the next load report.
- auto dropped_requests = cluster_drop_stats->GetSnapshotAndReset();
- load_report_state.deleted_drop_stats += dropped_requests;
- load_report_state.drop_stats.erase(it);
+ load_report_state.deleted_drop_stats +=
+ load_report_state.drop_stats->GetSnapshotAndReset();
+ load_report_state.drop_stats = nullptr;
}
}
@@ -2026,12 +2079,24 @@ RefCountedPtr<XdsClusterLocalityStats> XdsClient::AddClusterLocalityStats(
auto it = load_report_map_
.emplace(std::make_pair(std::move(key), LoadReportState()))
.first;
- auto cluster_locality_stats = MakeRefCounted<XdsClusterLocalityStats>(
- Ref(DEBUG_LOCATION, "LocalityStats"), lrs_server,
- it->first.first /*cluster_name*/, it->first.second /*eds_service_name*/,
- locality);
- it->second.locality_stats[std::move(locality)].locality_stats.insert(
- cluster_locality_stats.get());
+ LoadReportState& load_report_state = it->second;
+ LoadReportState::LocalityState& locality_state =
+ load_report_state.locality_stats[locality];
+ RefCountedPtr<XdsClusterLocalityStats> cluster_locality_stats;
+ if (locality_state.locality_stats != nullptr) {
+ cluster_locality_stats = locality_state.locality_stats->RefIfNonZero();
+ }
+ if (cluster_locality_stats == nullptr) {
+ if (locality_state.locality_stats != nullptr) {
+ locality_state.deleted_locality_stats +=
+ locality_state.locality_stats->GetSnapshotAndReset();
+ }
+ cluster_locality_stats = MakeRefCounted<XdsClusterLocalityStats>(
+ Ref(DEBUG_LOCATION, "LocalityStats"), lrs_server,
+ it->first.first /*cluster_name*/, it->first.second /*eds_service_name*/,
+ std::move(locality));
+ locality_state.locality_stats = cluster_locality_stats.get();
+ }
chand_->MaybeStartLrsCall();
return cluster_locality_stats;
}
@@ -2042,22 +2107,21 @@ void XdsClient::RemoveClusterLocalityStats(
const RefCountedPtr<XdsLocalityName>& locality,
XdsClusterLocalityStats* cluster_locality_stats) {
MutexLock lock(&mu_);
- auto load_report_it = load_report_map_.find(
- std::make_pair(TString(cluster_name), TString(eds_service_name)));
- if (load_report_it == load_report_map_.end()) return;
- LoadReportState& load_report_state = load_report_it->second;
// TODO(roth): When we add support for direct federation, use the
// server name specified in lrs_server.
+ auto it = load_report_map_.find(
+ std::make_pair(TString(cluster_name), TString(eds_service_name)));
+ if (it == load_report_map_.end()) return;
+ LoadReportState& load_report_state = it->second;
auto locality_it = load_report_state.locality_stats.find(locality);
if (locality_it == load_report_state.locality_stats.end()) return;
- auto& locality_set = locality_it->second.locality_stats;
- auto it = locality_set.find(cluster_locality_stats);
- if (it != locality_set.end()) {
+ LoadReportState::LocalityState& locality_state = locality_it->second;
+ if (locality_state.locality_stats == cluster_locality_stats) {
// Record final snapshot in deleted_locality_stats, which will be
// added to the next load report.
- locality_it->second.deleted_locality_stats.emplace_back(
- cluster_locality_stats->GetSnapshotAndReset());
- locality_set.erase(it);
+ locality_state.deleted_locality_stats +=
+ locality_state.locality_stats->GetSnapshotAndReset();
+ locality_state.locality_stats = nullptr;
}
}
@@ -2098,6 +2162,9 @@ void XdsClient::NotifyOnErrorLocked(grpc_error* error) {
XdsApi::ClusterLoadReportMap XdsClient::BuildLoadReportSnapshotLocked(
bool send_all_clusters, const std::set<TString>& clusters) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO, "[xds_client %p] start building load report", this);
+ }
XdsApi::ClusterLoadReportMap snapshot_map;
for (auto load_report_it = load_report_map_.begin();
load_report_it != load_report_map_.end();) {
@@ -2116,9 +2183,15 @@ XdsApi::ClusterLoadReportMap XdsClient::BuildLoadReportSnapshotLocked(
XdsApi::ClusterLoadReport snapshot;
// Aggregate drop stats.
snapshot.dropped_requests = std::move(load_report.deleted_drop_stats);
- for (auto& drop_stats : load_report.drop_stats) {
- auto dropped_requests = drop_stats->GetSnapshotAndReset();
- snapshot.dropped_requests += dropped_requests;
+ if (load_report.drop_stats != nullptr) {
+ snapshot.dropped_requests +=
+ load_report.drop_stats->GetSnapshotAndReset();
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_client %p] cluster=%s eds_service_name=%s drop_stats=%p",
+ this, cluster_key.first.c_str(), cluster_key.second.c_str(),
+ load_report.drop_stats);
+ }
}
// Aggregate locality stats.
for (auto it = load_report.locality_stats.begin();
@@ -2127,34 +2200,39 @@ XdsApi::ClusterLoadReportMap XdsClient::BuildLoadReportSnapshotLocked(
auto& locality_state = it->second;
XdsClusterLocalityStats::Snapshot& locality_snapshot =
snapshot.locality_stats[locality_name];
- for (auto& locality_stats : locality_state.locality_stats) {
- locality_snapshot += locality_stats->GetSnapshotAndReset();
- }
- // Add final snapshots from recently deleted locality stats objects.
- for (auto& deleted_locality_stats :
- locality_state.deleted_locality_stats) {
- locality_snapshot += deleted_locality_stats;
+ locality_snapshot = std::move(locality_state.deleted_locality_stats);
+ if (locality_state.locality_stats != nullptr) {
+ locality_snapshot +=
+ locality_state.locality_stats->GetSnapshotAndReset();
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_client %p] cluster=%s eds_service_name=%s "
+ "locality=%s locality_stats=%p",
+ this, cluster_key.first.c_str(), cluster_key.second.c_str(),
+ locality_name->AsHumanReadableString().c_str(),
+ locality_state.locality_stats);
+ }
}
- locality_state.deleted_locality_stats.clear();
// If the only thing left in this entry was final snapshots from
// deleted locality stats objects, remove the entry.
- if (locality_state.locality_stats.empty()) {
+ if (locality_state.locality_stats == nullptr) {
it = load_report.locality_stats.erase(it);
} else {
++it;
}
}
+ // Compute load report interval.
+ const grpc_millis now = ExecCtx::Get()->Now();
+ snapshot.load_report_interval = now - load_report.last_report_time;
+ load_report.last_report_time = now;
+ // Record snapshot.
if (record_stats) {
- // Compute load report interval.
- const grpc_millis now = ExecCtx::Get()->Now();
- snapshot.load_report_interval = now - load_report.last_report_time;
- load_report.last_report_time = now;
- // Record snapshot.
snapshot_map[cluster_key] = std::move(snapshot);
}
// If the only thing left in this entry was final snapshots from
// deleted stats objects, remove the entry.
- if (load_report.locality_stats.empty() && load_report.drop_stats.empty()) {
+ if (load_report.locality_stats.empty() &&
+ load_report.drop_stats == nullptr) {
load_report_it = load_report_map_.erase(load_report_it);
} else {
++load_report_it;
@@ -2163,25 +2241,109 @@ XdsApi::ClusterLoadReportMap XdsClient::BuildLoadReportSnapshotLocked(
return snapshot_map;
}
+void XdsClient::UpdateResourceMetadataWithFailedParseResult(
+ grpc_millis update_time, const XdsApi::AdsParseResult& result) {
+ // ADS update is rejected and the resource names in the failed update is
+ // available.
+ y_absl::string_view details = grpc_error_string(result.parse_error);
+ for (auto& name : result.resource_names_failed) {
+ XdsApi::ResourceMetadata* resource_metadata = nullptr;
+ if (result.type_url == XdsApi::kLdsTypeUrl) {
+ auto it = listener_map_.find(name);
+ if (it != listener_map_.end()) {
+ resource_metadata = &it->second.meta;
+ }
+ } else if (result.type_url == XdsApi::kRdsTypeUrl) {
+ auto it = route_config_map_.find(name);
+ if (route_config_map_.find(name) != route_config_map_.end()) {
+ resource_metadata = &it->second.meta;
+ }
+ } else if (result.type_url == XdsApi::kCdsTypeUrl) {
+ auto it = cluster_map_.find(name);
+ if (cluster_map_.find(name) != cluster_map_.end()) {
+ resource_metadata = &it->second.meta;
+ }
+ } else if (result.type_url == XdsApi::kEdsTypeUrl) {
+ auto it = endpoint_map_.find(name);
+ if (endpoint_map_.find(name) != endpoint_map_.end()) {
+ resource_metadata = &it->second.meta;
+ }
+ }
+ if (resource_metadata == nullptr) {
+ return;
+ }
+ resource_metadata->client_status = XdsApi::ResourceMetadata::NACKED;
+ resource_metadata->failed_version = result.version;
+ resource_metadata->failed_details = TString(details);
+ resource_metadata->failed_update_time = update_time;
+ }
+}
+
+TString XdsClient::DumpClientConfigBinary() {
+ MutexLock lock(&mu_);
+ XdsApi::ResourceTypeMetadataMap resource_type_metadata_map;
+ // Update per-xds-type version if available, this version corresponding to the
+ // last successful ADS update version.
+ for (auto& p : resource_version_map_) {
+ resource_type_metadata_map[p.first].version = p.second;
+ }
+ // Collect resource metadata from listeners
+ auto& lds_map =
+ resource_type_metadata_map[XdsApi::kLdsTypeUrl].resource_metadata_map;
+ for (auto& p : listener_map_) {
+ lds_map[p.first] = &p.second.meta;
+ }
+ // Collect resource metadata from route configs
+ auto& rds_map =
+ resource_type_metadata_map[XdsApi::kRdsTypeUrl].resource_metadata_map;
+ for (auto& p : route_config_map_) {
+ rds_map[p.first] = &p.second.meta;
+ }
+ // Collect resource metadata from clusters
+ auto& cds_map =
+ resource_type_metadata_map[XdsApi::kCdsTypeUrl].resource_metadata_map;
+ for (auto& p : cluster_map_) {
+ cds_map[p.first] = &p.second.meta;
+ }
+ // Collect resource metadata from endpoints
+ auto& eds_map =
+ resource_type_metadata_map[XdsApi::kEdsTypeUrl].resource_metadata_map;
+ for (auto& p : endpoint_map_) {
+ eds_map[p.first] = &p.second.meta;
+ }
+ // Assemble config dump messages
+ return api_.AssembleClientConfig(resource_type_metadata_map);
+}
+
//
// accessors for global state
//
-void XdsClientGlobalInit() { g_mu = new Mutex; }
+void XdsClientGlobalInit() {
+ g_mu = new Mutex;
+ XdsHttpFilterRegistry::Init();
+}
void XdsClientGlobalShutdown() {
delete g_mu;
g_mu = nullptr;
+ gpr_free(g_fallback_bootstrap_config);
+ g_fallback_bootstrap_config = nullptr;
+ XdsHttpFilterRegistry::Shutdown();
}
RefCountedPtr<XdsClient> XdsClient::GetOrCreate(grpc_error** error) {
- MutexLock lock(g_mu);
- if (g_xds_client != nullptr) {
- auto xds_client = g_xds_client->RefIfNonZero();
- if (xds_client != nullptr) return xds_client;
+ RefCountedPtr<XdsClient> xds_client;
+ {
+ MutexLock lock(g_mu);
+ if (g_xds_client != nullptr) {
+ auto xds_client = g_xds_client->RefIfNonZero();
+ if (xds_client != nullptr) return xds_client;
+ }
+ xds_client = MakeRefCounted<XdsClient>(error);
+ if (*error != GRPC_ERROR_NONE) return nullptr;
+ g_xds_client = xds_client.get();
}
- auto xds_client = MakeRefCounted<XdsClient>(error);
- g_xds_client = xds_client.get();
return xds_client;
}
@@ -2197,6 +2359,26 @@ void UnsetGlobalXdsClientForTest() {
g_xds_client = nullptr;
}
+void SetXdsFallbackBootstrapConfig(const char* config) {
+ MutexLock lock(g_mu);
+ gpr_free(g_fallback_bootstrap_config);
+ g_fallback_bootstrap_config = gpr_strdup(config);
+}
+
} // namespace internal
} // namespace grpc_core
+
+// The returned bytes may contain NULL(0), so we can't use c-string.
+grpc_slice grpc_dump_xds_configs() {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
+ grpc_error* error = GRPC_ERROR_NONE;
+ auto xds_client = grpc_core::XdsClient::GetOrCreate(&error);
+ if (error != GRPC_ERROR_NONE) {
+ // If we isn't using xDS, just return an empty string.
+ GRPC_ERROR_UNREF(error);
+ return grpc_empty_slice();
+ }
+ return grpc_slice_from_cpp_string(xds_client->DumpClientConfigBinary());
+}
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_client.h b/contrib/libs/grpc/src/core/ext/xds/xds_client.h
index 88b2cdbc2d0..8705e596950 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_client.h
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_client.h
@@ -30,7 +30,6 @@
#include "src/core/ext/xds/xds_client_stats.h"
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/gprpp/ref_counted.h"
@@ -39,7 +38,8 @@
namespace grpc_core {
-extern TraceFlag xds_client_trace;
+extern TraceFlag grpc_xds_client_trace;
+extern TraceFlag grpc_xds_client_refcount_trace;
class XdsClient : public DualRefCounted<XdsClient> {
public:
@@ -86,7 +86,17 @@ class XdsClient : public DualRefCounted<XdsClient> {
// Callers should not instantiate directly. Use GetOrCreate() instead.
explicit XdsClient(grpc_error** error);
- ~XdsClient();
+ ~XdsClient() override;
+
+ const XdsBootstrap& bootstrap() const {
+ // bootstrap_ is guaranteed to be non-null since XdsClient::GetOrCreate()
+ // would return a null object if bootstrap_ was null.
+ return *bootstrap_;
+ }
+
+ CertificateProviderStore& certificate_provider_store() {
+ return *certificate_provider_store_;
+ }
grpc_pollset_set* interested_parties() const { return interested_parties_; }
@@ -181,6 +191,15 @@ class XdsClient : public DualRefCounted<XdsClient> {
// Resets connection backoff state.
void ResetBackoff();
+ // Dumps the active xDS config in JSON format.
+ // Individual xDS resource is encoded as envoy.admin.v3.*ConfigDump. Returns
+ // envoy.service.status.v3.ClientConfig which also includes the config
+ // status (e.g., CLIENT_REQUESTED, CLIENT_ACKED, CLIENT_NACKED).
+ //
+ // Expected to be invoked by wrapper languages in their CSDS service
+ // implementation.
+ TString DumpClientConfigBinary();
+
private:
// Contains a channel to the xds server and all the data related to the
// channel. Holds a ref to the xds client object.
@@ -198,8 +217,8 @@ class XdsClient : public DualRefCounted<XdsClient> {
class LrsCallState;
ChannelState(WeakRefCountedPtr<XdsClient> xds_client,
- grpc_channel* channel);
- ~ChannelState();
+ const XdsBootstrap::XdsServer& server);
+ ~ChannelState() override;
void Orphan() override;
@@ -211,6 +230,7 @@ class XdsClient : public DualRefCounted<XdsClient> {
void MaybeStartLrsCall();
void StopLrsCall();
+ bool HasAdsCall() const;
bool HasActiveAdsCall() const;
void StartConnectivityWatchLocked();
@@ -226,6 +246,8 @@ class XdsClient : public DualRefCounted<XdsClient> {
// The owning xds client.
WeakRefCountedPtr<XdsClient> xds_client_;
+ const XdsBootstrap::XdsServer& server_;
+
// The channel and its status.
grpc_channel* channel_;
bool shutting_down_ = false;
@@ -242,6 +264,7 @@ class XdsClient : public DualRefCounted<XdsClient> {
watchers;
// The latest data seen from LDS.
y_absl::optional<XdsApi::LdsUpdate> update;
+ XdsApi::ResourceMetadata meta;
};
struct RouteConfigState {
@@ -250,6 +273,7 @@ class XdsClient : public DualRefCounted<XdsClient> {
watchers;
// The latest data seen from RDS.
y_absl::optional<XdsApi::RdsUpdate> update;
+ XdsApi::ResourceMetadata meta;
};
struct ClusterState {
@@ -257,6 +281,7 @@ class XdsClient : public DualRefCounted<XdsClient> {
watchers;
// The latest data seen from CDS.
y_absl::optional<XdsApi::CdsUpdate> update;
+ XdsApi::ResourceMetadata meta;
};
struct EndpointState {
@@ -265,19 +290,16 @@ class XdsClient : public DualRefCounted<XdsClient> {
watchers;
// The latest data seen from EDS.
y_absl::optional<XdsApi::EdsUpdate> update;
+ XdsApi::ResourceMetadata meta;
};
- // TODO(roth): Change this to store exactly one instance of
- // XdsClusterDropStats and exactly one instance of
- // XdsClusterLocalityStats per locality. We can return multiple refs
- // to the same object instead of registering multiple objects.
struct LoadReportState {
struct LocalityState {
- std::set<XdsClusterLocalityStats*> locality_stats;
- std::vector<XdsClusterLocalityStats::Snapshot> deleted_locality_stats;
+ XdsClusterLocalityStats* locality_stats = nullptr;
+ XdsClusterLocalityStats::Snapshot deleted_locality_stats;
};
- std::set<XdsClusterDropStats*> drop_stats;
+ XdsClusterDropStats* drop_stats = nullptr;
XdsClusterDropStats::Snapshot deleted_drop_stats;
std::map<RefCountedPtr<XdsLocalityName>, LocalityState,
XdsLocalityName::Less>
@@ -291,9 +313,16 @@ class XdsClient : public DualRefCounted<XdsClient> {
XdsApi::ClusterLoadReportMap BuildLoadReportSnapshotLocked(
bool send_all_clusters, const std::set<TString>& clusters);
+ void UpdateResourceMetadataWithFailedParseResult(
+ grpc_millis update_time, const XdsApi::AdsParseResult& result);
+ void UpdatePendingResources(
+ const TString& type_url,
+ XdsApi::ResourceMetadataMap* resource_metadata_map);
+
const grpc_millis request_timeout_;
grpc_pollset_set* interested_parties_;
std::unique_ptr<XdsBootstrap> bootstrap_;
+ OrphanablePtr<CertificateProviderStore> certificate_provider_store_;
XdsApi api_;
Mutex mu_;
@@ -317,12 +346,18 @@ class XdsClient : public DualRefCounted<XdsClient> {
LoadReportState>
load_report_map_;
+ // Stores the most recent accepted resource version for each resource type.
+ std::map<TString /*type*/, TString /*version*/> resource_version_map_;
+
bool shutting_down_ = false;
};
namespace internal {
void SetXdsChannelArgsForTest(grpc_channel_args* args);
void UnsetGlobalXdsClientForTest();
+// Sets bootstrap config to be used when no env var is set.
+// Does not take ownership of config.
+void SetXdsFallbackBootstrapConfig(const char* config);
} // namespace internal
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.cc b/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.cc
index 7a9abd236ad..e35d8fe386e 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.cc
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.cc
@@ -45,12 +45,29 @@ XdsClusterDropStats::XdsClusterDropStats(RefCountedPtr<XdsClient> xds_client,
y_absl::string_view lrs_server_name,
y_absl::string_view cluster_name,
y_absl::string_view eds_service_name)
- : xds_client_(std::move(xds_client)),
+ : RefCounted(GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_refcount_trace)
+ ? "XdsClusterDropStats"
+ : nullptr),
+ xds_client_(std::move(xds_client)),
lrs_server_name_(lrs_server_name),
cluster_name_(cluster_name),
- eds_service_name_(eds_service_name) {}
+ eds_service_name_(eds_service_name) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO, "[xds_client %p] created drop stats %p for {%s, %s, %s}",
+ xds_client_.get(), this, TString(lrs_server_name_).c_str(),
+ TString(cluster_name_).c_str(),
+ TString(eds_service_name_).c_str());
+ }
+}
XdsClusterDropStats::~XdsClusterDropStats() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_client %p] destroying drop stats %p for {%s, %s, %s}",
+ xds_client_.get(), this, TString(lrs_server_name_).c_str(),
+ TString(cluster_name_).c_str(),
+ TString(eds_service_name_).c_str());
+ }
xds_client_->RemoveClusterDropStats(lrs_server_name_, cluster_name_,
eds_service_name_, this);
xds_client_.reset(DEBUG_LOCATION, "DropStats");
@@ -81,13 +98,33 @@ XdsClusterLocalityStats::XdsClusterLocalityStats(
RefCountedPtr<XdsClient> xds_client, y_absl::string_view lrs_server_name,
y_absl::string_view cluster_name, y_absl::string_view eds_service_name,
RefCountedPtr<XdsLocalityName> name)
- : xds_client_(std::move(xds_client)),
+ : RefCounted(GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_refcount_trace)
+ ? "XdsClusterLocalityStats"
+ : nullptr),
+ xds_client_(std::move(xds_client)),
lrs_server_name_(lrs_server_name),
cluster_name_(cluster_name),
eds_service_name_(eds_service_name),
- name_(std::move(name)) {}
+ name_(std::move(name)) {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_client %p] created locality stats %p for {%s, %s, %s, %s}",
+ xds_client_.get(), this, TString(lrs_server_name_).c_str(),
+ TString(cluster_name_).c_str(),
+ TString(eds_service_name_).c_str(),
+ name_->AsHumanReadableString().c_str());
+ }
+}
XdsClusterLocalityStats::~XdsClusterLocalityStats() {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_client_trace)) {
+ gpr_log(GPR_INFO,
+ "[xds_client %p] destroying locality stats %p for {%s, %s, %s, %s}",
+ xds_client_.get(), this, TString(lrs_server_name_).c_str(),
+ TString(cluster_name_).c_str(),
+ TString(eds_service_name_).c_str(),
+ name_->AsHumanReadableString().c_str());
+ }
xds_client_->RemoveClusterLocalityStats(lrs_server_name_, cluster_name_,
eds_service_name_, name_, this);
xds_client_.reset(DEBUG_LOCATION, "LocalityStats");
@@ -100,7 +137,8 @@ XdsClusterLocalityStats::GetSnapshotAndReset() {
// not related to a single reporting interval.
total_requests_in_progress_.Load(MemoryOrder::RELAXED),
GetAndResetCounter(&total_error_requests_),
- GetAndResetCounter(&total_issued_requests_)};
+ GetAndResetCounter(&total_issued_requests_),
+ {}};
MutexLock lock(&backend_metrics_mu_);
snapshot.backend_metrics = std::move(backend_metrics_);
return snapshot;
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.h b/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.h
index b3e3b316d1a..088afe12fc3 100644
--- a/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.h
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_client_stats.h
@@ -56,10 +56,10 @@ class XdsLocalityName : public RefCounted<XdsLocalityName> {
}
};
- XdsLocalityName(TString region, TString zone, TString subzone)
+ XdsLocalityName(TString region, TString zone, TString sub_zone)
: region_(std::move(region)),
zone_(std::move(zone)),
- sub_zone_(std::move(subzone)) {}
+ sub_zone_(std::move(sub_zone)) {}
bool operator==(const XdsLocalityName& other) const {
return region_ == other.region_ && zone_ == other.zone_ &&
@@ -131,7 +131,7 @@ class XdsClusterDropStats : public RefCounted<XdsClusterDropStats> {
y_absl::string_view lrs_server_name,
y_absl::string_view cluster_name,
y_absl::string_view eds_service_name);
- ~XdsClusterDropStats();
+ ~XdsClusterDropStats() override;
// Returns a snapshot of this instance and resets all the counters.
Snapshot GetSnapshotAndReset();
@@ -206,7 +206,7 @@ class XdsClusterLocalityStats : public RefCounted<XdsClusterLocalityStats> {
y_absl::string_view cluster_name,
y_absl::string_view eds_service_name,
RefCountedPtr<XdsLocalityName> name);
- ~XdsClusterLocalityStats();
+ ~XdsClusterLocalityStats() override;
// Returns a snapshot of this instance and resets all the counters.
Snapshot GetSnapshotAndReset();
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.cc b/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.cc
new file mode 100644
index 00000000000..e4ad038a697
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.cc
@@ -0,0 +1,226 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/xds_http_fault_filter.h"
+
+#include <grpc/grpc.h>
+
+#include <util/generic/string.h>
+
+#include "y_absl/status/statusor.h"
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/string_view.h"
+#include "envoy/extensions/filters/common/fault/v3/fault.upb.h"
+#include "envoy/extensions/filters/http/fault/v3/fault.upb.h"
+#include "envoy/extensions/filters/http/fault/v3/fault.upbdefs.h"
+#include "envoy/type/v3/percent.upb.h"
+#include "google/protobuf/any.upb.h"
+#include "google/protobuf/duration.upb.h"
+#include "google/protobuf/wrappers.upb.h"
+#include "src/core/ext/filters/fault_injection/fault_injection_filter.h"
+#include "src/core/ext/xds/xds_http_filters.h"
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/channel/status_util.h"
+#include "src/core/lib/json/json.h"
+#include "src/core/lib/transport/status_conversion.h"
+#include "upb/def.h"
+
+namespace grpc_core {
+
+const char* kXdsHttpFaultFilterConfigName =
+ "envoy.extensions.filters.http.fault.v3.HTTPFault";
+
+namespace {
+
+uint32_t GetDenominator(const envoy_type_v3_FractionalPercent* fraction) {
+ if (fraction != nullptr) {
+ const auto denominator =
+ static_cast<envoy_type_v3_FractionalPercent_DenominatorType>(
+ envoy_type_v3_FractionalPercent_denominator(fraction));
+ switch (denominator) {
+ case envoy_type_v3_FractionalPercent_MILLION:
+ return 1000000;
+ case envoy_type_v3_FractionalPercent_TEN_THOUSAND:
+ return 10000;
+ case envoy_type_v3_FractionalPercent_HUNDRED:
+ default:
+ return 100;
+ }
+ }
+ // Use 100 as the default denominator
+ return 100;
+}
+
+y_absl::StatusOr<Json> ParseHttpFaultIntoJson(upb_strview serialized_http_fault,
+ upb_arena* arena) {
+ auto* http_fault = envoy_extensions_filters_http_fault_v3_HTTPFault_parse(
+ serialized_http_fault.data, serialized_http_fault.size, arena);
+ if (http_fault == nullptr) {
+ return y_absl::InvalidArgumentError(
+ "could not parse fault injection filter config");
+ }
+ // NOTE(lidiz): Here, we are manually translating the upb messages into the
+ // JSON form of the filter config as part of method config, which will be
+ // directly used later by service config. In this way, we can validate the
+ // filter configs, and NACK if needed. It also allows the service config to
+ // function independently without xDS, but not the other way around.
+ // NOTE(lidiz): please refer to FaultInjectionPolicy for ground truth
+ // definitions, located at:
+ // src/core/ext/filters/fault_injection/service_config_parser.h
+ Json::Object fault_injection_policy_json;
+ // Section 1: Parse the abort injection config
+ const auto* fault_abort =
+ envoy_extensions_filters_http_fault_v3_HTTPFault_abort(http_fault);
+ if (fault_abort != nullptr) {
+ grpc_status_code abort_grpc_status_code = GRPC_STATUS_OK;
+ // Try if gRPC status code is set first
+ int abort_grpc_status_code_raw =
+ envoy_extensions_filters_http_fault_v3_FaultAbort_grpc_status(
+ fault_abort);
+ if (abort_grpc_status_code_raw != 0) {
+ if (!grpc_status_code_from_int(abort_grpc_status_code_raw,
+ &abort_grpc_status_code)) {
+ return y_absl::InvalidArgumentError(y_absl::StrCat(
+ "invalid gRPC status code: ", abort_grpc_status_code_raw));
+ }
+ } else {
+ // if gRPC status code is empty, check http status
+ int abort_http_status_code =
+ envoy_extensions_filters_http_fault_v3_FaultAbort_http_status(
+ fault_abort);
+ if (abort_http_status_code != 0 and abort_http_status_code != 200) {
+ abort_grpc_status_code =
+ grpc_http2_status_to_grpc_status(abort_http_status_code);
+ }
+ }
+ // Set the abort_code, even if it's OK
+ fault_injection_policy_json["abortCode"] =
+ grpc_status_code_to_string(abort_grpc_status_code);
+ // Set the headers if we enabled header abort injection control
+ if (envoy_extensions_filters_http_fault_v3_FaultAbort_has_header_abort(
+ fault_abort)) {
+ fault_injection_policy_json["abortCodeHeader"] =
+ "x-envoy-fault-abort-grpc-request";
+ fault_injection_policy_json["abortPercentageHeader"] =
+ "x-envoy-fault-abort-percentage";
+ }
+ // Set the fraction percent
+ auto* percent =
+ envoy_extensions_filters_http_fault_v3_FaultAbort_percentage(
+ fault_abort);
+ fault_injection_policy_json["abortPercentageNumerator"] =
+ Json(envoy_type_v3_FractionalPercent_numerator(percent));
+ fault_injection_policy_json["abortPercentageDenominator"] =
+ Json(GetDenominator(percent));
+ }
+ // Section 2: Parse the delay injection config
+ const auto* fault_delay =
+ envoy_extensions_filters_http_fault_v3_HTTPFault_delay(http_fault);
+ if (fault_delay != nullptr) {
+ // Parse the delay duration
+ const auto* delay_duration =
+ envoy_extensions_filters_common_fault_v3_FaultDelay_fixed_delay(
+ fault_delay);
+ if (delay_duration != nullptr) {
+ fault_injection_policy_json["delay"] = y_absl::StrFormat(
+ "%d.%09ds", google_protobuf_Duration_seconds(delay_duration),
+ google_protobuf_Duration_nanos(delay_duration));
+ }
+ // Set the headers if we enabled header delay injection control
+ if (envoy_extensions_filters_common_fault_v3_FaultDelay_has_header_delay(
+ fault_delay)) {
+ fault_injection_policy_json["delayHeader"] =
+ "x-envoy-fault-delay-request";
+ fault_injection_policy_json["delayPercentageHeader"] =
+ "x-envoy-fault-delay-request-percentage";
+ }
+ // Set the fraction percent
+ auto* percent =
+ envoy_extensions_filters_common_fault_v3_FaultDelay_percentage(
+ fault_delay);
+ fault_injection_policy_json["delayPercentageNumerator"] =
+ Json(envoy_type_v3_FractionalPercent_numerator(percent));
+ fault_injection_policy_json["delayPercentageDenominator"] =
+ Json(GetDenominator(percent));
+ }
+ // Section 3: Parse the maximum active faults
+ const auto* max_fault_wrapper =
+ envoy_extensions_filters_http_fault_v3_HTTPFault_max_active_faults(
+ http_fault);
+ if (max_fault_wrapper != nullptr) {
+ fault_injection_policy_json["maxFaults"] =
+ google_protobuf_UInt32Value_value(max_fault_wrapper);
+ }
+ return fault_injection_policy_json;
+}
+
+} // namespace
+
+void XdsHttpFaultFilter::PopulateSymtab(upb_symtab* symtab) const {
+ envoy_extensions_filters_http_fault_v3_HTTPFault_getmsgdef(symtab);
+}
+
+y_absl::StatusOr<XdsHttpFilterImpl::FilterConfig>
+XdsHttpFaultFilter::GenerateFilterConfig(upb_strview serialized_filter_config,
+ upb_arena* arena) const {
+ y_absl::StatusOr<Json> parse_result =
+ ParseHttpFaultIntoJson(serialized_filter_config, arena);
+ if (!parse_result.ok()) {
+ return parse_result.status();
+ }
+ return FilterConfig{kXdsHttpFaultFilterConfigName, std::move(*parse_result)};
+}
+
+y_absl::StatusOr<XdsHttpFilterImpl::FilterConfig>
+XdsHttpFaultFilter::GenerateFilterConfigOverride(
+ upb_strview serialized_filter_config, upb_arena* arena) const {
+ // HTTPFault filter has the same message type in HTTP connection manager's
+ // filter config and in overriding filter config field.
+ return GenerateFilterConfig(serialized_filter_config, arena);
+}
+
+const grpc_channel_filter* XdsHttpFaultFilter::channel_filter() const {
+ return &FaultInjectionFilterVtable;
+}
+
+grpc_channel_args* XdsHttpFaultFilter::ModifyChannelArgs(
+ grpc_channel_args* args) const {
+ grpc_arg args_to_add = grpc_channel_arg_integer_create(
+ const_cast<char*>(GRPC_ARG_PARSE_FAULT_INJECTION_METHOD_CONFIG), 1);
+ grpc_channel_args* new_args =
+ grpc_channel_args_copy_and_add(args, &args_to_add, 1);
+ // Since this function takes the ownership of the channel args, it needs to
+ // deallocate the old ones to prevent leak.
+ grpc_channel_args_destroy(args);
+ return new_args;
+}
+
+y_absl::StatusOr<XdsHttpFilterImpl::ServiceConfigJsonEntry>
+XdsHttpFaultFilter::GenerateServiceConfig(
+ const FilterConfig& hcm_filter_config,
+ const FilterConfig* filter_config_override) const {
+ Json policy_json = filter_config_override != nullptr
+ ? filter_config_override->config
+ : hcm_filter_config.config;
+ // The policy JSON may be empty, that's allowed.
+ return ServiceConfigJsonEntry{"faultInjectionPolicy", policy_json.Dump()};
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.h b/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.h
new file mode 100644
index 00000000000..48ca530cd6a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_http_fault_filter.h
@@ -0,0 +1,63 @@
+//
+// Copyright 2021 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_HTTP_FAULT_FILTER_H
+#define GRPC_CORE_EXT_XDS_XDS_HTTP_FAULT_FILTER_H
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/grpc.h>
+
+#include "y_absl/status/statusor.h"
+#include "src/core/ext/xds/xds_http_filters.h"
+#include "upb/def.h"
+
+namespace grpc_core {
+
+extern const char* kXdsHttpFaultFilterConfigName;
+
+class XdsHttpFaultFilter : public XdsHttpFilterImpl {
+ public:
+ // Overrides the PopulateSymtab method
+ void PopulateSymtab(upb_symtab* symtab) const override;
+
+ // Overrides the GenerateFilterConfig method
+ y_absl::StatusOr<FilterConfig> GenerateFilterConfig(
+ upb_strview serialized_filter_config, upb_arena* arena) const override;
+
+ // Overrides the GenerateFilterConfigOverride method
+ y_absl::StatusOr<FilterConfig> GenerateFilterConfigOverride(
+ upb_strview serialized_filter_config, upb_arena* arena) const override;
+
+ // Overrides the channel_filter method
+ const grpc_channel_filter* channel_filter() const override;
+
+ // Overrides the ModifyChannelArgs method
+ grpc_channel_args* ModifyChannelArgs(grpc_channel_args* args) const override;
+
+ // Overrides the GenerateServiceConfig method
+ y_absl::StatusOr<ServiceConfigJsonEntry> GenerateServiceConfig(
+ const FilterConfig& hcm_filter_config,
+ const FilterConfig* filter_config_override) const override;
+
+ bool IsSupportedOnClients() const override { return true; }
+
+ bool IsSupportedOnServers() const override { return false; }
+};
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_EXT_XDS_XDS_HTTP_FAULT_FILTER_H */
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.cc b/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.cc
new file mode 100644
index 00000000000..7cfeecb5b41
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.cc
@@ -0,0 +1,114 @@
+//
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/ext/xds/xds_http_filters.h"
+
+#include "envoy/extensions/filters/http/router/v3/router.upb.h"
+#include "envoy/extensions/filters/http/router/v3/router.upbdefs.h"
+#include "src/core/ext/xds/xds_http_fault_filter.h"
+
+namespace grpc_core {
+
+const char* kXdsHttpRouterFilterConfigName =
+ "envoy.extensions.filters.http.router.v3.Router";
+
+namespace {
+
+class XdsHttpRouterFilter : public XdsHttpFilterImpl {
+ public:
+ void PopulateSymtab(upb_symtab* symtab) const override {
+ envoy_extensions_filters_http_router_v3_Router_getmsgdef(symtab);
+ }
+
+ y_absl::StatusOr<FilterConfig> GenerateFilterConfig(
+ upb_strview serialized_filter_config, upb_arena* arena) const override {
+ if (envoy_extensions_filters_http_router_v3_Router_parse(
+ serialized_filter_config.data, serialized_filter_config.size,
+ arena) == nullptr) {
+ return y_absl::InvalidArgumentError("could not parse router filter config");
+ }
+ return FilterConfig{kXdsHttpRouterFilterConfigName, Json()};
+ }
+
+ y_absl::StatusOr<FilterConfig> GenerateFilterConfigOverride(
+ upb_strview /*serialized_filter_config*/,
+ upb_arena* /*arena*/) const override {
+ return y_absl::InvalidArgumentError(
+ "router filter does not support config override");
+ }
+
+ // No-op -- this filter is special-cased by the xds resolver.
+ const grpc_channel_filter* channel_filter() const override { return nullptr; }
+
+ // No-op -- this filter is special-cased by the xds resolver.
+ y_absl::StatusOr<ServiceConfigJsonEntry> GenerateServiceConfig(
+ const FilterConfig& /*hcm_filter_config*/,
+ const FilterConfig* /*filter_config_override*/) const override {
+ return y_absl::UnimplementedError("router filter should never be called");
+ }
+
+ bool IsSupportedOnClients() const override { return true; }
+
+ bool IsSupportedOnServers() const override { return true; }
+};
+
+using FilterOwnerList = std::vector<std::unique_ptr<XdsHttpFilterImpl>>;
+using FilterRegistryMap = std::map<y_absl::string_view, XdsHttpFilterImpl*>;
+
+FilterOwnerList* g_filters = nullptr;
+FilterRegistryMap* g_filter_registry = nullptr;
+
+} // namespace
+
+void XdsHttpFilterRegistry::RegisterFilter(
+ std::unique_ptr<XdsHttpFilterImpl> filter,
+ const std::set<y_absl::string_view>& config_proto_type_names) {
+ for (auto config_proto_type_name : config_proto_type_names) {
+ (*g_filter_registry)[config_proto_type_name] = filter.get();
+ }
+ g_filters->push_back(std::move(filter));
+}
+
+const XdsHttpFilterImpl* XdsHttpFilterRegistry::GetFilterForType(
+ y_absl::string_view proto_type_name) {
+ auto it = g_filter_registry->find(proto_type_name);
+ if (it == g_filter_registry->end()) return nullptr;
+ return it->second;
+}
+
+void XdsHttpFilterRegistry::PopulateSymtab(upb_symtab* symtab) {
+ for (const auto& filter : *g_filters) {
+ filter->PopulateSymtab(symtab);
+ }
+}
+
+void XdsHttpFilterRegistry::Init() {
+ g_filters = new FilterOwnerList;
+ g_filter_registry = new FilterRegistryMap;
+ RegisterFilter(y_absl::make_unique<XdsHttpRouterFilter>(),
+ {kXdsHttpRouterFilterConfigName});
+ RegisterFilter(y_absl::make_unique<XdsHttpFaultFilter>(),
+ {kXdsHttpFaultFilterConfigName});
+}
+
+void XdsHttpFilterRegistry::Shutdown() {
+ delete g_filter_registry;
+ delete g_filters;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.h b/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.h
new file mode 100644
index 00000000000..49ff1687110
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_http_filters.h
@@ -0,0 +1,130 @@
+//
+// Copyright 2021 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_HTTP_FILTERS_H
+#define GRPC_CORE_EXT_XDS_XDS_HTTP_FILTERS_H
+
+#include <grpc/support/port_platform.h>
+
+#include <memory>
+#include <set>
+#include <util/generic/string.h>
+
+#include "y_absl/status/statusor.h"
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/string_view.h"
+#include "google/protobuf/any.upb.h"
+#include "upb/def.h"
+
+#include <grpc/grpc.h>
+
+#include "src/core/lib/channel/channel_stack.h"
+#include "src/core/lib/json/json.h"
+
+namespace grpc_core {
+
+extern const char* kXdsHttpRouterFilterConfigName;
+
+class XdsHttpFilterImpl {
+ public:
+ struct FilterConfig {
+ y_absl::string_view config_proto_type_name;
+ Json config;
+
+ bool operator==(const FilterConfig& other) const {
+ return config_proto_type_name == other.config_proto_type_name &&
+ config == other.config;
+ }
+ TString ToString() const {
+ return y_absl::StrCat("{config_proto_type_name=", config_proto_type_name,
+ " config=", config.Dump(), "}");
+ }
+ };
+
+ // Service config data for the filter, returned by GenerateServiceConfig().
+ struct ServiceConfigJsonEntry {
+ // The top-level field name in the method config.
+ // Filter implementations should use their primary config proto type
+ // name for this.
+ // The value of this field in the method config will be a JSON array,
+ // which will be populated with the elements returned by each filter
+ // instance.
+ TString service_config_field_name;
+ // The element to add to the JSON array.
+ TString element;
+ };
+
+ virtual ~XdsHttpFilterImpl() = default;
+
+ // Loads the proto message into the upb symtab.
+ virtual void PopulateSymtab(upb_symtab* symtab) const = 0;
+
+ // Generates a Config from the xDS filter config proto.
+ // Used for the top-level config in the HCM HTTP filter list.
+ virtual y_absl::StatusOr<FilterConfig> GenerateFilterConfig(
+ upb_strview serialized_filter_config, upb_arena* arena) const = 0;
+
+ // Generates a Config from the xDS filter config proto.
+ // Used for the typed_per_filter_config override in VirtualHost and Route.
+ virtual y_absl::StatusOr<FilterConfig> GenerateFilterConfigOverride(
+ upb_strview serialized_filter_config, upb_arena* arena) const = 0;
+
+ // C-core channel filter implementation.
+ virtual const grpc_channel_filter* channel_filter() const = 0;
+
+ // Modifies channel args that may affect service config parsing (not
+ // visible to the channel as a whole).
+ // Takes ownership of args. Caller takes ownership of return value.
+ virtual grpc_channel_args* ModifyChannelArgs(grpc_channel_args* args) const {
+ return args;
+ }
+
+ // Function to convert the Configs into a JSON string to be added to the
+ // per-method part of the service config.
+ // The hcm_filter_config comes from the HttpConnectionManager config.
+ // The filter_config_override comes from the first of the ClusterWeight,
+ // Route, or VirtualHost entries that it is found in, or null if
+ // there is no override in any of those locations.
+ virtual y_absl::StatusOr<ServiceConfigJsonEntry> GenerateServiceConfig(
+ const FilterConfig& hcm_filter_config,
+ const FilterConfig* filter_config_override) const = 0;
+
+ // Returns true if the filter is supported on clients; false otherwise
+ virtual bool IsSupportedOnClients() const = 0;
+
+ // Returns true if the filter is supported on servers; false otherwise
+ virtual bool IsSupportedOnServers() const = 0;
+};
+
+class XdsHttpFilterRegistry {
+ public:
+ static void RegisterFilter(
+ std::unique_ptr<XdsHttpFilterImpl> filter,
+ const std::set<y_absl::string_view>& config_proto_type_names);
+
+ static const XdsHttpFilterImpl* GetFilterForType(
+ y_absl::string_view proto_type_name);
+
+ static void PopulateSymtab(upb_symtab* symtab);
+
+ // Global init and shutdown.
+ static void Init();
+ static void Shutdown();
+};
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_EXT_XDS_XDS_HTTP_FILTERS_H */
diff --git a/contrib/libs/grpc/src/core/ext/xds/xds_server_config_fetcher.cc b/contrib/libs/grpc/src/core/ext/xds/xds_server_config_fetcher.cc
new file mode 100644
index 00000000000..021d9c7ad93
--- /dev/null
+++ b/contrib/libs/grpc/src/core/ext/xds/xds_server_config_fetcher.cc
@@ -0,0 +1,532 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "y_absl/strings/str_replace.h"
+
+#include "src/core/ext/xds/xds_certificate_provider.h"
+#include "src/core/ext/xds/xds_client.h"
+#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/gprpp/host_port.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+#include "src/core/lib/iomgr/socket_utils.h"
+#include "src/core/lib/security/credentials/xds/xds_credentials.h"
+#include "src/core/lib/surface/api_trace.h"
+#include "src/core/lib/surface/server.h"
+#include "src/core/lib/uri/uri_parser.h"
+
+namespace grpc_core {
+
+TraceFlag grpc_xds_server_config_fetcher_trace(false,
+ "xds_server_config_fetcher");
+
+namespace {
+
+class FilterChainMatchManager
+ : public grpc_server_config_fetcher::ConnectionManager {
+ public:
+ FilterChainMatchManager(
+ RefCountedPtr<XdsClient> xds_client,
+ XdsApi::LdsUpdate::FilterChainMap filter_chain_map,
+ y_absl::optional<XdsApi::LdsUpdate::FilterChainData> default_filter_chain)
+ : xds_client_(xds_client),
+ filter_chain_map_(std::move(filter_chain_map)),
+ default_filter_chain_(std::move(default_filter_chain)) {}
+
+ y_absl::StatusOr<grpc_channel_args*> UpdateChannelArgsForConnection(
+ grpc_channel_args* args, grpc_endpoint* tcp) override;
+
+ const XdsApi::LdsUpdate::FilterChainMap& filter_chain_map() const {
+ return filter_chain_map_;
+ }
+
+ const y_absl::optional<XdsApi::LdsUpdate::FilterChainData>&
+ default_filter_chain() const {
+ return default_filter_chain_;
+ }
+
+ private:
+ struct CertificateProviders {
+ // We need to save our own refs to the root and instance certificate
+ // providers since the xds certificate provider just stores a ref to their
+ // distributors.
+ RefCountedPtr<grpc_tls_certificate_provider> root;
+ RefCountedPtr<grpc_tls_certificate_provider> instance;
+ RefCountedPtr<XdsCertificateProvider> xds;
+ };
+
+ y_absl::StatusOr<RefCountedPtr<XdsCertificateProvider>>
+ CreateOrGetXdsCertificateProviderFromFilterChainData(
+ const XdsApi::LdsUpdate::FilterChainData* filter_chain);
+
+ const RefCountedPtr<XdsClient> xds_client_;
+ const XdsApi::LdsUpdate::FilterChainMap filter_chain_map_;
+ const y_absl::optional<XdsApi::LdsUpdate::FilterChainData>
+ default_filter_chain_;
+ Mutex mu_;
+ std::map<const XdsApi::LdsUpdate::FilterChainData*, CertificateProviders>
+ certificate_providers_map_ Y_ABSL_GUARDED_BY(mu_);
+};
+
+bool IsLoopbackIp(const grpc_resolved_address* address) {
+ const grpc_sockaddr* sock_addr =
+ reinterpret_cast<const grpc_sockaddr*>(&address->addr);
+ if (sock_addr->sa_family == GRPC_AF_INET) {
+ const grpc_sockaddr_in* addr4 =
+ reinterpret_cast<const grpc_sockaddr_in*>(sock_addr);
+ if (addr4->sin_addr.s_addr == grpc_htonl(INADDR_LOOPBACK)) {
+ return true;
+ }
+ } else if (sock_addr->sa_family == GRPC_AF_INET6) {
+ const grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<const grpc_sockaddr_in6*>(sock_addr);
+ if (memcmp(&addr6->sin6_addr, &in6addr_loopback,
+ sizeof(in6addr_loopback)) == 0) {
+ return true;
+ }
+ }
+ return false;
+}
+
+const XdsApi::LdsUpdate::FilterChainData* FindFilterChainDataForSourcePort(
+ const XdsApi::LdsUpdate::FilterChainMap::SourcePortsMap& source_ports_map,
+ y_absl::string_view port_str) {
+ int port = 0;
+ if (!y_absl::SimpleAtoi(port_str, &port)) return nullptr;
+ auto it = source_ports_map.find(port);
+ if (it != source_ports_map.end()) {
+ return it->second.data.get();
+ }
+ // Search for the catch-all port 0 since we didn't get a direct match
+ it = source_ports_map.find(0);
+ if (it != source_ports_map.end()) {
+ return it->second.data.get();
+ }
+ return nullptr;
+}
+
+const XdsApi::LdsUpdate::FilterChainData* FindFilterChainDataForSourceIp(
+ const XdsApi::LdsUpdate::FilterChainMap::SourceIpVector& source_ip_vector,
+ const grpc_resolved_address* source_ip, y_absl::string_view port) {
+ const XdsApi::LdsUpdate::FilterChainMap::SourceIp* best_match = nullptr;
+ for (const auto& entry : source_ip_vector) {
+ // Special case for catch-all
+ if (!entry.prefix_range.has_value()) {
+ if (best_match == nullptr) {
+ best_match = &entry;
+ }
+ continue;
+ }
+ if (best_match != nullptr && best_match->prefix_range.has_value() &&
+ best_match->prefix_range->prefix_len >=
+ entry.prefix_range->prefix_len) {
+ continue;
+ }
+ if (grpc_sockaddr_match_subnet(source_ip, &entry.prefix_range->address,
+ entry.prefix_range->prefix_len)) {
+ best_match = &entry;
+ }
+ }
+ if (best_match == nullptr) return nullptr;
+ return FindFilterChainDataForSourcePort(best_match->ports_map, port);
+}
+
+const XdsApi::LdsUpdate::FilterChainData* FindFilterChainDataForSourceType(
+ const XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceTypesArray&
+ source_types_array,
+ grpc_endpoint* tcp, y_absl::string_view destination_ip) {
+ auto source_uri = URI::Parse(grpc_endpoint_get_peer(tcp));
+ if (!source_uri.ok() ||
+ (source_uri->scheme() != "ipv4" && source_uri->scheme() != "ipv6")) {
+ return nullptr;
+ }
+ TString host;
+ TString port;
+ if (!SplitHostPort(source_uri->path(), &host, &port)) {
+ return nullptr;
+ }
+ grpc_resolved_address source_addr;
+ grpc_string_to_sockaddr(&source_addr, host.c_str(),
+ 0 /* port doesn't matter here */);
+ // Use kAny only if kSameIporLoopback and kExternal are empty
+ if (source_types_array[static_cast<int>(
+ XdsApi::LdsUpdate::FilterChainMap::
+ ConnectionSourceType::kSameIpOrLoopback)]
+ .empty() &&
+ source_types_array[static_cast<int>(XdsApi::LdsUpdate::FilterChainMap::
+ ConnectionSourceType::kExternal)]
+ .empty()) {
+ return FindFilterChainDataForSourceIp(
+ source_types_array[static_cast<int>(
+ XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType::kAny)],
+ &source_addr, port);
+ }
+ if (IsLoopbackIp(&source_addr) || host == destination_ip) {
+ return FindFilterChainDataForSourceIp(
+ source_types_array[static_cast<int>(
+ XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType::
+ kSameIpOrLoopback)],
+ &source_addr, port);
+ } else {
+ return FindFilterChainDataForSourceIp(
+ source_types_array[static_cast<int>(
+ XdsApi::LdsUpdate::FilterChainMap::ConnectionSourceType::
+ kExternal)],
+ &source_addr, port);
+ }
+}
+
+const XdsApi::LdsUpdate::FilterChainData* FindFilterChainDataForDestinationIp(
+ const XdsApi::LdsUpdate::FilterChainMap::DestinationIpVector
+ destination_ip_vector,
+ grpc_endpoint* tcp) {
+ auto destination_uri = URI::Parse(grpc_endpoint_get_local_address(tcp));
+ if (!destination_uri.ok() || (destination_uri->scheme() != "ipv4" &&
+ destination_uri->scheme() != "ipv6")) {
+ return nullptr;
+ }
+ TString host;
+ TString port;
+ if (!SplitHostPort(destination_uri->path(), &host, &port)) {
+ return nullptr;
+ }
+ grpc_resolved_address destination_addr;
+ grpc_string_to_sockaddr(&destination_addr, host.c_str(),
+ 0 /* port doesn't matter here */);
+ const XdsApi::LdsUpdate::FilterChainMap::DestinationIp* best_match = nullptr;
+ for (const auto& entry : destination_ip_vector) {
+ // Special case for catch-all
+ if (!entry.prefix_range.has_value()) {
+ if (best_match == nullptr) {
+ best_match = &entry;
+ }
+ continue;
+ }
+ if (best_match != nullptr && best_match->prefix_range.has_value() &&
+ best_match->prefix_range->prefix_len >=
+ entry.prefix_range->prefix_len) {
+ continue;
+ }
+ if (grpc_sockaddr_match_subnet(&destination_addr,
+ &entry.prefix_range->address,
+ entry.prefix_range->prefix_len)) {
+ best_match = &entry;
+ }
+ }
+ if (best_match == nullptr) return nullptr;
+ return FindFilterChainDataForSourceType(best_match->source_types_array, tcp,
+ host);
+}
+
+y_absl::StatusOr<RefCountedPtr<XdsCertificateProvider>>
+FilterChainMatchManager::CreateOrGetXdsCertificateProviderFromFilterChainData(
+ const XdsApi::LdsUpdate::FilterChainData* filter_chain) {
+ MutexLock lock(&mu_);
+ auto it = certificate_providers_map_.find(filter_chain);
+ if (it != certificate_providers_map_.end()) {
+ return it->second.xds;
+ }
+ CertificateProviders certificate_providers;
+ // Configure root cert.
+ y_absl::string_view root_provider_instance_name =
+ filter_chain->downstream_tls_context.common_tls_context
+ .combined_validation_context
+ .validation_context_certificate_provider_instance.instance_name;
+ y_absl::string_view root_provider_cert_name =
+ filter_chain->downstream_tls_context.common_tls_context
+ .combined_validation_context
+ .validation_context_certificate_provider_instance.certificate_name;
+ if (!root_provider_instance_name.empty()) {
+ certificate_providers.root =
+ xds_client_->certificate_provider_store()
+ .CreateOrGetCertificateProvider(root_provider_instance_name);
+ if (certificate_providers.root == nullptr) {
+ return y_absl::NotFoundError(
+ y_absl::StrCat("Certificate provider instance name: \"",
+ root_provider_instance_name, "\" not recognized."));
+ }
+ }
+ // Configure identity cert.
+ y_absl::string_view identity_provider_instance_name =
+ filter_chain->downstream_tls_context.common_tls_context
+ .tls_certificate_certificate_provider_instance.instance_name;
+ y_absl::string_view identity_provider_cert_name =
+ filter_chain->downstream_tls_context.common_tls_context
+ .tls_certificate_certificate_provider_instance.certificate_name;
+ if (!identity_provider_instance_name.empty()) {
+ certificate_providers.instance =
+ xds_client_->certificate_provider_store()
+ .CreateOrGetCertificateProvider(identity_provider_instance_name);
+ if (certificate_providers.instance == nullptr) {
+ return y_absl::NotFoundError(
+ y_absl::StrCat("Certificate provider instance name: \"",
+ identity_provider_instance_name, "\" not recognized."));
+ }
+ }
+ certificate_providers.xds = MakeRefCounted<XdsCertificateProvider>();
+ certificate_providers.xds->UpdateRootCertNameAndDistributor(
+ "", root_provider_cert_name,
+ certificate_providers.root == nullptr
+ ? nullptr
+ : certificate_providers.root->distributor());
+ certificate_providers.xds->UpdateIdentityCertNameAndDistributor(
+ "", identity_provider_cert_name,
+ certificate_providers.instance == nullptr
+ ? nullptr
+ : certificate_providers.instance->distributor());
+ certificate_providers.xds->UpdateRequireClientCertificate(
+ "", filter_chain->downstream_tls_context.require_client_certificate);
+ auto xds_certificate_provider = certificate_providers.xds;
+ certificate_providers_map_.emplace(filter_chain,
+ std::move(certificate_providers));
+ return xds_certificate_provider;
+}
+
+y_absl::StatusOr<grpc_channel_args*>
+FilterChainMatchManager::UpdateChannelArgsForConnection(grpc_channel_args* args,
+ grpc_endpoint* tcp) {
+ const auto* filter_chain = FindFilterChainDataForDestinationIp(
+ filter_chain_map_.destination_ip_vector, tcp);
+ if (filter_chain == nullptr && default_filter_chain_.has_value()) {
+ filter_chain = &default_filter_chain_.value();
+ }
+ if (filter_chain == nullptr) {
+ grpc_channel_args_destroy(args);
+ return y_absl::UnavailableError("No matching filter chain found");
+ }
+ // Nothing to update if credentials are not xDS.
+ grpc_server_credentials* server_creds =
+ grpc_find_server_credentials_in_args(args);
+ if (server_creds == nullptr || server_creds->type() != kCredentialsTypeXds) {
+ return args;
+ }
+ y_absl::StatusOr<RefCountedPtr<XdsCertificateProvider>> result =
+ CreateOrGetXdsCertificateProviderFromFilterChainData(filter_chain);
+ if (!result.ok()) {
+ grpc_channel_args_destroy(args);
+ return result.status();
+ }
+ RefCountedPtr<XdsCertificateProvider> xds_certificate_provider =
+ std::move(*result);
+ GPR_ASSERT(xds_certificate_provider != nullptr);
+ grpc_arg arg_to_add = xds_certificate_provider->MakeChannelArg();
+ grpc_channel_args* updated_args =
+ grpc_channel_args_copy_and_add(args, &arg_to_add, 1);
+ grpc_channel_args_destroy(args);
+ return updated_args;
+}
+
+class XdsServerConfigFetcher : public grpc_server_config_fetcher {
+ public:
+ explicit XdsServerConfigFetcher(RefCountedPtr<XdsClient> xds_client,
+ grpc_server_xds_status_notifier notifier)
+ : xds_client_(std::move(xds_client)), serving_status_notifier_(notifier) {
+ GPR_ASSERT(xds_client_ != nullptr);
+ }
+
+ void StartWatch(TString listening_address, grpc_channel_args* args,
+ std::unique_ptr<grpc_server_config_fetcher::WatcherInterface>
+ watcher) override {
+ grpc_server_config_fetcher::WatcherInterface* watcher_ptr = watcher.get();
+ auto listener_watcher = y_absl::make_unique<ListenerWatcher>(
+ std::move(watcher), args, xds_client_, serving_status_notifier_,
+ listening_address);
+ auto* listener_watcher_ptr = listener_watcher.get();
+ listening_address = y_absl::StrReplaceAll(
+ xds_client_->bootstrap().server_listener_resource_name_template(),
+ {{"%s", listening_address}});
+ xds_client_->WatchListenerData(listening_address,
+ std::move(listener_watcher));
+ MutexLock lock(&mu_);
+ auto& watcher_state = watchers_[watcher_ptr];
+ watcher_state.listening_address = listening_address;
+ watcher_state.listener_watcher = listener_watcher_ptr;
+ }
+
+ void CancelWatch(
+ grpc_server_config_fetcher::WatcherInterface* watcher) override {
+ MutexLock lock(&mu_);
+ auto it = watchers_.find(watcher);
+ if (it != watchers_.end()) {
+ // Cancel the watch on the listener before erasing
+ xds_client_->CancelListenerDataWatch(it->second.listening_address,
+ it->second.listener_watcher,
+ false /* delay_unsubscription */);
+ watchers_.erase(it);
+ }
+ }
+
+ // Return the interested parties from the xds client so that it can be polled.
+ grpc_pollset_set* interested_parties() override {
+ return xds_client_->interested_parties();
+ }
+
+ private:
+ class ListenerWatcher : public XdsClient::ListenerWatcherInterface {
+ public:
+ explicit ListenerWatcher(
+ std::unique_ptr<grpc_server_config_fetcher::WatcherInterface>
+ server_config_watcher,
+ grpc_channel_args* args, RefCountedPtr<XdsClient> xds_client,
+ grpc_server_xds_status_notifier serving_status_notifier,
+ TString listening_address)
+ : server_config_watcher_(std::move(server_config_watcher)),
+ args_(args),
+ xds_client_(std::move(xds_client)),
+ serving_status_notifier_(serving_status_notifier),
+ listening_address_(std::move(listening_address)) {}
+
+ ~ListenerWatcher() override { grpc_channel_args_destroy(args_); }
+
+ // Deleted due to special handling required for args_. Copy the channel args
+ // if we ever need these.
+ ListenerWatcher(const ListenerWatcher&) = delete;
+ ListenerWatcher& operator=(const ListenerWatcher&) = delete;
+
+ void OnListenerChanged(XdsApi::LdsUpdate listener) override {
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_xds_server_config_fetcher_trace)) {
+ gpr_log(
+ GPR_INFO,
+ "[ListenerWatcher %p] Received LDS update from xds client %p: %s",
+ this, xds_client_.get(), listener.ToString().c_str());
+ }
+ if (listener.address != listening_address_) {
+ OnFatalError(y_absl::FailedPreconditionError(
+ "Address in LDS update does not match listening address"));
+ return;
+ }
+ if (filter_chain_match_manager_ == nullptr) {
+ if (serving_status_notifier_.on_serving_status_change != nullptr) {
+ serving_status_notifier_.on_serving_status_change(
+ serving_status_notifier_.user_data, listening_address_.c_str(),
+ GRPC_STATUS_OK, "");
+ } else {
+ gpr_log(GPR_INFO,
+ "xDS Listener resource obtained; will start serving on %s",
+ listening_address_.c_str());
+ }
+ }
+ if (filter_chain_match_manager_ == nullptr ||
+ !(listener.filter_chain_map ==
+ filter_chain_match_manager_->filter_chain_map() &&
+ listener.default_filter_chain ==
+ filter_chain_match_manager_->default_filter_chain())) {
+ filter_chain_match_manager_ = MakeRefCounted<FilterChainMatchManager>(
+ xds_client_, std::move(listener.filter_chain_map),
+ std::move(listener.default_filter_chain));
+ server_config_watcher_->UpdateConnectionManager(
+ filter_chain_match_manager_);
+ }
+ }
+
+ void OnError(grpc_error* error) override {
+ if (filter_chain_match_manager_ != nullptr) {
+ gpr_log(GPR_ERROR,
+ "ListenerWatcher:%p XdsClient reports error: %s for %s; "
+ "ignoring in favor of existing resource",
+ this, grpc_error_string(error), listening_address_.c_str());
+ } else {
+ if (serving_status_notifier_.on_serving_status_change != nullptr) {
+ serving_status_notifier_.on_serving_status_change(
+ serving_status_notifier_.user_data, listening_address_.c_str(),
+ GRPC_STATUS_UNAVAILABLE, grpc_error_string(error));
+ } else {
+ gpr_log(
+ GPR_ERROR,
+ "ListenerWatcher:%p error obtaining xDS Listener resource: %s; "
+ "not serving on %s",
+ this, grpc_error_string(error), listening_address_.c_str());
+ }
+ }
+ GRPC_ERROR_UNREF(error);
+ }
+
+ void OnFatalError(y_absl::Status status) {
+ gpr_log(
+ GPR_ERROR,
+ "ListenerWatcher:%p Encountered fatal error %s; not serving on %s",
+ this, status.ToString().c_str(), listening_address_.c_str());
+ if (filter_chain_match_manager_ != nullptr) {
+ // The server has started listening already, so we need to gracefully
+ // stop serving.
+ server_config_watcher_->StopServing();
+ filter_chain_match_manager_.reset();
+ }
+ if (serving_status_notifier_.on_serving_status_change != nullptr) {
+ serving_status_notifier_.on_serving_status_change(
+ serving_status_notifier_.user_data, listening_address_.c_str(),
+ static_cast<grpc_status_code>(status.raw_code()),
+ TString(status.message()).c_str());
+ }
+ }
+
+ void OnResourceDoesNotExist() override {
+ OnFatalError(y_absl::NotFoundError("Requested listener does not exist"));
+ }
+
+ private:
+ std::unique_ptr<grpc_server_config_fetcher::WatcherInterface>
+ server_config_watcher_;
+ grpc_channel_args* args_;
+ RefCountedPtr<XdsClient> xds_client_;
+ grpc_server_xds_status_notifier serving_status_notifier_;
+ TString listening_address_;
+ RefCountedPtr<FilterChainMatchManager> filter_chain_match_manager_;
+ };
+
+ struct WatcherState {
+ TString listening_address;
+ ListenerWatcher* listener_watcher = nullptr;
+ };
+
+ RefCountedPtr<XdsClient> xds_client_;
+ grpc_server_xds_status_notifier serving_status_notifier_;
+ Mutex mu_;
+ std::map<grpc_server_config_fetcher::WatcherInterface*, WatcherState>
+ watchers_;
+};
+
+} // namespace
+} // namespace grpc_core
+
+grpc_server_config_fetcher* grpc_server_config_fetcher_xds_create(
+ grpc_server_xds_status_notifier notifier) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
+ GRPC_API_TRACE("grpc_server_config_fetcher_xds_create()", 0, ());
+ grpc_error* error = GRPC_ERROR_NONE;
+ grpc_core::RefCountedPtr<grpc_core::XdsClient> xds_client =
+ grpc_core::XdsClient::GetOrCreate(&error);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "Failed to create xds client: %s",
+ grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ return nullptr;
+ }
+ if (xds_client->bootstrap()
+ .server_listener_resource_name_template()
+ .empty()) {
+ gpr_log(GPR_ERROR,
+ "server_listener_resource_name_template not provided in bootstrap "
+ "file.");
+ return nullptr;
+ }
+ return new grpc_core::XdsServerConfigFetcher(std::move(xds_client), notifier);
+}
diff --git a/contrib/libs/grpc/src/core/lib/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/src/core/lib/.yandex_meta/licenses.list.txt
index e5eda936759..e12e134cb95 100644
--- a/contrib/libs/grpc/src/core/lib/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/src/core/lib/.yandex_meta/licenses.list.txt
@@ -52,3 +52,11 @@
====================COPYRIGHT====================
# Copyright 2019 gRPC authors.
+
+
+====================COPYRIGHT====================
+// Copyright 2021 gRPC authors.
+
+
+====================COPYRIGHT====================
+// Copyright 2021 the gRPC authors.
diff --git a/contrib/libs/grpc/src/core/lib/CMakeLists.txt b/contrib/libs/grpc/src/core/lib/CMakeLists.txt
index 7851d1ba53c..7ec217b8dc1 100644
--- a/contrib/libs/grpc/src/core/lib/CMakeLists.txt
+++ b/contrib/libs/grpc/src/core/lib/CMakeLists.txt
@@ -25,6 +25,7 @@ target_link_libraries(src-core-lib PUBLIC
ybase-internal-spinlock_wait
abseil-cpp-tstring-y_absl-container
abseil-cpp-tstring-y_absl-memory
+ yabseil-cpp-tstring-y_absl-status
yabseil-cpp-tstring-y_absl-strings
ystrings-internal-str_format
yabseil-cpp-tstring-y_absl-synchronization
@@ -64,12 +65,16 @@ target_sources(src-core-lib PRIVATE
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gpr/tmpfile_windows.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gpr/wrap_memcpy.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/arena.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/fork.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/global_config_env.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/host_port.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/mpscq.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/stat_posix.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/stat_windows.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/thd_posix.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/thd_windows.cc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/gprpp/time_util.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/profiling/basic_timers.cc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/lib/profiling/stap_timers.cc
)
diff --git a/contrib/libs/grpc/src/core/lib/channel/channel_args.cc b/contrib/libs/grpc/src/core/lib/channel/channel_args.cc
index cb3d61fc4dc..180634fdae1 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channel_args.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/channel_args.cc
@@ -178,20 +178,21 @@ static int cmp_key_stable(const void* ap, const void* bp) {
return c;
}
-grpc_channel_args* grpc_channel_args_normalize(const grpc_channel_args* a) {
+grpc_channel_args* grpc_channel_args_normalize(const grpc_channel_args* src) {
grpc_arg** args =
- static_cast<grpc_arg**>(gpr_malloc(sizeof(grpc_arg*) * a->num_args));
- for (size_t i = 0; i < a->num_args; i++) {
- args[i] = &a->args[i];
+ static_cast<grpc_arg**>(gpr_malloc(sizeof(grpc_arg*) * src->num_args));
+ for (size_t i = 0; i < src->num_args; i++) {
+ args[i] = &src->args[i];
+ }
+ if (src->num_args > 1) {
+ qsort(args, src->num_args, sizeof(grpc_arg*), cmp_key_stable);
}
- if (a->num_args > 1)
- qsort(args, a->num_args, sizeof(grpc_arg*), cmp_key_stable);
grpc_channel_args* b =
static_cast<grpc_channel_args*>(gpr_malloc(sizeof(grpc_channel_args)));
- b->num_args = a->num_args;
+ b->num_args = src->num_args;
b->args = static_cast<grpc_arg*>(gpr_malloc(sizeof(grpc_arg) * b->num_args));
- for (size_t i = 0; i < a->num_args; i++) {
+ for (size_t i = 0; i < src->num_args; i++) {
b->args[i] = copy_arg(args[i]);
}
diff --git a/contrib/libs/grpc/src/core/lib/channel/channel_stack.cc b/contrib/libs/grpc/src/core/lib/channel/channel_stack.cc
index e9b348972f2..60b83667c54 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channel_stack.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/channel_stack.cc
@@ -81,6 +81,18 @@ grpc_channel_element* grpc_channel_stack_last_element(
return grpc_channel_stack_element(channel_stack, channel_stack->count - 1);
}
+size_t grpc_channel_stack_filter_instance_number(
+ grpc_channel_stack* channel_stack, grpc_channel_element* elem) {
+ size_t num_found = 0;
+ for (size_t i = 0; i < channel_stack->count; ++i) {
+ grpc_channel_element* element =
+ grpc_channel_stack_element(channel_stack, i);
+ if (element == elem) break;
+ if (element->filter == elem->filter) ++num_found;
+ }
+ return num_found;
+}
+
grpc_call_element* grpc_call_stack_element(grpc_call_stack* call_stack,
size_t index) {
return CALL_ELEMS_FROM_STACK(call_stack) + index;
diff --git a/contrib/libs/grpc/src/core/lib/channel/channel_stack.h b/contrib/libs/grpc/src/core/lib/channel/channel_stack.h
index e297df9488d..1573ae1e056 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channel_stack.h
+++ b/contrib/libs/grpc/src/core/lib/channel/channel_stack.h
@@ -204,6 +204,13 @@ grpc_channel_element* grpc_channel_stack_element(grpc_channel_stack* stack,
/* Get the last channel element in a channel stack */
grpc_channel_element* grpc_channel_stack_last_element(
grpc_channel_stack* stack);
+
+// A utility function for a filter to determine how many other instances
+// of the same filter exist above it in the same stack. Intended to be
+// used in the filter's init_channel_elem() method.
+size_t grpc_channel_stack_filter_instance_number(
+ grpc_channel_stack* channel_stack, grpc_channel_element* elem);
+
/* Get a call stack element given a call stack and an index */
grpc_call_element* grpc_call_stack_element(grpc_call_stack* stack, size_t i);
diff --git a/contrib/libs/grpc/src/core/lib/channel/channel_trace.cc b/contrib/libs/grpc/src/core/lib/channel/channel_trace.cc
index dbc33af2d4f..77c3f035f08 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channel_trace.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/channel_trace.cc
@@ -67,16 +67,18 @@ ChannelTrace::ChannelTrace(size_t max_event_memory)
max_event_memory_(max_event_memory),
head_trace_(nullptr),
tail_trace_(nullptr) {
- if (max_event_memory_ == 0)
+ if (max_event_memory_ == 0) {
return; // tracing is disabled if max_event_memory_ == 0
+ }
gpr_mu_init(&tracer_mu_);
time_created_ = grpc_millis_to_timespec(grpc_core::ExecCtx::Get()->Now(),
GPR_CLOCK_REALTIME);
}
ChannelTrace::~ChannelTrace() {
- if (max_event_memory_ == 0)
+ if (max_event_memory_ == 0) {
return; // tracing is disabled if max_event_memory_ == 0
+ }
TraceEvent* it = head_trace_;
while (it != nullptr) {
TraceEvent* to_free = it;
diff --git a/contrib/libs/grpc/src/core/lib/channel/channel_trace.h b/contrib/libs/grpc/src/core/lib/channel/channel_trace.h
index c26e3016da7..126abc7eb9d 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channel_trace.h
+++ b/contrib/libs/grpc/src/core/lib/channel/channel_trace.h
@@ -41,7 +41,7 @@ class BaseNode;
// https://github.com/grpc/proposal/blob/master/A14-channelz.md
class ChannelTrace {
public:
- ChannelTrace(size_t max_event_memory);
+ explicit ChannelTrace(size_t max_event_memory);
~ChannelTrace();
enum Severity {
diff --git a/contrib/libs/grpc/src/core/lib/channel/channelz.cc b/contrib/libs/grpc/src/core/lib/channel/channelz.cc
index 16f505c053e..1352ec55d2c 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channelz.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/channelz.cc
@@ -19,6 +19,11 @@
#include <grpc/impl/codegen/port_platform.h>
#include "src/core/lib/channel/channelz.h"
+#include "src/core/lib/iomgr/resolve_address.h"
+#include "src/core/lib/iomgr/sockaddr_utils.h"
+
+#include "y_absl/strings/escaping.h"
+#include "y_absl/strings/strip.h"
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
@@ -116,21 +121,21 @@ void CallCountingHelper::CollectData(CounterData* out) {
}
}
-void CallCountingHelper::PopulateCallCounts(Json::Object* object) {
+void CallCountingHelper::PopulateCallCounts(Json::Object* json) {
CounterData data;
CollectData(&data);
if (data.calls_started != 0) {
- (*object)["callsStarted"] = ToString(data.calls_started);
+ (*json)["callsStarted"] = ToString(data.calls_started);
gpr_timespec ts = gpr_convert_clock_type(
gpr_cycle_counter_to_time(data.last_call_started_cycle),
GPR_CLOCK_REALTIME);
- (*object)["lastCallStartedTimestamp"] = gpr_format_timespec(ts);
+ (*json)["lastCallStartedTimestamp"] = gpr_format_timespec(ts);
}
if (data.calls_succeeded != 0) {
- (*object)["callsSucceeded"] = ToString(data.calls_succeeded);
+ (*json)["callsSucceeded"] = ToString(data.calls_succeeded);
}
if (data.calls_failed) {
- (*object)["callsFailed"] = ToString(data.calls_failed);
+ (*json)["callsFailed"] = ToString(data.calls_failed);
}
}
@@ -337,6 +342,83 @@ Json ServerNode::RenderJson() {
}
//
+// SocketNode::Security::Tls
+//
+
+Json SocketNode::Security::Tls::RenderJson() {
+ Json::Object data;
+ if (type == NameType::kStandardName) {
+ data["standard_name"] = name;
+ } else if (type == NameType::kOtherName) {
+ data["other_name"] = name;
+ }
+ if (!local_certificate.empty()) {
+ data["local_certificate"] = y_absl::Base64Escape(local_certificate);
+ }
+ if (!remote_certificate.empty()) {
+ data["remote_certificate"] = y_absl::Base64Escape(remote_certificate);
+ }
+ return data;
+}
+
+//
+// SocketNode::Security
+//
+
+Json SocketNode::Security::RenderJson() {
+ Json::Object data;
+ switch (type) {
+ case ModelType::kUnset:
+ break;
+ case ModelType::kTls:
+ if (tls) {
+ data["tls"] = tls->RenderJson();
+ }
+ break;
+ case ModelType::kOther:
+ if (other) {
+ data["other"] = *other;
+ }
+ break;
+ }
+ return data;
+}
+
+namespace {
+
+void* SecurityArgCopy(void* p) {
+ SocketNode::Security* xds_certificate_provider =
+ static_cast<SocketNode::Security*>(p);
+ return xds_certificate_provider->Ref().release();
+}
+
+void SecurityArgDestroy(void* p) {
+ SocketNode::Security* xds_certificate_provider =
+ static_cast<SocketNode::Security*>(p);
+ xds_certificate_provider->Unref();
+}
+
+int SecurityArgCmp(void* p, void* q) { return GPR_ICMP(p, q); }
+
+const grpc_arg_pointer_vtable kChannelArgVtable = {
+ SecurityArgCopy, SecurityArgDestroy, SecurityArgCmp};
+
+} // namespace
+
+grpc_arg SocketNode::Security::MakeChannelArg() const {
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_CHANNELZ_SECURITY),
+ const_cast<SocketNode::Security*>(this), &kChannelArgVtable);
+}
+
+RefCountedPtr<SocketNode::Security> SocketNode::Security::GetFromChannelArgs(
+ const grpc_channel_args* args) {
+ Security* security = grpc_channel_args_find_pointer<Security>(
+ args, GRPC_ARG_CHANNELZ_SECURITY);
+ return security != nullptr ? security->Ref() : nullptr;
+}
+
+//
// SocketNode
//
@@ -346,43 +428,44 @@ void PopulateSocketAddressJson(Json::Object* json, const char* name,
const char* addr_str) {
if (addr_str == nullptr) return;
Json::Object data;
- grpc_uri* uri = grpc_uri_parse(addr_str, true);
- if ((uri != nullptr) && ((strcmp(uri->scheme, "ipv4") == 0) ||
- (strcmp(uri->scheme, "ipv6") == 0))) {
- const char* host_port = uri->path;
- if (*host_port == '/') ++host_port;
+ y_absl::StatusOr<URI> uri = URI::Parse(addr_str);
+ if (uri.ok() && (uri->scheme() == "ipv4" || uri->scheme() == "ipv6")) {
TString host;
TString port;
- GPR_ASSERT(SplitHostPort(host_port, &host, &port));
+ GPR_ASSERT(
+ SplitHostPort(y_absl::StripPrefix(uri->path(), "/"), &host, &port));
int port_num = -1;
if (!port.empty()) {
port_num = atoi(port.data());
}
- char* b64_host = grpc_base64_encode(host.data(), host.size(), false, false);
+ grpc_resolved_address resolved_host;
+ grpc_string_to_sockaddr(&resolved_host, host.c_str(), port_num);
+ TString packed_host = grpc_sockaddr_get_packed_host(&resolved_host);
+ TString b64_host = y_absl::Base64Escape(packed_host);
data["tcpip_address"] = Json::Object{
{"port", port_num},
{"ip_address", b64_host},
};
- gpr_free(b64_host);
- } else if (uri != nullptr && strcmp(uri->scheme, "unix") == 0) {
+ } else if (uri.ok() && uri->scheme() == "unix") {
data["uds_address"] = Json::Object{
- {"filename", uri->path},
+ {"filename", uri->path()},
};
} else {
data["other_address"] = Json::Object{
{"name", addr_str},
};
}
- grpc_uri_destroy(uri);
(*json)[name] = std::move(data);
}
} // namespace
-SocketNode::SocketNode(TString local, TString remote, TString name)
+SocketNode::SocketNode(TString local, TString remote, TString name,
+ RefCountedPtr<Security> security)
: BaseNode(EntityType::kSocket, std::move(name)),
local_(std::move(local)),
- remote_(std::move(remote)) {}
+ remote_(std::move(remote)),
+ security_(std::move(security)) {}
void SocketNode::RecordStreamStartedFromLocal() {
streams_started_.FetchAdd(1, MemoryOrder::RELAXED);
@@ -470,6 +553,10 @@ Json SocketNode::RenderJson() {
}},
{"data", std::move(data)},
};
+ if (security_ != nullptr &&
+ security_->type != SocketNode::Security::ModelType::kUnset) {
+ object["security"] = security_->RenderJson();
+ }
PopulateSocketAddressJson(&object, "remote", remote_.c_str());
PopulateSocketAddressJson(&object, "local", local_.c_str());
return object;
diff --git a/contrib/libs/grpc/src/core/lib/channel/channelz.h b/contrib/libs/grpc/src/core/lib/channel/channelz.h
index 596770ccdc5..0245aa0a79c 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channelz.h
+++ b/contrib/libs/grpc/src/core/lib/channel/channelz.h
@@ -27,12 +27,12 @@
#include <util/generic/string.h>
#include "y_absl/container/inlined_vector.h"
+#include "y_absl/types/optional.h"
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gprpp/atomic.h"
#include "src/core/lib/gprpp/manual_constructor.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
@@ -55,7 +55,7 @@
* events per channel trace node. If
* GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE is set, it will override
* this default value. */
-#define GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT 1024 * 4
+#define GRPC_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE_DEFAULT (1024 * 4)
namespace grpc_core {
@@ -87,7 +87,7 @@ class BaseNode : public RefCounted<BaseNode> {
BaseNode(EntityType type, TString name);
public:
- virtual ~BaseNode();
+ ~BaseNode() override;
// All children must implement this function.
virtual Json RenderJson() = 0;
@@ -269,10 +269,37 @@ class ServerNode : public BaseNode {
std::map<intptr_t, RefCountedPtr<ListenSocketNode>> child_listen_sockets_;
};
+#define GRPC_ARG_CHANNELZ_SECURITY "grpc.internal.channelz_security"
+
// Handles channelz bookkeeping for sockets
class SocketNode : public BaseNode {
public:
- SocketNode(TString local, TString remote, TString name);
+ struct Security : public RefCounted<Security> {
+ struct Tls {
+ enum class NameType { kUnset = 0, kStandardName = 1, kOtherName = 2 };
+ NameType type = NameType::kUnset;
+ // Holds the value of standard_name or other_names if type is not kUnset.
+ TString name;
+ TString local_certificate;
+ TString remote_certificate;
+
+ Json RenderJson();
+ };
+ enum class ModelType { kUnset = 0, kTls = 1, kOther = 2 };
+ ModelType type = ModelType::kUnset;
+ y_absl::optional<Tls> tls;
+ y_absl::optional<Json> other;
+
+ Json RenderJson();
+
+ grpc_arg MakeChannelArg() const;
+
+ static RefCountedPtr<Security> GetFromChannelArgs(
+ const grpc_channel_args* args);
+ };
+
+ SocketNode(TString local, TString remote, TString name,
+ RefCountedPtr<Security> security);
~SocketNode() override {}
Json RenderJson() override;
@@ -306,6 +333,7 @@ class SocketNode : public BaseNode {
Atomic<gpr_cycle_counter> last_message_received_cycle_{0};
TString local_;
TString remote_;
+ RefCountedPtr<Security> const security_;
};
// Handles channelz bookkeeping for listen sockets
diff --git a/contrib/libs/grpc/src/core/lib/channel/channelz_registry.cc b/contrib/libs/grpc/src/core/lib/channel/channelz_registry.cc
index 5a6e28ad789..93f8fb30ab0 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channelz_registry.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/channelz_registry.cc
@@ -181,18 +181,24 @@ void ChannelzRegistry::InternalLogAllEntities() {
} // namespace grpc_core
char* grpc_channelz_get_top_channels(intptr_t start_channel_id) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
return gpr_strdup(
grpc_core::channelz::ChannelzRegistry::GetTopChannels(start_channel_id)
.c_str());
}
char* grpc_channelz_get_servers(intptr_t start_server_id) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
return gpr_strdup(
grpc_core::channelz::ChannelzRegistry::GetServers(start_server_id)
.c_str());
}
char* grpc_channelz_get_server(intptr_t server_id) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
grpc_core::RefCountedPtr<grpc_core::channelz::BaseNode> server_node =
grpc_core::channelz::ChannelzRegistry::Get(server_id);
if (server_node == nullptr ||
@@ -209,6 +215,8 @@ char* grpc_channelz_get_server(intptr_t server_id) {
char* grpc_channelz_get_server_sockets(intptr_t server_id,
intptr_t start_socket_id,
intptr_t max_results) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
// Validate inputs before handing them of to the renderer.
grpc_core::RefCountedPtr<grpc_core::channelz::BaseNode> base_node =
grpc_core::channelz::ChannelzRegistry::Get(server_id);
@@ -226,6 +234,8 @@ char* grpc_channelz_get_server_sockets(intptr_t server_id,
}
char* grpc_channelz_get_channel(intptr_t channel_id) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
grpc_core::RefCountedPtr<grpc_core::channelz::BaseNode> channel_node =
grpc_core::channelz::ChannelzRegistry::Get(channel_id);
if (channel_node == nullptr ||
@@ -242,6 +252,8 @@ char* grpc_channelz_get_channel(intptr_t channel_id) {
}
char* grpc_channelz_get_subchannel(intptr_t subchannel_id) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
grpc_core::RefCountedPtr<grpc_core::channelz::BaseNode> subchannel_node =
grpc_core::channelz::ChannelzRegistry::Get(subchannel_id);
if (subchannel_node == nullptr ||
@@ -256,6 +268,8 @@ char* grpc_channelz_get_subchannel(intptr_t subchannel_id) {
}
char* grpc_channelz_get_socket(intptr_t socket_id) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
grpc_core::RefCountedPtr<grpc_core::channelz::BaseNode> socket_node =
grpc_core::channelz::ChannelzRegistry::Get(socket_id);
if (socket_node == nullptr ||
diff --git a/contrib/libs/grpc/src/core/lib/channel/channelz_registry.h b/contrib/libs/grpc/src/core/lib/channel/channelz_registry.h
index 73a5e20fbda..fb3e623d722 100644
--- a/contrib/libs/grpc/src/core/lib/channel/channelz_registry.h
+++ b/contrib/libs/grpc/src/core/lib/channel/channelz_registry.h
@@ -28,7 +28,6 @@
#include "src/core/lib/channel/channel_trace.h"
#include "src/core/lib/channel/channelz.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/sync.h"
namespace grpc_core {
diff --git a/contrib/libs/grpc/src/core/lib/channel/handshaker.cc b/contrib/libs/grpc/src/core/lib/channel/handshaker.cc
index 826be41cbb0..0d4917c7227 100644
--- a/contrib/libs/grpc/src/core/lib/channel/handshaker.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/handshaker.cc
@@ -53,45 +53,7 @@ TString HandshakerArgsString(HandshakerArgs* args) {
} // namespace
-HandshakeManager::HandshakeManager() { gpr_mu_init(&mu_); }
-
-/// Add \a mgr to the server side list of all pending handshake managers, the
-/// list starts with \a *head.
-// Not thread-safe. Caller needs to synchronize.
-void HandshakeManager::AddToPendingMgrList(HandshakeManager** head) {
- GPR_ASSERT(prev_ == nullptr);
- GPR_ASSERT(next_ == nullptr);
- next_ = *head;
- if (*head) {
- (*head)->prev_ = this;
- }
- *head = this;
-}
-
-/// Remove \a mgr from the server side list of all pending handshake managers.
-// Not thread-safe. Caller needs to synchronize.
-void HandshakeManager::RemoveFromPendingMgrList(HandshakeManager** head) {
- if (next_ != nullptr) {
- next_->prev_ = prev_;
- }
- if (prev_ != nullptr) {
- prev_->next_ = next_;
- } else {
- GPR_ASSERT(*head == this);
- *head = next_;
- }
-}
-
-/// Shutdown all pending handshake managers starting at head on the server
-/// side. Not thread-safe. Caller needs to synchronize.
-void HandshakeManager::ShutdownAllPending(grpc_error* why) {
- auto* head = this;
- while (head != nullptr) {
- head->Shutdown(GRPC_ERROR_REF(why));
- head = head->next_;
- }
- GRPC_ERROR_UNREF(why);
-}
+HandshakeManager::HandshakeManager() {}
void HandshakeManager::Add(RefCountedPtr<Handshaker> handshaker) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_handshaker_trace)) {
@@ -104,10 +66,7 @@ void HandshakeManager::Add(RefCountedPtr<Handshaker> handshaker) {
handshakers_.push_back(std::move(handshaker));
}
-HandshakeManager::~HandshakeManager() {
- handshakers_.clear();
- gpr_mu_destroy(&mu_);
-}
+HandshakeManager::~HandshakeManager() { handshakers_.clear(); }
void HandshakeManager::Shutdown(grpc_error* why) {
{
@@ -216,7 +175,6 @@ void HandshakeManager::DoHandshake(grpc_endpoint* endpoint,
{
MutexLock lock(&mu_);
GPR_ASSERT(index_ == 0);
- GPR_ASSERT(!is_shutdown_);
// Construct handshaker args. These will be passed through all
// handshakers and eventually be freed by the on_handshake_done callback.
args_.endpoint = endpoint;
@@ -256,7 +214,7 @@ void HandshakeManager::DoHandshake(grpc_endpoint* endpoint,
void grpc_handshake_manager_add(grpc_handshake_manager* mgr,
grpc_handshaker* handshaker) {
// This is a transition method to aid the API change for handshakers.
- using namespace grpc_core;
- RefCountedPtr<Handshaker> refd_hs(static_cast<Handshaker*>(handshaker));
+ grpc_core::RefCountedPtr<grpc_core::Handshaker> refd_hs(
+ static_cast<grpc_core::Handshaker*>(handshaker));
mgr->Add(refd_hs);
}
diff --git a/contrib/libs/grpc/src/core/lib/channel/handshaker.h b/contrib/libs/grpc/src/core/lib/channel/handshaker.h
index cc8e9b2578d..2117c334ff4 100644
--- a/contrib/libs/grpc/src/core/lib/channel/handshaker.h
+++ b/contrib/libs/grpc/src/core/lib/channel/handshaker.h
@@ -77,7 +77,7 @@ struct HandshakerArgs {
class Handshaker : public RefCounted<Handshaker> {
public:
- virtual ~Handshaker() = default;
+ ~Handshaker() override = default;
virtual void Shutdown(grpc_error* why) = 0;
virtual void DoHandshake(grpc_tcp_server_acceptor* acceptor,
grpc_closure* on_handshake_done,
@@ -92,20 +92,7 @@ class Handshaker : public RefCounted<Handshaker> {
class HandshakeManager : public RefCounted<HandshakeManager> {
public:
HandshakeManager();
- ~HandshakeManager();
-
- /// Add \a mgr to the server side list of all pending handshake managers, the
- /// list starts with \a *head.
- // Not thread-safe. Caller needs to synchronize.
- void AddToPendingMgrList(HandshakeManager** head);
-
- /// Remove \a mgr from the server side list of all pending handshake managers.
- // Not thread-safe. Caller needs to synchronize.
- void RemoveFromPendingMgrList(HandshakeManager** head);
-
- /// Shutdown all pending handshake managers starting at head on the server
- /// side. Not thread-safe. Caller needs to synchronize.
- void ShutdownAllPending(grpc_error* why);
+ ~HandshakeManager() override;
/// Adds a handshaker to the handshake manager.
/// Takes ownership of \a handshaker.
@@ -144,7 +131,7 @@ class HandshakeManager : public RefCounted<HandshakeManager> {
static const size_t HANDSHAKERS_INIT_SIZE = 2;
- gpr_mu mu_;
+ Mutex mu_;
bool is_shutdown_ = false;
// An array of handshakers added via grpc_handshake_manager_add().
y_absl::InlinedVector<RefCountedPtr<Handshaker>, HANDSHAKERS_INIT_SIZE>
@@ -161,10 +148,6 @@ class HandshakeManager : public RefCounted<HandshakeManager> {
grpc_closure on_handshake_done_;
// Handshaker args.
HandshakerArgs args_;
- // Links to the previous and next managers in a list of all pending handshakes
- // Used at server side only.
- HandshakeManager* prev_ = nullptr;
- HandshakeManager* next_ = nullptr;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/channel/status_util.cc b/contrib/libs/grpc/src/core/lib/channel/status_util.cc
index 39f310a165b..0c60030d5a9 100644
--- a/contrib/libs/grpc/src/core/lib/channel/status_util.cc
+++ b/contrib/libs/grpc/src/core/lib/channel/status_util.cc
@@ -75,8 +75,6 @@ const char* grpc_status_code_to_string(grpc_status_code status) {
return "ALREADY_EXISTS";
case GRPC_STATUS_PERMISSION_DENIED:
return "PERMISSION_DENIED";
- case GRPC_STATUS_UNAUTHENTICATED:
- return "UNAUTHENTICATED";
case GRPC_STATUS_RESOURCE_EXHAUSTED:
return "RESOURCE_EXHAUSTED";
case GRPC_STATUS_FAILED_PRECONDITION:
@@ -93,7 +91,19 @@ const char* grpc_status_code_to_string(grpc_status_code status) {
return "UNAVAILABLE";
case GRPC_STATUS_DATA_LOSS:
return "DATA_LOSS";
+ case GRPC_STATUS_UNAUTHENTICATED:
+ return "UNAUTHENTICATED";
default:
return "UNKNOWN";
}
}
+
+bool grpc_status_code_from_int(int status_int, grpc_status_code* status) {
+ // The range of status code enum is [0, 16], 0 is OK, 16 is UNAUTHENTICATED.
+ if (status_int < GRPC_STATUS_OK || status_int > GRPC_STATUS_UNAUTHENTICATED) {
+ *status = GRPC_STATUS_UNKNOWN;
+ return false;
+ }
+ *status = static_cast<grpc_status_code>(status_int);
+ return true;
+}
diff --git a/contrib/libs/grpc/src/core/lib/channel/status_util.h b/contrib/libs/grpc/src/core/lib/channel/status_util.h
index 5409de6b3c9..969033ad6b6 100644
--- a/contrib/libs/grpc/src/core/lib/channel/status_util.h
+++ b/contrib/libs/grpc/src/core/lib/channel/status_util.h
@@ -34,6 +34,11 @@ bool grpc_status_code_from_string(const char* status_str,
/// Returns the string form of \a status, or "UNKNOWN" if invalid.
const char* grpc_status_code_to_string(grpc_status_code status);
+// Converts an int to grpc_status_code. If the int is not a valid status code,
+// sets the code to GRPC_STATUS_UNKNOWN and returns false. Otherwise, returns
+// true.
+bool grpc_status_code_from_int(int status_int, grpc_status_code* status);
+
namespace grpc_core {
namespace internal {
diff --git a/contrib/libs/grpc/src/core/lib/compression/compression.cc b/contrib/libs/grpc/src/core/lib/compression/compression.cc
index 8a0abca8dd7..d14b738bddb 100644
--- a/contrib/libs/grpc/src/core/lib/compression/compression.cc
+++ b/contrib/libs/grpc/src/core/lib/compression/compression.cc
@@ -150,14 +150,18 @@ grpc_slice grpc_compression_algorithm_slice(
grpc_compression_algorithm grpc_compression_algorithm_from_slice(
const grpc_slice& str) {
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_IDENTITY))
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_IDENTITY)) {
return GRPC_COMPRESS_NONE;
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_DEFLATE))
+ }
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_DEFLATE)) {
return GRPC_COMPRESS_DEFLATE;
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_GZIP))
+ }
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_GZIP)) {
return GRPC_COMPRESS_GZIP;
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_STREAM_SLASH_GZIP))
+ }
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_STREAM_SLASH_GZIP)) {
return GRPC_COMPRESS_STREAM_GZIP;
+ }
return GRPC_COMPRESS_ALGORITHMS_COUNT;
}
diff --git a/contrib/libs/grpc/src/core/lib/compression/compression_args.cc b/contrib/libs/grpc/src/core/lib/compression/compression_args.cc
index 6bbda64e263..03e1a8881b6 100644
--- a/contrib/libs/grpc/src/core/lib/compression/compression_args.cc
+++ b/contrib/libs/grpc/src/core/lib/compression/compression_args.cc
@@ -55,7 +55,7 @@ grpc_channel_args* grpc_channel_args_set_channel_default_compression_algorithm(
GPR_ASSERT(algorithm < GRPC_COMPRESS_ALGORITHMS_COUNT);
grpc_arg tmp;
tmp.type = GRPC_ARG_INTEGER;
- tmp.key = (char*)GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM;
+ tmp.key = const_cast<char*>(GRPC_COMPRESSION_CHANNEL_DEFAULT_ALGORITHM);
tmp.value.integer = algorithm;
return grpc_channel_args_copy_and_add(a, &tmp, 1);
}
@@ -108,7 +108,8 @@ grpc_channel_args* grpc_channel_args_compression_algorithm_set_state(
/* create a new arg */
grpc_arg tmp;
tmp.type = GRPC_ARG_INTEGER;
- tmp.key = (char*)GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET;
+ tmp.key =
+ const_cast<char*>(GRPC_COMPRESSION_CHANNEL_ENABLED_ALGORITHMS_BITSET);
/* all enabled by default */
tmp.value.integer = (1u << GRPC_COMPRESS_ALGORITHMS_COUNT) - 1;
if (state != 0) {
diff --git a/contrib/libs/grpc/src/core/lib/compression/compression_internal.cc b/contrib/libs/grpc/src/core/lib/compression/compression_internal.cc
index e0cf6d45194..50750f85b1e 100644
--- a/contrib/libs/grpc/src/core/lib/compression/compression_internal.cc
+++ b/contrib/libs/grpc/src/core/lib/compression/compression_internal.cc
@@ -34,21 +34,26 @@
grpc_message_compression_algorithm
grpc_message_compression_algorithm_from_slice(const grpc_slice& str) {
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_IDENTITY))
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_IDENTITY)) {
return GRPC_MESSAGE_COMPRESS_NONE;
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_DEFLATE))
+ }
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_DEFLATE)) {
return GRPC_MESSAGE_COMPRESS_DEFLATE;
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_GZIP))
+ }
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_GZIP)) {
return GRPC_MESSAGE_COMPRESS_GZIP;
+ }
return GRPC_MESSAGE_COMPRESS_ALGORITHMS_COUNT;
}
grpc_stream_compression_algorithm grpc_stream_compression_algorithm_from_slice(
const grpc_slice& str) {
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_IDENTITY))
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_IDENTITY)) {
return GRPC_STREAM_COMPRESS_NONE;
- if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_GZIP))
+ }
+ if (grpc_slice_eq_static_interned(str, GRPC_MDSTR_GZIP)) {
return GRPC_STREAM_COMPRESS_GZIP;
+ }
return GRPC_STREAM_COMPRESS_ALGORITHMS_COUNT;
}
diff --git a/contrib/libs/grpc/src/core/lib/compression/compression_internal.h b/contrib/libs/grpc/src/core/lib/compression/compression_internal.h
index 49afb941d73..22977f7e056 100644
--- a/contrib/libs/grpc/src/core/lib/compression/compression_internal.h
+++ b/contrib/libs/grpc/src/core/lib/compression/compression_internal.h
@@ -21,7 +21,8 @@
#include <grpc/support/port_platform.h>
-#include <grpc/impl/codegen/compression_types.h>
+#include <grpc/compression.h>
+#include <grpc/slice.h>
#include "src/core/lib/gpr/useful.h"
diff --git a/contrib/libs/grpc/src/core/lib/compression/stream_compression_identity.cc b/contrib/libs/grpc/src/core/lib/compression/stream_compression_identity.cc
index d5e3afff052..78486f09f05 100644
--- a/contrib/libs/grpc/src/core/lib/compression/stream_compression_identity.cc
+++ b/contrib/libs/grpc/src/core/lib/compression/stream_compression_identity.cc
@@ -82,9 +82,7 @@ grpc_stream_compression_context_create_identity(
}
static void grpc_stream_compression_context_destroy_identity(
- grpc_stream_compression_context* /*ctx*/) {
- return;
-}
+ grpc_stream_compression_context* /*ctx*/) {}
const grpc_stream_compression_vtable grpc_stream_compression_identity_vtable = {
grpc_stream_compress_identity, grpc_stream_decompress_identity,
diff --git a/contrib/libs/grpc/src/core/lib/debug/stats.h b/contrib/libs/grpc/src/core/lib/debug/stats.h
index c184fa7fc70..0957bcfffc9 100644
--- a/contrib/libs/grpc/src/core/lib/debug/stats.h
+++ b/contrib/libs/grpc/src/core/lib/debug/stats.h
@@ -61,10 +61,10 @@ void grpc_stats_diff(const grpc_stats_data* b, const grpc_stats_data* a,
TString grpc_stats_data_as_json(const grpc_stats_data* data);
int grpc_stats_histo_find_bucket_slow(int value, const int* table,
int table_size);
-double grpc_stats_histo_percentile(const grpc_stats_data* data,
+double grpc_stats_histo_percentile(const grpc_stats_data* stats,
grpc_stats_histograms histogram,
double percentile);
-size_t grpc_stats_histo_count(const grpc_stats_data* data,
+size_t grpc_stats_histo_count(const grpc_stats_data* stats,
grpc_stats_histograms histogram);
#endif
diff --git a/contrib/libs/grpc/src/core/lib/debug/stats_data.cc b/contrib/libs/grpc/src/core/lib/debug/stats_data.cc
index f8c27db0a81..ceacc571603 100644
--- a/contrib/libs/grpc/src/core/lib/debug/stats_data.cc
+++ b/contrib/libs/grpc/src/core/lib/debug/stats_data.cc
@@ -280,6 +280,7 @@ const char* grpc_stats_histogram_doc[GRPC_STATS_HISTOGRAM_COUNT] = {
"Number of streams whose payload was written per TCP write",
"Number of streams terminated per TCP write",
"Number of flow control updates written per TCP write",
+ // NOLINTNEXTLINE(bugprone-suspicious-missing-comma)
"How many completion queues were checked looking for a CQ that had "
"requested the incoming call",
};
diff --git a/contrib/libs/grpc/src/core/lib/debug/stats_data.h b/contrib/libs/grpc/src/core/lib/debug/stats_data.h
index 1f3861f4941..c1356c44cd0 100644
--- a/contrib/libs/grpc/src/core/lib/debug/stats_data.h
+++ b/contrib/libs/grpc/src/core/lib/debug/stats_data.h
@@ -397,43 +397,43 @@ typedef enum {
GRPC_STATS_INC_COUNTER(GRPC_STATS_COUNTER_CQ_EV_QUEUE_TRANSIENT_POP_FAILURES)
#define GRPC_STATS_INC_CALL_INITIAL_SIZE(value) \
grpc_stats_inc_call_initial_size((int)(value))
-void grpc_stats_inc_call_initial_size(int x);
+void grpc_stats_inc_call_initial_size(int value);
#define GRPC_STATS_INC_POLL_EVENTS_RETURNED(value) \
grpc_stats_inc_poll_events_returned((int)(value))
-void grpc_stats_inc_poll_events_returned(int x);
+void grpc_stats_inc_poll_events_returned(int value);
#define GRPC_STATS_INC_TCP_WRITE_SIZE(value) \
grpc_stats_inc_tcp_write_size((int)(value))
-void grpc_stats_inc_tcp_write_size(int x);
+void grpc_stats_inc_tcp_write_size(int value);
#define GRPC_STATS_INC_TCP_WRITE_IOV_SIZE(value) \
grpc_stats_inc_tcp_write_iov_size((int)(value))
-void grpc_stats_inc_tcp_write_iov_size(int x);
+void grpc_stats_inc_tcp_write_iov_size(int value);
#define GRPC_STATS_INC_TCP_READ_SIZE(value) \
grpc_stats_inc_tcp_read_size((int)(value))
-void grpc_stats_inc_tcp_read_size(int x);
+void grpc_stats_inc_tcp_read_size(int value);
#define GRPC_STATS_INC_TCP_READ_OFFER(value) \
grpc_stats_inc_tcp_read_offer((int)(value))
-void grpc_stats_inc_tcp_read_offer(int x);
+void grpc_stats_inc_tcp_read_offer(int value);
#define GRPC_STATS_INC_TCP_READ_OFFER_IOV_SIZE(value) \
grpc_stats_inc_tcp_read_offer_iov_size((int)(value))
-void grpc_stats_inc_tcp_read_offer_iov_size(int x);
+void grpc_stats_inc_tcp_read_offer_iov_size(int value);
#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_SIZE(value) \
grpc_stats_inc_http2_send_message_size((int)(value))
-void grpc_stats_inc_http2_send_message_size(int x);
+void grpc_stats_inc_http2_send_message_size(int value);
#define GRPC_STATS_INC_HTTP2_SEND_INITIAL_METADATA_PER_WRITE(value) \
grpc_stats_inc_http2_send_initial_metadata_per_write((int)(value))
-void grpc_stats_inc_http2_send_initial_metadata_per_write(int x);
+void grpc_stats_inc_http2_send_initial_metadata_per_write(int value);
#define GRPC_STATS_INC_HTTP2_SEND_MESSAGE_PER_WRITE(value) \
grpc_stats_inc_http2_send_message_per_write((int)(value))
-void grpc_stats_inc_http2_send_message_per_write(int x);
+void grpc_stats_inc_http2_send_message_per_write(int value);
#define GRPC_STATS_INC_HTTP2_SEND_TRAILING_METADATA_PER_WRITE(value) \
grpc_stats_inc_http2_send_trailing_metadata_per_write((int)(value))
-void grpc_stats_inc_http2_send_trailing_metadata_per_write(int x);
+void grpc_stats_inc_http2_send_trailing_metadata_per_write(int value);
#define GRPC_STATS_INC_HTTP2_SEND_FLOWCTL_PER_WRITE(value) \
grpc_stats_inc_http2_send_flowctl_per_write((int)(value))
-void grpc_stats_inc_http2_send_flowctl_per_write(int x);
+void grpc_stats_inc_http2_send_flowctl_per_write(int value);
#define GRPC_STATS_INC_SERVER_CQS_CHECKED(value) \
grpc_stats_inc_server_cqs_checked((int)(value))
-void grpc_stats_inc_server_cqs_checked(int x);
+void grpc_stats_inc_server_cqs_checked(int value);
#else
#define GRPC_STATS_INC_CLIENT_CALLS_CREATED()
#define GRPC_STATS_INC_SERVER_CALLS_CREATED()
diff --git a/contrib/libs/grpc/src/core/lib/gpr/alloc.cc b/contrib/libs/grpc/src/core/lib/gpr/alloc.cc
index 8c7345b7db5..5bfdc8d1562 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/alloc.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/alloc.cc
@@ -66,9 +66,10 @@ void* gpr_malloc_aligned(size_t size, size_t alignment) {
GPR_ASSERT(((alignment - 1) & alignment) == 0); // Must be power of 2.
size_t extra = alignment - 1 + sizeof(void*);
void* p = gpr_malloc(size + extra);
- void** ret = (void**)(((uintptr_t)p + extra) & ~(alignment - 1));
+ void** ret = reinterpret_cast<void**>(
+ (reinterpret_cast<uintptr_t>(p) + extra) & ~(alignment - 1));
ret[-1] = p;
- return (void*)ret;
+ return ret;
}
void gpr_free_aligned(void* ptr) { gpr_free((static_cast<void**>(ptr))[-1]); }
diff --git a/contrib/libs/grpc/src/core/lib/gpr/cpu_iphone.cc b/contrib/libs/grpc/src/core/lib/gpr/cpu_iphone.cc
index 2847e03ba58..94a724de711 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/cpu_iphone.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/cpu_iphone.cc
@@ -22,8 +22,16 @@
#ifdef GPR_CPU_IPHONE
-/* Probably 2 instead of 1, but see comment on gpr_cpu_current_cpu. */
-unsigned gpr_cpu_num_cores(void) { return 1; }
+#include <sys/sysctl.h>
+
+unsigned gpr_cpu_num_cores(void) {
+ size_t len;
+ unsigned int ncpu;
+ len = sizeof(ncpu);
+ sysctlbyname("hw.ncpu", &ncpu, &len, NULL, 0);
+
+ return ncpu;
+}
/* Most code that's using this is using it to shard across work queues. So
unless profiling shows it's a problem or there appears a way to detect the
diff --git a/contrib/libs/grpc/src/core/lib/gpr/log.cc b/contrib/libs/grpc/src/core/lib/gpr/log.cc
index 8a229b2adf1..9400f7c4bfa 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/log.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/log.cc
@@ -28,12 +28,24 @@
#include <stdio.h>
#include <string.h>
-GPR_GLOBAL_CONFIG_DEFINE_STRING(grpc_verbosity, "ERROR",
+#ifndef GPR_DEFAULT_LOG_VERBOSITY_STRING
+#define GPR_DEFAULT_LOG_VERBOSITY_STRING "ERROR"
+#endif // !GPR_DEFAULT_LOG_VERBOSITY_STRING
+
+GPR_GLOBAL_CONFIG_DEFINE_STRING(grpc_verbosity,
+ GPR_DEFAULT_LOG_VERBOSITY_STRING,
"Default gRPC logging verbosity")
+GPR_GLOBAL_CONFIG_DEFINE_STRING(grpc_stacktrace_minloglevel, "",
+ "Messages logged at the same or higher level "
+ "than this will print stacktrace")
+
+static constexpr gpr_atm GPR_LOG_SEVERITY_UNSET = GPR_LOG_SEVERITY_ERROR + 10;
+static constexpr gpr_atm GPR_LOG_SEVERITY_NONE = GPR_LOG_SEVERITY_ERROR + 11;
void gpr_default_log(gpr_log_func_args* args);
-static gpr_atm g_log_func = (gpr_atm)gpr_default_log;
-static gpr_atm g_min_severity_to_print = GPR_LOG_VERBOSITY_UNSET;
+static gpr_atm g_log_func = reinterpret_cast<gpr_atm>(gpr_default_log);
+static gpr_atm g_min_severity_to_print = GPR_LOG_SEVERITY_UNSET;
+static gpr_atm g_min_severity_to_print_stacktrace = GPR_LOG_SEVERITY_UNSET;
const char* gpr_log_severity_string(gpr_log_severity severity) {
switch (severity) {
@@ -54,6 +66,13 @@ int gpr_should_log(gpr_log_severity severity) {
: 0;
}
+int gpr_should_log_stacktrace(gpr_log_severity severity) {
+ return static_cast<gpr_atm>(severity) >=
+ gpr_atm_no_barrier_load(&g_min_severity_to_print_stacktrace)
+ ? 1
+ : 0;
+}
+
void gpr_log_message(const char* file, int line, gpr_log_severity severity,
const char* message) {
if (gpr_should_log(severity) == 0) {
@@ -66,7 +85,7 @@ void gpr_log_message(const char* file, int line, gpr_log_severity severity,
lfargs.line = line;
lfargs.severity = severity;
lfargs.message = message;
- ((gpr_log_func)gpr_atm_no_barrier_load(&g_log_func))(&lfargs);
+ reinterpret_cast<gpr_log_func>(gpr_atm_no_barrier_load(&g_log_func))(&lfargs);
}
void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) {
@@ -74,23 +93,46 @@ void gpr_set_log_verbosity(gpr_log_severity min_severity_to_print) {
(gpr_atm)min_severity_to_print);
}
-void gpr_log_verbosity_init() {
- grpc_core::UniquePtr<char> verbosity = GPR_GLOBAL_CONFIG_GET(grpc_verbosity);
-
- gpr_atm min_severity_to_print = GPR_LOG_SEVERITY_ERROR;
- if (strlen(verbosity.get()) > 0) {
- if (gpr_stricmp(verbosity.get(), "DEBUG") == 0) {
- min_severity_to_print = static_cast<gpr_atm>(GPR_LOG_SEVERITY_DEBUG);
- } else if (gpr_stricmp(verbosity.get(), "INFO") == 0) {
- min_severity_to_print = static_cast<gpr_atm>(GPR_LOG_SEVERITY_INFO);
- } else if (gpr_stricmp(verbosity.get(), "ERROR") == 0) {
- min_severity_to_print = static_cast<gpr_atm>(GPR_LOG_SEVERITY_ERROR);
- }
+static gpr_atm parse_log_severity(const char* str, gpr_atm error_value) {
+ if (gpr_stricmp(str, "DEBUG") == 0) {
+ return GPR_LOG_SEVERITY_DEBUG;
+ } else if (gpr_stricmp(str, "INFO") == 0) {
+ return GPR_LOG_SEVERITY_INFO;
+ } else if (gpr_stricmp(str, "ERROR") == 0) {
+ return GPR_LOG_SEVERITY_ERROR;
+ } else if (gpr_stricmp(str, "NONE") == 0) {
+ return GPR_LOG_SEVERITY_NONE;
+ } else {
+ return error_value;
}
+}
+
+void gpr_log_verbosity_init() {
+ // init verbosity when it hasn't been set
if ((gpr_atm_no_barrier_load(&g_min_severity_to_print)) ==
- GPR_LOG_VERBOSITY_UNSET) {
+ GPR_LOG_SEVERITY_UNSET) {
+ grpc_core::UniquePtr<char> verbosity =
+ GPR_GLOBAL_CONFIG_GET(grpc_verbosity);
+ gpr_atm min_severity_to_print = GPR_LOG_SEVERITY_ERROR;
+ if (strlen(verbosity.get()) > 0) {
+ min_severity_to_print =
+ parse_log_severity(verbosity.get(), min_severity_to_print);
+ }
gpr_atm_no_barrier_store(&g_min_severity_to_print, min_severity_to_print);
}
+ // init stacktrace_minloglevel when it hasn't been set
+ if ((gpr_atm_no_barrier_load(&g_min_severity_to_print_stacktrace)) ==
+ GPR_LOG_SEVERITY_UNSET) {
+ grpc_core::UniquePtr<char> stacktrace_minloglevel =
+ GPR_GLOBAL_CONFIG_GET(grpc_stacktrace_minloglevel);
+ gpr_atm min_severity_to_print_stacktrace = GPR_LOG_SEVERITY_NONE;
+ if (strlen(stacktrace_minloglevel.get()) > 0) {
+ min_severity_to_print_stacktrace = parse_log_severity(
+ stacktrace_minloglevel.get(), min_severity_to_print_stacktrace);
+ }
+ gpr_atm_no_barrier_store(&g_min_severity_to_print_stacktrace,
+ min_severity_to_print_stacktrace);
+ }
}
void gpr_set_log_function(gpr_log_func f) {
diff --git a/contrib/libs/grpc/src/core/lib/gpr/log_linux.cc b/contrib/libs/grpc/src/core/lib/gpr/log_linux.cc
index 7b098d4711e..3949c128d6d 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/log_linux.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/log_linux.cc
@@ -38,8 +38,13 @@
#include <sys/syscall.h>
#include <time.h>
#include <unistd.h>
+
#include <util/generic/string.h>
+
#include "y_absl/strings/str_format.h"
+#include "src/core/lib/gprpp/examine_stack.h"
+
+int gpr_should_log_stacktrace(gpr_log_severity severity);
static long sys_gettid(void) { return syscall(__NR_gettid); }
@@ -74,10 +79,11 @@ void gpr_default_log(gpr_log_func_args* args) {
timer = static_cast<time_t>(now.tv_sec);
final_slash = strrchr(args->file, '/');
- if (final_slash == nullptr)
+ if (final_slash == nullptr) {
display_file = args->file;
- else
+ } else {
display_file = final_slash + 1;
+ }
if (!localtime_r(&timer, &tm)) {
strcpy(time_buffer, "error:localtime");
@@ -89,7 +95,17 @@ void gpr_default_log(gpr_log_func_args* args) {
TString prefix = y_absl::StrFormat(
"%s%s.%09" PRId32 " %7ld %s:%d]", gpr_log_severity_string(args->severity),
time_buffer, now.tv_nsec, tid, display_file, args->line);
- fprintf(stderr, "%-60s %s\n", prefix.c_str(), args->message);
+
+ y_absl::optional<TString> stack_trace =
+ gpr_should_log_stacktrace(args->severity)
+ ? grpc_core::GetCurrentStackTrace()
+ : y_absl::nullopt;
+ if (stack_trace) {
+ fprintf(stderr, "%-60s %s\n%s\n", prefix.c_str(), args->message,
+ stack_trace->c_str());
+ } else {
+ fprintf(stderr, "%-60s %s\n", prefix.c_str(), args->message);
+ }
}
#endif /* GPR_LINUX_LOG */
diff --git a/contrib/libs/grpc/src/core/lib/gpr/log_posix.cc b/contrib/libs/grpc/src/core/lib/gpr/log_posix.cc
index bc02118d948..600a1f7617c 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/log_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/log_posix.cc
@@ -30,7 +30,11 @@
#include <string.h>
#include <time.h>
#include <util/generic/string.h>
+
#include "y_absl/strings/str_format.h"
+#include "src/core/lib/gprpp/examine_stack.h"
+
+int gpr_should_log_stacktrace(gpr_log_severity severity);
static intptr_t sys_gettid(void) { return (intptr_t)pthread_self(); }
@@ -87,7 +91,17 @@ void gpr_default_log(gpr_log_func_args* args) {
TString prefix = y_absl::StrFormat(
"%s%s.%09d %7" PRIdPTR " %s:%d]", gpr_log_severity_string(args->severity),
time_buffer, (int)(now.tv_nsec), sys_gettid(), display_file, args->line);
- fprintf(stderr, "%-70s %s\n", prefix.c_str(), args->message);
+
+ y_absl::optional<TString> stack_trace =
+ gpr_should_log_stacktrace(args->severity)
+ ? grpc_core::GetCurrentStackTrace()
+ : y_absl::nullopt;
+ if (stack_trace) {
+ fprintf(stderr, "%-70s %s\n%s\n", prefix.c_str(), args->message,
+ stack_trace->c_str());
+ } else {
+ fprintf(stderr, "%-70s %s\n", prefix.c_str(), args->message);
+ }
}
#endif /* defined(GPR_POSIX_LOG) */
diff --git a/contrib/libs/grpc/src/core/lib/gpr/log_windows.cc b/contrib/libs/grpc/src/core/lib/gpr/log_windows.cc
index 060be572b80..ea7c43f19ba 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/log_windows.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/log_windows.cc
@@ -31,6 +31,9 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/string_windows.h"
+#include "src/core/lib/gprpp/examine_stack.h"
+
+int gpr_should_log_stacktrace(gpr_log_severity severity);
void gpr_log(const char* file, int line, gpr_log_severity severity,
const char* format, ...) {
@@ -92,10 +95,21 @@ void gpr_default_log(gpr_log_func_args* args) {
strcpy(time_buffer, "error:strftime");
}
- fprintf(stderr, "%s%s.%09u %5lu %s:%d] %s\n",
- gpr_log_severity_string(args->severity), time_buffer,
- (int)(now.tv_nsec), GetCurrentThreadId(), display_file, args->line,
- args->message);
+ y_absl::optional<TString> stack_trace =
+ gpr_should_log_stacktrace(args->severity)
+ ? grpc_core::GetCurrentStackTrace()
+ : y_absl::nullopt;
+ if (stack_trace) {
+ fprintf(stderr, "%s%s.%09u %5lu %s:%d] %s\n%s\n",
+ gpr_log_severity_string(args->severity), time_buffer,
+ (int)(now.tv_nsec), GetCurrentThreadId(), display_file, args->line,
+ args->message, stack_trace->c_str());
+ } else {
+ fprintf(stderr, "%s%s.%09u %5lu %s:%d] %s\n",
+ gpr_log_severity_string(args->severity), time_buffer,
+ (int)(now.tv_nsec), GetCurrentThreadId(), display_file, args->line,
+ args->message);
+ }
fflush(stderr);
}
diff --git a/contrib/libs/grpc/src/core/lib/gpr/murmur_hash.cc b/contrib/libs/grpc/src/core/lib/gpr/murmur_hash.cc
index cf25abf40d5..95d11d3ce70 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/murmur_hash.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/murmur_hash.cc
@@ -22,7 +22,7 @@
#include <string.h>
-#define ROTL32(x, r) ((x) << (r)) | ((x) >> (32 - (r)))
+#define ROTL32(x, r) (((x) << (r)) | ((x) >> (32 - (r))))
#define FMIX32(h) \
(h) ^= (h) >> 16; \
diff --git a/contrib/libs/grpc/src/core/lib/gpr/spinlock.h b/contrib/libs/grpc/src/core/lib/gpr/spinlock.h
index a9c0e62d92c..4a19f45babd 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/spinlock.h
+++ b/contrib/libs/grpc/src/core/lib/gpr/spinlock.h
@@ -23,8 +23,9 @@
#include <grpc/support/atm.h>
-/* Simple spinlock. No backoff strategy, gpr_spinlock_lock is almost always
- a concurrency code smell. */
+// Simple spinlock. No backoff strategy, gpr_spinlock_lock is almost always
+// a concurrency code smell. Code must _never_ block while holding a spinlock
+// as this could lead to a deadlock under a cooperative multithreading model.
struct gpr_spinlock {
gpr_atm atm;
};
@@ -38,6 +39,13 @@ struct gpr_spinlock {
#define gpr_spinlock_trylock(lock) (gpr_atm_acq_cas(&(lock)->atm, 0, 1))
#define gpr_spinlock_unlock(lock) (gpr_atm_rel_store(&(lock)->atm, 0))
+// Although the following code spins without any library or system calls, it
+// still functions under cooperative multithreading. The principle is that
+// the lock holder can't block, so it will be scheduled onto its system thread
+// for the entire critical section. By the time another thread attempts a lock,
+// it will either get it immediately or will be scheduled onto another system
+// thread that is different from the current lockholder. There is no chance of
+// waiting for a lockholder scheduled to the same system thread.
#define gpr_spinlock_lock(lock) \
do { \
} while (!gpr_spinlock_trylock((lock)))
diff --git a/contrib/libs/grpc/src/core/lib/gpr/string.cc b/contrib/libs/grpc/src/core/lib/gpr/string.cc
index 28f1ae437d0..767a465e1bd 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/string.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/string.cc
@@ -55,7 +55,7 @@ char* gpr_strdup(const char* src) {
TString gpr_format_timespec(gpr_timespec tm) {
char time_buffer[35];
char ns_buffer[11]; // '.' + 9 digits of precision
- struct tm* tm_info = localtime((const time_t*)&tm.tv_sec);
+ struct tm* tm_info = localtime(reinterpret_cast<time_t*>(&tm.tv_sec));
strftime(time_buffer, sizeof(time_buffer), "%Y-%m-%dT%H:%M:%S", tm_info);
snprintf(ns_buffer, 11, ".%09d", tm.tv_nsec);
// This loop trims off trailing zeros by inserting a null character that the
@@ -119,7 +119,8 @@ static void asciidump(dump_out* out, const char* buf, size_t len) {
dump_out_append(out, '\'');
}
for (cur = beg; cur != end; ++cur) {
- dump_out_append(out, (isprint(*cur) ? *(char*)cur : '.'));
+ dump_out_append(
+ out, (isprint(*cur) ? *reinterpret_cast<const char*>(cur) : '.'));
}
if (!out_was_empty) {
dump_out_append(out, '\'');
@@ -172,51 +173,51 @@ void gpr_reverse_bytes(char* str, int len) {
}
}
-int gpr_ltoa(long value, char* string) {
+int gpr_ltoa(long value, char* output) {
long sign;
int i = 0;
if (value == 0) {
- string[0] = '0';
- string[1] = 0;
+ output[0] = '0';
+ output[1] = 0;
return 1;
}
sign = value < 0 ? -1 : 1;
while (value) {
- string[i++] = static_cast<char>('0' + sign * (value % 10));
+ output[i++] = static_cast<char>('0' + sign * (value % 10));
value /= 10;
}
- if (sign < 0) string[i++] = '-';
- gpr_reverse_bytes(string, i);
- string[i] = 0;
+ if (sign < 0) output[i++] = '-';
+ gpr_reverse_bytes(output, i);
+ output[i] = 0;
return i;
}
-int int64_ttoa(int64_t value, char* string) {
+int int64_ttoa(int64_t value, char* output) {
int64_t sign;
int i = 0;
if (value == 0) {
- string[0] = '0';
- string[1] = 0;
+ output[0] = '0';
+ output[1] = 0;
return 1;
}
sign = value < 0 ? -1 : 1;
while (value) {
- string[i++] = static_cast<char>('0' + sign * (value % 10));
+ output[i++] = static_cast<char>('0' + sign * (value % 10));
value /= 10;
}
- if (sign < 0) string[i++] = '-';
- gpr_reverse_bytes(string, i);
- string[i] = 0;
+ if (sign < 0) output[i++] = '-';
+ gpr_reverse_bytes(output, i);
+ output[i] = 0;
return i;
}
int gpr_parse_nonnegative_int(const char* value) {
char* end;
- long result = strtol(value, &end, 0);
+ long result = strtol(value, &end, 10);
if (*end != '\0' || result < 0 || result > INT_MAX) return -1;
return static_cast<int>(result);
}
@@ -311,7 +312,7 @@ void gpr_string_split(const char* input, const char* sep, char*** strs,
void* gpr_memrchr(const void* s, int c, size_t n) {
if (s == nullptr) return nullptr;
- char* b = (char*)s;
+ char* b = const_cast<char*>(reinterpret_cast<const char*>(s));
size_t i;
for (i = 0; i < n; i++) {
if (b[n - i - 1] == c) {
@@ -321,19 +322,19 @@ void* gpr_memrchr(const void* s, int c, size_t n) {
return nullptr;
}
-bool gpr_parse_bool_value(const char* s, bool* dst) {
+bool gpr_parse_bool_value(const char* value, bool* dst) {
const char* kTrue[] = {"1", "t", "true", "y", "yes"};
const char* kFalse[] = {"0", "f", "false", "n", "no"};
static_assert(sizeof(kTrue) == sizeof(kFalse), "true_false_equal");
- if (s == nullptr) {
+ if (value == nullptr) {
return false;
}
for (size_t i = 0; i < GPR_ARRAY_SIZE(kTrue); ++i) {
- if (gpr_stricmp(s, kTrue[i]) == 0) {
+ if (gpr_stricmp(value, kTrue[i]) == 0) {
*dst = true;
return true;
- } else if (gpr_stricmp(s, kFalse[i]) == 0) {
+ } else if (gpr_stricmp(value, kFalse[i]) == 0) {
*dst = false;
return true;
}
diff --git a/contrib/libs/grpc/src/core/lib/gpr/string.h b/contrib/libs/grpc/src/core/lib/gpr/string.h
index 4b348198b82..ab9d16bbb29 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/string.h
+++ b/contrib/libs/grpc/src/core/lib/gpr/string.h
@@ -45,8 +45,7 @@ char* gpr_dump_return_len(const char* buf, size_t len, uint32_t flags,
/* Parses an array of bytes into an integer (base 10). Returns 1 on success,
0 on failure. */
-int gpr_parse_bytes_to_uint32(const char* data, size_t length,
- uint32_t* result);
+int gpr_parse_bytes_to_uint32(const char* buf, size_t len, uint32_t* result);
/* Minimum buffer size for calling ltoa */
#define GPR_LTOA_MIN_BUFSIZE (3 * sizeof(long))
@@ -77,15 +76,15 @@ void gpr_reverse_bytes(char* str, int len);
char* gpr_leftpad(const char* str, char flag, size_t length);
/* Join a set of strings, returning the resulting string.
- Total combined length (excluding null terminator) is returned in total_length
+ Total combined length (excluding null terminator) is returned in final_length
if it is non-null. */
-char* gpr_strjoin(const char** strs, size_t nstrs, size_t* total_length);
+char* gpr_strjoin(const char** strs, size_t nstrs, size_t* final_length);
/* Join a set of strings using a separator, returning the resulting string.
- Total combined length (excluding null terminator) is returned in total_length
+ Total combined length (excluding null terminator) is returned in final_length
if it is non-null. */
char* gpr_strjoin_sep(const char** strs, size_t nstrs, const char* sep,
- size_t* total_length);
+ size_t* final_length);
void gpr_string_split(const char* input, const char* sep, char*** strs,
size_t* nstrs);
diff --git a/contrib/libs/grpc/src/core/lib/gpr/sync.cc b/contrib/libs/grpc/src/core/lib/gpr/sync.cc
index 2f18fc5ecb4..36c35da38df 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/sync.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/sync.cc
@@ -48,7 +48,7 @@ static void event_initialize(void) {
/* Hash ev into an element of sync_array[]. */
static struct sync_array_s* hash(gpr_event* ev) {
- return &sync_array[((uintptr_t)ev) % event_sync_partitions];
+ return &sync_array[reinterpret_cast<uintptr_t>(ev) % event_sync_partitions];
}
void gpr_event_init(gpr_event* ev) {
@@ -67,16 +67,16 @@ void gpr_event_set(gpr_event* ev, void* value) {
}
void* gpr_event_get(gpr_event* ev) {
- return (void*)gpr_atm_acq_load(&ev->state);
+ return reinterpret_cast<void*>(gpr_atm_acq_load(&ev->state));
}
void* gpr_event_wait(gpr_event* ev, gpr_timespec abs_deadline) {
- void* result = (void*)gpr_atm_acq_load(&ev->state);
+ void* result = reinterpret_cast<void*>(gpr_atm_acq_load(&ev->state));
if (result == nullptr) {
struct sync_array_s* s = hash(ev);
gpr_mu_lock(&s->mu);
do {
- result = (void*)gpr_atm_acq_load(&ev->state);
+ result = reinterpret_cast<void*>(gpr_atm_acq_load(&ev->state));
} while (result == nullptr && !gpr_cv_wait(&s->cv, &s->mu, abs_deadline));
gpr_mu_unlock(&s->mu);
}
diff --git a/contrib/libs/grpc/src/core/lib/gpr/sync_abseil.cc b/contrib/libs/grpc/src/core/lib/gpr/sync_abseil.cc
index 86b0d03b675..982f748ee1f 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/sync_abseil.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/sync_abseil.cc
@@ -62,8 +62,7 @@ void gpr_mu_unlock(gpr_mu* mu) Y_ABSL_NO_THREAD_SAFETY_ANALYSIS {
int gpr_mu_trylock(gpr_mu* mu) {
GPR_TIMER_SCOPE("gpr_mu_trylock", 0);
- int ret = reinterpret_cast<y_absl::Mutex*>(mu)->TryLock() == true;
- return ret;
+ return reinterpret_cast<y_absl::Mutex*>(mu)->TryLock();
}
/*----------------------------------------*/
@@ -89,10 +88,8 @@ int gpr_cv_wait(gpr_cv* cv, gpr_mu* mu, gpr_timespec abs_deadline) {
abs_deadline = gpr_convert_clock_type(abs_deadline, GPR_CLOCK_REALTIME);
timespec ts = {static_cast<decltype(ts.tv_sec)>(abs_deadline.tv_sec),
static_cast<decltype(ts.tv_nsec)>(abs_deadline.tv_nsec)};
- int ret = reinterpret_cast<y_absl::CondVar*>(cv)->WaitWithDeadline(
- reinterpret_cast<y_absl::Mutex*>(mu),
- y_absl::TimeFromTimespec(ts)) == true;
- return ret;
+ return reinterpret_cast<y_absl::CondVar*>(cv)->WaitWithDeadline(
+ reinterpret_cast<y_absl::Mutex*>(mu), y_absl::TimeFromTimespec(ts));
}
void gpr_cv_signal(gpr_cv* cv) {
diff --git a/contrib/libs/grpc/src/core/lib/gpr/sync_windows.cc b/contrib/libs/grpc/src/core/lib/gpr/sync_windows.cc
index 64eec7c2e11..a6173c72e9a 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/sync_windows.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/sync_windows.cc
@@ -100,7 +100,7 @@ void gpr_cv_broadcast(gpr_cv* cv) { WakeAllConditionVariable(cv); }
/*----------------------------------------*/
-static void* dummy;
+static void* phony;
struct run_once_func_arg {
void (*init_function)(void);
};
@@ -113,7 +113,7 @@ static BOOL CALLBACK run_once_func(gpr_once* once, void* v, void** pv) {
void gpr_once_init(gpr_once* once, void (*init_function)(void)) {
struct run_once_func_arg arg;
arg.init_function = init_function;
- InitOnceExecuteOnce(once, run_once_func, &arg, &dummy);
+ InitOnceExecuteOnce(once, run_once_func, &arg, &phony);
}
#endif /* defined(GPR_WINDOWS) && !defined(GPR_ABSEIL_SYNC) && \
diff --git a/contrib/libs/grpc/src/core/lib/gpr/time.cc b/contrib/libs/grpc/src/core/lib/gpr/time.cc
index db5a7f64f70..14df70d7d66 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/time.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/time.cc
@@ -107,28 +107,28 @@ static gpr_timespec to_seconds_from_above_second_time(int64_t time_in_units,
return out;
}
-gpr_timespec gpr_time_from_nanos(int64_t ns, gpr_clock_type type) {
- return to_seconds_from_sub_second_time(ns, GPR_NS_PER_SEC, type);
+gpr_timespec gpr_time_from_nanos(int64_t ns, gpr_clock_type clock_type) {
+ return to_seconds_from_sub_second_time(ns, GPR_NS_PER_SEC, clock_type);
}
-gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type type) {
- return to_seconds_from_sub_second_time(us, GPR_US_PER_SEC, type);
+gpr_timespec gpr_time_from_micros(int64_t us, gpr_clock_type clock_type) {
+ return to_seconds_from_sub_second_time(us, GPR_US_PER_SEC, clock_type);
}
-gpr_timespec gpr_time_from_millis(int64_t ms, gpr_clock_type type) {
- return to_seconds_from_sub_second_time(ms, GPR_MS_PER_SEC, type);
+gpr_timespec gpr_time_from_millis(int64_t ms, gpr_clock_type clock_type) {
+ return to_seconds_from_sub_second_time(ms, GPR_MS_PER_SEC, clock_type);
}
-gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type type) {
- return to_seconds_from_sub_second_time(s, 1, type);
+gpr_timespec gpr_time_from_seconds(int64_t s, gpr_clock_type clock_type) {
+ return to_seconds_from_sub_second_time(s, 1, clock_type);
}
-gpr_timespec gpr_time_from_minutes(int64_t m, gpr_clock_type type) {
- return to_seconds_from_above_second_time(m, 60, type);
+gpr_timespec gpr_time_from_minutes(int64_t m, gpr_clock_type clock_type) {
+ return to_seconds_from_above_second_time(m, 60, clock_type);
}
-gpr_timespec gpr_time_from_hours(int64_t h, gpr_clock_type type) {
- return to_seconds_from_above_second_time(h, 3600, type);
+gpr_timespec gpr_time_from_hours(int64_t h, gpr_clock_type clock_type) {
+ return to_seconds_from_above_second_time(h, 3600, clock_type);
}
gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b) {
diff --git a/contrib/libs/grpc/src/core/lib/gpr/time_precise.cc b/contrib/libs/grpc/src/core/lib/gpr/time_precise.cc
index 4d1b64b8b26..c66b981d321 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/time_precise.cc
+++ b/contrib/libs/grpc/src/core/lib/gpr/time_precise.cc
@@ -148,8 +148,9 @@ gpr_cycle_counter gpr_get_cycle_counter() {
gpr_timespec gpr_cycle_counter_to_time(gpr_cycle_counter cycles) {
gpr_timespec ts;
- ts.tv_sec = cycles / GPR_US_PER_SEC;
- ts.tv_nsec = (cycles - ts.tv_sec * GPR_US_PER_SEC) * GPR_NS_PER_US;
+ ts.tv_sec = static_cast<int64_t>(cycles / GPR_US_PER_SEC);
+ ts.tv_nsec = static_cast<int64_t>((cycles - ts.tv_sec * GPR_US_PER_SEC) *
+ GPR_NS_PER_US);
ts.clock_type = GPR_CLOCK_PRECISE;
return ts;
}
diff --git a/contrib/libs/grpc/src/core/lib/gpr/tls.h b/contrib/libs/grpc/src/core/lib/gpr/tls.h
index aee8f4d941d..5eb69512001 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/tls.h
+++ b/contrib/libs/grpc/src/core/lib/gpr/tls.h
@@ -53,6 +53,10 @@
ALL functions here may be implemented as macros. */
+#ifdef GPR_STDCPP_TLS
+#include "src/core/lib/gpr/tls_stdcpp.h"
+#endif
+
#ifdef GPR_GCC_TLS
#include "src/core/lib/gpr/tls_gcc.h"
#endif
diff --git a/contrib/libs/grpc/src/core/lib/gpr/tls_msvc.h b/contrib/libs/grpc/src/core/lib/gpr/tls_msvc.h
index f4b3f0f50f6..73e67345d6e 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/tls_msvc.h
+++ b/contrib/libs/grpc/src/core/lib/gpr/tls_msvc.h
@@ -24,6 +24,8 @@
#include tls.h to use this - and see that file for documentation */
+#include <cstdint>
+
struct gpr_msvc_thread_local {
intptr_t value;
};
diff --git a/contrib/libs/grpc/src/core/lib/gpr/tls_stdcpp.h b/contrib/libs/grpc/src/core/lib/gpr/tls_stdcpp.h
new file mode 100644
index 00000000000..b5b422a5c87
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gpr/tls_stdcpp.h
@@ -0,0 +1,48 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_GPR_TLS_STDCPP_H
+#define GRPC_CORE_LIB_GPR_TLS_STDCPP_H
+
+#include <grpc/support/port_platform.h>
+
+/** Thread local storage based on C++ thread_local.
+ #include tls.h to use this - and see that file for documentation */
+
+/** Use GPR_TLS_DECL to declare tls static variables outside a class */
+#define GPR_TLS_DECL(name) thread_local static intptr_t name = 0
+
+/** Use GPR_TLS_CLASS_DECL to declare tls static variable members of a class.
+ * GPR_TLS_CLASS_DEF needs to be called to define this member. */
+#define GPR_TLS_CLASS_DECL(name) thread_local static intptr_t name
+
+#define GPR_TLS_CLASS_DEF(name) thread_local intptr_t name = 0
+
+#define gpr_tls_init(tls) \
+ do { \
+ } while (0)
+
+#define gpr_tls_destroy(tls) \
+ do { \
+ } while (0)
+
+#define gpr_tls_set(tls, new_value) (*(tls) = (new_value))
+
+#define gpr_tls_get(tls) (*(tls))
+
+#endif /* GRPC_CORE_LIB_GPR_TLS_STDCPP_H */
diff --git a/contrib/libs/grpc/src/core/lib/gpr/useful.h b/contrib/libs/grpc/src/core/lib/gpr/useful.h
index a4e73b9a613..8382a50e8db 100644
--- a/contrib/libs/grpc/src/core/lib/gpr/useful.h
+++ b/contrib/libs/grpc/src/core/lib/gpr/useful.h
@@ -33,8 +33,8 @@
#define GPR_SWAP(type, a, b) \
do { \
type x = a; \
- a = b; \
- b = x; \
+ (a) = b; \
+ (b) = x; \
} while (0)
/** Set the \a n-th bit of \a i (a mutable pointer). */
@@ -59,7 +59,8 @@
#define GPR_ICMP(a, b) ((a) < (b) ? -1 : ((a) > (b) ? 1 : 0))
-#define GPR_HASH_POINTER(x, range) \
- ((((size_t)x) >> 4) ^ (((size_t)x) >> 9) ^ (((size_t)x) >> 14)) % (range)
+#define GPR_HASH_POINTER(x, range) \
+ (((((size_t)(x)) >> 4) ^ (((size_t)(x)) >> 9) ^ (((size_t)(x)) >> 14)) % \
+ (range))
#endif /* GRPC_CORE_LIB_GPR_USEFUL_H */
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/README.md b/contrib/libs/grpc/src/core/lib/gprpp/README.md
index f541d22bbcd..f5b87481c0b 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/README.md
+++ b/contrib/libs/grpc/src/core/lib/gprpp/README.md
@@ -6,7 +6,3 @@ for other open source projects written in C++.
Note that this is one of the few places in src/core where we allow
the use of portability macros.
-
-Note that this is the only place in src/core where we allow
-use of the C++ standard library (i.e., anything in the `std::`
-namespace).
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/arena.h b/contrib/libs/grpc/src/core/lib/gprpp/arena.h
index 67c91d9f490..baca5a75e86 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/arena.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/arena.h
@@ -96,7 +96,8 @@ class Arena {
// where we wish to create an arena and then perform an immediate
// allocation.
explicit Arena(size_t initial_size, size_t initial_alloc = 0)
- : total_used_(initial_alloc), initial_zone_size_(initial_size) {}
+ : total_used_(GPR_ROUND_UP_TO_ALIGNMENT_SIZE(initial_alloc)),
+ initial_zone_size_(initial_size) {}
~Arena();
@@ -105,7 +106,7 @@ class Arena {
// Keep track of the total used size. We use this in our call sizing
// hysteresis.
Atomic<size_t> total_used_;
- size_t initial_zone_size_;
+ const size_t initial_zone_size_;
gpr_spinlock arena_growth_spinlock_ = GPR_SPINLOCK_STATIC_INITIALIZER;
// If the initial arena allocation wasn't enough, we allocate additional zones
// in a reverse linked list. Each additional zone consists of (1) a pointer to
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/atomic.h b/contrib/libs/grpc/src/core/lib/gprpp/atomic.h
index 4a53d2cfa55..dd99d9ed4d7 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/atomic.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/atomic.h
@@ -81,8 +81,8 @@ class Atomic {
// Atomically increment a counter only if the counter value is not zero.
// Returns true if increment took place; false if counter is zero.
- bool IncrementIfNonzero(MemoryOrder load_order = MemoryOrder::ACQUIRE) {
- T count = storage_.load(static_cast<std::memory_order>(load_order));
+ bool IncrementIfNonzero() {
+ T count = storage_.load(std::memory_order_acquire);
do {
// If zero, we are done (without an increment). If not, we must do a CAS
// to maintain the contract: do not increment the counter if it is already
@@ -91,7 +91,7 @@ class Atomic {
return false;
}
} while (!CompareExchangeWeak(&count, count + 1, MemoryOrder::ACQ_REL,
- load_order));
+ MemoryOrder::ACQUIRE));
return true;
}
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/dual_ref_counted.h b/contrib/libs/grpc/src/core/lib/gprpp/dual_ref_counted.h
index 66935bbdea1..5217bfa1067 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/dual_ref_counted.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/dual_ref_counted.h
@@ -27,7 +27,6 @@
#include <cassert>
#include <cinttypes>
-#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/atomic.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/orphanable.h"
@@ -52,7 +51,7 @@ namespace grpc_core {
template <typename Child>
class DualRefCounted : public Orphanable {
public:
- virtual ~DualRefCounted() = default;
+ ~DualRefCounted() override = default;
RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT {
IncrementRefCount();
@@ -72,10 +71,9 @@ class DualRefCounted : public Orphanable {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p unref %d -> %d, weak_ref %d -> %d",
- trace_flag_->name(), this, strong_refs, strong_refs - 1,
- weak_refs, weak_refs + 1);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p unref %d -> %d, weak_ref %d -> %d", trace_, this,
+ strong_refs, strong_refs - 1, weak_refs, weak_refs + 1);
}
GPR_ASSERT(strong_refs > 0);
#endif
@@ -91,10 +89,10 @@ class DualRefCounted : public Orphanable {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d unref %d -> %d, weak_ref %d -> %d) %s",
- trace_flag_->name(), this, location.file(), location.line(),
- strong_refs, strong_refs - 1, weak_refs, weak_refs + 1, reason);
+ trace_, this, location.file(), location.line(), strong_refs,
+ strong_refs - 1, weak_refs, weak_refs + 1, reason);
}
GPR_ASSERT(strong_refs > 0);
#else
@@ -115,10 +113,9 @@ class DualRefCounted : public Orphanable {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p ref_if_non_zero %d -> %d (weak_refs=%d)",
- trace_flag_->name(), this, strong_refs, strong_refs + 1,
- weak_refs);
+ trace_, this, strong_refs, strong_refs + 1, weak_refs);
}
#endif
if (strong_refs == 0) return nullptr;
@@ -135,11 +132,11 @@ class DualRefCounted : public Orphanable {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
#ifndef NDEBUG
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
gpr_log(GPR_INFO,
"%s:%p %s:%d ref_if_non_zero %d -> %d (weak_refs=%d) %s",
- trace_flag_->name(), this, location.file(), location.line(),
- strong_refs, strong_refs + 1, weak_refs, reason);
+ trace_, this, location.file(), location.line(), strong_refs,
+ strong_refs + 1, weak_refs, reason);
}
#else
// Avoid unused-parameter warnings for debug-only parameters
@@ -167,17 +164,18 @@ class DualRefCounted : public Orphanable {
void WeakUnref() {
#ifndef NDEBUG
// Grab a copy of the trace flag before the atomic change, since we
- // can't safely access it afterwards if we're going to be freed.
- auto* trace_flag = trace_flag_;
+ // will no longer be holding a ref afterwards and therefore can't
+ // safely access it, since another thread might free us in the interim.
+ const char* trace = trace_;
#endif
const uint64_t prev_ref_pair =
refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL);
- const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
#ifndef NDEBUG
+ const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
- if (trace_flag != nullptr && trace_flag->enabled()) {
- gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)",
- trace_flag->name(), this, weak_refs, weak_refs - 1, strong_refs);
+ if (trace != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p weak_unref %d -> %d (refs=%d)", trace, this,
+ weak_refs, weak_refs - 1, strong_refs);
}
GPR_ASSERT(weak_refs > 0);
#endif
@@ -188,18 +186,19 @@ class DualRefCounted : public Orphanable {
void WeakUnref(const DebugLocation& location, const char* reason) {
#ifndef NDEBUG
// Grab a copy of the trace flag before the atomic change, since we
- // can't safely access it afterwards if we're going to be freed.
- auto* trace_flag = trace_flag_;
+ // will no longer be holding a ref afterwards and therefore can't
+ // safely access it, since another thread might free us in the interim.
+ const char* trace = trace_;
#endif
const uint64_t prev_ref_pair =
refs_.FetchSub(MakeRefPair(0, 1), MemoryOrder::ACQ_REL);
- const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
#ifndef NDEBUG
+ const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
- if (trace_flag != nullptr && trace_flag->enabled()) {
- gpr_log(GPR_INFO, "%s:%p %s:%d weak_unref %d -> %d (refs=%d) %s",
- trace_flag->name(), this, location.file(), location.line(),
- weak_refs, weak_refs - 1, strong_refs, reason);
+ if (trace != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p %s:%d weak_unref %d -> %d (refs=%d) %s", trace,
+ this, location.file(), location.line(), weak_refs, weak_refs - 1,
+ strong_refs, reason);
}
GPR_ASSERT(weak_refs > 0);
#else
@@ -217,21 +216,18 @@ class DualRefCounted : public Orphanable {
DualRefCounted& operator=(const DualRefCounted&) = delete;
protected:
- // TraceFlagT is defined to accept both DebugOnlyTraceFlag and TraceFlag.
- // Note: RefCount tracing is only enabled on debug builds, even when a
- // TraceFlag is used.
- template <typename TraceFlagT = TraceFlag>
+ // Note: Tracing is a no-op in non-debug builds.
explicit DualRefCounted(
- TraceFlagT*
+ const char*
#ifndef NDEBUG
// Leave unnamed if NDEBUG to avoid unused parameter warning
- trace_flag
+ trace
#endif
= nullptr,
int32_t initial_refcount = 1)
:
#ifndef NDEBUG
- trace_flag_(trace_flag),
+ trace_(trace),
#endif
refs_(MakeRefPair(initial_refcount, 0)) {
}
@@ -262,10 +258,9 @@ class DualRefCounted : public Orphanable {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
GPR_ASSERT(strong_refs != 0);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p ref %d -> %d; (weak_refs=%d)",
- trace_flag_->name(), this, strong_refs, strong_refs + 1,
- weak_refs);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p ref %d -> %d; (weak_refs=%d)", trace_, this,
+ strong_refs, strong_refs + 1, weak_refs);
}
#else
refs_.FetchAdd(MakeRefPair(1, 0), MemoryOrder::RELAXED);
@@ -278,10 +273,10 @@ class DualRefCounted : public Orphanable {
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
GPR_ASSERT(strong_refs != 0);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p %s:%d ref %d -> %d (weak_refs=%d) %s",
- trace_flag_->name(), this, location.file(), location.line(),
- strong_refs, strong_refs + 1, weak_refs, reason);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p %s:%d ref %d -> %d (weak_refs=%d) %s", trace_,
+ this, location.file(), location.line(), strong_refs,
+ strong_refs + 1, weak_refs, reason);
}
#else
// Use conditionally-important parameters
@@ -297,9 +292,9 @@ class DualRefCounted : public Orphanable {
refs_.FetchAdd(MakeRefPair(0, 1), MemoryOrder::RELAXED);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p weak_ref %d -> %d; (refs=%d)",
- trace_flag_->name(), this, weak_refs, weak_refs + 1, strong_refs);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p weak_ref %d -> %d; (refs=%d)", trace_, this,
+ weak_refs, weak_refs + 1, strong_refs);
}
#else
refs_.FetchAdd(MakeRefPair(0, 1), MemoryOrder::RELAXED);
@@ -312,10 +307,10 @@ class DualRefCounted : public Orphanable {
refs_.FetchAdd(MakeRefPair(0, 1), MemoryOrder::RELAXED);
const uint32_t strong_refs = GetStrongRefs(prev_ref_pair);
const uint32_t weak_refs = GetWeakRefs(prev_ref_pair);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p %s:%d weak_ref %d -> %d (refs=%d) %s",
- trace_flag_->name(), this, location.file(), location.line(),
- weak_refs, weak_refs + 1, strong_refs, reason);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p %s:%d weak_ref %d -> %d (refs=%d) %s", trace_,
+ this, location.file(), location.line(), weak_refs, weak_refs + 1,
+ strong_refs, reason);
}
#else
// Use conditionally-important parameters
@@ -326,7 +321,7 @@ class DualRefCounted : public Orphanable {
}
#ifndef NDEBUG
- TraceFlag* trace_flag_;
+ const char* trace_;
#endif
Atomic<uint64_t> refs_;
};
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.cc b/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.cc
new file mode 100644
index 00000000000..bc692924471
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.cc
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/gprpp/examine_stack.h"
+
+namespace grpc_core {
+
+gpr_current_stack_trace_func g_current_stack_trace_provider = nullptr;
+
+gpr_current_stack_trace_func GetCurrentStackTraceProvider() {
+ return g_current_stack_trace_provider;
+}
+
+void SetCurrentStackTraceProvider(
+ gpr_current_stack_trace_func current_stack_trace_provider) {
+ g_current_stack_trace_provider = current_stack_trace_provider;
+}
+
+y_absl::optional<TString> GetCurrentStackTrace() {
+ if (g_current_stack_trace_provider != nullptr) {
+ return g_current_stack_trace_provider();
+ }
+ return y_absl::nullopt;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.h b/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.h
new file mode 100644
index 00000000000..a3ddcb13d1d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gprpp/examine_stack.h
@@ -0,0 +1,46 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+#ifndef GRPC_CORE_LIB_GPRPP_EXAMINE_STACK_H
+#define GRPC_CORE_LIB_GPRPP_EXAMINE_STACK_H
+
+#include <grpc/support/port_platform.h>
+
+#include <functional>
+#include <util/generic/string.h>
+
+#include "y_absl/types/optional.h"
+
+namespace grpc_core {
+
+typedef TString (*gpr_current_stack_trace_func)();
+
+// Returns a current_stack_trace_provider.
+gpr_current_stack_trace_func GetCurrentStackTraceProvider();
+
+// Sets current_stack_trace_provider which provides a current-stack trace.
+void SetCurrentStackTraceProvider(
+ gpr_current_stack_trace_func current_stack_trace_provider);
+
+// Returns the current stack trace as a string via current_stack_trace_provider
+// If current_stack_trace_provider is not set, it returns y_absl::nullopt.
+y_absl::optional<TString> GetCurrentStackTrace();
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_LIB_GPRPP_EXAMINE_STACK_H */
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/fork.cc b/contrib/libs/grpc/src/core/lib/gprpp/fork.cc
index 51d1c80e674..45a4a894f82 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/fork.cc
+++ b/contrib/libs/grpc/src/core/lib/gprpp/fork.cc
@@ -43,7 +43,7 @@
GPR_GLOBAL_CONFIG_DEFINE_BOOL(grpc_enable_fork_support,
GRPC_ENABLE_FORK_SUPPORT_DEFAULT,
- "Enable folk support");
+ "Enable fork support");
namespace grpc_core {
namespace internal {
@@ -54,7 +54,7 @@ namespace internal {
// When blocked, the exec_ctx_count is 0-indexed. Note that ExecCtx
// creation can only be blocked if there is exactly 1 outstanding ExecCtx,
// meaning that BLOCKED and UNBLOCKED counts partition the integers
-#define UNBLOCKED(n) (n + 2)
+#define UNBLOCKED(n) ((n) + 2)
#define BLOCKED(n) (n)
class ExecCtxState {
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/manual_constructor.h b/contrib/libs/grpc/src/core/lib/gprpp/manual_constructor.h
index 7f827ca8b76..7ee13796eea 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/manual_constructor.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/manual_constructor.h
@@ -145,7 +145,7 @@ class PolymorphicManualConstructor {
}
template <class DerivedType>
void Init(DerivedType&& x) {
- FinishInit(new (&space_) DerivedType(std::move(x)));
+ FinishInit(new (&space_) DerivedType(std::forward<DerivedType>(x)));
}
void Destroy() { get()->~BaseType(); }
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/map.h b/contrib/libs/grpc/src/core/lib/gprpp/map.h
deleted file mode 100644
index 741b0b1ed52..00000000000
--- a/contrib/libs/grpc/src/core/lib/gprpp/map.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- *
- * Copyright 2017 gRPC authors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef GRPC_CORE_LIB_GPRPP_MAP_H
-#define GRPC_CORE_LIB_GPRPP_MAP_H
-
-#include <grpc/support/port_platform.h>
-
-#include <string.h>
-
-#include <map>
-
-#include "y_absl/strings/string_view.h"
-
-#include "src/core/lib/gprpp/memory.h"
-
-namespace grpc_core {
-
-struct StringLess {
- bool operator()(const char* a, const char* b) const {
- return strcmp(a, b) < 0;
- }
- bool operator()(const grpc_core::UniquePtr<char>& a,
- const grpc_core::UniquePtr<char>& b) const {
- return strcmp(a.get(), b.get()) < 0;
- }
- bool operator()(const y_absl::string_view& a,
- const y_absl::string_view& b) const {
- const size_t min_size = std::min(a.size(), b.size());
- int c = strncmp(a.data(), b.data(), min_size);
- if (c != 0) return c < 0;
- return a.size() < b.size();
- }
-};
-
-} // namespace grpc_core
-
-#endif /* GRPC_CORE_LIB_GPRPP_MAP_H */
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/mpscq.cc b/contrib/libs/grpc/src/core/lib/gprpp/mpscq.cc
index 2bf9981ee26..373ec09f8e9 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/mpscq.cc
+++ b/contrib/libs/grpc/src/core/lib/gprpp/mpscq.cc
@@ -86,9 +86,9 @@ bool LockedMultiProducerSingleConsumerQueue::Push(Node* node) {
LockedMultiProducerSingleConsumerQueue::Node*
LockedMultiProducerSingleConsumerQueue::TryPop() {
- if (gpr_mu_trylock(mu_.get())) {
+ if (mu_.TryLock()) {
Node* node = queue_.Pop();
- gpr_mu_unlock(mu_.get());
+ mu_.Unlock();
return node;
}
return nullptr;
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/orphanable.h b/contrib/libs/grpc/src/core/lib/gprpp/orphanable.h
index 79542de6dd1..2a95b9df13b 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/orphanable.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/orphanable.h
@@ -27,7 +27,6 @@
#include <cinttypes>
#include <memory>
-#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted.h"
@@ -85,14 +84,11 @@ class InternallyRefCounted : public Orphanable {
template <typename T>
friend class RefCountedPtr;
- // TraceFlagT is defined to accept both DebugOnlyTraceFlag and TraceFlag.
- // Note: RefCount tracing is only enabled on debug builds, even when a
- // TraceFlag is used.
- template <typename TraceFlagT = TraceFlag>
- explicit InternallyRefCounted(TraceFlagT* trace_flag = nullptr,
+ // Note: Tracing is a no-op on non-debug builds.
+ explicit InternallyRefCounted(const char* trace = nullptr,
intptr_t initial_refcount = 1)
- : refs_(initial_refcount, trace_flag) {}
- virtual ~InternallyRefCounted() = default;
+ : refs_(initial_refcount, trace) {}
+ ~InternallyRefCounted() override = default;
RefCountedPtr<Child> Ref() GRPC_MUST_USE_RESULT {
IncrementRefCount();
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/ref_counted.h b/contrib/libs/grpc/src/core/lib/gprpp/ref_counted.h
index d05ff6e44c4..47e2aadc374 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/ref_counted.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/ref_counted.h
@@ -29,7 +29,6 @@
#include <cassert>
#include <cinttypes>
-#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/atomic.h"
#include "src/core/lib/gprpp/debug_location.h"
#include "src/core/lib/gprpp/memory.h"
@@ -51,21 +50,19 @@ class RefCount {
// `init` is the initial refcount stored in this object.
//
- // TraceFlagT is defined to accept both DebugOnlyTraceFlag and TraceFlag.
- // Note: RefCount tracing is only enabled on debug builds, even when a
- // TraceFlag is used.
- template <typename TraceFlagT = TraceFlag>
- constexpr explicit RefCount(
+ // `trace` is a string to be logged with trace events; if null, no
+ // trace logging will be done. Tracing is a no-op in non-debug builds.
+ explicit RefCount(
Value init = 1,
- TraceFlagT*
+ const char*
#ifndef NDEBUG
// Leave unnamed if NDEBUG to avoid unused parameter warning
- trace_flag
+ trace
#endif
= nullptr)
:
#ifndef NDEBUG
- trace_flag_(trace_flag),
+ trace_(trace),
#endif
value_(init) {
}
@@ -74,9 +71,9 @@ class RefCount {
void Ref(Value n = 1) {
#ifndef NDEBUG
const Value prior = value_.FetchAdd(n, MemoryOrder::RELAXED);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p ref %" PRIdPTR " -> %" PRIdPTR,
- trace_flag_->name(), this, prior, prior + n);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p ref %" PRIdPTR " -> %" PRIdPTR, trace_, this,
+ prior, prior + n);
}
#else
value_.FetchAdd(n, MemoryOrder::RELAXED);
@@ -85,16 +82,15 @@ class RefCount {
void Ref(const DebugLocation& location, const char* reason, Value n = 1) {
#ifndef NDEBUG
const Value prior = value_.FetchAdd(n, MemoryOrder::RELAXED);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d ref %" PRIdPTR " -> %" PRIdPTR " %s",
- trace_flag_->name(), this, location.file(), location.line(),
- prior, prior + n, reason);
+ trace_, this, location.file(), location.line(), prior, prior + n,
+ reason);
}
#else
// Use conditionally-important parameters
(void)location;
(void)reason;
-
value_.FetchAdd(n, MemoryOrder::RELAXED);
#endif
}
@@ -103,9 +99,9 @@ class RefCount {
void RefNonZero() {
#ifndef NDEBUG
const Value prior = value_.FetchAdd(1, MemoryOrder::RELAXED);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
- gpr_log(GPR_INFO, "%s:%p ref %" PRIdPTR " -> %" PRIdPTR,
- trace_flag_->name(), this, prior, prior + 1);
+ if (trace_ != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p ref %" PRIdPTR " -> %" PRIdPTR, trace_, this,
+ prior, prior + 1);
}
assert(prior > 0);
#else
@@ -115,10 +111,10 @@ class RefCount {
void RefNonZero(const DebugLocation& location, const char* reason) {
#ifndef NDEBUG
const Value prior = value_.FetchAdd(1, MemoryOrder::RELAXED);
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d ref %" PRIdPTR " -> %" PRIdPTR " %s",
- trace_flag_->name(), this, location.file(), location.line(),
- prior, prior + 1, reason);
+ trace_, this, location.file(), location.line(), prior, prior + 1,
+ reason);
}
assert(prior > 0);
#else
@@ -131,23 +127,22 @@ class RefCount {
bool RefIfNonZero() {
#ifndef NDEBUG
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
const Value prior = get();
gpr_log(GPR_INFO, "%s:%p ref_if_non_zero %" PRIdPTR " -> %" PRIdPTR,
- trace_flag_->name(), this, prior, prior + 1);
+ trace_, this, prior, prior + 1);
}
#endif
return value_.IncrementIfNonzero();
}
bool RefIfNonZero(const DebugLocation& location, const char* reason) {
#ifndef NDEBUG
- if (trace_flag_ != nullptr && trace_flag_->enabled()) {
+ if (trace_ != nullptr) {
const Value prior = get();
gpr_log(GPR_INFO,
- "%s:%p %s:%d ref_if_non_zero "
- "%" PRIdPTR " -> %" PRIdPTR " %s",
- trace_flag_->name(), this, location.file(), location.line(),
- prior, prior + 1, reason);
+ "%s:%p %s:%d ref_if_non_zero %" PRIdPTR " -> %" PRIdPTR " %s",
+ trace_, this, location.file(), location.line(), prior, prior + 1,
+ reason);
}
#endif
// Avoid unused-parameter warnings for debug-only parameters
@@ -160,14 +155,15 @@ class RefCount {
bool Unref() {
#ifndef NDEBUG
// Grab a copy of the trace flag before the atomic change, since we
- // can't safely access it afterwards if we're going to be freed.
- auto* trace_flag = trace_flag_;
+ // will no longer be holding a ref afterwards and therefore can't
+ // safely access it, since another thread might free us in the interim.
+ auto* trace = trace_;
#endif
const Value prior = value_.FetchSub(1, MemoryOrder::ACQ_REL);
#ifndef NDEBUG
- if (trace_flag != nullptr && trace_flag->enabled()) {
- gpr_log(GPR_INFO, "%s:%p unref %" PRIdPTR " -> %" PRIdPTR,
- trace_flag->name(), this, prior, prior - 1);
+ if (trace != nullptr) {
+ gpr_log(GPR_INFO, "%s:%p unref %" PRIdPTR " -> %" PRIdPTR, trace, this,
+ prior, prior - 1);
}
GPR_DEBUG_ASSERT(prior > 0);
#endif
@@ -176,15 +172,16 @@ class RefCount {
bool Unref(const DebugLocation& location, const char* reason) {
#ifndef NDEBUG
// Grab a copy of the trace flag before the atomic change, since we
- // can't safely access it afterwards if we're going to be freed.
- auto* trace_flag = trace_flag_;
+ // will no longer be holding a ref afterwards and therefore can't
+ // safely access it, since another thread might free us in the interim.
+ auto* trace = trace_;
#endif
const Value prior = value_.FetchSub(1, MemoryOrder::ACQ_REL);
#ifndef NDEBUG
- if (trace_flag != nullptr && trace_flag->enabled()) {
+ if (trace != nullptr) {
gpr_log(GPR_INFO, "%s:%p %s:%d unref %" PRIdPTR " -> %" PRIdPTR " %s",
- trace_flag->name(), this, location.file(), location.line(), prior,
- prior - 1, reason);
+ trace, this, location.file(), location.line(), prior, prior - 1,
+ reason);
}
GPR_DEBUG_ASSERT(prior > 0);
#else
@@ -199,7 +196,7 @@ class RefCount {
Value get() const { return value_.Load(MemoryOrder::RELAXED); }
#ifndef NDEBUG
- TraceFlag* trace_flag_;
+ const char* trace_;
#endif
Atomic<Value> value_;
};
@@ -224,12 +221,12 @@ class Delete;
template <typename T>
class Delete<T, true> {
public:
- Delete(T* t) { delete t; }
+ explicit Delete(T* t) { delete t; }
};
template <typename T>
class Delete<T, false> {
public:
- Delete(T* /*t*/) {}
+ explicit Delete(T* /*t*/) {}
};
} // namespace internal
@@ -315,13 +312,10 @@ class RefCounted : public Impl {
RefCounted& operator=(const RefCounted&) = delete;
protected:
- // TraceFlagT is defined to accept both DebugOnlyTraceFlag and TraceFlag.
- // Note: RefCount tracing is only enabled on debug builds, even when a
- // TraceFlag is used.
- template <typename TraceFlagT = TraceFlag>
- explicit RefCounted(TraceFlagT* trace_flag = nullptr,
+ // Note: Tracing is a no-op on non-debug builds.
+ explicit RefCounted(const char* trace = nullptr,
intptr_t initial_refcount = 1)
- : refs_(initial_refcount, trace_flag) {}
+ : refs_(initial_refcount, trace) {}
private:
// Allow RefCountedPtr<> to access IncrementRefCount().
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/ref_counted_ptr.h b/contrib/libs/grpc/src/core/lib/gprpp/ref_counted_ptr.h
index c28e7625323..4ee1b950818 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/ref_counted_ptr.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/ref_counted_ptr.h
@@ -35,33 +35,34 @@ template <typename T>
class RefCountedPtr {
public:
RefCountedPtr() {}
+ // NOLINTNEXTLINE(google-explicit-constructor)
RefCountedPtr(std::nullptr_t) {}
// If value is non-null, we take ownership of a ref to it.
template <typename Y>
- explicit RefCountedPtr(Y* value) {
- value_ = value;
- }
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ RefCountedPtr(Y* value) : value_(value) {}
// Move ctors.
- RefCountedPtr(RefCountedPtr&& other) {
+ RefCountedPtr(RefCountedPtr&& other) noexcept {
value_ = other.value_;
other.value_ = nullptr;
}
template <typename Y>
- RefCountedPtr(RefCountedPtr<Y>&& other) {
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ RefCountedPtr(RefCountedPtr<Y>&& other) noexcept {
value_ = static_cast<T*>(other.value_);
other.value_ = nullptr;
}
// Move assignment.
- RefCountedPtr& operator=(RefCountedPtr&& other) {
+ RefCountedPtr& operator=(RefCountedPtr&& other) noexcept {
reset(other.value_);
other.value_ = nullptr;
return *this;
}
template <typename Y>
- RefCountedPtr& operator=(RefCountedPtr<Y>&& other) {
+ RefCountedPtr& operator=(RefCountedPtr<Y>&& other) noexcept {
reset(other.value_);
other.value_ = nullptr;
return *this;
@@ -73,6 +74,7 @@ class RefCountedPtr {
value_ = other.value_;
}
template <typename Y>
+ // NOLINTNEXTLINE(google-explicit-constructor)
RefCountedPtr(const RefCountedPtr<Y>& other) {
static_assert(std::has_virtual_destructor<T>::value,
"T does not have a virtual dtor");
@@ -81,6 +83,7 @@ class RefCountedPtr {
}
// Copy assignment.
+ // NOLINTNEXTLINE(bugprone-unhandled-self-assignment)
RefCountedPtr& operator=(const RefCountedPtr& other) {
// Note: Order of reffing and unreffing is important here in case value_
// and other.value_ are the same object.
@@ -183,33 +186,36 @@ template <typename T>
class WeakRefCountedPtr {
public:
WeakRefCountedPtr() {}
+ // NOLINTNEXTLINE(google-explicit-constructor)
WeakRefCountedPtr(std::nullptr_t) {}
// If value is non-null, we take ownership of a ref to it.
template <typename Y>
- explicit WeakRefCountedPtr(Y* value) {
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ WeakRefCountedPtr(Y* value) {
value_ = value;
}
// Move ctors.
- WeakRefCountedPtr(WeakRefCountedPtr&& other) {
+ WeakRefCountedPtr(WeakRefCountedPtr&& other) noexcept {
value_ = other.value_;
other.value_ = nullptr;
}
template <typename Y>
- WeakRefCountedPtr(WeakRefCountedPtr<Y>&& other) {
+ // NOLINTNEXTLINE(google-explicit-constructor)
+ WeakRefCountedPtr(WeakRefCountedPtr<Y>&& other) noexcept {
value_ = static_cast<T*>(other.value_);
other.value_ = nullptr;
}
// Move assignment.
- WeakRefCountedPtr& operator=(WeakRefCountedPtr&& other) {
+ WeakRefCountedPtr& operator=(WeakRefCountedPtr&& other) noexcept {
reset(other.value_);
other.value_ = nullptr;
return *this;
}
template <typename Y>
- WeakRefCountedPtr& operator=(WeakRefCountedPtr<Y>&& other) {
+ WeakRefCountedPtr& operator=(WeakRefCountedPtr<Y>&& other) noexcept {
reset(other.value_);
other.value_ = nullptr;
return *this;
@@ -221,6 +227,7 @@ class WeakRefCountedPtr {
value_ = other.value_;
}
template <typename Y>
+ // NOLINTNEXTLINE(google-explicit-constructor)
WeakRefCountedPtr(const WeakRefCountedPtr<Y>& other) {
static_assert(std::has_virtual_destructor<T>::value,
"T does not have a virtual dtor");
@@ -229,6 +236,7 @@ class WeakRefCountedPtr {
}
// Copy assignment.
+ // NOLINTNEXTLINE(bugprone-unhandled-self-assignment)
WeakRefCountedPtr& operator=(const WeakRefCountedPtr& other) {
// Note: Order of reffing and unreffing is important here in case value_
// and other.value_ are the same object.
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/statusor.h b/contrib/libs/grpc/src/core/lib/gprpp/stat.h
index 805184614dd..4e1009bae02 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/statusor.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/stat.h
@@ -1,3 +1,4 @@
+//
// Copyright 2020 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -11,40 +12,27 @@
// 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_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_STATUSOR_H
-#define GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_STATUSOR_H
+#ifndef GRPC_CORE_LIB_GPRPP_STAT_H
+#define GRPC_CORE_LIB_GPRPP_STAT_H
#include <grpc/support/port_platform.h>
-#include <memory>
+#include <stdio.h>
+#include <time.h>
#include "y_absl/status/status.h"
+#include "y_absl/strings/string_view.h"
namespace grpc_core {
-namespace mock_cel {
-
-// This is a temporary stub implementation of CEL APIs.
-// Once gRPC imports the CEL library, this file will be removed.
-
-template <typename T>
-class Y_ABSL_MUST_USE_RESULT StatusOr;
-
-template <typename T>
-class StatusOr {
- public:
- StatusOr() = default;
-
- StatusOr(const T& value) {}
-
- StatusOr(const y_absl::Status& status) {}
-
- StatusOr(y_absl::Status&& status) {}
- bool ok() const { return true; }
-};
+// Gets the last-modified timestamp of a file or a directory.
+// On success, the correct timestamp will be filled with an StatusCode::kOk
+// returned. Otherwise, timestamp will be untouched and an
+// StatusCode::kInternal will be returned.
+y_absl::Status GetFileModificationTime(const char* filename, time_t* timestamp);
-} // namespace mock_cel
} // namespace grpc_core
-#endif // GRPC_CORE_LIB_SECURITY_AUTHORIZATION_MOCK_CEL_STATUSOR_H \ No newline at end of file
+#endif // GRPC_CORE_LIB_GPRPP_STAT_H
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/stat_posix.cc b/contrib/libs/grpc/src/core/lib/gprpp/stat_posix.cc
new file mode 100644
index 00000000000..1f21cd3a1d4
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gprpp/stat_posix.cc
@@ -0,0 +1,49 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#ifdef GPR_POSIX_STAT
+
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <grpc/support/log.h>
+
+#include "src/core/lib/gprpp/stat.h"
+
+namespace grpc_core {
+
+y_absl::Status GetFileModificationTime(const char* filename, time_t* timestamp) {
+ GPR_ASSERT(filename != nullptr);
+ GPR_ASSERT(timestamp != nullptr);
+ struct stat buf;
+ if (stat(filename, &buf) != 0) {
+ const char* error_msg = strerror(errno);
+ gpr_log(GPR_ERROR, "stat failed for filename %s with error %s.", filename,
+ error_msg);
+ return y_absl::Status(y_absl::StatusCode::kInternal, error_msg);
+ }
+ // Last file/directory modification time.
+ *timestamp = buf.st_mtime;
+ return y_absl::OkStatus();
+}
+
+} // namespace grpc_core
+
+#endif // GPR_POSIX_STAT
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/stat_windows.cc b/contrib/libs/grpc/src/core/lib/gprpp/stat_windows.cc
new file mode 100644
index 00000000000..e02ee220f6a
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gprpp/stat_windows.cc
@@ -0,0 +1,48 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#ifdef GPR_WINDOWS_STAT
+
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <grpc/support/log.h>
+
+#include "src/core/lib/gprpp/stat.h"
+
+namespace grpc_core {
+
+y_absl::Status GetFileModificationTime(const char* filename, time_t* timestamp) {
+ GPR_ASSERT(filename != nullptr);
+ GPR_ASSERT(timestamp != nullptr);
+ struct _stat buf;
+ if (_stat(filename, &buf) != 0) {
+ const char* error_msg = strerror(errno);
+ gpr_log(GPR_ERROR, "_stat failed for filename %s with error %s.", filename,
+ error_msg);
+ return y_absl::Status(y_absl::StatusCode::kInternal, error_msg);
+ }
+ // Last file/directory modification time.
+ *timestamp = buf.st_mtime;
+ return y_absl::OkStatus();
+}
+
+} // namespace grpc_core
+
+#endif // GPR_WINDOWS_STAT
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/sync.h b/contrib/libs/grpc/src/core/lib/gprpp/sync.h
index 0a911b1cd26..6bb0512f67f 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/sync.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/sync.h
@@ -26,6 +26,9 @@
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
+#include "y_absl/synchronization/mutex.h"
+#include "src/core/lib/gprpp/time_util.h"
+
// The core library is not accessible in C++ codegen headers, and vice versa.
// Thus, we need to have duplicate headers with similar functionality.
// Make sure any change to this file is also reflected in
@@ -37,7 +40,23 @@
namespace grpc_core {
-class Mutex {
+#ifdef GPR_ABSEIL_SYNC
+
+using Mutex = y_absl::Mutex;
+using MutexLock = y_absl::MutexLock;
+using ReleasableMutexLock = y_absl::ReleasableMutexLock;
+using CondVar = y_absl::CondVar;
+
+// Returns the underlying gpr_mu from Mutex. This should be used only when
+// it has to like passing the C++ mutex to C-core API.
+// TODO(veblush): Remove this after C-core no longer uses gpr_mu.
+inline gpr_mu* GetUnderlyingGprMu(Mutex* mutex) {
+ return reinterpret_cast<gpr_mu*>(mutex);
+}
+
+#else
+
+class Y_ABSL_LOCKABLE Mutex {
public:
Mutex() { gpr_mu_init(&mu_); }
~Mutex() { gpr_mu_destroy(&mu_); }
@@ -45,52 +64,59 @@ class Mutex {
Mutex(const Mutex&) = delete;
Mutex& operator=(const Mutex&) = delete;
- gpr_mu* get() { return &mu_; }
- const gpr_mu* get() const { return &mu_; }
+ void Lock() Y_ABSL_EXCLUSIVE_LOCK_FUNCTION() { gpr_mu_lock(&mu_); }
+ void Unlock() Y_ABSL_UNLOCK_FUNCTION() { gpr_mu_unlock(&mu_); }
+ bool TryLock() Y_ABSL_EXCLUSIVE_TRYLOCK_FUNCTION(true) {
+ return gpr_mu_trylock(&mu_) != 0;
+ }
private:
gpr_mu mu_;
+
+ friend class CondVar;
+ friend gpr_mu* GetUnderlyingGprMu(Mutex* mutex);
};
-// MutexLock is a std::
-class MutexLock {
+// Returns the underlying gpr_mu from Mutex. This should be used only when
+// it has to like passing the C++ mutex to C-core API.
+// TODO(veblush): Remove this after C-core no longer uses gpr_mu.
+inline gpr_mu* GetUnderlyingGprMu(Mutex* mutex) { return &mutex->mu_; }
+
+class Y_ABSL_SCOPED_LOCKABLE MutexLock {
public:
- explicit MutexLock(Mutex* mu) : mu_(mu->get()) { gpr_mu_lock(mu_); }
- explicit MutexLock(gpr_mu* mu) : mu_(mu) { gpr_mu_lock(mu_); }
- ~MutexLock() { gpr_mu_unlock(mu_); }
+ explicit MutexLock(Mutex* mu) Y_ABSL_EXCLUSIVE_LOCK_FUNCTION(mu) : mu_(mu) {
+ mu_->Lock();
+ }
+ ~MutexLock() Y_ABSL_UNLOCK_FUNCTION() { mu_->Unlock(); }
MutexLock(const MutexLock&) = delete;
MutexLock& operator=(const MutexLock&) = delete;
private:
- gpr_mu* const mu_;
+ Mutex* const mu_;
};
-class ReleasableMutexLock {
+class Y_ABSL_SCOPED_LOCKABLE ReleasableMutexLock {
public:
- explicit ReleasableMutexLock(Mutex* mu) : mu_(mu->get()) { gpr_mu_lock(mu_); }
- explicit ReleasableMutexLock(gpr_mu* mu) : mu_(mu) { gpr_mu_lock(mu_); }
- ~ReleasableMutexLock() {
- if (!released_) gpr_mu_unlock(mu_);
+ explicit ReleasableMutexLock(Mutex* mu) Y_ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
+ : mu_(mu) {
+ mu_->Lock();
+ }
+ ~ReleasableMutexLock() Y_ABSL_UNLOCK_FUNCTION() {
+ if (!released_) mu_->Unlock();
}
ReleasableMutexLock(const ReleasableMutexLock&) = delete;
ReleasableMutexLock& operator=(const ReleasableMutexLock&) = delete;
- void Lock() {
- GPR_DEBUG_ASSERT(released_);
- gpr_mu_lock(mu_);
- released_ = false;
- }
-
- void Unlock() {
+ void Release() Y_ABSL_UNLOCK_FUNCTION() {
GPR_DEBUG_ASSERT(!released_);
released_ = true;
- gpr_mu_unlock(mu_);
+ mu_->Unlock();
}
private:
- gpr_mu* const mu_;
+ Mutex* const mu_;
bool released_ = false;
};
@@ -103,31 +129,94 @@ class CondVar {
CondVar& operator=(const CondVar&) = delete;
void Signal() { gpr_cv_signal(&cv_); }
- void Broadcast() { gpr_cv_broadcast(&cv_); }
+ void SignalAll() { gpr_cv_broadcast(&cv_); }
+
+ void Wait(Mutex* mu) { WaitWithDeadline(mu, y_absl::InfiniteFuture()); }
+ bool WaitWithTimeout(Mutex* mu, y_absl::Duration timeout) {
+ return gpr_cv_wait(&cv_, &mu->mu_, ToGprTimeSpec(timeout)) != 0;
+ }
+ bool WaitWithDeadline(Mutex* mu, y_absl::Time deadline) {
+ return gpr_cv_wait(&cv_, &mu->mu_, ToGprTimeSpec(deadline)) != 0;
+ }
+
+ private:
+ gpr_cv cv_;
+};
+
+#endif // GPR_ABSEIL_SYNC
+
+template <typename Predicate>
+static void WaitUntil(CondVar* cv, Mutex* mu, Predicate pred) {
+ while (!pred()) {
+ cv->Wait(mu);
+ }
+}
+
+// Returns true iff we timed-out
+template <typename Predicate>
+static bool WaitUntilWithTimeout(CondVar* cv, Mutex* mu, Predicate pred,
+ y_absl::Duration timeout) {
+ while (!pred()) {
+ if (cv->WaitWithTimeout(mu, timeout)) return true;
+ }
+ return false;
+}
+
+// Returns true iff we timed-out
+template <typename Predicate>
+static bool WaitUntilWithDeadline(CondVar* cv, Mutex* mu, Predicate pred,
+ y_absl::Time deadline) {
+ while (!pred()) {
+ if (cv->WaitWithDeadline(mu, deadline)) return true;
+ }
+ return false;
+}
+
+// Deprecated. Prefer MutexLock
+class MutexLockForGprMu {
+ public:
+ explicit MutexLockForGprMu(gpr_mu* mu) : mu_(mu) { gpr_mu_lock(mu_); }
+ ~MutexLockForGprMu() { gpr_mu_unlock(mu_); }
+
+ MutexLockForGprMu(const MutexLock&) = delete;
+ MutexLockForGprMu& operator=(const MutexLock&) = delete;
+
+ private:
+ gpr_mu* const mu_;
+};
- int Wait(Mutex* mu) { return Wait(mu, gpr_inf_future(GPR_CLOCK_REALTIME)); }
- int Wait(Mutex* mu, const gpr_timespec& deadline) {
- return gpr_cv_wait(&cv_, mu->get(), deadline);
+// Deprecated. Prefer MutexLock or ReleasableMutexLock
+class Y_ABSL_SCOPED_LOCKABLE LockableAndReleasableMutexLock {
+ public:
+ explicit LockableAndReleasableMutexLock(Mutex* mu)
+ Y_ABSL_EXCLUSIVE_LOCK_FUNCTION(mu)
+ : mu_(mu) {
+ mu_->Lock();
}
+ ~LockableAndReleasableMutexLock() Y_ABSL_UNLOCK_FUNCTION() {
+ if (!released_) mu_->Unlock();
+ }
+
+ LockableAndReleasableMutexLock(const LockableAndReleasableMutexLock&) =
+ delete;
+ LockableAndReleasableMutexLock& operator=(
+ const LockableAndReleasableMutexLock&) = delete;
- template <typename Predicate>
- void WaitUntil(Mutex* mu, Predicate pred) {
- while (!pred()) {
- Wait(mu, gpr_inf_future(GPR_CLOCK_REALTIME));
- }
+ void Lock() Y_ABSL_EXCLUSIVE_LOCK_FUNCTION() {
+ GPR_DEBUG_ASSERT(released_);
+ mu_->Lock();
+ released_ = false;
}
- // Returns true iff we timed-out
- template <typename Predicate>
- bool WaitUntil(Mutex* mu, Predicate pred, const gpr_timespec& deadline) {
- while (!pred()) {
- if (Wait(mu, deadline)) return true;
- }
- return false;
+ void Release() Y_ABSL_UNLOCK_FUNCTION() {
+ GPR_DEBUG_ASSERT(!released_);
+ released_ = true;
+ mu_->Unlock();
}
private:
- gpr_cv cv_;
+ Mutex* const mu_;
+ bool released_ = false;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/thd.h b/contrib/libs/grpc/src/core/lib/gprpp/thd.h
index 8e50f545e25..c4ce04cec46 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/thd.h
+++ b/contrib/libs/grpc/src/core/lib/gprpp/thd.h
@@ -91,7 +91,7 @@ class Thread {
/// Move constructor for thread. After this is called, the other thread
/// no longer represents a living thread object
- Thread(Thread&& other)
+ Thread(Thread&& other) noexcept
: state_(other.state_), impl_(other.impl_), options_(other.options_) {
other.state_ = MOVED;
other.impl_ = nullptr;
@@ -101,7 +101,7 @@ class Thread {
/// Move assignment operator for thread. After this is called, the other
/// thread no longer represents a living thread object. Not allowed if this
/// thread actually exists
- Thread& operator=(Thread&& other) {
+ Thread& operator=(Thread&& other) noexcept {
if (this != &other) {
// TODO(vjpai): if we can be sure that all Thread's are actually
// constructed, then we should assert GPR_ASSERT(impl_ == nullptr) here.
@@ -157,7 +157,7 @@ class Thread {
Thread& operator=(const Thread&) = delete;
/// The thread states are as follows:
- /// FAKE -- just a dummy placeholder Thread created by the default constructor
+ /// FAKE -- just a phony placeholder Thread created by the default constructor
/// ALIVE -- an actual thread of control exists associated with this thread
/// STARTED -- the thread of control has been started
/// DONE -- the thread of control has completed and been joined
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/thd_posix.cc b/contrib/libs/grpc/src/core/lib/gprpp/thd_posix.cc
index f6f6af9c26b..de43687da62 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/thd_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/gprpp/thd_posix.cc
@@ -106,33 +106,33 @@ class ThreadInternalsPosix : public internal::ThreadInternalsInterface {
GPR_ASSERT(pthread_attr_setstacksize(&attr, stack_size) == 0);
}
- *success =
- (pthread_create(&pthread_id_, &attr,
- [](void* v) -> void* {
- thd_arg arg = *static_cast<thd_arg*>(v);
- free(v);
- if (arg.name != nullptr) {
- TThread::SetCurrentThreadName(arg.name);
- }
-
- gpr_mu_lock(&arg.thread->mu_);
- while (!arg.thread->started_) {
- gpr_cv_wait(&arg.thread->ready_, &arg.thread->mu_,
- gpr_inf_future(GPR_CLOCK_MONOTONIC));
- }
- gpr_mu_unlock(&arg.thread->mu_);
-
- if (!arg.joinable) {
- delete arg.thread;
- }
-
- (*arg.body)(arg.arg);
- if (arg.tracked) {
- Fork::DecThreadCount();
- }
- return nullptr;
- },
- info) == 0);
+ *success = (pthread_create(
+ &pthread_id_, &attr,
+ [](void* v) -> void* {
+ thd_arg arg = *static_cast<thd_arg*>(v);
+ free(v);
+ if (arg.name != nullptr) {
+ TThread::SetCurrentThreadName(arg.name);
+ }
+
+ gpr_mu_lock(&arg.thread->mu_);
+ while (!arg.thread->started_) {
+ gpr_cv_wait(&arg.thread->ready_, &arg.thread->mu_,
+ gpr_inf_future(GPR_CLOCK_MONOTONIC));
+ }
+ gpr_mu_unlock(&arg.thread->mu_);
+
+ if (!arg.joinable) {
+ delete arg.thread;
+ }
+
+ (*arg.body)(arg.arg);
+ if (arg.tracked) {
+ Fork::DecThreadCount();
+ }
+ return nullptr;
+ },
+ info) == 0);
GPR_ASSERT(pthread_attr_destroy(&attr) == 0);
@@ -188,6 +188,11 @@ Thread::Thread(const char* thd_name, void (*thd_body)(void* arg), void* arg,
} // namespace grpc_core
// The following is in the external namespace as it is exposed as C89 API
-gpr_thd_id gpr_thd_currentid(void) { return (gpr_thd_id)pthread_self(); }
+gpr_thd_id gpr_thd_currentid(void) {
+ // Use C-style casting because Linux and OSX have different definitions
+ // of pthread_t so that a single C++ cast doesn't handle it.
+ // NOLINTNEXTLINE(google-readability-casting)
+ return (gpr_thd_id)pthread_self();
+}
#endif /* GPR_POSIX_SYNC */
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/thd_windows.cc b/contrib/libs/grpc/src/core/lib/gprpp/thd_windows.cc
index bd3b7a36ebb..fb90afd0f70 100644
--- a/contrib/libs/grpc/src/core/lib/gprpp/thd_windows.cc
+++ b/contrib/libs/grpc/src/core/lib/gprpp/thd_windows.cc
@@ -171,6 +171,8 @@ Thread::Thread(const char* thd_name, void (*thd_body)(void* arg), void* arg,
} // namespace grpc_core
-gpr_thd_id gpr_thd_currentid(void) { return (gpr_thd_id)g_thd_info; }
+gpr_thd_id gpr_thd_currentid(void) {
+ return reinterpret_cast<gpr_thd_id>(g_thd_info);
+}
#endif /* GPR_WINDOWS */
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/time_util.cc b/contrib/libs/grpc/src/core/lib/gprpp/time_util.cc
new file mode 100644
index 00000000000..33a9c54adeb
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gprpp/time_util.cc
@@ -0,0 +1,77 @@
+//
+// Copyright 2021 the gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/support/log.h>
+
+#include "src/core/lib/gprpp/time_util.h"
+
+namespace grpc_core {
+
+gpr_timespec ToGprTimeSpec(y_absl::Duration duration) {
+ if (duration == y_absl::InfiniteDuration()) {
+ return gpr_inf_future(GPR_TIMESPAN);
+ } else if (duration == -y_absl::InfiniteDuration()) {
+ return gpr_inf_past(GPR_TIMESPAN);
+ } else {
+ int64_t s = y_absl::IDivDuration(duration, y_absl::Seconds(1), &duration);
+ int64_t n = y_absl::IDivDuration(duration, y_absl::Nanoseconds(1), &duration);
+ return gpr_time_add(gpr_time_from_seconds(s, GPR_TIMESPAN),
+ gpr_time_from_nanos(n, GPR_TIMESPAN));
+ }
+}
+
+gpr_timespec ToGprTimeSpec(y_absl::Time time) {
+ if (time == y_absl::InfiniteFuture()) {
+ return gpr_inf_future(GPR_CLOCK_REALTIME);
+ } else if (time == y_absl::InfinitePast()) {
+ return gpr_inf_past(GPR_CLOCK_REALTIME);
+ } else {
+ timespec ts = y_absl::ToTimespec(time);
+ gpr_timespec out;
+ out.tv_sec = static_cast<decltype(out.tv_sec)>(ts.tv_sec);
+ out.tv_nsec = static_cast<decltype(out.tv_nsec)>(ts.tv_nsec);
+ out.clock_type = GPR_CLOCK_REALTIME;
+ return out;
+ }
+}
+
+y_absl::Duration ToAbslDuration(gpr_timespec ts) {
+ GPR_ASSERT(ts.clock_type == GPR_TIMESPAN);
+ if (gpr_time_cmp(ts, gpr_inf_future(GPR_TIMESPAN)) == 0) {
+ return y_absl::InfiniteDuration();
+ } else if (gpr_time_cmp(ts, gpr_inf_past(GPR_TIMESPAN)) == 0) {
+ return -y_absl::InfiniteDuration();
+ } else {
+ return y_absl::Seconds(ts.tv_sec) + y_absl::Nanoseconds(ts.tv_nsec);
+ }
+}
+
+y_absl::Time ToAbslTime(gpr_timespec ts) {
+ GPR_ASSERT(ts.clock_type != GPR_TIMESPAN);
+ gpr_timespec rts = gpr_convert_clock_type(ts, GPR_CLOCK_REALTIME);
+ if (gpr_time_cmp(rts, gpr_inf_future(GPR_CLOCK_REALTIME)) == 0) {
+ return y_absl::InfiniteFuture();
+ } else if (gpr_time_cmp(rts, gpr_inf_past(GPR_CLOCK_REALTIME)) == 0) {
+ return y_absl::InfinitePast();
+ } else {
+ return y_absl::UnixEpoch() + y_absl::Seconds(rts.tv_sec) +
+ y_absl::Nanoseconds(rts.tv_nsec);
+ }
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/gprpp/time_util.h b/contrib/libs/grpc/src/core/lib/gprpp/time_util.h
new file mode 100644
index 00000000000..b7b40bb426d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/gprpp/time_util.h
@@ -0,0 +1,42 @@
+//
+// Copyright 2021 the gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+#ifndef GRPC_CORE_LIB_GPRPP_TIME_UTIL_H
+#define GRPC_CORE_LIB_GPRPP_TIME_UTIL_H
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/support/time.h>
+
+#include "y_absl/time/time.h"
+
+namespace grpc_core {
+
+// Converts y_absl::Duration to gpr_timespec(GPR_TIMESPAN)
+gpr_timespec ToGprTimeSpec(y_absl::Duration duration);
+
+// Converts y_absl::Time to gpr_timespec(GPR_CLOCK_REALTIME)
+gpr_timespec ToGprTimeSpec(y_absl::Time time);
+
+// Converts gpr_timespec(GPR_TIMESPAN) to y_absl::Duration
+y_absl::Duration ToAbslDuration(gpr_timespec ts);
+
+// Converts gpr_timespec(GPR_CLOCK_[MONOTONIC|REALTIME|PRECISE]) to y_absl::Time
+y_absl::Time ToAbslTime(gpr_timespec ts);
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_GPRPP_TIME_UTIL_H
diff --git a/contrib/libs/grpc/src/core/lib/http/httpcli.cc b/contrib/libs/grpc/src/core/lib/http/httpcli.cc
index c196a8faac7..b2077ef004b 100644
--- a/contrib/libs/grpc/src/core/lib/http/httpcli.cc
+++ b/contrib/libs/grpc/src/core/lib/http/httpcli.cc
@@ -209,7 +209,7 @@ static void next_address(internal_request* req, grpc_error* error) {
GRPC_CLOSURE_INIT(&req->connected, on_connected, req,
grpc_schedule_on_exec_ctx);
grpc_arg arg = grpc_channel_arg_pointer_create(
- (char*)GRPC_ARG_RESOURCE_QUOTA, req->resource_quota,
+ const_cast<char*>(GRPC_ARG_RESOURCE_QUOTA), req->resource_quota,
grpc_resource_quota_arg_vtable());
grpc_channel_args args = {1, &arg};
grpc_tcp_client_connect(&req->connected, &req->ep, req->context->pollset_set,
diff --git a/contrib/libs/grpc/src/core/lib/http/httpcli.h b/contrib/libs/grpc/src/core/lib/http/httpcli.h
index 16a160cc965..b61bb06874a 100644
--- a/contrib/libs/grpc/src/core/lib/http/httpcli.h
+++ b/contrib/libs/grpc/src/core/lib/http/httpcli.h
@@ -83,8 +83,7 @@ void grpc_httpcli_get(grpc_httpcli_context* context,
grpc_polling_entity* pollent,
grpc_resource_quota* resource_quota,
const grpc_httpcli_request* request, grpc_millis deadline,
- grpc_closure* on_complete,
- grpc_httpcli_response* response);
+ grpc_closure* on_done, grpc_httpcli_response* response);
/* Asynchronously perform a HTTP POST.
'context' specifies the http context under which to do the post
@@ -105,7 +104,7 @@ void grpc_httpcli_post(grpc_httpcli_context* context,
grpc_resource_quota* resource_quota,
const grpc_httpcli_request* request,
const char* body_bytes, size_t body_size,
- grpc_millis deadline, grpc_closure* on_complete,
+ grpc_millis deadline, grpc_closure* on_done,
grpc_httpcli_response* response);
/* override functions return 1 if they handled the request, 0 otherwise */
diff --git a/contrib/libs/grpc/src/core/lib/http/httpcli_security_connector.cc b/contrib/libs/grpc/src/core/lib/http/httpcli_security_connector.cc
index 62643186ad0..514b26bdcf6 100644
--- a/contrib/libs/grpc/src/core/lib/http/httpcli_security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/http/httpcli_security_connector.cc
@@ -43,7 +43,7 @@
class grpc_httpcli_ssl_channel_security_connector final
: public grpc_channel_security_connector {
public:
- grpc_httpcli_ssl_channel_security_connector(char* secure_peer_name)
+ explicit grpc_httpcli_ssl_channel_security_connector(char* secure_peer_name)
: grpc_channel_security_connector(
/*url_scheme=*/nullptr,
/*channel_creds=*/nullptr,
@@ -203,8 +203,8 @@ static void ssl_handshake(void* arg, grpc_endpoint* tcp, const char* host,
grpc_channel_args args = {1, &channel_arg};
c->handshake_mgr = grpc_core::MakeRefCounted<grpc_core::HandshakeManager>();
grpc_core::HandshakerRegistry::AddHandshakers(
- grpc_core::HANDSHAKER_CLIENT, &args, /*interested_parties=*/nullptr,
- c->handshake_mgr.get());
+ grpc_core::HANDSHAKER_CLIENT, &args,
+ /*interested_parties=*/nullptr, c->handshake_mgr.get());
c->handshake_mgr->DoHandshake(tcp, /*channel_args=*/nullptr, deadline,
/*acceptor=*/nullptr, on_handshake_done,
/*user_data=*/c);
diff --git a/contrib/libs/grpc/src/core/lib/http/parser.cc b/contrib/libs/grpc/src/core/lib/http/parser.cc
index 022ef9a2e7b..3a0b2be4a85 100644
--- a/contrib/libs/grpc/src/core/lib/http/parser.cc
+++ b/contrib/libs/grpc/src/core/lib/http/parser.cc
@@ -42,36 +42,48 @@ static grpc_error* handle_response_line(grpc_http_parser* parser) {
uint8_t* cur = beg;
uint8_t* end = beg + parser->cur_line_length;
- if (cur == end || *cur++ != 'H')
+ if (cur == end || *cur++ != 'H') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'H'");
- if (cur == end || *cur++ != 'T')
+ }
+ if (cur == end || *cur++ != 'T') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'T'");
- if (cur == end || *cur++ != 'T')
+ }
+ if (cur == end || *cur++ != 'T') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'T'");
- if (cur == end || *cur++ != 'P')
+ }
+ if (cur == end || *cur++ != 'P') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'P'");
- if (cur == end || *cur++ != '/')
+ }
+ if (cur == end || *cur++ != '/') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected '/'");
- if (cur == end || *cur++ != '1')
+ }
+ if (cur == end || *cur++ != '1') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected '1'");
- if (cur == end || *cur++ != '.')
+ }
+ if (cur == end || *cur++ != '.') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected '.'");
+ }
if (cur == end || *cur < '0' || *cur++ > '1') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Expected HTTP/1.0 or HTTP/1.1");
}
- if (cur == end || *cur++ != ' ')
+ if (cur == end || *cur++ != ' ') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected ' '");
- if (cur == end || *cur < '1' || *cur++ > '9')
+ }
+ if (cur == end || *cur < '1' || *cur++ > '9') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected status code");
- if (cur == end || *cur < '0' || *cur++ > '9')
+ }
+ if (cur == end || *cur < '0' || *cur++ > '9') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected status code");
- if (cur == end || *cur < '0' || *cur++ > '9')
+ }
+ if (cur == end || *cur < '0' || *cur++ > '9') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected status code");
+ }
parser->http.response->status =
(cur[-3] - '0') * 100 + (cur[-2] - '0') * 10 + (cur[-1] - '0');
- if (cur == end || *cur++ != ' ')
+ if (cur == end || *cur++ != ' ') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected ' '");
+ }
/* we don't really care about the status code message */
@@ -85,36 +97,44 @@ static grpc_error* handle_request_line(grpc_http_parser* parser) {
uint8_t vers_major = 0;
uint8_t vers_minor = 0;
- while (cur != end && *cur++ != ' ')
- ;
- if (cur == end)
+ while (cur != end && *cur++ != ' ') {
+ }
+ if (cur == end) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"No method on HTTP request line");
+ }
parser->http.request->method =
buf2str(beg, static_cast<size_t>(cur - beg - 1));
beg = cur;
- while (cur != end && *cur++ != ' ')
- ;
- if (cur == end)
+ while (cur != end && *cur++ != ' ') {
+ }
+ if (cur == end) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("No path on HTTP request line");
+ }
parser->http.request->path = buf2str(beg, static_cast<size_t>(cur - beg - 1));
- if (cur == end || *cur++ != 'H')
+ if (cur == end || *cur++ != 'H') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'H'");
- if (cur == end || *cur++ != 'T')
+ }
+ if (cur == end || *cur++ != 'T') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'T'");
- if (cur == end || *cur++ != 'T')
+ }
+ if (cur == end || *cur++ != 'T') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'T'");
- if (cur == end || *cur++ != 'P')
+ }
+ if (cur == end || *cur++ != 'P') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected 'P'");
- if (cur == end || *cur++ != '/')
+ }
+ if (cur == end || *cur++ != '/') {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING("Expected '/'");
+ }
vers_major = static_cast<uint8_t>(*cur++ - '1' + 1);
++cur;
- if (cur == end)
+ if (cur == end) {
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"End of line in HTTP version string");
+ }
vers_minor = static_cast<uint8_t>(*cur++ - '1' + 1);
if (vers_major == 1) {
@@ -261,8 +281,7 @@ static grpc_error* addbyte_body(grpc_http_parser* parser, uint8_t byte) {
if (*body_length == parser->body_capacity) {
parser->body_capacity = GPR_MAX(8, parser->body_capacity * 3 / 2);
- *body =
- static_cast<char*>(gpr_realloc((void*)*body, parser->body_capacity));
+ *body = static_cast<char*>(gpr_realloc(*body, parser->body_capacity));
}
(*body)[*body_length] = static_cast<char>(byte);
(*body_length)++;
@@ -300,9 +319,10 @@ static grpc_error* addbyte(grpc_http_parser* parser, uint8_t byte,
case GRPC_HTTP_FIRST_LINE:
case GRPC_HTTP_HEADERS:
if (parser->cur_line_length >= GRPC_HTTP_PARSER_MAX_HEADER_LENGTH) {
- if (GRPC_TRACE_FLAG_ENABLED(grpc_http1_trace))
+ if (GRPC_TRACE_FLAG_ENABLED(grpc_http1_trace)) {
gpr_log(GPR_ERROR, "HTTP header max line length (%d) exceeded",
GRPC_HTTP_PARSER_MAX_HEADER_LENGTH);
+ }
return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"HTTP header max line length exceeded");
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/buffer_list.h b/contrib/libs/grpc/src/core/lib/iomgr/buffer_list.h
index 54a2dc748fb..81af2c910c7 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/buffer_list.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/buffer_list.h
@@ -146,7 +146,7 @@ class TracedBuffer {
#else /* GRPC_LINUX_ERRQUEUE */
class TracedBuffer {
public:
- /* Dummy shutdown function */
+ /* Phony shutdown function */
static void Shutdown(grpc_core::TracedBuffer** /*head*/, void* /*remaining*/,
grpc_error* shutdown_err) {
GRPC_ERROR_UNREF(shutdown_err);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/call_combiner.cc b/contrib/libs/grpc/src/core/lib/iomgr/call_combiner.cc
index ed0ae174887..043b3bb4032 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/call_combiner.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/call_combiner.cc
@@ -34,13 +34,14 @@ namespace {
grpc_error* DecodeCancelStateError(gpr_atm cancel_state) {
if (cancel_state & 1) {
- return (grpc_error*)(cancel_state & ~static_cast<gpr_atm>(1));
+ return reinterpret_cast<grpc_error*>(cancel_state &
+ ~static_cast<gpr_atm>(1));
}
return GRPC_ERROR_NONE;
}
gpr_atm EncodeCancelStateError(grpc_error* error) {
- return static_cast<gpr_atm>(1) | (gpr_atm)error;
+ return static_cast<gpr_atm>(1) | reinterpret_cast<gpr_atm>(error);
}
} // namespace
@@ -203,7 +204,8 @@ void CallCombiner::SetNotifyOnCancel(grpc_closure* closure) {
ExecCtx::Run(DEBUG_LOCATION, closure, GRPC_ERROR_REF(original_error));
break;
} else {
- if (gpr_atm_full_cas(&cancel_state_, original_state, (gpr_atm)closure)) {
+ if (gpr_atm_full_cas(&cancel_state_, original_state,
+ reinterpret_cast<gpr_atm>(closure))) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_call_combiner_trace)) {
gpr_log(GPR_INFO, "call_combiner=%p: setting notify_on_cancel=%p",
this, closure);
@@ -212,7 +214,7 @@ void CallCombiner::SetNotifyOnCancel(grpc_closure* closure) {
// closure with GRPC_ERROR_NONE. This allows callers to clean
// up any resources they may be holding for the callback.
if (original_state != 0) {
- closure = (grpc_closure*)original_state;
+ closure = reinterpret_cast<grpc_closure*>(original_state);
if (GRPC_TRACE_FLAG_ENABLED(grpc_call_combiner_trace)) {
gpr_log(GPR_INFO,
"call_combiner=%p: scheduling old cancel callback=%p", this,
@@ -239,7 +241,8 @@ void CallCombiner::Cancel(grpc_error* error) {
if (gpr_atm_full_cas(&cancel_state_, original_state,
EncodeCancelStateError(error))) {
if (original_state != 0) {
- grpc_closure* notify_on_cancel = (grpc_closure*)original_state;
+ grpc_closure* notify_on_cancel =
+ reinterpret_cast<grpc_closure*>(original_state);
if (GRPC_TRACE_FLAG_ENABLED(grpc_call_combiner_trace)) {
gpr_log(GPR_INFO,
"call_combiner=%p: scheduling notify_on_cancel callback=%p",
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/cfstream_handle.cc b/contrib/libs/grpc/src/core/lib/iomgr/cfstream_handle.cc
index 46914e5175a..2f70a2995be 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/cfstream_handle.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/cfstream_handle.cc
@@ -202,9 +202,9 @@ void CFStreamHandle::Unref(const char* file, int line, const char* reason) {
#else
-/* Creating a dummy function so that the grpc_cfstream library will be
+/* Creating a phony function so that the grpc_cfstream library will be
* non-empty.
*/
-void CFStreamDummy() {}
+void CFStreamPhony() {}
#endif
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/combiner.cc b/contrib/libs/grpc/src/core/lib/iomgr/combiner.cc
index 4b85766aef6..aa5a2ea44f4 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/combiner.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/combiner.cc
@@ -146,7 +146,8 @@ static void combiner_exec(grpc_core::Combiner* lock, grpc_closure* cl,
// offload for one or two actions, and that's fine
gpr_atm initiator =
gpr_atm_no_barrier_load(&lock->initiating_exec_ctx_or_null);
- if (initiator != 0 && initiator != (gpr_atm)grpc_core::ExecCtx::Get()) {
+ if (initiator != 0 &&
+ initiator != reinterpret_cast<gpr_atm>(grpc_core::ExecCtx::Get())) {
gpr_atm_no_barrier_store(&lock->initiating_exec_ctx_or_null, 0);
}
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/endpoint.h b/contrib/libs/grpc/src/core/lib/iomgr/endpoint.h
index e704c3be49d..021325833b0 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/endpoint.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/endpoint.h
@@ -99,7 +99,7 @@ void grpc_endpoint_add_to_pollset_set(grpc_endpoint* ep,
void grpc_endpoint_delete_from_pollset_set(grpc_endpoint* ep,
grpc_pollset_set* pollset_set);
-grpc_resource_user* grpc_endpoint_get_resource_user(grpc_endpoint* endpoint);
+grpc_resource_user* grpc_endpoint_get_resource_user(grpc_endpoint* ep);
bool grpc_endpoint_can_track_err(grpc_endpoint* ep);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/error.cc b/contrib/libs/grpc/src/core/lib/iomgr/error.cc
index c4b5c739526..b5f8dc8c724 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/error.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/error.cc
@@ -166,7 +166,8 @@ static void error_destroy(grpc_error* err) {
GPR_ASSERT(!grpc_error_is_special(err));
unref_errs(err);
unref_strs(err);
- gpr_free((void*)gpr_atm_acq_load(&err->atomics.error_string));
+ gpr_free(
+ reinterpret_cast<void*>(gpr_atm_acq_load(&err->atomics.error_string)));
gpr_free(err);
}
@@ -237,10 +238,10 @@ static void internal_set_str(grpc_error** err, grpc_error_strs which,
if (slot == UINT8_MAX) {
slot = get_placement(err, sizeof(value));
if (slot == UINT8_MAX) {
- const char* str = grpc_slice_to_c_string(value);
+ char* str = grpc_slice_to_c_string(value);
gpr_log(GPR_ERROR, "Error %p is full, dropping string {\"%s\":\"%s\"}",
*err, error_str_name(which), str);
- gpr_free((void*)str);
+ gpr_free(str);
return;
}
} else {
@@ -258,10 +259,10 @@ static void internal_set_time(grpc_error** err, grpc_error_times which,
if (slot == UINT8_MAX) {
slot = get_placement(err, sizeof(value));
if (slot == UINT8_MAX) {
- const char* time_str = fmt_time(value);
+ char* time_str = fmt_time(value);
gpr_log(GPR_ERROR, "Error %p is full, dropping \"%s\":\"%s\"}", *err,
error_time_name(which), time_str);
- gpr_free((void*)time_str);
+ gpr_free(time_str);
return;
}
}
@@ -292,7 +293,7 @@ static void internal_add_error(grpc_error** err, grpc_error* new_err) {
memcpy((*err)->arena + slot, &new_last, sizeof(grpc_linked_error));
}
-#define SLOTS_PER_INT (sizeof(intptr_t) / sizeof(intptr_t))
+#define SLOTS_PER_INT (1) // == (sizeof(intptr_t) / sizeof(intptr_t))
#define SLOTS_PER_STR (sizeof(grpc_slice) / sizeof(intptr_t))
#define SLOTS_PER_TIME (sizeof(gpr_timespec) / sizeof(intptr_t))
#define SLOTS_PER_LINKED_ERROR (sizeof(grpc_linked_error) / sizeof(intptr_t))
@@ -424,8 +425,10 @@ static grpc_error* copy_error_and_unref(grpc_error* in) {
}
#endif
// bulk memcpy of the rest of the struct.
+ // NOLINTNEXTLINE(bugprone-sizeof-expression)
size_t skip = sizeof(&out->atomics);
- memcpy((void*)((uintptr_t)out + skip), (void*)((uintptr_t)in + skip),
+ memcpy(reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(out) + skip),
+ reinterpret_cast<void*>(reinterpret_cast<uintptr_t>(in) + skip),
sizeof(*in) + (in->arena_size * sizeof(intptr_t)) - skip);
// manually set the atomics and the new capacity
gpr_atm_no_barrier_store(&out->atomics.error_string, 0);
@@ -631,8 +634,8 @@ static char* fmt_str(const grpc_slice& slice) {
char* s = nullptr;
size_t sz = 0;
size_t cap = 0;
- append_esc_str((const uint8_t*)GRPC_SLICE_START_PTR(slice),
- GRPC_SLICE_LENGTH(slice), &s, &sz, &cap);
+ append_esc_str(GRPC_SLICE_START_PTR(slice), GRPC_SLICE_LENGTH(slice), &s, &sz,
+ &cap);
append_chr(0, &s, &sz, &cap);
return s;
}
@@ -746,7 +749,8 @@ const char* grpc_error_string(grpc_error* err) {
if (err == GRPC_ERROR_OOM) return oom_error_string;
if (err == GRPC_ERROR_CANCELLED) return cancelled_error_string;
- void* p = (void*)gpr_atm_acq_load(&err->atomics.error_string);
+ void* p =
+ reinterpret_cast<void*>(gpr_atm_acq_load(&err->atomics.error_string));
if (p != nullptr) {
return static_cast<const char*>(p);
}
@@ -765,9 +769,10 @@ const char* grpc_error_string(grpc_error* err) {
char* out = finish_kvs(&kvs);
- if (!gpr_atm_rel_cas(&err->atomics.error_string, 0, (gpr_atm)out)) {
+ if (!gpr_atm_rel_cas(&err->atomics.error_string, 0,
+ reinterpret_cast<gpr_atm>(out))) {
gpr_free(out);
- out = (char*)gpr_atm_acq_load(&err->atomics.error_string);
+ out = reinterpret_cast<char*>(gpr_atm_acq_load(&err->atomics.error_string));
}
return out;
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/error.h b/contrib/libs/grpc/src/core/lib/iomgr/error.h
index ac3ff876289..ca520fa5678 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/error.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/error.h
@@ -219,7 +219,7 @@ static grpc_error* grpc_error_create_from_vector(const char* file, int line,
grpc_error* grpc_error_set_int(grpc_error* src, grpc_error_ints which,
intptr_t value) GRPC_MUST_USE_RESULT;
-/// It is an error to pass nullptr as `p`. Caller should allocate a dummy
+/// It is an error to pass nullptr as `p`. Caller should allocate a phony
/// intptr_t for `p`, even if the value of `p` is not used.
bool grpc_error_get_int(grpc_error* error, grpc_error_ints which, intptr_t* p);
/// This call takes ownership of the slice; the error is responsible for
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/error_internal.h b/contrib/libs/grpc/src/core/lib/iomgr/error_internal.h
index 7b0cbd6d98f..33c233b9b67 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/error_internal.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/error_internal.h
@@ -22,7 +22,7 @@
#include <grpc/support/port_platform.h>
#include <inttypes.h>
-#include <stdbool.h> // TODO, do we need this?
+#include <stdbool.h> // TODO(unknown): , do we need this?
#include <grpc/support/sync.h>
#include "src/core/lib/iomgr/error.h"
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/ev_apple.cc b/contrib/libs/grpc/src/core/lib/iomgr/ev_apple.cc
index d1525828865..67c1cf850d0 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/ev_apple.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/ev_apple.cc
@@ -20,7 +20,7 @@
/// is enabled (see iomgr_posix_cfstream.cc), a global thread is started to
/// handle and trigger all the CFStream events. The CFStream streams register
/// themselves with the run loop with functions grpc_apple_register_read_stream
-/// and grpc_apple_register_read_stream. Pollsets are dummy and block on a
+/// and grpc_apple_register_read_stream. Pollsets are phony and block on a
/// condition variable in pollset_work().
#include <grpc/support/port_platform.h>
@@ -33,7 +33,10 @@
#include <list>
+#include "y_absl/time/time.h"
+
#include "src/core/lib/gprpp/thd.h"
+#include "src/core/lib/gprpp/time_util.h"
#include "src/core/lib/iomgr/ev_apple.h"
grpc_core::DebugOnlyTraceFlag grpc_apple_polling_trace(false, "apple_polling");
@@ -161,7 +164,7 @@ void grpc_apple_register_write_stream(CFWriteStreamRef write_stream,
/// Drive the run loop in a global singleton thread until the global run loop is
/// shutdown.
static void GlobalRunLoopFunc(void* arg) {
- grpc_core::ReleasableMutexLock lock(&gGlobalRunLoopContext->mu);
+ grpc_core::LockableAndReleasableMutexLock lock(&gGlobalRunLoopContext->mu);
gGlobalRunLoopContext->run_loop = CFRunLoopGetCurrent();
gGlobalRunLoopContext->init_cv.Signal();
@@ -173,11 +176,11 @@ static void GlobalRunLoopFunc(void* arg) {
gGlobalRunLoopContext->input_source_cv.Wait(&gGlobalRunLoopContext->mu);
}
gGlobalRunLoopContext->input_source_registered = false;
- lock.Unlock();
+ lock.Release();
CFRunLoopRun();
lock.Lock();
}
- lock.Unlock();
+ lock.Release();
}
// pollset implementation
@@ -237,9 +240,9 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
auto it = apple_pollset->workers.begin();
while (!actual_worker.kicked && !apple_pollset->is_shutdown) {
- if (actual_worker.cv.Wait(
- &apple_pollset->mu,
- grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME))) {
+ if (actual_worker.cv.WaitWithDeadline(
+ &apple_pollset->mu, grpc_core::ToAbslTime(grpc_millis_to_timespec(
+ deadline, GPR_CLOCK_REALTIME)))) {
// timed out
break;
}
@@ -299,7 +302,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
GRPC_POLLING_TRACE("pollset init: %p", pollset);
GrpcApplePollset* apple_pollset = new (pollset) GrpcApplePollset();
- *mu = apple_pollset->mu.get();
+ *mu = grpc_core::GetUnderlyingGprMu(&apple_pollset->mu);
}
/// The caller must acquire the lock GrpcApplePollset.mu before calling this
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/ev_epoll1_linux.cc b/contrib/libs/grpc/src/core/lib/iomgr/ev_epoll1_linux.cc
index f09dcee0c06..ab2d511bd05 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/ev_epoll1_linux.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/ev_epoll1_linux.cc
@@ -388,9 +388,9 @@ static void fd_shutdown_internal(grpc_fd* fd, grpc_error* why,
if (!releasing_fd) {
shutdown(fd->fd, SHUT_RDWR);
} else {
- /* we need a dummy event for earlier linux versions. */
- epoll_event dummy_event;
- if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_DEL, fd->fd, &dummy_event) !=
+ /* we need a phony event for earlier linux versions. */
+ epoll_event phony_event;
+ if (epoll_ctl(g_epoll_set.epfd, EPOLL_CTL_DEL, fd->fd, &phony_event) !=
0) {
gpr_log(GPR_ERROR, "epoll_ctl failed: %s", strerror(errno));
}
@@ -618,7 +618,7 @@ static grpc_error* pollset_kick_all(grpc_pollset* pollset) {
worker = worker->next;
} while (worker != pollset->root_worker);
}
- // TODO: sreek. Check if we need to set 'kicked_without_poller' to true here
+ // TODO(sreek): Check if we need to set 'kicked_without_poller' to true here
// in the else case
return error;
}
@@ -803,7 +803,8 @@ static bool begin_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
neighborhood->active_root = pollset->next = pollset->prev = pollset;
/* Make this the designated poller if there isn't one already */
if (worker->state == UNKICKED &&
- gpr_atm_no_barrier_cas(&g_active_poller, 0, (gpr_atm)worker)) {
+ gpr_atm_no_barrier_cas(&g_active_poller, 0,
+ reinterpret_cast<gpr_atm>(worker))) {
SET_KICK_STATE(worker, DESIGNATED_POLLER);
}
} else {
@@ -885,8 +886,9 @@ static bool check_neighborhood_for_available_poller(
do {
switch (inspect_worker->state) {
case UNKICKED:
- if (gpr_atm_no_barrier_cas(&g_active_poller, 0,
- (gpr_atm)inspect_worker)) {
+ if (gpr_atm_no_barrier_cas(
+ &g_active_poller, 0,
+ reinterpret_cast<gpr_atm>(inspect_worker))) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, " .. choose next poller to be %p",
inspect_worker);
@@ -944,7 +946,8 @@ static void end_worker(grpc_pollset* pollset, grpc_pollset_worker* worker,
SET_KICK_STATE(worker, KICKED);
grpc_closure_list_move(&worker->schedule_on_end_work,
grpc_core::ExecCtx::Get()->closure_list());
- if (gpr_atm_no_barrier_load(&g_active_poller) == (gpr_atm)worker) {
+ if (gpr_atm_no_barrier_load(&g_active_poller) ==
+ reinterpret_cast<gpr_atm>(worker)) {
if (worker->next != worker && worker->next->state == UNKICKED) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, " .. choose next poller to be peer %p", worker);
@@ -1071,8 +1074,9 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
std::vector<TString> log;
log.push_back(y_absl::StrFormat(
"PS:%p KICK:%p curps=%p curworker=%p root=%p", pollset, specific_worker,
- (void*)gpr_tls_get(&g_current_thread_pollset),
- (void*)gpr_tls_get(&g_current_thread_worker), pollset->root_worker));
+ reinterpret_cast<void*>(gpr_tls_get(&g_current_thread_pollset)),
+ reinterpret_cast<void*>(gpr_tls_get(&g_current_thread_worker)),
+ pollset->root_worker));
if (pollset->root_worker != nullptr) {
log.push_back(y_absl::StrFormat(
" {kick_state=%s next=%p {kick_state=%s}}",
@@ -1088,7 +1092,8 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
}
if (specific_worker == nullptr) {
- if (gpr_tls_get(&g_current_thread_pollset) != (intptr_t)pollset) {
+ if (gpr_tls_get(&g_current_thread_pollset) !=
+ reinterpret_cast<intptr_t>(pollset)) {
grpc_pollset_worker* root_worker = pollset->root_worker;
if (root_worker == nullptr) {
GRPC_STATS_INC_POLLSET_KICKED_WITHOUT_POLLER();
@@ -1115,8 +1120,9 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
goto done;
} else if (root_worker == next_worker && // only try and wake up a poller
// if there is no next worker
- root_worker == (grpc_pollset_worker*)gpr_atm_no_barrier_load(
- &g_active_poller)) {
+ root_worker ==
+ reinterpret_cast<grpc_pollset_worker*>(
+ gpr_atm_no_barrier_load(&g_active_poller))) {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD();
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, " .. kicked %p", root_worker);
@@ -1180,7 +1186,7 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
}
goto done;
} else if (gpr_tls_get(&g_current_thread_worker) ==
- (intptr_t)specific_worker) {
+ reinterpret_cast<intptr_t>(specific_worker)) {
GRPC_STATS_INC_POLLSET_KICK_OWN_THREAD();
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, " .. mark %p kicked", specific_worker);
@@ -1188,7 +1194,8 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
SET_KICK_STATE(specific_worker, KICKED);
goto done;
} else if (specific_worker ==
- (grpc_pollset_worker*)gpr_atm_no_barrier_load(&g_active_poller)) {
+ reinterpret_cast<grpc_pollset_worker*>(
+ gpr_atm_no_barrier_load(&g_active_poller))) {
GRPC_STATS_INC_POLLSET_KICK_WAKEUP_FD();
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, " .. kick active poller");
@@ -1223,7 +1230,7 @@ static void pollset_add_fd(grpc_pollset* /*pollset*/, grpc_fd* /*fd*/) {}
*/
static grpc_pollset_set* pollset_set_create(void) {
- return (grpc_pollset_set*)(static_cast<intptr_t>(0xdeafbeef));
+ return reinterpret_cast<grpc_pollset_set*>(static_cast<intptr_t>(0xdeafbeef));
}
static void pollset_set_destroy(grpc_pollset_set* /*pss*/) {}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/ev_epollex_linux.cc b/contrib/libs/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
index 2dd9bbdffd8..5b94623d25c 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/ev_epollex_linux.cc
@@ -537,7 +537,7 @@ static void fd_notify_on_error(grpc_fd* fd, grpc_closure* closure) {
static bool fd_has_pollset(grpc_fd* fd, grpc_pollset* pollset) {
const int epfd = pollset->active_pollable->epfd;
- grpc_core::MutexLock lock(&fd->pollable_mu);
+ grpc_core::MutexLockForGprMu lock(&fd->pollable_mu);
for (size_t i = 0; i < fd->pollset_fds.size(); ++i) {
if (fd->pollset_fds[i] == epfd) {
return true;
@@ -548,7 +548,7 @@ static bool fd_has_pollset(grpc_fd* fd, grpc_pollset* pollset) {
static void fd_add_pollset(grpc_fd* fd, grpc_pollset* pollset) {
const int epfd = pollset->active_pollable->epfd;
- grpc_core::MutexLock lock(&fd->pollable_mu);
+ grpc_core::MutexLockForGprMu lock(&fd->pollable_mu);
fd->pollset_fds.push_back(epfd);
}
@@ -577,7 +577,8 @@ static grpc_error* pollable_create(pollable_type type, pollable** p) {
}
struct epoll_event ev;
ev.events = static_cast<uint32_t>(EPOLLIN | EPOLLET);
- ev.data.ptr = (void*)(1 | (intptr_t) & (*p)->wakeup);
+ ev.data.ptr =
+ reinterpret_cast<void*>(1 | reinterpret_cast<intptr_t>(&(*p)->wakeup));
if (epoll_ctl(epfd, EPOLL_CTL_ADD, (*p)->wakeup.read_fd, &ev) != 0) {
err = GRPC_OS_ERROR(errno, "epoll_ctl");
GRPC_FD_TRACE(
@@ -591,7 +592,10 @@ static grpc_error* pollable_create(pollable_type type, pollable** p) {
}
(*p)->type = type;
- new (&(*p)->refs) grpc_core::RefCount(1, &grpc_trace_pollable_refcount);
+ new (&(*p)->refs) grpc_core::RefCount(
+ 1, GRPC_TRACE_FLAG_ENABLED(grpc_trace_pollable_refcount)
+ ? "pollable_refcount"
+ : nullptr);
gpr_mu_init(&(*p)->mu);
(*p)->epfd = epfd;
(*p)->owner_fd = nullptr;
@@ -680,7 +684,7 @@ static void pollset_maybe_finish_shutdown(grpc_pollset* pollset) {
static grpc_error* kick_one_worker(grpc_pollset_worker* specific_worker) {
GPR_TIMER_SCOPE("kick_one_worker", 0);
pollable* p = specific_worker->pollable_obj;
- grpc_core::MutexLock lock(&p->mu);
+ grpc_core::MutexLockForGprMu lock(&p->mu);
GPR_ASSERT(specific_worker != nullptr);
if (specific_worker->kicked) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
@@ -689,7 +693,8 @@ static grpc_error* kick_one_worker(grpc_pollset_worker* specific_worker) {
GRPC_STATS_INC_POLLSET_KICKED_AGAIN();
return GRPC_ERROR_NONE;
}
- if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) {
+ if (gpr_tls_get(&g_current_thread_worker) ==
+ reinterpret_cast<intptr_t>(specific_worker)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, "PS:%p kicked_specific_but_awake", p);
}
@@ -726,13 +731,14 @@ static grpc_error* pollset_kick(grpc_pollset* pollset,
GRPC_STATS_INC_POLLSET_KICK();
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO,
- "PS:%p kick %p tls_pollset=%p tls_worker=%p pollset.root_worker=%p",
- pollset, specific_worker,
- (void*)gpr_tls_get(&g_current_thread_pollset),
- (void*)gpr_tls_get(&g_current_thread_worker), pollset->root_worker);
+ "PS:%p kick %p tls_pollset=%" PRIxPTR " tls_worker=%" PRIxPTR
+ " pollset.root_worker=%p",
+ pollset, specific_worker, gpr_tls_get(&g_current_thread_pollset),
+ gpr_tls_get(&g_current_thread_worker), pollset->root_worker);
}
if (specific_worker == nullptr) {
- if (gpr_tls_get(&g_current_thread_pollset) != (intptr_t)pollset) {
+ if (gpr_tls_get(&g_current_thread_pollset) !=
+ reinterpret_cast<intptr_t>(pollset)) {
if (pollset->root_worker == nullptr) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, "PS:%p kicked_any_without_poller", pollset);
@@ -802,12 +808,13 @@ static void pollset_init(grpc_pollset* pollset, gpr_mu** mu) {
static int poll_deadline_to_millis_timeout(grpc_millis millis) {
if (millis == GRPC_MILLIS_INF_FUTURE) return -1;
grpc_millis delta = millis - grpc_core::ExecCtx::Get()->Now();
- if (delta > INT_MAX)
+ if (delta > INT_MAX) {
return INT_MAX;
- else if (delta < 0)
+ } else if (delta < 0) {
return 0;
- else
+ } else {
return static_cast<int>(delta);
+ }
}
static void fd_become_readable(grpc_fd* fd) { fd->read_closure.SetReady(); }
@@ -877,15 +884,16 @@ static grpc_error* pollable_process_events(grpc_pollset* pollset,
int n = pollable_obj->event_cursor++;
struct epoll_event* ev = &pollable_obj->events[n];
void* data_ptr = ev->data.ptr;
- if (1 & (intptr_t)data_ptr) {
+ if (1 & reinterpret_cast<intptr_t>(data_ptr)) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
gpr_log(GPR_INFO, "PS:%p got pollset_wakeup %p", pollset, data_ptr);
}
- append_error(&error,
- grpc_wakeup_fd_consume_wakeup(
- (grpc_wakeup_fd*)((~static_cast<intptr_t>(1)) &
- (intptr_t)data_ptr)),
- err_desc);
+ append_error(
+ &error,
+ grpc_wakeup_fd_consume_wakeup(reinterpret_cast<grpc_wakeup_fd*>(
+ ~static_cast<intptr_t>(1) &
+ reinterpret_cast<intptr_t>(data_ptr))),
+ err_desc);
} else {
grpc_fd* fd =
reinterpret_cast<grpc_fd*>(reinterpret_cast<intptr_t>(data_ptr) & ~2);
@@ -1288,7 +1296,7 @@ static void pollset_add_fd(grpc_pollset* pollset, grpc_fd* fd) {
return;
}
- grpc_core::MutexLock lock(&pollset->mu);
+ grpc_core::MutexLockForGprMu lock(&pollset->mu);
grpc_error* error = pollset_add_fd_locked(pollset, fd);
// If we are in PO_MULTI mode, we should update the pollsets of the FD.
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/ev_poll_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/ev_poll_posix.cc
index a46ab7ea0dd..c83d3d09bc0 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/ev_poll_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/ev_poll_posix.cc
@@ -148,12 +148,12 @@ static gpr_mu fork_fd_list_mu;
MUST NOT be called with a pollset lock taken */
static uint32_t fd_begin_poll(grpc_fd* fd, grpc_pollset* pollset,
grpc_pollset_worker* worker, uint32_t read_mask,
- uint32_t write_mask, grpc_fd_watcher* rec);
+ uint32_t write_mask, grpc_fd_watcher* watcher);
/* Complete polling previously started with fd_begin_poll
MUST NOT be called with a pollset lock taken
if got_read or got_write are 1, also does the become_{readable,writable} as
appropriate. */
-static void fd_end_poll(grpc_fd_watcher* rec, int got_read, int got_write);
+static void fd_end_poll(grpc_fd_watcher* watcher, int got_read, int got_write);
/* Return 1 if this fd is orphaned, 0 otherwise */
static bool fd_is_orphaned(grpc_fd* fd);
@@ -775,7 +775,7 @@ static grpc_error* pollset_kick_ext(grpc_pollset* p,
}
p->kicked_without_pollers = true;
} else if (gpr_tls_get(&g_current_thread_worker) !=
- (intptr_t)specific_worker) {
+ reinterpret_cast<intptr_t>(specific_worker)) {
GPR_TIMER_MARK("different_thread_worker", 0);
if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) {
specific_worker->reevaluate_polling_on_wakeup = true;
@@ -792,18 +792,20 @@ static grpc_error* pollset_kick_ext(grpc_pollset* p,
kick_append_error(&error,
grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd));
}
- } else if (gpr_tls_get(&g_current_thread_poller) != (intptr_t)p) {
+ } else if (gpr_tls_get(&g_current_thread_poller) !=
+ reinterpret_cast<intptr_t>(p)) {
GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0);
GPR_TIMER_MARK("kick_anonymous", 0);
specific_worker = pop_front_worker(p);
if (specific_worker != nullptr) {
- if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) {
+ if (gpr_tls_get(&g_current_thread_worker) ==
+ reinterpret_cast<intptr_t>(specific_worker)) {
GPR_TIMER_MARK("kick_anonymous_not_self", 0);
push_back_worker(p, specific_worker);
specific_worker = pop_front_worker(p);
if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 &&
gpr_tls_get(&g_current_thread_worker) ==
- (intptr_t)specific_worker) {
+ reinterpret_cast<intptr_t>(specific_worker)) {
push_back_worker(p, specific_worker);
specific_worker = nullptr;
}
@@ -987,7 +989,7 @@ static grpc_error* pollset_work(grpc_pollset* pollset,
void* buf = gpr_malloc(pfd_size + watch_size);
pfds = static_cast<struct pollfd*>(buf);
watchers = static_cast<grpc_fd_watcher*>(
- (void*)(static_cast<char*>(buf) + pfd_size));
+ static_cast<void*>((static_cast<char*>(buf) + pfd_size)));
}
fd_count = 0;
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/ev_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/ev_posix.cc
index 3d32359be46..07aeb7f2478 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/ev_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/ev_posix.cc
@@ -89,7 +89,7 @@ namespace {
grpc_poll_function_type real_poll_function;
-int dummy_poll(struct pollfd fds[], nfds_t nfds, int timeout) {
+int phony_poll(struct pollfd fds[], nfds_t nfds, int timeout) {
if (timeout == 0) {
return real_poll_function(fds, nfds, 0);
} else {
@@ -103,10 +103,10 @@ const grpc_event_engine_vtable* init_non_polling(bool explicit_request) {
if (!explicit_request) {
return nullptr;
}
- // return the simplest engine as a dummy but also override the poller
+ // return the simplest engine as a phony but also override the poller
auto ret = grpc_init_poll_posix(explicit_request);
real_poll_function = grpc_poll_function;
- grpc_poll_function = dummy_poll;
+ grpc_poll_function = phony_poll;
return ret;
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.cc b/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.cc
index e392a9960b1..a2b6e7b38f2 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.cc
@@ -58,7 +58,9 @@ static grpc_millis timespan_to_millis_round_down(gpr_timespec ts) {
double x = GPR_MS_PER_SEC * static_cast<double>(ts.tv_sec) +
static_cast<double>(ts.tv_nsec) / GPR_NS_PER_MS;
if (x < 0) return 0;
- if (x > GRPC_MILLIS_INF_FUTURE) return GRPC_MILLIS_INF_FUTURE;
+ if (x > static_cast<double>(GRPC_MILLIS_INF_FUTURE)) {
+ return GRPC_MILLIS_INF_FUTURE;
+ }
return static_cast<grpc_millis>(x);
}
@@ -72,7 +74,9 @@ static grpc_millis timespan_to_millis_round_up(gpr_timespec ts) {
static_cast<double>(GPR_NS_PER_SEC - 1) /
static_cast<double>(GPR_NS_PER_SEC);
if (x < 0) return 0;
- if (x > GRPC_MILLIS_INF_FUTURE) return GRPC_MILLIS_INF_FUTURE;
+ if (x > static_cast<double>(GRPC_MILLIS_INF_FUTURE)) {
+ return GRPC_MILLIS_INF_FUTURE;
+ }
return static_cast<grpc_millis>(x);
}
@@ -140,7 +144,7 @@ void ExecCtx::GlobalInit(void) {
}
bool ExecCtx::Flush() {
- bool did_something = 0;
+ bool did_something = false;
GPR_TIMER_SCOPE("grpc_exec_ctx_flush", 0);
for (;;) {
if (!grpc_closure_list_empty(closure_list_)) {
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.h b/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.h
index 6b4e184cad3..c993133ef1c 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/exec_ctx.h
@@ -58,8 +58,8 @@ typedef struct grpc_combiner grpc_combiner;
#define GRPC_APP_CALLBACK_EXEC_CTX_FLAG_IS_INTERNAL_THREAD 1
gpr_timespec grpc_millis_to_timespec(grpc_millis millis, gpr_clock_type clock);
-grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec timespec);
-grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec timespec);
+grpc_millis grpc_timespec_to_millis_round_down(gpr_timespec ts);
+grpc_millis grpc_timespec_to_millis_round_up(gpr_timespec ts);
grpc_millis grpc_cycle_counter_to_millis_round_down(gpr_cycle_counter cycles);
grpc_millis grpc_cycle_counter_to_millis_round_up(gpr_cycle_counter cycles);
@@ -113,7 +113,7 @@ class ExecCtx {
}
/** Parameterised Constructor */
- ExecCtx(uintptr_t fl) : flags_(fl) {
+ explicit ExecCtx(uintptr_t fl) : flags_(fl) {
if (!(GRPC_EXEC_CTX_FLAG_IS_INTERNAL_THREAD & flags_)) {
grpc_core::Fork::IncExecCtxCount();
}
@@ -308,7 +308,9 @@ class ApplicationCallbackExecCtx {
ApplicationCallbackExecCtx() { Set(this, flags_); }
/** Parameterised Constructor */
- ApplicationCallbackExecCtx(uintptr_t fl) : flags_(fl) { Set(this, flags_); }
+ explicit ApplicationCallbackExecCtx(uintptr_t fl) : flags_(fl) {
+ Set(this, flags_);
+ }
~ApplicationCallbackExecCtx() {
if (reinterpret_cast<ApplicationCallbackExecCtx*>(
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/executor.cc b/contrib/libs/grpc/src/core/lib/iomgr/executor.cc
index 10b2f948ec7..ae1a3e7b742 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/executor.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/executor.cc
@@ -294,7 +294,8 @@ void Executor::Enqueue(grpc_closure* closure, grpc_error* error,
return;
}
- ThreadState* ts = (ThreadState*)gpr_tls_get(&g_this_thread_state);
+ ThreadState* ts =
+ reinterpret_cast<ThreadState*>(gpr_tls_get(&g_this_thread_state));
if (ts == nullptr) {
ts = &thd_state_[GPR_HASH_POINTER(grpc_core::ExecCtx::Get(),
cur_thread_count)];
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/executor.h b/contrib/libs/grpc/src/core/lib/iomgr/executor.h
index ae523ff212f..288d23de584 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/executor.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/executor.h
@@ -54,7 +54,7 @@ enum class ExecutorJobType {
class Executor {
public:
- Executor(const char* executor_name);
+ explicit Executor(const char* executor_name);
void Init();
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/executor/mpmcqueue.h b/contrib/libs/grpc/src/core/lib/iomgr/executor/mpmcqueue.h
index 474f40bbf87..46e88b8c9dc 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/executor/mpmcqueue.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/executor/mpmcqueue.h
@@ -42,7 +42,7 @@ class MPMCQueueInterface {
// Removes the oldest element from the queue and return it.
// This might cause to block on empty queue depending on implementation.
// Optional argument for collecting stats purpose.
- virtual void* Get(gpr_timespec* wait_time = nullptr) = 0;
+ virtual void* Get(gpr_timespec* wait_time) = 0;
// Returns number of elements in the queue currently
virtual int count() const = 0;
@@ -55,22 +55,22 @@ class InfLenFIFOQueue : public MPMCQueueInterface {
// Releases all resources held by the queue. The queue must be empty, and no
// one waits on conditional variables.
- ~InfLenFIFOQueue();
+ ~InfLenFIFOQueue() override;
// Puts elem into queue immediately at the end of queue. Since the queue has
// infinite length, this routine will never block and should never fail.
- void Put(void* elem);
+ void Put(void* elem) override;
// Removes the oldest element from the queue and returns it.
// This routine will cause the thread to block if queue is currently empty.
// Argument wait_time should be passed in when trace flag turning on (for
// collecting stats info purpose.)
- void* Get(gpr_timespec* wait_time = nullptr);
+ void* Get(gpr_timespec* wait_time) override;
// Returns number of elements in queue currently.
// There might be concurrently add/remove on queue, so count might change
// quickly.
- int count() const { return count_.Load(MemoryOrder::RELAXED); }
+ int count() const override { return count_.Load(MemoryOrder::RELAXED); }
struct Node {
Node* next; // Linking
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/executor/threadpool.h b/contrib/libs/grpc/src/core/lib/iomgr/executor/threadpool.h
index 01a00c025f0..66218b52b62 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/executor/threadpool.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/executor/threadpool.h
@@ -65,9 +65,9 @@ class ThreadPoolWorker {
ThreadPoolWorker(const char* thd_name, MPMCQueueInterface* queue,
Thread::Options& options, int index)
: queue_(queue), thd_name_(thd_name), index_(index) {
- thd_ = Thread(thd_name,
- [](void* th) { static_cast<ThreadPoolWorker*>(th)->Run(); },
- this, nullptr, options);
+ thd_ = Thread(
+ thd_name, [](void* th) { static_cast<ThreadPoolWorker*>(th)->Run(); },
+ this, nullptr, options);
}
~ThreadPoolWorker() {}
@@ -99,7 +99,7 @@ class ThreadPool : public ThreadPoolInterface {
// Creates a thread pool with size of "num_threads", with default thread name
// "ThreadPoolWorker" and all thread options set to default. If the given size
// is 0 or less, there will be 1 worker thread created inside pool.
- ThreadPool(int num_threads);
+ explicit ThreadPool(int num_threads);
// Same as ThreadPool(int num_threads) constructor, except
// that it also sets "thd_name" as the name of all threads in the thread pool.
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/iomgr.cc b/contrib/libs/grpc/src/core/lib/iomgr/iomgr.cc
index 802e3bdcb4d..02646db428d 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/iomgr.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/iomgr.cc
@@ -59,7 +59,7 @@ void grpc_iomgr_init() {
gpr_cv_init(&g_rcv);
grpc_core::Executor::InitAll();
g_root_object.next = g_root_object.prev = &g_root_object;
- g_root_object.name = (char*)"root";
+ g_root_object.name = const_cast<char*>("root");
grpc_iomgr_platform_init();
grpc_timer_list_init();
grpc_core::grpc_errqueue_init();
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.cc
index de22d20a639..5e778814905 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix.cc
@@ -25,7 +25,6 @@
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
-#include "src/core/lib/iomgr/iomgr_posix.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/iomgr/tcp_posix.h"
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix_cfstream.cc b/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix_cfstream.cc
index 30c44edb5d6..9db5e2235f6 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix_cfstream.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/iomgr_posix_cfstream.cc
@@ -40,7 +40,6 @@
#include "src/core/lib/iomgr/ev_apple.h"
#include "src/core/lib/iomgr/ev_posix.h"
#include "src/core/lib/iomgr/iomgr_internal.h"
-#include "src/core/lib/iomgr/iomgr_posix.h"
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/iomgr/tcp_client.h"
#include "src/core/lib/iomgr/tcp_posix.h"
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/load_file.h b/contrib/libs/grpc/src/core/lib/iomgr/load_file.h
index 1cb2b5de731..d7f8175aaea 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/load_file.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/load_file.h
@@ -30,6 +30,6 @@
/* Loads the content of a file into a slice. add_null_terminator will add
a NULL terminator if non-zero. */
grpc_error* grpc_load_file(const char* filename, int add_null_terminator,
- grpc_slice* slice);
+ grpc_slice* output);
#endif /* GRPC_CORE_LIB_IOMGR_LOAD_FILE_H */
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.cc b/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.cc
index 4b28af4ba4b..b3fd8e0b63f 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.cc
@@ -96,8 +96,9 @@ void LockfreeEvent::NotifyOn(grpc_closure* closure) {
* referencing it. */
gpr_atm curr = gpr_atm_acq_load(&state_);
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
- gpr_log(GPR_DEBUG, "LockfreeEvent::NotifyOn: %p curr=%p closure=%p", this,
- (void*)curr, closure);
+ gpr_log(GPR_DEBUG,
+ "LockfreeEvent::NotifyOn: %p curr=%" PRIxPTR " closure=%p", this,
+ curr, closure);
}
switch (curr) {
case kClosureNotReady: {
@@ -108,7 +109,8 @@ void LockfreeEvent::NotifyOn(grpc_closure* closure) {
The release itself pairs with the acquire half of a set_ready full
barrier. */
- if (gpr_atm_rel_cas(&state_, kClosureNotReady, (gpr_atm)closure)) {
+ if (gpr_atm_rel_cas(&state_, kClosureNotReady,
+ reinterpret_cast<gpr_atm>(closure))) {
return; /* Successful. Return */
}
@@ -137,7 +139,8 @@ void LockfreeEvent::NotifyOn(grpc_closure* closure) {
contains a pointer to the shutdown-error). If the fd is shutdown,
schedule the closure with the shutdown error */
if ((curr & kShutdownBit) > 0) {
- grpc_error* shutdown_err = (grpc_error*)(curr & ~kShutdownBit);
+ grpc_error* shutdown_err =
+ reinterpret_cast<grpc_error*>(curr & ~kShutdownBit);
ExecCtx::Run(DEBUG_LOCATION, closure,
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
"FD Shutdown", &shutdown_err, 1));
@@ -156,14 +159,15 @@ void LockfreeEvent::NotifyOn(grpc_closure* closure) {
GPR_UNREACHABLE_CODE(return );
}
-bool LockfreeEvent::SetShutdown(grpc_error* shutdown_err) {
- gpr_atm new_state = (gpr_atm)shutdown_err | kShutdownBit;
+bool LockfreeEvent::SetShutdown(grpc_error* shutdown_error) {
+ gpr_atm new_state = reinterpret_cast<gpr_atm>(shutdown_error) | kShutdownBit;
while (true) {
gpr_atm curr = gpr_atm_no_barrier_load(&state_);
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
- gpr_log(GPR_DEBUG, "LockfreeEvent::SetShutdown: %p curr=%p err=%s",
- &state_, (void*)curr, grpc_error_string(shutdown_err));
+ gpr_log(GPR_DEBUG,
+ "LockfreeEvent::SetShutdown: %p curr=%" PRIxPTR " err=%s",
+ &state_, curr, grpc_error_string(shutdown_error));
}
switch (curr) {
case kClosureReady:
@@ -180,7 +184,7 @@ bool LockfreeEvent::SetShutdown(grpc_error* shutdown_err) {
/* If fd is already shutdown, we are done */
if ((curr & kShutdownBit) > 0) {
- GRPC_ERROR_UNREF(shutdown_err);
+ GRPC_ERROR_UNREF(shutdown_error);
return false;
}
@@ -190,9 +194,9 @@ bool LockfreeEvent::SetShutdown(grpc_error* shutdown_err) {
happens-after on that edge), and a release to pair with anything
loading the shutdown state. */
if (gpr_atm_full_cas(&state_, curr, new_state)) {
- ExecCtx::Run(DEBUG_LOCATION, (grpc_closure*)curr,
+ ExecCtx::Run(DEBUG_LOCATION, reinterpret_cast<grpc_closure*>(curr),
GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
- "FD Shutdown", &shutdown_err, 1));
+ "FD Shutdown", &shutdown_error, 1));
return true;
}
@@ -211,8 +215,8 @@ void LockfreeEvent::SetReady() {
gpr_atm curr = gpr_atm_no_barrier_load(&state_);
if (GRPC_TRACE_FLAG_ENABLED(grpc_polling_trace)) {
- gpr_log(GPR_DEBUG, "LockfreeEvent::SetReady: %p curr=%p", &state_,
- (void*)curr);
+ gpr_log(GPR_DEBUG, "LockfreeEvent::SetReady: %p curr=%" PRIxPTR, &state_,
+ curr);
}
switch (curr) {
@@ -240,7 +244,8 @@ void LockfreeEvent::SetReady() {
spurious set_ready; release pairs with this or the acquire in
notify_on (or set_shutdown) */
else if (gpr_atm_full_cas(&state_, curr, kClosureNotReady)) {
- ExecCtx::Run(DEBUG_LOCATION, (grpc_closure*)curr, GRPC_ERROR_NONE);
+ ExecCtx::Run(DEBUG_LOCATION, reinterpret_cast<grpc_closure*>(curr),
+ GRPC_ERROR_NONE);
return;
}
/* else the state changed again (only possible by either a racing
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.h b/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.h
index d6a6c226bc0..f7e855409f6 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/lockfree_event.h
@@ -55,8 +55,8 @@ class LockfreeEvent {
void NotifyOn(grpc_closure* closure);
// Sets the shutdown state. If a closure had been provided by NotifyOn and has
- // not yet been scheduled, it will be scheduled with \a error.
- bool SetShutdown(grpc_error* error);
+ // not yet been scheduled, it will be scheduled with \a shutdown_error.
+ bool SetShutdown(grpc_error* shutdown_error);
// Signals that the event has been received.
void SetReady();
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/parse_address.cc b/contrib/libs/grpc/src/core/lib/iomgr/parse_address.cc
index af514c81cd8..701a24c03e9 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/parse_address.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/parse_address.cc
@@ -18,16 +18,20 @@
#include <grpc/support/port_platform.h>
-#include "src/core/lib/iomgr/grpc_if_nametoindex.h"
#include "src/core/lib/iomgr/parse_address.h"
-#include "src/core/lib/iomgr/sockaddr.h"
-#include "src/core/lib/iomgr/socket_utils.h"
#include <stdio.h>
#include <string.h>
#ifdef GRPC_HAVE_UNIX_SOCKET
#include <sys/un.h>
#endif
+#ifdef GRPC_POSIX_SOCKET
+#include <errno.h>
+#include <net/if.h>
+#endif
+
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/strip.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -35,49 +39,124 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gprpp/host_port.h"
-
-#ifdef GRPC_POSIX_SOCKET
-#include <errno.h>
-#include <net/if.h>
-#endif
+#include "src/core/lib/iomgr/grpc_if_nametoindex.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+#include "src/core/lib/iomgr/socket_utils.h"
#ifdef GRPC_HAVE_UNIX_SOCKET
-bool grpc_parse_unix(const grpc_uri* uri,
+bool grpc_parse_unix(const grpc_core::URI& uri,
grpc_resolved_address* resolved_addr) {
- if (strcmp("unix", uri->scheme) != 0) {
- gpr_log(GPR_ERROR, "Expected 'unix' scheme, got '%s'", uri->scheme);
+ if (uri.scheme() != "unix") {
+ gpr_log(GPR_ERROR, "Expected 'unix' scheme, got '%s'",
+ uri.scheme().c_str());
return false;
}
+ grpc_error* error =
+ grpc_core::UnixSockaddrPopulate(uri.path(), resolved_addr);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "%s", grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ return false;
+ }
+ return true;
+}
+
+bool grpc_parse_unix_abstract(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr) {
+ if (uri.scheme() != "unix-abstract") {
+ gpr_log(GPR_ERROR, "Expected 'unix-abstract' scheme, got '%s'",
+ uri.scheme().c_str());
+ return false;
+ }
+ grpc_error* error =
+ grpc_core::UnixAbstractSockaddrPopulate(uri.path(), resolved_addr);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "%s", grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ return false;
+ }
+ return true;
+}
+
+namespace grpc_core {
+
+grpc_error* UnixSockaddrPopulate(y_absl::string_view path,
+ grpc_resolved_address* resolved_addr) {
struct sockaddr_un* un =
reinterpret_cast<struct sockaddr_un*>(resolved_addr->addr);
- const size_t maxlen = sizeof(un->sun_path);
- const size_t path_len = strnlen(uri->path, maxlen);
- if (path_len == maxlen) return false;
+ const size_t maxlen = sizeof(un->sun_path) - 1;
+ if (path.size() > maxlen) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Path name should not have more than ", maxlen,
+ " characters")
+ .c_str());
+ }
un->sun_family = AF_UNIX;
- strcpy(un->sun_path, uri->path);
+ path.copy(un->sun_path, path.size());
+ un->sun_path[path.size()] = '\0';
resolved_addr->len = static_cast<socklen_t>(sizeof(*un));
- return true;
+ return GRPC_ERROR_NONE;
}
-#else /* GRPC_HAVE_UNIX_SOCKET */
+grpc_error* UnixAbstractSockaddrPopulate(y_absl::string_view path,
+ grpc_resolved_address* resolved_addr) {
+ struct sockaddr_un* un =
+ reinterpret_cast<struct sockaddr_un*>(resolved_addr->addr);
+ const size_t maxlen = sizeof(un->sun_path) - 1;
+ if (path.size() > maxlen) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Path name should not have more than ", maxlen,
+ " characters")
+ .c_str());
+ }
+ un->sun_family = AF_UNIX;
+ un->sun_path[0] = '\0';
+ path.copy(un->sun_path + 1, path.size());
+ resolved_addr->len =
+ static_cast<socklen_t>(sizeof(un->sun_family) + path.size() + 1);
+ return GRPC_ERROR_NONE;
+}
-bool grpc_parse_unix(const grpc_uri* uri,
+} // namespace grpc_core
+
+#else /* GRPC_HAVE_UNIX_SOCKET */
+
+bool grpc_parse_unix(const grpc_core::URI& uri,
grpc_resolved_address* resolved_addr) {
abort();
}
+bool grpc_parse_unix_abstract(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr) {
+ abort();
+}
+
+namespace grpc_core {
+
+grpc_error* UnixSockaddrPopulate(y_absl::string_view path,
+ grpc_resolved_address* resolved_addr) {
+ abort();
+}
+
+grpc_error* UnixAbstractSockaddrPopulate(y_absl::string_view path,
+ grpc_resolved_address* resolved_addr) {
+ abort();
+}
+
+} // namespace grpc_core
#endif /* GRPC_HAVE_UNIX_SOCKET */
-bool grpc_parse_ipv4_hostport(const char* hostport, grpc_resolved_address* addr,
- bool log_errors) {
+bool grpc_parse_ipv4_hostport(y_absl::string_view hostport,
+ grpc_resolved_address* addr, bool log_errors) {
bool success = false;
// Split host and port.
TString host;
TString port;
if (!grpc_core::SplitHostPort(hostport, &host, &port)) {
if (log_errors) {
- gpr_log(GPR_ERROR, "Failed gpr_split_host_port(%s, ...)", hostport);
+ gpr_log(GPR_ERROR, "Failed gpr_split_host_port(%s, ...)",
+ TString(hostport).c_str());
}
return false;
}
@@ -109,27 +188,27 @@ done:
return success;
}
-bool grpc_parse_ipv4(const grpc_uri* uri,
+bool grpc_parse_ipv4(const grpc_core::URI& uri,
grpc_resolved_address* resolved_addr) {
- if (strcmp("ipv4", uri->scheme) != 0) {
- gpr_log(GPR_ERROR, "Expected 'ipv4' scheme, got '%s'", uri->scheme);
+ if (uri.scheme() != "ipv4") {
+ gpr_log(GPR_ERROR, "Expected 'ipv4' scheme, got '%s'",
+ uri.scheme().c_str());
return false;
}
- const char* host_port = uri->path;
- if (*host_port == '/') ++host_port;
- return grpc_parse_ipv4_hostport(host_port, resolved_addr,
- true /* log_errors */);
+ return grpc_parse_ipv4_hostport(y_absl::StripPrefix(uri.path(), "/"),
+ resolved_addr, true /* log_errors */);
}
-bool grpc_parse_ipv6_hostport(const char* hostport, grpc_resolved_address* addr,
- bool log_errors) {
+bool grpc_parse_ipv6_hostport(y_absl::string_view hostport,
+ grpc_resolved_address* addr, bool log_errors) {
bool success = false;
// Split host and port.
TString host;
TString port;
if (!grpc_core::SplitHostPort(hostport, &host, &port)) {
if (log_errors) {
- gpr_log(GPR_ERROR, "Failed gpr_split_host_port(%s, ...)", hostport);
+ gpr_log(GPR_ERROR, "Failed gpr_split_host_port(%s, ...)",
+ TString(hostport).c_str());
}
return false;
}
@@ -204,27 +283,32 @@ done:
return success;
}
-bool grpc_parse_ipv6(const grpc_uri* uri,
+bool grpc_parse_ipv6(const grpc_core::URI& uri,
grpc_resolved_address* resolved_addr) {
- if (strcmp("ipv6", uri->scheme) != 0) {
- gpr_log(GPR_ERROR, "Expected 'ipv6' scheme, got '%s'", uri->scheme);
+ if (uri.scheme() != "ipv6") {
+ gpr_log(GPR_ERROR, "Expected 'ipv6' scheme, got '%s'",
+ uri.scheme().c_str());
return false;
}
- const char* host_port = uri->path;
- if (*host_port == '/') ++host_port;
- return grpc_parse_ipv6_hostport(host_port, resolved_addr,
- true /* log_errors */);
+ return grpc_parse_ipv6_hostport(y_absl::StripPrefix(uri.path(), "/"),
+ resolved_addr, true /* log_errors */);
}
-bool grpc_parse_uri(const grpc_uri* uri, grpc_resolved_address* resolved_addr) {
- if (strcmp("unix", uri->scheme) == 0) {
+bool grpc_parse_uri(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr) {
+ if (uri.scheme() == "unix") {
return grpc_parse_unix(uri, resolved_addr);
- } else if (strcmp("ipv4", uri->scheme) == 0) {
+ }
+ if (uri.scheme() == "unix-abstract") {
+ return grpc_parse_unix_abstract(uri, resolved_addr);
+ }
+ if (uri.scheme() == "ipv4") {
return grpc_parse_ipv4(uri, resolved_addr);
- } else if (strcmp("ipv6", uri->scheme) == 0) {
+ }
+ if (uri.scheme() == "ipv6") {
return grpc_parse_ipv6(uri, resolved_addr);
}
- gpr_log(GPR_ERROR, "Can't parse scheme '%s'", uri->scheme);
+ gpr_log(GPR_ERROR, "Can't parse scheme '%s'", uri.scheme().c_str());
return false;
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/parse_address.h b/contrib/libs/grpc/src/core/lib/iomgr/parse_address.h
index d42daac46ae..b841a75c40f 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/parse_address.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/parse_address.h
@@ -23,31 +23,55 @@
#include <stddef.h>
+#include "y_absl/strings/string_view.h"
+
#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/uri/uri_parser.h"
/** Populate \a resolved_addr from \a uri, whose path is expected to contain a
* unix socket path. Returns true upon success. */
-bool grpc_parse_unix(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
+bool grpc_parse_unix(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr);
+
+/** Populate \a resolved_addr from \a uri, whose path is expected to contain a
+ * unix socket path in the abstract namespace. Returns true upon success. */
+bool grpc_parse_unix_abstract(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr);
/** Populate \a resolved_addr from \a uri, whose path is expected to contain an
* IPv4 host:port pair. Returns true upon success. */
-bool grpc_parse_ipv4(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
+bool grpc_parse_ipv4(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr);
/** Populate \a resolved_addr from \a uri, whose path is expected to contain an
* IPv6 host:port pair. Returns true upon success. */
-bool grpc_parse_ipv6(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
+bool grpc_parse_ipv6(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr);
/** Populate \a resolved_addr from \a uri. Returns true upon success. */
-bool grpc_parse_uri(const grpc_uri* uri, grpc_resolved_address* resolved_addr);
+bool grpc_parse_uri(const grpc_core::URI& uri,
+ grpc_resolved_address* resolved_addr);
/** Parse bare IPv4 or IPv6 "IP:port" strings. */
-bool grpc_parse_ipv4_hostport(const char* hostport, grpc_resolved_address* addr,
- bool log_errors);
-bool grpc_parse_ipv6_hostport(const char* hostport, grpc_resolved_address* addr,
- bool log_errors);
+bool grpc_parse_ipv4_hostport(y_absl::string_view hostport,
+ grpc_resolved_address* addr, bool log_errors);
+bool grpc_parse_ipv6_hostport(y_absl::string_view hostport,
+ grpc_resolved_address* addr, bool log_errors);
/* Converts named or numeric port to a uint16 suitable for use in a sockaddr. */
uint16_t grpc_strhtons(const char* port);
+namespace grpc_core {
+
+/** Populate \a resolved_addr to be a unix socket at |path| */
+grpc_error* UnixSockaddrPopulate(y_absl::string_view path,
+ grpc_resolved_address* resolved_addr);
+
+/** Populate \a resolved_addr to be a unix socket in the abstract namespace
+ * at |path| */
+grpc_error* UnixAbstractSockaddrPopulate(y_absl::string_view path,
+ grpc_resolved_address* resolved_addr);
+
+} // namespace grpc_core
+
#endif /* GRPC_CORE_LIB_IOMGR_PARSE_ADDRESS_H */
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.cc b/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.cc
index e7045df5855..c34430aebdb 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.cc
@@ -63,8 +63,9 @@ bool grpc::experimental::LibuvEventManager::ShouldStop() {
}
void grpc::experimental::LibuvEventManager::Shutdown() {
- if (should_stop_.Load(grpc_core::MemoryOrder::ACQUIRE))
+ if (should_stop_.Load(grpc_core::MemoryOrder::ACQUIRE)) {
return; // Already shut down.
+ }
{
grpc_core::MutexLock lock(&shutdown_mu_);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.h b/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.h
index 88988a1890f..d0ca9cdbdc6 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/poller/eventmanager_libuv.h
@@ -36,7 +36,7 @@ class LibuvEventManager {
class Options {
public:
Options();
- Options(int num_workers);
+ explicit Options(int num_workers);
int num_workers() const { return num_workers_; }
void set_num_workers(int num) { num_workers_ = num; }
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/pollset_set_custom.cc b/contrib/libs/grpc/src/core/lib/iomgr/pollset_set_custom.cc
index 2c1df608197..0cc90891c4c 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/pollset_set_custom.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/pollset_set_custom.cc
@@ -23,7 +23,7 @@
#include "src/core/lib/iomgr/pollset_set.h"
static grpc_pollset_set* pollset_set_create(void) {
- return (grpc_pollset_set*)((intptr_t)0xdeafbeef);
+ return reinterpret_cast<grpc_pollset_set*>(static_cast<intptr_t>(0xdeafbeef));
}
static void pollset_set_destroy(grpc_pollset_set* /*pollset_set*/) {}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/python_util.h b/contrib/libs/grpc/src/core/lib/iomgr/python_util.h
index 42174ab8d86..05d72a58ad0 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/python_util.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/python_util.h
@@ -29,17 +29,17 @@
// They are easier to define here (rather than in Cython)
// because Cython doesn't handle #defines well.
-grpc_error* grpc_socket_error(char* error) {
+inline grpc_error* grpc_socket_error(char* error) {
return grpc_error_set_int(GRPC_ERROR_CREATE_FROM_COPIED_STRING(error),
GRPC_ERROR_INT_GRPC_STATUS,
GRPC_STATUS_UNAVAILABLE);
}
-char* grpc_slice_buffer_start(grpc_slice_buffer* buffer, int i) {
- return (char*)GRPC_SLICE_START_PTR(buffer->slices[i]);
+inline char* grpc_slice_buffer_start(grpc_slice_buffer* buffer, int i) {
+ return reinterpret_cast<char*>(GRPC_SLICE_START_PTR(buffer->slices[i]));
}
-int grpc_slice_buffer_length(grpc_slice_buffer* buffer, int i) {
+inline int grpc_slice_buffer_length(grpc_slice_buffer* buffer, int i) {
return GRPC_SLICE_LENGTH(buffer->slices[i]);
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/resolve_address.cc b/contrib/libs/grpc/src/core/lib/iomgr/resolve_address.cc
index f2a4676369a..7479836df74 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/resolve_address.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/resolve_address.cc
@@ -35,11 +35,11 @@ void grpc_resolve_address(const char* addr, const char* default_port,
addr, default_port, interested_parties, on_done, addresses);
}
-void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addrs) {
- if (addrs != nullptr) {
- gpr_free(addrs->addrs);
+void grpc_resolved_addresses_destroy(grpc_resolved_addresses* addresses) {
+ if (addresses != nullptr) {
+ gpr_free(addresses->addrs);
}
- gpr_free(addrs);
+ gpr_free(addresses);
}
grpc_error* grpc_blocking_resolve_address(const char* name,
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/resolve_address_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/resolve_address_posix.cc
index 4f290873919..6fde3e7260e 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/resolve_address_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/resolve_address_posix.cc
@@ -52,11 +52,6 @@ static grpc_error* posix_blocking_resolve_address(
size_t i;
grpc_error* err;
- if (name[0] == 'u' && name[1] == 'n' && name[2] == 'i' && name[3] == 'x' &&
- name[4] == ':' && name[5] != 0) {
- return grpc_resolve_unix_domain_address(name + 5, addresses);
- }
-
TString host;
TString port;
/* parse name, splitting it into host and port parts */
@@ -67,6 +62,7 @@ static grpc_error* posix_blocking_resolve_address(
GRPC_ERROR_STR_TARGET_ADDRESS, grpc_slice_from_copied_string(name));
goto done;
}
+
if (port.empty()) {
if (default_port == nullptr) {
err = grpc_error_set_str(
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/resource_quota.cc b/contrib/libs/grpc/src/core/lib/iomgr/resource_quota.cc
index f416e096f46..861f70f2263 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/resource_quota.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/resource_quota.cc
@@ -132,7 +132,7 @@ struct grpc_resource_quota {
scaled to the range [0..RESOURCE_USAGE_ESTIMATION_MAX] */
gpr_atm memory_usage_estimation;
- /* Master combiner lock: all activity on a quota executes under this combiner
+ /* Main combiner lock: all activity on a quota executes under this combiner
* (so no mutex is needed for this data structure) */
grpc_core::Combiner* combiner;
/* Size of the resource quota */
@@ -659,8 +659,8 @@ grpc_resource_quota* grpc_resource_quota_create(const char* name) {
if (name != nullptr) {
resource_quota->name = name;
} else {
- resource_quota->name =
- y_absl::StrCat("anonymous_pool_", (intptr_t)resource_quota);
+ resource_quota->name = y_absl::StrCat(
+ "anonymous_pool_", reinterpret_cast<intptr_t>(resource_quota));
}
GRPC_CLOSURE_INIT(&resource_quota->rq_step_closure, rq_step, resource_quota,
nullptr);
@@ -807,8 +807,8 @@ grpc_resource_user* grpc_resource_user_create(
if (name != nullptr) {
resource_user->name = name;
} else {
- resource_user->name =
- y_absl::StrCat("anonymous_resource_user_", (intptr_t)resource_user);
+ resource_user->name = y_absl::StrCat(
+ "anonymous_resource_user_", reinterpret_cast<intptr_t>(resource_user));
}
return resource_user;
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.cc b/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.cc
index b43dbc99235..cb7050df166 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.cc
@@ -183,7 +183,7 @@ TString grpc_sockaddr_to_string(const grpc_resolved_address* resolved_addr,
if (ip != nullptr && grpc_inet_ntop(addr->sa_family, ip, ntop_buf,
sizeof(ntop_buf)) != nullptr) {
if (sin6_scope_id != 0) {
- // Enclose sin6_scope_id with the format defined in RFC 6784 section 2.
+ // Enclose sin6_scope_id with the format defined in RFC 6874 section 2.
TString host_with_scope =
y_absl::StrFormat("%s%%25%" PRIu32, ntop_buf, sin6_scope_id);
out = grpc_core::JoinHostPort(host_with_scope, port);
@@ -201,8 +201,8 @@ TString grpc_sockaddr_to_string(const grpc_resolved_address* resolved_addr,
void grpc_string_to_sockaddr(grpc_resolved_address* out, const char* addr,
int port) {
memset(out, 0, sizeof(grpc_resolved_address));
- grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)out->addr;
- grpc_sockaddr_in* addr4 = (grpc_sockaddr_in*)out->addr;
+ grpc_sockaddr_in6* addr6 = reinterpret_cast<grpc_sockaddr_in6*>(out->addr);
+ grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(out->addr);
if (grpc_inet_pton(GRPC_AF_INET6, addr, &addr6->sin6_addr) == 1) {
addr6->sin6_family = GRPC_AF_INET6;
out->len = sizeof(grpc_sockaddr_in6);
@@ -215,6 +215,25 @@ void grpc_string_to_sockaddr(grpc_resolved_address* out, const char* addr,
grpc_sockaddr_set_port(out, port);
}
+grpc_error* grpc_string_to_sockaddr_new(grpc_resolved_address* out,
+ const char* addr, int port) {
+ memset(out, 0, sizeof(grpc_resolved_address));
+ grpc_sockaddr_in6* addr6 = reinterpret_cast<grpc_sockaddr_in6*>(out->addr);
+ grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(out->addr);
+ if (grpc_inet_pton(GRPC_AF_INET6, addr, &addr6->sin6_addr) == 1) {
+ addr6->sin6_family = GRPC_AF_INET6;
+ out->len = sizeof(grpc_sockaddr_in6);
+ } else if (grpc_inet_pton(GRPC_AF_INET, addr, &addr4->sin_addr) == 1) {
+ addr4->sin_family = GRPC_AF_INET;
+ out->len = sizeof(grpc_sockaddr_in);
+ } else {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Failed to parse address:", addr).c_str());
+ }
+ grpc_sockaddr_set_port(out, port);
+ return GRPC_ERROR_NONE;
+}
+
TString grpc_sockaddr_to_uri(const grpc_resolved_address* resolved_addr) {
if (resolved_addr->len == 0) return "";
grpc_resolved_address addr_normalized;
@@ -260,9 +279,11 @@ int grpc_sockaddr_get_port(const grpc_resolved_address* resolved_addr) {
reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
switch (addr->sa_family) {
case GRPC_AF_INET:
- return grpc_ntohs(((grpc_sockaddr_in*)addr)->sin_port);
+ return grpc_ntohs(
+ (reinterpret_cast<const grpc_sockaddr_in*>(addr))->sin_port);
case GRPC_AF_INET6:
- return grpc_ntohs(((grpc_sockaddr_in6*)addr)->sin6_port);
+ return grpc_ntohs(
+ (reinterpret_cast<const grpc_sockaddr_in6*>(addr))->sin6_port);
default:
if (grpc_is_unix_socket(resolved_addr)) {
return 1;
@@ -273,19 +294,17 @@ int grpc_sockaddr_get_port(const grpc_resolved_address* resolved_addr) {
}
}
-int grpc_sockaddr_set_port(const grpc_resolved_address* resolved_addr,
- int port) {
- const grpc_sockaddr* addr =
- reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
+int grpc_sockaddr_set_port(grpc_resolved_address* resolved_addr, int port) {
+ grpc_sockaddr* addr = reinterpret_cast<grpc_sockaddr*>(resolved_addr->addr);
switch (addr->sa_family) {
case GRPC_AF_INET:
GPR_ASSERT(port >= 0 && port < 65536);
- ((grpc_sockaddr_in*)addr)->sin_port =
+ (reinterpret_cast<grpc_sockaddr_in*>(addr))->sin_port =
grpc_htons(static_cast<uint16_t>(port));
return 1;
case GRPC_AF_INET6:
GPR_ASSERT(port >= 0 && port < 65536);
- ((grpc_sockaddr_in6*)addr)->sin6_port =
+ (reinterpret_cast<grpc_sockaddr_in6*>(addr))->sin6_port =
grpc_htons(static_cast<uint16_t>(port));
return 1;
default:
@@ -294,3 +313,104 @@ int grpc_sockaddr_set_port(const grpc_resolved_address* resolved_addr,
return 0;
}
}
+
+TString grpc_sockaddr_get_packed_host(
+ const grpc_resolved_address* resolved_addr) {
+ const grpc_sockaddr* addr =
+ reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr);
+ if (addr->sa_family == GRPC_AF_INET) {
+ const grpc_sockaddr_in* addr4 =
+ reinterpret_cast<const grpc_sockaddr_in*>(addr);
+ const char* addr_bytes = reinterpret_cast<const char*>(&addr4->sin_addr);
+ return TString(addr_bytes, 4);
+ } else if (addr->sa_family == GRPC_AF_INET6) {
+ const grpc_sockaddr_in6* addr6 =
+ reinterpret_cast<const grpc_sockaddr_in6*>(addr);
+ const char* addr_bytes = reinterpret_cast<const char*>(&addr6->sin6_addr);
+ return TString(addr_bytes, 16);
+ } else {
+ GPR_ASSERT(false);
+ }
+}
+
+void grpc_sockaddr_mask_bits(grpc_resolved_address* address,
+ uint32_t mask_bits) {
+ grpc_sockaddr* addr = reinterpret_cast<grpc_sockaddr*>(address->addr);
+ if (addr->sa_family == GRPC_AF_INET) {
+ grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(addr);
+ if (mask_bits == 0) {
+ memset(&addr4->sin_addr, 0, sizeof(addr4->sin_addr));
+ return;
+ } else if (mask_bits >= 32) {
+ return;
+ }
+ uint32_t mask_ip_addr = (~(uint32_t(0))) << (32 - mask_bits);
+ addr4->sin_addr.s_addr &= grpc_htonl(mask_ip_addr);
+ } else if (addr->sa_family == GRPC_AF_INET6) {
+ grpc_sockaddr_in6* addr6 = reinterpret_cast<grpc_sockaddr_in6*>(addr);
+ if (mask_bits == 0) {
+ memset(&addr6->sin6_addr, 0, sizeof(addr6->sin6_addr));
+ return;
+ } else if (mask_bits >= 128) {
+ return;
+ }
+ // We cannot use s6_addr32 since it is not defined on all platforms that we
+ // need it on.
+ uint32_t address_parts[4];
+ GPR_ASSERT(sizeof(addr6->sin6_addr) == sizeof(address_parts));
+ memcpy(address_parts, &addr6->sin6_addr, sizeof(grpc_in6_addr));
+ if (mask_bits <= 32) {
+ uint32_t mask_ip_addr = (~(uint32_t(0))) << (32 - mask_bits);
+ address_parts[0] &= grpc_htonl(mask_ip_addr);
+ memset(&address_parts[1], 0, sizeof(uint32_t));
+ memset(&address_parts[2], 0, sizeof(uint32_t));
+ memset(&address_parts[3], 0, sizeof(uint32_t));
+ } else if (mask_bits <= 64) {
+ mask_bits -= 32;
+ uint32_t mask_ip_addr = (~(uint32_t(0))) << (32 - mask_bits);
+ address_parts[1] &= grpc_htonl(mask_ip_addr);
+ memset(&address_parts[2], 0, sizeof(uint32_t));
+ memset(&address_parts[3], 0, sizeof(uint32_t));
+ } else if (mask_bits <= 96) {
+ mask_bits -= 64;
+ uint32_t mask_ip_addr = (~(uint32_t(0))) << (32 - mask_bits);
+ address_parts[2] &= grpc_htonl(mask_ip_addr);
+ memset(&address_parts[3], 0, sizeof(uint32_t));
+ } else {
+ mask_bits -= 96;
+ uint32_t mask_ip_addr = (~(uint32_t(0))) << (32 - mask_bits);
+ address_parts[3] &= grpc_htonl(mask_ip_addr);
+ }
+ memcpy(&addr6->sin6_addr, address_parts, sizeof(grpc_in6_addr));
+ }
+}
+
+bool grpc_sockaddr_match_subnet(const grpc_resolved_address* address,
+ const grpc_resolved_address* subnet_address,
+ uint32_t mask_bits) {
+ auto* addr = reinterpret_cast<const grpc_sockaddr*>(address->addr);
+ auto* subnet_addr =
+ reinterpret_cast<const grpc_sockaddr*>(subnet_address->addr);
+ if (addr->sa_family != subnet_addr->sa_family) return false;
+ grpc_resolved_address masked_address;
+ memcpy(&masked_address, address, sizeof(grpc_resolved_address));
+ addr = reinterpret_cast<grpc_sockaddr*>((&masked_address)->addr);
+ grpc_sockaddr_mask_bits(&masked_address, mask_bits);
+ if (addr->sa_family == GRPC_AF_INET) {
+ auto* addr4 = reinterpret_cast<const grpc_sockaddr_in*>(addr);
+ auto* subnet_addr4 = reinterpret_cast<const grpc_sockaddr_in*>(subnet_addr);
+ if (memcmp(&addr4->sin_addr, &subnet_addr4->sin_addr,
+ sizeof(addr4->sin_addr)) == 0) {
+ return true;
+ }
+ } else if (addr->sa_family == GRPC_AF_INET6) {
+ auto* addr6 = reinterpret_cast<const grpc_sockaddr_in6*>(addr);
+ auto* subnet_addr6 =
+ reinterpret_cast<const grpc_sockaddr_in6*>(subnet_addr);
+ if (memcmp(&addr6->sin6_addr, &subnet_addr6->sin6_addr,
+ sizeof(addr6->sin6_addr)) == 0) {
+ return true;
+ }
+ }
+ return false;
+}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.h b/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.h
index eeedeeb90c6..c823aaed384 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/sockaddr_utils.h
@@ -56,7 +56,7 @@ void grpc_sockaddr_make_wildcard6(int port, grpc_resolved_address* wild_out);
int grpc_sockaddr_get_port(const grpc_resolved_address* addr);
/* Set IP port number of a sockaddr */
-int grpc_sockaddr_set_port(const grpc_resolved_address* addr, int port);
+int grpc_sockaddr_set_port(grpc_resolved_address* addr, int port);
// Converts a sockaddr into a newly-allocated human-readable string.
//
@@ -66,9 +66,16 @@ int grpc_sockaddr_set_port(const grpc_resolved_address* addr, int port);
TString grpc_sockaddr_to_string(const grpc_resolved_address* addr,
bool normalize);
+// TODO(yashykt): Remove this function and replace usages with
+// `grpc_string_to_sockaddr_new`
void grpc_string_to_sockaddr(grpc_resolved_address* out, const char* addr,
int port);
+// Newer form of grpc_string_to_sockaddr which returns an error instead of
+// crashing if \a addr is not IPv6/IPv6
+grpc_error* grpc_string_to_sockaddr_new(grpc_resolved_address* out,
+ const char* addr, int port);
+
/* Returns the URI string corresponding to \a addr */
TString grpc_sockaddr_to_uri(const grpc_resolved_address* addr);
@@ -77,4 +84,22 @@ const char* grpc_sockaddr_get_uri_scheme(const grpc_resolved_address* addr);
int grpc_sockaddr_get_family(const grpc_resolved_address* resolved_addr);
+TString grpc_sockaddr_get_packed_host(
+ const grpc_resolved_address* resolved_addr);
+
+// Applies a mask of \a mask_bits to IPv4/IPv6 addresses. Has no effect if the
+// address type is not IPv4/IPv6.
+void grpc_sockaddr_mask_bits(grpc_resolved_address* address,
+ uint32_t mask_bits);
+
+// If \a address is IPv4/IPv6, checks if the IP address falls in the CIDR
+// specified by \a subnet_address and \a mask_bits.
+// Returns false if \a address is not an IPv4/IPv6 address. The ports (if set)
+// are ignored for matching purposes. Note that, \a subnet_address should be
+// normalized, i.e., `grpc_sockaddr_mask_bits` should have been called on it if
+// necessary.
+bool grpc_sockaddr_match_subnet(const grpc_resolved_address* address,
+ const grpc_resolved_address* subnet_address,
+ uint32_t mask_bits);
+
#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_UTILS_H */
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/socket_factory_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/socket_factory_posix.cc
index 57137769c83..8d1bd71a111 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/socket_factory_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/socket_factory_posix.cc
@@ -87,8 +87,9 @@ static const grpc_arg_pointer_vtable socket_factory_arg_vtable = {
socket_factory_arg_copy, socket_factory_arg_destroy, socket_factory_cmp};
grpc_arg grpc_socket_factory_to_arg(grpc_socket_factory* factory) {
- return grpc_channel_arg_pointer_create((char*)GRPC_ARG_SOCKET_FACTORY,
- factory, &socket_factory_arg_vtable);
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_SOCKET_FACTORY), factory,
+ &socket_factory_arg_vtable);
}
#endif
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/socket_mutator.cc b/contrib/libs/grpc/src/core/lib/iomgr/socket_mutator.cc
index a448c9f61c3..918754adb07 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/socket_mutator.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/socket_mutator.cc
@@ -78,6 +78,7 @@ static const grpc_arg_pointer_vtable socket_mutator_arg_vtable = {
socket_mutator_arg_copy, socket_mutator_arg_destroy, socket_mutator_cmp};
grpc_arg grpc_socket_mutator_to_arg(grpc_socket_mutator* mutator) {
- return grpc_channel_arg_pointer_create((char*)GRPC_ARG_SOCKET_MUTATOR,
- mutator, &socket_mutator_arg_vtable);
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_SOCKET_MUTATOR), mutator,
+ &socket_mutator_arg_vtable);
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc
index 8a8d4d3a22f..6941423b8a5 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/socket_utils_common_posix.cc
@@ -73,6 +73,7 @@ grpc_error* grpc_set_socket_zerocopy(int fd) {
}
return GRPC_ERROR_NONE;
#else
+ (void)fd;
return GRPC_OS_ERROR(ENOSYS, "setsockopt(SO_ZEROCOPY)");
#endif
}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client.cc
index 6c0ba40781b..3441a63c829 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client.cc
@@ -22,13 +22,13 @@
grpc_tcp_client_vtable* grpc_tcp_client_impl;
-void grpc_tcp_client_connect(grpc_closure* closure, grpc_endpoint** ep,
+void grpc_tcp_client_connect(grpc_closure* on_connect, grpc_endpoint** endpoint,
grpc_pollset_set* interested_parties,
const grpc_channel_args* channel_args,
const grpc_resolved_address* addr,
grpc_millis deadline) {
- grpc_tcp_client_impl->connect(closure, ep, interested_parties, channel_args,
- addr, deadline);
+ grpc_tcp_client_impl->connect(on_connect, endpoint, interested_parties,
+ channel_args, addr, deadline);
}
void grpc_set_tcp_client_impl(grpc_tcp_client_vtable* impl) {
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_custom.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_custom.cc
index dbcf62c94f5..35b5bc29d3c 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_custom.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_custom.cc
@@ -61,7 +61,7 @@ static void custom_close_callback(grpc_custom_socket* /*socket*/) {}
static void on_alarm(void* acp, grpc_error* error) {
int done;
- grpc_custom_socket* socket = (grpc_custom_socket*)acp;
+ grpc_custom_socket* socket = static_cast<grpc_custom_socket*>(acp);
grpc_custom_tcp_connect* connect = socket->connector;
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
const char* str = grpc_error_string(error);
@@ -124,13 +124,14 @@ static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep,
for (size_t i = 0; i < channel_args->num_args; i++) {
if (0 == strcmp(channel_args->args[i].key, GRPC_ARG_RESOURCE_QUOTA)) {
grpc_resource_quota_unref_internal(resource_quota);
- resource_quota = grpc_resource_quota_ref_internal(
- (grpc_resource_quota*)channel_args->args[i].value.pointer.p);
+ resource_quota =
+ grpc_resource_quota_ref_internal(static_cast<grpc_resource_quota*>(
+ channel_args->args[i].value.pointer.p));
}
}
}
grpc_custom_socket* socket =
- (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ static_cast<grpc_custom_socket*>(gpr_malloc(sizeof(grpc_custom_socket)));
socket->refs = 2;
grpc_custom_socket_vtable->init(socket, GRPC_AF_UNSPEC);
grpc_custom_tcp_connect* connect = new grpc_custom_tcp_connect();
@@ -153,8 +154,8 @@ static void tcp_connect(grpc_closure* closure, grpc_endpoint** ep,
grpc_schedule_on_exec_ctx);
grpc_timer_init(&connect->alarm, deadline, &connect->on_alarm);
grpc_custom_socket_vtable->connect(
- socket, (const grpc_sockaddr*)resolved_addr->addr, resolved_addr->len,
- custom_connect_callback);
+ socket, reinterpret_cast<const grpc_sockaddr*>(resolved_addr->addr),
+ resolved_addr->len, custom_connect_callback);
}
grpc_tcp_client_vtable custom_tcp_client_vtable = {tcp_connect};
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc
index 401ddd2f683..c6719ff98ec 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_client_posix.cc
@@ -38,7 +38,7 @@
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/iomgr/ev_posix.h"
-#include "src/core/lib/iomgr/iomgr_posix.h"
+#include "src/core/lib/iomgr/iomgr_internal.h"
#include "src/core/lib/iomgr/sockaddr.h"
#include "src/core/lib/iomgr/sockaddr_utils.h"
#include "src/core/lib/iomgr/socket_mutator.h"
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_custom.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_custom.cc
index 3e562da508d..5dafe1773cb 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_custom.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_custom.cc
@@ -73,7 +73,8 @@ struct custom_tcp_endpoint {
TString local_address;
};
static void tcp_free(grpc_custom_socket* s) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)s->endpoint;
+ custom_tcp_endpoint* tcp =
+ reinterpret_cast<custom_tcp_endpoint*>(s->endpoint);
grpc_resource_user_unref(tcp->resource_user);
delete tcp;
s->refs--;
@@ -149,18 +150,19 @@ static void custom_read_callback(grpc_custom_socket* socket, size_t nread,
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
grpc_slice_buffer garbage;
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint;
+ custom_tcp_endpoint* tcp =
+ reinterpret_cast<custom_tcp_endpoint*>(socket->endpoint);
if (error == GRPC_ERROR_NONE && nread == 0) {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("EOF");
}
if (error == GRPC_ERROR_NONE) {
// Successful read
- if ((size_t)nread < tcp->read_slices->length) {
+ if (nread < tcp->read_slices->length) {
/* TODO(murgatroid99): Instead of discarding the unused part of the read
* buffer, reuse it as the next read buffer. */
grpc_slice_buffer_init(&garbage);
- grpc_slice_buffer_trim_end(
- tcp->read_slices, tcp->read_slices->length - (size_t)nread, &garbage);
+ grpc_slice_buffer_trim_end(tcp->read_slices,
+ tcp->read_slices->length - nread, &garbage);
grpc_slice_buffer_reset_and_unref_internal(&garbage);
}
} else {
@@ -170,7 +172,7 @@ static void custom_read_callback(grpc_custom_socket* socket, size_t nread,
}
static void tcp_read_allocation_done(void* tcpp, grpc_error* error) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)tcpp;
+ custom_tcp_endpoint* tcp = static_cast<custom_tcp_endpoint*>(tcpp);
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
gpr_log(GPR_INFO, "TCP:%p read_allocation_done: %s", tcp->socket,
grpc_error_string(error));
@@ -179,7 +181,8 @@ static void tcp_read_allocation_done(void* tcpp, grpc_error* error) {
/* Before calling read, we allocate a buffer with exactly one slice
* to tcp->read_slices and wait for the callback indicating that the
* allocation was successful. So slices[0] should always exist here */
- char* buffer = (char*)GRPC_SLICE_START_PTR(tcp->read_slices->slices[0]);
+ char* buffer = reinterpret_cast<char*>(
+ GRPC_SLICE_START_PTR(tcp->read_slices->slices[0]));
size_t len = GRPC_SLICE_LENGTH(tcp->read_slices->slices[0]);
grpc_custom_socket_vtable->read(tcp->socket, buffer, len,
custom_read_callback);
@@ -195,7 +198,7 @@ static void tcp_read_allocation_done(void* tcpp, grpc_error* error) {
static void endpoint_read(grpc_endpoint* ep, grpc_slice_buffer* read_slices,
grpc_closure* cb, bool /*urgent*/) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
GPR_ASSERT(tcp->read_cb == nullptr);
tcp->read_cb = cb;
@@ -213,7 +216,8 @@ static void custom_write_callback(grpc_custom_socket* socket,
grpc_error* error) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint;
+ custom_tcp_endpoint* tcp =
+ reinterpret_cast<custom_tcp_endpoint*>(socket->endpoint);
grpc_closure* cb = tcp->write_cb;
tcp->write_cb = nullptr;
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
@@ -226,7 +230,7 @@ static void custom_write_callback(grpc_custom_socket* socket,
static void endpoint_write(grpc_endpoint* ep, grpc_slice_buffer* write_slices,
grpc_closure* cb, void* /*arg*/) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
@@ -284,7 +288,7 @@ static void endpoint_delete_from_pollset_set(grpc_endpoint* ep,
}
static void endpoint_shutdown(grpc_endpoint* ep, grpc_error* why) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
if (!tcp->shutting_down) {
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
const char* str = grpc_error_string(why);
@@ -309,28 +313,29 @@ static void custom_close_callback(grpc_custom_socket* socket) {
} else if (socket->endpoint) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)socket->endpoint;
+ custom_tcp_endpoint* tcp =
+ reinterpret_cast<custom_tcp_endpoint*>(socket->endpoint);
TCP_UNREF(tcp, "destroy");
}
}
static void endpoint_destroy(grpc_endpoint* ep) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
grpc_custom_socket_vtable->close(tcp->socket, custom_close_callback);
}
static y_absl::string_view endpoint_get_peer(grpc_endpoint* ep) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
return tcp->peer_string;
}
static y_absl::string_view endpoint_get_local_address(grpc_endpoint* ep) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
return tcp->local_address;
}
static grpc_resource_user* endpoint_get_resource_user(grpc_endpoint* ep) {
- custom_tcp_endpoint* tcp = (custom_tcp_endpoint*)ep;
+ custom_tcp_endpoint* tcp = reinterpret_cast<custom_tcp_endpoint*>(ep);
return tcp->resource_user;
}
@@ -362,7 +367,7 @@ grpc_endpoint* custom_tcp_endpoint_create(grpc_custom_socket* socket,
gpr_log(GPR_INFO, "Creating TCP endpoint %p", socket);
}
socket->refs++;
- socket->endpoint = (grpc_endpoint*)tcp;
+ socket->endpoint = reinterpret_cast<grpc_endpoint*>(tcp);
tcp->socket = socket;
tcp->base.vtable = &vtable;
gpr_ref_init(&tcp->refcount, 1);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_posix.cc
index b1cd892964d..102ab5bdd70 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_posix.cc
@@ -181,8 +181,9 @@ class TcpZerocopySendCtx {
static constexpr int kDefaultMaxSends = 4;
static constexpr size_t kDefaultSendBytesThreshold = 16 * 1024; // 16KB
- TcpZerocopySendCtx(int max_sends = kDefaultMaxSends,
- size_t send_bytes_threshold = kDefaultSendBytesThreshold)
+ explicit TcpZerocopySendCtx(
+ int max_sends = kDefaultMaxSends,
+ size_t send_bytes_threshold = kDefaultSendBytesThreshold)
: max_sends_(max_sends),
free_send_records_size_(max_sends),
threshold_bytes_(send_bytes_threshold) {
@@ -465,7 +466,8 @@ static void run_poller(void* bp, grpc_error* /*error_ignored*/) {
if (gpr_atm_no_barrier_load(&g_uncovered_notifications_pending) == 1 &&
gpr_atm_full_cas(&g_uncovered_notifications_pending, 1, 0)) {
gpr_mu_lock(p->pollset_mu);
- bool cas_ok = gpr_atm_full_cas(&g_backup_poller, (gpr_atm)p, 0);
+ bool cas_ok =
+ gpr_atm_full_cas(&g_backup_poller, reinterpret_cast<gpr_atm>(p), 0);
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
gpr_log(GPR_INFO, "BACKUP_POLLER:%p done cas_ok=%d", p, cas_ok);
}
@@ -487,7 +489,8 @@ static void run_poller(void* bp, grpc_error* /*error_ignored*/) {
}
static void drop_uncovered(grpc_tcp* /*tcp*/) {
- backup_poller* p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller);
+ backup_poller* p =
+ reinterpret_cast<backup_poller*>(gpr_atm_acq_load(&g_backup_poller));
gpr_atm old_count =
gpr_atm_full_fetch_add(&g_uncovered_notifications_pending, -1);
if (GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace)) {
@@ -526,8 +529,8 @@ static void cover_self(grpc_tcp* tcp) {
GRPC_ERROR_NONE, grpc_core::ExecutorType::DEFAULT,
grpc_core::ExecutorJobType::LONG);
} else {
- while ((p = (backup_poller*)gpr_atm_acq_load(&g_backup_poller)) ==
- nullptr) {
+ while ((p = reinterpret_cast<backup_poller*>(
+ gpr_atm_acq_load(&g_backup_poller))) == nullptr) {
// spin waiting for backup poller
}
}
@@ -1238,11 +1241,11 @@ static void tcp_handle_error(void* arg /* grpc_tcp */, grpc_error* error) {
#else /* GRPC_LINUX_ERRQUEUE */
static TcpZerocopySendRecord* tcp_get_send_zerocopy_record(
- grpc_tcp* tcp, grpc_slice_buffer* buf) {
+ grpc_tcp* /*tcp*/, grpc_slice_buffer* /*buf*/) {
return nullptr;
}
-static void ZerocopyDisableAndWaitForRemaining(grpc_tcp* tcp) {}
+static void ZerocopyDisableAndWaitForRemaining(grpc_tcp* /*tcp*/) {}
static bool tcp_write_with_timestamps(grpc_tcp* /*tcp*/, struct msghdr* /*msg*/,
size_t /*sending_length*/,
@@ -1388,8 +1391,8 @@ static bool do_tcp_flush_zerocopy(grpc_tcp* tcp, TcpZerocopySendRecord* record,
static void UnrefMaybePutZerocopySendRecord(grpc_tcp* tcp,
TcpZerocopySendRecord* record,
- uint32_t seq,
- const char* /* tag */) {
+ uint32_t /*seq*/,
+ const char* /*tag*/) {
if (record->Unref()) {
tcp->tcp_zerocopy_send_ctx.PutSendRecord(record);
}
@@ -1670,10 +1673,7 @@ static bool tcp_can_track_err(grpc_endpoint* ep) {
if (getsockname(tcp->fd, &addr, &len) < 0) {
return false;
}
- if (addr.sa_family == AF_INET || addr.sa_family == AF_INET6) {
- return true;
- }
- return false;
+ return addr.sa_family == AF_INET || addr.sa_family == AF_INET6;
}
static const grpc_endpoint_vtable vtable = {tcp_read,
@@ -1689,7 +1689,7 @@ static const grpc_endpoint_vtable vtable = {tcp_read,
tcp_get_fd,
tcp_can_track_err};
-#define MAX_CHUNK_SIZE 32 * 1024 * 1024
+#define MAX_CHUNK_SIZE (32 * 1024 * 1024)
grpc_endpoint* grpc_tcp_create(grpc_fd* em_fd,
const grpc_channel_args* channel_args,
@@ -1798,7 +1798,8 @@ grpc_endpoint* grpc_tcp_create(grpc_fd* em_fd,
#endif
}
/* paired with unref in grpc_tcp_destroy */
- new (&tcp->refcount) grpc_core::RefCount(1, &grpc_tcp_trace);
+ new (&tcp->refcount) grpc_core::RefCount(
+ 1, GRPC_TRACE_FLAG_ENABLED(grpc_tcp_trace) ? "tcp" : nullptr);
gpr_atm_no_barrier_store(&tcp->shutdown_count, 0);
tcp->em_fd = em_fd;
grpc_slice_buffer_init(&tcp->last_read_buffer);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_server_custom.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_server_custom.cc
index 0cffa1f5719..3effdf8926d 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_server_custom.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_server_custom.cc
@@ -83,7 +83,8 @@ struct grpc_tcp_server {
static grpc_error* tcp_server_create(grpc_closure* shutdown_complete,
const grpc_channel_args* args,
grpc_tcp_server** server) {
- grpc_tcp_server* s = (grpc_tcp_server*)gpr_malloc(sizeof(grpc_tcp_server));
+ grpc_tcp_server* s =
+ static_cast<grpc_tcp_server*>(gpr_malloc(sizeof(grpc_tcp_server)));
// Let the implementation decide if so_reuseport can be enabled or not.
s->so_reuseport = true;
s->resource_quota = grpc_resource_quota_create(nullptr);
@@ -95,7 +96,7 @@ static grpc_error* tcp_server_create(grpc_closure* shutdown_complete,
if (args->args[i].type == GRPC_ARG_POINTER) {
grpc_resource_quota_unref_internal(s->resource_quota);
s->resource_quota = grpc_resource_quota_ref_internal(
- (grpc_resource_quota*)args->args[i].value.pointer.p);
+ static_cast<grpc_resource_quota*>(args->args[i].value.pointer.p));
} else {
grpc_resource_quota_unref_internal(s->resource_quota);
gpr_free(s);
@@ -163,12 +164,12 @@ static void custom_close_callback(grpc_custom_socket* socket) {
}
}
-void grpc_custom_close_server_callback(grpc_tcp_listener* sp) {
- if (sp) {
+void grpc_custom_close_server_callback(grpc_tcp_listener* listener) {
+ if (listener) {
grpc_core::ExecCtx exec_ctx;
- sp->server->open_ports--;
- if (sp->server->open_ports == 0 && sp->server->shutdown) {
- finish_shutdown(sp->server);
+ listener->server->open_ports--;
+ if (listener->server->open_ports == 0 && listener->server->shutdown) {
+ finish_shutdown(listener->server);
}
}
}
@@ -213,7 +214,7 @@ static void tcp_server_unref(grpc_tcp_server* s) {
static void finish_accept(grpc_tcp_listener* sp, grpc_custom_socket* socket) {
grpc_tcp_server_acceptor* acceptor =
- (grpc_tcp_server_acceptor*)gpr_malloc(sizeof(*acceptor));
+ static_cast<grpc_tcp_server_acceptor*>(gpr_malloc(sizeof(*acceptor)));
grpc_endpoint* ep = nullptr;
grpc_resolved_address peer_name;
TString peer_name_string;
@@ -222,7 +223,8 @@ static void finish_accept(grpc_tcp_listener* sp, grpc_custom_socket* socket) {
memset(&peer_name, 0, sizeof(grpc_resolved_address));
peer_name.len = GRPC_MAX_SOCKADDR_SIZE;
err = grpc_custom_socket_vtable->getpeername(
- socket, (grpc_sockaddr*)&peer_name.addr, (int*)&peer_name.len);
+ socket, reinterpret_cast<grpc_sockaddr*>(&peer_name.addr),
+ reinterpret_cast<int*>(&peer_name.len));
if (err == GRPC_ERROR_NONE) {
peer_name_string = grpc_sockaddr_to_uri(&peer_name);
} else {
@@ -262,8 +264,8 @@ static void custom_accept_callback(grpc_custom_socket* socket,
}
finish_accept(sp, client);
if (!sp->closed) {
- grpc_custom_socket* new_socket =
- (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ grpc_custom_socket* new_socket = static_cast<grpc_custom_socket*>(
+ gpr_malloc(sizeof(grpc_custom_socket)));
new_socket->endpoint = nullptr;
new_socket->listener = nullptr;
new_socket->connector = nullptr;
@@ -290,8 +292,9 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s,
flags |= GRPC_CUSTOM_SOCKET_OPT_SO_REUSEPORT;
}
- error = grpc_custom_socket_vtable->bind(socket, (grpc_sockaddr*)addr->addr,
- addr->len, flags);
+ error = grpc_custom_socket_vtable->bind(
+ socket, reinterpret_cast<grpc_sockaddr*>(const_cast<char*>(addr->addr)),
+ addr->len, flags);
if (error != GRPC_ERROR_NONE) {
return error;
}
@@ -303,7 +306,8 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s,
sockname_temp.len = GRPC_MAX_SOCKADDR_SIZE;
error = grpc_custom_socket_vtable->getsockname(
- socket, (grpc_sockaddr*)&sockname_temp.addr, (int*)&sockname_temp.len);
+ socket, reinterpret_cast<grpc_sockaddr*>(&sockname_temp.addr),
+ reinterpret_cast<int*>(&sockname_temp.len));
if (error != GRPC_ERROR_NONE) {
return error;
}
@@ -312,7 +316,7 @@ static grpc_error* add_socket_to_server(grpc_tcp_server* s,
GPR_ASSERT(port >= 0);
GPR_ASSERT(!s->on_accept_cb && "must add ports before starting server");
- sp = (grpc_tcp_listener*)gpr_zalloc(sizeof(grpc_tcp_listener));
+ sp = static_cast<grpc_tcp_listener*>(gpr_zalloc(sizeof(grpc_tcp_listener)));
sp->next = nullptr;
if (s->head == nullptr) {
s->head = sp;
@@ -358,12 +362,13 @@ static grpc_error* tcp_server_add_port(grpc_tcp_server* s,
socket = sp->socket;
sockname_temp.len = GRPC_MAX_SOCKADDR_SIZE;
if (nullptr == grpc_custom_socket_vtable->getsockname(
- socket, (grpc_sockaddr*)&sockname_temp.addr,
- (int*)&sockname_temp.len)) {
+ socket,
+ reinterpret_cast<grpc_sockaddr*>(&sockname_temp.addr),
+ reinterpret_cast<int*>(&sockname_temp.len))) {
*port = grpc_sockaddr_get_port(&sockname_temp);
if (*port > 0) {
- allocated_addr =
- (grpc_resolved_address*)gpr_malloc(sizeof(grpc_resolved_address));
+ allocated_addr = static_cast<grpc_resolved_address*>(
+ gpr_malloc(sizeof(grpc_resolved_address)));
memcpy(allocated_addr, addr, sizeof(grpc_resolved_address));
grpc_sockaddr_set_port(allocated_addr, *port);
addr = allocated_addr;
@@ -391,7 +396,8 @@ static grpc_error* tcp_server_add_port(grpc_tcp_server* s,
}
family = grpc_sockaddr_get_family(addr);
- socket = (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ socket =
+ static_cast<grpc_custom_socket*>(gpr_malloc(sizeof(grpc_custom_socket)));
socket->refs = 1;
socket->endpoint = nullptr;
socket->listener = nullptr;
@@ -430,8 +436,8 @@ static void tcp_server_start(grpc_tcp_server* server,
server->on_accept_cb = on_accept_cb;
server->on_accept_cb_arg = cb_arg;
for (sp = server->head; sp; sp = sp->next) {
- grpc_custom_socket* new_socket =
- (grpc_custom_socket*)gpr_malloc(sizeof(grpc_custom_socket));
+ grpc_custom_socket* new_socket = static_cast<grpc_custom_socket*>(
+ gpr_malloc(sizeof(grpc_custom_socket)));
new_socket->endpoint = nullptr;
new_socket->listener = nullptr;
new_socket->connector = nullptr;
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/tcp_uv.cc b/contrib/libs/grpc/src/core/lib/iomgr/tcp_uv.cc
index 371b38c9914..1515aaac494 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/tcp_uv.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/tcp_uv.cc
@@ -252,8 +252,8 @@ static void accept_new_connection(grpc_custom_socket* socket) {
uv_socket->accept_error = GRPC_ERROR_NONE;
uv_socket->pending_connections -= 1;
if (uv_socket->accept_error != GRPC_ERROR_NONE) {
- uv_stream_t dummy_handle;
- uv_accept((uv_stream_t*)uv_socket->handle, &dummy_handle);
+ uv_stream_t phony_handle;
+ uv_accept((uv_stream_t*)uv_socket->handle, &phony_handle);
uv_socket->accept_cb(socket, new_socket, error);
} else {
uv_socket_t* uv_new_socket = (uv_socket_t*)gpr_malloc(sizeof(uv_socket_t));
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/timer_custom.cc b/contrib/libs/grpc/src/core/lib/iomgr/timer_custom.cc
index c550d441229..867359a28db 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/timer_custom.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/timer_custom.cc
@@ -36,7 +36,7 @@ void grpc_custom_timer_callback(grpc_custom_timer* t, grpc_error* /*error*/) {
grpc_core::ExecCtx exec_ctx;
grpc_timer* timer = t->original;
GPR_ASSERT(timer->pending);
- timer->pending = 0;
+ timer->pending = false;
grpc_core::ExecCtx::Run(DEBUG_LOCATION, timer->closure, GRPC_ERROR_NONE);
custom_timer_impl->stop(t);
gpr_free(t);
@@ -57,18 +57,18 @@ static void timer_init(grpc_timer* timer, grpc_millis deadline,
timer->pending = true;
timer->closure = closure;
grpc_custom_timer* timer_wrapper =
- (grpc_custom_timer*)gpr_malloc(sizeof(grpc_custom_timer));
+ static_cast<grpc_custom_timer*>(gpr_malloc(sizeof(grpc_custom_timer)));
timer_wrapper->timeout_ms = timeout;
- timer->custom_timer = (void*)timer_wrapper;
+ timer->custom_timer = timer_wrapper;
timer_wrapper->original = timer;
custom_timer_impl->start(timer_wrapper);
}
static void timer_cancel(grpc_timer* timer) {
GRPC_CUSTOM_IOMGR_ASSERT_SAME_THREAD();
- grpc_custom_timer* tw = (grpc_custom_timer*)timer->custom_timer;
+ grpc_custom_timer* tw = static_cast<grpc_custom_timer*>(timer->custom_timer);
if (timer->pending) {
- timer->pending = 0;
+ timer->pending = false;
grpc_core::ExecCtx::Run(DEBUG_LOCATION, timer->closure,
GRPC_ERROR_CANCELLED);
custom_timer_impl->stop(tw);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/timer_generic.cc b/contrib/libs/grpc/src/core/lib/iomgr/timer_generic.cc
index fb0e50c53c9..3c29d5bbe2c 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/timer_generic.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/timer_generic.cc
@@ -409,7 +409,7 @@ static void timer_init(grpc_timer* timer, grpc_millis deadline,
}
gpr_mu_unlock(&shard->mu);
- /* Deadline may have decreased, we need to adjust the master queue. Note
+ /* Deadline may have decreased, we need to adjust the main queue. Note
that there is a potential racy unlocked region here. There could be a
reordering of multiple grpc_timer_init calls, at this point, but the < test
below should ensure that we err on the side of caution. There could
@@ -432,7 +432,7 @@ static void timer_init(grpc_timer* timer, grpc_millis deadline,
note_deadline_change(shard);
if (shard->shard_queue_index == 0 && deadline < old_min_deadline) {
#if GPR_ARCH_64
- // TODO: sreek - Using c-style cast here. static_cast<> gives an error
+ // TODO(sreek): Using c-style cast here. static_cast<> gives an error
// (on mac platforms complaining that gpr_atm* is (long *) while
// (&g_shared_mutables.min_timer) is a (long long *). The cast should be
// safe since we know that both are pointer types and 64-bit wide.
@@ -586,7 +586,7 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now,
grpc_timer_check_result result = GRPC_TIMERS_NOT_CHECKED;
#if GPR_ARCH_64
- // TODO: sreek - Using c-style cast here. static_cast<> gives an error (on
+ // TODO(sreek): Using c-style cast here. static_cast<> gives an error (on
// mac platforms complaining that gpr_atm* is (long *) while
// (&g_shared_mutables.min_timer) is a (long long *). The cast should be
// safe since we know that both are pointer types and 64-bit wide
@@ -639,7 +639,7 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now,
/* An grpc_timer_init() on the shard could intervene here, adding a new
timer that is earlier than new_min_deadline. However,
- grpc_timer_init() will block on the master_lock before it can call
+ grpc_timer_init() will block on the mutex before it can call
set_min_deadline, so this one will complete first and then the Addtimer
will reduce the min_deadline (perhaps unnecessarily). */
g_shard_queue[0]->min_deadline = new_min_deadline;
@@ -651,7 +651,7 @@ static grpc_timer_check_result run_some_expired_timers(grpc_millis now,
}
#if GPR_ARCH_64
- // TODO: sreek - Using c-style cast here. static_cast<> gives an error (on
+ // TODO(sreek): Using c-style cast here. static_cast<> gives an error (on
// mac platforms complaining that gpr_atm* is (long *) while
// (&g_shared_mutables.min_timer) is a (long long *). The cast should be
// safe since we know that both are pointer types and 64-bit wide
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/timer_manager.cc b/contrib/libs/grpc/src/core/lib/iomgr/timer_manager.cc
index 96d502c5108..bf467cb5c44 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/timer_manager.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/timer_manager.cc
@@ -133,7 +133,7 @@ static void run_some_timers() {
}
grpc_core::ExecCtx::Get()->Flush();
gpr_mu_lock(&g_mu);
- // garbage collect any threads hanging out that are dead
+ // garbage collect any threads that are dead
gc_completed_threads();
// get ready to wait again
++g_waiter_count;
@@ -342,8 +342,8 @@ void grpc_timer_manager_shutdown(void) {
gpr_cv_destroy(&g_cv_shutdown);
}
-void grpc_timer_manager_set_threading(bool threaded) {
- if (threaded) {
+void grpc_timer_manager_set_threading(bool enabled) {
+ if (enabled) {
start_threads();
} else {
stop_threads();
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/udp_server.cc b/contrib/libs/grpc/src/core/lib/iomgr/udp_server.cc
index 1e7734d6818..68aa62150d3 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/udp_server.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/udp_server.cc
@@ -570,8 +570,7 @@ static int add_socket_to_server(grpc_udp_server* s, int fd,
return port;
}
-int grpc_udp_server_add_port(grpc_udp_server* s,
- const grpc_resolved_address* addr,
+int grpc_udp_server_add_port(grpc_udp_server* s, grpc_resolved_address* addr,
int rcv_buf_size, int snd_buf_size,
GrpcUdpHandlerFactory* handler_factory,
size_t num_listeners) {
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/udp_server.h b/contrib/libs/grpc/src/core/lib/iomgr/udp_server.h
index 6cda332a5bb..ba7acbbe59f 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/udp_server.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/udp_server.h
@@ -93,8 +93,7 @@ int grpc_udp_server_get_fd(grpc_udp_server* s, unsigned port_index);
/* TODO(ctiller): deprecate this, and make grpc_udp_server_add_ports to handle
all of the multiple socket port matching logic in one place */
-int grpc_udp_server_add_port(grpc_udp_server* s,
- const grpc_resolved_address* addr,
+int grpc_udp_server_add_port(grpc_udp_server* s, grpc_resolved_address* addr,
int rcv_buf_size, int snd_buf_size,
GrpcUdpHandlerFactory* handler_factory,
size_t num_listeners);
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.cc b/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.cc
index fd26673b38f..2488e980009 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.cc
@@ -30,6 +30,7 @@
#include "y_absl/strings/str_cat.h"
+#include "src/core/lib/iomgr/parse_address.h"
#include "src/core/lib/iomgr/unix_sockets_posix.h"
#include <grpc/support/alloc.h>
@@ -41,27 +42,24 @@ void grpc_create_socketpair_if_unix(int sv[2]) {
GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0);
}
-grpc_error* grpc_resolve_unix_domain_address(const char* name,
- grpc_resolved_addresses** addrs) {
- struct sockaddr_un* un;
- if (strlen(name) >
- GPR_ARRAY_SIZE(((struct sockaddr_un*)nullptr)->sun_path) - 1) {
- return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("Path name should not have more than ",
- GPR_ARRAY_SIZE(un->sun_path) - 1, " characters")
- .c_str());
- }
- *addrs = static_cast<grpc_resolved_addresses*>(
+grpc_error* grpc_resolve_unix_domain_address(
+ const char* name, grpc_resolved_addresses** addresses) {
+ *addresses = static_cast<grpc_resolved_addresses*>(
+ gpr_malloc(sizeof(grpc_resolved_addresses)));
+ (*addresses)->naddrs = 1;
+ (*addresses)->addrs = static_cast<grpc_resolved_address*>(
+ gpr_malloc(sizeof(grpc_resolved_address)));
+ return grpc_core::UnixSockaddrPopulate(name, (*addresses)->addrs);
+}
+
+grpc_error* grpc_resolve_unix_abstract_domain_address(
+ const y_absl::string_view name, grpc_resolved_addresses** addresses) {
+ *addresses = static_cast<grpc_resolved_addresses*>(
gpr_malloc(sizeof(grpc_resolved_addresses)));
- (*addrs)->naddrs = 1;
- (*addrs)->addrs = static_cast<grpc_resolved_address*>(
+ (*addresses)->naddrs = 1;
+ (*addresses)->addrs = static_cast<grpc_resolved_address*>(
gpr_malloc(sizeof(grpc_resolved_address)));
- un = reinterpret_cast<struct sockaddr_un*>((*addrs)->addrs->addr);
- un->sun_family = AF_UNIX;
- strncpy(un->sun_path, name, sizeof(un->sun_path));
- (*addrs)->addrs->len =
- static_cast<socklen_t>(strlen(un->sun_path) + sizeof(un->sun_family) + 1);
- return GRPC_ERROR_NONE;
+ return grpc_core::UnixAbstractSockaddrPopulate(name, (*addresses)->addrs);
}
int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr) {
@@ -79,8 +77,13 @@ void grpc_unlink_if_unix_domain_socket(
}
struct sockaddr_un* un = reinterpret_cast<struct sockaddr_un*>(
const_cast<char*>(resolved_addr->addr));
- struct stat st;
+ // There is nothing to unlink for an abstract unix socket
+ if (un->sun_path[0] == '\0' && un->sun_path[1] != '\0') {
+ return;
+ }
+
+ struct stat st;
if (stat(un->sun_path, &st) == 0 && (st.st_mode & S_IFMT) == S_IFSOCK) {
unlink(un->sun_path);
}
@@ -93,7 +96,15 @@ TString grpc_sockaddr_to_uri_unix_if_possible(
if (addr->sa_family != AF_UNIX) {
return "";
}
- return y_absl::StrCat("unix:", ((struct sockaddr_un*)addr)->sun_path);
+ const auto* unix_addr = reinterpret_cast<const struct sockaddr_un*>(addr);
+ if (unix_addr->sun_path[0] == '\0' && unix_addr->sun_path[1] != '\0') {
+ return y_absl::StrCat(
+ "unix-abstract:",
+ y_absl::string_view(
+ unix_addr->sun_path + 1,
+ resolved_addr->len - sizeof(unix_addr->sun_family) - 1));
+ }
+ return y_absl::StrCat("unix:", unix_addr->sun_path);
}
#endif
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.h b/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.h
index 962adde71cd..72d4840b1d2 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.h
+++ b/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix.h
@@ -29,11 +29,16 @@
#include "src/core/lib/iomgr/resolve_address.h"
+#include "y_absl/strings/string_view.h"
+
void grpc_create_socketpair_if_unix(int sv[2]);
grpc_error* grpc_resolve_unix_domain_address(
const char* name, grpc_resolved_addresses** addresses);
+grpc_error* grpc_resolve_unix_abstract_domain_address(
+ y_absl::string_view name, grpc_resolved_addresses** addresses);
+
int grpc_is_unix_socket(const grpc_resolved_address* resolved_addr);
void grpc_unlink_if_unix_domain_socket(
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix_noop.cc b/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix_noop.cc
index e391914ab5c..530bdc79d4a 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix_noop.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/unix_sockets_posix_noop.cc
@@ -40,6 +40,13 @@ grpc_error* grpc_resolve_unix_domain_address(
"Unix domain sockets are not supported on Windows");
}
+grpc_error* grpc_resolve_unix_abstract_domain_address(
+ y_absl::string_view, grpc_resolved_addresses** addresses) {
+ *addresses = NULL;
+ return GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unix domain sockets are not supported on Windows");
+}
+
int grpc_is_unix_socket(const grpc_resolved_address* addr) { return false; }
void grpc_unlink_if_unix_domain_socket(const grpc_resolved_address* addr) {}
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_nospecial.cc b/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_nospecial.cc
index 64778929f00..b1565751ce3 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_nospecial.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_nospecial.cc
@@ -17,7 +17,7 @@
*/
/*
- * This is a dummy file to provide an invalid specialized_wakeup_fd_vtable on
+ * This is a phony file to provide an invalid specialized_wakeup_fd_vtable on
* systems without anything better than pipe.
*/
diff --git a/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_pipe.cc b/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_pipe.cc
index cb173903a93..797cd44cd1a 100644
--- a/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_pipe.cc
+++ b/contrib/libs/grpc/src/core/lib/iomgr/wakeup_fd_pipe.cc
@@ -71,8 +71,8 @@ static grpc_error* pipe_consume(grpc_wakeup_fd* fd_info) {
static grpc_error* pipe_wakeup(grpc_wakeup_fd* fd_info) {
char c = 0;
- while (write(fd_info->write_fd, &c, 1) != 1 && errno == EINTR)
- ;
+ while (write(fd_info->write_fd, &c, 1) != 1 && errno == EINTR) {
+ }
return GRPC_ERROR_NONE;
}
diff --git a/contrib/libs/grpc/src/core/lib/json/json.h b/contrib/libs/grpc/src/core/lib/json/json.h
index f426fbf1dde..2c3ec447e79 100644
--- a/contrib/libs/grpc/src/core/lib/json/json.h
+++ b/contrib/libs/grpc/src/core/lib/json/json.h
@@ -69,14 +69,15 @@ class Json {
}
// Moveable.
- Json(Json&& other) { MoveFrom(std::move(other)); }
- Json& operator=(Json&& other) {
+ Json(Json&& other) noexcept { MoveFrom(std::move(other)); }
+ Json& operator=(Json&& other) noexcept {
MoveFrom(std::move(other));
return *this;
}
// Construct from copying a string.
// If is_number is true, the type will be NUMBER instead of STRING.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(const TString& string, bool is_number = false)
: type_(is_number ? Type::NUMBER : Type::STRING), string_value_(string) {}
Json& operator=(const TString& string) {
@@ -86,12 +87,14 @@ class Json {
}
// Same thing for C-style strings, both const and mutable.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(const char* string, bool is_number = false)
: Json(TString(string), is_number) {}
Json& operator=(const char* string) {
*this = TString(string);
return *this;
}
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(char* string, bool is_number = false)
: Json(TString(string), is_number) {}
Json& operator=(char* string) {
@@ -100,6 +103,7 @@ class Json {
}
// Construct by moving a string.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(TString&& string)
: type_(Type::STRING), string_value_(std::move(string)) {}
Json& operator=(TString&& string) {
@@ -109,6 +113,7 @@ class Json {
}
// Construct from bool.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(bool b) : type_(b ? Type::JSON_TRUE : Type::JSON_FALSE) {}
Json& operator=(bool b) {
type_ = b ? Type::JSON_TRUE : Type::JSON_FALSE;
@@ -117,6 +122,7 @@ class Json {
// Construct from any numeric type.
template <typename NumericType>
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(NumericType number)
: type_(Type::NUMBER), string_value_(ToString(number)) {}
template <typename NumericType>
@@ -127,6 +133,7 @@ class Json {
}
// Construct by copying object.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(const Object& object) : type_(Type::OBJECT), object_value_(object) {}
Json& operator=(const Object& object) {
type_ = Type::OBJECT;
@@ -135,6 +142,7 @@ class Json {
}
// Construct by moving object.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(Object&& object)
: type_(Type::OBJECT), object_value_(std::move(object)) {}
Json& operator=(Object&& object) {
@@ -144,6 +152,7 @@ class Json {
}
// Construct by copying array.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(const Array& array) : type_(Type::ARRAY), array_value_(array) {}
Json& operator=(const Array& array) {
type_ = Type::ARRAY;
@@ -152,6 +161,7 @@ class Json {
}
// Construct by moving array.
+ // NOLINTNEXTLINE(google-explicit-constructor)
Json(Array&& array) : type_(Type::ARRAY), array_value_(std::move(array)) {}
Json& operator=(Array&& array) {
type_ = Type::ARRAY;
diff --git a/contrib/libs/grpc/src/core/lib/json/json_reader.cc b/contrib/libs/grpc/src/core/lib/json/json_reader.cc
index e251cb78824..78153c7cd5e 100644
--- a/contrib/libs/grpc/src/core/lib/json/json_reader.cc
+++ b/contrib/libs/grpc/src/core/lib/json/json_reader.cc
@@ -413,8 +413,9 @@ JsonReader::Status JsonReader::Run() {
/* This is the \\ case. */
case State::GRPC_JSON_STATE_STRING_ESCAPE:
- if (unicode_high_surrogate_ != 0)
+ if (unicode_high_surrogate_ != 0) {
return Status::GRPC_JSON_PARSE_ERROR;
+ }
StringAddChar('\\');
if (escaped_string_was_key_) {
state_ = State::GRPC_JSON_STATE_OBJECT_KEY_STRING;
@@ -593,14 +594,16 @@ JsonReader::Status JsonReader::Run() {
*/
if ((unicode_char_ & 0xfc00) == 0xd800) {
/* high surrogate utf-16 */
- if (unicode_high_surrogate_ != 0)
+ if (unicode_high_surrogate_ != 0) {
return Status::GRPC_JSON_PARSE_ERROR;
+ }
unicode_high_surrogate_ = unicode_char_;
} else if ((unicode_char_ & 0xfc00) == 0xdc00) {
/* low surrogate utf-16 */
uint32_t utf32;
- if (unicode_high_surrogate_ == 0)
+ if (unicode_high_surrogate_ == 0) {
return Status::GRPC_JSON_PARSE_ERROR;
+ }
utf32 = 0x10000;
utf32 += static_cast<uint32_t>(
(unicode_high_surrogate_ - 0xd800) * 0x400);
@@ -609,8 +612,9 @@ JsonReader::Status JsonReader::Run() {
unicode_high_surrogate_ = 0;
} else {
/* anything else */
- if (unicode_high_surrogate_ != 0)
+ if (unicode_high_surrogate_ != 0) {
return Status::GRPC_JSON_PARSE_ERROR;
+ }
StringAddUtf32(unicode_char_);
}
if (escaped_string_was_key_) {
diff --git a/contrib/libs/grpc/src/core/lib/json/json_util.h b/contrib/libs/grpc/src/core/lib/json/json_util.h
index 071087f7658..a91ac510d8a 100644
--- a/contrib/libs/grpc/src/core/lib/json/json_util.h
+++ b/contrib/libs/grpc/src/core/lib/json/json_util.h
@@ -21,6 +21,9 @@
#include <grpc/support/port_platform.h>
+#include "y_absl/strings/numbers.h"
+#include "y_absl/strings/str_cat.h"
+
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/json/json.h"
@@ -32,6 +35,170 @@ namespace grpc_core {
// Returns true on success, false otherwise.
bool ParseDurationFromJson(const Json& field, grpc_millis* duration);
+//
+// Helper functions for extracting types from JSON.
+// Return true on success, false otherwise. If an error is encountered during
+// parsing, a descriptive error is appended to \a error_list.
+//
+template <typename NumericType, typename ErrorVectorType>
+inline bool ExtractJsonNumber(const Json& json, const TString& field_name,
+ NumericType* output,
+ ErrorVectorType* error_list) {
+ static_assert(std::is_integral<NumericType>::value, "Integral required");
+ if (json.type() != Json::Type::NUMBER) {
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:type should be NUMBER")
+ .c_str()));
+ return false;
+ }
+ if (!y_absl::SimpleAtoi(json.string_value(), output)) {
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:failed to parse.").c_str()));
+ return false;
+ }
+ return true;
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonBool(const Json& json, const TString& field_name,
+ bool* output, ErrorVectorType* error_list) {
+ switch (json.type()) {
+ case Json::Type::JSON_TRUE:
+ *output = true;
+ return true;
+ case Json::Type::JSON_FALSE:
+ *output = false;
+ return true;
+ default:
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:type should be BOOLEAN")
+ .c_str()));
+ return false;
+ }
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonString(const Json& json, const TString& field_name,
+ TString* output,
+ ErrorVectorType* error_list) {
+ if (json.type() != Json::Type::STRING) {
+ *output = "";
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:type should be STRING")
+ .c_str()));
+ return false;
+ }
+ *output = json.string_value();
+ return true;
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonArray(const Json& json, const TString& field_name,
+ const Json::Array** output,
+ ErrorVectorType* error_list) {
+ if (json.type() != Json::Type::ARRAY) {
+ *output = nullptr;
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:type should be ARRAY")
+ .c_str()));
+ return false;
+ }
+ *output = &json.array_value();
+ return true;
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonObject(const Json& json, const TString& field_name,
+ const Json::Object** output,
+ ErrorVectorType* error_list) {
+ if (json.type() != Json::Type::OBJECT) {
+ *output = nullptr;
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:type should be OBJECT")
+ .c_str()));
+ return false;
+ }
+ *output = &json.object_value();
+ return true;
+}
+
+template <typename NumericType, typename ErrorVectorType>
+inline bool ExtractJsonType(const Json& json, const TString& field_name,
+ NumericType* output, ErrorVectorType* error_list) {
+ return ExtractJsonNumber(json, field_name, output, error_list);
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonType(const Json& json, const TString& field_name,
+ bool* output, ErrorVectorType* error_list) {
+ return ExtractJsonBool(json, field_name, output, error_list);
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonType(const Json& json, const TString& field_name,
+ TString* output, ErrorVectorType* error_list) {
+ return ExtractJsonString(json, field_name, output, error_list);
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonType(const Json& json, const TString& field_name,
+ const Json::Array** output,
+ ErrorVectorType* error_list) {
+ return ExtractJsonArray(json, field_name, output, error_list);
+}
+
+template <typename ErrorVectorType>
+inline bool ExtractJsonType(const Json& json, const TString& field_name,
+ const Json::Object** output,
+ ErrorVectorType* error_list) {
+ return ExtractJsonObject(json, field_name, output, error_list);
+}
+
+template <typename T, typename ErrorVectorType>
+inline bool ParseJsonObjectField(const Json::Object& object,
+ const TString& field_name, T* output,
+ ErrorVectorType* error_list,
+ bool required = true) {
+ auto it = object.find(field_name);
+ if (it == object.end()) {
+ if (required) {
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:does not exist.")
+ .c_str()));
+ }
+ return false;
+ }
+ auto& child_object_json = it->second;
+ return ExtractJsonType(child_object_json, field_name, output, error_list);
+}
+
+template <typename ErrorVectorType>
+inline bool ParseJsonObjectFieldAsDuration(const Json::Object& object,
+ const TString& field_name,
+ grpc_millis* output,
+ ErrorVectorType* error_list,
+ bool required = true) {
+ auto it = object.find(field_name);
+ if (it == object.end()) {
+ if (required) {
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name, " error:does not exist.")
+ .c_str()));
+ }
+ return false;
+ }
+ if (!ParseDurationFromJson(it->second, output)) {
+ *output = GRPC_MILLIS_INF_PAST;
+ error_list->push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("field:", field_name,
+ " error:type should be STRING of the form given by "
+ "google.proto.Duration.")
+ .c_str()));
+ return false;
+ }
+ return true;
+}
+
} // namespace grpc_core
#endif // GRPC_CORE_LIB_JSON_JSON_UTIL_H
diff --git a/contrib/libs/grpc/src/core/lib/json/json_writer.cc b/contrib/libs/grpc/src/core/lib/json/json_writer.cc
index f2043d55a05..05c95865558 100644
--- a/contrib/libs/grpc/src/core/lib/json/json_writer.cc
+++ b/contrib/libs/grpc/src/core/lib/json/json_writer.cc
@@ -207,8 +207,9 @@ void JsonWriter::EscapeString(const TString& string) {
* Any other range is technically reserved for future usage, so if we
* don't want the software to break in the future, we have to allow
* anything else. The first non-unicode character is 0x110000. */
- if (((utf32 >= 0xd800) && (utf32 <= 0xdfff)) || (utf32 >= 0x110000))
+ if (((utf32 >= 0xd800) && (utf32 <= 0xdfff)) || (utf32 >= 0x110000)) {
break;
+ }
if (utf32 >= 0x10000) {
/* If utf32 contains a character that is above 0xffff, it needs to be
* broken down into a utf-16 surrogate pair. A surrogate pair is first
diff --git a/contrib/libs/grpc/src/core/lib/matchers/matchers.cc b/contrib/libs/grpc/src/core/lib/matchers/matchers.cc
new file mode 100644
index 00000000000..cdffcbd74c3
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/matchers/matchers.cc
@@ -0,0 +1,339 @@
+// Copyright 2021 gRPC authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/matchers/matchers.h"
+
+#include "y_absl/memory/memory.h"
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_join.h"
+#include "y_absl/strings/str_split.h"
+
+namespace grpc_core {
+
+//
+// StringMatcher
+//
+
+y_absl::StatusOr<StringMatcher> StringMatcher::Create(Type type,
+ y_absl::string_view matcher,
+ bool case_sensitive) {
+ if (type == Type::SAFE_REGEX) {
+ RE2::Options options;
+ options.set_case_sensitive(case_sensitive);
+ auto regex_matcher = y_absl::make_unique<RE2>(TString(matcher), options);
+ if (!regex_matcher->ok()) {
+ return y_absl::InvalidArgumentError(
+ "Invalid regex string specified in matcher.");
+ }
+ return StringMatcher(std::move(regex_matcher), case_sensitive);
+ } else {
+ return StringMatcher(type, matcher, case_sensitive);
+ }
+}
+
+StringMatcher::StringMatcher(Type type, y_absl::string_view matcher,
+ bool case_sensitive)
+ : type_(type), string_matcher_(matcher), case_sensitive_(case_sensitive) {}
+
+StringMatcher::StringMatcher(std::unique_ptr<RE2> regex_matcher,
+ bool case_sensitive)
+ : type_(Type::SAFE_REGEX),
+ regex_matcher_(std::move(regex_matcher)),
+ case_sensitive_(case_sensitive) {}
+
+StringMatcher::StringMatcher(const StringMatcher& other)
+ : type_(other.type_), case_sensitive_(other.case_sensitive_) {
+ if (type_ == Type::SAFE_REGEX) {
+ RE2::Options options;
+ options.set_case_sensitive(other.case_sensitive_);
+ regex_matcher_ =
+ y_absl::make_unique<RE2>(other.regex_matcher_->pattern(), options);
+ } else {
+ string_matcher_ = other.string_matcher_;
+ }
+}
+
+StringMatcher& StringMatcher::operator=(const StringMatcher& other) {
+ type_ = other.type_;
+ if (type_ == Type::SAFE_REGEX) {
+ RE2::Options options;
+ options.set_case_sensitive(other.case_sensitive_);
+ regex_matcher_ =
+ y_absl::make_unique<RE2>(other.regex_matcher_->pattern(), options);
+ } else {
+ string_matcher_ = other.string_matcher_;
+ }
+ case_sensitive_ = other.case_sensitive_;
+ return *this;
+}
+
+StringMatcher::StringMatcher(StringMatcher&& other) noexcept
+ : type_(other.type_), case_sensitive_(other.case_sensitive_) {
+ if (type_ == Type::SAFE_REGEX) {
+ regex_matcher_ = std::move(other.regex_matcher_);
+ } else {
+ string_matcher_ = std::move(other.string_matcher_);
+ }
+}
+
+StringMatcher& StringMatcher::operator=(StringMatcher&& other) noexcept {
+ type_ = other.type_;
+ if (type_ == Type::SAFE_REGEX) {
+ regex_matcher_ = std::move(other.regex_matcher_);
+ } else {
+ string_matcher_ = std::move(other.string_matcher_);
+ }
+ case_sensitive_ = other.case_sensitive_;
+ return *this;
+}
+
+bool StringMatcher::operator==(const StringMatcher& other) const {
+ if (type_ != other.type_ || case_sensitive_ != other.case_sensitive_) {
+ return false;
+ }
+ if (type_ == Type::SAFE_REGEX) {
+ return regex_matcher_->pattern() == other.regex_matcher_->pattern();
+ } else {
+ return string_matcher_ == other.string_matcher_;
+ }
+}
+
+bool StringMatcher::Match(y_absl::string_view value) const {
+ switch (type_) {
+ case Type::EXACT:
+ return case_sensitive_ ? value == string_matcher_
+ : y_absl::EqualsIgnoreCase(value, string_matcher_);
+ case StringMatcher::Type::PREFIX:
+ return case_sensitive_
+ ? y_absl::StartsWith(value, string_matcher_)
+ : y_absl::StartsWithIgnoreCase(value, string_matcher_);
+ case StringMatcher::Type::SUFFIX:
+ return case_sensitive_ ? y_absl::EndsWith(value, string_matcher_)
+ : y_absl::EndsWithIgnoreCase(value, string_matcher_);
+ case StringMatcher::Type::CONTAINS:
+ return case_sensitive_
+ ? y_absl::StrContains(value, string_matcher_)
+ : y_absl::StrContains(y_absl::AsciiStrToLower(value),
+ y_absl::AsciiStrToLower(string_matcher_));
+ case StringMatcher::Type::SAFE_REGEX:
+ return RE2::FullMatch(TString(value), *regex_matcher_);
+ default:
+ return false;
+ }
+}
+
+TString StringMatcher::ToString() const {
+ switch (type_) {
+ case Type::EXACT:
+ return y_absl::StrFormat("StringMatcher{exact=%s%s}", string_matcher_,
+ case_sensitive_ ? "" : ", case_sensitive=false");
+ case Type::PREFIX:
+ return y_absl::StrFormat("StringMatcher{prefix=%s%s}", string_matcher_,
+ case_sensitive_ ? "" : ", case_sensitive=false");
+ case Type::SUFFIX:
+ return y_absl::StrFormat("StringMatcher{suffix=%s%s}", string_matcher_,
+ case_sensitive_ ? "" : ", case_sensitive=false");
+ case Type::CONTAINS:
+ return y_absl::StrFormat("StringMatcher{contains=%s%s}", string_matcher_,
+ case_sensitive_ ? "" : ", case_sensitive=false");
+ case Type::SAFE_REGEX:
+ return y_absl::StrFormat("StringMatcher{safe_regex=%s%s}",
+ regex_matcher_->pattern(),
+ case_sensitive_ ? "" : ", case_sensitive=false");
+ default:
+ return "";
+ }
+}
+
+//
+// HeaderMatcher
+//
+
+y_absl::StatusOr<HeaderMatcher> HeaderMatcher::Create(
+ y_absl::string_view name, Type type, y_absl::string_view matcher,
+ int64_t range_start, int64_t range_end, bool present_match,
+ bool invert_match) {
+ if (static_cast<int>(type) < 5) {
+ // Only for EXACT, PREFIX, SUFFIX, SAFE_REGEX and CONTAINS.
+ y_absl::StatusOr<StringMatcher> string_matcher =
+ StringMatcher::Create(static_cast<StringMatcher::Type>(type), matcher,
+ /*case_sensitive=*/true);
+ if (!string_matcher.ok()) {
+ return string_matcher.status();
+ }
+ return HeaderMatcher(name, type, std::move(string_matcher.value()),
+ invert_match);
+ } else if (type == Type::RANGE) {
+ if (range_start > range_end) {
+ return y_absl::InvalidArgumentError(
+ "Invalid range specifier specified: end cannot be smaller than "
+ "start.");
+ }
+ return HeaderMatcher(name, range_start, range_end, invert_match);
+ } else {
+ return HeaderMatcher(name, present_match, invert_match);
+ }
+}
+
+HeaderMatcher::HeaderMatcher(y_absl::string_view name, Type type,
+ StringMatcher string_matcher, bool invert_match)
+ : name_(name),
+ type_(type),
+ matcher_(std::move(string_matcher)),
+ invert_match_(invert_match) {}
+
+HeaderMatcher::HeaderMatcher(y_absl::string_view name, int64_t range_start,
+ int64_t range_end, bool invert_match)
+ : name_(name),
+ type_(Type::RANGE),
+ range_start_(range_start),
+ range_end_(range_end),
+ invert_match_(invert_match) {}
+
+HeaderMatcher::HeaderMatcher(y_absl::string_view name, bool present_match,
+ bool invert_match)
+ : name_(name),
+ type_(Type::PRESENT),
+ present_match_(present_match),
+ invert_match_(invert_match) {}
+
+HeaderMatcher::HeaderMatcher(const HeaderMatcher& other)
+ : name_(other.name_),
+ type_(other.type_),
+ invert_match_(other.invert_match_) {
+ switch (type_) {
+ case Type::RANGE:
+ range_start_ = other.range_start_;
+ range_end_ = other.range_end_;
+ break;
+ case Type::PRESENT:
+ present_match_ = other.present_match_;
+ break;
+ default:
+ matcher_ = other.matcher_;
+ }
+}
+
+HeaderMatcher& HeaderMatcher::operator=(const HeaderMatcher& other) {
+ name_ = other.name_;
+ type_ = other.type_;
+ invert_match_ = other.invert_match_;
+ switch (type_) {
+ case Type::RANGE:
+ range_start_ = other.range_start_;
+ range_end_ = other.range_end_;
+ break;
+ case Type::PRESENT:
+ present_match_ = other.present_match_;
+ break;
+ default:
+ matcher_ = other.matcher_;
+ }
+ return *this;
+}
+
+HeaderMatcher::HeaderMatcher(HeaderMatcher&& other) noexcept
+ : name_(std::move(other.name_)),
+ type_(other.type_),
+ invert_match_(other.invert_match_) {
+ switch (type_) {
+ case Type::RANGE:
+ range_start_ = other.range_start_;
+ range_end_ = other.range_end_;
+ break;
+ case Type::PRESENT:
+ present_match_ = other.present_match_;
+ break;
+ default:
+ matcher_ = std::move(other.matcher_);
+ }
+}
+
+HeaderMatcher& HeaderMatcher::operator=(HeaderMatcher&& other) noexcept {
+ name_ = std::move(other.name_);
+ type_ = other.type_;
+ invert_match_ = other.invert_match_;
+ switch (type_) {
+ case Type::RANGE:
+ range_start_ = other.range_start_;
+ range_end_ = other.range_end_;
+ break;
+ case Type::PRESENT:
+ present_match_ = other.present_match_;
+ break;
+ default:
+ matcher_ = std::move(other.matcher_);
+ }
+ return *this;
+}
+
+bool HeaderMatcher::operator==(const HeaderMatcher& other) const {
+ if (name_ != other.name_) return false;
+ if (type_ != other.type_) return false;
+ if (invert_match_ != other.invert_match_) return false;
+ switch (type_) {
+ case Type::RANGE:
+ return range_start_ == other.range_start_ &&
+ range_end_ == other.range_end_;
+ case Type::PRESENT:
+ return present_match_ == other.present_match_;
+ default:
+ return matcher_ == other.matcher_;
+ }
+}
+
+bool HeaderMatcher::Match(
+ const y_absl::optional<y_absl::string_view>& value) const {
+ bool match;
+ if (type_ == Type::PRESENT) {
+ match = value.has_value() == present_match_;
+ } else if (!value.has_value()) {
+ // All other types fail to match if field is not present.
+ match = false;
+ } else if (type_ == Type::RANGE) {
+ int64_t int_value;
+ match = y_absl::SimpleAtoi(value.value(), &int_value) &&
+ int_value >= range_start_ && int_value < range_end_;
+ } else {
+ match = matcher_.Match(value.value());
+ }
+ return match != invert_match_;
+}
+
+TString HeaderMatcher::ToString() const {
+ switch (type_) {
+ case Type::RANGE:
+ return y_absl::StrFormat("HeaderMatcher{%s %srange=[%d, %d]}", name_,
+ invert_match_ ? "not " : "", range_start_,
+ range_end_);
+ case Type::PRESENT:
+ return y_absl::StrFormat("HeaderMatcher{%s %spresent=%s}", name_,
+ invert_match_ ? "not " : "",
+ present_match_ ? "true" : "false");
+ case Type::EXACT:
+ case Type::PREFIX:
+ case Type::SUFFIX:
+ case Type::SAFE_REGEX:
+ case Type::CONTAINS:
+ return y_absl::StrFormat("HeaderMatcher{%s %s%s}", name_,
+ invert_match_ ? "not " : "", matcher_.ToString());
+ default:
+ return "";
+ }
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/matchers/matchers.h b/contrib/libs/grpc/src/core/lib/matchers/matchers.h
new file mode 100644
index 00000000000..d87113ce868
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/matchers/matchers.h
@@ -0,0 +1,160 @@
+// Copyright 2021 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_LIB_MATCHERS_MATCHERS_H
+#define GRPC_CORE_LIB_MATCHERS_MATCHERS_H
+
+#include <grpc/support/port_platform.h>
+
+#include <memory>
+#include <util/generic/string.h>
+
+#include "y_absl/status/statusor.h"
+#include "y_absl/strings/string_view.h"
+#include "y_absl/types/optional.h"
+
+#include "re2/re2.h"
+
+namespace grpc_core {
+
+class StringMatcher {
+ public:
+ enum class Type {
+ EXACT, // value stored in string_matcher_ field
+ PREFIX, // value stored in string_matcher_ field
+ SUFFIX, // value stored in string_matcher_ field
+ SAFE_REGEX, // pattern stored in regex_matcher_ field
+ CONTAINS, // value stored in string_matcher_ field
+ };
+
+ // Creates StringMatcher instance. Returns error status on failure.
+ static y_absl::StatusOr<StringMatcher> Create(Type type,
+ y_absl::string_view matcher,
+ bool case_sensitive = true);
+
+ StringMatcher() = default;
+ StringMatcher(const StringMatcher& other);
+ StringMatcher& operator=(const StringMatcher& other);
+ StringMatcher(StringMatcher&& other) noexcept;
+ StringMatcher& operator=(StringMatcher&& other) noexcept;
+ bool operator==(const StringMatcher& other) const;
+
+ bool Match(y_absl::string_view value) const;
+
+ TString ToString() const;
+
+ Type type() const { return type_; }
+
+ // Valid for EXACT, PREFIX, SUFFIX and CONTAINS
+ const TString& string_matcher() const { return string_matcher_; }
+
+ // Valid for SAFE_REGEX
+ RE2* regex_matcher() const { return regex_matcher_.get(); }
+
+ bool case_sensitive() const { return case_sensitive_; }
+
+ private:
+ StringMatcher(Type type, y_absl::string_view matcher, bool case_sensitive);
+ StringMatcher(std::unique_ptr<RE2> regex_matcher, bool case_sensitive);
+
+ Type type_ = Type::EXACT;
+ TString string_matcher_;
+ std::unique_ptr<RE2> regex_matcher_;
+ bool case_sensitive_ = true;
+};
+
+class HeaderMatcher {
+ public:
+ enum class Type {
+ EXACT, // value stored in StringMatcher field
+ PREFIX, // value stored in StringMatcher field
+ SUFFIX, // value stored in StringMatcher field
+ SAFE_REGEX, // value stored in StringMatcher field
+ CONTAINS, // value stored in StringMatcher field
+ RANGE, // uses range_start and range_end fields
+ PRESENT, // uses present_match field
+ };
+
+ // Make sure that the first five HeaderMatcher::Type enum values match up to
+ // the corresponding StringMatcher::Type enum values, so that it's safe to
+ // convert by casting when delegating to StringMatcher.
+ static_assert(static_cast<StringMatcher::Type>(Type::EXACT) ==
+ StringMatcher::Type::EXACT,
+ "");
+ static_assert(static_cast<StringMatcher::Type>(Type::PREFIX) ==
+ StringMatcher::Type::PREFIX,
+ "");
+ static_assert(static_cast<StringMatcher::Type>(Type::SUFFIX) ==
+ StringMatcher::Type::SUFFIX,
+ "");
+ static_assert(static_cast<StringMatcher::Type>(Type::SAFE_REGEX) ==
+ StringMatcher::Type::SAFE_REGEX,
+ "");
+ static_assert(static_cast<StringMatcher::Type>(Type::CONTAINS) ==
+ StringMatcher::Type::CONTAINS,
+ "");
+
+ // Creates HeaderMatcher instance. Returns error status on failure.
+ static y_absl::StatusOr<HeaderMatcher> Create(y_absl::string_view name, Type type,
+ y_absl::string_view matcher,
+ int64_t range_start = 0,
+ int64_t range_end = 0,
+ bool present_match = false,
+ bool invert_match = false);
+
+ HeaderMatcher() = default;
+ HeaderMatcher(const HeaderMatcher& other);
+ HeaderMatcher& operator=(const HeaderMatcher& other);
+ HeaderMatcher(HeaderMatcher&& other) noexcept;
+ HeaderMatcher& operator=(HeaderMatcher&& other) noexcept;
+ bool operator==(const HeaderMatcher& other) const;
+
+ const TString& name() const { return name_; }
+
+ Type type() const { return type_; }
+
+ // Valid for EXACT, PREFIX, SUFFIX and CONTAINS
+ const TString& string_matcher() const {
+ return matcher_.string_matcher();
+ }
+
+ // Valid for SAFE_REGEX
+ RE2* regex_matcher() const { return matcher_.regex_matcher(); }
+
+ bool Match(const y_absl::optional<y_absl::string_view>& value) const;
+
+ TString ToString() const;
+
+ private:
+ // For StringMatcher.
+ HeaderMatcher(y_absl::string_view name, Type type, StringMatcher matcher,
+ bool invert_match);
+ // For RangeMatcher.
+ HeaderMatcher(y_absl::string_view name, int64_t range_start, int64_t range_end,
+ bool invert_match);
+ // For PresentMatcher.
+ HeaderMatcher(y_absl::string_view name, bool present_match, bool invert_match);
+
+ TString name_;
+ Type type_ = Type::EXACT;
+ StringMatcher matcher_;
+ int64_t range_start_;
+ int64_t range_end_;
+ bool present_match_;
+ bool invert_match_ = false;
+};
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_LIB_MATCHERS_MATCHERS_H */
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/authorization_engine.cc b/contrib/libs/grpc/src/core/lib/security/authorization/authorization_engine.cc
deleted file mode 100644
index 4a9386633b8..00000000000
--- a/contrib/libs/grpc/src/core/lib/security/authorization/authorization_engine.cc
+++ /dev/null
@@ -1,177 +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 <grpc/support/port_platform.h>
-
-#include "y_absl/memory/memory.h"
-
-#include "src/core/lib/security/authorization/authorization_engine.h"
-
-namespace grpc_core {
-
-namespace {
-
-// Symbols for traversing Envoy Attributes
-constexpr char kUrlPath[] = "url_path";
-constexpr char kHost[] = "host";
-constexpr char kMethod[] = "method";
-constexpr char kHeaders[] = "headers";
-constexpr char kSourceAddress[] = "source_address";
-constexpr char kSourcePort[] = "source_port";
-constexpr char kDestinationAddress[] = "destination_address";
-constexpr char kDestinationPort[] = "destination_port";
-constexpr char kSpiffeId[] = "spiffe_id";
-constexpr char kCertServerName[] = "cert_server_name";
-
-} // namespace
-
-std::unique_ptr<AuthorizationEngine>
-AuthorizationEngine::CreateAuthorizationEngine(
- const std::vector<envoy_config_rbac_v3_RBAC*>& rbac_policies) {
- if (rbac_policies.empty() || rbac_policies.size() > 2) {
- gpr_log(GPR_ERROR,
- "Invalid rbac policies vector. Must contain either one or two rbac "
- "policies.");
- return nullptr;
- } else if (rbac_policies.size() == 2 &&
- (envoy_config_rbac_v3_RBAC_action(rbac_policies[0]) != kDeny ||
- envoy_config_rbac_v3_RBAC_action(rbac_policies[1]) != kAllow)) {
- gpr_log(GPR_ERROR,
- "Invalid rbac policies vector. Must contain one deny \
- policy and one allow policy, in that order.");
- return nullptr;
- } else {
- return y_absl::make_unique<AuthorizationEngine>(rbac_policies);
- }
-}
-
-AuthorizationEngine::AuthorizationEngine(
- const std::vector<envoy_config_rbac_v3_RBAC*>& rbac_policies) {
- for (const auto& rbac_policy : rbac_policies) {
- // Extract array of policies and store their condition fields in either
- // allow_if_matched_ or deny_if_matched_, depending on the policy action.
- upb::Arena temp_arena;
- size_t policy_num = UPB_MAP_BEGIN;
- const envoy_config_rbac_v3_RBAC_PoliciesEntry* policy_entry;
- while ((policy_entry = envoy_config_rbac_v3_RBAC_policies_next(
- rbac_policy, &policy_num)) != nullptr) {
- const upb_strview policy_name_strview =
- envoy_config_rbac_v3_RBAC_PoliciesEntry_key(policy_entry);
- const TString policy_name(policy_name_strview.data,
- policy_name_strview.size);
- const envoy_config_rbac_v3_Policy* policy =
- envoy_config_rbac_v3_RBAC_PoliciesEntry_value(policy_entry);
- const google_api_expr_v1alpha1_Expr* condition =
- envoy_config_rbac_v3_Policy_condition(policy);
- // Parse condition to make a pointer tied to the lifetime of arena_.
- size_t serial_len;
- const char* serialized = google_api_expr_v1alpha1_Expr_serialize(
- condition, temp_arena.ptr(), &serial_len);
- const google_api_expr_v1alpha1_Expr* parsed_condition =
- google_api_expr_v1alpha1_Expr_parse(serialized, serial_len,
- arena_.ptr());
- if (envoy_config_rbac_v3_RBAC_action(rbac_policy) == kAllow) {
- allow_if_matched_.insert(std::make_pair(policy_name, parsed_condition));
- } else {
- deny_if_matched_.insert(std::make_pair(policy_name, parsed_condition));
- }
- }
- }
-}
-
-std::unique_ptr<mock_cel::Activation> AuthorizationEngine::CreateActivation(
- const EvaluateArgs& args) {
- std::unique_ptr<mock_cel::Activation> activation;
- for (const auto& elem : envoy_attributes_) {
- if (elem == kUrlPath) {
- y_absl::string_view url_path(args.GetPath());
- if (!url_path.empty()) {
- activation->InsertValue(kUrlPath,
- mock_cel::CelValue::CreateStringView(url_path));
- }
- } else if (elem == kHost) {
- y_absl::string_view host(args.GetHost());
- if (!host.empty()) {
- activation->InsertValue(kHost,
- mock_cel::CelValue::CreateStringView(host));
- }
- } else if (elem == kMethod) {
- y_absl::string_view method(args.GetMethod());
- if (!method.empty()) {
- activation->InsertValue(kMethod,
- mock_cel::CelValue::CreateStringView(method));
- }
- } else if (elem == kHeaders) {
- std::multimap<y_absl::string_view, y_absl::string_view> headers =
- args.GetHeaders();
- std::vector<std::pair<mock_cel::CelValue, mock_cel::CelValue>>
- header_items;
- for (const auto& header_key : header_keys_) {
- auto header_item = headers.find(header_key);
- if (header_item != headers.end()) {
- header_items.push_back(
- std::pair<mock_cel::CelValue, mock_cel::CelValue>(
- mock_cel::CelValue::CreateStringView(header_key),
- mock_cel::CelValue::CreateStringView(header_item->second)));
- }
- }
- headers_ = mock_cel::ContainerBackedMapImpl::Create(
- y_absl::Span<std::pair<mock_cel::CelValue, mock_cel::CelValue>>(
- header_items));
- activation->InsertValue(kHeaders,
- mock_cel::CelValue::CreateMap(headers_.get()));
- } else if (elem == kSourceAddress) {
- y_absl::string_view source_address(args.GetPeerAddress());
- if (!source_address.empty()) {
- activation->InsertValue(
- kSourceAddress,
- mock_cel::CelValue::CreateStringView(source_address));
- }
- } else if (elem == kSourcePort) {
- activation->InsertValue(
- kSourcePort, mock_cel::CelValue::CreateInt64(args.GetPeerPort()));
- } else if (elem == kDestinationAddress) {
- y_absl::string_view destination_address(args.GetLocalAddress());
- if (!destination_address.empty()) {
- activation->InsertValue(
- kDestinationAddress,
- mock_cel::CelValue::CreateStringView(destination_address));
- }
- } else if (elem == kDestinationPort) {
- activation->InsertValue(kDestinationPort, mock_cel::CelValue::CreateInt64(
- args.GetLocalPort()));
- } else if (elem == kSpiffeId) {
- y_absl::string_view spiffe_id(args.GetSpiffeId());
- if (!spiffe_id.empty()) {
- activation->InsertValue(
- kSpiffeId, mock_cel::CelValue::CreateStringView(spiffe_id));
- }
- } else if (elem == kCertServerName) {
- y_absl::string_view cert_server_name(args.GetCertServerName());
- if (!cert_server_name.empty()) {
- activation->InsertValue(
- kCertServerName,
- mock_cel::CelValue::CreateStringView(cert_server_name));
- }
- } else {
- gpr_log(GPR_ERROR,
- "Error: Authorization engine does not support evaluating "
- "attribute %s.",
- elem.c_str());
- }
- }
- return activation;
-}
-
-} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.cc b/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.cc
deleted file mode 100644
index 48af382f122..00000000000
--- a/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.cc
+++ /dev/null
@@ -1,153 +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 <grpc/support/port_platform.h>
-
-#include "src/core/lib/security/authorization/evaluate_args.h"
-
-#include "src/core/lib/iomgr/parse_address.h"
-#include "src/core/lib/iomgr/resolve_address.h"
-#include "src/core/lib/iomgr/sockaddr_utils.h"
-#include "src/core/lib/slice/slice_utils.h"
-
-namespace grpc_core {
-
-y_absl::string_view EvaluateArgs::GetPath() const {
- y_absl::string_view path;
- if (metadata_ != nullptr && metadata_->idx.named.path != nullptr) {
- grpc_linked_mdelem* elem = metadata_->idx.named.path;
- const grpc_slice& val = GRPC_MDVALUE(elem->md);
- path = StringViewFromSlice(val);
- }
- return path;
-}
-
-y_absl::string_view EvaluateArgs::GetHost() const {
- y_absl::string_view host;
- if (metadata_ != nullptr && metadata_->idx.named.host != nullptr) {
- grpc_linked_mdelem* elem = metadata_->idx.named.host;
- const grpc_slice& val = GRPC_MDVALUE(elem->md);
- host = StringViewFromSlice(val);
- }
- return host;
-}
-
-y_absl::string_view EvaluateArgs::GetMethod() const {
- y_absl::string_view method;
- if (metadata_ != nullptr && metadata_->idx.named.method != nullptr) {
- grpc_linked_mdelem* elem = metadata_->idx.named.method;
- const grpc_slice& val = GRPC_MDVALUE(elem->md);
- method = StringViewFromSlice(val);
- }
- return method;
-}
-
-std::multimap<y_absl::string_view, y_absl::string_view> EvaluateArgs::GetHeaders()
- const {
- std::multimap<y_absl::string_view, y_absl::string_view> headers;
- if (metadata_ == nullptr) {
- return headers;
- }
- for (grpc_linked_mdelem* elem = metadata_->list.head; elem != nullptr;
- elem = elem->next) {
- const grpc_slice& key = GRPC_MDKEY(elem->md);
- const grpc_slice& val = GRPC_MDVALUE(elem->md);
- headers.emplace(StringViewFromSlice(key), StringViewFromSlice(val));
- }
- return headers;
-}
-
-y_absl::string_view EvaluateArgs::GetLocalAddress() const {
- y_absl::string_view addr = grpc_endpoint_get_local_address(endpoint_);
- size_t first_colon = addr.find(":");
- size_t last_colon = addr.rfind(":");
- if (first_colon == TString::npos || last_colon == TString::npos) {
- return "";
- } else {
- return addr.substr(first_colon + 1, last_colon - first_colon - 1);
- }
-}
-
-int EvaluateArgs::GetLocalPort() const {
- if (endpoint_ == nullptr) {
- return 0;
- }
- grpc_uri* uri = grpc_uri_parse(
- TString(grpc_endpoint_get_local_address(endpoint_)).c_str(), true);
- grpc_resolved_address resolved_addr;
- if (uri == nullptr || !grpc_parse_uri(uri, &resolved_addr)) {
- grpc_uri_destroy(uri);
- return 0;
- }
- grpc_uri_destroy(uri);
- return grpc_sockaddr_get_port(&resolved_addr);
-}
-
-y_absl::string_view EvaluateArgs::GetPeerAddress() const {
- y_absl::string_view addr = grpc_endpoint_get_peer(endpoint_);
- size_t first_colon = addr.find(":");
- size_t last_colon = addr.rfind(":");
- if (first_colon == TString::npos || last_colon == TString::npos) {
- return "";
- } else {
- return addr.substr(first_colon + 1, last_colon - first_colon - 1);
- }
-}
-
-int EvaluateArgs::GetPeerPort() const {
- if (endpoint_ == nullptr) {
- return 0;
- }
- grpc_uri* uri = grpc_uri_parse(
- TString(grpc_endpoint_get_peer(endpoint_)).c_str(), true);
- grpc_resolved_address resolved_addr;
- if (uri == nullptr || !grpc_parse_uri(uri, &resolved_addr)) {
- grpc_uri_destroy(uri);
- return 0;
- }
- grpc_uri_destroy(uri);
- return grpc_sockaddr_get_port(&resolved_addr);
-}
-
-y_absl::string_view EvaluateArgs::GetSpiffeId() const {
- if (auth_context_ == nullptr) {
- return "";
- }
- grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name(
- auth_context_, GRPC_PEER_SPIFFE_ID_PROPERTY_NAME);
- const grpc_auth_property* prop = grpc_auth_property_iterator_next(&it);
- if (prop == nullptr || grpc_auth_property_iterator_next(&it) != nullptr) {
- return "";
- }
- return y_absl::string_view(prop->value, prop->value_length);
-}
-
-y_absl::string_view EvaluateArgs::GetCertServerName() const {
- if (auth_context_ == nullptr) {
- return "";
- }
- grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name(
- auth_context_, GRPC_X509_CN_PROPERTY_NAME);
- const grpc_auth_property* prop = grpc_auth_property_iterator_next(&it);
- if (prop == nullptr || grpc_auth_property_iterator_next(&it) != nullptr) {
- return "";
- }
- return y_absl::string_view(prop->value, prop->value_length);
-}
-
-} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.h b/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.h
index 1409cdc6c3c..1a2590c72b9 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/evaluate_args.h
@@ -23,6 +23,8 @@
#include <map>
+#include "y_absl/types/optional.h"
+
#include "src/core/lib/iomgr/endpoint.h"
#include "src/core/lib/security/context/security_context.h"
#include "src/core/lib/transport/metadata_batch.h"
@@ -39,6 +41,15 @@ class EvaluateArgs {
y_absl::string_view GetHost() const;
y_absl::string_view GetMethod() const;
std::multimap<y_absl::string_view, y_absl::string_view> GetHeaders() const;
+ // Returns metadata value(s) for the specified key.
+ // If the key is not present in the batch, returns y_absl::nullopt.
+ // If the key is present exactly once in the batch, returns a string_view of
+ // that value.
+ // If the key is present more than once in the batch, constructs a
+ // comma-concatenated string of all values in concatenated_value and returns a
+ // string_view of that string.
+ y_absl::optional<y_absl::string_view> GetHeaderValue(
+ y_absl::string_view key, TString* concatenated_value) const;
y_absl::string_view GetLocalAddress() const;
int GetLocalPort() const;
y_absl::string_view GetPeerAddress() const;
@@ -46,7 +57,7 @@ class EvaluateArgs {
y_absl::string_view GetSpiffeId() const;
y_absl::string_view GetCertServerName() const;
- // TODO: Add a getter function for source.principal
+ // TODO(unknown): Add a getter function for source.principal
private:
grpc_metadata_batch* metadata_;
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/activation.h b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/activation.h
index 34520c761db..05f00a5048f 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/activation.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/activation.h
@@ -48,7 +48,7 @@ class Activation : public BaseActivation {
Activation& operator=(const Activation&) = delete;
// Insert value into Activation.
- void InsertValue(y_absl::string_view name, const CelValue& value) {}
+ void InsertValue(y_absl::string_view /*name*/, const CelValue& /*value*/) {}
};
} // namespace mock_cel
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h
index 9bacaeede7f..630b0bc0d23 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h
@@ -19,6 +19,8 @@
#include <memory>
+#include "y_absl/memory/memory.h"
+
#include "src/core/lib/security/authorization/mock_cel/flat_expr_builder.h"
namespace grpc_core {
@@ -31,7 +33,7 @@ struct InterpreterOptions {
bool short_circuiting = true;
};
-std::unique_ptr<CelExpressionBuilder> CreateCelExpressionBuilder(
+inline std::unique_ptr<CelExpressionBuilder> CreateCelExpressionBuilder(
const InterpreterOptions& options) {
return y_absl::make_unique<FlatExprBuilder>();
}
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expression.h b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expression.h
index 4ee422e942b..f1ee0b7adb7 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expression.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_expression.h
@@ -20,10 +20,11 @@
#include <memory>
#include <vector>
+#include "y_absl/status/statusor.h"
+
#include "google/api/expr/v1alpha1/syntax.upb.h"
#include "src/core/lib/security/authorization/mock_cel/activation.h"
#include "src/core/lib/security/authorization/mock_cel/cel_value.h"
-#include "src/core/lib/security/authorization/mock_cel/statusor.h"
namespace grpc_core {
namespace mock_cel {
@@ -38,7 +39,7 @@ class CelExpression {
// Evaluates expression and returns value.
// activation contains bindings from parameter names to values
- virtual StatusOr<CelValue> Evaluate(
+ virtual y_absl::StatusOr<CelValue> Evaluate(
const BaseActivation& activation) const = 0;
};
@@ -52,11 +53,11 @@ class CelExpressionBuilder {
// Creates CelExpression object from AST tree.
// expr specifies root of AST tree
- virtual StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
+ virtual y_absl::StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
const google_api_expr_v1alpha1_Expr* expr,
const google_api_expr_v1alpha1_SourceInfo* source_info) const = 0;
- virtual StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
+ virtual y_absl::StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
const google_api_expr_v1alpha1_Expr* expr,
const google_api_expr_v1alpha1_SourceInfo* source_info,
std::vector<y_absl::Status>* warnings) const = 0;
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_value.h b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_value.h
index d06b1fcec4a..ccb4ffeab0b 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_value.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/cel_value.h
@@ -32,7 +32,11 @@
#include <grpc/support/port_platform.h>
+#include <memory>
+
+#include "y_absl/memory/memory.h"
#include "y_absl/strings/string_view.h"
+#include "y_absl/types/span.h"
namespace grpc_core {
namespace mock_cel {
@@ -57,23 +61,25 @@ class CelValue {
// We rely on copy elision to avoid extra copying.
static CelValue CreateNull() { return CelValue(nullptr); }
- static CelValue CreateInt64(int64_t value) { return CreateNull(); }
+ static CelValue CreateInt64(int64_t /*value*/) { return CreateNull(); }
- static CelValue CreateUint64(uint64_t value) { return CreateNull(); }
+ static CelValue CreateUint64(uint64_t /*value*/) { return CreateNull(); }
- static CelValue CreateStringView(y_absl::string_view value) {
+ static CelValue CreateStringView(y_absl::string_view /*value*/) {
return CreateNull();
}
- static CelValue CreateString(const TString* str) { return CreateNull(); }
+ static CelValue CreateString(const TString* /*str*/) {
+ return CreateNull();
+ }
- static CelValue CreateMap(const CelMap* value) { return CreateNull(); }
+ static CelValue CreateMap(const CelMap* /*value*/) { return CreateNull(); }
private:
// Constructs CelValue wrapping value supplied as argument.
// Value type T should be supported by specification of ValueHolder.
template <class T>
- explicit CelValue(T value) {}
+ explicit CelValue(T /*value*/) {}
};
// CelMap implementation that uses STL map container as backing storage.
@@ -82,7 +88,7 @@ class ContainerBackedMapImpl : public CelMap {
ContainerBackedMapImpl() = default;
static std::unique_ptr<CelMap> Create(
- y_absl::Span<std::pair<CelValue, CelValue>> key_values) {
+ y_absl::Span<std::pair<CelValue, CelValue>> /*key_values*/) {
return y_absl::make_unique<ContainerBackedMapImpl>();
}
};
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/evaluator_core.h b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/evaluator_core.h
index 8362e101751..0e01204b800 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/evaluator_core.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/evaluator_core.h
@@ -21,11 +21,12 @@
#include <set>
#include <vector>
+#include "y_absl/status/statusor.h"
+
#include "google/api/expr/v1alpha1/syntax.upb.h"
#include "src/core/lib/security/authorization/mock_cel/activation.h"
#include "src/core/lib/security/authorization/mock_cel/cel_expression.h"
#include "src/core/lib/security/authorization/mock_cel/cel_value.h"
-#include "src/core/lib/security/authorization/mock_cel/statusor.h"
namespace grpc_core {
namespace mock_cel {
@@ -33,13 +34,11 @@ namespace mock_cel {
// This is a temporary stub implementation of CEL APIs.
// Once gRPC imports the CEL library, this file will be removed.
-class ExpressionStep {
+class ExecutionPath {
public:
- virtual ~ExpressionStep() = default;
+ ExecutionPath() = default;
};
-using ExecutionPath = std::vector<std::unique_ptr<const ExpressionStep>>;
-
// Implementation of the CelExpression that utilizes flattening
// of the expression tree.
class CelExpressionFlatImpl : public CelExpression {
@@ -56,7 +55,8 @@ class CelExpressionFlatImpl : public CelExpression {
bool enable_unknown_function_results = false) {}
// Implementation of CelExpression evaluate method.
- StatusOr<CelValue> Evaluate(const BaseActivation& activation) const override {
+ y_absl::StatusOr<CelValue> Evaluate(
+ const BaseActivation& activation) const override {
return CelValue::CreateNull();
}
};
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h
index c7347041867..c4f4568fd05 100644
--- a/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h
@@ -33,20 +33,21 @@ class FlatExprBuilder : public CelExpressionBuilder {
public:
FlatExprBuilder() = default;
- cel_base::StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
- const google::api::expr::v1alpha1::Expr* expr,
- const google::api::expr::v1alpha1::SourceInfo* source_info)
- const override {
+ y_absl::StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
+ const google_api_expr_v1alpha1_Expr* expr,
+ const google_api_expr_v1alpha1_SourceInfo* source_info) const override {
ExecutionPath path;
- return y_absl::make_unique<CelExpressionFlatImpl>(nullptr, path, 0);
+ return y_absl::make_unique<CelExpressionFlatImpl>(nullptr, path, 0,
+ std::set<TString>{});
}
- cel_base::StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
- const google::api::expr::v1alpha1::Expr* expr,
- const google::api::expr::v1alpha1::SourceInfo* source_info,
+ y_absl::StatusOr<std::unique_ptr<CelExpression>> CreateExpression(
+ const google_api_expr_v1alpha1_Expr* expr,
+ const google_api_expr_v1alpha1_SourceInfo* source_info,
std::vector<y_absl::Status>* warnings) const override {
ExecutionPath path;
- return y_absl::make_unique<CelExpressionFlatImpl>(nullptr, path, 0);
+ return y_absl::make_unique<CelExpressionFlatImpl>(nullptr, path, 0,
+ std::set<TString>{});
}
};
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/rbac_policy.h b/contrib/libs/grpc/src/core/lib/security/authorization/rbac_policy.h
new file mode 100644
index 00000000000..486cf74604c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/rbac_policy.h
@@ -0,0 +1,163 @@
+// Copyright 2021 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_LIB_SECURITY_AUTHORIZATION_RBAC_POLICY_H
+#define GRPC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_POLICY_H
+
+#include <grpc/support/port_platform.h>
+
+#include <memory>
+
+#include "src/core/lib/matchers/matchers.h"
+
+namespace grpc_core {
+
+// Represents Envoy RBAC Proto. [See
+// https://github.com/envoyproxy/envoy/blob/release/v1.17/api/envoy/config/rbac/v3/rbac.proto]
+struct Rbac {
+ enum class Action {
+ ALLOW,
+ DENY,
+ };
+
+ struct CidrRange {
+ CidrRange() = default;
+ CidrRange(TString address_prefix, uint32_t prefix_len);
+
+ CidrRange(CidrRange&& other) noexcept;
+ CidrRange& operator=(CidrRange&& other) noexcept;
+
+ TString ToString() const;
+
+ TString address_prefix;
+ uint32_t prefix_len;
+ };
+
+ // TODO(ashithasantosh): Add metadata field to Permission and Principal.
+ struct Permission {
+ enum class RuleType {
+ AND,
+ OR,
+ ANY,
+ HEADER,
+ PATH,
+ DEST_IP,
+ DEST_PORT,
+ REQ_SERVER_NAME,
+ };
+
+ Permission() = default;
+ // For AND/OR RuleType.
+ Permission(Permission::RuleType type,
+ std::vector<std::unique_ptr<Permission>> permissions,
+ bool not_rule = false);
+ // For ANY RuleType.
+ explicit Permission(Permission::RuleType type, bool not_rule = false);
+ // For HEADER RuleType.
+ Permission(Permission::RuleType type, HeaderMatcher header_matcher,
+ bool not_rule = false);
+ // For PATH/REQ_SERVER_NAME RuleType.
+ Permission(Permission::RuleType type, StringMatcher string_matcher,
+ bool not_rule = false);
+ // For DEST_IP RuleType.
+ Permission(Permission::RuleType type, CidrRange ip, bool not_rule = false);
+ // For DEST_PORT RuleType.
+ Permission(Permission::RuleType type, int port, bool not_rule = false);
+
+ Permission(Permission&& other) noexcept;
+ Permission& operator=(Permission&& other) noexcept;
+
+ TString ToString() const;
+
+ RuleType type;
+ HeaderMatcher header_matcher;
+ StringMatcher string_matcher;
+ CidrRange ip;
+ int port;
+ // For type AND/OR.
+ std::vector<std::unique_ptr<Permission>> permissions;
+ bool not_rule = false;
+ };
+
+ struct Principal {
+ enum class RuleType {
+ AND,
+ OR,
+ ANY,
+ PRINCIPAL_NAME,
+ SOURCE_IP,
+ DIRECT_REMOTE_IP,
+ REMOTE_IP,
+ HEADER,
+ PATH,
+ };
+
+ Principal() = default;
+ // For AND/OR RuleType.
+ Principal(Principal::RuleType type,
+ std::vector<std::unique_ptr<Principal>> principals,
+ bool not_rule = false);
+ // For ANY RuleType.
+ explicit Principal(Principal::RuleType type, bool not_rule = false);
+ // For PRINCIPAL_NAME/PATH RuleType.
+ Principal(Principal::RuleType type, StringMatcher string_matcher,
+ bool not_rule = false);
+ // For SOURCE_IP/DIRECT_REMOTE_IP/REMOTE_IP RuleType.
+ Principal(Principal::RuleType type, CidrRange ip, bool not_rule = false);
+ // For HEADER RuleType.
+ Principal(Principal::RuleType type, HeaderMatcher header_matcher,
+ bool not_rule = false);
+
+ Principal(Principal&& other) noexcept;
+ Principal& operator=(Principal&& other) noexcept;
+
+ TString ToString() const;
+
+ RuleType type;
+ HeaderMatcher header_matcher;
+ StringMatcher string_matcher;
+ CidrRange ip;
+ // For type AND/OR.
+ std::vector<std::unique_ptr<Principal>> principals;
+ bool not_rule = false;
+ };
+
+ struct Policy {
+ Policy() = default;
+ Policy(Permission permissions, Principal principals);
+
+ Policy(Policy&& other) noexcept;
+ Policy& operator=(Policy&& other) noexcept;
+
+ TString ToString() const;
+
+ Permission permissions;
+ Principal principals;
+ };
+
+ Rbac() = default;
+ Rbac(Rbac::Action action, std::map<TString, Policy> policies);
+
+ Rbac(Rbac&& other) noexcept;
+ Rbac& operator=(Rbac&& other) noexcept;
+
+ TString ToString() const;
+
+ Action action;
+ std::map<TString, Policy> policies;
+};
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_POLICY_H */
diff --git a/contrib/libs/grpc/src/core/lib/security/authorization/rbac_translator.h b/contrib/libs/grpc/src/core/lib/security/authorization/rbac_translator.h
new file mode 100644
index 00000000000..7e436df4e49
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/authorization/rbac_translator.h
@@ -0,0 +1,39 @@
+// Copyright 2021 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_LIB_SECURITY_AUTHORIZATION_RBAC_TRANSLATOR_H
+#define GRPC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_TRANSLATOR_H
+
+#include <grpc/support/port_platform.h>
+
+#include "y_absl/status/statusor.h"
+#include "src/core/lib/json/json.h"
+#include "src/core/lib/security/authorization/rbac_policy.h"
+
+namespace grpc_core {
+
+struct RbacPolicies {
+ Rbac deny_policy;
+ Rbac allow_policy;
+};
+
+// Translates SDK authorization policy to Envoy RBAC policies. Returns error on
+// failure.
+// authz_policy: Authorization Policy string in JSON format.
+y_absl::StatusOr<RbacPolicies> GenerateRbacPolicies(
+ y_absl::string_view authz_policy);
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_LIB_SECURITY_AUTHORIZATION_RBAC_TRANSLATOR_H */
diff --git a/contrib/libs/grpc/src/core/lib/security/certificate_provider.h b/contrib/libs/grpc/src/core/lib/security/certificate_provider.h
deleted file mode 100644
index 5a9cfee0b94..00000000000
--- a/contrib/libs/grpc/src/core/lib/security/certificate_provider.h
+++ /dev/null
@@ -1,60 +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.
-//
-//
-
-#ifndef GRPC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_H
-#define GRPC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_H
-
-#include <grpc/support/port_platform.h>
-
-#include "src/core/lib/gprpp/ref_counted.h"
-#include "src/core/lib/gprpp/ref_counted_ptr.h"
-#include "src/core/lib/iomgr/pollset_set.h"
-
-// TODO(yashkt): After https://github.com/grpc/grpc/pull/23572, remove this
-// forward declaration and include the header for the distributor instead.
-struct grpc_tls_certificate_distributor;
-
-// Interface for a grpc_tls_certificate_provider that handles the process to
-// fetch credentials and validation contexts. Implementations are free to rely
-// on local or remote sources to fetch the latest secrets, and free to share any
-// state among different instances as they deem fit.
-//
-// On creation, grpc_tls_certificate_provider creates a
-// grpc_tls_certificate_distributor object. When the credentials and validation
-// contexts become valid or changed, a grpc_tls_certificate_provider should
-// notify its distributor so as to propagate the update to the watchers.
-struct grpc_tls_certificate_provider
- : public grpc_core::RefCounted<grpc_tls_certificate_provider> {
- public:
- grpc_tls_certificate_provider()
- : interested_parties_(grpc_pollset_set_create()) {}
-
- virtual ~grpc_tls_certificate_provider() {
- grpc_pollset_set_destroy(interested_parties_);
- }
-
- grpc_pollset_set* interested_parties() const { return interested_parties_; }
-
- virtual grpc_core::RefCountedPtr<grpc_tls_certificate_distributor>
- distributor() const = 0;
-
- private:
- grpc_pollset_set* interested_parties_;
-};
-
-#endif // GRPC_CORE_LIB_SECURITY_CERTIFICATE_PROVIDER_H
diff --git a/contrib/libs/grpc/src/core/lib/security/context/security_context.cc b/contrib/libs/grpc/src/core/lib/security/context/security_context.cc
index ef60165899d..d760d82f226 100644
--- a/contrib/libs/grpc/src/core/lib/security/context/security_context.cc
+++ b/contrib/libs/grpc/src/core/lib/security/context/security_context.cc
@@ -294,9 +294,10 @@ static const grpc_arg_pointer_vtable auth_context_pointer_vtable = {
auth_context_pointer_arg_copy, auth_context_pointer_arg_destroy,
auth_context_pointer_cmp};
-grpc_arg grpc_auth_context_to_arg(grpc_auth_context* p) {
- return grpc_channel_arg_pointer_create((char*)GRPC_AUTH_CONTEXT_ARG, p,
- &auth_context_pointer_vtable);
+grpc_arg grpc_auth_context_to_arg(grpc_auth_context* c) {
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_AUTH_CONTEXT_ARG), c,
+ &auth_context_pointer_vtable);
}
grpc_auth_context* grpc_auth_context_from_arg(const grpc_arg* arg) {
diff --git a/contrib/libs/grpc/src/core/lib/security/context/security_context.h b/contrib/libs/grpc/src/core/lib/security/context/security_context.h
index b1991089ae5..6ff4856e6bd 100644
--- a/contrib/libs/grpc/src/core/lib/security/context/security_context.h
+++ b/contrib/libs/grpc/src/core/lib/security/context/security_context.h
@@ -54,7 +54,9 @@ struct grpc_auth_context
grpc_core::RefCountedPtr<grpc_auth_context> chained)
: grpc_core::RefCounted<grpc_auth_context,
grpc_core::NonPolymorphicRefCount>(
- &grpc_trace_auth_context_refcount),
+ GRPC_TRACE_FLAG_ENABLED(grpc_trace_auth_context_refcount)
+ ? "auth_context_refcount"
+ : nullptr),
chained_(std::move(chained)) {
if (chained_ != nullptr) {
peer_identity_property_name_ = chained_->peer_identity_property_name_;
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc
index 1bc76d9c0c6..30acd74948b 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.cc
@@ -70,7 +70,8 @@ grpc_alts_server_credentials::grpc_alts_server_credentials(
}
grpc_core::RefCountedPtr<grpc_server_security_connector>
-grpc_alts_server_credentials::create_security_connector() {
+grpc_alts_server_credentials::create_security_connector(
+ const grpc_channel_args* /* args */) {
return grpc_alts_server_security_connector_create(this->Ref());
}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.h
index cc6d5222b16..8e1362c0b61 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/alts/alts_credentials.h
@@ -56,7 +56,7 @@ class grpc_alts_server_credentials final : public grpc_server_credentials {
~grpc_alts_server_credentials() override;
grpc_core::RefCountedPtr<grpc_server_security_connector>
- create_security_connector() override;
+ create_security_connector(const grpc_channel_args* /* args */) override;
const grpc_alts_credentials_options* options() const { return options_; }
grpc_alts_credentials_options* mutable_options() { return options_; }
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/alts/check_gcp_environment.cc b/contrib/libs/grpc/src/core/lib/security/credentials/alts/check_gcp_environment.cc
index 9c98d7a5f4f..f3370a3c720 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/alts/check_gcp_environment.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/alts/check_gcp_environment.cc
@@ -57,7 +57,7 @@ namespace internal {
char* read_bios_file(const char* bios_file) {
FILE* fp = fopen(bios_file, "r");
if (!fp) {
- gpr_log(GPR_ERROR, "BIOS data file cannot be opened.");
+ gpr_log(GPR_INFO, "BIOS data file does not exist or cannot be opened.");
return nullptr;
}
char buf[kBiosDataBufferSize + 1];
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/credentials.cc
index 90452d68d61..d2f4c9c6bb5 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/credentials.cc
@@ -67,14 +67,14 @@ static const grpc_arg_pointer_vtable credentials_pointer_vtable = {
grpc_arg grpc_channel_credentials_to_arg(
grpc_channel_credentials* credentials) {
- return grpc_channel_arg_pointer_create((char*)GRPC_ARG_CHANNEL_CREDENTIALS,
- credentials,
- &credentials_pointer_vtable);
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_CHANNEL_CREDENTIALS), credentials,
+ &credentials_pointer_vtable);
}
grpc_channel_credentials* grpc_channel_credentials_from_arg(
const grpc_arg* arg) {
- if (strcmp(arg->key, GRPC_ARG_CHANNEL_CREDENTIALS)) return nullptr;
+ if (strcmp(arg->key, GRPC_ARG_CHANNEL_CREDENTIALS) != 0) return nullptr;
if (arg->type != GRPC_ARG_POINTER) {
gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type,
GRPC_ARG_CHANNEL_CREDENTIALS);
@@ -134,9 +134,9 @@ static const grpc_arg_pointer_vtable cred_ptr_vtable = {
server_credentials_pointer_arg_copy, server_credentials_pointer_arg_destroy,
server_credentials_pointer_cmp};
-grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials* p) {
- return grpc_channel_arg_pointer_create((char*)GRPC_SERVER_CREDENTIALS_ARG, p,
- &cred_ptr_vtable);
+grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials* c) {
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_SERVER_CREDENTIALS_ARG), c, &cred_ptr_vtable);
}
grpc_server_credentials* grpc_server_credentials_from_arg(const grpc_arg* arg) {
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/credentials.h
index 15a85cbd0be..f0e5055a589 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/credentials.h
@@ -102,7 +102,7 @@ struct grpc_channel_credentials
: grpc_core::RefCounted<grpc_channel_credentials> {
public:
explicit grpc_channel_credentials(const char* type) : type_(type) {}
- virtual ~grpc_channel_credentials() = default;
+ ~grpc_channel_credentials() override = default;
// Creates a security connector for the channel. May also create new channel
// args for the channel to be used in place of the passed in const args if
@@ -177,7 +177,7 @@ struct grpc_call_credentials
grpc_security_level min_security_level = GRPC_PRIVACY_AND_INTEGRITY)
: type_(type), min_security_level_(min_security_level) {}
- virtual ~grpc_call_credentials() = default;
+ ~grpc_call_credentials() override = default;
// Returns true if completed synchronously, in which case \a error will
// be set to indicate the result. Otherwise, \a on_request_metadata will
@@ -225,10 +225,11 @@ struct grpc_server_credentials
public:
explicit grpc_server_credentials(const char* type) : type_(type) {}
- virtual ~grpc_server_credentials() { DestroyProcessor(); }
+ ~grpc_server_credentials() override { DestroyProcessor(); }
+ // Ownership of \a args is not passed.
virtual grpc_core::RefCountedPtr<grpc_server_security_connector>
- create_security_connector() = 0;
+ create_security_connector(const grpc_channel_args* args) = 0;
const char* type() const { return type_; }
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.cc
new file mode 100644
index 00000000000..5aef6606956
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.cc
@@ -0,0 +1,413 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/aws_external_account_credentials.h"
+
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_join.h"
+#include "y_absl/strings/str_replace.h"
+
+#include "src/core/lib/gpr/env.h"
+
+namespace grpc_core {
+
+namespace {
+
+const char* kExpectedEnvironmentId = "aws1";
+
+const char* kRegionEnvVar = "AWS_REGION";
+const char* kAccessKeyIdEnvVar = "AWS_ACCESS_KEY_ID";
+const char* kSecretAccessKeyEnvVar = "AWS_SECRET_ACCESS_KEY";
+const char* kSessionTokenEnvVar = "AWS_SESSION_TOKEN";
+
+TString UrlEncode(const y_absl::string_view& s) {
+ const char* hex = "0123456789ABCDEF";
+ TString result;
+ result.reserve(s.length());
+ for (auto c : s) {
+ if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') ||
+ (c >= 'a' && c <= 'z') || c == '-' || c == '_' || c == '!' ||
+ c == '\'' || c == '(' || c == ')' || c == '*' || c == '~' || c == '.') {
+ result.push_back(c);
+ } else {
+ result.push_back('%');
+ result.push_back(hex[static_cast<unsigned char>(c) >> 4]);
+ result.push_back(hex[static_cast<unsigned char>(c) & 15]);
+ }
+ }
+ return result;
+}
+
+} // namespace
+
+RefCountedPtr<AwsExternalAccountCredentials>
+AwsExternalAccountCredentials::Create(Options options,
+ std::vector<TString> scopes,
+ grpc_error** error) {
+ auto creds = MakeRefCounted<AwsExternalAccountCredentials>(
+ std::move(options), std::move(scopes), error);
+ if (*error == GRPC_ERROR_NONE) {
+ return creds;
+ } else {
+ return nullptr;
+ }
+}
+
+AwsExternalAccountCredentials::AwsExternalAccountCredentials(
+ Options options, std::vector<TString> scopes, grpc_error** error)
+ : ExternalAccountCredentials(options, std::move(scopes)) {
+ audience_ = options.audience;
+ auto it = options.credential_source.object_value().find("environment_id");
+ if (it == options.credential_source.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "environment_id field not present.");
+ return;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "environment_id field must be a string.");
+ return;
+ }
+ if (it->second.string_value() != kExpectedEnvironmentId) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("environment_id does not match.");
+ return;
+ }
+ it = options.credential_source.object_value().find("region_url");
+ if (it == options.credential_source.object_value().end()) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("region_url field not present.");
+ return;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "region_url field must be a string.");
+ return;
+ }
+ region_url_ = it->second.string_value();
+ it = options.credential_source.object_value().find("url");
+ if (it != options.credential_source.object_value().end() &&
+ it->second.type() == Json::Type::STRING) {
+ url_ = it->second.string_value();
+ }
+ it = options.credential_source.object_value().find(
+ "regional_cred_verification_url");
+ if (it == options.credential_source.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "regional_cred_verification_url field not present.");
+ return;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "regional_cred_verification_url field must be a string.");
+ return;
+ }
+ regional_cred_verification_url_ = it->second.string_value();
+}
+
+void AwsExternalAccountCredentials::RetrieveSubjectToken(
+ HTTPRequestContext* ctx, const Options& /*options*/,
+ std::function<void(TString, grpc_error*)> cb) {
+ if (ctx == nullptr) {
+ FinishRetrieveSubjectToken(
+ "",
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Missing HTTPRequestContext to start subject token retrieval."));
+ return;
+ }
+ ctx_ = ctx;
+ cb_ = cb;
+ if (signer_ != nullptr) {
+ BuildSubjectToken();
+ } else {
+ RetrieveRegion();
+ }
+}
+
+void AwsExternalAccountCredentials::RetrieveRegion() {
+ UniquePtr<char> region_from_env(gpr_getenv(kRegionEnvVar));
+ if (region_from_env != nullptr) {
+ region_ = TString(region_from_env.get());
+ if (url_.empty()) {
+ RetrieveSigningKeys();
+ } else {
+ RetrieveRoleName();
+ }
+ return;
+ }
+ y_absl::StatusOr<URI> uri = URI::Parse(region_url_);
+ if (!uri.ok()) {
+ FinishRetrieveSubjectToken("", GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Invalid region url. %s",
+ uri.status().ToString())
+ .c_str()));
+ return;
+ }
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ request.host = const_cast<char*>(uri->authority().c_str());
+ request.http.path = gpr_strdup(uri->path().c_str());
+ request.handshaker =
+ uri->scheme() == "https" ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("external_account_credentials");
+ grpc_http_response_destroy(&ctx_->response);
+ ctx_->response = {};
+ GRPC_CLOSURE_INIT(&ctx_->closure, OnRetrieveRegion, this, nullptr);
+ grpc_httpcli_get(ctx_->httpcli_context, ctx_->pollent, resource_quota,
+ &request, ctx_->deadline, &ctx_->closure, &ctx_->response);
+ grpc_resource_quota_unref_internal(resource_quota);
+ grpc_http_request_destroy(&request.http);
+}
+
+void AwsExternalAccountCredentials::OnRetrieveRegion(void* arg,
+ grpc_error* error) {
+ AwsExternalAccountCredentials* self =
+ static_cast<AwsExternalAccountCredentials*>(arg);
+ self->OnRetrieveRegionInternal(GRPC_ERROR_REF(error));
+}
+
+void AwsExternalAccountCredentials::OnRetrieveRegionInternal(
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishRetrieveSubjectToken("", error);
+ return;
+ }
+ // Remove the last letter of availability zone to get pure region
+ y_absl::string_view response_body(ctx_->response.body,
+ ctx_->response.body_length);
+ region_ = TString(response_body.substr(0, response_body.size() - 1));
+ if (url_.empty()) {
+ RetrieveSigningKeys();
+ } else {
+ RetrieveRoleName();
+ }
+}
+
+void AwsExternalAccountCredentials::RetrieveRoleName() {
+ y_absl::StatusOr<URI> uri = URI::Parse(url_);
+ if (!uri.ok()) {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Invalid url: %s.", uri.status().ToString())
+ .c_str()));
+ return;
+ }
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ request.host = const_cast<char*>(uri->authority().c_str());
+ request.http.path = gpr_strdup(uri->path().c_str());
+ request.handshaker =
+ uri->scheme() == "https" ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("external_account_credentials");
+ grpc_http_response_destroy(&ctx_->response);
+ ctx_->response = {};
+ GRPC_CLOSURE_INIT(&ctx_->closure, OnRetrieveRoleName, this, nullptr);
+ grpc_httpcli_get(ctx_->httpcli_context, ctx_->pollent, resource_quota,
+ &request, ctx_->deadline, &ctx_->closure, &ctx_->response);
+ grpc_resource_quota_unref_internal(resource_quota);
+ grpc_http_request_destroy(&request.http);
+}
+
+void AwsExternalAccountCredentials::OnRetrieveRoleName(void* arg,
+ grpc_error* error) {
+ AwsExternalAccountCredentials* self =
+ static_cast<AwsExternalAccountCredentials*>(arg);
+ self->OnRetrieveRoleNameInternal(GRPC_ERROR_REF(error));
+}
+
+void AwsExternalAccountCredentials::OnRetrieveRoleNameInternal(
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishRetrieveSubjectToken("", error);
+ return;
+ }
+ role_name_ = TString(ctx_->response.body, ctx_->response.body_length);
+ RetrieveSigningKeys();
+}
+
+void AwsExternalAccountCredentials::RetrieveSigningKeys() {
+ UniquePtr<char> access_key_id_from_env(gpr_getenv(kAccessKeyIdEnvVar));
+ UniquePtr<char> secret_access_key_from_env(
+ gpr_getenv(kSecretAccessKeyEnvVar));
+ UniquePtr<char> token_from_env(gpr_getenv(kSessionTokenEnvVar));
+ if (access_key_id_from_env != nullptr &&
+ secret_access_key_from_env != nullptr && token_from_env != nullptr) {
+ access_key_id_ = TString(access_key_id_from_env.get());
+ secret_access_key_ = TString(secret_access_key_from_env.get());
+ token_ = TString(token_from_env.get());
+ BuildSubjectToken();
+ return;
+ }
+ if (role_name_.empty()) {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Missing role name when retrieving signing keys."));
+ return;
+ }
+ TString url_with_role_name = y_absl::StrCat(url_, "/", role_name_);
+ y_absl::StatusOr<URI> uri = URI::Parse(url_with_role_name);
+ if (!uri.ok()) {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Invalid url with role name: %s.",
+ uri.status().ToString())
+ .c_str()));
+ return;
+ }
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ request.host = const_cast<char*>(uri->authority().c_str());
+ request.http.path = gpr_strdup(uri->path().c_str());
+ request.handshaker =
+ uri->scheme() == "https" ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("external_account_credentials");
+ grpc_http_response_destroy(&ctx_->response);
+ ctx_->response = {};
+ GRPC_CLOSURE_INIT(&ctx_->closure, OnRetrieveSigningKeys, this, nullptr);
+ grpc_httpcli_get(ctx_->httpcli_context, ctx_->pollent, resource_quota,
+ &request, ctx_->deadline, &ctx_->closure, &ctx_->response);
+ grpc_resource_quota_unref_internal(resource_quota);
+ grpc_http_request_destroy(&request.http);
+}
+
+void AwsExternalAccountCredentials::OnRetrieveSigningKeys(void* arg,
+ grpc_error* error) {
+ AwsExternalAccountCredentials* self =
+ static_cast<AwsExternalAccountCredentials*>(arg);
+ self->OnRetrieveSigningKeysInternal(GRPC_ERROR_REF(error));
+}
+
+void AwsExternalAccountCredentials::OnRetrieveSigningKeysInternal(
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishRetrieveSubjectToken("", error);
+ return;
+ }
+ y_absl::string_view response_body(ctx_->response.body,
+ ctx_->response.body_length);
+ Json json = Json::Parse(response_body, &error);
+ if (error != GRPC_ERROR_NONE || json.type() != Json::Type::OBJECT) {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Invalid retrieve signing keys response.", &error, 1));
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ auto it = json.object_value().find("AccessKeyId");
+ if (it != json.object_value().end() &&
+ it->second.type() == Json::Type::STRING) {
+ access_key_id_ = it->second.string_value();
+ } else {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Missing or invalid AccessKeyId in %s.",
+ response_body)
+ .c_str()));
+ return;
+ }
+ it = json.object_value().find("SecretAccessKey");
+ if (it != json.object_value().end() &&
+ it->second.type() == Json::Type::STRING) {
+ secret_access_key_ = it->second.string_value();
+ } else {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Missing or invalid SecretAccessKey in %s.",
+ response_body)
+ .c_str()));
+ return;
+ }
+ it = json.object_value().find("Token");
+ if (it != json.object_value().end() &&
+ it->second.type() == Json::Type::STRING) {
+ token_ = it->second.string_value();
+ } else {
+ FinishRetrieveSubjectToken(
+ "",
+ GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Missing or invalid Token in %s.", response_body)
+ .c_str()));
+ return;
+ }
+ BuildSubjectToken();
+}
+
+void AwsExternalAccountCredentials::BuildSubjectToken() {
+ grpc_error* error = GRPC_ERROR_NONE;
+ if (signer_ == nullptr) {
+ cred_verification_url_ = y_absl::StrReplaceAll(
+ regional_cred_verification_url_, {{"{region}", region_}});
+ signer_ = y_absl::make_unique<AwsRequestSigner>(
+ access_key_id_, secret_access_key_, token_, "POST",
+ cred_verification_url_, region_, "",
+ std::map<TString, TString>(), &error);
+ if (error != GRPC_ERROR_NONE) {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Creating aws request signer failed.", &error, 1));
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ }
+ auto signed_headers = signer_->GetSignedRequestHeaders();
+ if (error != GRPC_ERROR_NONE) {
+ FinishRetrieveSubjectToken("",
+ GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Invalid getting signed request"
+ "headers.",
+ &error, 1));
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ // Construct subject token
+ Json::Array headers;
+ headers.push_back(Json(
+ {{"key", "Authorization"}, {"value", signed_headers["Authorization"]}}));
+ headers.push_back(Json({{"key", "host"}, {"value", signed_headers["host"]}}));
+ headers.push_back(
+ Json({{"key", "x-amz-date"}, {"value", signed_headers["x-amz-date"]}}));
+ headers.push_back(Json({{"key", "x-amz-security-token"},
+ {"value", signed_headers["x-amz-security-token"]}}));
+ headers.push_back(
+ Json({{"key", "x-goog-cloud-target-resource"}, {"value", audience_}}));
+ Json::Object object{{"url", Json(cred_verification_url_)},
+ {"method", Json("POST")},
+ {"headers", Json(headers)}};
+ Json subject_token_json(object);
+ TString subject_token = UrlEncode(subject_token_json.Dump());
+ FinishRetrieveSubjectToken(subject_token, GRPC_ERROR_NONE);
+}
+
+void AwsExternalAccountCredentials::FinishRetrieveSubjectToken(
+ TString subject_token, grpc_error* error) {
+ // Reset context
+ ctx_ = nullptr;
+ // Move object state into local variables.
+ auto cb = cb_;
+ cb_ = nullptr;
+ // Invoke the callback.
+ if (error != GRPC_ERROR_NONE) {
+ cb("", error);
+ } else {
+ cb(subject_token, GRPC_ERROR_NONE);
+ }
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.h
new file mode 100644
index 00000000000..c1efb7eb18c
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_external_account_credentials.h
@@ -0,0 +1,80 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/external_account_credentials.h"
+
+#include "src/core/lib/security/credentials/external/aws_request_signer.h"
+
+namespace grpc_core {
+
+class AwsExternalAccountCredentials final : public ExternalAccountCredentials {
+ public:
+ static RefCountedPtr<AwsExternalAccountCredentials> Create(
+ Options options, std::vector<TString> scopes, grpc_error** error);
+
+ AwsExternalAccountCredentials(Options options,
+ std::vector<TString> scopes,
+ grpc_error** error);
+
+ private:
+ void RetrieveSubjectToken(
+ HTTPRequestContext* ctx, const Options& options,
+ std::function<void(TString, grpc_error*)> cb) override;
+
+ void RetrieveRegion();
+ static void OnRetrieveRegion(void* arg, grpc_error* error);
+ void OnRetrieveRegionInternal(grpc_error* error);
+
+ void RetrieveRoleName();
+ static void OnRetrieveRoleName(void* arg, grpc_error* error);
+ void OnRetrieveRoleNameInternal(grpc_error* error);
+
+ void RetrieveSigningKeys();
+ static void OnRetrieveSigningKeys(void* arg, grpc_error* error);
+ void OnRetrieveSigningKeysInternal(grpc_error* error);
+
+ void BuildSubjectToken();
+ void FinishRetrieveSubjectToken(TString subject_token, grpc_error* error);
+
+ TString audience_;
+
+ // Fields of credential source
+ TString region_url_;
+ TString url_;
+ TString regional_cred_verification_url_;
+
+ // Information required by request signer
+ TString region_;
+ TString role_name_;
+ TString access_key_id_;
+ TString secret_access_key_;
+ TString token_;
+
+ std::unique_ptr<AwsRequestSigner> signer_;
+ TString cred_verification_url_;
+
+ HTTPRequestContext* ctx_ = nullptr;
+ std::function<void(TString, grpc_error*)> cb_ = nullptr;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_EXTERNAL_ACCOUNT_CREDENTIALS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.cc b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.cc
new file mode 100644
index 00000000000..38bf3014d52
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.cc
@@ -0,0 +1,213 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/aws_request_signer.h"
+
+#include "y_absl/strings/ascii.h"
+#include "y_absl/strings/escaping.h"
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_join.h"
+#include "y_absl/strings/str_split.h"
+#include "y_absl/time/clock.h"
+#include "y_absl/time/time.h"
+
+#include <openssl/hmac.h>
+#include <openssl/sha.h>
+
+namespace grpc_core {
+
+namespace {
+
+const char kAlgorithm[] = "AWS4-HMAC-SHA256";
+const char kDateFormat[] = "%a, %d %b %E4Y %H:%M:%S %Z";
+const char kXAmzDateFormat[] = "%Y%m%dT%H%M%SZ";
+
+void SHA256(const TString& str, unsigned char out[SHA256_DIGEST_LENGTH]) {
+ SHA256_CTX sha256;
+ SHA256_Init(&sha256);
+ SHA256_Update(&sha256, str.c_str(), str.size());
+ SHA256_Final(out, &sha256);
+}
+
+TString SHA256Hex(const TString& str) {
+ unsigned char hash[SHA256_DIGEST_LENGTH];
+ SHA256(str, hash);
+ TString hash_str(reinterpret_cast<char const*>(hash),
+ SHA256_DIGEST_LENGTH);
+ return y_absl::BytesToHexString(hash_str);
+}
+
+TString HMAC(const TString& key, const TString& msg) {
+ unsigned int len;
+ unsigned char digest[EVP_MAX_MD_SIZE];
+ HMAC(EVP_sha256(), key.c_str(), key.length(),
+ reinterpret_cast<const unsigned char*>(msg.c_str()), msg.length(),
+ digest, &len);
+ return TString(reinterpret_cast<const char*>(digest), reinterpret_cast<const char*>(digest + len));
+}
+
+} // namespace
+
+AwsRequestSigner::AwsRequestSigner(
+ TString access_key_id, TString secret_access_key, TString token,
+ TString method, TString url, TString region,
+ TString request_payload,
+ std::map<TString, TString> additional_headers, grpc_error** error)
+ : access_key_id_(std::move(access_key_id)),
+ secret_access_key_(std::move(secret_access_key)),
+ token_(std::move(token)),
+ method_(std::move(method)),
+ region_(std::move(region)),
+ request_payload_(std::move(request_payload)),
+ additional_headers_(std::move(additional_headers)) {
+ auto amz_date_it = additional_headers_.find("x-amz-date");
+ auto date_it = additional_headers_.find("date");
+ if (amz_date_it != additional_headers_.end() &&
+ date_it != additional_headers_.end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Only one of {date, x-amz-date} can be specified, not both.");
+ return;
+ }
+ if (amz_date_it != additional_headers_.end()) {
+ static_request_date_ = amz_date_it->second;
+ } else if (date_it != additional_headers_.end()) {
+ y_absl::Time request_date;
+ TString err_str;
+ if (!y_absl::ParseTime(kDateFormat, date_it->second, &request_date,
+ &err_str)) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(err_str.c_str());
+ return;
+ }
+ static_request_date_ =
+ y_absl::FormatTime(kXAmzDateFormat, request_date, y_absl::UTCTimeZone());
+ }
+ y_absl::StatusOr<URI> tmp_url = URI::Parse(url);
+ if (!tmp_url.ok()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid Aws request url.");
+ return;
+ }
+ url_ = tmp_url.value();
+}
+
+std::map<TString, TString> AwsRequestSigner::GetSignedRequestHeaders() {
+ TString request_date_full;
+ if (!static_request_date_.empty()) {
+ if (!request_headers_.empty()) {
+ return request_headers_;
+ }
+ request_date_full = static_request_date_;
+ } else {
+ y_absl::Time request_date = y_absl::Now();
+ request_date_full =
+ y_absl::FormatTime(kXAmzDateFormat, request_date, y_absl::UTCTimeZone());
+ }
+ TString request_date_short = request_date_full.substr(0, 8);
+ // TASK 1: Create a canonical request for Signature Version 4
+ // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html
+ std::vector<y_absl::string_view> canonical_request_vector;
+ // 1. HTTPRequestMethod
+ canonical_request_vector.emplace_back(method_);
+ canonical_request_vector.emplace_back("\n");
+ // 2. CanonicalURI
+ canonical_request_vector.emplace_back(
+ url_.path().empty() ? "/" : y_absl::string_view(url_.path()));
+ canonical_request_vector.emplace_back("\n");
+ // 3. CanonicalQueryString
+ std::vector<TString> query_vector;
+ for (const URI::QueryParam& query_kv : url_.query_parameter_pairs()) {
+ query_vector.emplace_back(y_absl::StrCat(query_kv.key, "=", query_kv.value));
+ }
+ TString query = y_absl::StrJoin(query_vector, "&");
+ canonical_request_vector.emplace_back(query);
+ canonical_request_vector.emplace_back("\n");
+ // 4. CanonicalHeaders
+ if (request_headers_.empty()) {
+ request_headers_.insert({"host", url_.authority()});
+ if (!token_.empty()) {
+ request_headers_.insert({"x-amz-security-token", token_});
+ }
+ for (const auto& header : additional_headers_) {
+ request_headers_.insert(
+ {y_absl::AsciiStrToLower(header.first), header.second});
+ }
+ }
+ if (additional_headers_.find("date") == additional_headers_.end()) {
+ request_headers_["x-amz-date"] = request_date_full;
+ }
+ std::vector<y_absl::string_view> canonical_headers_vector;
+ for (const auto& header : request_headers_) {
+ canonical_headers_vector.emplace_back(header.first);
+ canonical_headers_vector.emplace_back(":");
+ canonical_headers_vector.emplace_back(header.second);
+ canonical_headers_vector.emplace_back("\n");
+ }
+ TString canonical_headers = y_absl::StrJoin(canonical_headers_vector, "");
+ canonical_request_vector.emplace_back(canonical_headers);
+ canonical_request_vector.emplace_back("\n");
+ // 5. SignedHeaders
+ std::vector<y_absl::string_view> signed_headers_vector;
+ for (const auto& header : request_headers_) {
+ signed_headers_vector.emplace_back(header.first);
+ }
+ TString signed_headers = y_absl::StrJoin(signed_headers_vector, ";");
+ canonical_request_vector.emplace_back(signed_headers);
+ canonical_request_vector.emplace_back("\n");
+ // 6. RequestPayload
+ TString hashed_request_payload = SHA256Hex(request_payload_);
+ canonical_request_vector.emplace_back(hashed_request_payload);
+ TString canonical_request = y_absl::StrJoin(canonical_request_vector, "");
+ // TASK 2: Create a string to sign for Signature Version 4
+ // https://docs.aws.amazon.com/general/latest/gr/sigv4-create-string-to-sign.html
+ std::vector<y_absl::string_view> string_to_sign_vector;
+ // 1. Algorithm
+ string_to_sign_vector.emplace_back("AWS4-HMAC-SHA256");
+ string_to_sign_vector.emplace_back("\n");
+ // 2. RequestDateTime
+ string_to_sign_vector.emplace_back(request_date_full);
+ string_to_sign_vector.emplace_back("\n");
+ // 3. CredentialScope
+ std::pair<y_absl::string_view, y_absl::string_view> host_parts =
+ y_absl::StrSplit(url_.authority(), y_absl::MaxSplits('.', 1));
+ TString service_name(host_parts.first);
+ TString credential_scope = y_absl::StrFormat(
+ "%s/%s/%s/aws4_request", request_date_short, region_, service_name);
+ string_to_sign_vector.emplace_back(credential_scope);
+ string_to_sign_vector.emplace_back("\n");
+ // 4. HashedCanonicalRequest
+ TString hashed_canonical_request = SHA256Hex(canonical_request);
+ string_to_sign_vector.emplace_back(hashed_canonical_request);
+ TString string_to_sign = y_absl::StrJoin(string_to_sign_vector, "");
+ // TASK 3: Task 3: Calculate the signature for AWS Signature Version 4
+ // https://docs.aws.amazon.com/general/latest/gr/sigv4-calculate-signature.html
+ // 1. Derive your signing key.
+ TString date = HMAC("AWS4" + secret_access_key_, request_date_short);
+ TString region = HMAC(date, region_);
+ TString service = HMAC(region, service_name);
+ TString signing = HMAC(service, "aws4_request");
+ // 2. Calculate the signature.
+ TString signature_str = HMAC(signing, string_to_sign);
+ TString signature = y_absl::BytesToHexString(signature_str);
+ // TASK 4: Add the signature to the HTTP request
+ // https://docs.aws.amazon.com/general/latest/gr/sigv4-add-signature-to-request.html
+ TString authorization_header = y_absl::StrFormat(
+ "%s Credential=%s/%s, SignedHeaders=%s, Signature=%s", kAlgorithm,
+ access_key_id_, credential_scope, signed_headers, signature);
+ request_headers_["Authorization"] = authorization_header;
+ return request_headers_;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.h b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.h
new file mode 100644
index 00000000000..3d8d81439a9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/aws_request_signer.h
@@ -0,0 +1,72 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_REQUEST_SIGNER_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_REQUEST_SIGNER_H
+
+#include <grpc/support/port_platform.h>
+
+#include <map>
+#include <util/generic/string.h>
+
+#include "src/core/lib/iomgr/error.h"
+#include "src/core/lib/uri/uri_parser.h"
+
+namespace grpc_core {
+
+// Implements an AWS API request signer based on the AWS Signature Version 4
+// signing process.
+// https://docs.aws.amazon.com/general/latest/gr/signature-version-4.html
+// To retrieve the subject token in AwsExternalAccountCredentials, we need to
+// sign an AWS request server and use the signed request as the subject token.
+// This class is a utility to sign an AWS request.
+class AwsRequestSigner {
+ public:
+ // Construct a signer with the necessary information to sign a request.
+ // `access_key_id`, `secret_access_key` and `token` are the AWS credentials
+ // required for signing. `method` and `url` are the HTTP method and url of the
+ // request. `region` is the region of the AWS environment. `request_payload`
+ // is the payload of the HTTP request. `additional_headers` are additional
+ // headers to be inject into the request.
+ AwsRequestSigner(TString access_key_id, TString secret_access_key,
+ TString token, TString method, TString url,
+ TString region, TString request_payload,
+ std::map<TString, TString> additional_headers,
+ grpc_error** error);
+
+ // This method triggers the signing process then returns the headers of the
+ // signed request as a map. In case there is an error, the input `error`
+ // parameter will be updated and an empty map will be returned if there is
+ // error.
+ std::map<TString, TString> GetSignedRequestHeaders();
+
+ private:
+ TString access_key_id_;
+ TString secret_access_key_;
+ TString token_;
+ TString method_;
+ URI url_;
+ TString region_;
+ TString request_payload_;
+ std::map<TString, TString> additional_headers_;
+
+ TString static_request_date_;
+ std::map<TString, TString> request_headers_;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_AWS_REQUEST_SIGNER_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.cc
new file mode 100644
index 00000000000..435c18552de
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.cc
@@ -0,0 +1,497 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/external_account_credentials.h"
+
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_join.h"
+#include "y_absl/strings/str_split.h"
+#include "y_absl/time/clock.h"
+#include "y_absl/time/time.h"
+
+#include "src/core/lib/http/parser.h"
+#include "src/core/lib/security/util/json_util.h"
+#include "src/core/lib/slice/b64.h"
+
+#include "src/core/lib/security/credentials/external/aws_external_account_credentials.h"
+#include "src/core/lib/security/credentials/external/file_external_account_credentials.h"
+#include "src/core/lib/security/credentials/external/url_external_account_credentials.h"
+
+#define EXTERNAL_ACCOUNT_CREDENTIALS_GRANT_TYPE \
+ "urn:ietf:params:oauth:grant-type:token-exchange"
+#define EXTERNAL_ACCOUNT_CREDENTIALS_REQUESTED_TOKEN_TYPE \
+ "urn:ietf:params:oauth:token-type:access_token"
+#define GOOGLE_CLOUD_PLATFORM_DEFAULT_SCOPE \
+ "https://www.googleapis.com/auth/cloud-platform"
+
+namespace grpc_core {
+
+namespace {
+
+TString UrlEncode(const y_absl::string_view& s) {
+ const char* hex = "0123456789ABCDEF";
+ TString result;
+ result.reserve(s.length());
+ for (auto c : s) {
+ if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') ||
+ (c >= 'a' && c <= 'z') || c == '-' || c == '_' || c == '!' ||
+ c == '\'' || c == '(' || c == ')' || c == '*' || c == '~' || c == '.') {
+ result.push_back(c);
+ } else {
+ result.push_back('%');
+ result.push_back(hex[static_cast<unsigned char>(c) >> 4]);
+ result.push_back(hex[static_cast<unsigned char>(c) & 15]);
+ }
+ }
+ return result;
+}
+
+} // namespace
+
+RefCountedPtr<ExternalAccountCredentials> ExternalAccountCredentials::Create(
+ const Json& json, std::vector<TString> scopes, grpc_error** error) {
+ GPR_ASSERT(*error == GRPC_ERROR_NONE);
+ Options options;
+ options.type = GRPC_AUTH_JSON_TYPE_INVALID;
+ if (json.type() != Json::Type::OBJECT) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Invalid json to construct credentials options.");
+ return nullptr;
+ }
+ auto it = json.object_value().find("type");
+ if (it == json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("type field not present.");
+ return nullptr;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("type field must be a string.");
+ return nullptr;
+ }
+ if (it->second.string_value() != GRPC_AUTH_JSON_TYPE_EXTERNAL_ACCOUNT) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Invalid credentials json type.");
+ return nullptr;
+ }
+ options.type = GRPC_AUTH_JSON_TYPE_EXTERNAL_ACCOUNT;
+ it = json.object_value().find("audience");
+ if (it == json.object_value().end()) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("audience field not present.");
+ return nullptr;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "audience field must be a string.");
+ return nullptr;
+ }
+ options.audience = it->second.string_value();
+ it = json.object_value().find("subject_token_type");
+ if (it == json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "subject_token_type field not present.");
+ return nullptr;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "subject_token_type field must be a string.");
+ return nullptr;
+ }
+ options.subject_token_type = it->second.string_value();
+ it = json.object_value().find("service_account_impersonation_url");
+ if (it != json.object_value().end()) {
+ options.service_account_impersonation_url = it->second.string_value();
+ }
+ it = json.object_value().find("token_url");
+ if (it == json.object_value().end()) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("token_url field not present.");
+ return nullptr;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "token_url field must be a string.");
+ return nullptr;
+ }
+ options.token_url = it->second.string_value();
+ it = json.object_value().find("token_info_url");
+ if (it != json.object_value().end()) {
+ options.token_info_url = it->second.string_value();
+ }
+ it = json.object_value().find("credential_source");
+ if (it == json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "credential_source field not present.");
+ return nullptr;
+ }
+ options.credential_source = it->second;
+ it = json.object_value().find("quota_project_id");
+ if (it != json.object_value().end()) {
+ options.quota_project_id = it->second.string_value();
+ }
+ it = json.object_value().find("client_id");
+ if (it != json.object_value().end()) {
+ options.client_id = it->second.string_value();
+ }
+ it = json.object_value().find("client_secret");
+ if (it != json.object_value().end()) {
+ options.client_secret = it->second.string_value();
+ }
+ RefCountedPtr<ExternalAccountCredentials> creds;
+ if (options.credential_source.object_value().find("environment_id") !=
+ options.credential_source.object_value().end()) {
+ creds = MakeRefCounted<AwsExternalAccountCredentials>(
+ std::move(options), std::move(scopes), error);
+ } else if (options.credential_source.object_value().find("file") !=
+ options.credential_source.object_value().end()) {
+ creds = MakeRefCounted<FileExternalAccountCredentials>(
+ std::move(options), std::move(scopes), error);
+ } else if (options.credential_source.object_value().find("url") !=
+ options.credential_source.object_value().end()) {
+ creds = MakeRefCounted<UrlExternalAccountCredentials>(
+ std::move(options), std::move(scopes), error);
+ } else {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Invalid options credential source to create "
+ "ExternalAccountCredentials.");
+ }
+ if (*error == GRPC_ERROR_NONE) {
+ return creds;
+ } else {
+ return nullptr;
+ }
+}
+
+ExternalAccountCredentials::ExternalAccountCredentials(
+ Options options, std::vector<TString> scopes)
+ : options_(std::move(options)) {
+ if (scopes.empty()) {
+ scopes.push_back(GOOGLE_CLOUD_PLATFORM_DEFAULT_SCOPE);
+ }
+ scopes_ = std::move(scopes);
+}
+
+ExternalAccountCredentials::~ExternalAccountCredentials() {}
+
+TString ExternalAccountCredentials::debug_string() {
+ return y_absl::StrFormat("ExternalAccountCredentials{Audience:%s,%s}",
+ options_.audience,
+ grpc_oauth2_token_fetcher_credentials::debug_string());
+}
+
+// The token fetching flow:
+// 1. Retrieve subject token - Subclass's RetrieveSubjectToken() gets called
+// and the subject token is received in OnRetrieveSubjectTokenInternal().
+// 2. Exchange token - ExchangeToken() gets called with the
+// subject token from #1. Receive the response in OnExchangeTokenInternal().
+// 3. (Optional) Impersonate service account - ImpersenateServiceAccount() gets
+// called with the access token of the response from #2. Get an impersonated
+// access token in OnImpersenateServiceAccountInternal().
+// 4. Finish token fetch - Return back the response that contains an access
+// token in FinishTokenFetch().
+// TODO(chuanr): Avoid starting the remaining requests if the channel gets shut
+// down.
+void ExternalAccountCredentials::fetch_oauth2(
+ grpc_credentials_metadata_request* metadata_req,
+ grpc_httpcli_context* httpcli_context, grpc_polling_entity* pollent,
+ grpc_iomgr_cb_func response_cb, grpc_millis deadline) {
+ GPR_ASSERT(ctx_ == nullptr);
+ ctx_ = new HTTPRequestContext(httpcli_context, pollent, deadline);
+ metadata_req_ = metadata_req;
+ response_cb_ = response_cb;
+ auto cb = [this](TString token, grpc_error* error) {
+ OnRetrieveSubjectTokenInternal(token, error);
+ };
+ RetrieveSubjectToken(ctx_, options_, cb);
+}
+
+void ExternalAccountCredentials::OnRetrieveSubjectTokenInternal(
+ y_absl::string_view subject_token, grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishTokenFetch(error);
+ } else {
+ ExchangeToken(subject_token);
+ }
+}
+
+void ExternalAccountCredentials::ExchangeToken(
+ y_absl::string_view subject_token) {
+ y_absl::StatusOr<URI> uri = URI::Parse(options_.token_url);
+ if (!uri.ok()) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Invalid token url: %s. Error: %s", options_.token_url,
+ uri.status().ToString())
+ .c_str()));
+ return;
+ }
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ request.host = const_cast<char*>(uri->authority().c_str());
+ request.http.path = gpr_strdup(uri->path().c_str());
+ grpc_http_header* headers = nullptr;
+ if (!options_.client_id.empty() && !options_.client_secret.empty()) {
+ request.http.hdr_count = 2;
+ headers = static_cast<grpc_http_header*>(
+ gpr_malloc(sizeof(grpc_http_header) * request.http.hdr_count));
+ headers[0].key = gpr_strdup("Content-Type");
+ headers[0].value = gpr_strdup("application/x-www-form-urlencoded");
+ TString raw_cred =
+ y_absl::StrFormat("%s:%s", options_.client_id, options_.client_secret);
+ char* encoded_cred =
+ grpc_base64_encode(raw_cred.c_str(), raw_cred.length(), 0, 0);
+ TString str = y_absl::StrFormat("Basic %s", TString(encoded_cred));
+ headers[1].key = gpr_strdup("Authorization");
+ headers[1].value = gpr_strdup(str.c_str());
+ gpr_free(encoded_cred);
+ } else {
+ request.http.hdr_count = 1;
+ headers = static_cast<grpc_http_header*>(
+ gpr_malloc(sizeof(grpc_http_header) * request.http.hdr_count));
+ headers[0].key = gpr_strdup("Content-Type");
+ headers[0].value = gpr_strdup("application/x-www-form-urlencoded");
+ }
+ request.http.hdrs = headers;
+ request.handshaker =
+ uri->scheme() == "https" ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ std::vector<TString> body_parts;
+ body_parts.push_back(y_absl::StrFormat("%s=%s", "audience",
+ UrlEncode(options_.audience).c_str()));
+ body_parts.push_back(y_absl::StrFormat(
+ "%s=%s", "grant_type",
+ UrlEncode(EXTERNAL_ACCOUNT_CREDENTIALS_GRANT_TYPE).c_str()));
+ body_parts.push_back(y_absl::StrFormat(
+ "%s=%s", "requested_token_type",
+ UrlEncode(EXTERNAL_ACCOUNT_CREDENTIALS_REQUESTED_TOKEN_TYPE).c_str()));
+ body_parts.push_back(
+ y_absl::StrFormat("%s=%s", "subject_token_type",
+ UrlEncode(options_.subject_token_type).c_str()));
+ body_parts.push_back(y_absl::StrFormat("%s=%s", "subject_token",
+ UrlEncode(subject_token).c_str()));
+ TString scope = GOOGLE_CLOUD_PLATFORM_DEFAULT_SCOPE;
+ if (options_.service_account_impersonation_url.empty()) {
+ scope = y_absl::StrJoin(scopes_, " ");
+ }
+ body_parts.push_back(
+ y_absl::StrFormat("%s=%s", "scope", UrlEncode(scope).c_str()));
+ TString body = y_absl::StrJoin(body_parts, "&");
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("external_account_credentials");
+ grpc_http_response_destroy(&ctx_->response);
+ ctx_->response = {};
+ GRPC_CLOSURE_INIT(&ctx_->closure, OnExchangeToken, this, nullptr);
+ grpc_httpcli_post(ctx_->httpcli_context, ctx_->pollent, resource_quota,
+ &request, body.c_str(), body.size(), ctx_->deadline,
+ &ctx_->closure, &ctx_->response);
+ grpc_resource_quota_unref_internal(resource_quota);
+ grpc_http_request_destroy(&request.http);
+}
+
+void ExternalAccountCredentials::OnExchangeToken(void* arg, grpc_error* error) {
+ ExternalAccountCredentials* self =
+ static_cast<ExternalAccountCredentials*>(arg);
+ self->OnExchangeTokenInternal(GRPC_ERROR_REF(error));
+}
+
+void ExternalAccountCredentials::OnExchangeTokenInternal(grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishTokenFetch(error);
+ } else {
+ if (options_.service_account_impersonation_url.empty()) {
+ metadata_req_->response = ctx_->response;
+ metadata_req_->response.body = gpr_strdup(
+ TString(ctx_->response.body, ctx_->response.body_length).c_str());
+ metadata_req_->response.hdrs = static_cast<grpc_http_header*>(
+ gpr_malloc(sizeof(grpc_http_header) * ctx_->response.hdr_count));
+ for (size_t i = 0; i < ctx_->response.hdr_count; i++) {
+ metadata_req_->response.hdrs[i].key =
+ gpr_strdup(ctx_->response.hdrs[i].key);
+ metadata_req_->response.hdrs[i].value =
+ gpr_strdup(ctx_->response.hdrs[i].value);
+ }
+ FinishTokenFetch(GRPC_ERROR_NONE);
+ } else {
+ ImpersenateServiceAccount();
+ }
+ }
+}
+
+void ExternalAccountCredentials::ImpersenateServiceAccount() {
+ grpc_error* error = GRPC_ERROR_NONE;
+ y_absl::string_view response_body(ctx_->response.body,
+ ctx_->response.body_length);
+ Json json = Json::Parse(response_body, &error);
+ if (error != GRPC_ERROR_NONE || json.type() != Json::Type::OBJECT) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Invalid token exchange response.", &error, 1));
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ auto it = json.object_value().find("access_token");
+ if (it == json.object_value().end() ||
+ it->second.type() != Json::Type::STRING) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Missing or invalid access_token in %s.", response_body)
+ .c_str()));
+ return;
+ }
+ TString access_token = it->second.string_value();
+ y_absl::StatusOr<URI> uri =
+ URI::Parse(options_.service_account_impersonation_url);
+ if (!uri.ok()) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat(
+ "Invalid service account impersonation url: %s. Error: %s",
+ options_.service_account_impersonation_url, uri.status().ToString())
+ .c_str()));
+ return;
+ }
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ request.host = const_cast<char*>(uri->authority().c_str());
+ request.http.path = gpr_strdup(uri->path().c_str());
+ request.http.hdr_count = 2;
+ grpc_http_header* headers = static_cast<grpc_http_header*>(
+ gpr_malloc(sizeof(grpc_http_header) * request.http.hdr_count));
+ headers[0].key = gpr_strdup("Content-Type");
+ headers[0].value = gpr_strdup("application/x-www-form-urlencoded");
+ TString str = y_absl::StrFormat("Bearer %s", access_token);
+ headers[1].key = gpr_strdup("Authorization");
+ headers[1].value = gpr_strdup(str.c_str());
+ request.http.hdrs = headers;
+ request.handshaker =
+ uri->scheme() == "https" ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ TString scope = y_absl::StrJoin(scopes_, " ");
+ TString body = y_absl::StrFormat("%s=%s", "scope", scope);
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("external_account_credentials");
+ grpc_http_response_destroy(&ctx_->response);
+ ctx_->response = {};
+ GRPC_CLOSURE_INIT(&ctx_->closure, OnImpersenateServiceAccount, this, nullptr);
+ grpc_httpcli_post(ctx_->httpcli_context, ctx_->pollent, resource_quota,
+ &request, body.c_str(), body.size(), ctx_->deadline,
+ &ctx_->closure, &ctx_->response);
+ grpc_resource_quota_unref_internal(resource_quota);
+ grpc_http_request_destroy(&request.http);
+}
+
+void ExternalAccountCredentials::OnImpersenateServiceAccount(
+ void* arg, grpc_error* error) {
+ ExternalAccountCredentials* self =
+ static_cast<ExternalAccountCredentials*>(arg);
+ self->OnImpersenateServiceAccountInternal(GRPC_ERROR_REF(error));
+}
+
+void ExternalAccountCredentials::OnImpersenateServiceAccountInternal(
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishTokenFetch(error);
+ return;
+ }
+ y_absl::string_view response_body(ctx_->response.body,
+ ctx_->response.body_length);
+ Json json = Json::Parse(response_body, &error);
+ if (error != GRPC_ERROR_NONE || json.type() != Json::Type::OBJECT) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_REFERENCING_FROM_STATIC_STRING(
+ "Invalid service account impersonation response.", &error, 1));
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ auto it = json.object_value().find("accessToken");
+ if (it == json.object_value().end() ||
+ it->second.type() != Json::Type::STRING) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Missing or invalid accessToken in %s.", response_body)
+ .c_str()));
+ return;
+ }
+ TString access_token = it->second.string_value();
+ it = json.object_value().find("expireTime");
+ if (it == json.object_value().end() ||
+ it->second.type() != Json::Type::STRING) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Missing or invalid expireTime in %s.", response_body)
+ .c_str()));
+ return;
+ }
+ TString expire_time = it->second.string_value();
+ y_absl::Time t;
+ if (!y_absl::ParseTime(y_absl::RFC3339_full, expire_time, &t, nullptr)) {
+ FinishTokenFetch(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Invalid expire time of service account impersonation response."));
+ return;
+ }
+ int expire_in = (t - y_absl::Now()) / y_absl::Seconds(1);
+ TString body = y_absl::StrFormat(
+ "{\"access_token\":\"%s\",\"expires_in\":%d,\"token_type\":\"Bearer\"}",
+ access_token, expire_in);
+ metadata_req_->response = ctx_->response;
+ metadata_req_->response.body = gpr_strdup(body.c_str());
+ metadata_req_->response.body_length = body.length();
+ metadata_req_->response.hdrs = static_cast<grpc_http_header*>(
+ gpr_malloc(sizeof(grpc_http_header) * ctx_->response.hdr_count));
+ for (size_t i = 0; i < ctx_->response.hdr_count; i++) {
+ metadata_req_->response.hdrs[i].key =
+ gpr_strdup(ctx_->response.hdrs[i].key);
+ metadata_req_->response.hdrs[i].value =
+ gpr_strdup(ctx_->response.hdrs[i].value);
+ }
+ FinishTokenFetch(GRPC_ERROR_NONE);
+}
+
+void ExternalAccountCredentials::FinishTokenFetch(grpc_error* error) {
+ GRPC_LOG_IF_ERROR("Fetch external account credentials access token",
+ GRPC_ERROR_REF(error));
+ // Move object state into local variables.
+ auto* cb = response_cb_;
+ response_cb_ = nullptr;
+ auto* metadata_req = metadata_req_;
+ metadata_req_ = nullptr;
+ auto* ctx = ctx_;
+ ctx_ = nullptr;
+ // Invoke the callback.
+ cb(metadata_req, error);
+ // Delete context.
+ delete ctx;
+ GRPC_ERROR_UNREF(error);
+}
+
+} // namespace grpc_core
+
+grpc_call_credentials* grpc_external_account_credentials_create(
+ const char* json_string, const char* scopes_string) {
+ grpc_error* error = GRPC_ERROR_NONE;
+ grpc_core::Json json = grpc_core::Json::Parse(json_string, &error);
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR,
+ "External account credentials creation failed. Error: %s.",
+ grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ return nullptr;
+ }
+ std::vector<TString> scopes = y_absl::StrSplit(scopes_string, ',');
+ auto creds = grpc_core::ExternalAccountCredentials::Create(
+ json, std::move(scopes), &error)
+ .release();
+ if (error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR,
+ "External account credentials creation failed. Error: %s.",
+ grpc_error_string(error));
+ GRPC_ERROR_UNREF(error);
+ return nullptr;
+ }
+ return creds;
+}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.h
new file mode 100644
index 00000000000..8a739ddf8df
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/external_account_credentials.h
@@ -0,0 +1,120 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_EXTERNAL_ACCOUNT_CREDENTIALS_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_EXTERNAL_ACCOUNT_CREDENTIALS_H
+
+#include <grpc/support/port_platform.h>
+
+#include <util/generic/string.h>
+#include <vector>
+
+#include "src/core/lib/json/json.h"
+#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
+
+namespace grpc_core {
+
+// Base external account credentials. The base class implements common logic for
+// exchanging external account credentials for GCP access token to authorize
+// requests to GCP APIs. The specific logic of retrieving subject token is
+// implemented in subclasses.
+class ExternalAccountCredentials
+ : public grpc_oauth2_token_fetcher_credentials {
+ public:
+ // External account credentials json interface.
+ struct Options {
+ TString type;
+ TString audience;
+ TString subject_token_type;
+ TString service_account_impersonation_url;
+ TString token_url;
+ TString token_info_url;
+ Json credential_source;
+ TString quota_project_id;
+ TString client_id;
+ TString client_secret;
+ };
+
+ static RefCountedPtr<ExternalAccountCredentials> Create(
+ const Json& json, std::vector<TString> scopes, grpc_error** error);
+
+ ExternalAccountCredentials(Options options, std::vector<TString> scopes);
+ ~ExternalAccountCredentials() override;
+ TString debug_string() override;
+
+ protected:
+ // This is a helper struct to pass information between multiple callback based
+ // asynchronous calls.
+ struct HTTPRequestContext {
+ HTTPRequestContext(grpc_httpcli_context* httpcli_context,
+ grpc_polling_entity* pollent, grpc_millis deadline)
+ : httpcli_context(httpcli_context),
+ pollent(pollent),
+ deadline(deadline) {}
+ ~HTTPRequestContext() { grpc_http_response_destroy(&response); }
+
+ // Contextual parameters passed from
+ // grpc_oauth2_token_fetcher_credentials::fetch_oauth2().
+ grpc_httpcli_context* httpcli_context;
+ grpc_polling_entity* pollent;
+ grpc_millis deadline;
+
+ // Reusable token fetch http response and closure.
+ grpc_closure closure;
+ grpc_http_response response;
+ };
+
+ // Subclasses of base external account credentials need to override this
+ // method to implement the specific subject token retrieval logic.
+ // Once the subject token is ready, subclasses need to invoke
+ // the callback function (cb) to pass the subject token (or error)
+ // back.
+ virtual void RetrieveSubjectToken(
+ HTTPRequestContext* ctx, const Options& options,
+ std::function<void(TString, grpc_error*)> cb) = 0;
+
+ private:
+ // This method implements the common token fetch logic and it will be called
+ // when grpc_oauth2_token_fetcher_credentials request a new access token.
+ void fetch_oauth2(grpc_credentials_metadata_request* req,
+ grpc_httpcli_context* httpcli_context,
+ grpc_polling_entity* pollent, grpc_iomgr_cb_func cb,
+ grpc_millis deadline) override;
+
+ void OnRetrieveSubjectTokenInternal(y_absl::string_view subject_token,
+ grpc_error* error);
+
+ void ExchangeToken(y_absl::string_view subject_token);
+ static void OnExchangeToken(void* arg, grpc_error* error);
+ void OnExchangeTokenInternal(grpc_error* error);
+
+ void ImpersenateServiceAccount();
+ static void OnImpersenateServiceAccount(void* arg, grpc_error* error);
+ void OnImpersenateServiceAccountInternal(grpc_error* error);
+
+ void FinishTokenFetch(grpc_error* error);
+
+ Options options_;
+ std::vector<TString> scopes_;
+
+ HTTPRequestContext* ctx_ = nullptr;
+ grpc_credentials_metadata_request* metadata_req_ = nullptr;
+ grpc_iomgr_cb_func response_cb_ = nullptr;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_EXTERNAL_ACCOUNT_CREDENTIALS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.cc
new file mode 100644
index 00000000000..b42e78b0cf5
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.cc
@@ -0,0 +1,135 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/file_external_account_credentials.h"
+
+#include <fstream>
+
+#include "src/core/lib/iomgr/load_file.h"
+#include "src/core/lib/slice/slice_internal.h"
+#include "src/core/lib/slice/slice_utils.h"
+
+namespace grpc_core {
+
+RefCountedPtr<FileExternalAccountCredentials>
+FileExternalAccountCredentials::Create(Options options,
+ std::vector<TString> scopes,
+ grpc_error** error) {
+ auto creds = MakeRefCounted<FileExternalAccountCredentials>(
+ std::move(options), std::move(scopes), error);
+ if (*error == GRPC_ERROR_NONE) {
+ return creds;
+ } else {
+ return nullptr;
+ }
+}
+
+FileExternalAccountCredentials::FileExternalAccountCredentials(
+ Options options, std::vector<TString> scopes, grpc_error** error)
+ : ExternalAccountCredentials(options, std::move(scopes)) {
+ auto it = options.credential_source.object_value().find("file");
+ if (it == options.credential_source.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("file field not present.");
+ return;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("file field must be a string.");
+ return;
+ }
+ file_ = it->second.string_value();
+ it = options.credential_source.object_value().find("format");
+ if (it != options.credential_source.object_value().end()) {
+ const Json& format_json = it->second;
+ if (format_json.type() != Json::Type::OBJECT) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "The JSON value of credential source format is not an object.");
+ return;
+ }
+ auto format_it = format_json.object_value().find("type");
+ if (format_it == format_json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.type field not present.");
+ return;
+ }
+ if (format_it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.type field must be a string.");
+ return;
+ }
+ format_type_ = format_it->second.string_value();
+ if (format_type_ == "json") {
+ format_it = format_json.object_value().find("subject_token_field_name");
+ if (format_it == format_json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.subject_token_field_name field must be present if the "
+ "format is in Json.");
+ return;
+ }
+ if (format_it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.subject_token_field_name field must be a string.");
+ return;
+ }
+ format_subject_token_field_name_ = format_it->second.string_value();
+ }
+ }
+}
+
+void FileExternalAccountCredentials::RetrieveSubjectToken(
+ HTTPRequestContext* /*ctx*/, const Options& /*options*/,
+ std::function<void(TString, grpc_error*)> cb) {
+ struct SliceWrapper {
+ ~SliceWrapper() { grpc_slice_unref_internal(slice); }
+ grpc_slice slice = grpc_empty_slice();
+ };
+ SliceWrapper content_slice;
+ // To retrieve the subject token, we read the file every time we make a
+ // request because it may have changed since the last request.
+ grpc_error* error = grpc_load_file(file_.c_str(), 0, &content_slice.slice);
+ if (error != GRPC_ERROR_NONE) {
+ cb("", error);
+ return;
+ }
+ y_absl::string_view content = StringViewFromSlice(content_slice.slice);
+ if (format_type_ == "json") {
+ Json content_json = Json::Parse(content, &error);
+ if (error != GRPC_ERROR_NONE || content_json.type() != Json::Type::OBJECT) {
+ cb("", GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "The content of the file is not a valid json object."));
+ GRPC_ERROR_UNREF(error);
+ return;
+ }
+ auto content_it =
+ content_json.object_value().find(format_subject_token_field_name_);
+ if (content_it == content_json.object_value().end()) {
+ cb("", GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Subject token field not present."));
+ return;
+ }
+ if (content_it->second.type() != Json::Type::STRING) {
+ cb("", GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Subject token field must be a string."));
+ return;
+ }
+ cb(content_it->second.string_value(), GRPC_ERROR_NONE);
+ return;
+ }
+ cb(TString(content), GRPC_ERROR_NONE);
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.h
new file mode 100644
index 00000000000..5f5d62e3673
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/file_external_account_credentials.h
@@ -0,0 +1,48 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_FILE_EXTERNAL_ACCOUNT_CREDENTIALS_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_FILE_EXTERNAL_ACCOUNT_CREDENTIALS_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/external_account_credentials.h"
+
+namespace grpc_core {
+
+class FileExternalAccountCredentials final : public ExternalAccountCredentials {
+ public:
+ static RefCountedPtr<FileExternalAccountCredentials> Create(
+ Options options, std::vector<TString> scopes, grpc_error** error);
+
+ FileExternalAccountCredentials(Options options,
+ std::vector<TString> scopes,
+ grpc_error** error);
+
+ private:
+ void RetrieveSubjectToken(
+ HTTPRequestContext* ctx, const Options& options,
+ std::function<void(TString, grpc_error*)> cb) override;
+
+ // Fields of credential source
+ TString file_;
+ TString format_type_;
+ TString format_subject_token_field_name_;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_FILE_EXTERNAL_ACCOUNT_CREDENTIALS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.cc
new file mode 100644
index 00000000000..506a4e26196
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.cc
@@ -0,0 +1,213 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/url_external_account_credentials.h"
+
+#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_split.h"
+
+namespace grpc_core {
+
+RefCountedPtr<UrlExternalAccountCredentials>
+UrlExternalAccountCredentials::Create(Options options,
+ std::vector<TString> scopes,
+ grpc_error** error) {
+ auto creds = MakeRefCounted<UrlExternalAccountCredentials>(
+ std::move(options), std::move(scopes), error);
+ if (*error == GRPC_ERROR_NONE) {
+ return creds;
+ } else {
+ return nullptr;
+ }
+}
+
+UrlExternalAccountCredentials::UrlExternalAccountCredentials(
+ Options options, std::vector<TString> scopes, grpc_error** error)
+ : ExternalAccountCredentials(options, std::move(scopes)) {
+ auto it = options.credential_source.object_value().find("url");
+ if (it == options.credential_source.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING("url field not present.");
+ return;
+ }
+ if (it->second.type() != Json::Type::STRING) {
+ *error =
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("url field must be a string.");
+ return;
+ }
+ y_absl::StatusOr<URI> tmp_url = URI::Parse(it->second.string_value());
+ if (!tmp_url.ok()) {
+ *error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Invalid credential source url. Error: %s",
+ tmp_url.status().ToString())
+ .c_str());
+ return;
+ }
+ url_ = *tmp_url;
+ // The url must follow the format of <scheme>://<authority>/<path>
+ std::vector<y_absl::string_view> v =
+ y_absl::StrSplit(it->second.string_value(), y_absl::MaxSplits('/', 3));
+ url_full_path_ = y_absl::StrCat("/", v[3]);
+ it = options.credential_source.object_value().find("headers");
+ if (it != options.credential_source.object_value().end()) {
+ if (it->second.type() != Json::Type::OBJECT) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "The JSON value of credential source headers is not an object.");
+ return;
+ }
+ for (auto const& header : it->second.object_value()) {
+ headers_[header.first] = header.second.string_value();
+ }
+ }
+ it = options.credential_source.object_value().find("format");
+ if (it != options.credential_source.object_value().end()) {
+ const Json& format_json = it->second;
+ if (format_json.type() != Json::Type::OBJECT) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "The JSON value of credential source format is not an object.");
+ return;
+ }
+ auto format_it = format_json.object_value().find("type");
+ if (format_it == format_json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.type field not present.");
+ return;
+ }
+ if (format_it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.type field must be a string.");
+ return;
+ }
+ format_type_ = format_it->second.string_value();
+ if (format_type_ == "json") {
+ format_it = format_json.object_value().find("subject_token_field_name");
+ if (format_it == format_json.object_value().end()) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.subject_token_field_name field must be present if the "
+ "format is in Json.");
+ return;
+ }
+ if (format_it->second.type() != Json::Type::STRING) {
+ *error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "format.subject_token_field_name field must be a string.");
+ return;
+ }
+ format_subject_token_field_name_ = format_it->second.string_value();
+ }
+ }
+}
+
+void UrlExternalAccountCredentials::RetrieveSubjectToken(
+ HTTPRequestContext* ctx, const Options& /*options*/,
+ std::function<void(TString, grpc_error*)> cb) {
+ if (ctx == nullptr) {
+ FinishRetrieveSubjectToken(
+ "",
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Missing HTTPRequestContext to start subject token retrieval."));
+ return;
+ }
+ ctx_ = ctx;
+ cb_ = cb;
+ grpc_httpcli_request request;
+ memset(&request, 0, sizeof(grpc_httpcli_request));
+ request.host = const_cast<char*>(url_.authority().c_str());
+ request.http.path = gpr_strdup(url_full_path_.c_str());
+ grpc_http_header* headers = nullptr;
+ request.http.hdr_count = headers_.size();
+ headers = static_cast<grpc_http_header*>(
+ gpr_malloc(sizeof(grpc_http_header) * request.http.hdr_count));
+ int i = 0;
+ for (auto const& header : headers_) {
+ headers[i].key = gpr_strdup(header.first.c_str());
+ headers[i].value = gpr_strdup(header.second.c_str());
+ ++i;
+ }
+ request.http.hdrs = headers;
+ request.handshaker =
+ url_.scheme() == "https" ? &grpc_httpcli_ssl : &grpc_httpcli_plaintext;
+ grpc_resource_quota* resource_quota =
+ grpc_resource_quota_create("external_account_credentials");
+ grpc_http_response_destroy(&ctx_->response);
+ ctx_->response = {};
+ GRPC_CLOSURE_INIT(&ctx_->closure, OnRetrieveSubjectToken, this, nullptr);
+ grpc_httpcli_get(ctx_->httpcli_context, ctx_->pollent, resource_quota,
+ &request, ctx_->deadline, &ctx_->closure, &ctx_->response);
+ grpc_resource_quota_unref_internal(resource_quota);
+ grpc_http_request_destroy(&request.http);
+}
+
+void UrlExternalAccountCredentials::OnRetrieveSubjectToken(void* arg,
+ grpc_error* error) {
+ UrlExternalAccountCredentials* self =
+ static_cast<UrlExternalAccountCredentials*>(arg);
+ self->OnRetrieveSubjectTokenInternal(GRPC_ERROR_REF(error));
+}
+
+void UrlExternalAccountCredentials::OnRetrieveSubjectTokenInternal(
+ grpc_error* error) {
+ if (error != GRPC_ERROR_NONE) {
+ FinishRetrieveSubjectToken("", error);
+ return;
+ }
+ y_absl::string_view response_body(ctx_->response.body,
+ ctx_->response.body_length);
+ if (format_type_ == "json") {
+ grpc_error* error = GRPC_ERROR_NONE;
+ Json response_json = Json::Parse(response_body, &error);
+ if (error != GRPC_ERROR_NONE ||
+ response_json.type() != Json::Type::OBJECT) {
+ FinishRetrieveSubjectToken(
+ "", GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "The format of response is not a valid json object."));
+ return;
+ }
+ auto response_it =
+ response_json.object_value().find(format_subject_token_field_name_);
+ if (response_it == response_json.object_value().end()) {
+ FinishRetrieveSubjectToken("", GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Subject token field not present."));
+ return;
+ }
+ if (response_it->second.type() != Json::Type::STRING) {
+ FinishRetrieveSubjectToken("",
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Subject token field must be a string."));
+ return;
+ }
+ FinishRetrieveSubjectToken(response_it->second.string_value(), error);
+ return;
+ }
+ FinishRetrieveSubjectToken(TString(response_body), GRPC_ERROR_NONE);
+}
+
+void UrlExternalAccountCredentials::FinishRetrieveSubjectToken(
+ TString subject_token, grpc_error* error) {
+ // Reset context
+ ctx_ = nullptr;
+ // Move object state into local variables.
+ auto cb = cb_;
+ cb_ = nullptr;
+ // Invoke the callback.
+ if (error != GRPC_ERROR_NONE) {
+ cb("", error);
+ } else {
+ cb(subject_token, GRPC_ERROR_NONE);
+ }
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.h
new file mode 100644
index 00000000000..9a539406cc0
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/external/url_external_account_credentials.h
@@ -0,0 +1,58 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_URL_EXTERNAL_ACCOUNT_CREDENTIALS_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_URL_EXTERNAL_ACCOUNT_CREDENTIALS_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/external/external_account_credentials.h"
+
+namespace grpc_core {
+
+class UrlExternalAccountCredentials final : public ExternalAccountCredentials {
+ public:
+ static RefCountedPtr<UrlExternalAccountCredentials> Create(
+ Options options, std::vector<TString> scopes, grpc_error** error);
+
+ UrlExternalAccountCredentials(Options options,
+ std::vector<TString> scopes,
+ grpc_error** error);
+
+ private:
+ void RetrieveSubjectToken(
+ HTTPRequestContext* ctx, const Options& options,
+ std::function<void(TString, grpc_error*)> cb) override;
+
+ static void OnRetrieveSubjectToken(void* arg, grpc_error* error);
+ void OnRetrieveSubjectTokenInternal(grpc_error* error);
+
+ void FinishRetrieveSubjectToken(TString subject_token, grpc_error* error);
+
+ // Fields of credential source
+ URI url_;
+ TString url_full_path_;
+ std::map<TString, TString> headers_;
+ TString format_type_;
+ TString format_subject_token_field_name_;
+
+ HTTPRequestContext* ctx_ = nullptr;
+ std::function<void(TString, grpc_error*)> cb_ = nullptr;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_EXTERNAL_URL_EXTERNAL_ACCOUNT_CREDENTIALS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/fake/fake_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/fake/fake_credentials.cc
index 8fd0493ee44..c439282ffb1 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/fake/fake_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/fake/fake_credentials.cc
@@ -59,7 +59,7 @@ class grpc_fake_server_credentials final : public grpc_server_credentials {
~grpc_fake_server_credentials() override = default;
grpc_core::RefCountedPtr<grpc_server_security_connector>
- create_security_connector() override {
+ create_security_connector(const grpc_channel_args* /*args*/) override {
return grpc_fake_server_security_connector_create(this->Ref());
}
};
@@ -76,7 +76,8 @@ grpc_fake_transport_security_server_credentials_create() {
grpc_arg grpc_fake_transport_expected_targets_arg(char* expected_targets) {
return grpc_channel_arg_string_create(
- (char*)GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS, expected_targets);
+ const_cast<char*>(GRPC_ARG_FAKE_SECURITY_EXPECTED_TARGETS),
+ expected_targets);
}
const char* grpc_fake_transport_get_expected_targets(
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc
index 8f3ca009a59..204197cf273 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/google_default/google_default_credentials.cc
@@ -27,6 +27,7 @@
#include <grpc/support/sync.h>
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/gpr/string.h"
@@ -37,6 +38,7 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/credentials/alts/alts_credentials.h"
#include "src/core/lib/security/credentials/alts/check_gcp_environment.h"
+#include "src/core/lib/security/credentials/external/external_account_credentials.h"
#include "src/core/lib/security/credentials/google_default/google_default_credentials.h"
#include "src/core/lib/security/credentials/jwt/jwt_credentials.h"
#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h"
@@ -59,7 +61,7 @@ using grpc_core::Json;
* means the detection is done via network test that is unreliable and the
* unreliable result should not be referred by successive calls. */
static int g_metadata_server_available = 0;
-static gpr_mu g_state_mu;
+static grpc_core::Mutex* g_state_mu;
/* Protect a metadata_server_detector instance that can be modified by more than
* one gRPC threads */
static gpr_mu* g_polling_mu;
@@ -67,7 +69,9 @@ static gpr_once g_once = GPR_ONCE_INIT;
static grpc_core::internal::grpc_gce_tenancy_checker g_gce_tenancy_checker =
grpc_alts_is_running_on_gcp;
-static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); }
+static void init_default_credentials(void) {
+ g_state_mu = new grpc_core::Mutex();
+}
struct metadata_server_detector {
grpc_polling_entity pollent;
@@ -80,21 +84,22 @@ grpc_google_default_channel_credentials::create_security_connector(
grpc_core::RefCountedPtr<grpc_call_credentials> call_creds,
const char* target, const grpc_channel_args* args,
grpc_channel_args** new_args) {
- bool is_grpclb_load_balancer = grpc_channel_arg_get_bool(
- grpc_channel_args_find(args, GRPC_ARG_ADDRESS_IS_GRPCLB_LOAD_BALANCER),
- false);
- bool is_backend_from_grpclb_load_balancer = grpc_channel_arg_get_bool(
- grpc_channel_args_find(
- args, GRPC_ARG_ADDRESS_IS_BACKEND_FROM_GRPCLB_LOAD_BALANCER),
- false);
- bool use_alts =
- is_grpclb_load_balancer || is_backend_from_grpclb_load_balancer;
+ const bool is_grpclb_load_balancer = grpc_channel_args_find_bool(
+ args, GRPC_ARG_ADDRESS_IS_GRPCLB_LOAD_BALANCER, false);
+ const bool is_backend_from_grpclb_load_balancer = grpc_channel_args_find_bool(
+ args, GRPC_ARG_ADDRESS_IS_BACKEND_FROM_GRPCLB_LOAD_BALANCER, false);
+ const char* xds_cluster =
+ grpc_channel_args_find_string(args, GRPC_ARG_XDS_CLUSTER_NAME);
+ const bool is_xds_non_cfe_cluster =
+ xds_cluster != nullptr && strcmp(xds_cluster, "google_cfe") != 0;
+ const bool use_alts = is_grpclb_load_balancer ||
+ is_backend_from_grpclb_load_balancer ||
+ is_xds_non_cfe_cluster;
/* Return failure if ALTS is selected but not running on GCE. */
if (use_alts && alts_creds_ == nullptr) {
gpr_log(GPR_ERROR, "ALTS is selected, but not running on GCE.");
return nullptr;
}
-
grpc_core::RefCountedPtr<grpc_channel_security_connector> sc =
use_alts ? alts_creds_->create_security_connector(call_creds, target,
args, new_args)
@@ -175,8 +180,8 @@ static int is_metadata_server_reachable() {
detector.is_done = 0;
detector.success = 0;
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = (char*)GRPC_COMPUTE_ENGINE_DETECTION_HOST;
- request.http.path = (char*)"/";
+ request.host = const_cast<char*>(GRPC_COMPUTE_ENGINE_DETECTION_HOST);
+ request.http.path = const_cast<char*>("/");
grpc_httpcli_context_init(&context);
grpc_resource_quota* resource_quota =
grpc_resource_quota_create("google_default_credentials");
@@ -267,6 +272,9 @@ static grpc_error* create_default_creds_from_path(
goto end;
}
+ /* Finally try an external account credentials.*/
+ result = grpc_core::ExternalAccountCredentials::Create(json, {}, &error);
+
end:
GPR_ASSERT((result == nullptr) + (error == GRPC_ERROR_NONE) == 1);
grpc_slice_unref_internal(creds_data);
@@ -276,7 +284,7 @@ end:
static void update_tenancy() {
gpr_once_init(&g_once, init_default_credentials);
- grpc_core::MutexLock lock(&g_state_mu);
+ grpc_core::MutexLock lock(g_state_mu);
/* Try a platform-provided hint for GCE. */
if (!g_metadata_server_available) {
@@ -291,7 +299,7 @@ static void update_tenancy() {
}
static bool metadata_server_available() {
- grpc_core::MutexLock lock(&g_state_mu);
+ grpc_core::MutexLock lock(g_state_mu);
return static_cast<bool>(g_metadata_server_available);
}
@@ -381,9 +389,8 @@ void set_gce_tenancy_checker_for_testing(grpc_gce_tenancy_checker checker) {
void grpc_flush_cached_google_default_credentials(void) {
grpc_core::ExecCtx exec_ctx;
gpr_once_init(&g_once, init_default_credentials);
- gpr_mu_lock(&g_state_mu);
+ grpc_core::MutexLock lock(g_state_mu);
g_metadata_server_available = 0;
- gpr_mu_unlock(&g_state_mu);
}
} // namespace internal
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/insecure/insecure_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/insecure/insecure_credentials.cc
new file mode 100644
index 00000000000..4cf500e6f59
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/insecure/insecure_credentials.cc
@@ -0,0 +1,64 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include <grpc/grpc_security.h>
+
+#include "src/core/lib/security/credentials/credentials.h"
+#include "src/core/lib/security/security_connector/insecure/insecure_security_connector.h"
+
+namespace grpc_core {
+namespace {
+
+constexpr char kCredentialsTypeInsecure[] = "insecure";
+
+class InsecureCredentials final : public grpc_channel_credentials {
+ public:
+ InsecureCredentials() : grpc_channel_credentials(kCredentialsTypeInsecure) {}
+
+ RefCountedPtr<grpc_channel_security_connector> create_security_connector(
+ RefCountedPtr<grpc_call_credentials> call_creds,
+ const char* /* target_name */, const grpc_channel_args* /* args */,
+ grpc_channel_args** /* new_args */) override {
+ return MakeRefCounted<InsecureChannelSecurityConnector>(
+ Ref(), std::move(call_creds));
+ }
+};
+
+class InsecureServerCredentials final : public grpc_server_credentials {
+ public:
+ InsecureServerCredentials()
+ : grpc_server_credentials(kCredentialsTypeInsecure) {}
+
+ RefCountedPtr<grpc_server_security_connector> create_security_connector(
+ const grpc_channel_args* /* args */) override {
+ return MakeRefCounted<InsecureServerSecurityConnector>(Ref());
+ }
+};
+
+} // namespace
+} // namespace grpc_core
+
+grpc_channel_credentials* grpc_insecure_credentials_create() {
+ return new grpc_core::InsecureCredentials();
+}
+
+grpc_server_credentials* grpc_insecure_server_credentials_create() {
+ return new grpc_core::InsecureServerCredentials();
+}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/jwt/json_token.cc b/contrib/libs/grpc/src/core/lib/security/credentials/jwt/json_token.cc
index c0c5b52782b..0d94ad94538 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/jwt/json_token.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/jwt/json_token.cc
@@ -64,7 +64,7 @@ static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override =
int grpc_auth_json_key_is_valid(const grpc_auth_json_key* json_key) {
return (json_key != nullptr) &&
- strcmp(json_key->type, GRPC_AUTH_JSON_TYPE_INVALID);
+ strcmp(json_key->type, GRPC_AUTH_JSON_TYPE_INVALID) != 0;
}
grpc_auth_json_key grpc_auth_json_key_create_from_json(const Json& json) {
@@ -84,7 +84,7 @@ grpc_auth_json_key grpc_auth_json_key_create_from_json(const Json& json) {
prop_value = grpc_json_get_string_property(json, "type", &error);
GRPC_LOG_IF_ERROR("JSON key parsing", error);
if (prop_value == nullptr ||
- strcmp(prop_value, GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT)) {
+ strcmp(prop_value, GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT) != 0) {
goto end;
}
result.type = GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT;
@@ -109,7 +109,7 @@ grpc_auth_json_key grpc_auth_json_key_create_from_json(const Json& json) {
goto end;
}
result.private_key =
- PEM_read_bio_RSAPrivateKey(bio, nullptr, nullptr, (void*)"");
+ PEM_read_bio_RSAPrivateKey(bio, nullptr, nullptr, const_cast<char*>(""));
if (result.private_key == nullptr) {
gpr_log(GPR_ERROR, "Could not deserialize private key.");
goto end;
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h
index 9b60deacb5b..2faadfa0f85 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_credentials.h
@@ -50,9 +50,10 @@ class grpc_service_account_jwt_access_credentials
const grpc_auth_json_key& key() const { return key_; }
TString debug_string() override {
- return y_absl::StrFormat("JWTAccessCredentials{ExpirationTime:%s}",
- y_absl::FormatTime(y_absl::FromUnixMicros(
- gpr_timespec_to_micros(jwt_lifetime_))));
+ return y_absl::StrFormat(
+ "JWTAccessCredentials{ExpirationTime:%s}",
+ y_absl::FormatTime(y_absl::FromUnixMicros(
+ static_cast<int64_t>(gpr_timespec_to_micros(jwt_lifetime_)))));
};
private:
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc b/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc
index 0c9e118826f..4c1342331c8 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/jwt/jwt_verifier.cc
@@ -149,7 +149,8 @@ static jose_header* jose_header_from_json(Json json) {
https://auth0.com/blog/2015/03/31/critical-vulnerabilities-in-json-web-token-libraries/
*/
alg_value = it->second.string_value().c_str();
- if (it->second.type() != Json::Type::STRING || strncmp(alg_value, "RS", 2) ||
+ if (it->second.type() != Json::Type::STRING ||
+ strncmp(alg_value, "RS", 2) != 0 ||
evp_md_from_alg(alg_value) == nullptr) {
gpr_log(GPR_ERROR, "Invalid alg field");
goto error;
@@ -692,7 +693,7 @@ static void on_openid_config_retrieved(void* user_data, grpc_error* /*error*/) {
req.host = gpr_strdup(jwks_uri);
req.http.path = const_cast<char*>(strchr(jwks_uri, '/'));
if (req.http.path == nullptr) {
- req.http.path = (char*)"";
+ req.http.path = const_cast<char*>("");
} else {
*(req.host + (req.http.path - jwks_uri)) = '\0';
}
@@ -753,8 +754,8 @@ const char* grpc_jwt_issuer_email_domain(const char* issuer) {
if (dot == nullptr || dot == email_domain) return email_domain;
GPR_ASSERT(dot > email_domain);
/* There may be a subdomain, we just want the domain. */
- dot = static_cast<const char*>(gpr_memrchr(
- (void*)email_domain, '.', static_cast<size_t>(dot - email_domain)));
+ dot = static_cast<const char*>(
+ gpr_memrchr(email_domain, '.', static_cast<size_t>(dot - email_domain)));
if (dot == nullptr) return email_domain;
return dot + 1;
}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.cc
index 966a887baf8..84caf1c3ba4 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.cc
@@ -39,7 +39,8 @@ grpc_local_credentials::create_security_connector(
}
grpc_core::RefCountedPtr<grpc_server_security_connector>
-grpc_local_server_credentials::create_security_connector() {
+grpc_local_server_credentials::create_security_connector(
+ const grpc_channel_args* /* args */) {
return grpc_local_server_security_connector_create(this->Ref());
}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.h
index 60a8a4f64ca..a1857ad8dba 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/local/local_credentials.h
@@ -50,7 +50,7 @@ class grpc_local_server_credentials final : public grpc_server_credentials {
~grpc_local_server_credentials() override = default;
grpc_core::RefCountedPtr<grpc_server_security_connector>
- create_security_connector() override;
+ create_security_connector(const grpc_channel_args* /* args */) override;
grpc_local_connect_type connect_type() const { return connect_type_; }
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
index 552ee37cfcf..0e5dda1579c 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc
@@ -53,7 +53,7 @@ using grpc_core::Json;
int grpc_auth_refresh_token_is_valid(
const grpc_auth_refresh_token* refresh_token) {
return (refresh_token != nullptr) &&
- strcmp(refresh_token->type, GRPC_AUTH_JSON_TYPE_INVALID);
+ strcmp(refresh_token->type, GRPC_AUTH_JSON_TYPE_INVALID) != 0;
}
grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json(
@@ -73,7 +73,7 @@ grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json(
prop_value = grpc_json_get_string_property(json, "type", &error);
GRPC_LOG_IF_ERROR("Parsing refresh token", error);
if (prop_value == nullptr ||
- strcmp(prop_value, GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER)) {
+ strcmp(prop_value, GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER) != 0) {
goto end;
}
result.type = GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER;
@@ -386,8 +386,9 @@ class grpc_compute_engine_token_fetcher_credentials
const_cast<char*>("Google")};
grpc_httpcli_request request;
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = (char*)GRPC_COMPUTE_ENGINE_METADATA_HOST;
- request.http.path = (char*)GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH;
+ request.host = const_cast<char*>(GRPC_COMPUTE_ENGINE_METADATA_HOST);
+ request.http.path =
+ const_cast<char*>(GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH);
request.http.hdr_count = 1;
request.http.hdrs = &header;
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
@@ -445,8 +446,8 @@ void grpc_google_refresh_token_credentials::fetch_oauth2(
GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, refresh_token_.client_id,
refresh_token_.client_secret, refresh_token_.refresh_token);
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = (char*)GRPC_GOOGLE_OAUTH2_SERVICE_HOST;
- request.http.path = (char*)GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH;
+ request.host = const_cast<char*>(GRPC_GOOGLE_OAUTH2_SERVICE_HOST);
+ request.http.path = const_cast<char*>(GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH);
request.http.hdr_count = 1;
request.http.hdrs = &header;
request.handshaker = &grpc_httpcli_ssl;
@@ -537,9 +538,9 @@ grpc_error* LoadTokenFile(const char* path, gpr_slice* token) {
class StsTokenFetcherCredentials
: public grpc_oauth2_token_fetcher_credentials {
public:
- StsTokenFetcherCredentials(grpc_uri* sts_url, // Ownership transferred.
+ StsTokenFetcherCredentials(URI sts_url,
const grpc_sts_credentials_options* options)
- : sts_url_(sts_url),
+ : sts_url_(std::move(sts_url)),
resource_(gpr_strdup(options->resource)),
audience_(gpr_strdup(options->audience)),
scope_(gpr_strdup(options->scope)),
@@ -549,12 +550,10 @@ class StsTokenFetcherCredentials
actor_token_path_(gpr_strdup(options->actor_token_path)),
actor_token_type_(gpr_strdup(options->actor_token_type)) {}
- ~StsTokenFetcherCredentials() override { grpc_uri_destroy(sts_url_); }
-
TString debug_string() override {
return y_absl::StrFormat(
- "StsTokenFetcherCredentials{Path:%s,Authority:%s,%s}", sts_url_->path,
- sts_url_->authority,
+ "StsTokenFetcherCredentials{Path:%s,Authority:%s,%s}", sts_url_.path(),
+ sts_url_.authority(),
grpc_oauth2_token_fetcher_credentials::debug_string());
}
@@ -577,11 +576,11 @@ class StsTokenFetcherCredentials
const_cast<char*>("application/x-www-form-urlencoded")};
grpc_httpcli_request request;
memset(&request, 0, sizeof(grpc_httpcli_request));
- request.host = (char*)sts_url_->authority;
- request.http.path = (char*)sts_url_->path;
+ request.host = const_cast<char*>(sts_url_.authority().c_str());
+ request.http.path = const_cast<char*>(sts_url_.path().c_str());
request.http.hdr_count = 1;
request.http.hdrs = &header;
- request.handshaker = (strcmp(sts_url_->scheme, "https") == 0)
+ request.handshaker = (sts_url_.scheme() == "https")
? &grpc_httpcli_ssl
: &grpc_httpcli_plaintext;
/* TODO(ctiller): Carry the resource_quota in ctx and share it with the host
@@ -641,7 +640,7 @@ class StsTokenFetcherCredentials
return cleanup();
}
- grpc_uri* sts_url_;
+ URI sts_url_;
grpc_closure http_post_cb_closure_;
grpc_core::UniquePtr<char> resource_;
grpc_core::UniquePtr<char> audience_;
@@ -655,26 +654,21 @@ class StsTokenFetcherCredentials
} // namespace
-grpc_error* ValidateStsCredentialsOptions(
- const grpc_sts_credentials_options* options, grpc_uri** sts_url_out) {
- struct GrpcUriDeleter {
- void operator()(grpc_uri* uri) { grpc_uri_destroy(uri); }
- };
- *sts_url_out = nullptr;
+y_absl::StatusOr<URI> ValidateStsCredentialsOptions(
+ const grpc_sts_credentials_options* options) {
y_absl::InlinedVector<grpc_error*, 3> error_list;
- std::unique_ptr<grpc_uri, GrpcUriDeleter> sts_url(
- options->token_exchange_service_uri != nullptr
- ? grpc_uri_parse(options->token_exchange_service_uri, false)
- : nullptr);
- if (sts_url == nullptr) {
+ y_absl::StatusOr<URI> sts_url =
+ URI::Parse(options->token_exchange_service_uri == nullptr
+ ? ""
+ : options->token_exchange_service_uri);
+ if (!sts_url.ok()) {
+ error_list.push_back(GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrFormat("Invalid or missing STS endpoint URL. Error: %s",
+ sts_url.status().ToString())
+ .c_str()));
+ } else if (sts_url->scheme() != "https" && sts_url->scheme() != "http") {
error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid or missing STS endpoint URL"));
- } else {
- if (strcmp(sts_url->scheme, "https") != 0 &&
- strcmp(sts_url->scheme, "http") != 0) {
- error_list.push_back(GRPC_ERROR_CREATE_FROM_STATIC_STRING(
- "Invalid URI scheme, must be https to http."));
- }
+ "Invalid URI scheme, must be https to http."));
}
if (options->subject_token_path == nullptr ||
strlen(options->subject_token_path) == 0) {
@@ -687,12 +681,13 @@ grpc_error* ValidateStsCredentialsOptions(
"subject_token_type needs to be specified"));
}
if (error_list.empty()) {
- *sts_url_out = sts_url.release();
- return GRPC_ERROR_NONE;
- } else {
- return GRPC_ERROR_CREATE_FROM_VECTOR("Invalid STS Credentials Options",
- &error_list);
+ return sts_url;
}
+ auto grpc_error_vec = GRPC_ERROR_CREATE_FROM_VECTOR(
+ "Invalid STS Credentials Options", &error_list);
+ auto retval = y_absl::InvalidArgumentError(grpc_error_string(grpc_error_vec));
+ GRPC_ERROR_UNREF(grpc_error_vec);
+ return retval;
}
} // namespace grpc_core
@@ -700,17 +695,15 @@ grpc_error* ValidateStsCredentialsOptions(
grpc_call_credentials* grpc_sts_credentials_create(
const grpc_sts_credentials_options* options, void* reserved) {
GPR_ASSERT(reserved == nullptr);
- grpc_uri* sts_url;
- grpc_error* error =
- grpc_core::ValidateStsCredentialsOptions(options, &sts_url);
- if (error != GRPC_ERROR_NONE) {
+ y_absl::StatusOr<grpc_core::URI> sts_url =
+ grpc_core::ValidateStsCredentialsOptions(options);
+ if (!sts_url.ok()) {
gpr_log(GPR_ERROR, "STS Credentials creation failed. Error: %s.",
- grpc_error_string(error));
- GRPC_ERROR_UNREF(error);
+ sts_url.status().ToString().c_str());
return nullptr;
}
return grpc_core::MakeRefCounted<grpc_core::StsTokenFetcherCredentials>(
- sts_url, options)
+ std::move(*sts_url), options)
.release();
}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
index fd886405cff..517291567fe 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
@@ -107,7 +107,8 @@ class grpc_oauth2_token_fetcher_credentials : public grpc_call_credentials {
class grpc_google_refresh_token_credentials final
: public grpc_oauth2_token_fetcher_credentials {
public:
- grpc_google_refresh_token_credentials(grpc_auth_refresh_token refresh_token);
+ explicit grpc_google_refresh_token_credentials(
+ grpc_auth_refresh_token refresh_token);
~grpc_google_refresh_token_credentials() override;
const grpc_auth_refresh_token& refresh_token() const {
@@ -130,7 +131,7 @@ class grpc_google_refresh_token_credentials final
// Access token credentials.
class grpc_access_token_credentials final : public grpc_call_credentials {
public:
- grpc_access_token_credentials(const char* access_token);
+ explicit grpc_access_token_credentials(const char* access_token);
~grpc_access_token_credentials() override;
bool get_request_metadata(grpc_polling_entity* pollent,
@@ -164,8 +165,8 @@ namespace grpc_core {
// Exposed for testing only. This function validates the options, ensuring that
// the required fields are set, and outputs the parsed URL of the STS token
// exchanged service.
-grpc_error* ValidateStsCredentialsOptions(
- const grpc_sts_credentials_options* options, grpc_uri** sts_url);
+y_absl::StatusOr<URI> ValidateStsCredentialsOptions(
+ const grpc_sts_credentials_options* options);
} // namespace grpc_core
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/plugin/plugin_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/plugin/plugin_credentials.cc
index 40d8fec6e4b..5d2e53178c3 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/plugin/plugin_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/plugin/plugin_credentials.cc
@@ -224,7 +224,7 @@ bool grpc_plugin_credentials::get_request_metadata(
grpc_slice_unref_internal(creds_md[i].key);
grpc_slice_unref_internal(creds_md[i].value);
}
- gpr_free((void*)error_details);
+ gpr_free(const_cast<char*>(error_details));
gpr_free(request);
}
return retval;
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.cc
index 3bb7790f5c9..469eb0cfcfd 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.cc
@@ -38,8 +38,8 @@ void grpc_tsi_ssl_pem_key_cert_pairs_destroy(tsi_ssl_pem_key_cert_pair* kp,
size_t num_key_cert_pairs) {
if (kp == nullptr) return;
for (size_t i = 0; i < num_key_cert_pairs; i++) {
- gpr_free((void*)kp[i].private_key);
- gpr_free((void*)kp[i].cert_chain);
+ gpr_free(const_cast<char*>(kp[i].private_key));
+ gpr_free(const_cast<char*>(kp[i].cert_chain));
}
gpr_free(kp);
}
@@ -87,7 +87,7 @@ grpc_ssl_credentials::create_security_connector(
return sc;
}
grpc_arg new_arg = grpc_channel_arg_string_create(
- (char*)GRPC_ARG_HTTP2_SCHEME, (char*)"https");
+ const_cast<char*>(GRPC_ARG_HTTP2_SCHEME), const_cast<char*>("https"));
*new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1);
return sc;
}
@@ -190,7 +190,8 @@ grpc_ssl_server_credentials::~grpc_ssl_server_credentials() {
gpr_free(config_.pem_root_certs);
}
grpc_core::RefCountedPtr<grpc_server_security_connector>
-grpc_ssl_server_credentials::create_security_connector() {
+grpc_ssl_server_credentials::create_security_connector(
+ const grpc_channel_args* /* args */) {
return grpc_ssl_server_security_connector_create(this->Ref());
}
@@ -262,8 +263,8 @@ void grpc_ssl_server_certificate_config_destroy(
grpc_ssl_server_certificate_config* config) {
if (config == nullptr) return;
for (size_t i = 0; i < config->num_key_cert_pairs; i++) {
- gpr_free((void*)config->pem_key_cert_pairs[i].private_key);
- gpr_free((void*)config->pem_key_cert_pairs[i].cert_chain);
+ gpr_free(const_cast<char*>(config->pem_key_cert_pairs[i].private_key));
+ gpr_free(const_cast<char*>(config->pem_key_cert_pairs[i].cert_chain));
}
gpr_free(config->pem_key_cert_pairs);
gpr_free(config->pem_root_certs);
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.h
index 4c90813f8d2..0491eea7002 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/ssl/ssl_credentials.h
@@ -64,12 +64,12 @@ struct grpc_ssl_server_certificate_config_fetcher {
class grpc_ssl_server_credentials final : public grpc_server_credentials {
public:
- grpc_ssl_server_credentials(
+ explicit grpc_ssl_server_credentials(
const grpc_ssl_server_credentials_options& options);
~grpc_ssl_server_credentials() override;
grpc_core::RefCountedPtr<grpc_server_security_connector>
- create_security_connector() override;
+ create_security_connector(const grpc_channel_args* /* args */) override;
bool has_cert_config_fetcher() const {
return certificate_config_fetcher_.cb != nullptr;
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc
index a925cf613e4..9c1bbb49206 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc
@@ -26,7 +26,7 @@
void grpc_tls_certificate_distributor::SetKeyMaterials(
const TString& cert_name, y_absl::optional<TString> pem_root_certs,
- y_absl::optional<PemKeyCertPairList> pem_key_cert_pairs) {
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs) {
GPR_ASSERT(pem_root_certs.has_value() || pem_key_cert_pairs.has_value());
grpc_core::MutexLock lock(&mu_);
auto& cert_info = certificate_info_map_[cert_name];
@@ -38,14 +38,17 @@ void grpc_tls_certificate_distributor::SetKeyMaterials(
const auto watcher_it = watchers_.find(watcher_ptr);
GPR_ASSERT(watcher_it != watchers_.end());
GPR_ASSERT(watcher_it->second.root_cert_name.has_value());
- y_absl::optional<PemKeyCertPairList> pem_key_cert_pairs_to_report;
+ y_absl::optional<grpc_core::PemKeyCertPairList>
+ pem_key_cert_pairs_to_report;
if (pem_key_cert_pairs.has_value() &&
watcher_it->second.identity_cert_name == cert_name) {
pem_key_cert_pairs_to_report = pem_key_cert_pairs;
} else if (watcher_it->second.identity_cert_name.has_value()) {
auto& identity_cert_info =
certificate_info_map_[*watcher_it->second.identity_cert_name];
- pem_key_cert_pairs_to_report = identity_cert_info.pem_key_cert_pairs;
+ if (!identity_cert_info.pem_key_cert_pairs.empty()) {
+ pem_key_cert_pairs_to_report = identity_cert_info.pem_key_cert_pairs;
+ }
}
watcher_ptr->OnCertificatesChanged(
pem_root_certs, std::move(pem_key_cert_pairs_to_report));
@@ -69,7 +72,9 @@ void grpc_tls_certificate_distributor::SetKeyMaterials(
} else if (watcher_it->second.root_cert_name.has_value()) {
auto& root_cert_info =
certificate_info_map_[*watcher_it->second.root_cert_name];
- pem_root_certs_to_report = root_cert_info.pem_root_certs;
+ if (!root_cert_info.pem_root_certs.empty()) {
+ pem_root_certs_to_report = root_cert_info.pem_root_certs;
+ }
}
watcher_ptr->OnCertificatesChanged(pem_root_certs_to_report,
pem_key_cert_pairs);
@@ -188,7 +193,7 @@ void grpc_tls_certificate_distributor::WatchTlsCertificates(
watchers_[watcher_ptr] = {std::move(watcher), root_cert_name,
identity_cert_name};
y_absl::optional<y_absl::string_view> updated_root_certs;
- y_absl::optional<PemKeyCertPairList> updated_identity_pairs;
+ y_absl::optional<grpc_core::PemKeyCertPairList> updated_identity_pairs;
grpc_error* root_error = GRPC_ERROR_NONE;
grpc_error* identity_error = GRPC_ERROR_NONE;
if (root_cert_name.has_value()) {
@@ -319,3 +324,23 @@ void grpc_tls_certificate_distributor::CancelTlsCertificatesWatch(
}
}
};
+
+/** -- Wrapper APIs declared in grpc_security.h -- **/
+
+grpc_tls_identity_pairs* grpc_tls_identity_pairs_create() {
+ return new grpc_tls_identity_pairs();
+}
+
+void grpc_tls_identity_pairs_add_pair(grpc_tls_identity_pairs* pairs,
+ const char* private_key,
+ const char* cert_chain) {
+ GPR_ASSERT(pairs != nullptr);
+ GPR_ASSERT(private_key != nullptr);
+ GPR_ASSERT(cert_chain != nullptr);
+ pairs->pem_key_cert_pairs.emplace_back(private_key, cert_chain);
+}
+
+void grpc_tls_identity_pairs_destroy(grpc_tls_identity_pairs* pairs) {
+ GPR_ASSERT(pairs != nullptr);
+ delete pairs;
+}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h
index 15d76da420e..957a452513f 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h
@@ -21,17 +21,21 @@
#include <grpc/grpc_security.h>
+#include <utility>
+
#include "y_absl/container/inlined_vector.h"
#include "y_absl/types/optional.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/security/security_connector/ssl_utils.h"
+struct grpc_tls_identity_pairs {
+ grpc_core::PemKeyCertPairList pem_key_cert_pairs;
+};
+
// TLS certificate distributor.
struct grpc_tls_certificate_distributor
: public grpc_core::RefCounted<grpc_tls_certificate_distributor> {
public:
- typedef y_absl::InlinedVector<grpc_core::PemKeyCertPair, 1> PemKeyCertPairList;
-
// Interface for watching TLS certificates update.
class TlsCertificatesWatcherInterface {
public:
@@ -48,7 +52,7 @@ struct grpc_tls_certificate_distributor
// pairs.
virtual void OnCertificatesChanged(
y_absl::optional<y_absl::string_view> root_certs,
- y_absl::optional<PemKeyCertPairList> key_cert_pairs) = 0;
+ y_absl::optional<grpc_core::PemKeyCertPairList> key_cert_pairs) = 0;
// Handles an error that occurs while attempting to fetch certificate data.
// Note that if a watcher sees an error, it simply means the Provider is
@@ -68,19 +72,14 @@ struct grpc_tls_certificate_distributor
grpc_error* identity_cert_error) = 0;
};
- // Sets the key materials based on their certificate name. Note that we are
- // not doing any copies for pem_root_certs and pem_key_cert_pairs. For
- // pem_root_certs, the original string contents need to outlive the
- // distributor; for pem_key_cert_pairs, internally it is taking two
- // unique_ptr(s) to the credential string, so the ownership is actually
- // transferred.
+ // Sets the key materials based on their certificate name.
//
// @param cert_name The name of the certificates being updated.
// @param pem_root_certs The content of root certificates.
// @param pem_key_cert_pairs The content of identity key-cert pairs.
- void SetKeyMaterials(const TString& cert_name,
- y_absl::optional<TString> pem_root_certs,
- y_absl::optional<PemKeyCertPairList> pem_key_cert_pairs);
+ void SetKeyMaterials(
+ const TString& cert_name, y_absl::optional<TString> pem_root_certs,
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs);
bool HasRootCerts(const TString& root_cert_name);
@@ -127,7 +126,7 @@ struct grpc_tls_certificate_distributor
void SetWatchStatusCallback(
std::function<void(TString, bool, bool)> callback) {
grpc_core::MutexLock lock(&mu_);
- watch_status_callback_ = callback;
+ watch_status_callback_ = std::move(callback);
};
// Registers a watcher. The caller may keep a raw pointer to the watcher,
@@ -168,7 +167,7 @@ struct grpc_tls_certificate_distributor
// The contents of the root certificates.
TString pem_root_certs;
// The contents of the identity key-certificate pairs.
- PemKeyCertPairList pem_key_cert_pairs;
+ grpc_core::PemKeyCertPairList pem_key_cert_pairs;
// The root cert reloading error propagated by the caller.
grpc_error* root_cert_error = GRPC_ERROR_NONE;
// The identity cert reloading error propagated by the caller.
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc
new file mode 100644
index 00000000000..e3935e1ac43
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc
@@ -0,0 +1,399 @@
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
+
+#include <grpc/support/alloc.h>
+#include <grpc/support/log.h>
+#include <grpc/support/string_util.h>
+
+#include "src/core/lib/gprpp/stat.h"
+#include "src/core/lib/slice/slice_internal.h"
+#include "src/core/lib/surface/api_trace.h"
+
+namespace grpc_core {
+
+StaticDataCertificateProvider::StaticDataCertificateProvider(
+ TString root_certificate,
+ grpc_core::PemKeyCertPairList pem_key_cert_pairs)
+ : distributor_(MakeRefCounted<grpc_tls_certificate_distributor>()),
+ root_certificate_(std::move(root_certificate)),
+ pem_key_cert_pairs_(std::move(pem_key_cert_pairs)) {
+ distributor_->SetWatchStatusCallback([this](TString cert_name,
+ bool root_being_watched,
+ bool identity_being_watched) {
+ grpc_core::MutexLock lock(&mu_);
+ y_absl::optional<TString> root_certificate;
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs;
+ StaticDataCertificateProvider::WatcherInfo& info = watcher_info_[cert_name];
+ if (!info.root_being_watched && root_being_watched &&
+ !root_certificate_.empty()) {
+ root_certificate = root_certificate_;
+ }
+ info.root_being_watched = root_being_watched;
+ if (!info.identity_being_watched && identity_being_watched &&
+ !pem_key_cert_pairs_.empty()) {
+ pem_key_cert_pairs = pem_key_cert_pairs_;
+ }
+ info.identity_being_watched = identity_being_watched;
+ if (!info.root_being_watched && !info.identity_being_watched) {
+ watcher_info_.erase(cert_name);
+ }
+ const bool root_has_update = root_certificate.has_value();
+ const bool identity_has_update = pem_key_cert_pairs.has_value();
+ if (root_has_update || identity_has_update) {
+ distributor_->SetKeyMaterials(cert_name, std::move(root_certificate),
+ std::move(pem_key_cert_pairs));
+ }
+ grpc_error* root_cert_error = GRPC_ERROR_NONE;
+ grpc_error* identity_cert_error = GRPC_ERROR_NONE;
+ if (root_being_watched && !root_has_update) {
+ root_cert_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unable to get latest root certificates.");
+ }
+ if (identity_being_watched && !identity_has_update) {
+ identity_cert_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unable to get latest identity certificates.");
+ }
+ if (root_cert_error != GRPC_ERROR_NONE ||
+ identity_cert_error != GRPC_ERROR_NONE) {
+ distributor_->SetErrorForCert(cert_name, root_cert_error,
+ identity_cert_error);
+ }
+ });
+}
+
+StaticDataCertificateProvider::~StaticDataCertificateProvider() {
+ // Reset distributor's callback to make sure the callback won't be invoked
+ // again after this object(provider) is destroyed.
+ distributor_->SetWatchStatusCallback(nullptr);
+}
+
+namespace {
+
+gpr_timespec TimeoutSecondsToDeadline(int64_t seconds) {
+ return gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC),
+ gpr_time_from_seconds(seconds, GPR_TIMESPAN));
+}
+
+} // namespace
+
+FileWatcherCertificateProvider::FileWatcherCertificateProvider(
+ TString private_key_path, TString identity_certificate_path,
+ TString root_cert_path, unsigned int refresh_interval_sec)
+ : private_key_path_(std::move(private_key_path)),
+ identity_certificate_path_(std::move(identity_certificate_path)),
+ root_cert_path_(std::move(root_cert_path)),
+ refresh_interval_sec_(refresh_interval_sec),
+ distributor_(MakeRefCounted<grpc_tls_certificate_distributor>()) {
+ // Private key and identity cert files must be both set or both unset.
+ GPR_ASSERT(private_key_path_.empty() == identity_certificate_path_.empty());
+ // Must be watching either root or identity certs.
+ GPR_ASSERT(!private_key_path_.empty() || !root_cert_path_.empty());
+ gpr_event_init(&shutdown_event_);
+ ForceUpdate();
+ auto thread_lambda = [](void* arg) {
+ FileWatcherCertificateProvider* provider =
+ static_cast<FileWatcherCertificateProvider*>(arg);
+ GPR_ASSERT(provider != nullptr);
+ while (true) {
+ void* value = gpr_event_wait(
+ &provider->shutdown_event_,
+ TimeoutSecondsToDeadline(provider->refresh_interval_sec_));
+ if (value != nullptr) {
+ return;
+ };
+ provider->ForceUpdate();
+ }
+ };
+ refresh_thread_ = grpc_core::Thread(
+ "FileWatcherCertificateProvider_refreshing_thread", thread_lambda, this);
+ refresh_thread_.Start();
+ distributor_->SetWatchStatusCallback([this](TString cert_name,
+ bool root_being_watched,
+ bool identity_being_watched) {
+ grpc_core::MutexLock lock(&mu_);
+ y_absl::optional<TString> root_certificate;
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs;
+ FileWatcherCertificateProvider::WatcherInfo& info =
+ watcher_info_[cert_name];
+ if (!info.root_being_watched && root_being_watched &&
+ !root_certificate_.empty()) {
+ root_certificate = root_certificate_;
+ }
+ info.root_being_watched = root_being_watched;
+ if (!info.identity_being_watched && identity_being_watched &&
+ !pem_key_cert_pairs_.empty()) {
+ pem_key_cert_pairs = pem_key_cert_pairs_;
+ }
+ info.identity_being_watched = identity_being_watched;
+ if (!info.root_being_watched && !info.identity_being_watched) {
+ watcher_info_.erase(cert_name);
+ }
+ ExecCtx exec_ctx;
+ if (root_certificate.has_value() || pem_key_cert_pairs.has_value()) {
+ distributor_->SetKeyMaterials(cert_name, root_certificate,
+ pem_key_cert_pairs);
+ }
+ grpc_error* root_cert_error = GRPC_ERROR_NONE;
+ grpc_error* identity_cert_error = GRPC_ERROR_NONE;
+ if (root_being_watched && !root_certificate.has_value()) {
+ root_cert_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unable to get latest root certificates.");
+ }
+ if (identity_being_watched && !pem_key_cert_pairs.has_value()) {
+ identity_cert_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unable to get latest identity certificates.");
+ }
+ if (root_cert_error != GRPC_ERROR_NONE ||
+ identity_cert_error != GRPC_ERROR_NONE) {
+ distributor_->SetErrorForCert(cert_name, root_cert_error,
+ identity_cert_error);
+ }
+ });
+}
+
+FileWatcherCertificateProvider::~FileWatcherCertificateProvider() {
+ // Reset distributor's callback to make sure the callback won't be invoked
+ // again after this object(provider) is destroyed.
+ distributor_->SetWatchStatusCallback(nullptr);
+ gpr_event_set(&shutdown_event_, reinterpret_cast<void*>(1));
+ refresh_thread_.Join();
+}
+
+void FileWatcherCertificateProvider::ForceUpdate() {
+ y_absl::optional<TString> root_certificate;
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs;
+ if (!root_cert_path_.empty()) {
+ root_certificate = ReadRootCertificatesFromFile(root_cert_path_);
+ }
+ if (!private_key_path_.empty()) {
+ pem_key_cert_pairs = ReadIdentityKeyCertPairFromFiles(
+ private_key_path_, identity_certificate_path_);
+ }
+ grpc_core::MutexLock lock(&mu_);
+ const bool root_cert_changed =
+ (!root_certificate.has_value() && !root_certificate_.empty()) ||
+ (root_certificate.has_value() && root_certificate_ != *root_certificate);
+ if (root_cert_changed) {
+ if (root_certificate.has_value()) {
+ root_certificate_ = std::move(*root_certificate);
+ } else {
+ root_certificate_ = "";
+ }
+ }
+ const bool identity_cert_changed =
+ (!pem_key_cert_pairs.has_value() && !pem_key_cert_pairs_.empty()) ||
+ (pem_key_cert_pairs.has_value() &&
+ pem_key_cert_pairs_ != *pem_key_cert_pairs);
+ if (identity_cert_changed) {
+ if (pem_key_cert_pairs.has_value()) {
+ pem_key_cert_pairs_ = std::move(*pem_key_cert_pairs);
+ } else {
+ pem_key_cert_pairs_ = {};
+ }
+ }
+ if (root_cert_changed || identity_cert_changed) {
+ ExecCtx exec_ctx;
+ grpc_error* root_cert_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unable to get latest root certificates.");
+ grpc_error* identity_cert_error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "Unable to get latest identity certificates.");
+ for (const auto& p : watcher_info_) {
+ const TString& cert_name = p.first;
+ const WatcherInfo& info = p.second;
+ y_absl::optional<TString> root_to_report;
+ y_absl::optional<grpc_core::PemKeyCertPairList> identity_to_report;
+ // Set key materials to the distributor if their contents changed.
+ if (info.root_being_watched && !root_certificate_.empty() &&
+ root_cert_changed) {
+ root_to_report = root_certificate_;
+ }
+ if (info.identity_being_watched && !pem_key_cert_pairs_.empty() &&
+ identity_cert_changed) {
+ identity_to_report = pem_key_cert_pairs_;
+ }
+ if (root_to_report.has_value() || identity_to_report.has_value()) {
+ distributor_->SetKeyMaterials(cert_name, std::move(root_to_report),
+ std::move(identity_to_report));
+ }
+ // Report errors to the distributor if the contents are empty.
+ const bool report_root_error =
+ info.root_being_watched && root_certificate_.empty();
+ const bool report_identity_error =
+ info.identity_being_watched && pem_key_cert_pairs_.empty();
+ if (report_root_error || report_identity_error) {
+ distributor_->SetErrorForCert(
+ cert_name,
+ report_root_error ? GRPC_ERROR_REF(root_cert_error)
+ : GRPC_ERROR_NONE,
+ report_identity_error ? GRPC_ERROR_REF(identity_cert_error)
+ : GRPC_ERROR_NONE);
+ }
+ }
+ GRPC_ERROR_UNREF(root_cert_error);
+ GRPC_ERROR_UNREF(identity_cert_error);
+ }
+}
+
+y_absl::optional<TString>
+FileWatcherCertificateProvider::ReadRootCertificatesFromFile(
+ const TString& root_cert_full_path) {
+ // Read the root file.
+ grpc_slice root_slice = grpc_empty_slice();
+ grpc_error* root_error =
+ grpc_load_file(root_cert_full_path.c_str(), 0, &root_slice);
+ if (root_error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "Reading file %s failed: %s",
+ root_cert_full_path.c_str(), grpc_error_string(root_error));
+ GRPC_ERROR_UNREF(root_error);
+ return y_absl::nullopt;
+ }
+ TString root_cert(StringViewFromSlice(root_slice));
+ grpc_slice_unref_internal(root_slice);
+ return root_cert;
+}
+
+namespace {
+
+// This helper function gets the last-modified time of |filename|. When failed,
+// it logs the error and returns 0.
+time_t GetModificationTime(const char* filename) {
+ time_t ts = 0;
+ y_absl::Status status = grpc_core::GetFileModificationTime(filename, &ts);
+ return ts;
+}
+
+} // namespace
+
+y_absl::optional<PemKeyCertPairList>
+FileWatcherCertificateProvider::ReadIdentityKeyCertPairFromFiles(
+ const TString& private_key_path,
+ const TString& identity_certificate_path) {
+ struct SliceWrapper {
+ grpc_slice slice = grpc_empty_slice();
+ ~SliceWrapper() { grpc_slice_unref_internal(slice); }
+ };
+ const int kNumRetryAttempts = 3;
+ for (int i = 0; i < kNumRetryAttempts; ++i) {
+ // TODO(ZhenLian): replace the timestamp approach with key-match approach
+ // once the latter is implemented.
+ // Checking the last modification of identity files before reading.
+ time_t identity_key_ts_before =
+ GetModificationTime(private_key_path.c_str());
+ if (identity_key_ts_before == 0) {
+ gpr_log(
+ GPR_ERROR,
+ "Failed to get the file's modification time of %s. Start retrying...",
+ private_key_path.c_str());
+ continue;
+ }
+ time_t identity_cert_ts_before =
+ GetModificationTime(identity_certificate_path.c_str());
+ if (identity_cert_ts_before == 0) {
+ gpr_log(
+ GPR_ERROR,
+ "Failed to get the file's modification time of %s. Start retrying...",
+ identity_certificate_path.c_str());
+ continue;
+ }
+ // Read the identity files.
+ SliceWrapper key_slice, cert_slice;
+ grpc_error* key_error =
+ grpc_load_file(private_key_path.c_str(), 0, &key_slice.slice);
+ if (key_error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "Reading file %s failed: %s. Start retrying...",
+ private_key_path.c_str(), grpc_error_string(key_error));
+ GRPC_ERROR_UNREF(key_error);
+ continue;
+ }
+ grpc_error* cert_error =
+ grpc_load_file(identity_certificate_path.c_str(), 0, &cert_slice.slice);
+ if (cert_error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR, "Reading file %s failed: %s. Start retrying...",
+ identity_certificate_path.c_str(), grpc_error_string(cert_error));
+ GRPC_ERROR_UNREF(cert_error);
+ continue;
+ }
+ TString private_key(StringViewFromSlice(key_slice.slice));
+ TString cert_chain(StringViewFromSlice(cert_slice.slice));
+ PemKeyCertPairList identity_pairs;
+ identity_pairs.emplace_back(private_key, cert_chain);
+ // Checking the last modification of identity files before reading.
+ time_t identity_key_ts_after =
+ GetModificationTime(private_key_path.c_str());
+ if (identity_key_ts_before != identity_key_ts_after) {
+ gpr_log(GPR_ERROR,
+ "Last modified time before and after reading %s is not the same. "
+ "Start retrying...",
+ private_key_path.c_str());
+ continue;
+ }
+ time_t identity_cert_ts_after =
+ GetModificationTime(identity_certificate_path.c_str());
+ if (identity_cert_ts_before != identity_cert_ts_after) {
+ gpr_log(GPR_ERROR,
+ "Last modified time before and after reading %s is not the same. "
+ "Start retrying...",
+ identity_certificate_path.c_str());
+ continue;
+ }
+ return identity_pairs;
+ }
+ gpr_log(GPR_ERROR,
+ "All retry attempts failed. Will try again after the next interval.");
+ return y_absl::nullopt;
+}
+
+} // namespace grpc_core
+
+/** -- Wrapper APIs declared in grpc_security.h -- **/
+
+grpc_tls_certificate_provider* grpc_tls_certificate_provider_static_data_create(
+ const char* root_certificate, grpc_tls_identity_pairs* pem_key_cert_pairs) {
+ GPR_ASSERT(root_certificate != nullptr || pem_key_cert_pairs != nullptr);
+ grpc_core::PemKeyCertPairList identity_pairs_core;
+ if (pem_key_cert_pairs != nullptr) {
+ identity_pairs_core = std::move(pem_key_cert_pairs->pem_key_cert_pairs);
+ delete pem_key_cert_pairs;
+ }
+ TString root_cert_core;
+ if (root_certificate != nullptr) {
+ root_cert_core = root_certificate;
+ }
+ return new grpc_core::StaticDataCertificateProvider(
+ std::move(root_cert_core), std::move(identity_pairs_core));
+}
+
+grpc_tls_certificate_provider*
+grpc_tls_certificate_provider_file_watcher_create(
+ const char* private_key_path, const char* identity_certificate_path,
+ const char* root_cert_path, unsigned int refresh_interval_sec) {
+ return new grpc_core::FileWatcherCertificateProvider(
+ private_key_path == nullptr ? "" : private_key_path,
+ identity_certificate_path == nullptr ? "" : identity_certificate_path,
+ root_cert_path == nullptr ? "" : root_cert_path, refresh_interval_sec);
+}
+
+void grpc_tls_certificate_provider_release(
+ grpc_tls_certificate_provider* provider) {
+ GRPC_API_TRACE("grpc_tls_certificate_provider_release(provider=%p)", 1,
+ (provider));
+ grpc_core::ExecCtx exec_ctx;
+ if (provider != nullptr) provider->Unref();
+}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h
new file mode 100644
index 00000000000..c51e35f6308
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h
@@ -0,0 +1,138 @@
+//
+// 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.
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_PROVIDER_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_PROVIDER_H
+
+#include <grpc/support/port_platform.h>
+
+#include <grpc/grpc_security.h>
+#include <string.h>
+
+#include "y_absl/container/inlined_vector.h"
+
+#include "src/core/lib/gprpp/ref_counted.h"
+#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/gprpp/thd.h"
+#include "src/core/lib/iomgr/load_file.h"
+#include "src/core/lib/iomgr/pollset_set.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h"
+#include "src/core/lib/security/security_connector/ssl_utils.h"
+
+// Interface for a grpc_tls_certificate_provider that handles the process to
+// fetch credentials and validation contexts. Implementations are free to rely
+// on local or remote sources to fetch the latest secrets, and free to share any
+// state among different instances as they deem fit.
+//
+// On creation, grpc_tls_certificate_provider creates a
+// grpc_tls_certificate_distributor object. When the credentials and validation
+// contexts become valid or changed, a grpc_tls_certificate_provider should
+// notify its distributor so as to propagate the update to the watchers.
+struct grpc_tls_certificate_provider
+ : public grpc_core::RefCounted<grpc_tls_certificate_provider> {
+ public:
+ virtual grpc_pollset_set* interested_parties() const { return nullptr; }
+
+ virtual grpc_core::RefCountedPtr<grpc_tls_certificate_distributor>
+ distributor() const = 0;
+};
+
+namespace grpc_core {
+
+// A basic provider class that will get credentials from string during
+// initialization.
+class StaticDataCertificateProvider final
+ : public grpc_tls_certificate_provider {
+ public:
+ StaticDataCertificateProvider(
+ TString root_certificate,
+ grpc_core::PemKeyCertPairList pem_key_cert_pairs);
+
+ ~StaticDataCertificateProvider() override;
+
+ RefCountedPtr<grpc_tls_certificate_distributor> distributor() const override {
+ return distributor_;
+ }
+
+ private:
+ struct WatcherInfo {
+ bool root_being_watched = false;
+ bool identity_being_watched = false;
+ };
+ RefCountedPtr<grpc_tls_certificate_distributor> distributor_;
+ TString root_certificate_;
+ grpc_core::PemKeyCertPairList pem_key_cert_pairs_;
+ // Guards members below.
+ grpc_core::Mutex mu_;
+ // Stores each cert_name we get from the distributor callback and its watcher
+ // information.
+ std::map<TString, WatcherInfo> watcher_info_;
+};
+
+// A provider class that will watch the credential changes on the file system.
+class FileWatcherCertificateProvider final
+ : public grpc_tls_certificate_provider {
+ public:
+ FileWatcherCertificateProvider(TString private_key_path,
+ TString identity_certificate_path,
+ TString root_cert_path,
+ unsigned int refresh_interval_sec);
+
+ ~FileWatcherCertificateProvider() override;
+
+ RefCountedPtr<grpc_tls_certificate_distributor> distributor() const override {
+ return distributor_;
+ }
+
+ private:
+ struct WatcherInfo {
+ bool root_being_watched = false;
+ bool identity_being_watched = false;
+ };
+ // Force an update from the file system regardless of the interval.
+ void ForceUpdate();
+ // Read the root certificates from files and update the distributor.
+ y_absl::optional<TString> ReadRootCertificatesFromFile(
+ const TString& root_cert_full_path);
+ // Read the root certificates from files and update the distributor.
+ y_absl::optional<PemKeyCertPairList> ReadIdentityKeyCertPairFromFiles(
+ const TString& private_key_path,
+ const TString& identity_certificate_path);
+
+ // Information that is used by the refreshing thread.
+ TString private_key_path_;
+ TString identity_certificate_path_;
+ TString root_cert_path_;
+ unsigned int refresh_interval_sec_ = 0;
+
+ RefCountedPtr<grpc_tls_certificate_distributor> distributor_;
+ grpc_core::Thread refresh_thread_;
+ gpr_event shutdown_event_;
+
+ // Guards members below.
+ grpc_core::Mutex mu_;
+ // The most-recent credential data. It will be empty if the most recent read
+ // attempt failed.
+ TString root_certificate_;
+ grpc_core::PemKeyCertPairList pem_key_cert_pairs_;
+ // Stores each cert_name we get from the distributor callback and its watcher
+ // information.
+ std::map<TString, WatcherInfo> watcher_info_;
+};
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CERTIFICATE_PROVIDER_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
index 906a2f02099..cf2b4c60df9 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc
@@ -27,49 +27,7 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
-/** -- gRPC TLS key materials config API implementation. -- **/
-void grpc_tls_key_materials_config::set_key_materials(
- const char* pem_root_certs,
- const grpc_ssl_pem_key_cert_pair** pem_key_cert_pairs,
- size_t num_key_cert_pairs) {
- this->set_pem_root_certs(pem_root_certs);
- grpc_tls_key_materials_config::PemKeyCertPairList cert_pair_list;
- for (size_t i = 0; i < num_key_cert_pairs; i++) {
- auto current_pair = static_cast<grpc_ssl_pem_key_cert_pair*>(
- gpr_zalloc(sizeof(grpc_ssl_pem_key_cert_pair)));
- current_pair->cert_chain = gpr_strdup(pem_key_cert_pairs[i]->cert_chain);
- current_pair->private_key = gpr_strdup(pem_key_cert_pairs[i]->private_key);
- cert_pair_list.emplace_back(grpc_core::PemKeyCertPair(current_pair));
- }
- pem_key_cert_pair_list_ = std::move(cert_pair_list);
-}
-
-void grpc_tls_key_materials_config::set_key_materials(
- const char* pem_root_certs,
- const PemKeyCertPairList& pem_key_cert_pair_list) {
- this->set_pem_root_certs(pem_root_certs);
- grpc_tls_key_materials_config::PemKeyCertPairList dup_list(
- pem_key_cert_pair_list);
- pem_key_cert_pair_list_ = std::move(dup_list);
-}
-
-/** -- gRPC TLS credential reload config API implementation. -- **/
-grpc_tls_credential_reload_config::grpc_tls_credential_reload_config(
- const void* config_user_data,
- int (*schedule)(void* config_user_data,
- grpc_tls_credential_reload_arg* arg),
- void (*cancel)(void* config_user_data, grpc_tls_credential_reload_arg* arg),
- void (*destruct)(void* config_user_data))
- : config_user_data_(const_cast<void*>(config_user_data)),
- schedule_(schedule),
- cancel_(cancel),
- destruct_(destruct) {}
-
-grpc_tls_credential_reload_config::~grpc_tls_credential_reload_config() {
- if (destruct_ != nullptr) {
- destruct_((void*)config_user_data_);
- }
-}
+#include "src/core/lib/surface/api_trace.h"
/** -- gRPC TLS server authorization check API implementation. -- **/
grpc_tls_server_authorization_check_config::
@@ -88,142 +46,103 @@ grpc_tls_server_authorization_check_config::
grpc_tls_server_authorization_check_config::
~grpc_tls_server_authorization_check_config() {
if (destruct_ != nullptr) {
- destruct_((void*)config_user_data_);
+ destruct_(config_user_data_);
}
}
+int grpc_tls_server_authorization_check_config::Schedule(
+ grpc_tls_server_authorization_check_arg* arg) const {
+ if (schedule_ == nullptr) {
+ gpr_log(GPR_ERROR, "schedule API is nullptr");
+ if (arg != nullptr) {
+ arg->status = GRPC_STATUS_NOT_FOUND;
+ arg->error_details->set_error_details(
+ "schedule API in server authorization check config is nullptr");
+ }
+ return 1;
+ }
+ if (arg != nullptr && context_ != nullptr) {
+ arg->config = const_cast<grpc_tls_server_authorization_check_config*>(this);
+ }
+ return schedule_(config_user_data_, arg);
+}
+
+void grpc_tls_server_authorization_check_config::Cancel(
+ grpc_tls_server_authorization_check_arg* arg) const {
+ if (cancel_ == nullptr) {
+ gpr_log(GPR_ERROR, "cancel API is nullptr.");
+ if (arg != nullptr) {
+ arg->status = GRPC_STATUS_NOT_FOUND;
+ arg->error_details->set_error_details(
+ "schedule API in server authorization check config is nullptr");
+ }
+ return;
+ }
+ if (arg != nullptr) {
+ arg->config = const_cast<grpc_tls_server_authorization_check_config*>(this);
+ }
+ cancel_(config_user_data_, arg);
+}
+
/** -- Wrapper APIs declared in grpc_security.h -- **/
+
grpc_tls_credentials_options* grpc_tls_credentials_options_create() {
return new grpc_tls_credentials_options();
}
-int grpc_tls_credentials_options_set_cert_request_type(
+void grpc_tls_credentials_options_set_cert_request_type(
grpc_tls_credentials_options* options,
grpc_ssl_client_certificate_request_type type) {
- if (options == nullptr) {
- gpr_log(GPR_ERROR,
- "Invalid nullptr arguments to "
- "grpc_tls_credentials_options_set_cert_request_type()");
- return 0;
- }
+ GPR_ASSERT(options != nullptr);
options->set_cert_request_type(type);
- return 1;
}
-int grpc_tls_credentials_options_set_server_verification_option(
+void grpc_tls_credentials_options_set_server_verification_option(
grpc_tls_credentials_options* options,
grpc_tls_server_verification_option server_verification_option) {
- if (options == nullptr) {
- gpr_log(GPR_ERROR,
- "Invalid nullptr arguments to "
- "grpc_tls_credentials_options_set_server_verification_option()");
- return 0;
- }
- if (server_verification_option != GRPC_TLS_SERVER_VERIFICATION &&
- options->server_authorization_check_config() == nullptr) {
- gpr_log(GPR_ERROR,
- "server_authorization_check_config needs to be specified when"
- "server_verification_option is not GRPC_TLS_SERVER_VERIFICATION");
- return 0;
- }
+ GPR_ASSERT(options != nullptr);
options->set_server_verification_option(server_verification_option);
- return 1;
}
-int grpc_tls_credentials_options_set_key_materials_config(
+void grpc_tls_credentials_options_set_certificate_provider(
grpc_tls_credentials_options* options,
- grpc_tls_key_materials_config* config) {
- if (options == nullptr || config == nullptr) {
- gpr_log(GPR_ERROR,
- "Invalid nullptr arguments to "
- "grpc_tls_credentials_options_set_key_materials_config()");
- return 0;
- }
- options->set_key_materials_config(config->Ref());
- return 1;
+ grpc_tls_certificate_provider* provider) {
+ GPR_ASSERT(options != nullptr);
+ GPR_ASSERT(provider != nullptr);
+ options->set_certificate_provider(
+ provider->Ref(DEBUG_LOCATION, "set_certificate_provider"));
}
-int grpc_tls_credentials_options_set_credential_reload_config(
- grpc_tls_credentials_options* options,
- grpc_tls_credential_reload_config* config) {
- if (options == nullptr || config == nullptr) {
- gpr_log(GPR_ERROR,
- "Invalid nullptr arguments to "
- "grpc_tls_credentials_options_set_credential_reload_config()");
- return 0;
- }
- options->set_credential_reload_config(config->Ref());
- return 1;
+void grpc_tls_credentials_options_watch_root_certs(
+ grpc_tls_credentials_options* options) {
+ GPR_ASSERT(options != nullptr);
+ options->set_watch_root_cert(true);
}
-int grpc_tls_credentials_options_set_server_authorization_check_config(
- grpc_tls_credentials_options* options,
- grpc_tls_server_authorization_check_config* config) {
- if (options == nullptr || config == nullptr) {
- gpr_log(
- GPR_ERROR,
- "Invalid nullptr arguments to "
- "grpc_tls_credentials_options_set_server_authorization_check_config()");
- return 0;
- }
- options->set_server_authorization_check_config(config->Ref());
- return 1;
+void grpc_tls_credentials_options_set_root_cert_name(
+ grpc_tls_credentials_options* options, const char* root_cert_name) {
+ GPR_ASSERT(options != nullptr);
+ options->set_root_cert_name(root_cert_name);
}
-grpc_tls_key_materials_config* grpc_tls_key_materials_config_create() {
- return new grpc_tls_key_materials_config();
+void grpc_tls_credentials_options_watch_identity_key_cert_pairs(
+ grpc_tls_credentials_options* options) {
+ GPR_ASSERT(options != nullptr);
+ options->set_watch_identity_pair(true);
}
-int grpc_tls_key_materials_config_set_key_materials(
- grpc_tls_key_materials_config* config, const char* root_certs,
- const grpc_ssl_pem_key_cert_pair** key_cert_pairs, size_t num) {
- if (config == nullptr || key_cert_pairs == nullptr || num == 0) {
- gpr_log(GPR_ERROR,
- "Invalid arguments to "
- "grpc_tls_key_materials_config_set_key_materials()");
- return 0;
- }
- config->set_key_materials(root_certs, key_cert_pairs, num);
- return 1;
+void grpc_tls_credentials_options_set_identity_cert_name(
+ grpc_tls_credentials_options* options, const char* identity_cert_name) {
+ GPR_ASSERT(options != nullptr);
+ options->set_identity_cert_name(identity_cert_name);
}
-int grpc_tls_key_materials_config_set_version(
- grpc_tls_key_materials_config* config, int version) {
- if (config == nullptr) {
- gpr_log(GPR_ERROR,
- "Invalid arguments to "
- "grpc_tls_key_materials_config_set_version()");
- return 0;
- }
- config->set_version(version);
- return 1;
-}
-
-int grpc_tls_key_materials_config_get_version(
- grpc_tls_key_materials_config* config) {
- if (config == nullptr) {
- gpr_log(GPR_ERROR,
- "Invalid arguments to "
- "grpc_tls_key_materials_config_get_version()");
- return -1;
- }
- return config->version();
-}
-
-grpc_tls_credential_reload_config* grpc_tls_credential_reload_config_create(
- const void* config_user_data,
- int (*schedule)(void* config_user_data,
- grpc_tls_credential_reload_arg* arg),
- void (*cancel)(void* config_user_data, grpc_tls_credential_reload_arg* arg),
- void (*destruct)(void* config_user_data)) {
- if (schedule == nullptr) {
- gpr_log(
- GPR_ERROR,
- "Schedule API is nullptr in creating TLS credential reload config.");
- return nullptr;
- }
- return new grpc_tls_credential_reload_config(config_user_data, schedule,
- cancel, destruct);
+void grpc_tls_credentials_options_set_server_authorization_check_config(
+ grpc_tls_credentials_options* options,
+ grpc_tls_server_authorization_check_config* config) {
+ GPR_ASSERT(options != nullptr);
+ GPR_ASSERT(config != nullptr);
+ options->set_server_authorization_check_config(config->Ref());
}
grpc_tls_server_authorization_check_config*
@@ -243,3 +162,12 @@ grpc_tls_server_authorization_check_config_create(
return new grpc_tls_server_authorization_check_config(
config_user_data, schedule, cancel, destruct);
}
+
+void grpc_tls_server_authorization_check_config_release(
+ grpc_tls_server_authorization_check_config* config) {
+ GRPC_API_TRACE(
+ "grpc_tls_server_authorization_check_config_release(config=%p)", 1,
+ (config));
+ grpc_core::ExecCtx exec_ctx;
+ if (config != nullptr) config->Unref();
+}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h
index 59411d41692..f669a6f5906 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h
@@ -26,6 +26,8 @@
#include "y_absl/container/inlined_vector.h"
#include "src/core/lib/gprpp/ref_counted.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
#include "src/core/lib/security/security_connector/ssl_utils.h"
struct grpc_tls_error_details
@@ -41,126 +43,6 @@ struct grpc_tls_error_details
TString error_details_;
};
-/** TLS key materials config. **/
-struct grpc_tls_key_materials_config
- : public grpc_core::RefCounted<grpc_tls_key_materials_config> {
- public:
- typedef y_absl::InlinedVector<grpc_core::PemKeyCertPair, 1> PemKeyCertPairList;
-
- /** Getters for member fields. **/
- const char* pem_root_certs() const { return pem_root_certs_.get(); }
- const PemKeyCertPairList& pem_key_cert_pair_list() const {
- return pem_key_cert_pair_list_;
- }
- int version() const { return version_; }
-
- /** Setters for member fields. **/
- // TODO(ZhenLian): Remove this function
- void set_pem_root_certs(grpc_core::UniquePtr<char> pem_root_certs) {
- pem_root_certs_ = std::move(pem_root_certs);
- }
- // The ownerships of |pem_root_certs| remain with the caller.
- void set_pem_root_certs(const char* pem_root_certs) {
- // make a copy of pem_root_certs.
- grpc_core::UniquePtr<char> pem_root_ptr(gpr_strdup(pem_root_certs));
- pem_root_certs_ = std::move(pem_root_ptr);
- }
- void add_pem_key_cert_pair(grpc_core::PemKeyCertPair pem_key_cert_pair) {
- pem_key_cert_pair_list_.push_back(pem_key_cert_pair);
- }
- // The ownerships of |pem_root_certs| and |pem_key_cert_pairs| remain with the
- // caller.
- void set_key_materials(const char* pem_root_certs,
- const grpc_ssl_pem_key_cert_pair** pem_key_cert_pairs,
- size_t num_key_cert_pairs);
- // The ownerships of |pem_root_certs| and |pem_key_cert_pair_list| remain with
- // the caller.
- void set_key_materials(const char* pem_root_certs,
- const PemKeyCertPairList& pem_key_cert_pair_list);
- void set_version(int version) { version_ = version; }
-
- private:
- int version_ = 0;
- PemKeyCertPairList pem_key_cert_pair_list_;
- grpc_core::UniquePtr<char> pem_root_certs_;
-};
-
-/** TLS credential reload config. **/
-struct grpc_tls_credential_reload_config
- : public grpc_core::RefCounted<grpc_tls_credential_reload_config> {
- public:
- grpc_tls_credential_reload_config(
- const void* config_user_data,
- int (*schedule)(void* config_user_data,
- grpc_tls_credential_reload_arg* arg),
- void (*cancel)(void* config_user_data,
- grpc_tls_credential_reload_arg* arg),
- void (*destruct)(void* config_user_data));
- ~grpc_tls_credential_reload_config();
-
- void* context() const { return context_; }
- void set_context(void* context) { context_ = context; }
-
- int Schedule(grpc_tls_credential_reload_arg* arg) const {
- if (schedule_ == nullptr) {
- gpr_log(GPR_ERROR, "schedule API is nullptr");
- if (arg != nullptr) {
- arg->status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_FAIL;
- arg->error_details->set_error_details(
- "schedule API in credential reload config is nullptr");
- }
- return 1;
- }
- if (arg != nullptr) {
- arg->config = const_cast<grpc_tls_credential_reload_config*>(this);
- }
- return schedule_(config_user_data_, arg);
- }
- void Cancel(grpc_tls_credential_reload_arg* arg) const {
- if (cancel_ == nullptr) {
- gpr_log(GPR_ERROR, "cancel API is nullptr.");
- if (arg != nullptr) {
- arg->status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_FAIL;
- arg->error_details->set_error_details(
- "cancel API in credential reload config is nullptr");
- }
- return;
- }
- if (arg != nullptr) {
- arg->config = const_cast<grpc_tls_credential_reload_config*>(this);
- }
- cancel_(config_user_data_, arg);
- }
-
- private:
- /** This is a pointer to the wrapped language implementation of
- * grpc_tls_credential_reload_config. It is necessary to implement the C
- * schedule and cancel functions, given the schedule or cancel function in a
- * wrapped language. **/
- void* context_ = nullptr;
- /** config-specific, read-only user data that works for all channels created
- with a credential using the config. */
- void* config_user_data_;
- /** callback function for invoking credential reload API. The implementation
- of this method has to be non-blocking, but can be performed synchronously
- or asynchronously.
- If processing occurs synchronously, it populates \a arg->key_materials, \a
- arg->status, and \a arg->error_details and returns zero.
- If processing occurs asynchronously, it returns a non-zero value.
- Application then invokes \a arg->cb when processing is completed. Note that
- \a arg->cb cannot be invoked before \a schedule returns.
- */
- int (*schedule_)(void* config_user_data, grpc_tls_credential_reload_arg* arg);
- /** callback function for cancelling a credential reload request scheduled via
- an asynchronous \a schedule. \a arg is used to pinpoint an exact reloading
- request to be cancelled, and the operation may not have any effect if the
- request has already been processed. */
- void (*cancel_)(void* config_user_data, grpc_tls_credential_reload_arg* arg);
- /** callback function for cleaning up any data associated with credential
- reload config. */
- void (*destruct_)(void* config_user_data);
-};
-
/** TLS server authorization check config. **/
struct grpc_tls_server_authorization_check_config
: public grpc_core::RefCounted<grpc_tls_server_authorization_check_config> {
@@ -172,43 +54,15 @@ struct grpc_tls_server_authorization_check_config
void (*cancel)(void* config_user_data,
grpc_tls_server_authorization_check_arg* arg),
void (*destruct)(void* config_user_data));
- ~grpc_tls_server_authorization_check_config();
+ ~grpc_tls_server_authorization_check_config() override;
void* context() const { return context_; }
+
void set_context(void* context) { context_ = context; }
- int Schedule(grpc_tls_server_authorization_check_arg* arg) const {
- if (schedule_ == nullptr) {
- gpr_log(GPR_ERROR, "schedule API is nullptr");
- if (arg != nullptr) {
- arg->status = GRPC_STATUS_NOT_FOUND;
- arg->error_details->set_error_details(
- "schedule API in server authorization check config is nullptr");
- }
- return 1;
- }
- if (arg != nullptr && context_ != nullptr) {
- arg->config =
- const_cast<grpc_tls_server_authorization_check_config*>(this);
- }
- return schedule_(config_user_data_, arg);
- }
- void Cancel(grpc_tls_server_authorization_check_arg* arg) const {
- if (cancel_ == nullptr) {
- gpr_log(GPR_ERROR, "cancel API is nullptr.");
- if (arg != nullptr) {
- arg->status = GRPC_STATUS_NOT_FOUND;
- arg->error_details->set_error_details(
- "schedule API in server authorization check config is nullptr");
- }
- return;
- }
- if (arg != nullptr) {
- arg->config =
- const_cast<grpc_tls_server_authorization_check_config*>(this);
- }
- cancel_(config_user_data_, arg);
- }
+ int Schedule(grpc_tls_server_authorization_check_arg* arg) const;
+
+ void Cancel(grpc_tls_server_authorization_check_arg* arg) const;
private:
/** This is a pointer to the wrapped language implementation of
@@ -241,23 +95,15 @@ struct grpc_tls_server_authorization_check_config
void (*destruct_)(void* config_user_data);
};
-/* TLS credentials options. */
+// Contains configurable options specified by callers to configure their certain
+// security features supported in TLS.
+// TODO(ZhenLian): consider making this not ref-counted.
struct grpc_tls_credentials_options
: public grpc_core::RefCounted<grpc_tls_credentials_options> {
public:
- ~grpc_tls_credentials_options() {
- if (key_materials_config_.get() != nullptr) {
- key_materials_config_.get()->Unref();
- }
- if (credential_reload_config_.get() != nullptr) {
- credential_reload_config_.get()->Unref();
- }
- if (server_authorization_check_config_.get() != nullptr) {
- server_authorization_check_config_.get()->Unref();
- }
- }
+ ~grpc_tls_credentials_options() override = default;
- /* Getters for member fields. */
+ // Getters for member fields.
grpc_ssl_client_certificate_request_type cert_request_type() const {
return cert_request_type_;
}
@@ -266,18 +112,21 @@ struct grpc_tls_credentials_options
}
grpc_tls_version min_tls_version() const { return min_tls_version_; }
grpc_tls_version max_tls_version() const { return max_tls_version_; }
- grpc_tls_key_materials_config* key_materials_config() const {
- return key_materials_config_.get();
- }
- grpc_tls_credential_reload_config* credential_reload_config() const {
- return credential_reload_config_.get();
- }
grpc_tls_server_authorization_check_config*
server_authorization_check_config() const {
return server_authorization_check_config_.get();
}
+ // Returns the distributor from provider_ if it is set, nullptr otherwise.
+ grpc_tls_certificate_distributor* certificate_distributor() {
+ if (provider_ != nullptr) return provider_->distributor().get();
+ return nullptr;
+ }
+ bool watch_root_cert() { return watch_root_cert_; }
+ const TString& root_cert_name() { return root_cert_name_; }
+ bool watch_identity_pair() { return watch_identity_pair_; }
+ const TString& identity_cert_name() { return identity_cert_name_; }
- /* Setters for member fields. */
+ // Setters for member fields.
void set_cert_request_type(
const grpc_ssl_client_certificate_request_type type) {
cert_request_type_ = type;
@@ -292,32 +141,53 @@ struct grpc_tls_credentials_options
void set_max_tls_version(grpc_tls_version max_tls_version) {
max_tls_version_ = max_tls_version;
}
- void set_key_materials_config(
- grpc_core::RefCountedPtr<grpc_tls_key_materials_config> config) {
- key_materials_config_ = std::move(config);
- }
- void set_credential_reload_config(
- grpc_core::RefCountedPtr<grpc_tls_credential_reload_config> config) {
- credential_reload_config_ = std::move(config);
- }
void set_server_authorization_check_config(
grpc_core::RefCountedPtr<grpc_tls_server_authorization_check_config>
config) {
server_authorization_check_config_ = std::move(config);
}
+ // Sets the provider in the options.
+ void set_certificate_provider(
+ grpc_core::RefCountedPtr<grpc_tls_certificate_provider> provider) {
+ provider_ = std::move(provider);
+ }
+ // If need to watch the updates of root certificates with name
+ // |root_cert_name|. The default value is false. If used in tls_credentials,
+ // it should always be set to true unless the root certificates are not
+ // needed.
+ void set_watch_root_cert(bool watch) { watch_root_cert_ = watch; }
+ // Sets the name of root certificates being watched, if |set_watch_root_cert|
+ // is called. If not set, an empty string will be used as the name.
+ void set_root_cert_name(TString root_cert_name) {
+ root_cert_name_ = std::move(root_cert_name);
+ }
+ // If need to watch the updates of identity certificates with name
+ // |identity_cert_name|.
+ // The default value is false.
+ // If used in tls_credentials, it should always be set to true
+ // unless the identity key-cert pairs are not needed.
+ void set_watch_identity_pair(bool watch) { watch_identity_pair_ = watch; }
+ // Sets the name of identity key-cert pairs being watched, if
+ // |set_watch_identity_pair| is called. If not set, an empty string will
+ // be used as the name.
+ void set_identity_cert_name(TString identity_cert_name) {
+ identity_cert_name_ = std::move(identity_cert_name);
+ }
private:
- grpc_ssl_client_certificate_request_type cert_request_type_;
+ grpc_ssl_client_certificate_request_type cert_request_type_ =
+ GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE;
grpc_tls_server_verification_option server_verification_option_ =
GRPC_TLS_SERVER_VERIFICATION;
grpc_tls_version min_tls_version_ = grpc_tls_version::TLS1_2;
grpc_tls_version max_tls_version_ = grpc_tls_version::TLS1_3;
- grpc_core::RefCountedPtr<grpc_tls_key_materials_config> key_materials_config_;
- grpc_core::RefCountedPtr<grpc_tls_credential_reload_config>
- credential_reload_config_;
grpc_core::RefCountedPtr<grpc_tls_server_authorization_check_config>
server_authorization_check_config_;
+ grpc_core::RefCountedPtr<grpc_tls_certificate_provider> provider_;
+ bool watch_root_cert_ = false;
+ TString root_cert_name_;
+ bool watch_identity_pair_ = false;
+ TString identity_cert_name_;
};
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CREDENTIALS_OPTIONS_H \
- */
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_GRPC_TLS_CREDENTIALS_OPTIONS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc
index 701fd3b1502..f5b05d8a012 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.cc
@@ -40,18 +40,18 @@ bool CredentialOptionSanityCheck(const grpc_tls_credentials_options* options,
gpr_log(GPR_ERROR, "TLS credentials options is nullptr.");
return false;
}
- if (options->key_materials_config() == nullptr &&
- options->credential_reload_config() == nullptr) {
- gpr_log(GPR_ERROR,
- "TLS credentials options must specify either key materials or "
- "credential reload config.");
- return false;
- }
+ // TODO(ZhenLian): remove this when it is also supported on server side.
if (!is_client && options->server_authorization_check_config() != nullptr) {
gpr_log(GPR_INFO,
"Server's credentials options should not contain server "
"authorization check config.");
}
+ if (options->server_verification_option() != GRPC_TLS_SERVER_VERIFICATION &&
+ options->server_authorization_check_config() == nullptr) {
+ gpr_log(GPR_ERROR,
+ "Should provider custom verifications if bypassing default ones.");
+ return false;
+ }
return true;
}
@@ -85,14 +85,16 @@ TlsCredentials::create_security_connector(
}
grpc_core::RefCountedPtr<grpc_channel_security_connector> sc =
grpc_core::TlsChannelSecurityConnector::CreateTlsChannelSecurityConnector(
- this->Ref(), std::move(call_creds), target_name,
+ this->Ref(), options_, std::move(call_creds), target_name,
overridden_target_name, ssl_session_cache);
if (sc == nullptr) {
return nullptr;
}
- grpc_arg new_arg = grpc_channel_arg_string_create(
- (char*)GRPC_ARG_HTTP2_SCHEME, (char*)"https");
- *new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1);
+ if (args != nullptr) {
+ grpc_arg new_arg = grpc_channel_arg_string_create(
+ const_cast<char*>(GRPC_ARG_HTTP2_SCHEME), const_cast<char*>("https"));
+ *new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1);
+ }
return sc;
}
@@ -104,11 +106,14 @@ TlsServerCredentials::TlsServerCredentials(
TlsServerCredentials::~TlsServerCredentials() {}
grpc_core::RefCountedPtr<grpc_server_security_connector>
-TlsServerCredentials::create_security_connector() {
+TlsServerCredentials::create_security_connector(
+ const grpc_channel_args* /* args */) {
return grpc_core::TlsServerSecurityConnector::
- CreateTlsServerSecurityConnector(this->Ref());
+ CreateTlsServerSecurityConnector(this->Ref(), options_);
}
+/** -- Wrapper APIs declared in grpc_security.h -- **/
+
grpc_channel_credentials* grpc_tls_credentials_create(
grpc_tls_credentials_options* options) {
if (!CredentialOptionSanityCheck(options, true /* is_client */)) {
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.h
index 388c71f6b73..a5e4f486bf9 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_credentials.h
@@ -38,7 +38,7 @@ class TlsCredentials final : public grpc_channel_credentials {
const char* target_name, const grpc_channel_args* args,
grpc_channel_args** new_args) override;
- const grpc_tls_credentials_options& options() const { return *options_; }
+ grpc_tls_credentials_options* options() const { return options_.get(); }
private:
grpc_core::RefCountedPtr<grpc_tls_credentials_options> options_;
@@ -51,9 +51,9 @@ class TlsServerCredentials final : public grpc_server_credentials {
~TlsServerCredentials() override;
grpc_core::RefCountedPtr<grpc_server_security_connector>
- create_security_connector() override;
+ create_security_connector(const grpc_channel_args* /* args */) override;
- const grpc_tls_credentials_options& options() const { return *options_; }
+ grpc_tls_credentials_options* options() const { return options_.get(); }
private:
grpc_core::RefCountedPtr<grpc_tls_credentials_options> options_;
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc
new file mode 100644
index 00000000000..9c266acb410
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.cc
@@ -0,0 +1,91 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/credentials/tls/tls_utils.h"
+
+#include "y_absl/strings/ascii.h"
+#include "y_absl/strings/match.h"
+#include "y_absl/strings/str_cat.h"
+
+namespace grpc_core {
+
+// Based on
+// https://github.com/grpc/grpc-java/blob/ca12e7a339add0ef48202fb72434b9dc0df41756/xds/src/main/java/io/grpc/xds/internal/sds/trust/SdsX509TrustManager.java#L62
+bool VerifySubjectAlternativeName(y_absl::string_view subject_alternative_name,
+ const TString& matcher) {
+ if (subject_alternative_name.empty() ||
+ y_absl::StartsWith(subject_alternative_name, ".")) {
+ // Illegal pattern/domain name
+ return false;
+ }
+ if (matcher.empty() || y_absl::StartsWith(matcher, ".")) {
+ // Illegal domain name
+ return false;
+ }
+ // Normalize \a subject_alternative_name and \a matcher by turning them into
+ // absolute domain names if they are not yet absolute. This is needed because
+ // server certificates do not normally contain absolute names or patterns, but
+ // they should be treated as absolute. At the same time, any
+ // subject_alternative_name presented to this method should also be treated as
+ // absolute for the purposes of matching to the server certificate.
+ TString normalized_san =
+ y_absl::EndsWith(subject_alternative_name, ".")
+ ? TString(subject_alternative_name)
+ : y_absl::StrCat(subject_alternative_name, ".");
+ TString normalized_matcher =
+ y_absl::EndsWith(matcher, ".") ? matcher : y_absl::StrCat(matcher, ".");
+ y_absl::AsciiStrToLower(&normalized_san);
+ y_absl::AsciiStrToLower(&normalized_matcher);
+ if (!y_absl::StrContains(normalized_san, "*")) {
+ return normalized_san == normalized_matcher;
+ }
+ // WILDCARD PATTERN RULES:
+ // 1. Asterisk (*) is only permitted in the left-most domain name label and
+ // must be the only character in that label (i.e., must match the whole
+ // left-most label). For example, *.example.com is permitted, while
+ // *a.example.com, a*.example.com, a*b.example.com, a.*.example.com are
+ // not permitted.
+ // 2. Asterisk (*) cannot match across domain name labels.
+ // For example, *.example.com matches test.example.com but does not match
+ // sub.test.example.com.
+ // 3. Wildcard patterns for single-label domain names are not permitted.
+ if (!y_absl::StartsWith(normalized_san, "*.")) {
+ // Asterisk (*) is only permitted in the left-most domain name label and
+ // must be the only character in that label
+ return false;
+ }
+ if (normalized_san == "*.") {
+ // Wildcard pattern for single-label domain name -- not permitted.
+ return false;
+ }
+ y_absl::string_view suffix = y_absl::string_view(normalized_san).substr(1);
+ if (y_absl::StrContains(suffix, "*")) {
+ // Asterisk (*) is not permitted in the suffix
+ return false;
+ }
+ if (!y_absl::EndsWith(normalized_matcher, suffix)) return false;
+ int suffix_start_index = normalized_matcher.length() - suffix.length();
+ // Asterisk matching across domain labels is not permitted.
+ return suffix_start_index <= 0 /* should not happen */ ||
+ normalized_matcher.find_last_of('.', suffix_start_index - 1) ==
+ TString::npos;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.h b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.h
new file mode 100644
index 00000000000..08299dc7bb9
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/tls/tls_utils.h
@@ -0,0 +1,38 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_TLS_UTILS_H
+#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_TLS_UTILS_H
+
+#include <grpc/support/port_platform.h>
+
+#include <util/generic/string.h>
+#include <vector>
+
+#include "y_absl/strings/string_view.h"
+
+namespace grpc_core {
+
+// Matches \a subject_alternative_name with \a matcher. Returns true if there
+// is a match, false otherwise.
+bool VerifySubjectAlternativeName(y_absl::string_view subject_alternative_name,
+ const TString& matcher);
+
+} // namespace grpc_core
+
+#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_TLS_TLS_UTILS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc b/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc
index 682d49badb0..0a415906256 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.cc
@@ -20,26 +20,225 @@
#include "src/core/lib/security/credentials/xds/xds_credentials.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"
+#include "src/core/ext/xds/xds_certificate_provider.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
+#include "src/core/lib/security/credentials/tls/tls_credentials.h"
+#include "src/core/lib/security/credentials/tls/tls_utils.h"
+#include "src/core/lib/uri/uri_parser.h"
+
namespace grpc_core {
-constexpr const char XdsCredentials::kCredentialsTypeXds[];
+const char kCredentialsTypeXds[] = "Xds";
+
+namespace {
+
+bool XdsVerifySubjectAlternativeNames(
+ const char* const* subject_alternative_names,
+ size_t subject_alternative_names_size,
+ const std::vector<StringMatcher>& matchers) {
+ if (matchers.empty()) return true;
+ for (size_t i = 0; i < subject_alternative_names_size; ++i) {
+ for (const auto& matcher : matchers) {
+ if (matcher.type() == StringMatcher::Type::EXACT) {
+ // For EXACT match, use DNS rules for verifying SANs
+ // TODO(zhenlian): Right now, the SSL layer does not save the type of
+ // the SAN, so we are doing a DNS style verification for all SANs when
+ // the type is EXACT. When we expose the SAN type, change this to only
+ // do this verification when the SAN type is DNS and match type is
+ // EXACT. For all other cases, we should use matcher.Match().
+ if (VerifySubjectAlternativeName(subject_alternative_names[i],
+ matcher.string_matcher())) {
+ return true;
+ }
+ } else {
+ if (matcher.Match(subject_alternative_names[i])) {
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+class ServerAuthCheck {
+ public:
+ ServerAuthCheck(
+ RefCountedPtr<XdsCertificateProvider> xds_certificate_provider,
+ TString cluster_name)
+ : xds_certificate_provider_(std::move(xds_certificate_provider)),
+ cluster_name_(std::move(cluster_name)) {}
+
+ static int Schedule(void* config_user_data,
+ grpc_tls_server_authorization_check_arg* arg) {
+ return static_cast<ServerAuthCheck*>(config_user_data)->ScheduleImpl(arg);
+ }
+
+ static void Destroy(void* config_user_data) {
+ delete static_cast<ServerAuthCheck*>(config_user_data);
+ }
+
+ private:
+ int ScheduleImpl(grpc_tls_server_authorization_check_arg* arg) {
+ if (XdsVerifySubjectAlternativeNames(
+ arg->subject_alternative_names, arg->subject_alternative_names_size,
+ xds_certificate_provider_->GetSanMatchers(cluster_name_))) {
+ arg->success = 1;
+ arg->status = GRPC_STATUS_OK;
+ } else {
+ arg->success = 0;
+ arg->status = GRPC_STATUS_UNAUTHENTICATED;
+ if (arg->error_details) {
+ arg->error_details->set_error_details(
+ "SANs from certificate did not match SANs from xDS control plane");
+ }
+ }
+ return 0; /* synchronous check */
+ }
+
+ RefCountedPtr<XdsCertificateProvider> xds_certificate_provider_;
+ TString cluster_name_;
+};
+
+} // namespace
-grpc_core::RefCountedPtr<grpc_channel_security_connector>
+bool TestOnlyXdsVerifySubjectAlternativeNames(
+ const char* const* subject_alternative_names,
+ size_t subject_alternative_names_size,
+ const std::vector<StringMatcher>& matchers) {
+ return XdsVerifySubjectAlternativeNames(
+ subject_alternative_names, subject_alternative_names_size, matchers);
+}
+
+//
+// XdsCredentials
+//
+
+RefCountedPtr<grpc_channel_security_connector>
XdsCredentials::create_security_connector(
- grpc_core::RefCountedPtr<grpc_call_credentials> call_creds,
- const char* target_name, const grpc_channel_args* args,
- grpc_channel_args** new_args) {
- /* TODO(yashkt) : To be filled */
- if (fallback_credentials_ != nullptr) {
- return fallback_credentials_->create_security_connector(
- std::move(call_creds), target_name, args, new_args);
+ RefCountedPtr<grpc_call_credentials> call_creds, const char* target_name,
+ const grpc_channel_args* args, grpc_channel_args** new_args) {
+ struct ChannelArgsDeleter {
+ const grpc_channel_args* args;
+ bool owned;
+ ~ChannelArgsDeleter() {
+ if (owned) grpc_channel_args_destroy(args);
+ }
+ };
+ ChannelArgsDeleter temp_args{args, false};
+ // TODO(yashykt): This arg will no longer need to be added after b/173119596
+ // is fixed.
+ grpc_arg override_arg = grpc_channel_arg_string_create(
+ const_cast<char*>(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG),
+ const_cast<char*>(target_name));
+ const char* override_arg_name = GRPC_SSL_TARGET_NAME_OVERRIDE_ARG;
+ if (grpc_channel_args_find(args, override_arg_name) == nullptr) {
+ temp_args.args = grpc_channel_args_copy_and_add_and_remove(
+ args, &override_arg_name, 1, &override_arg, 1);
+ temp_args.owned = true;
+ }
+ RefCountedPtr<grpc_channel_security_connector> security_connector;
+ auto xds_certificate_provider =
+ XdsCertificateProvider::GetFromChannelArgs(args);
+ if (xds_certificate_provider != nullptr) {
+ TString cluster_name =
+ grpc_channel_args_find_string(args, GRPC_ARG_XDS_CLUSTER_NAME);
+ GPR_ASSERT(cluster_name.data() != nullptr);
+ const bool watch_root =
+ xds_certificate_provider->ProvidesRootCerts(cluster_name);
+ const bool watch_identity =
+ xds_certificate_provider->ProvidesIdentityCerts(cluster_name);
+ if (watch_root || watch_identity) {
+ auto tls_credentials_options =
+ MakeRefCounted<grpc_tls_credentials_options>();
+ tls_credentials_options->set_certificate_provider(
+ xds_certificate_provider);
+ if (watch_root) {
+ tls_credentials_options->set_watch_root_cert(true);
+ tls_credentials_options->set_root_cert_name(cluster_name);
+ }
+ if (watch_identity) {
+ tls_credentials_options->set_watch_identity_pair(true);
+ tls_credentials_options->set_identity_cert_name(cluster_name);
+ }
+ tls_credentials_options->set_server_verification_option(
+ GRPC_TLS_SKIP_HOSTNAME_VERIFICATION);
+ auto* server_auth_check = new ServerAuthCheck(xds_certificate_provider,
+ std::move(cluster_name));
+ tls_credentials_options->set_server_authorization_check_config(
+ MakeRefCounted<grpc_tls_server_authorization_check_config>(
+ server_auth_check, ServerAuthCheck::Schedule, nullptr,
+ ServerAuthCheck::Destroy));
+ // TODO(yashkt): Creating a new TlsCreds object each time we create a
+ // security connector means that the security connector's cmp() method
+ // returns unequal for each instance, which means that every time an LB
+ // policy updates, all the subchannels will be recreated. This is
+ // going to lead to a lot of connection churn. Instead, we should
+ // either (a) change the TLS security connector's cmp() method to be
+ // smarter somehow, so that it compares unequal only when the
+ // tls_credentials_options have changed, or (b) cache the TlsCreds
+ // objects in the XdsCredentials object so that we can reuse the
+ // same one when creating new security connectors, swapping out the
+ // TlsCreds object only when the tls_credentials_options change.
+ // Option (a) would probably be better, although it may require some
+ // structural changes to the security connector API.
+ auto tls_credentials =
+ MakeRefCounted<TlsCredentials>(std::move(tls_credentials_options));
+ return tls_credentials->create_security_connector(
+ std::move(call_creds), target_name, temp_args.args, new_args);
+ }
+ }
+ GPR_ASSERT(fallback_credentials_ != nullptr);
+ return fallback_credentials_->create_security_connector(
+ std::move(call_creds), target_name, temp_args.args, new_args);
+}
+
+//
+// XdsServerCredentials
+//
+
+RefCountedPtr<grpc_server_security_connector>
+XdsServerCredentials::create_security_connector(const grpc_channel_args* args) {
+ auto xds_certificate_provider =
+ XdsCertificateProvider::GetFromChannelArgs(args);
+ // Identity certs are a must for TLS.
+ if (xds_certificate_provider != nullptr &&
+ xds_certificate_provider->ProvidesIdentityCerts("")) {
+ auto tls_credentials_options =
+ MakeRefCounted<grpc_tls_credentials_options>();
+ tls_credentials_options->set_watch_identity_pair(true);
+ tls_credentials_options->set_certificate_provider(xds_certificate_provider);
+ if (xds_certificate_provider->ProvidesRootCerts("")) {
+ tls_credentials_options->set_watch_root_cert(true);
+ if (xds_certificate_provider->GetRequireClientCertificate("")) {
+ tls_credentials_options->set_cert_request_type(
+ GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY);
+ } else {
+ tls_credentials_options->set_cert_request_type(
+ GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY);
+ }
+ } else {
+ // Do not request client certificate if there is no way to verify.
+ tls_credentials_options->set_cert_request_type(
+ GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE);
+ }
+ auto tls_credentials = MakeRefCounted<TlsServerCredentials>(
+ std::move(tls_credentials_options));
+ return tls_credentials->create_security_connector(args);
}
- return nullptr;
+ return fallback_credentials_->create_security_connector(args);
}
} // namespace grpc_core
grpc_channel_credentials* grpc_xds_credentials_create(
grpc_channel_credentials* fallback_credentials) {
+ GPR_ASSERT(fallback_credentials != nullptr);
return new grpc_core::XdsCredentials(fallback_credentials->Ref());
}
+
+grpc_server_credentials* grpc_xds_server_credentials_create(
+ grpc_server_credentials* fallback_credentials) {
+ GPR_ASSERT(fallback_credentials != nullptr);
+ return new grpc_core::XdsServerCredentials(fallback_credentials->Ref());
+}
diff --git a/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.h b/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.h
index 51576deebd8..ee2e71c5837 100644
--- a/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.h
+++ b/contrib/libs/grpc/src/core/lib/security/credentials/xds/xds_credentials.h
@@ -23,29 +23,47 @@
#include <grpc/grpc_security.h>
+#include "src/core/ext/xds/xds_api.h"
#include "src/core/lib/security/credentials/credentials.h"
namespace grpc_core {
+extern const char kCredentialsTypeXds[];
+
class XdsCredentials final : public grpc_channel_credentials {
public:
- static constexpr const char kCredentialsTypeXds[] = "Xds";
-
explicit XdsCredentials(
- grpc_core::RefCountedPtr<grpc_channel_credentials> fallback_credentials)
+ RefCountedPtr<grpc_channel_credentials> fallback_credentials)
: grpc_channel_credentials(kCredentialsTypeXds),
fallback_credentials_(std::move(fallback_credentials)) {}
- grpc_core::RefCountedPtr<grpc_channel_security_connector>
- create_security_connector(
- grpc_core::RefCountedPtr<grpc_call_credentials> call_creds,
- const char* target_name, const grpc_channel_args* args,
- grpc_channel_args** new_args) override;
+ RefCountedPtr<grpc_channel_security_connector> create_security_connector(
+ RefCountedPtr<grpc_call_credentials> call_creds, const char* target_name,
+ const grpc_channel_args* args, grpc_channel_args** new_args) override;
+
+ private:
+ RefCountedPtr<grpc_channel_credentials> fallback_credentials_;
+};
+
+class XdsServerCredentials final : public grpc_server_credentials {
+ public:
+ explicit XdsServerCredentials(
+ RefCountedPtr<grpc_server_credentials> fallback_credentials)
+ : grpc_server_credentials(kCredentialsTypeXds),
+ fallback_credentials_(std::move(fallback_credentials)) {}
+
+ RefCountedPtr<grpc_server_security_connector> create_security_connector(
+ const grpc_channel_args* /* args */) override;
private:
- grpc_core::RefCountedPtr<grpc_channel_credentials> fallback_credentials_;
+ RefCountedPtr<grpc_server_credentials> fallback_credentials_;
};
+bool TestOnlyXdsVerifySubjectAlternativeNames(
+ const char* const* subject_alternative_names,
+ size_t subject_alternative_names_size,
+ const std::vector<StringMatcher>& matchers);
+
} // namespace grpc_core
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_XDS_XDS_CREDENTIALS_H */
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc
index d0b532ae182..92a95252e82 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/alts/alts_security_connector.cc
@@ -134,7 +134,7 @@ class grpc_alts_channel_security_connector final
class grpc_alts_server_security_connector final
: public grpc_server_security_connector {
public:
- grpc_alts_server_security_connector(
+ explicit grpc_alts_server_security_connector(
grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
: grpc_server_security_connector(GRPC_ALTS_URL_SCHEME,
std::move(server_creds)) {}
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc
index efbf6d231c7..34d0590ba86 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/fake/fake_security_connector.cc
@@ -223,7 +223,7 @@ static void fake_check_peer(
}
prop_name = peer.properties[0].name;
if (prop_name == nullptr ||
- strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY)) {
+ strcmp(prop_name, TSI_CERTIFICATE_TYPE_PEER_PROPERTY) != 0) {
error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
y_absl::StrCat("Unexpected property in fake peer: ",
prop_name == nullptr ? "<EMPTY>" : prop_name)
@@ -231,7 +231,7 @@ static void fake_check_peer(
goto end;
}
if (strncmp(peer.properties[0].value.data, TSI_FAKE_CERTIFICATE_TYPE,
- peer.properties[0].value.length)) {
+ peer.properties[0].value.length) != 0) {
error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
"Invalid value for cert type property.");
goto end;
@@ -275,7 +275,7 @@ void grpc_fake_channel_security_connector::check_peer(
class grpc_fake_server_security_connector
: public grpc_server_security_connector {
public:
- grpc_fake_server_security_connector(
+ explicit grpc_fake_server_security_connector(
grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
: grpc_server_security_connector(GRPC_FAKE_SECURITY_URL_SCHEME,
std::move(server_creds)) {}
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc
new file mode 100644
index 00000000000..ba2435aa955
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc
@@ -0,0 +1,121 @@
+//
+//
+// 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 <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/security_connector/insecure/insecure_security_connector.h"
+
+#include "src/core/lib/gprpp/ref_counted_ptr.h"
+#include "src/core/lib/security/transport/security_handshaker.h"
+#include "src/core/tsi/local_transport_security.h"
+
+namespace grpc_core {
+
+const char kInsecureTransportSecurityType[] = "insecure";
+
+namespace {
+
+RefCountedPtr<grpc_auth_context> MakeAuthContext() {
+ auto ctx = MakeRefCounted<grpc_auth_context>(nullptr);
+ grpc_auth_context_add_cstring_property(
+ ctx.get(), GRPC_TRANSPORT_SECURITY_TYPE_PROPERTY_NAME,
+ kInsecureTransportSecurityType);
+ const char* security_level = tsi_security_level_to_string(TSI_SECURITY_NONE);
+ grpc_auth_context_add_property(ctx.get(),
+ GRPC_TRANSPORT_SECURITY_LEVEL_PROPERTY_NAME,
+ security_level, strlen(security_level));
+ return ctx;
+}
+
+} // namespace
+
+RefCountedPtr<grpc_auth_context> TestOnlyMakeInsecureAuthContext() {
+ return MakeAuthContext();
+}
+
+// check_call_host and cancel_check_call_host are no-ops since we want to
+// provide an insecure channel.
+bool InsecureChannelSecurityConnector::check_call_host(
+ y_absl::string_view /*host*/, grpc_auth_context* /*auth_context*/,
+ grpc_closure* /*on_call_host_checked*/, grpc_error** error) {
+ *error = GRPC_ERROR_NONE;
+ return true;
+}
+
+void InsecureChannelSecurityConnector::cancel_check_call_host(
+ grpc_closure* /*on_call_host_checked*/, grpc_error* error) {
+ GRPC_ERROR_UNREF(error);
+}
+
+// add_handshakers should have been a no-op but we need to add a minimalist
+// security handshaker so that check_peer is invoked and an auth_context is
+// created with the security level of TSI_SECURITY_NONE.
+void InsecureChannelSecurityConnector::add_handshakers(
+ const grpc_channel_args* args, grpc_pollset_set* /* interested_parties */,
+ HandshakeManager* handshake_manager) {
+ tsi_handshaker* handshaker = nullptr;
+ // Re-use local_tsi_handshaker_create as a minimalist handshaker.
+ GPR_ASSERT(tsi_local_handshaker_create(true /* is_client */, &handshaker) ==
+ TSI_OK);
+ handshake_manager->Add(SecurityHandshakerCreate(handshaker, this, args));
+}
+
+void InsecureChannelSecurityConnector::check_peer(
+ tsi_peer peer, grpc_endpoint* /*ep*/,
+ RefCountedPtr<grpc_auth_context>* auth_context,
+ grpc_closure* on_peer_checked) {
+ *auth_context = MakeAuthContext();
+ tsi_peer_destruct(&peer);
+ ExecCtx::Run(DEBUG_LOCATION, on_peer_checked, GRPC_ERROR_NONE);
+}
+
+int InsecureChannelSecurityConnector::cmp(
+ const grpc_security_connector* other_sc) const {
+ return channel_security_connector_cmp(
+ static_cast<const grpc_channel_security_connector*>(other_sc));
+}
+
+// add_handshakers should have been a no-op but we need to add a minimalist
+// security handshaker so that check_peer is invoked and an auth_context is
+// created with the security level of TSI_SECURITY_NONE.
+void InsecureServerSecurityConnector::add_handshakers(
+ const grpc_channel_args* args, grpc_pollset_set* /* interested_parties */,
+ grpc_core::HandshakeManager* handshake_manager) {
+ tsi_handshaker* handshaker = nullptr;
+ // Re-use local_tsi_handshaker_create as a minimalist handshaker.
+ GPR_ASSERT(tsi_local_handshaker_create(false /* is_client */, &handshaker) ==
+ TSI_OK);
+ handshake_manager->Add(SecurityHandshakerCreate(handshaker, this, args));
+}
+
+void InsecureServerSecurityConnector::check_peer(
+ tsi_peer peer, grpc_endpoint* /*ep*/,
+ grpc_core::RefCountedPtr<grpc_auth_context>* auth_context,
+ grpc_closure* on_peer_checked) {
+ *auth_context = MakeAuthContext();
+ tsi_peer_destruct(&peer);
+ ExecCtx::Run(DEBUG_LOCATION, on_peer_checked, GRPC_ERROR_NONE);
+}
+
+int InsecureServerSecurityConnector::cmp(
+ const grpc_security_connector* other) const {
+ return server_security_connector_cmp(
+ static_cast<const grpc_server_security_connector*>(other));
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.h b/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.h
new file mode 100644
index 00000000000..8e083ae8714
--- /dev/null
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/insecure/insecure_security_connector.h
@@ -0,0 +1,87 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_INSECURE_INSECURE_SECURITY_CONNECTOR_H
+#define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_INSECURE_INSECURE_SECURITY_CONNECTOR_H
+
+#include <grpc/support/port_platform.h>
+
+#include "src/core/lib/security/context/security_context.h"
+#include "src/core/lib/security/credentials/credentials.h"
+#include "src/core/lib/security/security_connector/security_connector.h"
+
+namespace grpc_core {
+
+extern const char kInsecureTransportSecurityType[];
+
+// Exposed for testing purposes only.
+// Create an auth context which is necessary to pass the santiy check in
+// client_auth_filter that verifies if the peer's auth context is obtained
+// during handshakes.
+RefCountedPtr<grpc_auth_context> TestOnlyMakeInsecureAuthContext();
+
+class InsecureChannelSecurityConnector
+ : public grpc_channel_security_connector {
+ public:
+ InsecureChannelSecurityConnector(
+ grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
+ grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds)
+ : grpc_channel_security_connector(/* url_scheme */ nullptr,
+ std::move(channel_creds),
+ std::move(request_metadata_creds)) {}
+
+ bool check_call_host(y_absl::string_view host, grpc_auth_context* auth_context,
+ grpc_closure* on_call_host_checked,
+ grpc_error** error) override;
+
+ void cancel_check_call_host(grpc_closure* on_call_host_checked,
+ grpc_error* error) override;
+
+ void add_handshakers(const grpc_channel_args* args,
+ grpc_pollset_set* /* interested_parties */,
+ grpc_core::HandshakeManager* handshake_manager) override;
+
+ void check_peer(tsi_peer peer, grpc_endpoint* ep,
+ grpc_core::RefCountedPtr<grpc_auth_context>* auth_context,
+ grpc_closure* on_peer_checked) override;
+
+ int cmp(const grpc_security_connector* other_sc) const override;
+};
+
+class InsecureServerSecurityConnector : public grpc_server_security_connector {
+ public:
+ explicit InsecureServerSecurityConnector(
+ grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
+ : grpc_server_security_connector(nullptr /* url_scheme */,
+ std::move(server_creds)) {}
+
+ void add_handshakers(const grpc_channel_args* args,
+ grpc_pollset_set* /* interested_parties */,
+ grpc_core::HandshakeManager* handshake_manager) override;
+
+ void check_peer(tsi_peer peer, grpc_endpoint* ep,
+ grpc_core::RefCountedPtr<grpc_auth_context>* auth_context,
+ grpc_closure* on_peer_checked) override;
+
+ int cmp(const grpc_security_connector* other) const override;
+};
+
+} // namespace grpc_core
+
+#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_INSECURE_INSECURE_SECURITY_CONNECTOR_H \
+ */
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots.h b/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots.h
index 5fdec154988..c6b445119a6 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots.h
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots.h
@@ -19,6 +19,10 @@
#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H
#define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_LOAD_SYSTEM_ROOTS_H
+#include <grpc/support/port_platform.h>
+
+#include <grpc/slice.h>
+
namespace grpc_core {
// Returns a slice containing roots from the OS trust store
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.h b/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.h
index 12617df4928..c1ef3f63ebb 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.h
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/load_system_roots_linux.h
@@ -21,6 +21,8 @@
#include <grpc/support/port_platform.h>
+#include <grpc/slice.h>
+
#ifdef GPR_LINUX
namespace grpc_core {
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc
index 8f622d4c226..65983adbeb7 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/local/local_security_connector.cc
@@ -157,7 +157,7 @@ class grpc_local_channel_security_connector final
const grpc_channel_args* args, grpc_pollset_set* /*interested_parties*/,
grpc_core::HandshakeManager* handshake_manager) override {
tsi_handshaker* handshaker = nullptr;
- GPR_ASSERT(local_tsi_handshaker_create(true /* is_client */, &handshaker) ==
+ GPR_ASSERT(tsi_local_handshaker_create(true /* is_client */, &handshaker) ==
TSI_OK);
handshake_manager->Add(
grpc_core::SecurityHandshakerCreate(handshaker, this, args));
@@ -206,7 +206,7 @@ class grpc_local_channel_security_connector final
class grpc_local_server_security_connector final
: public grpc_server_security_connector {
public:
- grpc_local_server_security_connector(
+ explicit grpc_local_server_security_connector(
grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
: grpc_server_security_connector(nullptr, std::move(server_creds)) {}
~grpc_local_server_security_connector() override = default;
@@ -215,7 +215,7 @@ class grpc_local_server_security_connector final
const grpc_channel_args* args, grpc_pollset_set* /*interested_parties*/,
grpc_core::HandshakeManager* handshake_manager) override {
tsi_handshaker* handshaker = nullptr;
- GPR_ASSERT(local_tsi_handshaker_create(false /* is_client */,
+ GPR_ASSERT(tsi_local_handshaker_create(false /* is_client */,
&handshaker) == TSI_OK);
handshake_manager->Add(
grpc_core::SecurityHandshakerCreate(handshaker, this, args));
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.cc
index 0400ad6fb8d..822fe15c3f7 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.cc
@@ -104,12 +104,13 @@ static const grpc_arg_pointer_vtable connector_arg_vtable = {
connector_arg_copy, connector_arg_destroy, connector_cmp};
grpc_arg grpc_security_connector_to_arg(grpc_security_connector* sc) {
- return grpc_channel_arg_pointer_create((char*)GRPC_ARG_SECURITY_CONNECTOR, sc,
- &connector_arg_vtable);
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_SECURITY_CONNECTOR), sc,
+ &connector_arg_vtable);
}
grpc_security_connector* grpc_security_connector_from_arg(const grpc_arg* arg) {
- if (strcmp(arg->key, GRPC_ARG_SECURITY_CONNECTOR)) return nullptr;
+ if (strcmp(arg->key, GRPC_ARG_SECURITY_CONNECTOR) != 0) return nullptr;
if (arg->type != GRPC_ARG_POINTER) {
gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type,
GRPC_ARG_SECURITY_CONNECTOR);
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.h b/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.h
index 74d04600b24..6bca37a3968 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.h
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/security_connector.h
@@ -49,9 +49,11 @@ class grpc_security_connector
public:
explicit grpc_security_connector(const char* url_scheme)
: grpc_core::RefCounted<grpc_security_connector>(
- &grpc_trace_security_connector_refcount),
+ GRPC_TRACE_FLAG_ENABLED(grpc_trace_security_connector_refcount)
+ ? "security_connector_refcount"
+ : nullptr),
url_scheme_(url_scheme) {}
- virtual ~grpc_security_connector() = default;
+ ~grpc_security_connector() override = default;
/* Check the peer. Callee takes ownership of the peer object.
When done, sets *auth_context and invokes on_peer_checked. */
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc
index b5e78ddbbbb..3237304f39d 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc
@@ -111,7 +111,7 @@ class grpc_ssl_channel_security_connector final
const tsi_result result =
tsi_create_ssl_client_handshaker_factory_with_options(
&options, &client_handshaker_factory_);
- gpr_free((void*)options.alpn_protocols);
+ gpr_free(options.alpn_protocols);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
@@ -206,7 +206,7 @@ class grpc_ssl_channel_security_connector final
class grpc_ssl_server_security_connector
: public grpc_server_security_connector {
public:
- grpc_ssl_server_security_connector(
+ explicit grpc_ssl_server_security_connector(
grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
: grpc_server_security_connector(GRPC_SSL_URL_SCHEME,
std::move(server_creds)) {}
@@ -258,7 +258,7 @@ class grpc_ssl_server_security_connector
const tsi_result result =
tsi_create_ssl_server_handshaker_factory_with_options(
&options, &server_handshaker_factory_);
- gpr_free((void*)alpn_protocol_strings);
+ gpr_free(alpn_protocol_strings);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
@@ -368,7 +368,7 @@ class grpc_ssl_server_security_connector
grpc_tsi_ssl_pem_key_cert_pairs_destroy(
const_cast<tsi_ssl_pem_key_cert_pair*>(options.pem_key_cert_pairs),
options.num_key_cert_pairs);
- gpr_free((void*)alpn_protocol_strings);
+ gpr_free(alpn_protocol_strings);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc
index 6c83968f8e7..c9258f8aa4e 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.cc
@@ -43,11 +43,13 @@
/* -- Constants. -- */
-#ifndef INSTALL_PREFIX
-static const char* installed_roots_path = "/usr/share/grpc/roots.pem";
-#else
+#if defined(GRPC_ROOT_PEM_PATH)
+static const char* installed_roots_path = GRPC_ROOT_PEM_PATH;
+#elif defined(INSTALL_PREFIX)
static const char* installed_roots_path =
- INSTALL_PREFIX "/share/grpc/roots.pem";
+ INSTALL_PREFIX "/usr/share/grpc/roots.pem";
+#else
+static const char* installed_roots_path = "/usr/share/grpc/roots.pem";
#endif
#ifndef TSI_OPENSSL_ALPN_SUPPORT
@@ -397,6 +399,9 @@ grpc_security_status grpc_ssl_tsi_client_handshaker_factory_init(
const char* root_certs;
const tsi_ssl_root_certs_store* root_store;
if (pem_root_certs == nullptr) {
+ gpr_log(GPR_INFO,
+ "No root certificates specified; use ones stored in system default "
+ "locations instead");
// Use default root certificates.
root_certs = grpc_core::DefaultSslRootStore::GetPemRootCerts();
if (root_certs == nullptr) {
@@ -429,7 +434,7 @@ grpc_security_status grpc_ssl_tsi_client_handshaker_factory_init(
const tsi_result result =
tsi_create_ssl_client_handshaker_factory_with_options(&options,
handshaker_factory);
- gpr_free((void*)options.alpn_protocols);
+ gpr_free(options.alpn_protocols);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
@@ -461,7 +466,7 @@ grpc_security_status grpc_ssl_tsi_server_handshaker_factory_init(
const tsi_result result =
tsi_create_ssl_server_handshaker_factory_with_options(&options,
handshaker_factory);
- gpr_free((void*)alpn_protocol_strings);
+ gpr_free(alpn_protocol_strings);
if (result != TSI_OK) {
gpr_log(GPR_ERROR, "Handshaker factory creation failed with %s.",
tsi_result_to_string(result));
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.h b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.h
index 6141f8d9cbc..120217b6fc4 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.h
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/ssl_utils.h
@@ -145,20 +145,15 @@ class DefaultSslRootStore {
class PemKeyCertPair {
public:
- // Construct from the C struct. We steal its members and then immediately
- // free it.
- explicit PemKeyCertPair(grpc_ssl_pem_key_cert_pair* pair)
- : private_key_(const_cast<char*>(pair->private_key)),
- cert_chain_(const_cast<char*>(pair->cert_chain)) {
- gpr_free(pair);
- }
+ PemKeyCertPair(y_absl::string_view private_key, y_absl::string_view cert_chain)
+ : private_key_(private_key), cert_chain_(cert_chain) {}
// Movable.
- PemKeyCertPair(PemKeyCertPair&& other) {
+ PemKeyCertPair(PemKeyCertPair&& other) noexcept {
private_key_ = std::move(other.private_key_);
cert_chain_ = std::move(other.cert_chain_);
}
- PemKeyCertPair& operator=(PemKeyCertPair&& other) {
+ PemKeyCertPair& operator=(PemKeyCertPair&& other) noexcept {
private_key_ = std::move(other.private_key_);
cert_chain_ = std::move(other.cert_chain_);
return *this;
@@ -166,28 +161,28 @@ class PemKeyCertPair {
// Copyable.
PemKeyCertPair(const PemKeyCertPair& other)
- : private_key_(gpr_strdup(other.private_key())),
- cert_chain_(gpr_strdup(other.cert_chain())) {}
+ : private_key_(other.private_key()), cert_chain_(other.cert_chain()) {}
PemKeyCertPair& operator=(const PemKeyCertPair& other) {
- private_key_ = grpc_core::UniquePtr<char>(gpr_strdup(other.private_key()));
- cert_chain_ = grpc_core::UniquePtr<char>(gpr_strdup(other.cert_chain()));
+ private_key_ = other.private_key();
+ cert_chain_ = other.cert_chain();
return *this;
}
bool operator==(const PemKeyCertPair& other) const {
- return std::strcmp(this->private_key(), other.private_key()) == 0 &&
- std::strcmp(this->cert_chain(), other.cert_chain()) == 0;
+ return this->private_key() == other.private_key() &&
+ this->cert_chain() == other.cert_chain();
}
- char* private_key() const { return private_key_.get(); }
- char* cert_chain() const { return cert_chain_.get(); }
+ const TString& private_key() const { return private_key_; }
+ const TString& cert_chain() const { return cert_chain_; }
private:
- grpc_core::UniquePtr<char> private_key_;
- grpc_core::UniquePtr<char> cert_chain_;
+ TString private_key_;
+ TString cert_chain_;
};
+typedef y_absl::InlinedVector<grpc_core::PemKeyCertPair, 1> PemKeyCertPairList;
+
} // namespace grpc_core
-#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SSL_UTILS_H \
- */
+#endif // GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_SSL_UTILS_H
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.cc b/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.cc
index 4abcb75a085..0b3e1c3fda4 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.cc
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.cc
@@ -46,7 +46,7 @@ namespace grpc_core {
namespace {
tsi_ssl_pem_key_cert_pair* ConvertToTsiPemKeyCertPair(
- const grpc_tls_key_materials_config::PemKeyCertPairList& cert_pair_list) {
+ const grpc_core::PemKeyCertPairList& cert_pair_list) {
tsi_ssl_pem_key_cert_pair* tsi_pairs = nullptr;
size_t num_key_cert_pairs = cert_pair_list.size();
if (num_key_cert_pairs > 0) {
@@ -55,137 +55,146 @@ tsi_ssl_pem_key_cert_pair* ConvertToTsiPemKeyCertPair(
gpr_zalloc(num_key_cert_pairs * sizeof(tsi_ssl_pem_key_cert_pair)));
}
for (size_t i = 0; i < num_key_cert_pairs; i++) {
- GPR_ASSERT(cert_pair_list[i].private_key() != nullptr);
- GPR_ASSERT(cert_pair_list[i].cert_chain() != nullptr);
- tsi_pairs[i].cert_chain = gpr_strdup(cert_pair_list[i].cert_chain());
- tsi_pairs[i].private_key = gpr_strdup(cert_pair_list[i].private_key());
+ GPR_ASSERT(!cert_pair_list[i].private_key().empty());
+ GPR_ASSERT(!cert_pair_list[i].cert_chain().empty());
+ tsi_pairs[i].cert_chain =
+ gpr_strdup(cert_pair_list[i].cert_chain().c_str());
+ tsi_pairs[i].private_key =
+ gpr_strdup(cert_pair_list[i].private_key().c_str());
}
return tsi_pairs;
}
} // namespace
-grpc_status_code TlsFetchKeyMaterials(
- const grpc_core::RefCountedPtr<grpc_tls_key_materials_config>&
- key_materials_config,
- const grpc_tls_credentials_options& options, bool is_server,
- grpc_ssl_certificate_config_reload_status* status) {
- GPR_ASSERT(key_materials_config != nullptr);
- GPR_ASSERT(status != nullptr);
- bool is_key_materials_empty =
- key_materials_config->pem_key_cert_pair_list().empty();
- grpc_tls_credential_reload_config* credential_reload_config =
- options.credential_reload_config();
- /** If there are no key materials and no credential reload config and the
- * caller is a server, then return an error. We do not require that a client
- * always provision certificates. **/
- if (credential_reload_config == nullptr && is_key_materials_empty &&
- is_server) {
+// -------------------channel security connector-------------------
+grpc_core::RefCountedPtr<grpc_channel_security_connector>
+TlsChannelSecurityConnector::CreateTlsChannelSecurityConnector(
+ grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options,
+ grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
+ const char* target_name, const char* overridden_target_name,
+ tsi_ssl_session_cache* ssl_session_cache) {
+ if (channel_creds == nullptr) {
gpr_log(GPR_ERROR,
- "Either credential reload config or key materials should be "
- "provisioned.");
- return GRPC_STATUS_FAILED_PRECONDITION;
- }
- grpc_status_code reload_status = GRPC_STATUS_OK;
- /** Use |credential_reload_config| to update |key_materials_config|. **/
- if (credential_reload_config != nullptr) {
- grpc_tls_credential_reload_arg* arg = new grpc_tls_credential_reload_arg();
- arg->key_materials_config = key_materials_config.get();
- arg->error_details = new grpc_tls_error_details();
- int result = credential_reload_config->Schedule(arg);
- if (result) {
- /** Credential reloading is performed async. This is not yet supported.
- * **/
- gpr_log(GPR_ERROR, "Async credential reload is unsupported now.");
- *status = GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;
- reload_status =
- is_key_materials_empty ? GRPC_STATUS_UNIMPLEMENTED : GRPC_STATUS_OK;
- } else {
- /** Credential reloading is performed sync. **/
- *status = arg->status;
- if (arg->status == GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED) {
- /* Key materials is not empty. */
- gpr_log(GPR_DEBUG, "Credential does not change after reload.");
- } else if (arg->status == GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_FAIL) {
- gpr_log(GPR_ERROR, "Credential reload failed with an error:");
- if (arg->error_details != nullptr) {
- gpr_log(GPR_ERROR, "%s", arg->error_details->error_details().c_str());
- }
- reload_status =
- is_key_materials_empty ? GRPC_STATUS_INTERNAL : GRPC_STATUS_OK;
- }
- }
- delete arg->error_details;
- /** If the credential reload config was constructed via a wrapped language,
- * then |arg->context| and |arg->destroy_context| will not be nullptr. In
- * this case, we must destroy |arg->context|, which stores the wrapped
- * language-version of the credential reload arg. **/
- if (arg->destroy_context != nullptr) {
- arg->destroy_context(arg->context);
- }
- delete arg;
+ "channel_creds is nullptr in "
+ "TlsChannelSecurityConnectorCreate()");
+ return nullptr;
}
- return reload_status;
-}
-
-grpc_error* TlsCheckHostName(const char* peer_name, const tsi_peer* peer) {
- /* Check the peer name if specified. */
- if (peer_name != nullptr && !grpc_ssl_host_matches_name(peer, peer_name)) {
- return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
- y_absl::StrCat("Peer name ", peer_name, " is not in peer certificate")
- .c_str());
+ if (options == nullptr) {
+ gpr_log(GPR_ERROR,
+ "options is nullptr in "
+ "TlsChannelSecurityConnectorCreate()");
+ return nullptr;
}
- return GRPC_ERROR_NONE;
+ if (target_name == nullptr) {
+ gpr_log(GPR_ERROR,
+ "target_name is nullptr in "
+ "TlsChannelSecurityConnectorCreate()");
+ return nullptr;
+ }
+ grpc_core::RefCountedPtr<TlsChannelSecurityConnector> c =
+ grpc_core::MakeRefCounted<TlsChannelSecurityConnector>(
+ std::move(channel_creds), std::move(options),
+ std::move(request_metadata_creds), target_name,
+ overridden_target_name, ssl_session_cache);
+ return c;
}
TlsChannelSecurityConnector::TlsChannelSecurityConnector(
grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options,
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
- const char* target_name, const char* overridden_target_name)
+ const char* target_name, const char* overridden_target_name,
+ tsi_ssl_session_cache* ssl_session_cache)
: grpc_channel_security_connector(GRPC_SSL_URL_SCHEME,
std::move(channel_creds),
std::move(request_metadata_creds)),
+ options_(std::move(options)),
overridden_target_name_(
- overridden_target_name == nullptr ? "" : overridden_target_name) {
- key_materials_config_ = grpc_tls_key_materials_config_create()->Ref();
+ overridden_target_name == nullptr ? "" : overridden_target_name),
+ ssl_session_cache_(ssl_session_cache) {
+ if (ssl_session_cache_ != nullptr) {
+ tsi_ssl_session_cache_ref(ssl_session_cache_);
+ }
check_arg_ = ServerAuthorizationCheckArgCreate(this);
y_absl::string_view host;
y_absl::string_view port;
grpc_core::SplitHostPort(target_name, &host, &port);
target_name_ = TString(host);
+ // Create a watcher.
+ auto watcher_ptr = y_absl::make_unique<TlsChannelCertificateWatcher>(this);
+ certificate_watcher_ = watcher_ptr.get();
+ // Register the watcher with the distributor.
+ grpc_tls_certificate_distributor* distributor =
+ options_->certificate_distributor();
+ y_absl::optional<TString> watched_root_cert_name;
+ if (options_->watch_root_cert()) {
+ watched_root_cert_name = options_->root_cert_name();
+ }
+ y_absl::optional<TString> watched_identity_cert_name;
+ if (options_->watch_identity_pair()) {
+ watched_identity_cert_name = options_->identity_cert_name();
+ }
+ // We will use the root certs stored in system default locations if not
+ // watching root certs on the client side. We will handle this case
+ // differently here, because "watching a default roots without the identity
+ // certs" is a valid case(and hence we will need to call
+ // OnCertificatesChanged), but it requires nothing from the provider, and
+ // hence no need to register the watcher.
+ bool use_default_roots = !options_->watch_root_cert();
+ if (use_default_roots && !options_->watch_identity_pair()) {
+ watcher_ptr->OnCertificatesChanged(y_absl::nullopt, y_absl::nullopt);
+ } else {
+ distributor->WatchTlsCertificates(std::move(watcher_ptr),
+ watched_root_cert_name,
+ watched_identity_cert_name);
+ }
}
TlsChannelSecurityConnector::~TlsChannelSecurityConnector() {
+ if (ssl_session_cache_ != nullptr) {
+ tsi_ssl_session_cache_unref(ssl_session_cache_);
+ }
+ // Cancel all the watchers.
+ grpc_tls_certificate_distributor* distributor =
+ options_->certificate_distributor();
+ if (distributor != nullptr) {
+ distributor->CancelTlsCertificatesWatch(certificate_watcher_);
+ }
if (client_handshaker_factory_ != nullptr) {
tsi_ssl_client_handshaker_factory_unref(client_handshaker_factory_);
}
- if (key_materials_config_.get() != nullptr) {
- key_materials_config_.get()->Unref();
+ if (check_arg_ != nullptr) {
+ ServerAuthorizationCheckArgDestroy(check_arg_);
}
- ServerAuthorizationCheckArgDestroy(check_arg_);
}
void TlsChannelSecurityConnector::add_handshakers(
const grpc_channel_args* args, grpc_pollset_set* /*interested_parties*/,
grpc_core::HandshakeManager* handshake_mgr) {
- if (RefreshHandshakerFactory() != GRPC_SECURITY_OK) {
- gpr_log(GPR_ERROR, "Handshaker factory refresh failed.");
- return;
- }
- // Instantiate TSI handshaker.
- tsi_handshaker* tsi_hs = nullptr;
- tsi_result result = tsi_ssl_client_handshaker_factory_create_handshaker(
- client_handshaker_factory_,
- overridden_target_name_.empty() ? target_name_.c_str()
- : overridden_target_name_.c_str(),
- &tsi_hs);
- if (result != TSI_OK) {
- gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.",
- tsi_result_to_string(result));
+ grpc_core::MutexLock lock(&mu_);
+ if (client_handshaker_factory_ != nullptr) {
+ // Instantiate TSI handshaker.
+ tsi_handshaker* tsi_hs = nullptr;
+ tsi_result result = tsi_ssl_client_handshaker_factory_create_handshaker(
+ client_handshaker_factory_,
+ overridden_target_name_.empty() ? target_name_.c_str()
+ : overridden_target_name_.c_str(),
+ &tsi_hs);
+ if (result != TSI_OK) {
+ gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.",
+ tsi_result_to_string(result));
+ return;
+ }
+ // Create handshakers.
+ handshake_mgr->Add(grpc_core::SecurityHandshakerCreate(tsi_hs, this, args));
return;
}
- // Create handshakers.
- handshake_mgr->Add(grpc_core::SecurityHandshakerCreate(tsi_hs, this, args));
+ // TODO(ZhenLian): Implement the logic(delegation to
+ // BlockOnInitialCredentialHandshaker) when certificates are not ready.
+ gpr_log(GPR_ERROR, "%s not supported yet.",
+ "Client BlockOnInitialCredentialHandshaker");
}
void TlsChannelSecurityConnector::check_peer(
@@ -203,12 +212,9 @@ void TlsChannelSecurityConnector::check_peer(
}
*auth_context =
grpc_ssl_peer_to_auth_context(&peer, GRPC_TLS_TRANSPORT_SECURITY_TYPE);
- const TlsCredentials* creds =
- static_cast<const TlsCredentials*>(channel_creds());
- if (creds->options().server_verification_option() ==
- GRPC_TLS_SERVER_VERIFICATION) {
+ if (options_->server_verification_option() == GRPC_TLS_SERVER_VERIFICATION) {
/* Do the default host name check if specifying the target name. */
- error = TlsCheckHostName(target_name, &peer);
+ error = internal::TlsCheckHostName(target_name, &peer);
if (error != GRPC_ERROR_NONE) {
grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_peer_checked, error);
tsi_peer_destruct(&peer);
@@ -217,7 +223,7 @@ void TlsChannelSecurityConnector::check_peer(
}
/* Do the custom server authorization check, if specified by the user. */
const grpc_tls_server_authorization_check_config* config =
- creds->options().server_authorization_check_config();
+ options_->server_authorization_check_config();
/* If server authorization config is not null, use it to perform
* server authorization check. */
if (config != nullptr) {
@@ -250,6 +256,39 @@ void TlsChannelSecurityConnector::check_peer(
: check_arg_->peer_cert_full_chain;
gpr_free(peer_pem_chain);
}
+ // TODO(zhenlian) - This should be cleaned up as part of the custom
+ // verification changes. Fill in the subject alternative names
+ std::vector<char*> subject_alternative_names;
+ for (size_t i = 0; i < peer.property_count; i++) {
+ const tsi_peer_property* prop = &peer.properties[i];
+ if (strcmp(prop->name,
+ TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY) == 0) {
+ char* san = new char[prop->value.length + 1];
+ memcpy(san, prop->value.data, prop->value.length);
+ san[prop->value.length] = '\0';
+ subject_alternative_names.emplace_back(san);
+ }
+ }
+ if (check_arg_->subject_alternative_names != nullptr) {
+ for (size_t i = 0; i < check_arg_->subject_alternative_names_size;
+ ++i) {
+ delete[] check_arg_->subject_alternative_names[i];
+ }
+ delete[] check_arg_->subject_alternative_names;
+ }
+ check_arg_->subject_alternative_names_size =
+ subject_alternative_names.size();
+ if (subject_alternative_names.empty()) {
+ check_arg_->subject_alternative_names = nullptr;
+ } else {
+ check_arg_->subject_alternative_names =
+ new char*[check_arg_->subject_alternative_names_size];
+ for (size_t i = 0; i < check_arg_->subject_alternative_names_size;
+ ++i) {
+ check_arg_->subject_alternative_names[i] =
+ subject_alternative_names[i];
+ }
+ }
int callback_status = config->Schedule(check_arg_);
/* Server authorization check is handled asynchronously. */
if (callback_status) {
@@ -279,6 +318,12 @@ int TlsChannelSecurityConnector::cmp(
bool TlsChannelSecurityConnector::check_call_host(
y_absl::string_view host, grpc_auth_context* auth_context,
grpc_closure* /*on_call_host_checked*/, grpc_error** error) {
+ if (options_->server_verification_option() ==
+ GRPC_TLS_SKIP_HOSTNAME_VERIFICATION ||
+ options_->server_verification_option() ==
+ GRPC_TLS_SKIP_ALL_SERVER_VERIFICATION) {
+ return true;
+ }
return grpc_ssl_check_call_host(host, target_name_.c_str(),
overridden_target_name_.c_str(), auth_context,
error);
@@ -289,105 +334,84 @@ void TlsChannelSecurityConnector::cancel_check_call_host(
GRPC_ERROR_UNREF(error);
}
-grpc_core::RefCountedPtr<grpc_channel_security_connector>
-TlsChannelSecurityConnector::CreateTlsChannelSecurityConnector(
- grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
- grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
- const char* target_name, const char* overridden_target_name,
- tsi_ssl_session_cache* ssl_session_cache) {
- if (channel_creds == nullptr) {
- gpr_log(GPR_ERROR,
- "channel_creds is nullptr in "
- "TlsChannelSecurityConnectorCreate()");
- return nullptr;
+void TlsChannelSecurityConnector::TlsChannelCertificateWatcher::
+ OnCertificatesChanged(
+ y_absl::optional<y_absl::string_view> root_certs,
+ y_absl::optional<grpc_core::PemKeyCertPairList> key_cert_pairs) {
+ GPR_ASSERT(security_connector_ != nullptr);
+ grpc_core::MutexLock lock(&security_connector_->mu_);
+ if (root_certs.has_value()) {
+ security_connector_->pem_root_certs_ = root_certs;
+ }
+ if (key_cert_pairs.has_value()) {
+ security_connector_->pem_key_cert_pair_list_ = std::move(key_cert_pairs);
+ }
+ const bool root_ready = !security_connector_->options_->watch_root_cert() ||
+ security_connector_->pem_root_certs_.has_value();
+ const bool identity_ready =
+ !security_connector_->options_->watch_identity_pair() ||
+ security_connector_->pem_key_cert_pair_list_.has_value();
+ if (root_ready && identity_ready) {
+ if (security_connector_->UpdateHandshakerFactoryLocked() !=
+ GRPC_SECURITY_OK) {
+ gpr_log(GPR_ERROR, "Update handshaker factory failed.");
+ }
}
- if (target_name == nullptr) {
+}
+
+// TODO(ZhenLian): implement the logic to signal waiting handshakers once
+// BlockOnInitialCredentialHandshaker is implemented.
+void TlsChannelSecurityConnector::TlsChannelCertificateWatcher::OnError(
+ grpc_error* root_cert_error, grpc_error* identity_cert_error) {
+ if (root_cert_error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR,
- "target_name is nullptr in "
- "TlsChannelSecurityConnectorCreate()");
- return nullptr;
+ "TlsChannelCertificateWatcher getting root_cert_error: %s",
+ grpc_error_string(root_cert_error));
}
- grpc_core::RefCountedPtr<TlsChannelSecurityConnector> c =
- grpc_core::MakeRefCounted<TlsChannelSecurityConnector>(
- std::move(channel_creds), std::move(request_metadata_creds),
- target_name, overridden_target_name);
- if (c->InitializeHandshakerFactory(ssl_session_cache) != GRPC_SECURITY_OK) {
- gpr_log(GPR_ERROR, "Could not initialize client handshaker factory.");
- return nullptr;
+ if (identity_cert_error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR,
+ "TlsChannelCertificateWatcher getting identity_cert_error: %s",
+ grpc_error_string(identity_cert_error));
}
- return c;
+ GRPC_ERROR_UNREF(root_cert_error);
+ GRPC_ERROR_UNREF(identity_cert_error);
}
-grpc_security_status TlsChannelSecurityConnector::ReplaceHandshakerFactory(
- tsi_ssl_session_cache* ssl_session_cache) {
- const TlsCredentials* creds =
- static_cast<const TlsCredentials*>(channel_creds());
+// TODO(ZhenLian): implement the logic to signal waiting handshakers once
+// BlockOnInitialCredentialHandshaker is implemented.
+grpc_security_status
+TlsChannelSecurityConnector::UpdateHandshakerFactoryLocked() {
bool skip_server_certificate_verification =
- creds->options().server_verification_option() ==
+ options_->server_verification_option() ==
GRPC_TLS_SKIP_ALL_SERVER_VERIFICATION;
/* Free the client handshaker factory if exists. */
- if (client_handshaker_factory_) {
+ if (client_handshaker_factory_ != nullptr) {
tsi_ssl_client_handshaker_factory_unref(client_handshaker_factory_);
}
- tsi_ssl_pem_key_cert_pair* pem_key_cert_pair = ConvertToTsiPemKeyCertPair(
- key_materials_config_->pem_key_cert_pair_list());
+ TString pem_root_certs;
+ if (pem_root_certs_.has_value()) {
+ // TODO(ZhenLian): update the underlying TSI layer to use C++ types like
+ // TString and y_absl::string_view to avoid making another copy here.
+ pem_root_certs = TString(*pem_root_certs_);
+ }
+ tsi_ssl_pem_key_cert_pair* pem_key_cert_pair = nullptr;
+ if (pem_key_cert_pair_list_.has_value()) {
+ pem_key_cert_pair = ConvertToTsiPemKeyCertPair(*pem_key_cert_pair_list_);
+ }
+ bool use_default_roots = !options_->watch_root_cert();
grpc_security_status status = grpc_ssl_tsi_client_handshaker_factory_init(
- pem_key_cert_pair, key_materials_config_->pem_root_certs(),
+ pem_key_cert_pair,
+ pem_root_certs.empty() || use_default_roots ? nullptr
+ : pem_root_certs.c_str(),
skip_server_certificate_verification,
- grpc_get_tsi_tls_version(creds->options().min_tls_version()),
- grpc_get_tsi_tls_version(creds->options().max_tls_version()),
- ssl_session_cache, &client_handshaker_factory_);
+ grpc_get_tsi_tls_version(options_->min_tls_version()),
+ grpc_get_tsi_tls_version(options_->max_tls_version()), ssl_session_cache_,
+ &client_handshaker_factory_);
/* Free memory. */
- grpc_tsi_ssl_pem_key_cert_pairs_destroy(pem_key_cert_pair, 1);
- return status;
-}
-
-grpc_security_status TlsChannelSecurityConnector::InitializeHandshakerFactory(
- tsi_ssl_session_cache* ssl_session_cache) {
- grpc_core::MutexLock lock(&mu_);
- const TlsCredentials* creds =
- static_cast<const TlsCredentials*>(channel_creds());
- grpc_tls_key_materials_config* key_materials_config =
- creds->options().key_materials_config();
- // key_materials_config_->set_key_materials will handle the copying of the key
- // materials users provided
- if (key_materials_config != nullptr) {
- key_materials_config_->set_key_materials(
- key_materials_config->pem_root_certs(),
- key_materials_config->pem_key_cert_pair_list());
- }
- grpc_ssl_certificate_config_reload_status reload_status =
- GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;
- /** If |creds->options()| has a credential reload config, then the call to
- * |TlsFetchKeyMaterials| will use it to update the root cert and
- * pem-key-cert-pair list stored in |key_materials_config_|. **/
- if (TlsFetchKeyMaterials(key_materials_config_, creds->options(), false,
- &reload_status) != GRPC_STATUS_OK) {
- /* Raise an error if key materials are not populated. */
- return GRPC_SECURITY_ERROR;
- }
- return ReplaceHandshakerFactory(ssl_session_cache);
-}
-
-grpc_security_status TlsChannelSecurityConnector::RefreshHandshakerFactory() {
- grpc_core::MutexLock lock(&mu_);
- const TlsCredentials* creds =
- static_cast<const TlsCredentials*>(channel_creds());
- grpc_ssl_certificate_config_reload_status reload_status =
- GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;
- /** If |creds->options()| has a credential reload config, then the call to
- * |TlsFetchKeyMaterials| will use it to update the root cert and
- * pem-key-cert-pair list stored in |key_materials_config_|. **/
- if (TlsFetchKeyMaterials(key_materials_config_, creds->options(), false,
- &reload_status) != GRPC_STATUS_OK) {
- return GRPC_SECURITY_ERROR;
- }
- if (reload_status != GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_NEW) {
- // Re-use existing handshaker factory.
- return GRPC_SECURITY_OK;
- } else {
- return ReplaceHandshakerFactory(nullptr);
+ if (pem_key_cert_pair != nullptr) {
+ grpc_tsi_ssl_pem_key_cert_pairs_destroy(pem_key_cert_pair, 1);
}
+ return status;
}
void TlsChannelSecurityConnector::ServerAuthorizationCheckDone(
@@ -435,6 +459,11 @@ TlsChannelSecurityConnector::ServerAuthorizationCheckArgCreate(
void* user_data) {
grpc_tls_server_authorization_check_arg* arg =
new grpc_tls_server_authorization_check_arg();
+ arg->target_name = nullptr;
+ arg->peer_cert = nullptr;
+ arg->peer_cert_full_chain = nullptr;
+ arg->subject_alternative_names = nullptr;
+ arg->subject_alternative_names_size = 0;
arg->error_details = new grpc_tls_error_details();
arg->cb = ServerAuthorizationCheckDone;
arg->cb_user_data = user_data;
@@ -447,9 +476,13 @@ void TlsChannelSecurityConnector::ServerAuthorizationCheckArgDestroy(
if (arg == nullptr) {
return;
}
- gpr_free((void*)arg->target_name);
- gpr_free((void*)arg->peer_cert);
- if (arg->peer_cert_full_chain) gpr_free((void*)arg->peer_cert_full_chain);
+ gpr_free(const_cast<char*>(arg->target_name));
+ gpr_free(const_cast<char*>(arg->peer_cert));
+ gpr_free(const_cast<char*>(arg->peer_cert_full_chain));
+ for (size_t i = 0; i < arg->subject_alternative_names_size; ++i) {
+ delete[] arg->subject_alternative_names[i];
+ }
+ delete[] arg->subject_alternative_names;
delete arg->error_details;
if (arg->destroy_context != nullptr) {
arg->destroy_context(arg->context);
@@ -457,40 +490,87 @@ void TlsChannelSecurityConnector::ServerAuthorizationCheckArgDestroy(
delete arg;
}
+// -------------------server security connector-------------------
+grpc_core::RefCountedPtr<grpc_server_security_connector>
+TlsServerSecurityConnector::CreateTlsServerSecurityConnector(
+ grpc_core::RefCountedPtr<grpc_server_credentials> server_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options) {
+ if (server_creds == nullptr) {
+ gpr_log(GPR_ERROR,
+ "server_creds is nullptr in "
+ "TlsServerSecurityConnectorCreate()");
+ return nullptr;
+ }
+ if (options == nullptr) {
+ gpr_log(GPR_ERROR,
+ "options is nullptr in "
+ "TlsServerSecurityConnectorCreate()");
+ return nullptr;
+ }
+ grpc_core::RefCountedPtr<TlsServerSecurityConnector> c =
+ grpc_core::MakeRefCounted<TlsServerSecurityConnector>(
+ std::move(server_creds), std::move(options));
+ return c;
+}
+
TlsServerSecurityConnector::TlsServerSecurityConnector(
- grpc_core::RefCountedPtr<grpc_server_credentials> server_creds)
+ grpc_core::RefCountedPtr<grpc_server_credentials> server_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options)
: grpc_server_security_connector(GRPC_SSL_URL_SCHEME,
- std::move(server_creds)) {
- key_materials_config_ = grpc_tls_key_materials_config_create()->Ref();
+ std::move(server_creds)),
+ options_(std::move(options)) {
+ // Create a watcher.
+ auto watcher_ptr = y_absl::make_unique<TlsServerCertificateWatcher>(this);
+ certificate_watcher_ = watcher_ptr.get();
+ // Register the watcher with the distributor.
+ grpc_tls_certificate_distributor* distributor =
+ options_->certificate_distributor();
+ y_absl::optional<TString> watched_root_cert_name;
+ if (options_->watch_root_cert()) {
+ watched_root_cert_name = options_->root_cert_name();
+ }
+ y_absl::optional<TString> watched_identity_cert_name;
+ if (options_->watch_identity_pair()) {
+ watched_identity_cert_name = options_->identity_cert_name();
+ }
+ // Server side won't use default system roots at any time.
+ distributor->WatchTlsCertificates(std::move(watcher_ptr),
+ watched_root_cert_name,
+ watched_identity_cert_name);
}
TlsServerSecurityConnector::~TlsServerSecurityConnector() {
+ // Cancel all the watchers.
+ grpc_tls_certificate_distributor* distributor =
+ options_->certificate_distributor();
+ distributor->CancelTlsCertificatesWatch(certificate_watcher_);
if (server_handshaker_factory_ != nullptr) {
tsi_ssl_server_handshaker_factory_unref(server_handshaker_factory_);
}
- if (key_materials_config_.get() != nullptr) {
- key_materials_config_.get()->Unref();
- }
}
void TlsServerSecurityConnector::add_handshakers(
const grpc_channel_args* args, grpc_pollset_set* /*interested_parties*/,
grpc_core::HandshakeManager* handshake_mgr) {
- /* Refresh handshaker factory if needed. */
- if (RefreshHandshakerFactory() != GRPC_SECURITY_OK) {
- gpr_log(GPR_ERROR, "Handshaker factory refresh failed.");
- return;
- }
- /* Create a TLS TSI handshaker for server. */
- tsi_handshaker* tsi_hs = nullptr;
- tsi_result result = tsi_ssl_server_handshaker_factory_create_handshaker(
- server_handshaker_factory_, &tsi_hs);
- if (result != TSI_OK) {
- gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.",
- tsi_result_to_string(result));
+ grpc_core::MutexLock lock(&mu_);
+ if (server_handshaker_factory_ != nullptr) {
+ // Instantiate TSI handshaker.
+ tsi_handshaker* tsi_hs = nullptr;
+ tsi_result result = tsi_ssl_server_handshaker_factory_create_handshaker(
+ server_handshaker_factory_, &tsi_hs);
+ if (result != TSI_OK) {
+ gpr_log(GPR_ERROR, "Handshaker creation failed with error %s.",
+ tsi_result_to_string(result));
+ return;
+ }
+ // Create handshakers.
+ handshake_mgr->Add(grpc_core::SecurityHandshakerCreate(tsi_hs, this, args));
return;
}
- handshake_mgr->Add(grpc_core::SecurityHandshakerCreate(tsi_hs, this, args));
+ // TODO(ZhenLian): Implement the logic(delegation to
+ // BlockOnInitialCredentialHandshaker) when certificates are not ready.
+ gpr_log(GPR_ERROR, "%s not supported yet.",
+ "Server BlockOnInitialCredentialHandshaker");
}
void TlsServerSecurityConnector::check_peer(
@@ -510,43 +590,79 @@ int TlsServerSecurityConnector::cmp(
static_cast<const grpc_server_security_connector*>(other));
}
-grpc_core::RefCountedPtr<grpc_server_security_connector>
-TlsServerSecurityConnector::CreateTlsServerSecurityConnector(
- grpc_core::RefCountedPtr<grpc_server_credentials> server_creds) {
- if (server_creds == nullptr) {
+void TlsServerSecurityConnector::TlsServerCertificateWatcher::
+ OnCertificatesChanged(
+ y_absl::optional<y_absl::string_view> root_certs,
+ y_absl::optional<grpc_core::PemKeyCertPairList> key_cert_pairs) {
+ GPR_ASSERT(security_connector_ != nullptr);
+ grpc_core::MutexLock lock(&security_connector_->mu_);
+ if (root_certs.has_value()) {
+ security_connector_->pem_root_certs_ = root_certs;
+ }
+ if (key_cert_pairs.has_value()) {
+ security_connector_->pem_key_cert_pair_list_ = std::move(key_cert_pairs);
+ }
+ bool root_being_watched = security_connector_->options_->watch_root_cert();
+ bool root_has_value = security_connector_->pem_root_certs_.has_value();
+ bool identity_being_watched =
+ security_connector_->options_->watch_identity_pair();
+ bool identity_has_value =
+ security_connector_->pem_key_cert_pair_list_.has_value();
+ if ((root_being_watched && root_has_value && identity_being_watched &&
+ identity_has_value) ||
+ (root_being_watched && root_has_value && !identity_being_watched) ||
+ (!root_being_watched && identity_being_watched && identity_has_value)) {
+ if (security_connector_->UpdateHandshakerFactoryLocked() !=
+ GRPC_SECURITY_OK) {
+ gpr_log(GPR_ERROR, "Update handshaker factory failed.");
+ }
+ }
+}
+
+// TODO(ZhenLian): implement the logic to signal waiting handshakers once
+// BlockOnInitialCredentialHandshaker is implemented.
+void TlsServerSecurityConnector::TlsServerCertificateWatcher::OnError(
+ grpc_error* root_cert_error, grpc_error* identity_cert_error) {
+ if (root_cert_error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR,
- "server_creds is nullptr in "
- "TlsServerSecurityConnectorCreate()");
- return nullptr;
+ "TlsServerCertificateWatcher getting root_cert_error: %s",
+ grpc_error_string(root_cert_error));
}
- grpc_core::RefCountedPtr<TlsServerSecurityConnector> c =
- grpc_core::MakeRefCounted<TlsServerSecurityConnector>(
- std::move(server_creds));
- if (c->InitializeHandshakerFactory() != GRPC_SECURITY_OK) {
- gpr_log(GPR_ERROR, "Could not initialize server handshaker factory.");
- return nullptr;
+ if (identity_cert_error != GRPC_ERROR_NONE) {
+ gpr_log(GPR_ERROR,
+ "TlsServerCertificateWatcher getting identity_cert_error: %s",
+ grpc_error_string(identity_cert_error));
}
- return c;
+ GRPC_ERROR_UNREF(root_cert_error);
+ GRPC_ERROR_UNREF(identity_cert_error);
}
-grpc_security_status TlsServerSecurityConnector::ReplaceHandshakerFactory() {
- const TlsServerCredentials* creds =
- static_cast<const TlsServerCredentials*>(server_creds());
+// TODO(ZhenLian): implement the logic to signal waiting handshakers once
+// BlockOnInitialCredentialHandshaker is implemented.
+grpc_security_status
+TlsServerSecurityConnector::UpdateHandshakerFactoryLocked() {
/* Free the server handshaker factory if exists. */
- if (server_handshaker_factory_) {
+ if (server_handshaker_factory_ != nullptr) {
tsi_ssl_server_handshaker_factory_unref(server_handshaker_factory_);
}
- GPR_ASSERT(!key_materials_config_->pem_key_cert_pair_list().empty());
- tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs = ConvertToTsiPemKeyCertPair(
- key_materials_config_->pem_key_cert_pair_list());
- size_t num_key_cert_pairs =
- key_materials_config_->pem_key_cert_pair_list().size();
+ // The identity certs on the server side shouldn't be empty.
+ GPR_ASSERT(pem_key_cert_pair_list_.has_value());
+ GPR_ASSERT(!(*pem_key_cert_pair_list_).empty());
+ TString pem_root_certs;
+ if (pem_root_certs_.has_value()) {
+ // TODO(ZhenLian): update the underlying TSI layer to use C++ types like
+ // TString and y_absl::string_view to avoid making another copy here.
+ pem_root_certs = TString(*pem_root_certs_);
+ }
+ tsi_ssl_pem_key_cert_pair* pem_key_cert_pairs = nullptr;
+ pem_key_cert_pairs = ConvertToTsiPemKeyCertPair(*pem_key_cert_pair_list_);
+ size_t num_key_cert_pairs = (*pem_key_cert_pair_list_).size();
grpc_security_status status = grpc_ssl_tsi_server_handshaker_factory_init(
pem_key_cert_pairs, num_key_cert_pairs,
- key_materials_config_->pem_root_certs(),
- creds->options().cert_request_type(),
- grpc_get_tsi_tls_version(creds->options().min_tls_version()),
- grpc_get_tsi_tls_version(creds->options().max_tls_version()),
+ pem_root_certs.empty() ? nullptr : pem_root_certs.c_str(),
+ options_->cert_request_type(),
+ grpc_get_tsi_tls_version(options_->min_tls_version()),
+ grpc_get_tsi_tls_version(options_->max_tls_version()),
&server_handshaker_factory_);
/* Free memory. */
grpc_tsi_ssl_pem_key_cert_pairs_destroy(pem_key_cert_pairs,
@@ -554,53 +670,18 @@ grpc_security_status TlsServerSecurityConnector::ReplaceHandshakerFactory() {
return status;
}
-grpc_security_status TlsServerSecurityConnector::InitializeHandshakerFactory() {
- grpc_core::MutexLock lock(&mu_);
- const TlsServerCredentials* creds =
- static_cast<const TlsServerCredentials*>(server_creds());
- grpc_tls_key_materials_config* key_materials_config =
- creds->options().key_materials_config();
- if (key_materials_config != nullptr) {
- key_materials_config_->set_key_materials(
- key_materials_config->pem_root_certs(),
- key_materials_config->pem_key_cert_pair_list());
- }
- grpc_ssl_certificate_config_reload_status reload_status =
- GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;
- /** If |creds->options()| has a credential reload config, then the call to
- * |TlsFetchKeyMaterials| will use it to update the root cert and
- * pem-key-cert-pair list stored in |key_materials_config_|. Otherwise, it
- * will return |GRPC_STATUS_OK| if |key_materials_config_| already has
- * credentials, and an error code if not. **/
- if (TlsFetchKeyMaterials(key_materials_config_, creds->options(), true,
- &reload_status) != GRPC_STATUS_OK) {
- /* Raise an error if key materials are not populated. */
- return GRPC_SECURITY_ERROR;
- }
- return ReplaceHandshakerFactory();
-}
+namespace internal {
-grpc_security_status TlsServerSecurityConnector::RefreshHandshakerFactory() {
- grpc_core::MutexLock lock(&mu_);
- const TlsServerCredentials* creds =
- static_cast<const TlsServerCredentials*>(server_creds());
- grpc_ssl_certificate_config_reload_status reload_status =
- GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_UNCHANGED;
- /** If |creds->options()| has a credential reload config, then the call to
- * |TlsFetchKeyMaterials| will use it to update the root cert and
- * pem-key-cert-pair list stored in |key_materials_config_|. Otherwise, it
- * will return |GRPC_STATUS_OK| if |key_materials_config_| already has
- * credentials, and an error code if not. **/
- if (TlsFetchKeyMaterials(key_materials_config_, creds->options(), true,
- &reload_status) != GRPC_STATUS_OK) {
- return GRPC_SECURITY_ERROR;
- }
- if (reload_status != GRPC_SSL_CERTIFICATE_CONFIG_RELOAD_NEW) {
- /* At this point, we should have key materials populated. */
- return GRPC_SECURITY_OK;
- } else {
- return ReplaceHandshakerFactory();
+grpc_error* TlsCheckHostName(const char* peer_name, const tsi_peer* peer) {
+ /* Check the peer name if specified. */
+ if (peer_name != nullptr && !grpc_ssl_host_matches_name(peer, peer_name)) {
+ return GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("Peer name ", peer_name, " is not in peer certificate")
+ .c_str());
}
+ return GRPC_ERROR_NONE;
}
+} // namespace internal
+
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.h b/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.h
index f50d916589f..32ee8bc9d5e 100644
--- a/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.h
+++ b/contrib/libs/grpc/src/core/lib/security/security_connector/tls/tls_security_connector.h
@@ -23,13 +23,14 @@
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/security/context/security_context.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
#define GRPC_TLS_TRANSPORT_SECURITY_TYPE "tls"
namespace grpc_core {
-// TLS channel security connector.
+// Channel security connector using TLS as transport security protocol.
class TlsChannelSecurityConnector final
: public grpc_channel_security_connector {
public:
@@ -37,14 +38,18 @@ class TlsChannelSecurityConnector final
static grpc_core::RefCountedPtr<grpc_channel_security_connector>
CreateTlsChannelSecurityConnector(
grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options,
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
const char* target_name, const char* overridden_target_name,
tsi_ssl_session_cache* ssl_session_cache);
TlsChannelSecurityConnector(
grpc_core::RefCountedPtr<grpc_channel_credentials> channel_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options,
grpc_core::RefCountedPtr<grpc_call_credentials> request_metadata_creds,
- const char* target_name, const char* overridden_target_name);
+ const char* target_name, const char* overridden_target_name,
+ tsi_ssl_session_cache* ssl_session_cache);
+
~TlsChannelSecurityConnector() override;
void add_handshakers(const grpc_channel_args* args,
@@ -64,15 +69,44 @@ class TlsChannelSecurityConnector final
void cancel_check_call_host(grpc_closure* on_call_host_checked,
grpc_error* error) override;
- private:
- // Initialize SSL TSI client handshaker factory.
- grpc_security_status InitializeHandshakerFactory(
- tsi_ssl_session_cache* ssl_session_cache);
+ tsi_ssl_client_handshaker_factory* ClientHandshakerFactoryForTesting() {
+ grpc_core::MutexLock lock(&mu_);
+ return client_handshaker_factory_;
+ };
- // A util function to create a new client handshaker factory to replace
- // the existing one if exists.
- grpc_security_status ReplaceHandshakerFactory(
- tsi_ssl_session_cache* ssl_session_cache);
+ y_absl::optional<y_absl::string_view> RootCertsForTesting() {
+ grpc_core::MutexLock lock(&mu_);
+ return pem_root_certs_;
+ }
+
+ y_absl::optional<grpc_core::PemKeyCertPairList> KeyCertPairListForTesting() {
+ grpc_core::MutexLock lock(&mu_);
+ return pem_key_cert_pair_list_;
+ }
+
+ private:
+ // A watcher that watches certificate updates from
+ // grpc_tls_certificate_distributor. It will never outlive
+ // |security_connector_|.
+ class TlsChannelCertificateWatcher : public grpc_tls_certificate_distributor::
+ TlsCertificatesWatcherInterface {
+ public:
+ explicit TlsChannelCertificateWatcher(
+ TlsChannelSecurityConnector* security_connector)
+ : security_connector_(security_connector) {}
+ void OnCertificatesChanged(
+ y_absl::optional<y_absl::string_view> root_certs,
+ y_absl::optional<grpc_core::PemKeyCertPairList> key_cert_pairs) override;
+ void OnError(grpc_error* root_cert_error,
+ grpc_error* identity_cert_error) override;
+
+ private:
+ TlsChannelSecurityConnector* security_connector_ = nullptr;
+ };
+
+ // Updates |client_handshaker_factory_| when the certificates that
+ // |certificate_watcher_| is watching get updated.
+ grpc_security_status UpdateHandshakerFactoryLocked();
// gRPC-provided callback executed by application, which servers to bring the
// control back to gRPC core.
@@ -91,29 +125,32 @@ class TlsChannelSecurityConnector final
static void ServerAuthorizationCheckArgDestroy(
grpc_tls_server_authorization_check_arg* arg);
- // A util function to refresh SSL TSI client handshaker factory with a valid
- // credential.
- grpc_security_status RefreshHandshakerFactory();
-
grpc_core::Mutex mu_;
- grpc_closure* on_peer_checked_;
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options_;
+ grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface*
+ certificate_watcher_ = nullptr;
+ grpc_closure* on_peer_checked_ = nullptr;
TString target_name_;
TString overridden_target_name_;
tsi_ssl_client_handshaker_factory* client_handshaker_factory_ = nullptr;
- grpc_tls_server_authorization_check_arg* check_arg_;
- grpc_core::RefCountedPtr<grpc_tls_key_materials_config> key_materials_config_;
+ grpc_tls_server_authorization_check_arg* check_arg_ = nullptr;
+ tsi_ssl_session_cache* ssl_session_cache_ = nullptr;
+ y_absl::optional<y_absl::string_view> pem_root_certs_;
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pair_list_;
};
-// TLS server security connector.
+// Server security connector using TLS as transport security protocol.
class TlsServerSecurityConnector final : public grpc_server_security_connector {
public:
// static factory method to create a TLS server security connector.
static grpc_core::RefCountedPtr<grpc_server_security_connector>
CreateTlsServerSecurityConnector(
- grpc_core::RefCountedPtr<grpc_server_credentials> server_creds);
+ grpc_core::RefCountedPtr<grpc_server_credentials> server_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options);
- explicit TlsServerSecurityConnector(
- grpc_core::RefCountedPtr<grpc_server_credentials> server_creds);
+ TlsServerSecurityConnector(
+ grpc_core::RefCountedPtr<grpc_server_credentials> server_creds,
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options);
~TlsServerSecurityConnector() override;
void add_handshakers(const grpc_channel_args* args,
@@ -126,58 +163,65 @@ class TlsServerSecurityConnector final : public grpc_server_security_connector {
int cmp(const grpc_security_connector* other) const override;
- private:
- // Initialize SSL TSI server handshaker factory.
- grpc_security_status InitializeHandshakerFactory();
+ tsi_ssl_server_handshaker_factory* ServerHandshakerFactoryForTesting() {
+ grpc_core::MutexLock lock(&mu_);
+ return server_handshaker_factory_;
+ };
- // A util function to create a new server handshaker factory to replace the
- // existing once if exists.
- grpc_security_status ReplaceHandshakerFactory();
+ const y_absl::optional<y_absl::string_view>& RootCertsForTesting() {
+ grpc_core::MutexLock lock(&mu_);
+ return pem_root_certs_;
+ }
- // A util function to refresh SSL TSI server handshaker factory with a valid
- // credential.
- grpc_security_status RefreshHandshakerFactory();
+ const y_absl::optional<grpc_core::PemKeyCertPairList>&
+ KeyCertPairListForTesting() {
+ grpc_core::MutexLock lock(&mu_);
+ return pem_key_cert_pair_list_;
+ }
+
+ private:
+ // A watcher that watches certificate updates from
+ // grpc_tls_certificate_distributor. It will never outlive
+ // |security_connector_|.
+ class TlsServerCertificateWatcher : public grpc_tls_certificate_distributor::
+ TlsCertificatesWatcherInterface {
+ public:
+ explicit TlsServerCertificateWatcher(
+ TlsServerSecurityConnector* security_connector)
+ : security_connector_(security_connector) {}
+ void OnCertificatesChanged(
+ y_absl::optional<y_absl::string_view> root_certs,
+ y_absl::optional<grpc_core::PemKeyCertPairList> key_cert_pairs) override;
+ void OnError(grpc_error* root_cert_error,
+ grpc_error* identity_cert_error) override;
+
+ private:
+ TlsServerSecurityConnector* security_connector_ = nullptr;
+ };
+
+ // Updates |server_handshaker_factory_| when the certificates that
+ // |certificate_watcher_| is watching get updated.
+ grpc_security_status UpdateHandshakerFactoryLocked();
grpc_core::Mutex mu_;
+ grpc_core::RefCountedPtr<grpc_tls_credentials_options> options_;
+ grpc_tls_certificate_distributor::TlsCertificatesWatcherInterface*
+ certificate_watcher_ = nullptr;
+
tsi_ssl_server_handshaker_factory* server_handshaker_factory_ = nullptr;
- grpc_core::RefCountedPtr<grpc_tls_key_materials_config> key_materials_config_;
+ y_absl::optional<y_absl::string_view> pem_root_certs_;
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pair_list_;
};
// ---- Functions below are exposed for testing only -----------------------
-
-/** The |TlsFetchKeyMaterials| API ensures that |key_materials_config| has a
- * non-empty pem-key-cert pair list. This is done as follows:
- * - if |options| is equipped with a credential reload config, then this
- * methods uses credential reloading to populate |key_materials_config|, and
- * afterwards it populates |reload_status| with the status of this operation.
- * In particular, any data stored in |key_materials_config| is overwritten.
- * - if |options| has no credential reload config, then:
- * - if |key_materials_config| already has a non-empty pem-key-cert pair
- * list or is called by a client, then the method returns |GRPC_STATUS_OK|.
- * - if |key_materials_config| has an empty pem-key-cert pair list and is
- * called by a server, then the method return an error code.
- *
- * The arguments are detailed below:
- * - key_materials_config: a key materials config that will be populated by the
- * method on success; the caller should not pass in nullptr. Any data held by
- * the config will be overwritten.
- * - options: the TLS credentials options whose credential reloading config
- * will be used to populate |key_materials_config|.
- * - is_server: true denotes that this method is called by a server, and
- * false denotes that this method is called by a client.
- * - status: the status of the credential reloading after the method
- * returns; the caller should not pass in nullptr. **/
-grpc_status_code TlsFetchKeyMaterials(
- const grpc_core::RefCountedPtr<grpc_tls_key_materials_config>&
- key_materials_config,
- const grpc_tls_credentials_options& options, bool is_server,
- grpc_ssl_certificate_config_reload_status* status);
+namespace internal {
// TlsCheckHostName checks if |peer_name| matches the identity information
// contained in |peer|. This is AKA hostname check.
grpc_error* TlsCheckHostName(const char* peer_name, const tsi_peer* peer);
+} // namespace internal
+
} // namespace grpc_core
-#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_TLS_TLS_SECURITY_CONNECTOR_H \
- */
+#endif // GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_TLS_TLS_SECURITY_CONNECTOR_H
diff --git a/contrib/libs/grpc/src/core/lib/security/transport/secure_endpoint.cc b/contrib/libs/grpc/src/core/lib/security/transport/secure_endpoint.cc
index e79184fac13..69198e216ab 100644
--- a/contrib/libs/grpc/src/core/lib/security/transport/secure_endpoint.cc
+++ b/contrib/libs/grpc/src/core/lib/security/transport/secure_endpoint.cc
@@ -443,10 +443,10 @@ static const grpc_endpoint_vtable vtable = {endpoint_read,
grpc_endpoint* grpc_secure_endpoint_create(
struct tsi_frame_protector* protector,
struct tsi_zero_copy_grpc_protector* zero_copy_protector,
- grpc_endpoint* transport, grpc_slice* leftover_slices,
+ grpc_endpoint* to_wrap, grpc_slice* leftover_slices,
size_t leftover_nslices) {
secure_endpoint* ep =
- new secure_endpoint(&vtable, protector, zero_copy_protector, transport,
+ new secure_endpoint(&vtable, protector, zero_copy_protector, to_wrap,
leftover_slices, leftover_nslices);
return &ep->base;
}
diff --git a/contrib/libs/grpc/src/core/lib/security/transport/security_handshaker.cc b/contrib/libs/grpc/src/core/lib/security/transport/security_handshaker.cc
index 079b49c95a6..e6eee7c3e47 100644
--- a/contrib/libs/grpc/src/core/lib/security/transport/security_handshaker.cc
+++ b/contrib/libs/grpc/src/core/lib/security/transport/security_handshaker.cc
@@ -29,6 +29,7 @@
#include <grpc/support/log.h>
#include "src/core/lib/channel/channel_args.h"
+#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/channel/handshaker.h"
#include "src/core/lib/channel/handshaker_registry.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
@@ -84,7 +85,7 @@ class SecurityHandshaker : public Handshaker {
tsi_handshaker* handshaker_;
RefCountedPtr<grpc_security_connector> connector_;
- gpr_mu mu_;
+ Mutex mu_;
bool is_shutdown_ = false;
// Endpoint and read buffer to destroy after a shutdown.
@@ -120,14 +121,12 @@ SecurityHandshaker::SecurityHandshaker(tsi_handshaker* handshaker,
max_frame_size_ = grpc_channel_arg_get_integer(
arg, {0, 0, std::numeric_limits<int>::max()});
}
- gpr_mu_init(&mu_);
grpc_slice_buffer_init(&outgoing_);
GRPC_CLOSURE_INIT(&on_peer_checked_, &SecurityHandshaker::OnPeerCheckedFn,
this, grpc_schedule_on_exec_ctx);
}
SecurityHandshaker::~SecurityHandshaker() {
- gpr_mu_destroy(&mu_);
tsi_handshaker_destroy(handshaker_);
tsi_handshaker_result_destroy(handshaker_result_);
if (endpoint_to_destroy_ != nullptr) {
@@ -201,6 +200,31 @@ void SecurityHandshaker::HandshakeFailedLocked(grpc_error* error) {
ExecCtx::Run(DEBUG_LOCATION, on_handshake_done_, error);
}
+namespace {
+
+RefCountedPtr<channelz::SocketNode::Security>
+MakeChannelzSecurityFromAuthContext(grpc_auth_context* auth_context) {
+ RefCountedPtr<channelz::SocketNode::Security> security =
+ MakeRefCounted<channelz::SocketNode::Security>();
+ // TODO(yashykt): Currently, we are assuming TLS by default and are only able
+ // to fill in the remote certificate but we should ideally be able to fill in
+ // other fields in
+ // https://github.com/grpc/grpc/blob/fcd43e90304862a823316b224ee733d17a8cfd90/src/proto/grpc/channelz/channelz.proto#L326
+ // from grpc_auth_context.
+ security->type = channelz::SocketNode::Security::ModelType::kTls;
+ security->tls = y_absl::make_optional<channelz::SocketNode::Security::Tls>();
+ grpc_auth_property_iterator it = grpc_auth_context_find_properties_by_name(
+ auth_context, GRPC_X509_PEM_CERT_PROPERTY_NAME);
+ const grpc_auth_property* prop = grpc_auth_property_iterator_next(&it);
+ if (prop != nullptr) {
+ security->tls->remote_certificate =
+ TString(prop->value, prop->value_length);
+ }
+ return security;
+}
+
+} // namespace
+
void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
MutexLock lock(&mu_);
if (error != GRPC_ERROR_NONE || is_shutdown_) {
@@ -241,8 +265,8 @@ void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
handshaker_result_, &unused_bytes, &unused_bytes_size);
// Create secure endpoint.
if (unused_bytes_size > 0) {
- grpc_slice slice =
- grpc_slice_from_copied_buffer((char*)unused_bytes, unused_bytes_size);
+ grpc_slice slice = grpc_slice_from_copied_buffer(
+ reinterpret_cast<const char*>(unused_bytes), unused_bytes_size);
args_->endpoint = grpc_secure_endpoint_create(
protector, zero_copy_protector, args_->endpoint, &slice, 1);
grpc_slice_unref_internal(slice);
@@ -253,9 +277,13 @@ void SecurityHandshaker::OnPeerCheckedInner(grpc_error* error) {
tsi_handshaker_result_destroy(handshaker_result_);
handshaker_result_ = nullptr;
// Add auth context to channel args.
- grpc_arg auth_context_arg = grpc_auth_context_to_arg(auth_context_.get());
+ y_absl::InlinedVector<grpc_arg, 2> args_to_add;
+ args_to_add.push_back(grpc_auth_context_to_arg(auth_context_.get()));
+ auto security = MakeChannelzSecurityFromAuthContext(auth_context_.get());
+ args_to_add.push_back(security->MakeChannelArg());
grpc_channel_args* tmp_args = args_->args;
- args_->args = grpc_channel_args_copy_and_add(tmp_args, &auth_context_arg, 1);
+ args_->args = grpc_channel_args_copy_and_add(tmp_args, args_to_add.data(),
+ args_to_add.size());
grpc_channel_args_destroy(tmp_args);
// Invoke callback.
ExecCtx::Run(DEBUG_LOCATION, on_handshake_done_, GRPC_ERROR_NONE);
@@ -499,7 +527,7 @@ class FailHandshaker : public Handshaker {
}
private:
- virtual ~FailHandshaker() = default;
+ ~FailHandshaker() override = default;
};
//
diff --git a/contrib/libs/grpc/src/core/lib/security/transport/server_auth_filter.cc b/contrib/libs/grpc/src/core/lib/security/transport/server_auth_filter.cc
index 6f83a179b43..925a70a24c7 100644
--- a/contrib/libs/grpc/src/core/lib/security/transport/server_auth_filter.cc
+++ b/contrib/libs/grpc/src/core/lib/security/transport/server_auth_filter.cc
@@ -123,8 +123,9 @@ static grpc_filtered_mdelem remove_consumed_md(void* user_data,
for (i = 0; i < calld->num_consumed_md; i++) {
const grpc_metadata* consumed_md = &calld->consumed_md[i];
if (grpc_slice_eq(GRPC_MDKEY(md), consumed_md->key) &&
- grpc_slice_eq(GRPC_MDVALUE(md), consumed_md->value))
+ grpc_slice_eq(GRPC_MDVALUE(md), consumed_md->value)) {
return GRPC_FILTERED_REMOVE();
+ }
}
return GRPC_FILTERED_MDELEM(md);
}
@@ -299,6 +300,13 @@ static grpc_error* server_auth_init_channel_elem(
GPR_ASSERT(!args->is_last);
grpc_auth_context* auth_context =
grpc_find_auth_context_in_args(args->channel_args);
+ if (auth_context == nullptr) {
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_STATIC_STRING(
+ "No authorization context found. This might be a TRANSIENT failure due "
+ "to certificates not having been loaded yet.");
+ gpr_log(GPR_DEBUG, "%s", grpc_error_string(error));
+ return error;
+ }
GPR_ASSERT(auth_context != nullptr);
grpc_server_credentials* creds =
grpc_find_server_credentials_in_args(args->channel_args);
diff --git a/contrib/libs/grpc/src/core/lib/security/util/json_util.h b/contrib/libs/grpc/src/core/lib/security/util/json_util.h
index 42f7005e00e..cde9ca97ffd 100644
--- a/contrib/libs/grpc/src/core/lib/security/util/json_util.h
+++ b/contrib/libs/grpc/src/core/lib/security/util/json_util.h
@@ -30,6 +30,7 @@
#define GRPC_AUTH_JSON_TYPE_INVALID "invalid"
#define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT "service_account"
#define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER "authorized_user"
+#define GRPC_AUTH_JSON_TYPE_EXTERNAL_ACCOUNT "external_account"
// Gets a child property from a json node.
const char* grpc_json_get_string_property(const grpc_core::Json& json,
diff --git a/contrib/libs/grpc/src/core/lib/slice/slice.cc b/contrib/libs/grpc/src/core/lib/slice/slice.cc
index 838cf4ba498..da1c43e8bea 100644
--- a/contrib/libs/grpc/src/core/lib/slice/slice.cc
+++ b/contrib/libs/grpc/src/core/lib/slice/slice.cc
@@ -555,8 +555,9 @@ int grpc_slice_buf_start_eq(grpc_slice a, const void* b, size_t len) {
int grpc_slice_rchr(grpc_slice s, char c) {
const char* b = reinterpret_cast<const char*> GRPC_SLICE_START_PTR(s);
int i;
- for (i = static_cast<int> GRPC_SLICE_LENGTH(s) - 1; i != -1 && b[i] != c; i--)
- ;
+ for (i = static_cast<int> GRPC_SLICE_LENGTH(s) - 1; i != -1 && b[i] != c;
+ i--) {
+ }
return i;
}
@@ -574,10 +575,12 @@ int grpc_slice_slice(grpc_slice haystack, grpc_slice needle) {
if (haystack_len == 0 || needle_len == 0) return -1;
if (haystack_len < needle_len) return -1;
- if (haystack_len == needle_len)
+ if (haystack_len == needle_len) {
return grpc_slice_eq(haystack, needle) ? 0 : -1;
- if (needle_len == 1)
+ }
+ if (needle_len == 1) {
return grpc_slice_chr(haystack, static_cast<char>(*needle_bytes));
+ }
const uint8_t* last = haystack_bytes + haystack_len - needle_len;
for (const uint8_t* cur = haystack_bytes; cur != last; ++cur) {
diff --git a/contrib/libs/grpc/src/core/lib/slice/slice_buffer.cc b/contrib/libs/grpc/src/core/lib/slice/slice_buffer.cc
index 2d666947362..ba103d702bc 100644
--- a/contrib/libs/grpc/src/core/lib/slice/slice_buffer.cc
+++ b/contrib/libs/grpc/src/core/lib/slice/slice_buffer.cc
@@ -106,8 +106,9 @@ uint8_t* grpc_slice_buffer_tiny_add(grpc_slice_buffer* sb, size_t n) {
if (sb->count == 0) goto add_first;
back = &sb->slices[sb->count - 1];
if (back->refcount) goto add_new;
- if ((back->data.inlined.length + n) > sizeof(back->data.inlined.bytes))
+ if ((back->data.inlined.length + n) > sizeof(back->data.inlined.bytes)) {
goto add_new;
+ }
out = back->data.inlined.bytes + back->data.inlined.length;
back->data.inlined.length =
static_cast<uint8_t>(back->data.inlined.length + n);
diff --git a/contrib/libs/grpc/src/core/lib/slice/slice_intern.cc b/contrib/libs/grpc/src/core/lib/slice/slice_intern.cc
index b41628c70b0..04681304e7e 100644
--- a/contrib/libs/grpc/src/core/lib/slice/slice_intern.cc
+++ b/contrib/libs/grpc/src/core/lib/slice/slice_intern.cc
@@ -44,13 +44,13 @@
using grpc_core::InternedSliceRefcount;
typedef struct slice_shard {
- gpr_mu mu;
+ grpc_core::Mutex mu;
InternedSliceRefcount** strs;
size_t count;
size_t capacity;
} slice_shard;
-static slice_shard g_shards[SHARD_COUNT];
+static slice_shard* g_shards;
struct static_metadata_hash_ent {
uint32_t hash;
@@ -74,8 +74,8 @@ InternedSliceRefcount::~InternedSliceRefcount() {
InternedSliceRefcount* cur;
for (prev_next = &shard->strs[TABLE_IDX(this->hash, shard->capacity)],
cur = *prev_next;
- cur != this; prev_next = &cur->bucket_next, cur = cur->bucket_next)
- ;
+ cur != this; prev_next = &cur->bucket_next, cur = cur->bucket_next) {
+ }
*prev_next = cur->bucket_next;
shard->count--;
}
@@ -259,13 +259,12 @@ template <typename SliceArgs>
static InternedSliceRefcount* FindOrCreateInternedSlice(uint32_t hash,
const SliceArgs& args) {
slice_shard* shard = &g_shards[SHARD_IDX(hash)];
- gpr_mu_lock(&shard->mu);
+ grpc_core::MutexLock lock(&shard->mu);
const size_t idx = TABLE_IDX(hash, shard->capacity);
InternedSliceRefcount* s = MatchInternedSliceLocked(hash, idx, args);
if (s == nullptr) {
s = InternNewStringLocked(shard, idx, hash, args);
}
- gpr_mu_unlock(&shard->mu);
return s;
}
@@ -273,17 +272,16 @@ grpc_core::ManagedMemorySlice::ManagedMemorySlice(const char* string)
: grpc_core::ManagedMemorySlice::ManagedMemorySlice(string,
strlen(string)) {}
-grpc_core::ManagedMemorySlice::ManagedMemorySlice(const char* string,
- size_t len) {
+grpc_core::ManagedMemorySlice::ManagedMemorySlice(const char* buf, size_t len) {
GPR_TIMER_SCOPE("grpc_slice_intern", 0);
- const uint32_t hash = gpr_murmur_hash3(string, len, g_hash_seed);
+ const uint32_t hash = gpr_murmur_hash3(buf, len, g_hash_seed);
const StaticMetadataSlice* static_slice =
- MatchStaticSlice(hash, std::pair<const char*, size_t>(string, len));
+ MatchStaticSlice(hash, std::pair<const char*, size_t>(buf, len));
if (static_slice) {
*this = *static_slice;
} else {
*this = grpc_core::InternedSlice(FindOrCreateInternedSlice(
- hash, std::pair<const char*, size_t>(string, len)));
+ hash, std::pair<const char*, size_t>(buf, len)));
}
}
@@ -313,9 +311,9 @@ void grpc_slice_intern_init(void) {
grpc_core::g_hash_seed =
static_cast<uint32_t>(gpr_now(GPR_CLOCK_REALTIME).tv_nsec);
}
+ g_shards = new slice_shard[SHARD_COUNT];
for (size_t i = 0; i < SHARD_COUNT; i++) {
slice_shard* shard = &g_shards[i];
- gpr_mu_init(&shard->mu);
shard->count = 0;
shard->capacity = INITIAL_SHARD_CAPACITY;
shard->strs = static_cast<InternedSliceRefcount**>(
@@ -353,7 +351,6 @@ void grpc_slice_intern_init(void) {
void grpc_slice_intern_shutdown(void) {
for (size_t i = 0; i < SHARD_COUNT; i++) {
slice_shard* shard = &g_shards[i];
- gpr_mu_destroy(&shard->mu);
/* TODO(ctiller): GPR_ASSERT(shard->count == 0); */
if (shard->count != 0) {
gpr_log(GPR_DEBUG, "WARNING: %" PRIuPTR " metadata strings were leaked",
@@ -372,4 +369,5 @@ void grpc_slice_intern_shutdown(void) {
}
gpr_free(shard->strs);
}
+ delete[] g_shards;
}
diff --git a/contrib/libs/grpc/src/core/lib/slice/slice_internal.h b/contrib/libs/grpc/src/core/lib/slice/slice_internal.h
index 8a17b6e72ee..2449ea0f34a 100644
--- a/contrib/libs/grpc/src/core/lib/slice/slice_internal.h
+++ b/contrib/libs/grpc/src/core/lib/slice/slice_internal.h
@@ -176,7 +176,7 @@ namespace grpc_core {
struct StaticSliceRefcount {
static grpc_slice_refcount kStaticSubRefcount;
- StaticSliceRefcount(uint32_t index)
+ explicit StaticSliceRefcount(uint32_t index)
: base(&kStaticSubRefcount, grpc_slice_refcount::Type::STATIC),
index(index) {}
@@ -310,7 +310,7 @@ inline bool grpc_slice_static_interned_equal(const grpc_slice& a,
void grpc_slice_intern_init(void);
void grpc_slice_intern_shutdown(void);
-void grpc_test_only_set_slice_hash_seed(uint32_t key);
+void grpc_test_only_set_slice_hash_seed(uint32_t seed);
// if slice matches a static slice, returns the static slice
// otherwise returns the passed in slice (without reffing it)
// used for surface boundaries where we might receive an un-interned static
diff --git a/contrib/libs/grpc/src/core/lib/slice/slice_traits.h b/contrib/libs/grpc/src/core/lib/slice/slice_traits.h
deleted file mode 100644
index 07d13cd8b54..00000000000
--- a/contrib/libs/grpc/src/core/lib/slice/slice_traits.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- *
- * Copyright 2016 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_LIB_SLICE_SLICE_TRAITS_H
-#define GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H
-
-#include <grpc/support/port_platform.h>
-
-#include <grpc/slice.h>
-#include <stdbool.h>
-
-bool grpc_slice_is_legal_header(const grpc_slice& s);
-bool grpc_slice_is_legal_nonbin_header(const grpc_slice& s);
-bool grpc_slice_is_bin_suffixed(const grpc_slice& s);
-
-#endif /* GRPC_CORE_LIB_SLICE_SLICE_TRAITS_H */
diff --git a/contrib/libs/grpc/src/core/lib/surface/call.cc b/contrib/libs/grpc/src/core/lib/surface/call.cc
index fe4c774c526..037e3585574 100644
--- a/contrib/libs/grpc/src/core/lib/surface/call.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/call.cc
@@ -126,7 +126,7 @@ struct parent_call {
};
struct child_call {
- child_call(grpc_call* parent) : parent(parent) {}
+ explicit child_call(grpc_call* parent) : parent(parent) {}
grpc_call* parent;
/** siblings: children of the same parent form a list, and this list is
protected under
@@ -286,7 +286,8 @@ grpc_core::TraceFlag grpc_compression_trace(false, "compression");
#define CALL_FROM_TOP_ELEM(top_elem) \
CALL_FROM_CALL_STACK(grpc_call_stack_from_top_element(top_elem))
-static void execute_batch(grpc_call* call, grpc_transport_stream_op_batch* op,
+static void execute_batch(grpc_call* call,
+ grpc_transport_stream_op_batch* batch,
grpc_closure* start_batch_closure);
static void cancel_with_status(grpc_call* c, grpc_status_code status,
@@ -300,8 +301,9 @@ static void post_batch_completion(batch_control* bctl);
static void add_init_error(grpc_error** composite, grpc_error* new_err) {
if (new_err == GRPC_ERROR_NONE) return;
- if (*composite == GRPC_ERROR_NONE)
+ if (*composite == GRPC_ERROR_NONE) {
*composite = GRPC_ERROR_CREATE_FROM_STATIC_STRING("Call creation failed");
+ }
*composite = grpc_error_add_child(*composite, new_err);
}
@@ -310,20 +312,24 @@ void* grpc_call_arena_alloc(grpc_call* call, size_t size) {
}
static parent_call* get_or_create_parent_call(grpc_call* call) {
- parent_call* p = (parent_call*)gpr_atm_acq_load(&call->parent_call_atm);
+ parent_call* p =
+ reinterpret_cast<parent_call*>(gpr_atm_acq_load(&call->parent_call_atm));
if (p == nullptr) {
p = call->arena->New<parent_call>();
- if (!gpr_atm_rel_cas(&call->parent_call_atm, (gpr_atm) nullptr,
- (gpr_atm)p)) {
+ if (!gpr_atm_rel_cas(&call->parent_call_atm,
+ reinterpret_cast<gpr_atm>(nullptr),
+ reinterpret_cast<gpr_atm>(p))) {
p->~parent_call();
- p = (parent_call*)gpr_atm_acq_load(&call->parent_call_atm);
+ p = reinterpret_cast<parent_call*>(
+ gpr_atm_acq_load(&call->parent_call_atm));
}
}
return p;
}
static parent_call* get_parent_call(grpc_call* call) {
- return (parent_call*)gpr_atm_acq_load(&call->parent_call_atm);
+ return reinterpret_cast<parent_call*>(
+ gpr_atm_acq_load(&call->parent_call_atm));
}
size_t grpc_call_get_initial_size_estimate() {
@@ -414,7 +420,7 @@ grpc_error* grpc_call_create(const grpc_call_create_args* args,
"without Census tracing propagation"));
}
if (args->propagation_mask & GRPC_PROPAGATE_CANCELLATION) {
- call->cancellation_is_inherited = 1;
+ call->cancellation_is_inherited = true;
if (gpr_atm_acq_load(&args->parent->received_final_op_atm)) {
immediately_cancel = true;
}
@@ -597,7 +603,7 @@ void grpc_call_unref(grpc_call* c) {
}
GPR_ASSERT(!c->destroy_called);
- c->destroy_called = 1;
+ c->destroy_called = true;
bool cancel = gpr_atm_acq_load(&c->any_ops_sent_atm) != 0 &&
gpr_atm_acq_load(&c->received_final_op_atm) == 0;
if (cancel) {
@@ -649,15 +655,16 @@ static void execute_batch(grpc_call* call,
}
char* grpc_call_get_peer(grpc_call* call) {
- char* peer_string = (char*)gpr_atm_acq_load(&call->peer_string);
+ char* peer_string =
+ reinterpret_cast<char*>(gpr_atm_acq_load(&call->peer_string));
if (peer_string != nullptr) return gpr_strdup(peer_string);
peer_string = grpc_channel_get_target(call->channel);
if (peer_string != nullptr) return peer_string;
return gpr_strdup("unknown");
}
-grpc_call* grpc_call_from_top_element(grpc_call_element* elem) {
- return CALL_FROM_TOP_ELEM(elem);
+grpc_call* grpc_call_from_top_element(grpc_call_element* surface_element) {
+ return CALL_FROM_TOP_ELEM(surface_element);
}
/*******************************************************************************
@@ -813,7 +820,7 @@ uint32_t grpc_call_test_only_get_message_flags(grpc_call* call) {
return flags;
}
-static void destroy_encodings_accepted_by_peer(void* /*p*/) { return; }
+static void destroy_encodings_accepted_by_peer(void* /*p*/) {}
static void set_encodings_accepted_by_peer(grpc_call* /*call*/,
grpc_mdelem mdel,
@@ -828,8 +835,8 @@ static void set_encodings_accepted_by_peer(grpc_call* /*call*/,
accepted_user_data =
grpc_mdelem_get_user_data(mdel, destroy_encodings_accepted_by_peer);
if (accepted_user_data != nullptr) {
- *encodings_accepted_by_peer =
- static_cast<uint32_t>(((uintptr_t)accepted_user_data) - 1);
+ *encodings_accepted_by_peer = static_cast<uint32_t>(
+ reinterpret_cast<uintptr_t>(accepted_user_data) - 1);
return;
}
@@ -869,7 +876,8 @@ static void set_encodings_accepted_by_peer(grpc_call* /*call*/,
grpc_mdelem_set_user_data(
mdel, destroy_encodings_accepted_by_peer,
- (void*)((static_cast<uintptr_t>(*encodings_accepted_by_peer)) + 1));
+ reinterpret_cast<void*>(
+ static_cast<uintptr_t>(*encodings_accepted_by_peer) + 1));
}
uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call* call) {
@@ -883,8 +891,8 @@ grpc_call_test_only_get_incoming_stream_encodings(grpc_call* call) {
return call->incoming_stream_compression_algorithm;
}
-static grpc_linked_mdelem* linked_from_md(const grpc_metadata* md) {
- return (grpc_linked_mdelem*)&md->internal_data;
+static grpc_linked_mdelem* linked_from_md(grpc_metadata* md) {
+ return reinterpret_cast<grpc_linked_mdelem*>(&md->internal_data);
}
static grpc_metadata* get_md_elem(grpc_metadata* metadata,
@@ -907,8 +915,7 @@ static int prepare_application_metadata(grpc_call* call, int count,
grpc_metadata_batch* batch =
&call->metadata_batch[0 /* is_receiving */][is_trailing];
for (i = 0; i < total_count; i++) {
- const grpc_metadata* md =
- get_md_elem(metadata, additional_metadata, i, count);
+ grpc_metadata* md = get_md_elem(metadata, additional_metadata, i, count);
grpc_linked_mdelem* l = linked_from_md(md);
GPR_ASSERT(sizeof(grpc_linked_mdelem) == sizeof(md->internal_data));
if (!GRPC_LOG_IF_ERROR("validate_metadata",
@@ -927,8 +934,7 @@ static int prepare_application_metadata(grpc_call* call, int count,
}
if (i != total_count) {
for (int j = 0; j < i; j++) {
- const grpc_metadata* md =
- get_md_elem(metadata, additional_metadata, j, count);
+ grpc_metadata* md = get_md_elem(metadata, additional_metadata, j, count);
grpc_linked_mdelem* l = linked_from_md(md);
GRPC_MDELEM_UNREF(l->md);
}
@@ -1230,9 +1236,10 @@ static void post_batch_completion(batch_control* bctl) {
if (bctl->completion_data.notify_tag.is_closure) {
/* unrefs error */
bctl->call = nullptr;
- grpc_core::Closure::Run(DEBUG_LOCATION,
- (grpc_closure*)bctl->completion_data.notify_tag.tag,
- error);
+ grpc_core::Closure::Run(
+ DEBUG_LOCATION,
+ static_cast<grpc_closure*>(bctl->completion_data.notify_tag.tag),
+ error);
GRPC_CALL_INTERNAL_UNREF(call, "completion");
} else {
/* unrefs error */
@@ -1255,7 +1262,7 @@ static void continue_receiving_slices(batch_control* bctl) {
size_t remaining = call->receiving_stream->length() -
(*call->receiving_buffer)->data.raw.slice_buffer.length;
if (remaining == 0) {
- call->receiving_message = 0;
+ call->receiving_message = false;
call->receiving_stream.reset();
finish_batch_step(bctl);
return;
@@ -1269,7 +1276,7 @@ static void continue_receiving_slices(batch_control* bctl) {
call->receiving_stream.reset();
grpc_byte_buffer_destroy(*call->receiving_buffer);
*call->receiving_buffer = nullptr;
- call->receiving_message = 0;
+ call->receiving_message = false;
finish_batch_step(bctl);
GRPC_ERROR_UNREF(error);
return;
@@ -1305,7 +1312,7 @@ static void receiving_slice_ready(void* bctlp, grpc_error* error) {
call->receiving_stream.reset();
grpc_byte_buffer_destroy(*call->receiving_buffer);
*call->receiving_buffer = nullptr;
- call->receiving_message = 0;
+ call->receiving_message = false;
finish_batch_step(bctl);
if (release_error) {
GRPC_ERROR_UNREF(error);
@@ -1317,7 +1324,7 @@ static void process_data_after_md(batch_control* bctl) {
grpc_call* call = bctl->call;
if (call->receiving_stream == nullptr) {
*call->receiving_buffer = nullptr;
- call->receiving_message = 0;
+ call->receiving_message = false;
finish_batch_step(bctl);
} else {
call->test_only_last_message_flags = call->receiving_stream->flags();
@@ -1356,7 +1363,8 @@ static void receiving_stream_ready(void* bctlp, grpc_error* error) {
* object with rel_cas, and will not use it after the cas. Its corresponding
* acq_load is in receiving_initial_metadata_ready() */
if (error != GRPC_ERROR_NONE || call->receiving_stream == nullptr ||
- !gpr_atm_rel_cas(&call->recv_state, RECV_NONE, (gpr_atm)bctlp)) {
+ !gpr_atm_rel_cas(&call->recv_state, RECV_NONE,
+ reinterpret_cast<gpr_atm>(bctlp))) {
process_data_after_md(bctl);
}
}
@@ -1570,7 +1578,8 @@ static grpc_call_error call_start_batch(grpc_call* call, const grpc_op* ops,
static_cast<grpc_cq_completion*>(
gpr_malloc(sizeof(grpc_cq_completion))));
} else {
- grpc_core::Closure::Run(DEBUG_LOCATION, (grpc_closure*)notify_tag,
+ grpc_core::Closure::Run(DEBUG_LOCATION,
+ static_cast<grpc_closure*>(notify_tag),
GRPC_ERROR_NONE);
}
error = GRPC_CALL_OK;
diff --git a/contrib/libs/grpc/src/core/lib/surface/call_details.cc b/contrib/libs/grpc/src/core/lib/surface/call_details.cc
index 55e9e3425f2..29c184c26b2 100644
--- a/contrib/libs/grpc/src/core/lib/surface/call_details.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/call_details.cc
@@ -27,15 +27,15 @@
#include "src/core/lib/slice/slice_internal.h"
#include "src/core/lib/surface/api_trace.h"
-void grpc_call_details_init(grpc_call_details* cd) {
- GRPC_API_TRACE("grpc_call_details_init(cd=%p)", 1, (cd));
- cd->method = grpc_empty_slice();
- cd->host = grpc_empty_slice();
+void grpc_call_details_init(grpc_call_details* details) {
+ GRPC_API_TRACE("grpc_call_details_init(details=%p)", 1, (details));
+ details->method = grpc_empty_slice();
+ details->host = grpc_empty_slice();
}
-void grpc_call_details_destroy(grpc_call_details* cd) {
- GRPC_API_TRACE("grpc_call_details_destroy(cd=%p)", 1, (cd));
+void grpc_call_details_destroy(grpc_call_details* details) {
+ GRPC_API_TRACE("grpc_call_details_destroy(details=%p)", 1, (details));
grpc_core::ExecCtx exec_ctx;
- grpc_slice_unref_internal(cd->method);
- grpc_slice_unref_internal(cd->host);
+ grpc_slice_unref_internal(details->method);
+ grpc_slice_unref_internal(details->host);
}
diff --git a/contrib/libs/grpc/src/core/lib/surface/channel.cc b/contrib/libs/grpc/src/core/lib/surface/channel.cc
index 28df8e61ee6..aed4459bb48 100644
--- a/contrib/libs/grpc/src/core/lib/surface/channel.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/channel.cc
@@ -58,7 +58,7 @@ static void destroy_channel(void* arg, grpc_error* error);
grpc_channel* grpc_channel_create_with_builder(
grpc_channel_stack_builder* builder,
- grpc_channel_stack_type channel_stack_type) {
+ grpc_channel_stack_type channel_stack_type, grpc_error** error) {
char* target = gpr_strdup(grpc_channel_stack_builder_get_target(builder));
grpc_channel_args* args = grpc_channel_args_copy(
grpc_channel_stack_builder_get_channel_arguments(builder));
@@ -70,16 +70,21 @@ grpc_channel* grpc_channel_create_with_builder(
} else {
GRPC_STATS_INC_CLIENT_CHANNELS_CREATED();
}
- grpc_error* error = grpc_channel_stack_builder_finish(
+ grpc_error* builder_error = grpc_channel_stack_builder_finish(
builder, sizeof(grpc_channel), 1, destroy_channel, nullptr,
reinterpret_cast<void**>(&channel));
- if (error != GRPC_ERROR_NONE) {
+ if (builder_error != GRPC_ERROR_NONE) {
gpr_log(GPR_ERROR, "channel stack builder failed: %s",
- grpc_error_string(error));
- GRPC_ERROR_UNREF(error);
+ grpc_error_string(builder_error));
+ GPR_ASSERT(channel == nullptr);
+ if (error != nullptr) {
+ *error = builder_error;
+ } else {
+ GRPC_ERROR_UNREF(builder_error);
+ }
gpr_free(target);
grpc_channel_args_destroy(args);
- return channel;
+ return nullptr;
}
channel->target = target;
channel->resource_user = resource_user;
@@ -219,7 +224,8 @@ grpc_channel* grpc_channel_create(const char* target,
const grpc_channel_args* input_args,
grpc_channel_stack_type channel_stack_type,
grpc_transport* optional_transport,
- grpc_resource_user* resource_user) {
+ grpc_resource_user* resource_user,
+ grpc_error** error) {
// We need to make sure that grpc_shutdown() does not shut things down
// until after the channel is destroyed. However, the channel may not
// actually be destroyed by the time grpc_channel_destroy() returns,
@@ -268,7 +274,7 @@ grpc_channel* grpc_channel_create(const char* target,
CreateChannelzNode(builder);
}
grpc_channel* channel =
- grpc_channel_create_with_builder(builder, channel_stack_type);
+ grpc_channel_create_with_builder(builder, channel_stack_type, error);
if (channel == nullptr) {
grpc_shutdown(); // Since we won't call destroy_channel().
}
@@ -372,14 +378,14 @@ static grpc_call* grpc_channel_create_call_internal(
grpc_call* grpc_channel_create_call(grpc_channel* channel,
grpc_call* parent_call,
uint32_t propagation_mask,
- grpc_completion_queue* cq,
+ grpc_completion_queue* completion_queue,
grpc_slice method, const grpc_slice* host,
gpr_timespec deadline, void* reserved) {
GPR_ASSERT(!reserved);
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
grpc_call* call = grpc_channel_create_call_internal(
- channel, parent_call, propagation_mask, cq, nullptr,
+ channel, parent_call, propagation_mask, completion_queue, nullptr,
grpc_mdelem_create(GRPC_MDSTR_PATH, method, nullptr),
host != nullptr ? grpc_mdelem_create(GRPC_MDSTR_AUTHORITY, *host, nullptr)
: GRPC_MDNULL,
diff --git a/contrib/libs/grpc/src/core/lib/surface/channel.h b/contrib/libs/grpc/src/core/lib/surface/channel.h
index e49b9261f71..d2e90ee4f72 100644
--- a/contrib/libs/grpc/src/core/lib/surface/channel.h
+++ b/contrib/libs/grpc/src/core/lib/surface/channel.h
@@ -34,7 +34,8 @@ grpc_channel* grpc_channel_create(const char* target,
const grpc_channel_args* args,
grpc_channel_stack_type channel_stack_type,
grpc_transport* optional_transport,
- grpc_resource_user* resource_user = nullptr);
+ grpc_resource_user* resource_user = nullptr,
+ grpc_error** error = nullptr);
/** The same as grpc_channel_destroy, but doesn't create an ExecCtx, and so
* is safe to use from within core. */
@@ -42,7 +43,7 @@ void grpc_channel_destroy_internal(grpc_channel* channel);
grpc_channel* grpc_channel_create_with_builder(
grpc_channel_stack_builder* builder,
- grpc_channel_stack_type channel_stack_type);
+ grpc_channel_stack_type channel_stack_type, grpc_error** error = nullptr);
/** Create a call given a grpc_channel, in order to call \a method.
Progress is tied to activity on \a pollset_set. The returned call object is
@@ -93,9 +94,9 @@ struct CallRegistrationTable {
// The map key should be owned strings rather than unowned char*'s to
// guarantee that it outlives calls on the core channel (which may outlast the
// C++ or other wrapped language Channel that registered these calls).
- std::map<std::pair<TString, TString>, RegisteredCall>
- map /* GUARDED_BY(mu) */;
- int method_registration_attempts /* GUARDED_BY(mu) */ = 0;
+ std::map<std::pair<TString, TString>, RegisteredCall> map
+ Y_ABSL_GUARDED_BY(mu);
+ int method_registration_attempts Y_ABSL_GUARDED_BY(mu) = 0;
};
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/surface/channel_init.cc b/contrib/libs/grpc/src/core/lib/surface/channel_init.cc
index 62eb1c3f9d6..17f6c901d1f 100644
--- a/contrib/libs/grpc/src/core/lib/surface/channel_init.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/channel_init.cc
@@ -87,7 +87,7 @@ void grpc_channel_init_shutdown(void) {
for (int i = 0; i < GRPC_NUM_CHANNEL_STACK_TYPES; i++) {
gpr_free(g_slots[i].slots);
g_slots[i].slots =
- static_cast<stage_slot*>((void*)static_cast<uintptr_t>(0xdeadbeef));
+ static_cast<stage_slot*>(reinterpret_cast<void*>(0xdeadbeef));
}
}
diff --git a/contrib/libs/grpc/src/core/lib/surface/completion_queue.cc b/contrib/libs/grpc/src/core/lib/surface/completion_queue.cc
index 0f50906734b..5c535dcdc1d 100644
--- a/contrib/libs/grpc/src/core/lib/surface/completion_queue.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/completion_queue.cc
@@ -126,8 +126,8 @@ grpc_error* non_polling_poller_work(grpc_pollset* pollset,
gpr_timespec deadline_ts =
grpc_millis_to_timespec(deadline, GPR_CLOCK_MONOTONIC);
while (!npp->shutdown && !w.kicked &&
- !gpr_cv_wait(&w.cv, &npp->mu, deadline_ts))
- ;
+ !gpr_cv_wait(&w.cv, &npp->mu, deadline_ts)) {
+ }
grpc_core::ExecCtx::Get()->InvalidateNow();
if (&w == npp->root) {
npp->root = w.next;
@@ -148,8 +148,9 @@ grpc_error* non_polling_poller_work(grpc_pollset* pollset,
grpc_error* non_polling_poller_kick(grpc_pollset* pollset,
grpc_pollset_worker* specific_worker) {
non_polling_poller* p = reinterpret_cast<non_polling_poller*>(pollset);
- if (specific_worker == nullptr)
+ if (specific_worker == nullptr) {
specific_worker = reinterpret_cast<grpc_pollset_worker*>(p->root);
+ }
if (specific_worker != nullptr) {
non_polling_worker* w =
reinterpret_cast<non_polling_worker*>(specific_worker);
@@ -309,7 +310,7 @@ struct cq_pluck_data {
};
struct cq_callback_data {
- cq_callback_data(
+ explicit cq_callback_data(
grpc_experimental_completion_queue_functor* shutdown_callback)
: shutdown_callback(shutdown_callback) {}
@@ -422,9 +423,9 @@ static const cq_vtable g_cq_vtable[] = {
cq_end_op_for_callback, nullptr, nullptr},
};
-#define DATA_FROM_CQ(cq) ((void*)(cq + 1))
+#define DATA_FROM_CQ(cq) ((void*)((cq) + 1))
#define POLLSET_FROM_CQ(cq) \
- ((grpc_pollset*)(cq->vtable->data_size + (char*)DATA_FROM_CQ(cq)))
+ ((grpc_pollset*)((cq)->vtable->data_size + (char*)DATA_FROM_CQ(cq)))
grpc_core::TraceFlag grpc_cq_pluck_trace(false, "queue_pluck");
@@ -438,7 +439,7 @@ grpc_core::TraceFlag grpc_cq_pluck_trace(false, "queue_pluck");
} \
} while (0)
-static void on_pollset_shutdown_done(void* cq, grpc_error* error);
+static void on_pollset_shutdown_done(void* arg, grpc_error* error);
void grpc_cq_global_init() {
gpr_tls_init(&g_cached_event);
@@ -446,7 +447,8 @@ void grpc_cq_global_init() {
}
void grpc_completion_queue_thread_local_cache_init(grpc_completion_queue* cq) {
- if ((grpc_completion_queue*)gpr_tls_get(&g_cached_cq) == nullptr) {
+ if (reinterpret_cast<grpc_completion_queue*>(gpr_tls_get(&g_cached_cq)) ==
+ nullptr) {
gpr_tls_set(&g_cached_event, (intptr_t)0);
gpr_tls_set(&g_cached_cq, (intptr_t)cq);
}
@@ -455,10 +457,10 @@ void grpc_completion_queue_thread_local_cache_init(grpc_completion_queue* cq) {
int grpc_completion_queue_thread_local_cache_flush(grpc_completion_queue* cq,
void** tag, int* ok) {
grpc_cq_completion* storage =
- (grpc_cq_completion*)gpr_tls_get(&g_cached_event);
+ reinterpret_cast<grpc_cq_completion*>(gpr_tls_get(&g_cached_event));
int ret = 0;
- if (storage != nullptr &&
- (grpc_completion_queue*)gpr_tls_get(&g_cached_cq) == cq) {
+ if (storage != nullptr && reinterpret_cast<grpc_completion_queue*>(
+ gpr_tls_get(&g_cached_cq)) == cq) {
*tag = storage->tag;
grpc_core::ExecCtx exec_ctx;
*ok = (storage->next & static_cast<uintptr_t>(1)) == 1;
@@ -703,7 +705,7 @@ static void cq_end_op_for_next(
6, (cq, tag, errmsg, done, done_arg, storage));
if (GRPC_TRACE_FLAG_ENABLED(grpc_trace_operation_failures) &&
error != GRPC_ERROR_NONE) {
- gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg);
+ gpr_log(GPR_INFO, "Operation failed: tag=%p, error=%s", tag, errmsg);
}
}
cq_next_data* cqd = static_cast<cq_next_data*> DATA_FROM_CQ(cq);
@@ -716,8 +718,10 @@ static void cq_end_op_for_next(
cq_check_tag(cq, tag, true); /* Used in debug builds only */
- if ((grpc_completion_queue*)gpr_tls_get(&g_cached_cq) == cq &&
- (grpc_cq_completion*)gpr_tls_get(&g_cached_event) == nullptr) {
+ if (reinterpret_cast<grpc_completion_queue*>(gpr_tls_get(&g_cached_cq)) ==
+ cq &&
+ reinterpret_cast<grpc_cq_completion*>(gpr_tls_get(&g_cached_event)) ==
+ nullptr) {
gpr_tls_set(&g_cached_event, (intptr_t)storage);
} else {
/* Add the completion to the queue */
@@ -792,8 +796,8 @@ static void cq_end_op_for_pluck(
storage->tag = tag;
storage->done = done;
storage->done_arg = done_arg;
- storage->next =
- ((uintptr_t)&cqd->completed_head) | (static_cast<uintptr_t>(is_success));
+ storage->next = reinterpret_cast<uintptr_t>(&cqd->completed_head) |
+ static_cast<uintptr_t>(is_success);
gpr_mu_lock(cq->mu);
cq_check_tag(cq, tag, false); /* Used in debug builds only */
@@ -801,7 +805,7 @@ static void cq_end_op_for_pluck(
/* Add to the list of completions */
cqd->things_queued_ever.FetchAdd(1, grpc_core::MemoryOrder::RELAXED);
cqd->completed_tail->next =
- ((uintptr_t)storage) | (1u & cqd->completed_tail->next);
+ reinterpret_cast<uintptr_t>(storage) | (1u & cqd->completed_tail->next);
cqd->completed_tail = storage;
if (cqd->pending_events.FetchSub(1, grpc_core::MemoryOrder::ACQ_REL) == 1) {
@@ -909,7 +913,8 @@ struct cq_is_finished_arg {
};
class ExecCtxNext : public grpc_core::ExecCtx {
public:
- ExecCtxNext(void* arg) : ExecCtx(0), check_ready_to_finish_arg_(arg) {}
+ explicit ExecCtxNext(void* arg)
+ : ExecCtx(0), check_ready_to_finish_arg_(arg) {}
bool CheckReadyToFinish() override {
cq_is_finished_arg* a =
@@ -1157,7 +1162,8 @@ static void del_plucker(grpc_completion_queue* cq, void* tag,
class ExecCtxPluck : public grpc_core::ExecCtx {
public:
- ExecCtxPluck(void* arg) : ExecCtx(0), check_ready_to_finish_arg_(arg) {}
+ explicit ExecCtxPluck(void* arg)
+ : ExecCtx(0), check_ready_to_finish_arg_(arg) {}
bool CheckReadyToFinish() override {
cq_is_finished_arg* a =
@@ -1175,8 +1181,8 @@ class ExecCtxPluck : public grpc_core::ExecCtx {
cqd->things_queued_ever.Load(grpc_core::MemoryOrder::RELAXED);
grpc_cq_completion* c;
grpc_cq_completion* prev = &cqd->completed_head;
- while ((c = (grpc_cq_completion*)(prev->next &
- ~static_cast<uintptr_t>(1))) !=
+ while ((c = reinterpret_cast<grpc_cq_completion*>(
+ prev->next & ~static_cast<uintptr_t>(1))) !=
&cqd->completed_head) {
if (c->tag == a->tag) {
prev->next = (prev->next & static_cast<uintptr_t>(1)) |
@@ -1247,9 +1253,9 @@ static grpc_event cq_pluck(grpc_completion_queue* cq, void* tag,
break;
}
prev = &cqd->completed_head;
- while (
- (c = (grpc_cq_completion*)(prev->next & ~static_cast<uintptr_t>(1))) !=
- &cqd->completed_head) {
+ while ((c = reinterpret_cast<grpc_cq_completion*>(
+ prev->next & ~static_cast<uintptr_t>(1))) !=
+ &cqd->completed_head) {
if (c->tag == tag) {
prev->next = (prev->next & static_cast<uintptr_t>(1)) |
(c->next & ~static_cast<uintptr_t>(1));
@@ -1329,7 +1335,7 @@ static void cq_finish_shutdown_pluck(grpc_completion_queue* cq) {
GPR_ASSERT(cqd->shutdown_called);
GPR_ASSERT(!cqd->shutdown.Load(grpc_core::MemoryOrder::RELAXED));
- cqd->shutdown.Store(1, grpc_core::MemoryOrder::RELAXED);
+ cqd->shutdown.Store(true, grpc_core::MemoryOrder::RELAXED);
cq->poller_vtable->shutdown(POLLSET_FROM_CQ(cq), &cq->pollset_shutdown_done);
}
diff --git a/contrib/libs/grpc/src/core/lib/surface/completion_queue.h b/contrib/libs/grpc/src/core/lib/surface/completion_queue.h
index 4a114be8285..59116d43281 100644
--- a/contrib/libs/grpc/src/core/lib/surface/completion_queue.h
+++ b/contrib/libs/grpc/src/core/lib/surface/completion_queue.h
@@ -51,19 +51,19 @@ typedef struct grpc_cq_completion {
} grpc_cq_completion;
#ifndef NDEBUG
-void grpc_cq_internal_ref(grpc_completion_queue* cc, const char* reason,
+void grpc_cq_internal_ref(grpc_completion_queue* cq, const char* reason,
const char* file, int line);
-void grpc_cq_internal_unref(grpc_completion_queue* cc, const char* reason,
+void grpc_cq_internal_unref(grpc_completion_queue* cq, const char* reason,
const char* file, int line);
-#define GRPC_CQ_INTERNAL_REF(cc, reason) \
- grpc_cq_internal_ref(cc, reason, __FILE__, __LINE__)
-#define GRPC_CQ_INTERNAL_UNREF(cc, reason) \
- grpc_cq_internal_unref(cc, reason, __FILE__, __LINE__)
+#define GRPC_CQ_INTERNAL_REF(cq, reason) \
+ grpc_cq_internal_ref(cq, reason, __FILE__, __LINE__)
+#define GRPC_CQ_INTERNAL_UNREF(cq, reason) \
+ grpc_cq_internal_unref(cq, reason, __FILE__, __LINE__)
#else
-void grpc_cq_internal_ref(grpc_completion_queue* cc);
-void grpc_cq_internal_unref(grpc_completion_queue* cc);
-#define GRPC_CQ_INTERNAL_REF(cc, reason) grpc_cq_internal_ref(cc)
-#define GRPC_CQ_INTERNAL_UNREF(cc, reason) grpc_cq_internal_unref(cc)
+void grpc_cq_internal_ref(grpc_completion_queue* cq);
+void grpc_cq_internal_unref(grpc_completion_queue* cq);
+#define GRPC_CQ_INTERNAL_REF(cq, reason) grpc_cq_internal_ref(cq)
+#define GRPC_CQ_INTERNAL_UNREF(cq, reason) grpc_cq_internal_unref(cq)
#endif
/* Initializes global variables used by completion queues */
@@ -73,22 +73,22 @@ void grpc_cq_global_init();
shutdown until a corrensponding grpc_cq_end_* call is made.
\a tag is currently used only in debug builds. Return true on success, and
false if completion_queue has been shutdown. */
-bool grpc_cq_begin_op(grpc_completion_queue* cc, void* tag);
+bool grpc_cq_begin_op(grpc_completion_queue* cq, void* tag);
/* Queue a GRPC_OP_COMPLETED operation; tag must correspond to the tag passed to
grpc_cq_begin_op */
-void grpc_cq_end_op(grpc_completion_queue* cc, void* tag, grpc_error* error,
+void grpc_cq_end_op(grpc_completion_queue* cq, void* tag, grpc_error* error,
void (*done)(void* done_arg, grpc_cq_completion* storage),
void* done_arg, grpc_cq_completion* storage,
bool internal = false);
-grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cc);
+grpc_pollset* grpc_cq_pollset(grpc_completion_queue* cq);
-bool grpc_cq_can_listen(grpc_completion_queue* cc);
+bool grpc_cq_can_listen(grpc_completion_queue* cq);
-grpc_cq_completion_type grpc_get_cq_completion_type(grpc_completion_queue* cc);
+grpc_cq_completion_type grpc_get_cq_completion_type(grpc_completion_queue* cq);
-int grpc_get_cq_poll_num(grpc_completion_queue* cc);
+int grpc_get_cq_poll_num(grpc_completion_queue* cq);
grpc_completion_queue* grpc_completion_queue_create_internal(
grpc_cq_completion_type completion_type, grpc_cq_polling_type polling_type,
diff --git a/contrib/libs/grpc/src/core/lib/surface/init.cc b/contrib/libs/grpc/src/core/lib/surface/init.cc
index 7b79ba426bc..bbeed111e56 100644
--- a/contrib/libs/grpc/src/core/lib/surface/init.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/init.cc
@@ -63,16 +63,15 @@ extern void grpc_register_built_in_plugins(void);
#define MAX_PLUGINS 128
static gpr_once g_basic_init = GPR_ONCE_INIT;
-static gpr_mu g_init_mu;
+static grpc_core::Mutex* g_init_mu;
static int g_initializations;
-static gpr_cv* g_shutting_down_cv;
+static grpc_core::CondVar* g_shutting_down_cv;
static bool g_shutting_down;
static void do_basic_init(void) {
gpr_log_verbosity_init();
- gpr_mu_init(&g_init_mu);
- g_shutting_down_cv = static_cast<gpr_cv*>(malloc(sizeof(gpr_cv)));
- gpr_cv_init(g_shutting_down_cv);
+ g_init_mu = new grpc_core::Mutex();
+ g_shutting_down_cv = new grpc_core::CondVar();
g_shutting_down = false;
grpc_register_built_in_plugins();
grpc_cq_global_init();
@@ -101,11 +100,12 @@ static void register_builtin_channel_init() {
grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL,
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
grpc_add_connected_filter, nullptr);
- grpc_channel_init_register_stage(GRPC_CLIENT_LAME_CHANNEL,
- GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
- append_filter, (void*)&grpc_lame_filter);
- grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, prepend_filter,
- (void*)&grpc_core::Server::kServerTopFilter);
+ grpc_channel_init_register_stage(
+ GRPC_CLIENT_LAME_CHANNEL, GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
+ append_filter, const_cast<grpc_channel_filter*>(&grpc_lame_filter));
+ grpc_channel_init_register_stage(
+ GRPC_SERVER_CHANNEL, INT_MAX, prepend_filter,
+ const_cast<grpc_channel_filter*>(&grpc_core::Server::kServerTopFilter));
}
typedef struct grpc_plugin {
@@ -129,11 +129,11 @@ void grpc_init(void) {
int i;
gpr_once_init(&g_basic_init, do_basic_init);
- grpc_core::MutexLock lock(&g_init_mu);
+ grpc_core::MutexLock lock(g_init_mu);
if (++g_initializations == 1) {
if (g_shutting_down) {
g_shutting_down = false;
- gpr_cv_broadcast(g_shutting_down_cv);
+ g_shutting_down_cv->SignalAll();
}
grpc_core::Fork::GlobalInit();
grpc_fork_handlers_auto_register();
@@ -195,14 +195,14 @@ void grpc_shutdown_internal_locked(void) {
grpc_core::ExecCtx::GlobalShutdown();
grpc_core::ApplicationCallbackExecCtx::GlobalShutdown();
g_shutting_down = false;
- gpr_cv_broadcast(g_shutting_down_cv);
+ g_shutting_down_cv->SignalAll();
// Absolute last action will be to delete static metadata context.
grpc_destroy_static_metadata_ctx();
}
void grpc_shutdown_internal(void* /*ignored*/) {
GRPC_API_TRACE("grpc_shutdown_internal", 0, ());
- grpc_core::MutexLock lock(&g_init_mu);
+ grpc_core::MutexLock lock(g_init_mu);
// We have released lock from the shutdown thread and it is possible that
// another grpc_init has been called, and do nothing if that is the case.
if (--g_initializations != 0) {
@@ -213,7 +213,7 @@ void grpc_shutdown_internal(void* /*ignored*/) {
void grpc_shutdown(void) {
GRPC_API_TRACE("grpc_shutdown(void)", 0, ());
- grpc_core::MutexLock lock(&g_init_mu);
+ grpc_core::MutexLock lock(g_init_mu);
if (--g_initializations == 0) {
grpc_core::ApplicationCallbackExecCtx* acec =
@@ -242,7 +242,7 @@ void grpc_shutdown(void) {
void grpc_shutdown_blocking(void) {
GRPC_API_TRACE("grpc_shutdown_blocking(void)", 0, ());
- grpc_core::MutexLock lock(&g_init_mu);
+ grpc_core::MutexLock lock(g_init_mu);
if (--g_initializations == 0) {
g_shutting_down = true;
grpc_shutdown_internal_locked();
@@ -252,16 +252,15 @@ void grpc_shutdown_blocking(void) {
int grpc_is_initialized(void) {
int r;
gpr_once_init(&g_basic_init, do_basic_init);
- grpc_core::MutexLock lock(&g_init_mu);
+ grpc_core::MutexLock lock(g_init_mu);
r = g_initializations > 0;
return r;
}
void grpc_maybe_wait_for_async_shutdown(void) {
gpr_once_init(&g_basic_init, do_basic_init);
- grpc_core::MutexLock lock(&g_init_mu);
+ grpc_core::MutexLock lock(g_init_mu);
while (g_shutting_down) {
- gpr_cv_wait(g_shutting_down_cv, &g_init_mu,
- gpr_inf_future(GPR_CLOCK_REALTIME));
+ g_shutting_down_cv->Wait(g_init_mu);
}
}
diff --git a/contrib/libs/grpc/src/core/lib/surface/init_unsecure.cc b/contrib/libs/grpc/src/core/lib/surface/init_unsecure.cc
index 2b3bc643820..7b86d50dcf7 100644
--- a/contrib/libs/grpc/src/core/lib/surface/init_unsecure.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/init_unsecure.cc
@@ -18,10 +18,16 @@
#include <grpc/support/port_platform.h>
+#include <grpc/support/log.h>
+
#include "src/core/lib/surface/init.h"
void grpc_security_pre_init(void) {}
void grpc_register_security_filters(void) {}
-void grpc_security_init(void) {}
+void grpc_security_init(void) {
+ gpr_log(GPR_DEBUG,
+ "Using insecure gRPC build. Security handshakers will not be invoked "
+ "even if secure credentials are used.");
+}
diff --git a/contrib/libs/grpc/src/core/lib/surface/lame_client.cc b/contrib/libs/grpc/src/core/lib/surface/lame_client.cc
index a9f5c9c7791..f92c1920df3 100644
--- a/contrib/libs/grpc/src/core/lib/surface/lame_client.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/lame_client.cc
@@ -35,63 +35,37 @@
#include "src/core/lib/transport/connectivity_state.h"
#include "src/core/lib/transport/static_metadata.h"
+#define GRPC_ARG_LAME_FILTER_ERROR "grpc.lame_filter_error"
+
namespace grpc_core {
namespace {
-struct CallData {
- CallCombiner* call_combiner;
- grpc_linked_mdelem status;
- grpc_linked_mdelem details;
- Atomic<bool> filled_metadata;
-};
-
struct ChannelData {
- ChannelData() : state_tracker("lame_channel", GRPC_CHANNEL_SHUTDOWN) {}
+ explicit ChannelData(grpc_channel_element_args* args)
+ : state_tracker("lame_channel", GRPC_CHANNEL_SHUTDOWN) {
+ grpc_error* err = grpc_channel_args_find_pointer<grpc_error>(
+ args->channel_args, GRPC_ARG_LAME_FILTER_ERROR);
+ if (err != nullptr) error = GRPC_ERROR_REF(err);
+ }
- grpc_status_code error_code;
- const char* error_message;
+ ~ChannelData() { GRPC_ERROR_UNREF(error); }
+
+ grpc_error* error = GRPC_ERROR_NONE;
Mutex mu;
ConnectivityStateTracker state_tracker;
};
-static void fill_metadata(grpc_call_element* elem, grpc_metadata_batch* mdb) {
- CallData* calld = static_cast<CallData*>(elem->call_data);
- bool expected = false;
- if (!calld->filled_metadata.CompareExchangeStrong(
- &expected, true, MemoryOrder::RELAXED, MemoryOrder::RELAXED)) {
- return;
- }
- ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
- char tmp[GPR_LTOA_MIN_BUFSIZE];
- gpr_ltoa(chand->error_code, tmp);
- calld->status.md = grpc_mdelem_from_slices(
- GRPC_MDSTR_GRPC_STATUS, grpc_core::UnmanagedMemorySlice(tmp));
- calld->details.md = grpc_mdelem_from_slices(
- GRPC_MDSTR_GRPC_MESSAGE,
- grpc_core::UnmanagedMemorySlice(chand->error_message));
- calld->status.prev = calld->details.next = nullptr;
- calld->status.next = &calld->details;
- calld->details.prev = &calld->status;
- mdb->list.head = &calld->status;
- mdb->list.tail = &calld->details;
- mdb->list.count = 2;
- mdb->deadline = GRPC_MILLIS_INF_FUTURE;
-}
+struct CallData {
+ CallCombiner* call_combiner;
+};
static void lame_start_transport_stream_op_batch(
grpc_call_element* elem, grpc_transport_stream_op_batch* op) {
CallData* calld = static_cast<CallData*>(elem->call_data);
- if (op->recv_initial_metadata) {
- fill_metadata(elem,
- op->payload->recv_initial_metadata.recv_initial_metadata);
- } else if (op->recv_trailing_metadata) {
- fill_metadata(elem,
- op->payload->recv_trailing_metadata.recv_trailing_metadata);
- }
+ ChannelData* chand = static_cast<ChannelData*>(elem->channel_data);
grpc_transport_stream_op_batch_finish_with_failure(
- op, GRPC_ERROR_CREATE_FROM_STATIC_STRING("lame client channel"),
- calld->call_combiner);
+ op, GRPC_ERROR_REF(chand->error), calld->call_combiner);
}
static void lame_get_channel_info(grpc_channel_element* /*elem*/,
@@ -139,9 +113,7 @@ static void lame_destroy_call_elem(grpc_call_element* /*elem*/,
static grpc_error* lame_init_channel_elem(grpc_channel_element* elem,
grpc_channel_element_args* args) {
- GPR_ASSERT(args->is_first);
- GPR_ASSERT(args->is_last);
- new (elem->channel_data) ChannelData;
+ new (elem->channel_data) ChannelData(args);
return GRPC_ERROR_NONE;
}
@@ -150,8 +122,27 @@ static void lame_destroy_channel_elem(grpc_channel_element* elem) {
chand->~ChannelData();
}
+// Channel arg vtable for a grpc_error*.
+void* ErrorCopy(void* p) {
+ grpc_error* error = static_cast<grpc_error*>(p);
+ return GRPC_ERROR_REF(error);
+}
+void ErrorDestroy(void* p) {
+ grpc_error* error = static_cast<grpc_error*>(p);
+ GRPC_ERROR_UNREF(error);
+}
+int ErrorCompare(void* p, void* q) { return GPR_ICMP(p, q); }
+const grpc_arg_pointer_vtable kLameFilterErrorArgVtable = {
+ ErrorCopy, ErrorDestroy, ErrorCompare};
+
} // namespace
+grpc_arg MakeLameClientErrorArg(grpc_error* error) {
+ return grpc_channel_arg_pointer_create(
+ const_cast<char*>(GRPC_ARG_LAME_FILTER_ERROR), error,
+ &kLameFilterErrorArgVtable);
+}
+
} // namespace grpc_core
const grpc_channel_filter grpc_lame_filter = {
@@ -174,18 +165,20 @@ grpc_channel* grpc_lame_client_channel_create(const char* target,
grpc_status_code error_code,
const char* error_message) {
grpc_core::ExecCtx exec_ctx;
- grpc_channel_element* elem;
- grpc_channel* channel =
- grpc_channel_create(target, nullptr, GRPC_CLIENT_LAME_CHANNEL, nullptr);
- elem = grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0);
GRPC_API_TRACE(
"grpc_lame_client_channel_create(target=%s, error_code=%d, "
"error_message=%s)",
3, (target, (int)error_code, error_message));
- GPR_ASSERT(elem->filter == &grpc_lame_filter);
- auto chand = static_cast<grpc_core::ChannelData*>(elem->channel_data);
- chand->error_code = error_code;
- chand->error_message = error_message;
-
+ grpc_error* error = grpc_error_set_str(
+ grpc_error_set_int(
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("lame client channel"),
+ GRPC_ERROR_INT_GRPC_STATUS, error_code),
+ GRPC_ERROR_STR_GRPC_MESSAGE,
+ grpc_slice_from_static_string(error_message));
+ grpc_arg error_arg = grpc_core::MakeLameClientErrorArg(error);
+ grpc_channel_args args = {1, &error_arg};
+ grpc_channel* channel =
+ grpc_channel_create(target, &args, GRPC_CLIENT_LAME_CHANNEL, nullptr);
+ GRPC_ERROR_UNREF(error);
return channel;
}
diff --git a/contrib/libs/grpc/src/core/lib/surface/lame_client.h b/contrib/libs/grpc/src/core/lib/surface/lame_client.h
index aefa67c24a6..94c7e553ad8 100644
--- a/contrib/libs/grpc/src/core/lib/surface/lame_client.h
+++ b/contrib/libs/grpc/src/core/lib/surface/lame_client.h
@@ -23,6 +23,11 @@
#include "src/core/lib/channel/channel_stack.h"
+namespace grpc_core {
+// Does NOT take ownership of error.
+grpc_arg MakeLameClientErrorArg(grpc_error* error);
+} // namespace grpc_core
+
extern const grpc_channel_filter grpc_lame_filter;
#endif /* GRPC_CORE_LIB_SURFACE_LAME_CLIENT_H */
diff --git a/contrib/libs/grpc/src/core/lib/surface/server.cc b/contrib/libs/grpc/src/core/lib/surface/server.cc
index 0775c6ee4c4..fc094be47f9 100644
--- a/contrib/libs/grpc/src/core/lib/surface/server.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/server.cc
@@ -30,6 +30,7 @@
#include <utility>
#include <vector>
+#include "y_absl/memory/memory.h"
#include "y_absl/types/optional.h"
#include <grpc/support/alloc.h>
@@ -317,7 +318,8 @@ class Server::RealRequestMatcher : public RequestMatcherInterface {
// advance or queue up any incoming RPC for later match. Instead, MatchOrQueue
// will call out to an allocation function passed in at the construction of the
// object. These request matchers are designed for the C++ callback API, so they
-// only support 1 completion queue (passed in at the constructor).
+// only support 1 completion queue (passed in at the constructor). They are also
+// used for the sync API.
class Server::AllocatingRequestMatcherBase : public RequestMatcherInterface {
public:
AllocatingRequestMatcherBase(Server* server, grpc_completion_queue* cq)
@@ -369,15 +371,20 @@ class Server::AllocatingRequestMatcherBatch
void MatchOrQueue(size_t /*start_request_queue_index*/,
CallData* calld) override {
- BatchCallAllocation call_info = allocator_();
- GPR_ASSERT(server()->ValidateServerRequest(
- cq(), static_cast<void*>(call_info.tag), nullptr, nullptr) ==
- GRPC_CALL_OK);
- RequestedCall* rc = new RequestedCall(
- static_cast<void*>(call_info.tag), cq(), call_info.call,
- call_info.initial_metadata, call_info.details);
- calld->SetState(CallData::CallState::ACTIVATED);
- calld->Publish(cq_idx(), rc);
+ if (server()->ShutdownRefOnRequest()) {
+ BatchCallAllocation call_info = allocator_();
+ GPR_ASSERT(server()->ValidateServerRequest(
+ cq(), static_cast<void*>(call_info.tag), nullptr,
+ nullptr) == GRPC_CALL_OK);
+ RequestedCall* rc = new RequestedCall(
+ static_cast<void*>(call_info.tag), call_info.cq, call_info.call,
+ call_info.initial_metadata, call_info.details);
+ calld->SetState(CallData::CallState::ACTIVATED);
+ calld->Publish(cq_idx(), rc);
+ } else {
+ calld->FailCallCreation();
+ }
+ server()->ShutdownUnrefOnRequest();
}
private:
@@ -397,17 +404,21 @@ class Server::AllocatingRequestMatcherRegistered
void MatchOrQueue(size_t /*start_request_queue_index*/,
CallData* calld) override {
- RegisteredCallAllocation call_info = allocator_();
- GPR_ASSERT(
- server()->ValidateServerRequest(cq(), static_cast<void*>(call_info.tag),
- call_info.optional_payload,
- registered_method_) == GRPC_CALL_OK);
- RequestedCall* rc = new RequestedCall(
- static_cast<void*>(call_info.tag), cq(), call_info.call,
- call_info.initial_metadata, registered_method_, call_info.deadline,
- call_info.optional_payload);
- calld->SetState(CallData::CallState::ACTIVATED);
- calld->Publish(cq_idx(), rc);
+ if (server()->ShutdownRefOnRequest()) {
+ RegisteredCallAllocation call_info = allocator_();
+ GPR_ASSERT(server()->ValidateServerRequest(
+ cq(), call_info.tag, call_info.optional_payload,
+ registered_method_) == GRPC_CALL_OK);
+ RequestedCall* rc =
+ new RequestedCall(call_info.tag, call_info.cq, call_info.call,
+ call_info.initial_metadata, registered_method_,
+ call_info.deadline, call_info.optional_payload);
+ calld->SetState(CallData::CallState::ACTIVATED);
+ calld->Publish(cq_idx(), rc);
+ } else {
+ calld->FailCallCreation();
+ }
+ server()->ShutdownUnrefOnRequest();
}
private:
@@ -512,7 +523,7 @@ grpc_resource_user* CreateDefaultResourceUser(const grpc_channel_args* args) {
}
RefCountedPtr<channelz::ServerNode> CreateChannelzNode(
- Server* server, const grpc_channel_args* args) {
+ const grpc_channel_args* args) {
RefCountedPtr<channelz::ServerNode> channelz_node;
if (grpc_channel_args_find_bool(args, GRPC_ARG_ENABLE_CHANNELZ,
GRPC_ENABLE_CHANNELZ_DEFAULT)) {
@@ -533,10 +544,18 @@ RefCountedPtr<channelz::ServerNode> CreateChannelzNode(
Server::Server(const grpc_channel_args* args)
: channel_args_(grpc_channel_args_copy(args)),
default_resource_user_(CreateDefaultResourceUser(args)),
- channelz_node_(CreateChannelzNode(this, args)) {}
+ channelz_node_(CreateChannelzNode(args)) {}
Server::~Server() {
grpc_channel_args_destroy(channel_args_);
+ // Remove the cq pollsets from the config_fetcher.
+ if (started_ && config_fetcher_ != nullptr &&
+ config_fetcher_->interested_parties() != nullptr) {
+ for (grpc_pollset* pollset : pollsets_) {
+ grpc_pollset_set_del_pollset(config_fetcher_->interested_parties(),
+ pollset);
+ }
+ }
for (size_t i = 0; i < cqs_.size(); i++) {
GRPC_CQ_INTERNAL_UNREF(cqs_[i], "server");
}
@@ -570,6 +589,16 @@ void Server::Start() {
MutexLock lock(&mu_global_);
starting_ = true;
}
+ // Register the interested parties from the config fetcher to the cq pollsets
+ // before starting listeners so that config fetcher is being polled when the
+ // listeners start watch the fetcher.
+ if (config_fetcher_ != nullptr &&
+ config_fetcher_->interested_parties() != nullptr) {
+ for (grpc_pollset* pollset : pollsets_) {
+ grpc_pollset_set_add_pollset(config_fetcher_->interested_parties(),
+ pollset);
+ }
+ }
for (auto& listener : listeners_) {
listener.listener->Start(this, &pollsets_);
}
@@ -578,14 +607,18 @@ void Server::Start() {
starting_cv_.Signal();
}
-void Server::SetupTransport(
+grpc_error* Server::SetupTransport(
grpc_transport* transport, grpc_pollset* accepting_pollset,
const grpc_channel_args* args,
const RefCountedPtr<grpc_core::channelz::SocketNode>& socket_node,
grpc_resource_user* resource_user) {
// Create channel.
+ grpc_error* error = GRPC_ERROR_NONE;
grpc_channel* channel = grpc_channel_create(
- nullptr, args, GRPC_SERVER_CHANNEL, transport, resource_user);
+ nullptr, args, GRPC_SERVER_CHANNEL, transport, resource_user, &error);
+ if (channel == nullptr) {
+ return error;
+ }
ChannelData* chand = static_cast<ChannelData*>(
grpc_channel_stack_element(grpc_channel_get_channel_stack(channel), 0)
->channel_data);
@@ -606,6 +639,7 @@ void Server::SetupTransport(
}
// Initialize chand.
chand->InitTransport(Ref(), channel, cq_idx, transport, channelz_socket_uuid);
+ return GRPC_ERROR_NONE;
}
bool Server::HasOpenConnections() {
@@ -687,7 +721,7 @@ void Server::FailCall(size_t cq_idx, RequestedCall* rc, grpc_error* error) {
// Before calling MaybeFinishShutdown(), we must hold mu_global_ and not
// hold mu_call_.
void Server::MaybeFinishShutdown() {
- if (!shutdown_flag_.load(std::memory_order_acquire) || shutdown_published_) {
+ if (!ShutdownReady() || shutdown_published_) {
return;
}
{
@@ -772,7 +806,7 @@ void Server::ShutdownAndNotify(grpc_completion_queue* cq, void* tag) {
{
// Wait for startup to be finished. Locks mu_global.
MutexLock lock(&mu_global_);
- starting_cv_.WaitUntil(&mu_global_, [this] { return !starting_; });
+ WaitUntil(&starting_cv_, &mu_global_, [this] { return !starting_; });
// Stay locked, and gather up some stuff to do.
GPR_ASSERT(grpc_cq_begin_op(cq, tag));
if (shutdown_published_) {
@@ -781,19 +815,18 @@ void Server::ShutdownAndNotify(grpc_completion_queue* cq, void* tag) {
return;
}
shutdown_tags_.emplace_back(tag, cq);
- if (shutdown_flag_.load(std::memory_order_acquire)) {
+ if (ShutdownCalled()) {
return;
}
last_shutdown_message_time_ = gpr_now(GPR_CLOCK_REALTIME);
broadcaster.FillChannelsLocked(GetChannelsLocked());
- shutdown_flag_.store(true, std::memory_order_release);
// Collect all unregistered then registered calls.
{
MutexLock lock(&mu_call_);
KillPendingWorkLocked(
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
}
- MaybeFinishShutdown();
+ ShutdownUnrefOnShutdownCall();
}
// Shutdown listeners.
for (auto& listener : listeners_) {
@@ -825,8 +858,7 @@ void Server::CancelAllCalls() {
void Server::Orphan() {
{
MutexLock lock(&mu_global_);
- GPR_ASSERT(shutdown_flag_.load(std::memory_order_acquire) ||
- listeners_.empty());
+ GPR_ASSERT(ShutdownCalled() || listeners_.empty());
GPR_ASSERT(listeners_destroyed_ == listeners_.size());
}
if (default_resource_user_ != nullptr) {
@@ -845,7 +877,7 @@ grpc_call_error Server::ValidateServerRequest(
(rm->payload_handling == GRPC_SRM_PAYLOAD_NONE)))) {
return GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH;
}
- if (grpc_cq_begin_op(cq_for_notification, tag) == false) {
+ if (!grpc_cq_begin_op(cq_for_notification, tag)) {
return GRPC_CALL_ERROR_COMPLETION_QUEUE_SHUTDOWN;
}
return GRPC_CALL_OK;
@@ -873,7 +905,7 @@ grpc_call_error Server::ValidateServerRequestAndCq(
}
grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) {
- if (shutdown_flag_.load(std::memory_order_acquire)) {
+ if (ShutdownCalled()) {
FailCall(cq_idx, rc,
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server Shutdown"));
return GRPC_CALL_OK;
@@ -936,7 +968,7 @@ class Server::ChannelData::ConnectivityWatcher
GRPC_CHANNEL_INTERNAL_REF(chand_->channel_, "connectivity");
}
- ~ConnectivityWatcher() {
+ ~ConnectivityWatcher() override {
GRPC_CHANNEL_INTERNAL_UNREF(chand_->channel_, "connectivity");
}
@@ -1000,7 +1032,8 @@ void Server::ChannelData::InitTransport(RefCountedPtr<Server> server,
if (num_registered_methods > 0) {
uint32_t max_probes = 0;
size_t slots = 2 * num_registered_methods;
- registered_methods_.reset(new std::vector<ChannelRegisteredMethod>(slots));
+ registered_methods_ =
+ y_absl::make_unique<std::vector<ChannelRegisteredMethod>>(slots);
for (std::unique_ptr<RegisteredMethod>& rm : server_->registered_methods_) {
ExternallyManagedSlice host;
ExternallyManagedSlice method(rm->method.c_str());
@@ -1041,7 +1074,7 @@ void Server::ChannelData::InitTransport(RefCountedPtr<Server> server,
op->set_accept_stream_fn = AcceptStream;
op->set_accept_stream_user_data = this;
op->start_connectivity_watch = MakeOrphanable<ConnectivityWatcher>(this);
- if (server_->shutdown_flag_.load(std::memory_order_acquire)) {
+ if (server_->ShutdownCalled()) {
op->disconnect_with_error =
GRPC_ERROR_CREATE_FROM_STATIC_STRING("Server shutdown");
}
@@ -1113,8 +1146,8 @@ void Server::ChannelData::AcceptStream(void* arg, grpc_transport* /*transport*/,
calld->Start(elem);
}
-void Server::ChannelData::FinishDestroy(void* cd, grpc_error* /*error*/) {
- auto* chand = static_cast<Server::ChannelData*>(cd);
+void Server::ChannelData::FinishDestroy(void* arg, grpc_error* /*error*/) {
+ auto* chand = static_cast<Server::ChannelData*>(arg);
Server* server = chand->server_.get();
GRPC_CHANNEL_INTERNAL_UNREF(chand->channel_, "server");
server->Unref();
@@ -1257,8 +1290,7 @@ void Server::CallData::PublishNewRpc(void* arg, grpc_error* error) {
auto* chand = static_cast<Server::ChannelData*>(call_elem->channel_data);
RequestMatcherInterface* rm = calld->matcher_;
Server* server = rm->server();
- if (error != GRPC_ERROR_NONE ||
- server->shutdown_flag_.load(std::memory_order_acquire)) {
+ if (error != GRPC_ERROR_NONE || server->ShutdownCalled()) {
calld->state_.Store(CallState::ZOMBIED, MemoryOrder::RELAXED);
calld->KillZombie();
return;
@@ -1282,7 +1314,7 @@ void Server::CallData::KillZombie() {
void Server::CallData::StartNewRpc(grpc_call_element* elem) {
auto* chand = static_cast<ChannelData*>(elem->channel_data);
- if (server_->shutdown_flag_.load(std::memory_order_acquire)) {
+ if (server_->ShutdownCalled()) {
state_.Store(CallState::ZOMBIED, MemoryOrder::RELAXED);
KillZombie();
return;
@@ -1353,8 +1385,8 @@ void Server::CallData::StartTransportStreamOpBatchImpl(
grpc_call_next_op(elem, batch);
}
-void Server::CallData::RecvInitialMetadataReady(void* ptr, grpc_error* error) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(ptr);
+void Server::CallData::RecvInitialMetadataReady(void* arg, grpc_error* error) {
+ grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
CallData* calld = static_cast<CallData*>(elem->call_data);
grpc_millis op_deadline;
if (error == GRPC_ERROR_NONE) {
@@ -1396,9 +1428,8 @@ void Server::CallData::RecvInitialMetadataReady(void* ptr, grpc_error* error) {
Closure::Run(DEBUG_LOCATION, closure, error);
}
-void Server::CallData::RecvTrailingMetadataReady(void* user_data,
- grpc_error* error) {
- grpc_call_element* elem = static_cast<grpc_call_element*>(user_data);
+void Server::CallData::RecvTrailingMetadataReady(void* arg, grpc_error* error) {
+ grpc_call_element* elem = static_cast<grpc_call_element*>(arg);
CallData* calld = static_cast<CallData*>(elem->call_data);
if (calld->original_recv_initial_metadata_ready_ != nullptr) {
calld->recv_trailing_metadata_error_ = GRPC_ERROR_REF(error);
@@ -1533,23 +1564,45 @@ grpc_call_error grpc_server_request_call(
}
grpc_call_error grpc_server_request_registered_call(
- grpc_server* server, void* rmp, grpc_call** call, gpr_timespec* deadline,
- grpc_metadata_array* request_metadata, grpc_byte_buffer** optional_payload,
+ grpc_server* server, void* registered_method, grpc_call** call,
+ gpr_timespec* deadline, grpc_metadata_array* request_metadata,
+ grpc_byte_buffer** optional_payload,
grpc_completion_queue* cq_bound_to_call,
grpc_completion_queue* cq_for_notification, void* tag_new) {
grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
grpc_core::ExecCtx exec_ctx;
GRPC_STATS_INC_SERVER_REQUESTED_CALLS();
- auto* rm = static_cast<grpc_core::Server::RegisteredMethod*>(rmp);
+ auto* rm =
+ static_cast<grpc_core::Server::RegisteredMethod*>(registered_method);
GRPC_API_TRACE(
"grpc_server_request_registered_call("
- "server=%p, rmp=%p, call=%p, deadline=%p, request_metadata=%p, "
+ "server=%p, registered_method=%p, call=%p, deadline=%p, "
+ "request_metadata=%p, "
"optional_payload=%p, cq_bound_to_call=%p, cq_for_notification=%p, "
"tag=%p)",
9,
- (server, rmp, call, deadline, request_metadata, optional_payload,
- cq_bound_to_call, cq_for_notification, tag_new));
+ (server, registered_method, call, deadline, request_metadata,
+ optional_payload, cq_bound_to_call, cq_for_notification, tag_new));
return server->core_server->RequestRegisteredCall(
rm, call, deadline, request_metadata, optional_payload, cq_bound_to_call,
cq_for_notification, tag_new);
}
+
+void grpc_server_set_config_fetcher(
+ grpc_server* server, grpc_server_config_fetcher* server_config_fetcher) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
+ GRPC_API_TRACE("grpc_server_set_config_fetcher(server=%p, config_fetcher=%p)",
+ 2, (server, server_config_fetcher));
+ server->core_server->set_config_fetcher(
+ std::unique_ptr<grpc_server_config_fetcher>(server_config_fetcher));
+}
+
+void grpc_server_config_fetcher_destroy(
+ grpc_server_config_fetcher* server_config_fetcher) {
+ grpc_core::ApplicationCallbackExecCtx callback_exec_ctx;
+ grpc_core::ExecCtx exec_ctx;
+ GRPC_API_TRACE("grpc_server_config_fetcher_destroy(config_fetcher=%p)", 1,
+ (server_config_fetcher));
+ delete server_config_fetcher;
+}
diff --git a/contrib/libs/grpc/src/core/lib/surface/server.h b/contrib/libs/grpc/src/core/lib/surface/server.h
index f4f4ff6449a..a6166b8d507 100644
--- a/contrib/libs/grpc/src/core/lib/surface/server.h
+++ b/contrib/libs/grpc/src/core/lib/surface/server.h
@@ -22,6 +22,7 @@
#include <list>
#include <vector>
+#include "y_absl/status/statusor.h"
#include "y_absl/types/optional.h"
#include <grpc/grpc.h>
@@ -31,6 +32,7 @@
#include "src/core/lib/channel/channelz.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/atomic.h"
+#include "src/core/lib/iomgr/resolve_address.h"
#include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/transport/transport.h"
@@ -49,21 +51,23 @@ class Server : public InternallyRefCounted<Server> {
// An object to represent the most relevant characteristics of a
// newly-allocated call object when using an AllocatingRequestMatcherBatch.
struct BatchCallAllocation {
- grpc_experimental_completion_queue_functor* tag;
+ void* tag;
grpc_call** call;
grpc_metadata_array* initial_metadata;
grpc_call_details* details;
+ grpc_completion_queue* cq;
};
// An object to represent the most relevant characteristics of a
// newly-allocated call object when using an
// AllocatingRequestMatcherRegistered.
struct RegisteredCallAllocation {
- grpc_experimental_completion_queue_functor* tag;
+ void* tag;
grpc_call** call;
grpc_metadata_array* initial_metadata;
gpr_timespec* deadline;
grpc_byte_buffer** optional_payload;
+ grpc_completion_queue* cq;
};
/// Interface for listeners.
@@ -71,7 +75,7 @@ class Server : public InternallyRefCounted<Server> {
/// listening and initiate destruction of the listener.
class ListenerInterface : public Orphanable {
public:
- virtual ~ListenerInterface() = default;
+ ~ListenerInterface() override = default;
/// Starts listening. This listener may refer to the pollset object beyond
/// this call, so it is a pointer rather than a reference.
@@ -88,9 +92,9 @@ class Server : public InternallyRefCounted<Server> {
};
explicit Server(const grpc_channel_args* args);
- ~Server();
+ ~Server() override;
- void Orphan() override;
+ void Orphan() Y_ABSL_LOCKS_EXCLUDED(mu_global_) override;
const grpc_channel_args* channel_args() const { return channel_args_; }
grpc_resource_user* default_resource_user() const {
@@ -103,7 +107,16 @@ class Server : public InternallyRefCounted<Server> {
// result is valid for the lifetime of the server.
const std::vector<grpc_pollset*>& pollsets() const { return pollsets_; }
- bool HasOpenConnections();
+ grpc_server_config_fetcher* config_fetcher() const {
+ return config_fetcher_.get();
+ }
+
+ void set_config_fetcher(
+ std::unique_ptr<grpc_server_config_fetcher> config_fetcher) {
+ config_fetcher_ = std::move(config_fetcher);
+ }
+
+ bool HasOpenConnections() Y_ABSL_LOCKS_EXCLUDED(mu_global_);
// Adds a listener to the server. When the server starts, it will call
// the listener's Start() method, and when it shuts down, it will orphan
@@ -111,15 +124,15 @@ class Server : public InternallyRefCounted<Server> {
void AddListener(OrphanablePtr<ListenerInterface> listener);
// Starts listening for connections.
- void Start();
+ void Start() Y_ABSL_LOCKS_EXCLUDED(mu_global_);
// Sets up a transport. Creates a channel stack and binds the transport to
// the server. Called from the listener when a new connection is accepted.
- void SetupTransport(grpc_transport* transport,
- grpc_pollset* accepting_pollset,
- const grpc_channel_args* args,
- const RefCountedPtr<channelz::SocketNode>& socket_node,
- grpc_resource_user* resource_user = nullptr);
+ grpc_error* SetupTransport(
+ grpc_transport* transport, grpc_pollset* accepting_pollset,
+ const grpc_channel_args* args,
+ const RefCountedPtr<channelz::SocketNode>& socket_node,
+ grpc_resource_user* resource_user = nullptr);
void RegisterCompletionQueue(grpc_completion_queue* cq);
@@ -149,9 +162,10 @@ class Server : public InternallyRefCounted<Server> {
grpc_completion_queue* cq_bound_to_call,
grpc_completion_queue* cq_for_notification, void* tag_new);
- void ShutdownAndNotify(grpc_completion_queue* cq, void* tag);
+ void ShutdownAndNotify(grpc_completion_queue* cq, void* tag)
+ Y_ABSL_LOCKS_EXCLUDED(mu_global_, mu_call_);
- void CancelAllCalls();
+ void CancelAllCalls() Y_ABSL_LOCKS_EXCLUDED(mu_global_);
private:
struct RequestedCall;
@@ -198,7 +212,7 @@ class Server : public InternallyRefCounted<Server> {
static void AcceptStream(void* arg, grpc_transport* /*transport*/,
const void* transport_server_data);
- void Destroy();
+ void Destroy() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(server_->mu_global_);
static void FinishDestroy(void* arg, grpc_error* error);
@@ -334,9 +348,11 @@ class Server : public InternallyRefCounted<Server> {
void FailCall(size_t cq_idx, RequestedCall* rc, grpc_error* error);
grpc_call_error QueueRequestedCall(size_t cq_idx, RequestedCall* rc);
- void MaybeFinishShutdown();
+ void MaybeFinishShutdown() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_global_)
+ Y_ABSL_LOCKS_EXCLUDED(mu_call_);
- void KillPendingWorkLocked(grpc_error* error);
+ void KillPendingWorkLocked(grpc_error* error)
+ Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_call_);
static grpc_call_error ValidateServerRequest(
grpc_completion_queue* cq_for_notification, void* tag,
@@ -347,9 +363,43 @@ class Server : public InternallyRefCounted<Server> {
std::vector<grpc_channel*> GetChannelsLocked() const;
+ // Take a shutdown ref for a request (increment by 2) and return if shutdown
+ // has already been called.
+ bool ShutdownRefOnRequest() {
+ int old_value = shutdown_refs_.FetchAdd(2, MemoryOrder::ACQ_REL);
+ return (old_value & 1) != 0;
+ }
+
+ // Decrement the shutdown ref counter by either 1 (for shutdown call) or 2
+ // (for in-flight request) and possibly call MaybeFinishShutdown if
+ // appropriate.
+ void ShutdownUnrefOnRequest() Y_ABSL_LOCKS_EXCLUDED(mu_global_) {
+ if (shutdown_refs_.FetchSub(2, MemoryOrder::ACQ_REL) == 2) {
+ MutexLock lock(&mu_global_);
+ MaybeFinishShutdown();
+ }
+ }
+ void ShutdownUnrefOnShutdownCall() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_global_) {
+ if (shutdown_refs_.FetchSub(1, MemoryOrder::ACQ_REL) == 1) {
+ MaybeFinishShutdown();
+ }
+ }
+
+ bool ShutdownCalled() const {
+ return (shutdown_refs_.Load(MemoryOrder::ACQUIRE) & 1) == 0;
+ }
+
+ // Returns whether there are no more shutdown refs, which means that shutdown
+ // has been called and all accepted requests have been published if using an
+ // AllocatingRequestMatcher.
+ bool ShutdownReady() const {
+ return shutdown_refs_.Load(MemoryOrder::ACQUIRE) == 0;
+ }
+
grpc_channel_args* const channel_args_;
grpc_resource_user* default_resource_user_ = nullptr;
RefCountedPtr<channelz::ServerNode> channelz_node_;
+ std::unique_ptr<grpc_server_config_fetcher> config_fetcher_;
std::vector<grpc_completion_queue*> cqs_;
std::vector<grpc_pollset*> pollsets_;
@@ -375,9 +425,15 @@ class Server : public InternallyRefCounted<Server> {
// Request matcher for unregistered methods.
std::unique_ptr<RequestMatcherInterface> unregistered_request_matcher_;
- std::atomic_bool shutdown_flag_{false};
- bool shutdown_published_ = false;
- std::vector<ShutdownTag> shutdown_tags_;
+ // The shutdown refs counter tracks whether or not shutdown has been called
+ // and whether there are any AllocatingRequestMatcher requests that have been
+ // accepted but not yet started (+2 on each one). If shutdown has been called,
+ // the lowest bit will be 0 (defaults to 1) and the counter will be even. The
+ // server should not notify on shutdown until the counter is 0 (shutdown is
+ // called and there are no requests that are accepted but not started).
+ Atomic<int> shutdown_refs_{1};
+ bool shutdown_published_ Y_ABSL_GUARDED_BY(mu_global_) = false;
+ std::vector<ShutdownTag> shutdown_tags_ Y_ABSL_GUARDED_BY(mu_global_);
std::list<ChannelData*> channels_;
@@ -394,4 +450,42 @@ struct grpc_server {
grpc_core::OrphanablePtr<grpc_core::Server> core_server;
};
+// TODO(roth): Eventually, will need a way to modify configuration even after
+// a connection is established (e.g., to change things like L7 rate
+// limiting, RBAC, and fault injection configs). One possible option
+// would be to do something like ServiceConfig and ConfigSelector, but
+// that might add unnecessary per-call overhead. Need to consider other
+// approaches here.
+struct grpc_server_config_fetcher {
+ public:
+ class ConnectionManager : public grpc_core::RefCounted<ConnectionManager> {
+ public:
+ // Ownership of \a args is transfered.
+ virtual y_absl::StatusOr<grpc_channel_args*> UpdateChannelArgsForConnection(
+ grpc_channel_args* args, grpc_endpoint* tcp) = 0;
+ };
+
+ class WatcherInterface {
+ public:
+ virtual ~WatcherInterface() = default;
+ // UpdateConnectionManager() is invoked by the config fetcher when a new
+ // config is available. Implementations should update the connection manager
+ // and start serving if not already serving.
+ virtual void UpdateConnectionManager(
+ grpc_core::RefCountedPtr<ConnectionManager> manager) = 0;
+ // Implementations should stop serving when this is called. Serving should
+ // only resume when UpdateConfig() is invoked.
+ virtual void StopServing() = 0;
+ };
+
+ virtual ~grpc_server_config_fetcher() = default;
+
+ // Ownership of \a args is transferred.
+ virtual void StartWatch(TString listening_address,
+ grpc_channel_args* args,
+ std::unique_ptr<WatcherInterface> watcher) = 0;
+ virtual void CancelWatch(WatcherInterface* watcher) = 0;
+ virtual grpc_pollset_set* interested_parties() = 0;
+};
+
#endif /* GRPC_CORE_LIB_SURFACE_SERVER_H */
diff --git a/contrib/libs/grpc/src/core/lib/surface/validate_metadata.h b/contrib/libs/grpc/src/core/lib/surface/validate_metadata.h
index db3be684c11..07c802c98b8 100644
--- a/contrib/libs/grpc/src/core/lib/surface/validate_metadata.h
+++ b/contrib/libs/grpc/src/core/lib/surface/validate_metadata.h
@@ -21,7 +21,10 @@
#include <grpc/support/port_platform.h>
+#include <cstring>
+
#include <grpc/slice.h>
+
#include "src/core/lib/iomgr/error.h"
grpc_error* grpc_validate_header_key_is_legal(const grpc_slice& slice);
diff --git a/contrib/libs/grpc/src/core/lib/surface/version.cc b/contrib/libs/grpc/src/core/lib/surface/version.cc
index bed4f427e99..737c2eb1bff 100644
--- a/contrib/libs/grpc/src/core/lib/surface/version.cc
+++ b/contrib/libs/grpc/src/core/lib/surface/version.cc
@@ -23,6 +23,6 @@
#include <grpc/grpc.h>
-const char* grpc_version_string(void) { return "13.0.0"; }
+const char* grpc_version_string(void) { return "15.0.0"; }
-const char* grpc_g_stands_for(void) { return "geeky"; }
+const char* grpc_g_stands_for(void) { return "gilded"; }
diff --git a/contrib/libs/grpc/src/core/lib/transport/authority_override.cc b/contrib/libs/grpc/src/core/lib/transport/authority_override.cc
index 8c13320b73b..b902c33216d 100644
--- a/contrib/libs/grpc/src/core/lib/transport/authority_override.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/authority_override.cc
@@ -16,6 +16,8 @@
#include <grpc/support/port_platform.h>
+#include "y_absl/strings/string_view.h"
+
#include "src/core/lib/channel/channel_args.h"
// Channel arg key for the authority override.
@@ -23,16 +25,16 @@
namespace grpc_core {
-/// Returns a channel argument containing \a authority.
grpc_arg CreateAuthorityOverrideChannelArg(const char* authority) {
return grpc_channel_arg_string_create(
const_cast<char*>(GRPC_ARG_AUTHORITY_OVERRIDE),
const_cast<char*>(authority));
}
-/// Returns the authority override from \a args or nullptr.
-const char* FindAuthorityOverrideInArgs(const grpc_channel_args* args) {
- return grpc_channel_args_find_string(args, GRPC_ARG_AUTHORITY_OVERRIDE);
+y_absl::string_view FindAuthorityOverrideInArgs(const grpc_channel_args* args) {
+ const char* found =
+ grpc_channel_args_find_string(args, GRPC_ARG_AUTHORITY_OVERRIDE);
+ return found == nullptr ? "" : found;
}
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/transport/authority_override.h b/contrib/libs/grpc/src/core/lib/transport/authority_override.h
index 9e584b56cb7..27d999c5f26 100644
--- a/contrib/libs/grpc/src/core/lib/transport/authority_override.h
+++ b/contrib/libs/grpc/src/core/lib/transport/authority_override.h
@@ -19,13 +19,18 @@
#include <grpc/support/port_platform.h>
+#include "y_absl/strings/string_view.h"
+
+#include <grpc/grpc.h>
+
namespace grpc_core {
/// Returns a channel argument containing \a authority.
grpc_arg CreateAuthorityOverrideChannelArg(const char* authority);
-/// Returns the authority override from \a args or nullptr.
-const char* FindAuthorityOverrideInArgs(const grpc_channel_args* args);
+/// Returns the authority override from \a args or the empty string. The return
+/// value is a string_view into the `args` data structure.
+y_absl::string_view FindAuthorityOverrideInArgs(const grpc_channel_args* args);
} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/transport/bdp_estimator.cc b/contrib/libs/grpc/src/core/lib/transport/bdp_estimator.cc
index 8835e32bcff..dd266877c0d 100644
--- a/contrib/libs/grpc/src/core/lib/transport/bdp_estimator.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/bdp_estimator.cc
@@ -34,7 +34,7 @@ BdpEstimator::BdpEstimator(const char* name)
accumulator_(0),
estimate_(65536),
ping_start_time_(gpr_time_0(GPR_CLOCK_MONOTONIC)),
- inter_ping_delay_(100.0), // start at 100ms
+ inter_ping_delay_(100), // start at 100ms
stable_estimate_count_(0),
bw_est_(0),
name_(name) {}
diff --git a/contrib/libs/grpc/src/core/lib/transport/byte_stream.h b/contrib/libs/grpc/src/core/lib/transport/byte_stream.h
index ecb605ad9bb..e83fb626b32 100644
--- a/contrib/libs/grpc/src/core/lib/transport/byte_stream.h
+++ b/contrib/libs/grpc/src/core/lib/transport/byte_stream.h
@@ -40,7 +40,7 @@ namespace grpc_core {
class ByteStream : public Orphanable {
public:
- virtual ~ByteStream() {}
+ ~ByteStream() override {}
// Returns true if the bytes are available immediately (in which case
// on_complete will not be called), or false if the bytes will be available
@@ -92,7 +92,7 @@ class SliceBufferByteStream : public ByteStream {
// Removes all slices in slice_buffer, leaving it empty.
SliceBufferByteStream(grpc_slice_buffer* slice_buffer, uint32_t flags);
- ~SliceBufferByteStream();
+ ~SliceBufferByteStream() override;
void Orphan() override;
@@ -126,7 +126,7 @@ class ByteStreamCache {
public:
explicit CachingByteStream(ByteStreamCache* cache);
- ~CachingByteStream();
+ ~CachingByteStream() override;
void Orphan() override;
diff --git a/contrib/libs/grpc/src/core/lib/transport/connectivity_state.h b/contrib/libs/grpc/src/core/lib/transport/connectivity_state.h
index 9e34c646c76..d4a41a80381 100644
--- a/contrib/libs/grpc/src/core/lib/transport/connectivity_state.h
+++ b/contrib/libs/grpc/src/core/lib/transport/connectivity_state.h
@@ -21,13 +21,15 @@
#include <grpc/support/port_platform.h>
+#include <map>
+#include <memory>
+
#include "y_absl/status/status.h"
#include <grpc/grpc.h>
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/atomic.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/orphanable.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/exec_ctx.h"
@@ -48,7 +50,7 @@ const char* ConnectivityStateName(grpc_connectivity_state state);
class ConnectivityStateWatcherInterface
: public InternallyRefCounted<ConnectivityStateWatcherInterface> {
public:
- virtual ~ConnectivityStateWatcherInterface() = default;
+ ~ConnectivityStateWatcherInterface() override = default;
// Notifies the watcher that the state has changed to new_state.
virtual void Notify(grpc_connectivity_state new_state,
@@ -63,12 +65,12 @@ class ConnectivityStateWatcherInterface
class AsyncConnectivityStateWatcherInterface
: public ConnectivityStateWatcherInterface {
public:
- virtual ~AsyncConnectivityStateWatcherInterface() = default;
+ ~AsyncConnectivityStateWatcherInterface() override = default;
// Schedules a closure on the ExecCtx to invoke
// OnConnectivityStateChange() asynchronously.
void Notify(grpc_connectivity_state new_state,
- const y_absl::Status& status) override final;
+ const y_absl::Status& status) final;
protected:
class Notifier;
@@ -95,9 +97,9 @@ class AsyncConnectivityStateWatcherInterface
// to be called).
class ConnectivityStateTracker {
public:
- ConnectivityStateTracker(const char* name,
- grpc_connectivity_state state = GRPC_CHANNEL_IDLE,
- const y_absl::Status& status = y_absl::Status())
+ explicit ConnectivityStateTracker(
+ const char* name, grpc_connectivity_state state = GRPC_CHANNEL_IDLE,
+ const y_absl::Status& status = y_absl::Status())
: name_(name), state_(state), status_(status) {}
~ConnectivityStateTracker();
diff --git a/contrib/libs/grpc/src/core/lib/transport/error_utils.h b/contrib/libs/grpc/src/core/lib/transport/error_utils.h
index fb967202f32..28db288445f 100644
--- a/contrib/libs/grpc/src/core/lib/transport/error_utils.h
+++ b/contrib/libs/grpc/src/core/lib/transport/error_utils.h
@@ -36,7 +36,7 @@
/// NULL.
void grpc_error_get_status(grpc_error* error, grpc_millis deadline,
grpc_status_code* code, grpc_slice* slice,
- grpc_http2_error_code* http_status,
+ grpc_http2_error_code* http_error,
const char** error_string);
/// Utility Function to convert a grpc_error * \a error to an y_absl::Status.
diff --git a/contrib/libs/grpc/src/core/lib/transport/metadata.cc b/contrib/libs/grpc/src/core/lib/transport/metadata.cc
index 33d4d5ac705..ef1e07d2cd0 100644
--- a/contrib/libs/grpc/src/core/lib/transport/metadata.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/metadata.cc
@@ -252,7 +252,7 @@ void grpc_mdctx_global_shutdown() {
if (shard->count != 0) {
gpr_log(GPR_ERROR, "WARNING: %" PRIuPTR " metadata elements were leaked",
shard->count);
- for (int i = 0; i < shard->capacity; i++) {
+ for (size_t i = 0; i < shard->capacity; i++) {
for (InternedMetadata* md = shard->elems[i].next; md;
md = md->bucket_next()) {
char* key_str = grpc_slice_to_c_string(md->key());
@@ -596,7 +596,7 @@ static void* set_user_data(UserData* ud, void (*destroy_func)(void*),
grpc_core::ReleasableMutexLock lock(&ud->mu_user_data);
if (ud->destroy_user_data.Load(grpc_core::MemoryOrder::RELAXED)) {
/* user data can only be set once */
- lock.Unlock();
+ lock.Release();
if (destroy_func != nullptr) {
destroy_func(data);
}
@@ -673,6 +673,10 @@ void grpc_mdelem_do_unref(grpc_mdelem gmd DEBUG_ARGS) {
void grpc_mdelem_on_final_unref(grpc_mdelem_data_storage storage, void* ptr,
uint32_t hash DEBUG_ARGS) {
+#ifndef NDEBUG
+ (void)file;
+ (void)line;
+#endif
switch (storage) {
case GRPC_MDELEM_STORAGE_EXTERNAL:
case GRPC_MDELEM_STORAGE_STATIC:
diff --git a/contrib/libs/grpc/src/core/lib/transport/metadata.h b/contrib/libs/grpc/src/core/lib/transport/metadata.h
index 4bb8d64dd03..e6de4ea9a99 100644
--- a/contrib/libs/grpc/src/core/lib/transport/metadata.h
+++ b/contrib/libs/grpc/src/core/lib/transport/metadata.h
@@ -106,10 +106,10 @@ struct grpc_mdelem {
((grpc_mdelem_data_storage)((md).payload & (uintptr_t)3))
#ifdef __cplusplus
#define GRPC_MAKE_MDELEM(data, storage) \
- (grpc_mdelem{((uintptr_t)(data)) | ((uintptr_t)storage)})
+ (grpc_mdelem{((uintptr_t)(data)) | ((uintptr_t)(storage))})
#else
#define GRPC_MAKE_MDELEM(data, storage) \
- ((grpc_mdelem){((uintptr_t)(data)) | ((uintptr_t)storage)})
+ ((grpc_mdelem){((uintptr_t)(data)) | ((uintptr_t)(storage))})
#endif
#define GRPC_MDELEM_IS_INTERNED(md) \
((grpc_mdelem_data_storage)((md).payload & \
diff --git a/contrib/libs/grpc/src/core/lib/transport/metadata_batch.cc b/contrib/libs/grpc/src/core/lib/transport/metadata_batch.cc
index 66749b671c7..466a135c0f0 100644
--- a/contrib/libs/grpc/src/core/lib/transport/metadata_batch.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/metadata_batch.cc
@@ -23,6 +23,9 @@
#include <stdbool.h>
#include <string.h>
+#include "y_absl/container/inlined_vector.h"
+#include "y_absl/strings/str_join.h"
+
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
@@ -296,6 +299,30 @@ void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
GRPC_MDELEM_UNREF(old_mdelem);
}
+y_absl::optional<y_absl::string_view> grpc_metadata_batch_get_value(
+ grpc_metadata_batch* batch, y_absl::string_view target_key,
+ TString* concatenated_value) {
+ // Find all values for the specified key.
+ GPR_DEBUG_ASSERT(batch != nullptr);
+ y_absl::InlinedVector<y_absl::string_view, 1> values;
+ for (grpc_linked_mdelem* md = batch->list.head; md != nullptr;
+ md = md->next) {
+ y_absl::string_view key = grpc_core::StringViewFromSlice(GRPC_MDKEY(md->md));
+ y_absl::string_view value =
+ grpc_core::StringViewFromSlice(GRPC_MDVALUE(md->md));
+ if (target_key == key) values.push_back(value);
+ }
+ // If none found, no match.
+ if (values.empty()) return y_absl::nullopt;
+ // If exactly one found, return it as-is.
+ if (values.size() == 1) return values.front();
+ // If more than one found, concatenate the values, using
+ // *concatenated_values as a temporary holding place for the
+ // concatenated string.
+ *concatenated_value = y_absl::StrJoin(values, ",");
+ return *concatenated_value;
+}
+
grpc_error* grpc_metadata_batch_substitute(grpc_metadata_batch* batch,
grpc_linked_mdelem* storage,
grpc_mdelem new_mdelem) {
diff --git a/contrib/libs/grpc/src/core/lib/transport/metadata_batch.h b/contrib/libs/grpc/src/core/lib/transport/metadata_batch.h
index 3101f485a2b..bc8c8a0cd4a 100644
--- a/contrib/libs/grpc/src/core/lib/transport/metadata_batch.h
+++ b/contrib/libs/grpc/src/core/lib/transport/metadata_batch.h
@@ -23,9 +23,12 @@
#include <stdbool.h>
+#include "y_absl/types/optional.h"
+
#include <grpc/grpc.h>
#include <grpc/slice.h>
#include <grpc/support/time.h>
+
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/transport/metadata.h"
#include "src/core/lib/transport/static_metadata.h"
@@ -73,11 +76,22 @@ void grpc_metadata_batch_remove(grpc_metadata_batch* batch,
/** Substitute a new mdelem for an old value */
grpc_error* grpc_metadata_batch_substitute(grpc_metadata_batch* batch,
grpc_linked_mdelem* storage,
- grpc_mdelem new_value);
+ grpc_mdelem new_mdelem);
void grpc_metadata_batch_set_value(grpc_linked_mdelem* storage,
const grpc_slice& value);
+/** Returns metadata value(s) for the specified key.
+ If the key is not present in the batch, returns y_absl::nullopt.
+ If the key is present exactly once in the batch, returns a string_view of
+ that value.
+ If the key is present more than once in the batch, constructs a
+ comma-concatenated string of all values in concatenated_value and returns a
+ string_view of that string. */
+y_absl::optional<y_absl::string_view> grpc_metadata_batch_get_value(
+ grpc_metadata_batch* batch, y_absl::string_view target_key,
+ TString* concatenated_value);
+
/** Add \a storage to the beginning of \a batch. storage->md is
assumed to be valid.
\a storage is owned by the caller and must survive for the
@@ -172,10 +186,10 @@ grpc_error* grpc_metadata_batch_filter(
void* user_data, const char* composite_error_string) GRPC_MUST_USE_RESULT;
#ifndef NDEBUG
-void grpc_metadata_batch_assert_ok(grpc_metadata_batch* comd);
+void grpc_metadata_batch_assert_ok(grpc_metadata_batch* batch);
#else
-#define grpc_metadata_batch_assert_ok(comd) \
- do { \
+#define grpc_metadata_batch_assert_ok(batch) \
+ do { \
} while (0)
#endif
diff --git a/contrib/libs/grpc/src/core/lib/transport/static_metadata.cc b/contrib/libs/grpc/src/core/lib/transport/static_metadata.cc
index e027c00d390..483a40f0325 100644
--- a/contrib/libs/grpc/src/core/lib/transport/static_metadata.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/static_metadata.cc
@@ -1207,7 +1207,7 @@ static uint32_t elems_phash(uint32_t i) {
uint32_t y = i / 108;
uint32_t h = x;
if (y < GPR_ARRAY_SIZE(elems_r)) {
- uint32_t delta = (uint32_t)elems_r[y];
+ uint32_t delta = static_cast<uint32_t>(elems_r[y]);
h += delta;
}
return h;
diff --git a/contrib/libs/grpc/src/core/lib/transport/status_metadata.cc b/contrib/libs/grpc/src/core/lib/transport/status_metadata.cc
index c83d6b0d2dc..1b19307e7c6 100644
--- a/contrib/libs/grpc/src/core/lib/transport/status_metadata.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/status_metadata.cc
@@ -42,14 +42,15 @@ grpc_status_code grpc_get_status_code_from_metadata(grpc_mdelem md) {
}
void* user_data = grpc_mdelem_get_user_data(md, destroy_status);
if (user_data != nullptr) {
- return static_cast<grpc_status_code>((intptr_t)user_data - STATUS_OFFSET);
+ return static_cast<grpc_status_code>(reinterpret_cast<intptr_t>(user_data) -
+ STATUS_OFFSET);
}
uint32_t status;
if (!grpc_parse_slice_to_uint32(GRPC_MDVALUE(md), &status)) {
status = GRPC_STATUS_UNKNOWN; /* could not parse status code */
}
- grpc_mdelem_set_user_data(
- md, destroy_status, (void*)static_cast<intptr_t>(status + STATUS_OFFSET));
+ grpc_mdelem_set_user_data(md, destroy_status,
+ reinterpret_cast<void*>(status + STATUS_OFFSET));
return static_cast<grpc_status_code>(status);
}
diff --git a/contrib/libs/grpc/src/core/lib/transport/timeout_encoding.cc b/contrib/libs/grpc/src/core/lib/transport/timeout_encoding.cc
index 26d4b4a426f..274006383f3 100644
--- a/contrib/libs/grpc/src/core/lib/transport/timeout_encoding.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/timeout_encoding.cc
@@ -102,8 +102,8 @@ int grpc_http2_decode_timeout(const grpc_slice& text, grpc_millis* timeout) {
const uint8_t* end = GRPC_SLICE_END_PTR(text);
int have_digit = 0;
/* skip whitespace */
- for (; p != end && *p == ' '; p++)
- ;
+ for (; p != end && *p == ' '; p++) {
+ }
/* decode numeric part */
for (; p != end && *p >= '0' && *p <= '9'; p++) {
int32_t digit = static_cast<int32_t>(*p - static_cast<uint8_t>('0'));
@@ -119,8 +119,8 @@ int grpc_http2_decode_timeout(const grpc_slice& text, grpc_millis* timeout) {
}
if (!have_digit) return 0;
/* skip whitespace */
- for (; p != end && *p == ' '; p++)
- ;
+ for (; p != end && *p == ' '; p++) {
+ }
if (p == end) return 0;
/* decode unit specifier */
switch (*p) {
diff --git a/contrib/libs/grpc/src/core/lib/transport/transport.cc b/contrib/libs/grpc/src/core/lib/transport/transport.cc
index 99a32980aa6..dccab66dc04 100644
--- a/contrib/libs/grpc/src/core/lib/transport/transport.cc
+++ b/contrib/libs/grpc/src/core/lib/transport/transport.cc
@@ -61,8 +61,8 @@ void slice_stream_destroy(void* arg) {
grpc_stream_destroy(static_cast<grpc_stream_refcount*>(arg));
}
-#define STREAM_REF_FROM_SLICE_REF(p) \
- ((grpc_stream_refcount*)(((uint8_t*)p) - \
+#define STREAM_REF_FROM_SLICE_REF(p) \
+ ((grpc_stream_refcount*)(((uint8_t*)(p)) - \
offsetof(grpc_stream_refcount, slice_refcount)))
grpc_slice grpc_slice_from_stream_owned_buffer(grpc_stream_refcount* refcount,
@@ -91,7 +91,9 @@ void grpc_stream_ref_init(grpc_stream_refcount* refcount, int /*initial_refs*/,
#endif
GRPC_CLOSURE_INIT(&refcount->destroy, cb, cb_arg, grpc_schedule_on_exec_ctx);
- new (&refcount->refs) grpc_core::RefCount(1, &grpc_trace_stream_refcount);
+ new (&refcount->refs) grpc_core::RefCount(
+ 1, GRPC_TRACE_FLAG_ENABLED(grpc_trace_stream_refcount) ? "stream_refcount"
+ : nullptr);
new (&refcount->slice_refcount) grpc_slice_refcount(
grpc_slice_refcount::Type::REGULAR, &refcount->refs, slice_stream_destroy,
refcount, &refcount->slice_refcount);
diff --git a/contrib/libs/grpc/src/core/lib/transport/transport.h b/contrib/libs/grpc/src/core/lib/transport/transport.h
index 2404455f9f6..0523dadc498 100644
--- a/contrib/libs/grpc/src/core/lib/transport/transport.h
+++ b/contrib/libs/grpc/src/core/lib/transport/transport.h
@@ -224,7 +224,7 @@ struct grpc_transport_stream_op_batch_payload {
~grpc_transport_stream_op_batch_payload() {
// We don't really own `send_message`, so release ownership and let the
// owner clean the data.
- send_message.send_message.release();
+ (void)send_message.send_message.release();
}
struct {
@@ -411,7 +411,7 @@ void grpc_transport_destroy_stream(grpc_transport* transport,
grpc_closure* then_schedule_closure);
void grpc_transport_stream_op_batch_finish_with_failure(
- grpc_transport_stream_op_batch* op, grpc_error* error,
+ grpc_transport_stream_op_batch* batch, grpc_error* error,
grpc_core::CallCombiner* call_combiner);
TString grpc_transport_stream_op_batch_string(
@@ -450,14 +450,14 @@ void grpc_transport_destroy(grpc_transport* transport);
/* Get the endpoint used by \a transport */
grpc_endpoint* grpc_transport_get_endpoint(grpc_transport* transport);
-/* Allocate a grpc_transport_op, and preconfigure the on_consumed closure to
- \a on_consumed and then delete the returned transport op */
-grpc_transport_op* grpc_make_transport_op(grpc_closure* on_consumed);
-/* Allocate a grpc_transport_stream_op_batch, and preconfigure the on_consumed
+/* Allocate a grpc_transport_op, and preconfigure the on_complete closure to
+ \a on_complete and then delete the returned transport op */
+grpc_transport_op* grpc_make_transport_op(grpc_closure* on_complete);
+/* Allocate a grpc_transport_stream_op_batch, and preconfigure the on_complete
closure
- to \a on_consumed and then delete the returned transport op */
+ to \a on_complete and then delete the returned transport op */
grpc_transport_stream_op_batch* grpc_make_transport_stream_op(
- grpc_closure* on_consumed);
+ grpc_closure* on_complete);
namespace grpc_core {
// This is the key to be used for loading/storing keepalive_throttling in the
diff --git a/contrib/libs/grpc/src/core/lib/uri/uri_parser.cc b/contrib/libs/grpc/src/core/lib/uri/uri_parser.cc
index 1215e0d206d..ab0a11526e5 100644
--- a/contrib/libs/grpc/src/core/lib/uri/uri_parser.cc
+++ b/contrib/libs/grpc/src/core/lib/uri/uri_parser.cc
@@ -22,288 +22,170 @@
#include <string.h>
+#include <map>
#include <util/generic/string.h>
+#include "y_absl/strings/escaping.h"
#include "y_absl/strings/str_format.h"
+#include "y_absl/strings/str_split.h"
-#include <grpc/slice_buffer.h>
-#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/lib/gpr/string.h"
-#include "src/core/lib/slice/percent_encoding.h"
-#include "src/core/lib/slice/slice_internal.h"
-#include "src/core/lib/slice/slice_string_helpers.h"
-/** a size_t default value... maps to all 1's */
-#define NOT_SET (~(size_t)0)
+namespace grpc_core {
+namespace {
-static grpc_uri* bad_uri(y_absl::string_view uri_text, size_t pos,
- const char* section, bool suppress_errors) {
- if (!suppress_errors) {
- TString line_prefix = y_absl::StrFormat("bad uri.%s: '", section);
- gpr_log(GPR_ERROR, "%s%s'", line_prefix.c_str(),
- TString(uri_text).c_str());
- size_t pfx_len = line_prefix.size() + pos;
- gpr_log(GPR_ERROR, "%s^ here", TString(pfx_len, ' ').c_str());
+// Similar to `grpc_permissive_percent_decode_slice`, this %-decodes all valid
+// triplets, and passes through the rest verbatim.
+TString PercentDecode(y_absl::string_view str) {
+ if (str.empty() || !y_absl::StrContains(str, "%")) {
+ return TString(str);
+ }
+ TString out;
+ TString unescaped;
+ out.reserve(str.size());
+ for (size_t i = 0; i < str.length(); i++) {
+ unescaped = "";
+ if (str[i] != '%') {
+ out += str[i];
+ continue;
+ }
+ if (i + 3 >= str.length() ||
+ !y_absl::CUnescape(y_absl::StrCat("\\x", str.substr(i + 1, 2)),
+ &unescaped) ||
+ unescaped.length() > 1) {
+ out += str[i];
+ } else {
+ out += unescaped[0];
+ i += 2;
+ }
}
- return nullptr;
-}
-
-/** Returns a copy of percent decoded \a src[begin, end) */
-static char* decode_and_copy_component(y_absl::string_view src, size_t begin,
- size_t end) {
- grpc_slice component =
- (begin == NOT_SET || end == NOT_SET)
- ? grpc_empty_slice()
- : grpc_slice_from_copied_buffer(src.data() + begin, end - begin);
- grpc_slice decoded_component =
- grpc_permissive_percent_decode_slice(component);
- char* out = grpc_dump_slice(decoded_component, GPR_DUMP_ASCII);
- grpc_slice_unref_internal(component);
- grpc_slice_unref_internal(decoded_component);
return out;
}
-static bool valid_hex(char c) {
- return ((c >= 'a') && (c <= 'f')) || ((c >= 'A') && (c <= 'F')) ||
- ((c >= '0') && (c <= '9'));
+// Checks if this string is made up of pchars, '/', '?', and '%' exclusively.
+// See https://tools.ietf.org/html/rfc3986#section-3.4
+bool IsPCharString(y_absl::string_view str) {
+ return (str.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789"
+ "?/:@\\-._~!$&'()*+,;=%") ==
+ y_absl::string_view::npos);
}
-/** Returns how many chars to advance if \a uri_text[i] begins a valid \a pchar
- * production. If \a uri_text[i] introduces an invalid \a pchar (such as percent
- * sign not followed by two hex digits), NOT_SET is returned. */
-static size_t parse_pchar(y_absl::string_view uri_text, size_t i) {
- /* pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
- * unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~"
- * pct-encoded = "%" HEXDIG HEXDIG
- * sub-delims = "!" / "$" / "&" / "'" / "(" / ")"
- / "*" / "+" / "," / ";" / "=" */
- char c = uri_text[i];
- switch (c) {
- default:
- if (((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) ||
- ((c >= '0') && (c <= '9'))) {
- return 1;
- }
- break;
- case ':':
- case '@':
- case '-':
- case '.':
- case '_':
- case '~':
- case '!':
- case '$':
- case '&':
- case '\'':
- case '(':
- case ')':
- case '*':
- case '+':
- case ',':
- case ';':
- case '=':
- return 1;
- case '%': /* pct-encoded */
- if (uri_text.size() > i + 2 && valid_hex(uri_text[i + 1]) &&
- valid_hex(uri_text[i + 2])) {
- return 2;
- }
- return NOT_SET;
- }
- return 0;
+y_absl::Status MakeInvalidURIStatus(y_absl::string_view part_name,
+ y_absl::string_view uri,
+ y_absl::string_view extra) {
+ return y_absl::InvalidArgumentError(y_absl::StrFormat(
+ "Could not parse '%s' from uri '%s'. %s", part_name, uri, extra));
}
-
-/* *( pchar / "?" / "/" ) */
-static int parse_fragment_or_query(y_absl::string_view uri_text, size_t* i) {
- while (uri_text.size() > *i) {
- const size_t advance = parse_pchar(uri_text, *i); /* pchar */
- switch (advance) {
- case 0: /* uri_text[i] isn't in pchar */
- /* maybe it's ? or / */
- if (uri_text[*i] == '?' || uri_text[*i] == '/') {
- (*i)++;
- break;
- } else {
- return 1;
- }
- GPR_UNREACHABLE_CODE(return 0);
- default:
- (*i) += advance;
- break;
- case NOT_SET: /* uri_text[i] introduces an invalid URI */
- return 0;
- }
+} // namespace
+
+y_absl::StatusOr<URI> URI::Parse(y_absl::string_view uri_text) {
+ y_absl::StatusOr<TString> decoded;
+ y_absl::string_view remaining = uri_text;
+ // parse scheme
+ size_t idx = remaining.find(':');
+ if (idx == remaining.npos || idx == 0) {
+ return MakeInvalidURIStatus("scheme", uri_text, "Scheme not found.");
}
- /* *i is the first uri_text position past the \a query production, maybe \0 */
- return 1;
-}
-
-static void parse_query_parts(grpc_uri* uri) {
- static const char* QUERY_PARTS_SEPARATOR = "&";
- static const char* QUERY_PARTS_VALUE_SEPARATOR = "=";
- GPR_ASSERT(uri->query != nullptr);
- if (uri->query[0] == '\0') {
- uri->query_parts = nullptr;
- uri->query_parts_values = nullptr;
- uri->num_query_parts = 0;
- return;
+ TString scheme(remaining.substr(0, idx));
+ if (scheme.find_first_not_of("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+ "abcdefghijklmnopqrstuvwxyz"
+ "0123456789+-.") != TString::npos) {
+ return MakeInvalidURIStatus("scheme", uri_text,
+ "Scheme contains invalid characters.");
}
-
- gpr_string_split(uri->query, QUERY_PARTS_SEPARATOR, &uri->query_parts,
- &uri->num_query_parts);
- uri->query_parts_values =
- static_cast<char**>(gpr_malloc(uri->num_query_parts * sizeof(char**)));
- for (size_t i = 0; i < uri->num_query_parts; i++) {
- char** query_param_parts;
- size_t num_query_param_parts;
- char* full = uri->query_parts[i];
- gpr_string_split(full, QUERY_PARTS_VALUE_SEPARATOR, &query_param_parts,
- &num_query_param_parts);
- GPR_ASSERT(num_query_param_parts > 0);
- uri->query_parts[i] = query_param_parts[0];
- if (num_query_param_parts > 1) {
- /* TODO(dgq): only the first value after the separator is considered.
- * Perhaps all chars after the first separator for the query part should
- * be included, even if they include the separator. */
- uri->query_parts_values[i] = query_param_parts[1];
- } else {
- uri->query_parts_values[i] = nullptr;
- }
- for (size_t j = 2; j < num_query_param_parts; j++) {
- gpr_free(query_param_parts[j]);
- }
- gpr_free(query_param_parts);
- gpr_free(full);
+ if (!isalpha(scheme[0])) {
+ return MakeInvalidURIStatus(
+ "scheme", uri_text,
+ "Scheme must begin with an alpha character [A-Za-z].");
}
-}
-
-grpc_uri* grpc_uri_parse(y_absl::string_view uri_text, bool suppress_errors) {
- grpc_uri* uri;
- size_t scheme_begin = 0;
- size_t scheme_end = NOT_SET;
- size_t authority_begin = NOT_SET;
- size_t authority_end = NOT_SET;
- size_t path_begin = NOT_SET;
- size_t path_end = NOT_SET;
- size_t query_begin = NOT_SET;
- size_t query_end = NOT_SET;
- size_t fragment_begin = NOT_SET;
- size_t fragment_end = NOT_SET;
- size_t i;
-
- for (i = scheme_begin; i < uri_text.size(); ++i) {
- if (uri_text[i] == ':') {
- scheme_end = i;
- break;
- }
- if (uri_text[i] >= 'a' && uri_text[i] <= 'z') continue;
- if (uri_text[i] >= 'A' && uri_text[i] <= 'Z') continue;
- if (i != scheme_begin) {
- if (uri_text[i] >= '0' && uri_text[i] <= '9') continue;
- if (uri_text[i] == '+') continue;
- if (uri_text[i] == '-') continue;
- if (uri_text[i] == '.') continue;
- }
- break;
+ remaining.remove_prefix(scheme.length() + 1);
+ // parse authority
+ TString authority;
+ if (y_absl::StartsWith(remaining, "//")) {
+ remaining.remove_prefix(2);
+ authority =
+ PercentDecode(remaining.substr(0, remaining.find_first_of("/?#")));
+ remaining.remove_prefix(authority.length());
}
- if (scheme_end == NOT_SET) {
- return bad_uri(uri_text, i, "scheme", suppress_errors);
+ // parse path
+ TString path;
+ if (!remaining.empty()) {
+ path = PercentDecode(remaining.substr(0, remaining.find_first_of("?#")));
+ remaining.remove_prefix(path.length());
}
-
- if (uri_text.size() > scheme_end + 2 && uri_text[scheme_end + 1] == '/' &&
- uri_text[scheme_end + 2] == '/') {
- authority_begin = scheme_end + 3;
- for (i = authority_begin; uri_text.size() > i && authority_end == NOT_SET;
- i++) {
- if (uri_text[i] == '/' || uri_text[i] == '?' || uri_text[i] == '#') {
- authority_end = i;
- }
+ // parse query
+ std::vector<QueryParam> query_param_pairs;
+ if (!remaining.empty() && remaining[0] == '?') {
+ remaining.remove_prefix(1);
+ y_absl::string_view tmp_query = remaining.substr(0, remaining.find('#'));
+ if (tmp_query.empty()) {
+ return MakeInvalidURIStatus("query", uri_text, "Invalid query string.");
}
- if (authority_end == NOT_SET && uri_text.size() == i) {
- authority_end = i;
+ if (!IsPCharString(tmp_query)) {
+ return MakeInvalidURIStatus("query string", uri_text,
+ "Query string contains invalid characters.");
}
- if (authority_end == NOT_SET) {
- return bad_uri(uri_text, i, "authority", suppress_errors);
+ for (y_absl::string_view query_param : y_absl::StrSplit(tmp_query, '&')) {
+ const std::pair<y_absl::string_view, y_absl::string_view> possible_kv =
+ y_absl::StrSplit(query_param, y_absl::MaxSplits('=', 1));
+ if (possible_kv.first.empty()) continue;
+ query_param_pairs.push_back({PercentDecode(possible_kv.first),
+ PercentDecode(possible_kv.second)});
}
- /* TODO(ctiller): parse the authority correctly */
- path_begin = authority_end;
- } else {
- path_begin = scheme_end + 1;
+ remaining.remove_prefix(tmp_query.length());
}
-
- for (i = path_begin; i < uri_text.size(); ++i) {
- if (uri_text[i] == '?' || uri_text[i] == '#') {
- path_end = i;
- break;
+ TString fragment;
+ if (!remaining.empty() && remaining[0] == '#') {
+ remaining.remove_prefix(1);
+ if (!IsPCharString(remaining)) {
+ return MakeInvalidURIStatus("fragment", uri_text,
+ "Fragment contains invalid characters.");
}
+ fragment = PercentDecode(remaining);
}
- if (path_end == NOT_SET && uri_text.size() == i) {
- path_end = i;
- }
- if (path_end == NOT_SET) {
- return bad_uri(uri_text, i, "path", suppress_errors);
- }
+ return URI(std::move(scheme), std::move(authority), std::move(path),
+ std::move(query_param_pairs), std::move(fragment));
+}
- if (uri_text.size() > i && uri_text[i] == '?') {
- query_begin = ++i;
- if (!parse_fragment_or_query(uri_text, &i)) {
- return bad_uri(uri_text, i, "query", suppress_errors);
- } else if (uri_text.size() > i && uri_text[i] != '#') {
- /* We must be at the end or at the beginning of a fragment */
- return bad_uri(uri_text, i, "query", suppress_errors);
- }
- query_end = i;
- }
- if (uri_text.size() > i && uri_text[i] == '#') {
- fragment_begin = ++i;
- if (!parse_fragment_or_query(uri_text, &i)) {
- return bad_uri(uri_text, i - fragment_end, "fragment", suppress_errors);
- } else if (uri_text.size() > i) {
- /* We must be at the end */
- return bad_uri(uri_text, i, "fragment", suppress_errors);
- }
- fragment_end = i;
+URI::URI(TString scheme, TString authority, TString path,
+ std::vector<QueryParam> query_parameter_pairs, TString fragment)
+ : scheme_(std::move(scheme)),
+ authority_(std::move(authority)),
+ path_(std::move(path)),
+ query_parameter_pairs_(std::move(query_parameter_pairs)),
+ fragment_(std::move(fragment)) {
+ for (const auto& kv : query_parameter_pairs_) {
+ query_parameter_map_[kv.key] = kv.value;
}
-
- uri = static_cast<grpc_uri*>(gpr_zalloc(sizeof(*uri)));
- uri->scheme = decode_and_copy_component(uri_text, scheme_begin, scheme_end);
- uri->authority =
- decode_and_copy_component(uri_text, authority_begin, authority_end);
- uri->path = decode_and_copy_component(uri_text, path_begin, path_end);
- uri->query = decode_and_copy_component(uri_text, query_begin, query_end);
- uri->fragment =
- decode_and_copy_component(uri_text, fragment_begin, fragment_end);
- parse_query_parts(uri);
-
- return uri;
}
-const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key) {
- GPR_ASSERT(key != nullptr);
- if (key[0] == '\0') return nullptr;
-
- for (size_t i = 0; i < uri->num_query_parts; ++i) {
- if (0 == strcmp(key, uri->query_parts[i])) {
- return uri->query_parts_values[i];
- }
+URI::URI(const URI& other)
+ : scheme_(other.scheme_),
+ authority_(other.authority_),
+ path_(other.path_),
+ query_parameter_pairs_(other.query_parameter_pairs_),
+ fragment_(other.fragment_) {
+ for (const auto& kv : query_parameter_pairs_) {
+ query_parameter_map_[kv.key] = kv.value;
}
- return nullptr;
}
-void grpc_uri_destroy(grpc_uri* uri) {
- if (!uri) return;
- gpr_free(uri->scheme);
- gpr_free(uri->authority);
- gpr_free(uri->path);
- gpr_free(uri->query);
- for (size_t i = 0; i < uri->num_query_parts; ++i) {
- gpr_free(uri->query_parts[i]);
- gpr_free(uri->query_parts_values[i]);
+URI& URI::operator=(const URI& other) {
+ if (this == &other) {
+ return *this;
+ }
+ scheme_ = other.scheme_;
+ authority_ = other.authority_;
+ path_ = other.path_;
+ query_parameter_pairs_ = other.query_parameter_pairs_;
+ fragment_ = other.fragment_;
+ for (const auto& kv : query_parameter_pairs_) {
+ query_parameter_map_[kv.key] = kv.value;
}
- gpr_free(uri->query_parts);
- gpr_free(uri->query_parts_values);
- gpr_free(uri->fragment);
- gpr_free(uri);
+ return *this;
}
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/src/core/lib/uri/uri_parser.h b/contrib/libs/grpc/src/core/lib/uri/uri_parser.h
index ccb9a4f29eb..35ffbd4b9ca 100644
--- a/contrib/libs/grpc/src/core/lib/uri/uri_parser.h
+++ b/contrib/libs/grpc/src/core/lib/uri/uri_parser.h
@@ -21,31 +21,67 @@
#include <grpc/support/port_platform.h>
+#include <stddef.h>
+
+#include <map>
+#include <util/generic/string.h>
+#include <vector>
+
+#include "y_absl/status/statusor.h"
#include "y_absl/strings/string_view.h"
-#include <stddef.h>
+namespace grpc_core {
-struct grpc_uri {
- char* scheme;
- char* authority;
- char* path;
- char* query;
- /** Query substrings separated by '&' */
- char** query_parts;
- /** Number of elements in \a query_parts and \a query_parts_values */
- size_t num_query_parts;
- /** Split each query part by '='. NULL if not present. */
- char** query_parts_values;
- char* fragment;
-};
-/** parse a uri, return NULL on failure */
-grpc_uri* grpc_uri_parse(y_absl::string_view uri_text, bool suppress_errors);
+class URI {
+ public:
+ struct QueryParam {
+ TString key;
+ TString value;
+ bool operator==(const QueryParam& other) const {
+ return key == other.key && value == other.value;
+ }
+ };
+
+ // Creates an instance of GrpcURI by parsing an rfc3986 URI string. Returns
+ // an IllegalArgumentError on failure.
+ static y_absl::StatusOr<URI> Parse(y_absl::string_view uri_text);
+ // Explicit construction by individual URI components
+ URI(TString scheme, TString authority, TString path,
+ std::vector<QueryParam> query_parameter_pairs, TString fragment_);
+ URI() = default;
+ // Copy construction and assignment
+ URI(const URI& other);
+ URI& operator=(const URI& other);
+ // Move construction and assignment
+ URI(URI&&) = default;
+ URI& operator=(URI&&) = default;
-/** return the part of a query string after the '=' in "?key=xxx&...", or NULL
- * if key is not present */
-const char* grpc_uri_get_query_arg(const grpc_uri* uri, const char* key);
+ const TString& scheme() const { return scheme_; }
+ const TString& authority() const { return authority_; }
+ const TString& path() const { return path_; }
+ // Stores the *last* value appearing for each repeated key in the query
+ // string. If you need to capture repeated query parameters, use
+ // `query_parameter_pairs`.
+ const std::map<y_absl::string_view, y_absl::string_view>& query_parameter_map()
+ const {
+ return query_parameter_map_;
+ }
+ // A vector of key:value query parameter pairs, kept in order of appearance
+ // within the URI search string. Repeated keys are represented as separate
+ // key:value elements.
+ const std::vector<QueryParam>& query_parameter_pairs() const {
+ return query_parameter_pairs_;
+ }
+ const TString& fragment() const { return fragment_; }
-/** destroy a uri */
-void grpc_uri_destroy(grpc_uri* uri);
+ private:
+ TString scheme_;
+ TString authority_;
+ TString path_;
+ std::map<y_absl::string_view, y_absl::string_view> query_parameter_map_;
+ std::vector<QueryParam> query_parameter_pairs_;
+ TString fragment_;
+};
+} // namespace grpc_core
#endif /* GRPC_CORE_LIB_URI_URI_PARSER_H */
diff --git a/contrib/libs/grpc/src/core/plugin_registry/grpc_plugin_registry.cc b/contrib/libs/grpc/src/core/plugin_registry/grpc_plugin_registry.cc
index e048760c7f1..d3def27e17a 100644
--- a/contrib/libs/grpc/src/core/plugin_registry/grpc_plugin_registry.cc
+++ b/contrib/libs/grpc/src/core/plugin_registry/grpc_plugin_registry.cc
@@ -60,6 +60,10 @@ void grpc_client_authority_filter_init(void);
void grpc_client_authority_filter_shutdown(void);
void grpc_workaround_cronet_compression_filter_init(void);
void grpc_workaround_cronet_compression_filter_shutdown(void);
+namespace grpc_core {
+void FaultInjectionFilterInit(void);
+void FaultInjectionFilterShutdown(void);
+} // namespace grpc_core
#ifndef GRPC_NO_XDS
namespace grpc_core {
@@ -68,16 +72,24 @@ void XdsClientGlobalShutdown();
} // namespace grpc_core
void grpc_certificate_provider_registry_init(void);
void grpc_certificate_provider_registry_shutdown(void);
+namespace grpc_core {
+void FileWatcherCertificateProviderInit();
+void FileWatcherCertificateProviderShutdown();
+} // namespace grpc_core
void grpc_lb_policy_cds_init(void);
void grpc_lb_policy_cds_shutdown(void);
-void grpc_lb_policy_eds_init(void);
-void grpc_lb_policy_eds_shutdown(void);
-void grpc_lb_policy_eds_drop_init(void);
-void grpc_lb_policy_eds_drop_shutdown(void);
+void grpc_lb_policy_xds_cluster_impl_init(void);
+void grpc_lb_policy_xds_cluster_impl_shutdown(void);
+void grpc_lb_policy_xds_cluster_resolver_init(void);
+void grpc_lb_policy_xds_cluster_resolver_shutdown(void);
void grpc_lb_policy_xds_cluster_manager_init(void);
void grpc_lb_policy_xds_cluster_manager_shutdown(void);
void grpc_resolver_xds_init(void);
void grpc_resolver_xds_shutdown(void);
+namespace grpc_core {
+void GoogleCloud2ProdResolverInit();
+void GoogleCloud2ProdResolverShutdown();
+}
#endif
void grpc_register_built_in_plugins(void) {
@@ -115,6 +127,8 @@ void grpc_register_built_in_plugins(void) {
grpc_max_age_filter_shutdown);
grpc_register_plugin(grpc_message_size_filter_init,
grpc_message_size_filter_shutdown);
+ grpc_register_plugin(grpc_core::FaultInjectionFilterInit,
+ grpc_core::FaultInjectionFilterShutdown);
grpc_register_plugin(grpc_service_config_channel_arg_filter_init,
grpc_service_config_channel_arg_filter_shutdown);
grpc_register_plugin(grpc_client_authority_filter_init,
@@ -126,15 +140,19 @@ void grpc_register_built_in_plugins(void) {
grpc_core::XdsClientGlobalShutdown);
grpc_register_plugin(grpc_certificate_provider_registry_init,
grpc_certificate_provider_registry_shutdown);
+ grpc_register_plugin(grpc_core::FileWatcherCertificateProviderInit,
+ grpc_core::FileWatcherCertificateProviderShutdown);
grpc_register_plugin(grpc_lb_policy_cds_init,
grpc_lb_policy_cds_shutdown);
- grpc_register_plugin(grpc_lb_policy_eds_init,
- grpc_lb_policy_eds_shutdown);
- grpc_register_plugin(grpc_lb_policy_eds_drop_init,
- grpc_lb_policy_eds_drop_shutdown);
+ grpc_register_plugin(grpc_lb_policy_xds_cluster_impl_init,
+ grpc_lb_policy_xds_cluster_impl_shutdown);
+ grpc_register_plugin(grpc_lb_policy_xds_cluster_resolver_init,
+ grpc_lb_policy_xds_cluster_resolver_shutdown);
grpc_register_plugin(grpc_lb_policy_xds_cluster_manager_init,
grpc_lb_policy_xds_cluster_manager_shutdown);
grpc_register_plugin(grpc_resolver_xds_init,
grpc_resolver_xds_shutdown);
+ grpc_register_plugin(grpc_core::GoogleCloud2ProdResolverInit,
+ grpc_core::GoogleCloud2ProdResolverShutdown);
#endif
}
diff --git a/contrib/libs/grpc/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc b/contrib/libs/grpc/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
index fd9bf9c14d5..5e7452936a1 100644
--- a/contrib/libs/grpc/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
+++ b/contrib/libs/grpc/src/core/plugin_registry/grpc_unsecure_plugin_registry.cc
@@ -54,6 +54,10 @@ void grpc_max_age_filter_init(void);
void grpc_max_age_filter_shutdown(void);
void grpc_message_size_filter_init(void);
void grpc_message_size_filter_shutdown(void);
+namespace grpc_core {
+void FaultInjectionFilterInit(void);
+void FaultInjectionFilterShutdown(void);
+} // namespace grpc_core
void grpc_service_config_channel_arg_filter_init(void);
void grpc_service_config_channel_arg_filter_shutdown(void);
void grpc_client_authority_filter_init(void);
@@ -96,6 +100,8 @@ void grpc_register_built_in_plugins(void) {
grpc_max_age_filter_shutdown);
grpc_register_plugin(grpc_message_size_filter_init,
grpc_message_size_filter_shutdown);
+ grpc_register_plugin(grpc_core::FaultInjectionFilterInit,
+ grpc_core::FaultInjectionFilterShutdown);
grpc_register_plugin(grpc_service_config_channel_arg_filter_init,
grpc_service_config_channel_arg_filter_shutdown);
grpc_register_plugin(grpc_client_authority_filter_init,
diff --git a/contrib/libs/grpc/src/core/tsi/alts/crypt/gsec.cc b/contrib/libs/grpc/src/core/tsi/alts/crypt/gsec.cc
index 6236591a97c..d4de9cdbff4 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/crypt/gsec.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/crypt/gsec.cc
@@ -43,8 +43,9 @@ grpc_status_code gsec_aead_crypter_encrypt(
char** error_details) {
if (crypter != nullptr && crypter->vtable != nullptr &&
crypter->vtable->encrypt_iovec != nullptr) {
- struct iovec aad_vec = {(void*)aad, aad_length};
- struct iovec plaintext_vec = {(void*)plaintext, plaintext_length};
+ struct iovec aad_vec = {const_cast<uint8_t*>(aad), aad_length};
+ struct iovec plaintext_vec = {const_cast<uint8_t*>(plaintext),
+ plaintext_length};
struct iovec ciphertext_vec = {ciphertext_and_tag,
ciphertext_and_tag_length};
return crypter->vtable->encrypt_iovec(
@@ -81,8 +82,8 @@ grpc_status_code gsec_aead_crypter_decrypt(
size_t plaintext_length, size_t* bytes_written, char** error_details) {
if (crypter != nullptr && crypter->vtable != nullptr &&
crypter->vtable->decrypt_iovec != nullptr) {
- struct iovec aad_vec = {(void*)aad, aad_length};
- struct iovec ciphertext_vec = {(void*)ciphertext_and_tag,
+ struct iovec aad_vec = {const_cast<uint8_t*>(aad), aad_length};
+ struct iovec ciphertext_vec = {const_cast<uint8_t*>(ciphertext_and_tag),
ciphertext_and_tag_length};
struct iovec plaintext_vec = {plaintext, plaintext_length};
return crypter->vtable->decrypt_iovec(
diff --git a/contrib/libs/grpc/src/core/tsi/alts/frame_protector/frame_handler.cc b/contrib/libs/grpc/src/core/tsi/alts/frame_protector/frame_handler.cc
index d3fda63b3dd..aa90bbc634a 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/frame_protector/frame_handler.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/frame_protector/frame_handler.cc
@@ -31,16 +31,18 @@
/* Use little endian to interpret a string of bytes as uint32_t. */
static uint32_t load_32_le(const unsigned char* buffer) {
- return (((uint32_t)buffer[3]) << 24) | (((uint32_t)buffer[2]) << 16) |
- (((uint32_t)buffer[1]) << 8) | ((uint32_t)buffer[0]);
+ return (static_cast<uint32_t>(buffer[3]) << 24) |
+ (static_cast<uint32_t>(buffer[2]) << 16) |
+ (static_cast<uint32_t>(buffer[1]) << 8) |
+ static_cast<uint32_t>(buffer[0]);
}
/* Store uint32_t as a string of little endian bytes. */
static void store_32_le(uint32_t value, unsigned char* buffer) {
- buffer[3] = (unsigned char)(value >> 24) & 0xFF;
- buffer[2] = (unsigned char)(value >> 16) & 0xFF;
- buffer[1] = (unsigned char)(value >> 8) & 0xFF;
- buffer[0] = (unsigned char)(value)&0xFF;
+ buffer[3] = static_cast<unsigned char>(value >> 24) & 0xFF;
+ buffer[2] = static_cast<unsigned char>(value >> 16) & 0xFF;
+ buffer[1] = static_cast<unsigned char>(value >> 8) & 0xFF;
+ buffer[0] = static_cast<unsigned char>(value) & 0xFF;
}
/* Frame writer implementation. */
diff --git a/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_handshaker_client.cc b/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_handshaker_client.cc
index e2f04f7310d..921de5fe3e7 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_handshaker_client.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_handshaker_client.cc
@@ -69,9 +69,9 @@ typedef struct alts_grpc_handshaker_client {
grpc_closure on_handshaker_service_resp_recv;
/* Buffers containing information to be sent (or received) to (or from) the
* handshaker service. */
- grpc_byte_buffer* send_buffer;
- grpc_byte_buffer* recv_buffer;
- grpc_status_code status;
+ grpc_byte_buffer* send_buffer = nullptr;
+ grpc_byte_buffer* recv_buffer = nullptr;
+ grpc_status_code status = GRPC_STATUS_OK;
/* Initial metadata to be received from handshaker service. */
grpc_metadata_array recv_initial_metadata;
/* A callback function provided by an application to be invoked when response
@@ -95,15 +95,15 @@ typedef struct alts_grpc_handshaker_client {
/** callback for receiving handshake call status */
grpc_closure on_status_received;
/** gRPC status code of handshake call */
- grpc_status_code handshake_status_code;
+ grpc_status_code handshake_status_code = GRPC_STATUS_OK;
/** gRPC status details of handshake call */
grpc_slice handshake_status_details;
/* mu synchronizes all fields below including their internal fields. */
- gpr_mu mu;
+ grpc_core::Mutex mu;
/* indicates if the handshaker call's RECV_STATUS_ON_CLIENT op is done. */
- bool receive_status_finished;
+ bool receive_status_finished = false;
/* if non-null, contains arguments to complete a TSI next callback. */
- recv_message_result* pending_recv_message_result;
+ recv_message_result* pending_recv_message_result = nullptr;
/* Maximum frame size used by frame protector. */
size_t max_frame_size;
} alts_grpc_handshaker_client;
@@ -117,10 +117,7 @@ static void handshaker_client_send_buffer_destroy(
static bool is_handshake_finished_properly(grpc_gcp_HandshakerResp* resp) {
GPR_ASSERT(resp != nullptr);
- if (grpc_gcp_HandshakerResp_result(resp)) {
- return true;
- }
- return false;
+ return grpc_gcp_HandshakerResp_result(resp) != nullptr;
}
static void alts_grpc_handshaker_client_unref(
@@ -140,8 +137,7 @@ static void alts_grpc_handshaker_client_unref(
grpc_alts_credentials_options_destroy(client->options);
gpr_free(client->buffer);
grpc_slice_unref_internal(client->handshake_status_details);
- gpr_mu_destroy(&client->mu);
- gpr_free(client);
+ delete client;
}
}
@@ -279,7 +275,7 @@ void alts_handshaker_client_handle_response(alts_handshaker_client* c,
if (code != GRPC_STATUS_OK) {
upb_strview details = grpc_gcp_HandshakerStatus_details(resp_status);
if (details.size > 0) {
- char* error_details = (char*)gpr_zalloc(details.size + 1);
+ char* error_details = static_cast<char*>(gpr_zalloc(details.size + 1));
memcpy(error_details, details.data, details.size);
gpr_log(GPR_ERROR, "Error from handshaker service:%s", error_details);
gpr_free(error_details);
@@ -695,24 +691,24 @@ alts_handshaker_client* alts_grpc_handshaker_client_create(
gpr_log(GPR_ERROR, "Invalid arguments to alts_handshaker_client_create()");
return nullptr;
}
- alts_grpc_handshaker_client* client =
- static_cast<alts_grpc_handshaker_client*>(gpr_zalloc(sizeof(*client)));
- gpr_mu_init(&client->mu);
+ alts_grpc_handshaker_client* client = new alts_grpc_handshaker_client();
+ memset(&client->base, 0, sizeof(client->base));
+ client->base.vtable =
+ vtable_for_testing == nullptr ? &vtable : vtable_for_testing;
gpr_ref_init(&client->refs, 1);
- client->grpc_caller = grpc_call_start_batch_and_execute;
client->handshaker = handshaker;
+ client->grpc_caller = grpc_call_start_batch_and_execute;
+ grpc_metadata_array_init(&client->recv_initial_metadata);
client->cb = cb;
client->user_data = user_data;
- client->send_buffer = nullptr;
- client->recv_buffer = nullptr;
client->options = grpc_alts_credentials_options_copy(options);
client->target_name = grpc_slice_copy(target_name);
- client->recv_bytes = grpc_empty_slice();
- grpc_metadata_array_init(&client->recv_initial_metadata);
client->is_client = is_client;
- client->max_frame_size = max_frame_size;
+ client->recv_bytes = grpc_empty_slice();
client->buffer_size = TSI_ALTS_INITIAL_BUFFER_SIZE;
client->buffer = static_cast<unsigned char*>(gpr_zalloc(client->buffer_size));
+ client->handshake_status_details = grpc_empty_slice();
+ client->max_frame_size = max_frame_size;
grpc_slice slice = grpc_slice_from_copied_string(handshaker_service_url);
client->call =
strcmp(handshaker_service_url, ALTS_HANDSHAKER_SERVICE_URL_FOR_TESTING) ==
@@ -722,8 +718,6 @@ alts_handshaker_client* alts_grpc_handshaker_client_create(
channel, nullptr, GRPC_PROPAGATE_DEFAULTS, interested_parties,
grpc_slice_from_static_string(ALTS_SERVICE_METHOD), &slice,
GRPC_MILLIS_INF_FUTURE, nullptr);
- client->base.vtable =
- vtable_for_testing == nullptr ? &vtable : vtable_for_testing;
GRPC_CLOSURE_INIT(&client->on_handshaker_service_resp_recv, grpc_cb, client,
grpc_schedule_on_exec_ctx);
GRPC_CLOSURE_INIT(&client->on_status_received, on_status_received, client,
diff --git a/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc b/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
index 01ef56157a5..60df0ce71f4 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc
@@ -48,23 +48,23 @@ struct alts_tsi_handshaker {
tsi_handshaker base;
grpc_slice target_name;
bool is_client;
- bool has_sent_start_message;
- bool has_created_handshaker_client;
+ bool has_sent_start_message = false;
+ bool has_created_handshaker_client = false;
char* handshaker_service_url;
grpc_pollset_set* interested_parties;
grpc_alts_credentials_options* options;
- alts_handshaker_client_vtable* client_vtable_for_testing;
- grpc_channel* channel;
+ alts_handshaker_client_vtable* client_vtable_for_testing = nullptr;
+ grpc_channel* channel = nullptr;
bool use_dedicated_cq;
// mu synchronizes all fields below. Note these are the
// only fields that can be concurrently accessed (due to
// potential concurrency of tsi_handshaker_shutdown and
// tsi_handshaker_next).
- gpr_mu mu;
- alts_handshaker_client* client;
+ grpc_core::Mutex mu;
+ alts_handshaker_client* client = nullptr;
// shutdown effectively follows base.handshake_shutdown,
// but is synchronized by the mutex of this object.
- bool shutdown;
+ bool shutdown = false;
// Maximum frame size used by frame protector.
size_t max_frame_size;
};
@@ -253,8 +253,8 @@ static const tsi_handshaker_result_vtable result_vtable = {
tsi_result alts_tsi_handshaker_result_create(grpc_gcp_HandshakerResp* resp,
bool is_client,
- tsi_handshaker_result** self) {
- if (self == nullptr || resp == nullptr) {
+ tsi_handshaker_result** result) {
+ if (result == nullptr || resp == nullptr) {
gpr_log(GPR_ERROR, "Invalid arguments to create_handshaker_result()");
return TSI_INVALID_ARGUMENT;
}
@@ -305,19 +305,19 @@ tsi_result alts_tsi_handshaker_result_create(grpc_gcp_HandshakerResp* resp,
grpc_gcp_Identity_service_account(local_identity);
// We don't check if local service account is empty here
// because local identity could be empty in certain situations.
- alts_tsi_handshaker_result* result =
- static_cast<alts_tsi_handshaker_result*>(gpr_zalloc(sizeof(*result)));
- result->key_data =
+ alts_tsi_handshaker_result* sresult =
+ static_cast<alts_tsi_handshaker_result*>(gpr_zalloc(sizeof(*sresult)));
+ sresult->key_data =
static_cast<char*>(gpr_zalloc(kAltsAes128GcmRekeyKeyLength));
- memcpy(result->key_data, key_data.data, kAltsAes128GcmRekeyKeyLength);
- result->peer_identity =
+ memcpy(sresult->key_data, key_data.data, kAltsAes128GcmRekeyKeyLength);
+ sresult->peer_identity =
static_cast<char*>(gpr_zalloc(peer_service_account.size + 1));
- memcpy(result->peer_identity, peer_service_account.data,
+ memcpy(sresult->peer_identity, peer_service_account.data,
peer_service_account.size);
- result->max_frame_size = grpc_gcp_HandshakerResult_max_frame_size(hresult);
+ sresult->max_frame_size = grpc_gcp_HandshakerResult_max_frame_size(hresult);
upb::Arena rpc_versions_arena;
bool serialized = grpc_gcp_rpc_protocol_versions_encode(
- peer_rpc_version, rpc_versions_arena.ptr(), &result->rpc_versions);
+ peer_rpc_version, rpc_versions_arena.ptr(), &sresult->rpc_versions);
if (!serialized) {
gpr_log(GPR_ERROR, "Failed to serialize peer's RPC protocol versions.");
return TSI_FAILED_PRECONDITION;
@@ -363,11 +363,11 @@ tsi_result alts_tsi_handshaker_result_create(grpc_gcp_HandshakerResp* resp,
gpr_log(GPR_ERROR, "Failed to serialize peer's ALTS context.");
return TSI_FAILED_PRECONDITION;
}
- result->serialized_context =
+ sresult->serialized_context =
grpc_slice_from_copied_buffer(serialized_ctx, serialized_ctx_length);
- result->is_client = is_client;
- result->base.vtable = &result_vtable;
- *self = &result->base;
+ sresult->is_client = is_client;
+ sresult->base.vtable = &result_vtable;
+ *result = &sresult->base;
return TSI_OK;
}
@@ -394,9 +394,10 @@ static void on_handshaker_service_resp_recv_dedicated(void* arg,
grpc_error* /*error*/) {
alts_shared_resource_dedicated* resource =
grpc_alts_get_shared_resource_dedicated();
- grpc_cq_end_op(resource->cq, arg, GRPC_ERROR_NONE,
- [](void* /*done_arg*/, grpc_cq_completion* /*storage*/) {},
- nullptr, &resource->storage);
+ grpc_cq_end_op(
+ resource->cq, arg, GRPC_ERROR_NONE,
+ [](void* /*done_arg*/, grpc_cq_completion* /*storage*/) {}, nullptr,
+ &resource->storage);
}
/* Returns TSI_OK if and only if no error is encountered. */
@@ -591,8 +592,7 @@ static void handshaker_destroy(tsi_handshaker* self) {
grpc_channel_destroy_internal(handshaker->channel);
}
gpr_free(handshaker->handshaker_service_url);
- gpr_mu_destroy(&handshaker->mu);
- gpr_free(handshaker);
+ delete handshaker;
}
static const tsi_handshaker_vtable handshaker_vtable = {
@@ -627,45 +627,41 @@ tsi_result alts_tsi_handshaker_create(
gpr_log(GPR_ERROR, "Invalid arguments to alts_tsi_handshaker_create()");
return TSI_INVALID_ARGUMENT;
}
- alts_tsi_handshaker* handshaker =
- static_cast<alts_tsi_handshaker*>(gpr_zalloc(sizeof(*handshaker)));
- gpr_mu_init(&handshaker->mu);
- handshaker->use_dedicated_cq = interested_parties == nullptr;
- handshaker->client = nullptr;
- handshaker->is_client = is_client;
- handshaker->has_sent_start_message = false;
+ bool use_dedicated_cq = interested_parties == nullptr;
+ alts_tsi_handshaker* handshaker = new alts_tsi_handshaker();
+ memset(&handshaker->base, 0, sizeof(handshaker->base));
+ handshaker->base.vtable =
+ use_dedicated_cq ? &handshaker_vtable_dedicated : &handshaker_vtable;
handshaker->target_name = target_name == nullptr
? grpc_empty_slice()
: grpc_slice_from_static_string(target_name);
- handshaker->interested_parties = interested_parties;
- handshaker->has_created_handshaker_client = false;
+ handshaker->is_client = is_client;
handshaker->handshaker_service_url = gpr_strdup(handshaker_service_url);
+ handshaker->interested_parties = interested_parties;
handshaker->options = grpc_alts_credentials_options_copy(options);
+ handshaker->use_dedicated_cq = use_dedicated_cq;
handshaker->max_frame_size = user_specified_max_frame_size != 0
? user_specified_max_frame_size
: kTsiAltsMaxFrameSize;
- handshaker->base.vtable = handshaker->use_dedicated_cq
- ? &handshaker_vtable_dedicated
- : &handshaker_vtable;
*self = &handshaker->base;
return TSI_OK;
}
-void alts_tsi_handshaker_result_set_unused_bytes(tsi_handshaker_result* self,
+void alts_tsi_handshaker_result_set_unused_bytes(tsi_handshaker_result* result,
grpc_slice* recv_bytes,
size_t bytes_consumed) {
- GPR_ASSERT(recv_bytes != nullptr && self != nullptr);
+ GPR_ASSERT(recv_bytes != nullptr && result != nullptr);
if (GRPC_SLICE_LENGTH(*recv_bytes) == bytes_consumed) {
return;
}
- alts_tsi_handshaker_result* result =
- reinterpret_cast<alts_tsi_handshaker_result*>(self);
- result->unused_bytes_size = GRPC_SLICE_LENGTH(*recv_bytes) - bytes_consumed;
- result->unused_bytes =
- static_cast<unsigned char*>(gpr_zalloc(result->unused_bytes_size));
- memcpy(result->unused_bytes,
+ alts_tsi_handshaker_result* sresult =
+ reinterpret_cast<alts_tsi_handshaker_result*>(result);
+ sresult->unused_bytes_size = GRPC_SLICE_LENGTH(*recv_bytes) - bytes_consumed;
+ sresult->unused_bytes =
+ static_cast<unsigned char*>(gpr_zalloc(sresult->unused_bytes_size));
+ memcpy(sresult->unused_bytes,
GRPC_SLICE_START_PTR(*recv_bytes) + bytes_consumed,
- result->unused_bytes_size);
+ sresult->unused_bytes_size);
}
namespace grpc_core {
diff --git a/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h b/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h
index e1ae985a84d..1c3605afc21 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h
+++ b/contrib/libs/grpc/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h
@@ -41,7 +41,7 @@ const size_t kTsiAltsNumOfPeerProperties = 5;
// Frame size negotiation extends send frame size range to
// [kTsiAltsMinFrameSize, kTsiAltsMaxFrameSize].
const size_t kTsiAltsMinFrameSize = 16 * 1024;
-const size_t kTsiAltsMaxFrameSize = 128 * 1024;
+const size_t kTsiAltsMaxFrameSize = 1024 * 1024;
typedef struct alts_tsi_handshaker alts_tsi_handshaker;
diff --git a/contrib/libs/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.cc b/contrib/libs/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.cc
index a0462b2d76c..402bf1313e0 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/handshaker/transport_security_common_api.cc
@@ -214,9 +214,7 @@ bool grpc_gcp_rpc_protocol_versions_check(
? &local_versions->min_rpc_version
: &peer_versions->min_rpc_version;
bool result = grpc_core::internal::grpc_gcp_rpc_protocol_version_compare(
- max_common_version, min_common_version) >= 0
- ? true
- : false;
+ max_common_version, min_common_version) >= 0;
if (result && highest_common_version != nullptr) {
memcpy(highest_common_version, max_common_version,
sizeof(grpc_gcp_rpc_protocol_versions_version));
diff --git a/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc b/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc
index 6a548e50dd4..26c18a45048 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc
@@ -56,16 +56,18 @@ static void maybe_append_error_msg(const char* appendix, char** dst) {
/* Use little endian to interpret a string of bytes as uint32_t. */
static uint32_t load_32_le(const unsigned char* buffer) {
- return (((uint32_t)buffer[3]) << 24) | (((uint32_t)buffer[2]) << 16) |
- (((uint32_t)buffer[1]) << 8) | ((uint32_t)buffer[0]);
+ return (static_cast<uint32_t>(buffer[3]) << 24) |
+ (static_cast<uint32_t>(buffer[2]) << 16) |
+ (static_cast<uint32_t>(buffer[1]) << 8) |
+ static_cast<uint32_t>(buffer[0]);
}
/* Store uint32_t as a string of little endian bytes. */
static void store_32_le(uint32_t value, unsigned char* buffer) {
- buffer[3] = (unsigned char)(value >> 24) & 0xFF;
- buffer[2] = (unsigned char)(value >> 16) & 0xFF;
- buffer[1] = (unsigned char)(value >> 8) & 0xFF;
- buffer[0] = (unsigned char)(value)&0xFF;
+ buffer[3] = static_cast<unsigned char>(value >> 24) & 0xFF;
+ buffer[2] = static_cast<unsigned char>(value >> 16) & 0xFF;
+ buffer[1] = static_cast<unsigned char>(value >> 8) & 0xFF;
+ buffer[0] = static_cast<unsigned char>(value) & 0xFF;
}
/* Ensures header and tag iovec have sufficient length. */
diff --git a/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc b/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
index 0cdf97465d0..e0ce64104c9 100644
--- a/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
+++ b/contrib/libs/grpc/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc
@@ -87,10 +87,10 @@ static bool read_frame_size(const grpc_slice_buffer* sb,
}
GPR_ASSERT(remaining == 0);
/* Gets little-endian frame size. */
- uint32_t frame_size = (((uint32_t)frame_size_buffer[3]) << 24) |
- (((uint32_t)frame_size_buffer[2]) << 16) |
- (((uint32_t)frame_size_buffer[1]) << 8) |
- ((uint32_t)frame_size_buffer[0]);
+ uint32_t frame_size = (static_cast<uint32_t>(frame_size_buffer[3]) << 24) |
+ (static_cast<uint32_t>(frame_size_buffer[2]) << 16) |
+ (static_cast<uint32_t>(frame_size_buffer[1]) << 8) |
+ static_cast<uint32_t>(frame_size_buffer[0]);
if (frame_size > kMaxFrameLength) {
gpr_log(GPR_ERROR, "Frame size is larger than maximum frame size");
return false;
diff --git a/contrib/libs/grpc/src/core/tsi/fake_transport_security.cc b/contrib/libs/grpc/src/core/tsi/fake_transport_security.cc
index 1b6b8ca07b4..5e63f11a2a4 100644
--- a/contrib/libs/grpc/src/core/tsi/fake_transport_security.cc
+++ b/contrib/libs/grpc/src/core/tsi/fake_transport_security.cc
@@ -474,12 +474,21 @@ static void fake_zero_copy_grpc_protector_destroy(
gpr_free(impl);
}
+static tsi_result fake_zero_copy_grpc_protector_max_frame_size(
+ tsi_zero_copy_grpc_protector* self, size_t* max_frame_size) {
+ if (self == nullptr || max_frame_size == nullptr) return TSI_INVALID_ARGUMENT;
+ tsi_fake_zero_copy_grpc_protector* impl =
+ reinterpret_cast<tsi_fake_zero_copy_grpc_protector*>(self);
+ *max_frame_size = impl->max_frame_size;
+ return TSI_OK;
+}
+
static const tsi_zero_copy_grpc_protector_vtable
zero_copy_grpc_protector_vtable = {
fake_zero_copy_grpc_protector_protect,
fake_zero_copy_grpc_protector_unprotect,
fake_zero_copy_grpc_protector_destroy,
- nullptr /* fake_zero_copy_grpc_protector_max_frame_size */
+ fake_zero_copy_grpc_protector_max_frame_size,
};
/* --- tsi_handshaker_result methods implementation. ---*/
@@ -490,7 +499,7 @@ struct fake_handshaker_result {
size_t unused_bytes_size;
};
static tsi_result fake_handshaker_result_extract_peer(
- const tsi_handshaker_result* self, tsi_peer* peer) {
+ const tsi_handshaker_result* /*self*/, tsi_peer* peer) {
/* Construct a tsi_peer with 1 property: certificate type, security_level. */
tsi_result result = tsi_construct_peer(2, peer);
if (result != TSI_OK) return result;
@@ -524,7 +533,8 @@ static tsi_result fake_handshaker_result_create_frame_protector(
static tsi_result fake_handshaker_result_get_unused_bytes(
const tsi_handshaker_result* self, const unsigned char** bytes,
size_t* bytes_size) {
- fake_handshaker_result* result = (fake_handshaker_result*)self;
+ fake_handshaker_result* result = reinterpret_cast<fake_handshaker_result*>(
+ const_cast<tsi_handshaker_result*>(self));
*bytes_size = result->unused_bytes_size;
*bytes = result->unused_bytes;
return TSI_OK;
@@ -577,11 +587,13 @@ static tsi_result fake_handshaker_get_bytes_to_send_to_peer(
}
if (!impl->outgoing_frame.needs_draining) {
tsi_fake_handshake_message next_message_to_send =
+ // NOLINTNEXTLINE(bugprone-misplaced-widening-cast)
static_cast<tsi_fake_handshake_message>(impl->next_message_to_send + 2);
const char* msg_string =
tsi_fake_handshake_message_to_string(impl->next_message_to_send);
- result = tsi_fake_frame_set_data((unsigned char*)msg_string,
- strlen(msg_string), &impl->outgoing_frame);
+ result = tsi_fake_frame_set_data(
+ reinterpret_cast<unsigned char*>(const_cast<char*>(msg_string)),
+ strlen(msg_string), &impl->outgoing_frame);
if (result != TSI_OK) return result;
if (next_message_to_send > TSI_FAKE_HANDSHAKE_MESSAGE_MAX) {
next_message_to_send = TSI_FAKE_HANDSHAKE_MESSAGE_MAX;
diff --git a/contrib/libs/grpc/src/core/tsi/local_transport_security.cc b/contrib/libs/grpc/src/core/tsi/local_transport_security.cc
index f7e004f4a7c..19043cd1a9a 100644
--- a/contrib/libs/grpc/src/core/tsi/local_transport_security.cc
+++ b/contrib/libs/grpc/src/core/tsi/local_transport_security.cc
@@ -31,6 +31,8 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/tsi/transport_security_grpc.h"
+namespace {
+
/* Main struct for local TSI zero-copy frame protector. */
typedef struct local_zero_copy_grpc_protector {
tsi_zero_copy_grpc_protector base;
@@ -197,7 +199,9 @@ static const tsi_handshaker_vtable handshaker_vtable = {
nullptr, /* shutdown */
};
-tsi_result local_tsi_handshaker_create(bool is_client, tsi_handshaker** self) {
+} // namespace
+
+tsi_result tsi_local_handshaker_create(bool is_client, tsi_handshaker** self) {
if (self == nullptr) {
gpr_log(GPR_ERROR, "Invalid arguments to local_tsi_handshaker_create()");
return TSI_INVALID_ARGUMENT;
diff --git a/contrib/libs/grpc/src/core/tsi/local_transport_security.h b/contrib/libs/grpc/src/core/tsi/local_transport_security.h
index 17213ecf35a..fb46c1ea892 100644
--- a/contrib/libs/grpc/src/core/tsi/local_transport_security.h
+++ b/contrib/libs/grpc/src/core/tsi/local_transport_security.h
@@ -30,12 +30,6 @@
#define TSI_LOCAL_PROCESS_ID_PEER_PROPERTY "process_id"
/**
- * Main struct for local TSI handshaker. All APIs in the header are
- * thread-comptabile.
- */
-typedef struct local_tsi_handshaker local_tsi_handshaker;
-
-/**
* This method creates a local TSI handshaker instance.
*
* - is_client: boolean value indicating if the handshaker is used at the client
@@ -45,7 +39,12 @@ typedef struct local_tsi_handshaker local_tsi_handshaker;
* method.
*
* It returns TSI_OK on success and an error status code on failure.
+ *
+ * This handshaker is also being used as a minimalist handshaker for insecure
+ * security connector. If this handshaker ever needs to do anything more that
+ * does not fit with an insecure connector, we would need to add a separate
+ * handshaker for insecure connectors.
*/
-tsi_result local_tsi_handshaker_create(bool is_client, tsi_handshaker** self);
+tsi_result tsi_local_handshaker_create(bool is_client, tsi_handshaker** self);
#endif /* GRPC_CORE_TSI_LOCAL_TRANSPORT_SECURITY_H */
diff --git a/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc b/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
index a77b17c5dd5..3883c39a563 100644
--- a/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
+++ b/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc
@@ -32,7 +32,7 @@ namespace {
class BoringSslCachedSession : public SslCachedSession {
public:
- BoringSslCachedSession(SslSessionPtr session)
+ explicit BoringSslCachedSession(SslSessionPtr session)
: session_(std::move(session)) {}
SslSessionPtr CopySession() const override {
diff --git a/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.cc b/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
index 6da4fb4ee1c..9254dcee5f6 100644
--- a/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
+++ b/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.cc
@@ -84,7 +84,6 @@ class SslSessionLRUCache::Node {
SslSessionLRUCache::SslSessionLRUCache(size_t capacity) : capacity_(capacity) {
GPR_ASSERT(capacity > 0);
- gpr_mu_init(&lock_);
entry_by_key_ = grpc_avl_create(&cache_avl_vtable);
}
@@ -96,7 +95,6 @@ SslSessionLRUCache::~SslSessionLRUCache() {
node = next;
}
grpc_avl_unref(entry_by_key_, nullptr);
- gpr_mu_destroy(&lock_);
}
size_t SslSessionLRUCache::Size() {
diff --git a/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.h b/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.h
index 5d91af7b18d..0aa3f1696c2 100644
--- a/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.h
+++ b/contrib/libs/grpc/src/core/tsi/ssl/session_cache/ssl_session_cache.h
@@ -31,6 +31,7 @@ extern "C" {
#include "src/core/lib/avl/avl.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/ref_counted.h"
+#include "src/core/lib/gprpp/sync.h"
#include "src/core/tsi/ssl/session_cache/ssl_session.h"
/// Cache for SSL sessions for sessions resumption.
@@ -53,7 +54,7 @@ class SslSessionLRUCache : public grpc_core::RefCounted<SslSessionLRUCache> {
// Use Create function instead of using this directly.
explicit SslSessionLRUCache(size_t capacity);
- ~SslSessionLRUCache();
+ ~SslSessionLRUCache() override;
// Not copyable nor movable.
SslSessionLRUCache(const SslSessionLRUCache&) = delete;
@@ -76,7 +77,7 @@ class SslSessionLRUCache : public grpc_core::RefCounted<SslSessionLRUCache> {
void PushFront(Node* node);
void AssertInvariants();
- gpr_mu lock_;
+ grpc_core::Mutex lock_;
size_t capacity_;
Node* use_order_list_head_ = nullptr;
diff --git a/contrib/libs/grpc/src/core/tsi/ssl_transport_security.cc b/contrib/libs/grpc/src/core/tsi/ssl_transport_security.cc
index 374f8e583ff..f3b2eb76342 100644
--- a/contrib/libs/grpc/src/core/tsi/ssl_transport_security.cc
+++ b/contrib/libs/grpc/src/core/tsi/ssl_transport_security.cc
@@ -138,7 +138,7 @@ struct tsi_ssl_frame_protector {
static gpr_once g_init_openssl_once = GPR_ONCE_INIT;
static int g_ssl_ctx_ex_factory_index = -1;
static const unsigned char kSslSessionIdContext[] = {'g', 'r', 'p', 'c'};
-#ifndef OPENSSL_IS_BORINGSSL
+#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
static const char kSslEnginePrefix[] = "engine:";
#endif
@@ -347,8 +347,7 @@ static tsi_result add_pem_certificate(X509* cert, tsi_peer_property* property) {
return TSI_INTERNAL_ERROR;
}
tsi_result result = tsi_construct_string_peer_property(
- TSI_X509_PEM_CERT_PROPERTY, (const char*)contents,
- static_cast<size_t>(len), property);
+ TSI_X509_PEM_CERT_PROPERTY, contents, static_cast<size_t>(len), property);
BIO_free(bio);
return result;
}
@@ -420,6 +419,10 @@ static tsi_result add_subject_alt_names_properties_to_peer(
result = tsi_construct_string_peer_property_from_cstring(
TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, name,
&peer->properties[(*current_insert_index)++]);
+ } else {
+ result = tsi_construct_string_peer_property_from_cstring(
+ TSI_X509_SUBJECT_ALTERNATIVE_NAME_PEER_PROPERTY, "other types of SAN",
+ &peer->properties[(*current_insert_index)++]);
}
if (result != TSI_OK) break;
}
@@ -473,7 +476,7 @@ static tsi_result peer_from_x509(X509* cert, int include_certificate_type,
&current_insert_index);
if (result != TSI_OK) break;
}
- } while (0);
+ } while (false);
if (subject_alt_names != nullptr) {
sk_GENERAL_NAME_pop_free(subject_alt_names, GENERAL_NAME_free);
@@ -557,12 +560,12 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context,
X509* certificate = nullptr;
BIO* pem;
GPR_ASSERT(pem_cert_chain_size <= INT_MAX);
- pem = BIO_new_mem_buf((void*)pem_cert_chain,
- static_cast<int>(pem_cert_chain_size));
+ pem = BIO_new_mem_buf(pem_cert_chain, static_cast<int>(pem_cert_chain_size));
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
do {
- certificate = PEM_read_bio_X509_AUX(pem, nullptr, nullptr, (void*)"");
+ certificate =
+ PEM_read_bio_X509_AUX(pem, nullptr, nullptr, const_cast<char*>(""));
if (certificate == nullptr) {
result = TSI_INVALID_ARGUMENT;
break;
@@ -571,9 +574,9 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context,
result = TSI_INVALID_ARGUMENT;
break;
}
- while (1) {
+ while (true) {
X509* certificate_authority =
- PEM_read_bio_X509(pem, nullptr, nullptr, (void*)"");
+ PEM_read_bio_X509(pem, nullptr, nullptr, const_cast<char*>(""));
if (certificate_authority == nullptr) {
ERR_clear_error();
break; /* Done reading. */
@@ -588,14 +591,14 @@ static tsi_result ssl_ctx_use_certificate_chain(SSL_CTX* context,
though.
*/
}
- } while (0);
+ } while (false);
if (certificate != nullptr) X509_free(certificate);
BIO_free(pem);
return result;
}
-#ifndef OPENSSL_IS_BORINGSSL
+#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
static tsi_result ssl_ctx_use_engine_private_key(SSL_CTX* context,
const char* pem_key,
size_t pem_key_size) {
@@ -668,7 +671,7 @@ static tsi_result ssl_ctx_use_engine_private_key(SSL_CTX* context,
if (engine_name != nullptr) gpr_free(engine_name);
return result;
}
-#endif /* OPENSSL_IS_BORINGSSL */
+#endif /* !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE) */
static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
const char* pem_key,
@@ -677,10 +680,11 @@ static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
EVP_PKEY* private_key = nullptr;
BIO* pem;
GPR_ASSERT(pem_key_size <= INT_MAX);
- pem = BIO_new_mem_buf((void*)pem_key, static_cast<int>(pem_key_size));
+ pem = BIO_new_mem_buf(pem_key, static_cast<int>(pem_key_size));
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
do {
- private_key = PEM_read_bio_PrivateKey(pem, nullptr, nullptr, (void*)"");
+ private_key =
+ PEM_read_bio_PrivateKey(pem, nullptr, nullptr, const_cast<char*>(""));
if (private_key == nullptr) {
result = TSI_INVALID_ARGUMENT;
break;
@@ -689,7 +693,7 @@ static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
result = TSI_INVALID_ARGUMENT;
break;
}
- } while (0);
+ } while (false);
if (private_key != nullptr) EVP_PKEY_free(private_key);
BIO_free(pem);
return result;
@@ -699,11 +703,11 @@ static tsi_result ssl_ctx_use_pem_private_key(SSL_CTX* context,
static tsi_result ssl_ctx_use_private_key(SSL_CTX* context, const char* pem_key,
size_t pem_key_size) {
// BoringSSL does not have ENGINE support
-#ifndef OPENSSL_IS_BORINGSSL
+#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
if (strncmp(pem_key, kSslEnginePrefix, strlen(kSslEnginePrefix)) == 0) {
return ssl_ctx_use_engine_private_key(context, pem_key, pem_key_size);
} else
-#endif /* OPENSSL_IS_BORINGSSL */
+#endif /* !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE) */
{
return ssl_ctx_use_pem_private_key(context, pem_key, pem_key_size);
}
@@ -721,7 +725,7 @@ static tsi_result x509_store_load_certs(X509_STORE* cert_store,
X509_NAME* root_name = nullptr;
BIO* pem;
GPR_ASSERT(pem_roots_size <= INT_MAX);
- pem = BIO_new_mem_buf((void*)pem_roots, static_cast<int>(pem_roots_size));
+ pem = BIO_new_mem_buf(pem_roots, static_cast<int>(pem_roots_size));
if (cert_store == nullptr) return TSI_INVALID_ARGUMENT;
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
if (root_names != nullptr) {
@@ -729,8 +733,8 @@ static tsi_result x509_store_load_certs(X509_STORE* cert_store,
if (*root_names == nullptr) return TSI_OUT_OF_RESOURCES;
}
- while (1) {
- root = PEM_read_bio_X509_AUX(pem, nullptr, nullptr, (void*)"");
+ while (true) {
+ root = PEM_read_bio_X509_AUX(pem, nullptr, nullptr, const_cast<char*>(""));
if (root == nullptr) {
ERR_clear_error();
break; /* We're at the end of stream. */
@@ -840,10 +844,10 @@ tsi_result tsi_ssl_extract_x509_subject_names_from_pem_cert(
tsi_result result = TSI_OK;
X509* cert = nullptr;
BIO* pem;
- pem = BIO_new_mem_buf((void*)pem_cert, static_cast<int>(strlen(pem_cert)));
+ pem = BIO_new_mem_buf(pem_cert, static_cast<int>(strlen(pem_cert)));
if (pem == nullptr) return TSI_OUT_OF_RESOURCES;
- cert = PEM_read_bio_X509(pem, nullptr, nullptr, (void*)"");
+ cert = PEM_read_bio_X509(pem, nullptr, nullptr, const_cast<char*>(""));
if (cert == nullptr) {
gpr_log(GPR_ERROR, "Invalid certificate");
result = TSI_INVALID_ARGUMENT;
@@ -913,12 +917,18 @@ static tsi_result tsi_set_min_and_max_tls_versions(
return TSI_INVALID_ARGUMENT;
}
#if OPENSSL_VERSION_NUMBER >= 0x10100000
- // Set the min TLS version of the SSL context.
+ // Set the min TLS version of the SSL context if using OpenSSL version
+ // >= 1.1.0. This OpenSSL version is required because the
+ // |SSL_CTX_set_min_proto_version| and |SSL_CTX_set_max_proto_version| APIs
+ // only exist in this version range.
switch (min_tls_version) {
case tsi_tls_version::TSI_TLS1_2:
SSL_CTX_set_min_proto_version(ssl_context, TLS1_2_VERSION);
break;
#if defined(TLS1_3_VERSION)
+ // If the library does not support TLS 1.3 and the caller requests a minimum
+ // of TLS 1.3, then return an error because the caller's request cannot be
+ // satisfied.
case tsi_tls_version::TSI_TLS1_3:
SSL_CTX_set_min_proto_version(ssl_context, TLS1_3_VERSION);
break;
@@ -927,16 +937,21 @@ static tsi_result tsi_set_min_and_max_tls_versions(
gpr_log(GPR_INFO, "TLS version is not supported.");
return TSI_FAILED_PRECONDITION;
}
+
// Set the max TLS version of the SSL context.
switch (max_tls_version) {
case tsi_tls_version::TSI_TLS1_2:
SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION);
break;
-#if defined(TLS1_3_VERSION)
case tsi_tls_version::TSI_TLS1_3:
+#if defined(TLS1_3_VERSION)
SSL_CTX_set_max_proto_version(ssl_context, TLS1_3_VERSION);
- break;
+#else
+ // If the library does not support TLS 1.3, then set the max TLS version
+ // to TLS 1.2 instead.
+ SSL_CTX_set_max_proto_version(ssl_context, TLS1_2_VERSION);
#endif
+ break;
default:
gpr_log(GPR_INFO, "TLS version is not supported.");
return TSI_FAILED_PRECONDITION;
@@ -1153,11 +1168,11 @@ static const tsi_frame_protector_vtable frame_protector_vtable = {
/* --- tsi_server_handshaker_factory methods implementation. --- */
static void tsi_ssl_handshaker_factory_destroy(
- tsi_ssl_handshaker_factory* self) {
- if (self == nullptr) return;
+ tsi_ssl_handshaker_factory* factory) {
+ if (factory == nullptr) return;
- if (self->vtable != nullptr && self->vtable->destroy != nullptr) {
- self->vtable->destroy(self);
+ if (factory->vtable != nullptr && factory->vtable->destroy != nullptr) {
+ factory->vtable->destroy(factory);
}
/* Note, we don't free(self) here because this object is always directly
* embedded in another object. If tsi_ssl_handshaker_factory_init allocates
@@ -1165,17 +1180,18 @@ static void tsi_ssl_handshaker_factory_destroy(
}
static tsi_ssl_handshaker_factory* tsi_ssl_handshaker_factory_ref(
- tsi_ssl_handshaker_factory* self) {
- if (self == nullptr) return nullptr;
- gpr_refn(&self->refcount, 1);
- return self;
+ tsi_ssl_handshaker_factory* factory) {
+ if (factory == nullptr) return nullptr;
+ gpr_refn(&factory->refcount, 1);
+ return factory;
}
-static void tsi_ssl_handshaker_factory_unref(tsi_ssl_handshaker_factory* self) {
- if (self == nullptr) return;
+static void tsi_ssl_handshaker_factory_unref(
+ tsi_ssl_handshaker_factory* factory) {
+ if (factory == nullptr) return;
- if (gpr_unref(&self->refcount)) {
- tsi_ssl_handshaker_factory_destroy(self);
+ if (gpr_unref(&factory->refcount)) {
+ tsi_ssl_handshaker_factory_destroy(factory);
}
}
@@ -1209,8 +1225,8 @@ tsi_result tsi_ssl_get_cert_chain_contents(STACK_OF(X509) * peer_chain,
return TSI_INTERNAL_ERROR;
}
tsi_result result = tsi_construct_string_peer_property(
- TSI_X509_PEM_CERT_CHAIN_PROPERTY, (const char*)contents,
- static_cast<size_t>(len), property);
+ TSI_X509_PEM_CERT_CHAIN_PROPERTY, contents, static_cast<size_t>(len),
+ property);
BIO_free(bio);
return result;
}
@@ -1685,16 +1701,17 @@ static int select_protocol_list(const unsigned char** out,
/* --- tsi_ssl_client_handshaker_factory methods implementation. --- */
tsi_result tsi_ssl_client_handshaker_factory_create_handshaker(
- tsi_ssl_client_handshaker_factory* self, const char* server_name_indication,
- tsi_handshaker** handshaker) {
- return create_tsi_ssl_handshaker(self->ssl_context, 1, server_name_indication,
- &self->base, handshaker);
+ tsi_ssl_client_handshaker_factory* factory,
+ const char* server_name_indication, tsi_handshaker** handshaker) {
+ return create_tsi_ssl_handshaker(factory->ssl_context, 1,
+ server_name_indication, &factory->base,
+ handshaker);
}
void tsi_ssl_client_handshaker_factory_unref(
- tsi_ssl_client_handshaker_factory* self) {
- if (self == nullptr) return;
- tsi_ssl_handshaker_factory_unref(&self->base);
+ tsi_ssl_client_handshaker_factory* factory) {
+ if (factory == nullptr) return;
+ tsi_ssl_handshaker_factory_unref(&factory->base);
}
static void tsi_ssl_client_handshaker_factory_destroy(
@@ -1713,7 +1730,7 @@ static int client_handshaker_factory_npn_callback(
const unsigned char* in, unsigned int inlen, void* arg) {
tsi_ssl_client_handshaker_factory* factory =
static_cast<tsi_ssl_client_handshaker_factory*>(arg);
- return select_protocol_list((const unsigned char**)out, outlen,
+ return select_protocol_list(const_cast<const unsigned char**>(out), outlen,
factory->alpn_protocol_list,
factory->alpn_protocol_list_length, in, inlen);
}
@@ -1721,18 +1738,18 @@ static int client_handshaker_factory_npn_callback(
/* --- tsi_ssl_server_handshaker_factory methods implementation. --- */
tsi_result tsi_ssl_server_handshaker_factory_create_handshaker(
- tsi_ssl_server_handshaker_factory* self, tsi_handshaker** handshaker) {
- if (self->ssl_context_count == 0) return TSI_INVALID_ARGUMENT;
+ tsi_ssl_server_handshaker_factory* factory, tsi_handshaker** handshaker) {
+ if (factory->ssl_context_count == 0) return TSI_INVALID_ARGUMENT;
/* Create the handshaker with the first context. We will switch if needed
because of SNI in ssl_server_handshaker_factory_servername_callback. */
- return create_tsi_ssl_handshaker(self->ssl_contexts[0], 0, nullptr,
- &self->base, handshaker);
+ return create_tsi_ssl_handshaker(factory->ssl_contexts[0], 0, nullptr,
+ &factory->base, handshaker);
}
void tsi_ssl_server_handshaker_factory_unref(
- tsi_ssl_server_handshaker_factory* self) {
- if (self == nullptr) return;
- tsi_ssl_handshaker_factory_unref(&self->base);
+ tsi_ssl_server_handshaker_factory* factory) {
+ if (factory == nullptr) return;
+ tsi_ssl_handshaker_factory_unref(&factory->base);
}
static void tsi_ssl_server_handshaker_factory_destroy(
@@ -1972,7 +1989,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
SSL_CTX_set_next_proto_select_cb(
ssl_context, client_handshaker_factory_npn_callback, impl);
}
- } while (0);
+ } while (false);
if (result != TSI_OK) {
tsi_ssl_handshaker_factory_unref(&impl->base);
return result;
@@ -2159,7 +2176,7 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
SSL_CTX_set_next_protos_advertised_cb(
impl->ssl_contexts[i],
server_handshaker_factory_npn_advertised_callback, impl);
- } while (0);
+ } while (false);
if (result != TSI_OK) {
tsi_ssl_handshaker_factory_unref(&impl->base);
diff --git a/contrib/libs/grpc/src/core/tsi/ssl_transport_security.h b/contrib/libs/grpc/src/core/tsi/ssl_transport_security.h
index 2f2dc08c053..c277cfc3479 100644
--- a/contrib/libs/grpc/src/core/tsi/ssl_transport_security.h
+++ b/contrib/libs/grpc/src/core/tsi/ssl_transport_security.h
@@ -181,7 +181,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
tsi_ssl_client_handshaker_factory** factory);
/* Creates a client handshaker.
- - self is the factory from which the handshaker will be created.
+ - factory is the factory from which the handshaker will be created.
- server_name_indication indicates the name of the server the client is
trying to connect to which will be relayed to the server using the SNI
extension.
@@ -190,8 +190,8 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
- This method returns TSI_OK on success or TSI_INVALID_PARAMETER in the case
where a parameter is invalid. */
tsi_result tsi_ssl_client_handshaker_factory_create_handshaker(
- tsi_ssl_client_handshaker_factory* self, const char* server_name_indication,
- tsi_handshaker** handshaker);
+ tsi_ssl_client_handshaker_factory* factory,
+ const char* server_name_indication, tsi_handshaker** handshaker);
/* Decrements reference count of the handshaker factory. Handshaker factory will
* be destroyed once no references exist. */
@@ -312,18 +312,18 @@ tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
tsi_ssl_server_handshaker_factory** factory);
/* Creates a server handshaker.
- - self is the factory from which the handshaker will be created.
+ - factory is the factory from which the handshaker will be created.
- handshaker is the address of the handshaker pointer to be created.
- This method returns TSI_OK on success or TSI_INVALID_PARAMETER in the case
where a parameter is invalid. */
tsi_result tsi_ssl_server_handshaker_factory_create_handshaker(
- tsi_ssl_server_handshaker_factory* self, tsi_handshaker** handshaker);
+ tsi_ssl_server_handshaker_factory* factory, tsi_handshaker** handshaker);
/* Decrements reference count of the handshaker factory. Handshaker factory will
* be destroyed once no references exist. */
void tsi_ssl_server_handshaker_factory_unref(
- tsi_ssl_server_handshaker_factory* self);
+ tsi_ssl_server_handshaker_factory* factory);
/* Util that checks that an ssl peer matches a specific name.
Still TODO(jboeuf):
diff --git a/contrib/libs/grpc/src/core/tsi/test_creds/README b/contrib/libs/grpc/src/core/tsi/test_creds/README
index ee9b60ec590..cc0b7694ee0 100644
--- a/contrib/libs/grpc/src/core/tsi/test_creds/README
+++ b/contrib/libs/grpc/src/core/tsi/test_creds/README
@@ -36,6 +36,32 @@ common name which is set to testclient.
$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client.csr \
-out client.pem -days 3650
+client1 is issued by CA:
+-----------------------
+
+$ openssl genrsa -out client1.key.rsa 2048
+$ openssl pkcs8 -topk8 -in client1.key.rsa -out client1.key -nocrypt
+$ openssl req -new -key client1.key -out client1.csr
+
+When prompted for certificate information, everything is default except the
+common name which is set to testclient1.
+
+$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client1.csr \
+ -out client1.pem -days 3650
+
+client2 is issued by CA:
+-----------------------
+
+$ openssl genrsa -out client2.key.rsa 2048
+$ openssl pkcs8 -topk8 -in client2.key.rsa -out client2.key -nocrypt
+$ openssl req -new -key client2.key -out client2.csr
+
+When prompted for certificate information, everything is default except the
+common name which is set to testclient2.
+
+$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in client2.csr \
+ -out client2.pem -days 3650
+
server0 is issued by CA:
------------------------
@@ -62,7 +88,8 @@ common name which is set to *.test.google.com.
$ openssl x509 -req -CA ca.pem -CAkey ca.key -CAcreateserial -in server1.csr \
-out server1.pem -extensions req_ext -extfile server1-openssl.cnf -days 3650
-multi-domain is a self-signed certificate having multiple subject alternative names:
+multi-domain is a self-signed certificate having multiple subject alternative
+names:
----------------------------------------------------------------------------
$ openssl genrsa -out multi-domain.key.rsa 2048
@@ -81,7 +108,7 @@ $ rm ca.srl
Sync up with other repositories
===============================
-Copies of these keys (except for multi-domain) exist in multiple locations across all the grpc repos
+Copies of these keys exist in multiple locations across all the grpc repos
(e.g., see the following partial list). You need to be careful when updating
the keys.
@@ -97,3 +124,10 @@ src/python/grpcio_tests/tests/interop/credentials/
src/python/grpcio_tests/tests/unit/credentials/
src/ruby/spec/testdata/
test/core/end2end/data/
+
+The following keys/certs are not distributed through multiple grpc repos yet,
+since they are only used in grpc core tests:
+
+multi-domain.*
+client1.*
+client2.*
diff --git a/contrib/libs/grpc/src/core/tsi/test_creds/client1.key b/contrib/libs/grpc/src/core/tsi/test_creds/client1.key
new file mode 100644
index 00000000000..c37df79f31d
--- /dev/null
+++ b/contrib/libs/grpc/src/core/tsi/test_creds/client1.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQD0d1XmFuS1iwBQ
+wzGnGhA/ovsFp5jTF0v+aJptNKcwQzlMCkbpBtkVB2SFcsgWew0qtQH57E4iS8pe
+gdW5JO6Jgl04aFuVDU2gKYRUB2pXQYObw9GZ6k8SyvDWfZIpTj+qCQ25zQ1/CzgD
+b9FKPBPXaIuW8eiYZJwPoOlhBX+RxAfKt79/Ilj2V9JnWi5wH6kRKbfZYg/usKT/
+lfHtlxZ8TdORqVFncnMxoxPTEwLwbqYaUyW6x3kqoFjixdYDuEkOIVoHs/+SBp1H
+fRKpfnyErQkd3YcjQm0JgjqCG4+hFNb2HfEUfCSeeWHhAD/S4r1s3sepCm71/huU
+GmO7IV2VAgMBAAECggEARy/o55OLDgJoGRx9/Pbt/FntVvwy2GVUT8UOEvbeKIOq
+z6W+eGTyGdmJQALomQNEFkeXR7u0FPCVAWg1YDCM9aXsl1xsLr8s95KfYgi2wqnl
+NRqUkolUdVh7QTpXsYeDqnPwd0Zqw6/0o6uP+ln8PSHIZDAVVysU9sgYrZP4Te2B
+0l5lmmBp8wRtKjZqhQPPuEhW3UETYRWK0QK3siVsnQJrH4k7Sys7AEnMP5NWewBC
+R79DQL7eHPX19H/7vBY2cAI8e51yhcT2b+tK6oMn/Xg/sHelVs/uRmShSxwo0eya
+Du9oXbV1h3DoIRP2rC1aXQ67sMJQvQvINV8jRgIHkQKBgQD9Mo2XrCWK9W+qFc67
+9MeKX8LG0pz7ORJnx7sORYfsIbfhD5/u22K9RuaHrPoLcjTNXKvQHR54fGJFevaL
+h7X+MrXYxtgCIOQeebdHgkb//Px4VqUOoTOz3YfZ754M6S2x2Nf/eqvTSd1hjxKa
+L4FHVe65/7ENmLiFTbmTMFNTtwKBgQD3LAq2b3q8CTEhF9CaFrSCHnyvKtQYtGzg
+JE2ZfX5qAz6JlM/hOiVprRLEk/5g88519Q+odoPwzOFDSeWAhD7/tPA/OtLkqaSc
+reB6Gytu//yVKyPJ0eIDFKbWMWeDEObSwZtEwUf78wcABm5SMuoKC3C2y/woOke3
+a3bb9LUREwKBgHU5YICmPMN3Gnm+mvY+P9v6tezjOba+F51gxWO4IVPb0Iwsdbla
+bP6Awt5x4VpHR9cEXq99q8vQmpbcdSTocgP8amCwvvVNURAi/g3nbQO7lxAH3WdG
+ju9pUyo9XAlSM8uxP1+S5dZuzkYKvWwRLmNej6YhkVFgMZ3V/GL+7rVFAoGAaQ0Q
+6ITs9yo49UW35SWtRnhKqfBcALv+Yi1LxeauacRDOhpDWAhsikOC7IWx4eb9Yujq
+5MCqRxfszbqEjmCmnet7CISpyYHIcsb71ynhBeZKpeOV7FsF4iVO205YHj56vCyJ
+H2m+fHjICtyw2sLE8cv29dowq7BJds130PhqVH0CgYA3rlDMoCZiSKARwJr0/D6d
+B3ez0ZpxKbIHHB7e+T5PFll607I+F+S6IpPfKab3CZQiG/5H/7WFXda1t+rkdayM
+QKYvAk8Z8DdDDtdF6GygQq6kq5L54H8w+hcAhPA/AFvGM+59HBOkXlbF1ONmrH2D
+btxOGV07JxZEj0IlBMYIaA==
+-----END PRIVATE KEY-----
diff --git a/contrib/libs/grpc/src/core/tsi/test_creds/client1.pem b/contrib/libs/grpc/src/core/tsi/test_creds/client1.pem
new file mode 100644
index 00000000000..c616b310dd4
--- /dev/null
+++ b/contrib/libs/grpc/src/core/tsi/test_creds/client1.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDODCCAiACFDrXOoJ6yF2DsFledztcRyjY+3BcMA0GCSqGSIb3DQEBCwUAMFYx
+CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl
+cm5ldCBXaWRnaXRzIFB0eSBMdGQxDzANBgNVBAMMBnRlc3RjYTAeFw0yMDEyMDEy
+MzE2MTFaFw0zMDExMjkyMzE2MTFaMFsxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApT
+b21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxFDAS
+BgNVBAMMC3Rlc3RjbGllbnQxMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEA9HdV5hbktYsAUMMxpxoQP6L7BaeY0xdL/miabTSnMEM5TApG6QbZFQdkhXLI
+FnsNKrUB+exOIkvKXoHVuSTuiYJdOGhblQ1NoCmEVAdqV0GDm8PRmepPEsrw1n2S
+KU4/qgkNuc0Nfws4A2/RSjwT12iLlvHomGScD6DpYQV/kcQHyre/fyJY9lfSZ1ou
+cB+pESm32WIP7rCk/5Xx7ZcWfE3TkalRZ3JzMaMT0xMC8G6mGlMlusd5KqBY4sXW
+A7hJDiFaB7P/kgadR30SqX58hK0JHd2HI0JtCYI6ghuPoRTW9h3xFHwknnlh4QA/
+0uK9bN7HqQpu9f4blBpjuyFdlQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQAbJTrl
+e8OAQJMrB9utPrCemvV2xC3aK/jtKLOrJ/7n6Atf7Zd5cymfbK2XAGWUiUePvF06
+MlN5AJpN4ujQOB0y+UYS8y/58VGCC9UJnQLo5UATE8w5cAIq5j91vuW9roE/UU4x
+jSZ5kjKOPjOpAjbKM5Dp4WVff9/veve+gA+nXA8Xv7Hn0vCLcjdRpFPEfvgp66qP
+E+tpeRWOu6fggxtTlAK68HMkQqKpb6R+obMePzxiAAgGiy4o6RvsHLA0iuViqHuE
+mu8cmPbEvWxwzTthkZEj2ekdLKecFN4ub4suZyAF85mz2SI7D0p4C8M46VIhWq6i
+bBfU/DCPHpZpcVIl
+-----END CERTIFICATE-----
diff --git a/contrib/libs/grpc/src/core/tsi/test_creds/client2.key b/contrib/libs/grpc/src/core/tsi/test_creds/client2.key
new file mode 100644
index 00000000000..613c47ac9a7
--- /dev/null
+++ b/contrib/libs/grpc/src/core/tsi/test_creds/client2.key
@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQClO55XKwBIEnTa
+KeclFa6l3Bc3G4lMdDa+JdCi3x+5KYlBN9NJth5z7Pj6Nrv/bpm4g69qhVV2sIjJ
+4XeEeObLY+0cadU58hdPXlhWHoMJst5uU+DkV0yjPwvLkmhsRj0RPicV+2qV6Scq
+zQDqXMMx8jyhhExkZBeOz1xCGR4Abo1zdpNfusZJ3GsFGQwqxwdK/l4dIkyLqtxp
+IS+vSsYeAMyuVZJHD61u7YiZasREyrFqkkSyDPGeCR3k6+4ajwfz1rVMITP5EZJ2
+pUdvdRgke7Okpwanf8og9LF5AaJz53yuUBVz40O/3whI7J4e+D3i5V5JGftLl0/V
+xJDdHrU1AgMBAAECggEATQ701Wo0g2g4HtaT+fOWs7tlCEpLSeCY9yzjlFHClbQN
+UuEaJLJOmXnW07pbCtEl16tyT5dHOEc0RBJmjt1jpU9A8ZNZ4eBJhrZVNDSeoBNP
+MNzlcRhVoXxxn8rz8CsBp9z4lYPfPXKy1X8uAh6o2c5DAICWr+sOIYgLWrgkCcbF
+QxP5cRs53nFwImnOJka7sxgUvQNW74Zto3WByCQ3QkFDQEOMEFPP2v5J0AiZTuIC
+nFfB1/O2YByKOUjhA+7ZYX/3qSXRrC7VW4kaMl1fVABccUCWhPdc9u+xz+m2fWnQ
+ZZXeTbgNbhykldz6J6JmKnDtIdj5WfdNTdLSDGgasQKBgQDTBwW/y7NT0r+IJEOF
+hbxN2XtB+i2VDVoeS0TYpJFMZfufXkBc331jyQid/8yusPjYW31n5vHYopDydsde
+NGAdCfjtBFawVGPYvbTgXSrB5n120merdHQ6TFmp7QhjHU5ds7N8ihh1OQfkBw/6
+UUaHVn3sBAKOLYbcCvGin7FuFwKBgQDIcjFmajYPHQ+yom8zn1bCvfgJ1aEXsP6m
+PxHeP4JeBjaD1ukuq+LUGCgViDWCO8c/j1AcnrNihh2oP7brY+xEqpm6IfQI79KZ
+kp++ybm4w6yvuYNnWR9yXJc0LTrTu4IOMuDpbPBFT9gGDLZYYc7yT8U55NGC3ry7
+tv0lZKQykwKBgQCjUf8IFj3etO+ZDP/Y+cznr1aulFHs1p2VbomE5bCyIQehqs9D
+UZB4xuDNb2jZFoww3nXrERjBoeduT7Ey3nQ4ZTxrK31wEJAJ8aBoOJLb6GfXqzWi
+w4kkiWynj5R7KPY6nNZfn30YVCAgQbsC7x4Xpj/khqH3qZKDAFFMnC001wKBgCTA
+Sy5r6t16hpZKEfl1DYNHMWMcOB0P5qC0j6IgItb6bKRfkwFronsgsri/8I+gRjfx
+Hs8gieNWk7l1dSRTfc5ZOTZXY1cAIazmpUNl2Rd3SQIvEVixjoJ5V3/Jiy+nAYF4
+8qPZxXPv37u8OPKbfEYROigTPBayoAgK1P82JKThAoGAJQ7aR+ItRUSOyD/ofZKB
+wQeYSVnv+UQg6gTh4GWf91D4WYgBVCGWhPJ8zMRZfcy1/TplJC917MVnkLP7k91D
+paxsSdRDVkSATGTX3bOTw2P9CbNFpRUIdz++7hmbhZjT/DBvtFYiRuaylGAuAdH7
+YzdO4ZLBuBW7jbDc7a2RHNg=
+-----END PRIVATE KEY-----
diff --git a/contrib/libs/grpc/src/core/tsi/test_creds/client2.pem b/contrib/libs/grpc/src/core/tsi/test_creds/client2.pem
new file mode 100644
index 00000000000..0565b1b1366
--- /dev/null
+++ b/contrib/libs/grpc/src/core/tsi/test_creds/client2.pem
@@ -0,0 +1,20 @@
+-----BEGIN CERTIFICATE-----
+MIIDODCCAiACFBjjQkCIdrl6SU6uUtepyES0xVV2MA0GCSqGSIb3DQEBCwUAMFYx
+CzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRl
+cm5ldCBXaWRnaXRzIFB0eSBMdGQxDzANBgNVBAMMBnRlc3RjYTAeFw0yMDEyMDIw
+MTExNDNaFw0zMDExMzAwMTExNDNaMFsxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApT
+b21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxFDAS
+BgNVBAMMC3Rlc3RjbGllbnQyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC
+AQEApTueVysASBJ02innJRWupdwXNxuJTHQ2viXQot8fuSmJQTfTSbYec+z4+ja7
+/26ZuIOvaoVVdrCIyeF3hHjmy2PtHGnVOfIXT15YVh6DCbLeblPg5FdMoz8Ly5Jo
+bEY9ET4nFftqleknKs0A6lzDMfI8oYRMZGQXjs9cQhkeAG6Nc3aTX7rGSdxrBRkM
+KscHSv5eHSJMi6rcaSEvr0rGHgDMrlWSRw+tbu2ImWrERMqxapJEsgzxngkd5Ovu
+Go8H89a1TCEz+RGSdqVHb3UYJHuzpKcGp3/KIPSxeQGic+d8rlAVc+NDv98ISOye
+Hvg94uVeSRn7S5dP1cSQ3R61NQIDAQABMA0GCSqGSIb3DQEBCwUAA4IBAQB4WZlD
+CgvMA/LD3wJAG2v53IuG8rJ2R0QG3dKbN6hCKsqVfJpF51L55RB+ABn7FT3CAfqJ
+w8IvisQ4vlr6dqxkGS7MPTou2H2LU6PARWPgqJnwRAB5gvjecHzDjKqhHlsQQXBw
+PHFt54EcyWtX2xgQmP5acjCj8o03gC3+tWtaAQgM6CExgXB4PgeUGIgTH5c016aZ
+YzxJgZS4UDfgA8+YVmzWNsGvgbITKu84hU2dqLCLoIqJPzwSikUVNS7Bo07o0hgH
+NNSDLaMNpaMC51dDiHbtER8hPp9elhSWOZRPXgEGbvQCFOt/Wz79Mw2dnpbBXVdb
+ANSsdO2Qu7snGMXr
+-----END CERTIFICATE-----
diff --git a/contrib/libs/grpc/src/core/tsi/transport_security.cc b/contrib/libs/grpc/src/core/tsi/transport_security.cc
index 035e7cc5454..dd62189654e 100644
--- a/contrib/libs/grpc/src/core/tsi/transport_security.cc
+++ b/contrib/libs/grpc/src/core/tsi/transport_security.cc
@@ -150,8 +150,9 @@ tsi_result tsi_handshaker_get_bytes_to_send_to_peer(tsi_handshaker* self,
}
if (self->frame_protector_created) return TSI_FAILED_PRECONDITION;
if (self->handshake_shutdown) return TSI_HANDSHAKE_SHUTDOWN;
- if (self->vtable->get_bytes_to_send_to_peer == nullptr)
+ if (self->vtable->get_bytes_to_send_to_peer == nullptr) {
return TSI_UNIMPLEMENTED;
+ }
return self->vtable->get_bytes_to_send_to_peer(self, bytes, bytes_size);
}
@@ -164,8 +165,9 @@ tsi_result tsi_handshaker_process_bytes_from_peer(tsi_handshaker* self,
}
if (self->frame_protector_created) return TSI_FAILED_PRECONDITION;
if (self->handshake_shutdown) return TSI_HANDSHAKE_SHUTDOWN;
- if (self->vtable->process_bytes_from_peer == nullptr)
+ if (self->vtable->process_bytes_from_peer == nullptr) {
return TSI_UNIMPLEMENTED;
+ }
return self->vtable->process_bytes_from_peer(self, bytes, bytes_size);
}
@@ -192,7 +194,7 @@ tsi_result tsi_handshaker_extract_peer(tsi_handshaker* self, tsi_peer* peer) {
}
tsi_result tsi_handshaker_create_frame_protector(
- tsi_handshaker* self, size_t* max_protected_frame_size,
+ tsi_handshaker* self, size_t* max_output_protected_frame_size,
tsi_frame_protector** protector) {
tsi_result result;
if (self == nullptr || self->vtable == nullptr || protector == nullptr) {
@@ -202,8 +204,8 @@ tsi_result tsi_handshaker_create_frame_protector(
if (self->handshake_shutdown) return TSI_HANDSHAKE_SHUTDOWN;
if (tsi_handshaker_get_result(self) != TSI_OK) return TSI_FAILED_PRECONDITION;
if (self->vtable->create_frame_protector == nullptr) return TSI_UNIMPLEMENTED;
- result = self->vtable->create_frame_protector(self, max_protected_frame_size,
- protector);
+ result = self->vtable->create_frame_protector(
+ self, max_output_protected_frame_size, protector);
if (result == TSI_OK) {
self->frame_protector_created = true;
}
@@ -250,14 +252,14 @@ tsi_result tsi_handshaker_result_extract_peer(const tsi_handshaker_result* self,
}
tsi_result tsi_handshaker_result_create_frame_protector(
- const tsi_handshaker_result* self, size_t* max_protected_frame_size,
+ const tsi_handshaker_result* self, size_t* max_output_protected_frame_size,
tsi_frame_protector** protector) {
if (self == nullptr || self->vtable == nullptr || protector == nullptr) {
return TSI_INVALID_ARGUMENT;
}
if (self->vtable->create_frame_protector == nullptr) return TSI_UNIMPLEMENTED;
- return self->vtable->create_frame_protector(self, max_protected_frame_size,
- protector);
+ return self->vtable->create_frame_protector(
+ self, max_output_protected_frame_size, protector);
}
tsi_result tsi_handshaker_result_get_unused_bytes(
diff --git a/contrib/libs/grpc/src/core/tsi/transport_security_interface.h b/contrib/libs/grpc/src/core/tsi/transport_security_interface.h
index 4608f400914..50beccac328 100644
--- a/contrib/libs/grpc/src/core/tsi/transport_security_interface.h
+++ b/contrib/libs/grpc/src/core/tsi/transport_security_interface.h
@@ -247,7 +247,7 @@ tsi_result tsi_handshaker_result_create_frame_protector(
consequence, the caller must not free the bytes. */
tsi_result tsi_handshaker_result_get_unused_bytes(
const tsi_handshaker_result* self, const unsigned char** bytes,
- size_t* byte_size);
+ size_t* bytes_size);
/* This method releases the tsi_handshaker_handshaker object. After this method
is called, no other method can be called on the object. */
diff --git a/contrib/libs/grpc/src/cpp/README.md b/contrib/libs/grpc/src/cpp/README.md
index 967a0a43b7f..134f4db56c7 100755
--- a/contrib/libs/grpc/src/cpp/README.md
+++ b/contrib/libs/grpc/src/cpp/README.md
@@ -25,10 +25,10 @@ To add gRPC as a dependency in bazel:
],
strip_prefix = "grpc-YOUR_GRPC_COMMIT_SHA",
)
-
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")
-
grpc_deps()
+ load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps")
+ grpc_extra_deps()
```
## CMake
diff --git a/contrib/libs/grpc/src/cpp/client/channel_cc.cc b/contrib/libs/grpc/src/cpp/client/channel_cc.cc
index ac95c29efcd..1793161d6ce 100644
--- a/contrib/libs/grpc/src/cpp/client/channel_cc.cc
+++ b/contrib/libs/grpc/src/cpp/client/channel_cc.cc
@@ -38,7 +38,9 @@
#include <grpcpp/support/channel_arguments.h>
#include <grpcpp/support/config.h>
#include <grpcpp/support/status.h>
+
#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/surface/completion_queue.h"
namespace grpc {
@@ -56,7 +58,12 @@ Channel::Channel(const TString& host, grpc_channel* channel,
Channel::~Channel() {
grpc_channel_destroy(c_channel_);
if (callback_cq_ != nullptr) {
- callback_cq_->Shutdown();
+ if (grpc_iomgr_run_in_background()) {
+ // gRPC-core provides the backing needed for the preferred CQ type
+ callback_cq_->Shutdown();
+ } else {
+ CompletionQueue::ReleaseCallbackAlternativeCQ(callback_cq_);
+ }
}
}
@@ -238,13 +245,21 @@ class ShutdownCallback : public grpc_experimental_completion_queue_functor {
// if there is no explicit per-channel CQ registered
grpc::internal::MutexLock l(&mu_);
if (callback_cq_ == nullptr) {
- auto* shutdown_callback = new ShutdownCallback;
- callback_cq_ = new ::grpc::CompletionQueue(grpc_completion_queue_attributes{
- GRPC_CQ_CURRENT_VERSION, GRPC_CQ_CALLBACK, GRPC_CQ_DEFAULT_POLLING,
- shutdown_callback});
-
- // Transfer ownership of the new cq to its own shutdown callback
- shutdown_callback->TakeCQ(callback_cq_);
+ if (grpc_iomgr_run_in_background()) {
+ // gRPC-core provides the backing needed for the preferred CQ type
+
+ auto* shutdown_callback = new ShutdownCallback;
+ callback_cq_ =
+ new ::grpc::CompletionQueue(grpc_completion_queue_attributes{
+ GRPC_CQ_CURRENT_VERSION, GRPC_CQ_CALLBACK,
+ GRPC_CQ_DEFAULT_POLLING, shutdown_callback});
+
+ // Transfer ownership of the new cq to its own shutdown callback
+ shutdown_callback->TakeCQ(callback_cq_);
+ } else {
+ // Otherwise we need to use the alternative CQ variant
+ callback_cq_ = CompletionQueue::CallbackAlternativeCQ();
+ }
}
return callback_cq_;
}
diff --git a/contrib/libs/grpc/src/cpp/client/client_callback.cc b/contrib/libs/grpc/src/cpp/client/client_callback.cc
index f4cbc97d34b..a05761ad063 100644
--- a/contrib/libs/grpc/src/cpp/client/client_callback.cc
+++ b/contrib/libs/grpc/src/cpp/client/client_callback.cc
@@ -34,14 +34,14 @@ void ClientReactor::InternalScheduleOnDone(grpc::Status s) {
const grpc::Status status;
ClosureWithArg(ClientReactor* reactor_arg, grpc::Status s)
: reactor(reactor_arg), status(std::move(s)) {
- GRPC_CLOSURE_INIT(&closure,
- [](void* void_arg, grpc_error*) {
- ClosureWithArg* arg =
- static_cast<ClosureWithArg*>(void_arg);
- arg->reactor->OnDone(arg->status);
- delete arg;
- },
- this, grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(
+ &closure,
+ [](void* void_arg, grpc_error*) {
+ ClosureWithArg* arg = static_cast<ClosureWithArg*>(void_arg);
+ arg->reactor->OnDone(arg->status);
+ delete arg;
+ },
+ this, grpc_schedule_on_exec_ctx);
}
};
ClosureWithArg* arg = new ClosureWithArg(this, std::move(s));
diff --git a/contrib/libs/grpc/src/cpp/client/client_context.cc b/contrib/libs/grpc/src/cpp/client/client_context.cc
index b75343d0895..8f18bfe7245 100644
--- a/contrib/libs/grpc/src/cpp/client/client_context.cc
+++ b/contrib/libs/grpc/src/cpp/client/client_context.cc
@@ -62,6 +62,7 @@ ClientContext::ClientContext()
propagate_from_call_(nullptr),
compression_algorithm_(GRPC_COMPRESS_NONE),
initial_metadata_corked_(false) {
+ g_gli_initializer.summon();
g_client_callbacks->DefaultConstructor(this);
}
diff --git a/contrib/libs/grpc/src/cpp/client/insecure_credentials.cc b/contrib/libs/grpc/src/cpp/client/insecure_credentials.cc
index e5bafff70af..b7036e541c9 100644
--- a/contrib/libs/grpc/src/cpp/client/insecure_credentials.cc
+++ b/contrib/libs/grpc/src/cpp/client/insecure_credentials.cc
@@ -51,6 +51,9 @@ class InsecureChannelCredentialsImpl final : public ChannelCredentials {
}
SecureChannelCredentials* AsSecureCredentials() override { return nullptr; }
+
+ private:
+ bool IsInsecure() const override { return true; }
};
} // namespace
diff --git a/contrib/libs/grpc/src/cpp/client/secure_credentials.cc b/contrib/libs/grpc/src/cpp/client/secure_credentials.cc
index 0f6db3caa53..109b50448df 100644
--- a/contrib/libs/grpc/src/cpp/client/secure_credentials.cc
+++ b/contrib/libs/grpc/src/cpp/client/secure_credentials.cc
@@ -28,6 +28,9 @@
#include <grpcpp/impl/grpc_library.h>
#include <grpcpp/support/channel_arguments.h>
+#include "y_absl/strings/str_join.h"
+
+// TODO(yashykt): We shouldn't be including "src/core" headers.
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/executor.h"
@@ -79,7 +82,8 @@ bool SecureCallCredentials::ApplyToCall(grpc_call* call) {
return grpc_call_set_credentials(call, c_creds_) == GRPC_CALL_OK;
}
-namespace {
+namespace internal {
+
std::shared_ptr<ChannelCredentials> WrapChannelCredentials(
grpc_channel_credentials* creds) {
return creds == nullptr ? nullptr
@@ -87,6 +91,10 @@ std::shared_ptr<ChannelCredentials> WrapChannelCredentials(
new SecureChannelCredentials(creds));
}
+} // namespace internal
+
+namespace {
+
std::shared_ptr<CallCredentials> WrapCallCredentials(
grpc_call_credentials* creds) {
return creds == nullptr ? nullptr
@@ -97,10 +105,17 @@ std::shared_ptr<CallCredentials> WrapCallCredentials(
std::shared_ptr<ChannelCredentials> GoogleDefaultCredentials() {
grpc::GrpcLibraryCodegen init; // To call grpc_init().
- return WrapChannelCredentials(
+ return internal::WrapChannelCredentials(
grpc_google_default_credentials_create(nullptr));
}
+std::shared_ptr<CallCredentials> ExternalAccountCredentials(
+ const grpc::string& json_string, const std::vector<grpc::string>& scopes) {
+ grpc::GrpcLibraryCodegen init; // To call grpc_init().
+ return WrapCallCredentials(grpc_external_account_credentials_create(
+ json_string.c_str(), y_absl::StrJoin(scopes, ",").c_str()));
+}
+
// Builds SSL Credentials given SSL specific options
std::shared_ptr<ChannelCredentials> SslCredentials(
const SslCredentialsOptions& options) {
@@ -112,7 +127,7 @@ std::shared_ptr<ChannelCredentials> SslCredentials(
options.pem_root_certs.empty() ? nullptr : options.pem_root_certs.c_str(),
options.pem_private_key.empty() ? nullptr : &pem_key_cert_pair, nullptr,
nullptr);
- return WrapChannelCredentials(c_creds);
+ return internal::WrapChannelCredentials(c_creds);
}
namespace experimental {
@@ -277,20 +292,20 @@ std::shared_ptr<ChannelCredentials> AltsCredentials(
}
grpc_channel_credentials* c_creds = grpc_alts_credentials_create(c_options);
grpc_alts_credentials_options_destroy(c_options);
- return WrapChannelCredentials(c_creds);
+ return internal::WrapChannelCredentials(c_creds);
}
// Builds Local Credentials
std::shared_ptr<ChannelCredentials> LocalCredentials(
grpc_local_connect_type type) {
grpc::GrpcLibraryCodegen init; // To call grpc_init().
- return WrapChannelCredentials(grpc_local_credentials_create(type));
+ return internal::WrapChannelCredentials(grpc_local_credentials_create(type));
}
// Builds TLS Credentials given TLS options.
std::shared_ptr<ChannelCredentials> TlsCredentials(
- const TlsCredentialsOptions& options) {
- return WrapChannelCredentials(
+ const TlsChannelCredentialsOptions& options) {
+ return internal::WrapChannelCredentials(
grpc_tls_credentials_create(options.c_credentials_options()));
}
@@ -356,8 +371,10 @@ std::shared_ptr<ChannelCredentials> CompositeChannelCredentials(
channel_creds->AsSecureCredentials();
SecureCallCredentials* s_call_creds = call_creds->AsSecureCredentials();
if (s_channel_creds && s_call_creds) {
- return WrapChannelCredentials(grpc_composite_channel_credentials_create(
- s_channel_creds->GetRawCreds(), s_call_creds->GetRawCreds(), nullptr));
+ return internal::WrapChannelCredentials(
+ grpc_composite_channel_credentials_create(
+ s_channel_creds->GetRawCreds(), s_call_creds->GetRawCreds(),
+ nullptr));
}
return nullptr;
}
diff --git a/contrib/libs/grpc/src/cpp/client/secure_credentials.h b/contrib/libs/grpc/src/cpp/client/secure_credentials.h
index 4fc79346bf4..9325f365b1e 100644
--- a/contrib/libs/grpc/src/cpp/client/secure_credentials.h
+++ b/contrib/libs/grpc/src/cpp/client/secure_credentials.h
@@ -26,6 +26,7 @@
#include <grpcpp/support/config.h>
#include "y_absl/strings/str_cat.h"
+// TODO(yashykt): We shouldn't be including "src/core" headers.
#include "src/core/lib/security/credentials/credentials.h"
#include "src/cpp/server/thread_pool_interface.h"
@@ -36,7 +37,7 @@ class Channel;
class SecureChannelCredentials final : public ChannelCredentials {
public:
explicit SecureChannelCredentials(grpc_channel_credentials* c_creds);
- ~SecureChannelCredentials() {
+ ~SecureChannelCredentials() override {
if (c_creds_ != nullptr) c_creds_->Unref();
}
grpc_channel_credentials* GetRawCreds() { return c_creds_; }
@@ -58,7 +59,7 @@ class SecureChannelCredentials final : public ChannelCredentials {
class SecureCallCredentials final : public CallCredentials {
public:
explicit SecureCallCredentials(grpc_call_credentials* c_creds);
- ~SecureCallCredentials() {
+ ~SecureCallCredentials() override {
if (c_creds_ != nullptr) c_creds_->Unref();
}
grpc_call_credentials* GetRawCreds() { return c_creds_; }
@@ -74,6 +75,13 @@ class SecureCallCredentials final : public CallCredentials {
grpc_call_credentials* const c_creds_;
};
+namespace internal {
+
+std::shared_ptr<ChannelCredentials> WrapChannelCredentials(
+ grpc_channel_credentials* creds);
+
+} // namespace internal
+
namespace experimental {
// Transforms C++ STS Credentials options to core options. The pointers of the
diff --git a/contrib/libs/grpc/src/cpp/client/xds_credentials.cc b/contrib/libs/grpc/src/cpp/client/xds_credentials.cc
new file mode 100644
index 00000000000..63b48837ef0
--- /dev/null
+++ b/contrib/libs/grpc/src/cpp/client/xds_credentials.cc
@@ -0,0 +1,41 @@
+//
+//
+// 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 "src/cpp/client/secure_credentials.h"
+
+namespace grpc {
+namespace experimental {
+
+std::shared_ptr<ChannelCredentials> XdsCredentials(
+ const std::shared_ptr<ChannelCredentials>& fallback_creds) {
+ GPR_ASSERT(fallback_creds != nullptr);
+ if (fallback_creds->IsInsecure()) {
+ grpc_channel_credentials* insecure_creds =
+ grpc_insecure_credentials_create();
+ auto xds_creds = internal::WrapChannelCredentials(
+ grpc_xds_credentials_create(insecure_creds));
+ grpc_channel_credentials_release(insecure_creds);
+ return xds_creds;
+ } else {
+ return internal::WrapChannelCredentials(grpc_xds_credentials_create(
+ fallback_creds->AsSecureCredentials()->GetRawCreds()));
+ }
+}
+
+} // namespace experimental
+} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/common/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/src/cpp/common/.yandex_meta/licenses.list.txt
index a5d42d5b53e..ed4a3efa9f4 100644
--- a/contrib/libs/grpc/src/cpp/common/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/src/cpp/common/.yandex_meta/licenses.list.txt
@@ -12,6 +12,20 @@
* limitations under the License.
+====================Apache-2.0====================
+// 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.
+
+
====================COPYRIGHT====================
* Copyright 2015 gRPC authors.
@@ -25,4 +39,8 @@
====================COPYRIGHT====================
+ * Copyright 2020 gRPC authors.
+
+
+====================COPYRIGHT====================
# Copyright 2019 gRPC authors.
diff --git a/contrib/libs/grpc/src/cpp/common/alarm.cc b/contrib/libs/grpc/src/cpp/common/alarm.cc
index a2612874b20..ac1b747b493 100644
--- a/contrib/libs/grpc/src/cpp/common/alarm.cc
+++ b/contrib/libs/grpc/src/cpp/common/alarm.cc
@@ -41,7 +41,7 @@ class AlarmImpl : public ::grpc::internal::CompletionQueueTag {
gpr_ref_init(&refs_, 1);
grpc_timer_init_unset(&timer_);
}
- ~AlarmImpl() {}
+ ~AlarmImpl() override {}
bool FinalizeResult(void** tag, bool* /*status*/) override {
*tag = tag_;
Unref();
@@ -80,20 +80,20 @@ class AlarmImpl : public ::grpc::internal::CompletionQueueTag {
// Don't use any CQ at all. Instead just use the timer to fire the function
callback_ = std::move(f);
Ref();
- GRPC_CLOSURE_INIT(&on_alarm_,
- [](void* arg, grpc_error* error) {
- grpc_core::Executor::Run(
- GRPC_CLOSURE_CREATE(
- [](void* arg, grpc_error* error) {
- AlarmImpl* alarm =
- static_cast<AlarmImpl*>(arg);
- alarm->callback_(error == GRPC_ERROR_NONE);
- alarm->Unref();
- },
- arg, nullptr),
- error);
- },
- this, grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(
+ &on_alarm_,
+ [](void* arg, grpc_error* error) {
+ grpc_core::Executor::Run(
+ GRPC_CLOSURE_CREATE(
+ [](void* arg, grpc_error* error) {
+ AlarmImpl* alarm = static_cast<AlarmImpl*>(arg);
+ alarm->callback_(error == GRPC_ERROR_NONE);
+ alarm->Unref();
+ },
+ arg, nullptr),
+ error);
+ },
+ this, grpc_schedule_on_exec_ctx);
grpc_timer_init(&timer_, grpc_timespec_to_millis_round_up(deadline),
&on_alarm_);
}
diff --git a/contrib/libs/grpc/src/cpp/common/auth_property_iterator.cc b/contrib/libs/grpc/src/cpp/common/auth_property_iterator.cc
index fbb18e9915c..0f380b09507 100644
--- a/contrib/libs/grpc/src/cpp/common/auth_property_iterator.cc
+++ b/contrib/libs/grpc/src/cpp/common/auth_property_iterator.cc
@@ -61,7 +61,7 @@ bool AuthPropertyIterator::operator!=(const AuthPropertyIterator& rhs) const {
return !operator==(rhs);
}
-const AuthProperty AuthPropertyIterator::operator*() {
+AuthProperty AuthPropertyIterator::operator*() {
return std::pair<grpc::string_ref, grpc::string_ref>(
property_->name,
grpc::string_ref(property_->value, property_->value_length));
diff --git a/contrib/libs/grpc/src/cpp/common/channel_filter.cc b/contrib/libs/grpc/src/cpp/common/channel_filter.cc
index 8df6c7b98f5..ab56d6073fe 100644
--- a/contrib/libs/grpc/src/cpp/common/channel_filter.cc
+++ b/contrib/libs/grpc/src/cpp/common/channel_filter.cc
@@ -87,7 +87,7 @@ void ChannelFilterPluginInit() {
for (size_t i = 0; i < channel_filters->size(); ++i) {
FilterRecord& filter = (*channel_filters)[i];
grpc_channel_init_register_stage(filter.stack_type, filter.priority,
- MaybeAddFilter, (void*)&filter);
+ MaybeAddFilter, &filter);
}
}
diff --git a/contrib/libs/grpc/src/cpp/common/channel_filter.h b/contrib/libs/grpc/src/cpp/common/channel_filter.h
index 5ce720b3075..b16f06bddcf 100644
--- a/contrib/libs/grpc/src/cpp/common/channel_filter.h
+++ b/contrib/libs/grpc/src/cpp/common/channel_filter.h
@@ -60,7 +60,7 @@ class MetadataBatch {
const grpc_mdelem> {
public:
const grpc_mdelem& operator*() const { return elem_->md; }
- const grpc_mdelem operator->() const { return elem_->md; }
+ grpc_mdelem operator->() const { return elem_->md; }
const_iterator& operator++() {
elem_ = elem_->next;
diff --git a/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc b/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc
index 96a7105eaf4..67745590745 100644
--- a/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc
+++ b/contrib/libs/grpc/src/cpp/common/completion_queue_cc.cc
@@ -20,13 +20,106 @@
#include <memory>
#include <grpc/grpc.h>
+#include <grpc/support/cpu.h>
#include <grpc/support/log.h>
#include <grpcpp/impl/grpc_library.h>
#include <grpcpp/support/time.h>
+#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
+#include "src/core/lib/gprpp/sync.h"
+#include "src/core/lib/gprpp/thd.h"
+
namespace grpc {
+namespace {
+
+internal::GrpcLibraryInitializer g_gli_initializer;
+
+gpr_once g_once_init_callback_alternative = GPR_ONCE_INIT;
+grpc_core::Mutex* g_callback_alternative_mu;
+
+// Implement a ref-counted callback CQ for global use in the alternative
+// implementation so that its threads are only created once. Do this using
+// explicit ref-counts and raw pointers rather than a shared-ptr since that
+// has a non-trivial destructor and thus can't be used for global variables.
+struct CallbackAlternativeCQ {
+ int refs Y_ABSL_GUARDED_BY(g_callback_alternative_mu) = 0;
+ CompletionQueue* cq Y_ABSL_GUARDED_BY(g_callback_alternative_mu);
+ std::vector<grpc_core::Thread>* nexting_threads
+ Y_ABSL_GUARDED_BY(g_callback_alternative_mu);
-static internal::GrpcLibraryInitializer g_gli_initializer;
+ CompletionQueue* Ref() {
+ grpc_core::MutexLock lock(&*g_callback_alternative_mu);
+ refs++;
+ if (refs == 1) {
+ cq = new CompletionQueue;
+ int num_nexting_threads = GPR_CLAMP(gpr_cpu_num_cores() / 2, 2, 16);
+ nexting_threads = new std::vector<grpc_core::Thread>;
+ for (int i = 0; i < num_nexting_threads; i++) {
+ nexting_threads->emplace_back(
+ "nexting_thread",
+ [](void* arg) {
+ grpc_completion_queue* cq =
+ static_cast<CompletionQueue*>(arg)->cq();
+ while (true) {
+ // Use the raw Core next function rather than the C++ Next since
+ // Next incorporates FinalizeResult and we actually want that
+ // called from the callback functor itself.
+ // TODO(vjpai): Migrate below to next without a timeout or idle
+ // phase. That's currently starving out some other polling,
+ // though.
+ auto ev = grpc_completion_queue_next(
+ cq,
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_millis(1000, GPR_TIMESPAN)),
+ nullptr);
+ if (ev.type == GRPC_QUEUE_SHUTDOWN) {
+ return;
+ }
+ if (ev.type == GRPC_QUEUE_TIMEOUT) {
+ gpr_sleep_until(
+ gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
+ gpr_time_from_millis(100, GPR_TIMESPAN)));
+ continue;
+ }
+ GPR_DEBUG_ASSERT(ev.type == GRPC_OP_COMPLETE);
+ // We can always execute the callback inline rather than
+ // pushing it to another Executor thread because this
+ // thread is definitely running on a background thread, does not
+ // hold any application locks before executing the callback,
+ // and cannot be entered recursively.
+ auto* functor =
+ static_cast<grpc_experimental_completion_queue_functor*>(
+ ev.tag);
+ functor->functor_run(functor, ev.success);
+ }
+ },
+ cq);
+ }
+ for (auto& th : *nexting_threads) {
+ th.Start();
+ }
+ }
+ return cq;
+ }
+
+ void Unref() {
+ grpc_core::MutexLock lock(g_callback_alternative_mu);
+ refs--;
+ if (refs == 0) {
+ cq->Shutdown();
+ for (auto& th : *nexting_threads) {
+ th.Join();
+ }
+ delete nexting_threads;
+ delete cq;
+ }
+ }
+};
+
+CallbackAlternativeCQ g_callback_alternative_cq;
+
+} // namespace
// 'CompletionQueue' constructor can safely call GrpcLibraryCodegen(false) here
// i.e not have GrpcLibraryCodegen call grpc_init(). This is because, to create
@@ -96,4 +189,19 @@ bool CompletionQueue::CompletionQueueTLSCache::Flush(void** tag, bool* ok) {
return false;
}
+CompletionQueue* CompletionQueue::CallbackAlternativeCQ() {
+ gpr_once_init(&g_once_init_callback_alternative,
+ [] { g_callback_alternative_mu = new grpc_core::Mutex(); });
+ return g_callback_alternative_cq.Ref();
+}
+
+void CompletionQueue::ReleaseCallbackAlternativeCQ(CompletionQueue* cq)
+ Y_ABSL_NO_THREAD_SAFETY_ANALYSIS {
+ (void)cq;
+ // This accesses g_callback_alternative_cq without acquiring the mutex
+ // but it's considered safe because it just reads the pointer address.
+ GPR_DEBUG_ASSERT(cq == g_callback_alternative_cq.cq);
+ g_callback_alternative_cq.Unref();
+}
+
} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/common/secure_auth_context.h b/contrib/libs/grpc/src/cpp/common/secure_auth_context.h
index 51013efac70..0e85a7077b7 100644
--- a/contrib/libs/grpc/src/cpp/common/secure_auth_context.h
+++ b/contrib/libs/grpc/src/cpp/common/secure_auth_context.h
@@ -49,7 +49,7 @@ class SecureAuthContext final : public AuthContext {
void AddProperty(const TString& key,
const grpc::string_ref& value) override;
- virtual bool SetPeerIdentityPropertyName(const TString& name) override;
+ bool SetPeerIdentityPropertyName(const TString& name) override;
private:
grpc_core::RefCountedPtr<grpc_auth_context> ctx_;
diff --git a/contrib/libs/grpc/src/cpp/common/tls_certificate_provider.cc b/contrib/libs/grpc/src/cpp/common/tls_certificate_provider.cc
new file mode 100644
index 00000000000..8e99b571a18
--- /dev/null
+++ b/contrib/libs/grpc/src/cpp/common/tls_certificate_provider.cc
@@ -0,0 +1,59 @@
+//
+// 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 <grpc/grpc_security.h>
+#include <grpc/support/alloc.h>
+#include <grpcpp/security/tls_certificate_provider.h>
+
+#include "y_absl/container/inlined_vector.h"
+
+namespace grpc {
+namespace experimental {
+
+StaticDataCertificateProvider::StaticDataCertificateProvider(
+ const TString& root_certificate,
+ const std::vector<IdentityKeyCertPair>& identity_key_cert_pairs) {
+ GPR_ASSERT(!root_certificate.empty() || !identity_key_cert_pairs.empty());
+ grpc_tls_identity_pairs* pairs_core = grpc_tls_identity_pairs_create();
+ for (const IdentityKeyCertPair& pair : identity_key_cert_pairs) {
+ grpc_tls_identity_pairs_add_pair(pairs_core, pair.private_key.c_str(),
+ pair.certificate_chain.c_str());
+ }
+ c_provider_ = grpc_tls_certificate_provider_static_data_create(
+ root_certificate.c_str(), pairs_core);
+ GPR_ASSERT(c_provider_ != nullptr);
+};
+
+StaticDataCertificateProvider::~StaticDataCertificateProvider() {
+ grpc_tls_certificate_provider_release(c_provider_);
+};
+
+FileWatcherCertificateProvider::FileWatcherCertificateProvider(
+ const TString& private_key_path,
+ const TString& identity_certificate_path,
+ const TString& root_cert_path, unsigned int refresh_interval_sec) {
+ c_provider_ = grpc_tls_certificate_provider_file_watcher_create(
+ private_key_path.c_str(), identity_certificate_path.c_str(),
+ root_cert_path.c_str(), refresh_interval_sec);
+ GPR_ASSERT(c_provider_ != nullptr);
+};
+
+FileWatcherCertificateProvider::~FileWatcherCertificateProvider() {
+ grpc_tls_certificate_provider_release(c_provider_);
+};
+
+} // namespace experimental
+} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/common/tls_credentials_options.cc b/contrib/libs/grpc/src/cpp/common/tls_credentials_options.cc
index 7e435ac1de3..d612bd062eb 100644
--- a/contrib/libs/grpc/src/cpp/common/tls_credentials_options.cc
+++ b/contrib/libs/grpc/src/cpp/common/tls_credentials_options.cc
@@ -16,178 +16,22 @@
*
*/
+#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpcpp/security/tls_credentials_options.h>
#include "y_absl/container/inlined_vector.h"
-#include "src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h"
#include "src/cpp/common/tls_credentials_options_util.h"
namespace grpc {
namespace experimental {
-/** TLS key materials config API implementation **/
-void TlsKeyMaterialsConfig::set_pem_root_certs(
- const TString& pem_root_certs) {
- pem_root_certs_ = pem_root_certs;
-}
-
-void TlsKeyMaterialsConfig::add_pem_key_cert_pair(
- const PemKeyCertPair& pem_key_cert_pair) {
- pem_key_cert_pair_list_.push_back(pem_key_cert_pair);
-}
-
-void TlsKeyMaterialsConfig::set_key_materials(
- const TString& pem_root_certs,
- const std::vector<PemKeyCertPair>& pem_key_cert_pair_list) {
- pem_key_cert_pair_list_ = pem_key_cert_pair_list;
- pem_root_certs_ = pem_root_certs;
-}
-
-/** TLS credential reload arg API implementation **/
-TlsCredentialReloadArg::TlsCredentialReloadArg(
- grpc_tls_credential_reload_arg* arg)
- : c_arg_(arg) {
- if (c_arg_ != nullptr && c_arg_->context != nullptr) {
- gpr_log(GPR_ERROR, "c_arg context has already been set");
- }
- c_arg_->context = static_cast<void*>(this);
- c_arg_->destroy_context = &TlsCredentialReloadArgDestroyContext;
-}
-
-TlsCredentialReloadArg::~TlsCredentialReloadArg() {}
-
-void* TlsCredentialReloadArg::cb_user_data() const {
- return c_arg_->cb_user_data;
-}
-bool TlsCredentialReloadArg::is_pem_key_cert_pair_list_empty() const {
- return c_arg_->key_materials_config->pem_key_cert_pair_list().empty();
-}
-
-grpc_ssl_certificate_config_reload_status TlsCredentialReloadArg::status()
- const {
- return c_arg_->status;
-}
-
-TString TlsCredentialReloadArg::error_details() const {
- return c_arg_->error_details->error_details();
-}
-
-void TlsCredentialReloadArg::set_cb_user_data(void* cb_user_data) {
- c_arg_->cb_user_data = cb_user_data;
-}
-
-void TlsCredentialReloadArg::set_pem_root_certs(
- const TString& pem_root_certs) {
- ::grpc_core::UniquePtr<char> c_pem_root_certs(
- gpr_strdup(pem_root_certs.c_str()));
- c_arg_->key_materials_config->set_pem_root_certs(std::move(c_pem_root_certs));
-}
-
-namespace {
-
-::grpc_core::PemKeyCertPair ConvertToCorePemKeyCertPair(
- const TlsKeyMaterialsConfig::PemKeyCertPair& pem_key_cert_pair) {
- grpc_ssl_pem_key_cert_pair* ssl_pair =
- (grpc_ssl_pem_key_cert_pair*)gpr_malloc(
- sizeof(grpc_ssl_pem_key_cert_pair));
- ssl_pair->private_key = gpr_strdup(pem_key_cert_pair.private_key.c_str());
- ssl_pair->cert_chain = gpr_strdup(pem_key_cert_pair.cert_chain.c_str());
- return ::grpc_core::PemKeyCertPair(ssl_pair);
-}
-
-} // namespace
-
-void TlsCredentialReloadArg::add_pem_key_cert_pair(
- const TlsKeyMaterialsConfig::PemKeyCertPair& pem_key_cert_pair) {
- c_arg_->key_materials_config->add_pem_key_cert_pair(
- ConvertToCorePemKeyCertPair(pem_key_cert_pair));
-}
-
-void TlsCredentialReloadArg::set_key_materials(
- const TString& pem_root_certs,
- std::vector<TlsKeyMaterialsConfig::PemKeyCertPair> pem_key_cert_pair_list) {
- /** Initialize the |key_materials_config| field of |c_arg_|, if it has not
- * already been done. **/
- if (c_arg_->key_materials_config == nullptr) {
- c_arg_->key_materials_config = grpc_tls_key_materials_config_create();
- }
- /** Convert |pem_key_cert_pair_list| to an inlined vector of ssl pairs. **/
- ::y_absl::InlinedVector<::grpc_core::PemKeyCertPair, 1>
- c_pem_key_cert_pair_list;
- for (const auto& key_cert_pair : pem_key_cert_pair_list) {
- c_pem_key_cert_pair_list.emplace_back(
- ConvertToCorePemKeyCertPair(key_cert_pair));
- }
- /** Populate the key materials config field of |c_arg_|. **/
- c_arg_->key_materials_config->set_key_materials(pem_root_certs.c_str(),
- c_pem_key_cert_pair_list);
-}
-
-void TlsCredentialReloadArg::set_key_materials_config(
- const std::shared_ptr<TlsKeyMaterialsConfig>& key_materials_config) {
- if (key_materials_config == nullptr) {
- c_arg_->key_materials_config = nullptr;
- return;
- }
- ::y_absl::InlinedVector<::grpc_core::PemKeyCertPair, 1>
- c_pem_key_cert_pair_list;
- for (const auto& key_cert_pair :
- key_materials_config->pem_key_cert_pair_list()) {
- grpc_ssl_pem_key_cert_pair* ssl_pair =
- (grpc_ssl_pem_key_cert_pair*)gpr_malloc(
- sizeof(grpc_ssl_pem_key_cert_pair));
- ssl_pair->private_key = gpr_strdup(key_cert_pair.private_key.c_str());
- ssl_pair->cert_chain = gpr_strdup(key_cert_pair.cert_chain.c_str());
- ::grpc_core::PemKeyCertPair c_pem_key_cert_pair =
- ::grpc_core::PemKeyCertPair(ssl_pair);
- c_pem_key_cert_pair_list.emplace_back(std::move(c_pem_key_cert_pair));
- }
- ::grpc_core::UniquePtr<char> c_pem_root_certs(
- gpr_strdup(key_materials_config->pem_root_certs().c_str()));
- if (c_arg_->key_materials_config == nullptr) {
- c_arg_->key_materials_config = grpc_tls_key_materials_config_create();
- }
- c_arg_->key_materials_config->set_key_materials(
- key_materials_config->pem_root_certs().c_str(), c_pem_key_cert_pair_list);
- c_arg_->key_materials_config->set_version(key_materials_config->version());
-}
-
-void TlsCredentialReloadArg::set_status(
- grpc_ssl_certificate_config_reload_status status) {
- c_arg_->status = status;
-}
-
-void TlsCredentialReloadArg::set_error_details(
- const TString& error_details) {
- c_arg_->error_details->set_error_details(error_details.c_str());
-}
-
-void TlsCredentialReloadArg::OnCredentialReloadDoneCallback() {
- if (c_arg_->cb == nullptr) {
- gpr_log(GPR_ERROR, "credential reload arg callback API is nullptr");
- return;
- }
- c_arg_->cb(c_arg_);
-}
-
-/** gRPC TLS credential reload config API implementation **/
-TlsCredentialReloadConfig::TlsCredentialReloadConfig(
- std::shared_ptr<TlsCredentialReloadInterface> credential_reload_interface)
- : credential_reload_interface_(std::move(credential_reload_interface)) {
- c_config_ = grpc_tls_credential_reload_config_create(
- nullptr, &TlsCredentialReloadConfigCSchedule,
- &TlsCredentialReloadConfigCCancel, nullptr);
- c_config_->set_context(static_cast<void*>(this));
-}
-
-TlsCredentialReloadConfig::~TlsCredentialReloadConfig() {}
-
/** gRPC TLS server authorization check arg API implementation **/
TlsServerAuthorizationCheckArg::TlsServerAuthorizationCheckArg(
grpc_tls_server_authorization_check_arg* arg)
: c_arg_(arg) {
- if (c_arg_ != nullptr && c_arg_->context != nullptr) {
+ GPR_ASSERT(c_arg_ != nullptr);
+ if (c_arg_->context != nullptr) {
gpr_log(GPR_ERROR, "c_arg context has already been set");
}
c_arg_->context = static_cast<void*>(this);
@@ -265,7 +109,6 @@ void TlsServerAuthorizationCheckArg::OnServerAuthorizationCheckDoneCallback() {
c_arg_->cb(c_arg_);
}
-/** gRPC TLS server authorization check config API implementation. **/
TlsServerAuthorizationCheckConfig::TlsServerAuthorizationCheckConfig(
std::shared_ptr<TlsServerAuthorizationCheckInterface>
server_authorization_check_interface)
@@ -277,67 +120,69 @@ TlsServerAuthorizationCheckConfig::TlsServerAuthorizationCheckConfig(
c_config_->set_context(static_cast<void*>(this));
}
-TlsServerAuthorizationCheckConfig::~TlsServerAuthorizationCheckConfig() {}
-
-/** gRPC TLS credential options API implementation **/
-TlsCredentialsOptions::TlsCredentialsOptions(
- grpc_tls_server_verification_option server_verification_option,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
- std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config)
- : TlsCredentialsOptions(
- GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, server_verification_option,
- std::move(key_materials_config), std::move(credential_reload_config),
- std::move(server_authorization_check_config)) {}
-
-TlsCredentialsOptions::TlsCredentialsOptions(
- grpc_ssl_client_certificate_request_type cert_request_type,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config)
- : TlsCredentialsOptions(cert_request_type, GRPC_TLS_SERVER_VERIFICATION,
- std::move(key_materials_config),
- std::move(credential_reload_config), nullptr) {}
-
-TlsCredentialsOptions::TlsCredentialsOptions(
- grpc_ssl_client_certificate_request_type cert_request_type,
- grpc_tls_server_verification_option server_verification_option,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
- std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config)
- : cert_request_type_(cert_request_type),
- server_verification_option_(server_verification_option),
- key_materials_config_(std::move(key_materials_config)),
- credential_reload_config_(std::move(credential_reload_config)),
- server_authorization_check_config_(
- std::move(server_authorization_check_config)) {
+TlsServerAuthorizationCheckConfig::~TlsServerAuthorizationCheckConfig() {
+ grpc_tls_server_authorization_check_config_release(c_config_);
+}
+
+TlsCredentialsOptions::TlsCredentialsOptions() {
c_credentials_options_ = grpc_tls_credentials_options_create();
- grpc_tls_credentials_options_set_cert_request_type(c_credentials_options_,
- cert_request_type_);
- if (key_materials_config_ != nullptr) {
- grpc_tls_credentials_options_set_key_materials_config(
- c_credentials_options_,
- ConvertToCKeyMaterialsConfig(key_materials_config_));
- }
- if (credential_reload_config_ != nullptr) {
- grpc_tls_credentials_options_set_credential_reload_config(
- c_credentials_options_, credential_reload_config_->c_config());
+}
+
+void TlsCredentialsOptions::set_certificate_provider(
+ std::shared_ptr<CertificateProviderInterface> certificate_provider) {
+ certificate_provider_ = std::move(certificate_provider);
+ if (certificate_provider_ != nullptr) {
+ grpc_tls_credentials_options_set_certificate_provider(
+ c_credentials_options_, certificate_provider_->c_provider());
}
- if (server_authorization_check_config_ != nullptr) {
+}
+
+void TlsCredentialsOptions::watch_root_certs() {
+ grpc_tls_credentials_options_watch_root_certs(c_credentials_options_);
+}
+
+void TlsCredentialsOptions::set_root_cert_name(
+ const TString& root_cert_name) {
+ grpc_tls_credentials_options_set_root_cert_name(c_credentials_options_,
+ root_cert_name.c_str());
+}
+
+void TlsCredentialsOptions::watch_identity_key_cert_pairs() {
+ grpc_tls_credentials_options_watch_identity_key_cert_pairs(
+ c_credentials_options_);
+}
+
+void TlsCredentialsOptions::set_identity_cert_name(
+ const TString& identity_cert_name) {
+ grpc_tls_credentials_options_set_identity_cert_name(
+ c_credentials_options_, identity_cert_name.c_str());
+}
+
+void TlsChannelCredentialsOptions::set_server_verification_option(
+ grpc_tls_server_verification_option server_verification_option) {
+ grpc_tls_credentials_options* options = c_credentials_options();
+ GPR_ASSERT(options != nullptr);
+ grpc_tls_credentials_options_set_server_verification_option(
+ options, server_verification_option);
+}
+
+void TlsChannelCredentialsOptions::set_server_authorization_check_config(
+ std::shared_ptr<TlsServerAuthorizationCheckConfig> config) {
+ grpc_tls_credentials_options* options = c_credentials_options();
+ GPR_ASSERT(options != nullptr);
+ if (config != nullptr) {
grpc_tls_credentials_options_set_server_authorization_check_config(
- c_credentials_options_, server_authorization_check_config_->c_config());
+ options, config->c_config());
}
- grpc_tls_credentials_options_set_server_verification_option(
- c_credentials_options_, server_verification_option);
}
-/** Whenever a TlsCredentialsOptions instance is created, the caller takes
- * ownership of the c_credentials_options_ pointer (see e.g. the implementation
- * of the TlsCredentials API in secure_credentials.cc). For this reason, the
- * TlsCredentialsOptions destructor is not responsible for freeing
- * c_credentials_options_. **/
-TlsCredentialsOptions::~TlsCredentialsOptions() {}
+void TlsServerCredentialsOptions::set_cert_request_type(
+ grpc_ssl_client_certificate_request_type cert_request_type) {
+ grpc_tls_credentials_options* options = c_credentials_options();
+ GPR_ASSERT(options != nullptr);
+ grpc_tls_credentials_options_set_cert_request_type(options,
+ cert_request_type);
+}
} // namespace experimental
} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.cc b/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.cc
index ed84003212b..920f897bd73 100644
--- a/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.cc
+++ b/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.cc
@@ -19,85 +19,12 @@
#include "y_absl/container/inlined_vector.h"
#include <grpcpp/security/tls_credentials_options.h>
+
#include "src/cpp/common/tls_credentials_options_util.h"
namespace grpc {
namespace experimental {
-/** Converts the Cpp key materials to C key materials; this allocates memory for
- * the C key materials. Note that the user must free
- * the underlying pointer to private key and cert chain duplicates; they are not
- * freed when the grpc_core::UniquePtr<char> member variables of PemKeyCertPair
- * are unused. Similarly, the user must free the underlying pointer to
- * c_pem_root_certs. **/
-grpc_tls_key_materials_config* ConvertToCKeyMaterialsConfig(
- const std::shared_ptr<TlsKeyMaterialsConfig>& config) {
- if (config == nullptr) {
- return nullptr;
- }
- grpc_tls_key_materials_config* c_config =
- grpc_tls_key_materials_config_create();
- ::y_absl::InlinedVector<::grpc_core::PemKeyCertPair, 1>
- c_pem_key_cert_pair_list;
- for (const auto& key_cert_pair : config->pem_key_cert_pair_list()) {
- grpc_ssl_pem_key_cert_pair* ssl_pair =
- (grpc_ssl_pem_key_cert_pair*)gpr_malloc(
- sizeof(grpc_ssl_pem_key_cert_pair));
- ssl_pair->private_key = gpr_strdup(key_cert_pair.private_key.c_str());
- ssl_pair->cert_chain = gpr_strdup(key_cert_pair.cert_chain.c_str());
- ::grpc_core::PemKeyCertPair c_pem_key_cert_pair =
- ::grpc_core::PemKeyCertPair(ssl_pair);
- c_pem_key_cert_pair_list.push_back(::std::move(c_pem_key_cert_pair));
- }
- c_config->set_key_materials(config->pem_root_certs().c_str(),
- c_pem_key_cert_pair_list);
- c_config->set_version(config->version());
- return c_config;
-}
-
-/** The C schedule and cancel functions for the credential reload config.
- * They populate a C credential reload arg with the result of a C++ credential
- * reload schedule/cancel API. **/
-int TlsCredentialReloadConfigCSchedule(void* /*config_user_data*/,
- grpc_tls_credential_reload_arg* arg) {
- if (arg == nullptr || arg->config == nullptr ||
- arg->config->context() == nullptr) {
- gpr_log(GPR_ERROR, "credential reload arg was not properly initialized");
- return 1;
- }
- TlsCredentialReloadConfig* cpp_config =
- static_cast<TlsCredentialReloadConfig*>(arg->config->context());
- TlsCredentialReloadArg* cpp_arg = new TlsCredentialReloadArg(arg);
- int schedule_result = cpp_config->Schedule(cpp_arg);
- return schedule_result;
-}
-
-void TlsCredentialReloadConfigCCancel(void* /*config_user_data*/,
- grpc_tls_credential_reload_arg* arg) {
- if (arg == nullptr || arg->config == nullptr ||
- arg->config->context() == nullptr) {
- gpr_log(GPR_ERROR, "credential reload arg was not properly initialized");
- return;
- }
- if (arg->context == nullptr) {
- gpr_log(GPR_ERROR, "credential reload arg schedule has already completed");
- return;
- }
- TlsCredentialReloadConfig* cpp_config =
- static_cast<TlsCredentialReloadConfig*>(arg->config->context());
- TlsCredentialReloadArg* cpp_arg =
- static_cast<TlsCredentialReloadArg*>(arg->context);
- cpp_config->Cancel(cpp_arg);
-}
-
-void TlsCredentialReloadArgDestroyContext(void* context) {
- if (context != nullptr) {
- TlsCredentialReloadArg* cpp_arg =
- static_cast<TlsCredentialReloadArg*>(context);
- delete cpp_arg;
- }
-}
-
/** The C schedule and cancel functions for the server authorization check
* config. They populate a C server authorization check arg with the result
* of a C++ server authorization check schedule/cancel API. **/
diff --git a/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.h b/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.h
index 4ee04d15d7f..d6247219fb7 100644
--- a/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.h
+++ b/contrib/libs/grpc/src/cpp/common/tls_credentials_options_util.h
@@ -27,29 +27,15 @@
namespace grpc {
namespace experimental {
-/** The following function is exposed for testing purposes. **/
-grpc_tls_key_materials_config* ConvertToCKeyMaterialsConfig(
- const std::shared_ptr<TlsKeyMaterialsConfig>& config);
-
-/** The following 4 functions convert the user-provided schedule or cancel
+/** The following 2 functions convert the user-provided schedule or cancel
* functions into C style schedule or cancel functions. These are internal
* functions, not meant to be accessed by the user. **/
-int TlsCredentialReloadConfigCSchedule(void* config_user_data,
- grpc_tls_credential_reload_arg* arg);
-
-void TlsCredentialReloadConfigCCancel(void* config_user_data,
- grpc_tls_credential_reload_arg* arg);
-
int TlsServerAuthorizationCheckConfigCSchedule(
void* config_user_data, grpc_tls_server_authorization_check_arg* arg);
void TlsServerAuthorizationCheckConfigCCancel(
void* config_user_data, grpc_tls_server_authorization_check_arg* arg);
-/** The following 2 functions cleanup data created in the above C schedule
- * functions. **/
-void TlsCredentialReloadArgDestroyContext(void* context);
-
void TlsServerAuthorizationCheckArgDestroyContext(void* context);
} // namespace experimental
diff --git a/contrib/libs/grpc/src/cpp/common/version_cc.cc b/contrib/libs/grpc/src/cpp/common/version_cc.cc
index 7f4228346a9..cb9895b58f8 100644
--- a/contrib/libs/grpc/src/cpp/common/version_cc.cc
+++ b/contrib/libs/grpc/src/cpp/common/version_cc.cc
@@ -22,5 +22,5 @@
#include <grpcpp/grpcpp.h>
namespace grpc {
-TString Version() { return "1.33.2"; }
+TString Version() { return "1.37.1"; }
} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc b/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc
index 1b388210c05..2a610ff8a92 100644
--- a/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc
+++ b/contrib/libs/grpc/src/cpp/ext/proto_server_reflection.cc
@@ -28,7 +28,6 @@ using grpc::StatusCode;
using grpc::reflection::v1alpha::ErrorResponse;
using grpc::reflection::v1alpha::ExtensionNumberResponse;
using grpc::reflection::v1alpha::ExtensionRequest;
-using grpc::reflection::v1alpha::FileDescriptorResponse;
using grpc::reflection::v1alpha::ListServiceResponse;
using grpc::reflection::v1alpha::ServerReflectionRequest;
using grpc::reflection::v1alpha::ServerReflectionResponse;
@@ -110,14 +109,14 @@ Status ProtoServerReflection::ListService(ServerContext* /*context*/,
}
Status ProtoServerReflection::GetFileByName(
- ServerContext* /*context*/, const TString& filename,
+ ServerContext* /*context*/, const TString& file_name,
ServerReflectionResponse* response) {
if (descriptor_pool_ == nullptr) {
return Status::CANCELLED;
}
const protobuf::FileDescriptor* file_desc =
- descriptor_pool_->FindFileByName(TProtoStringType(filename));
+ descriptor_pool_->FindFileByName(TProtoStringType(file_name));
if (file_desc == nullptr) {
return Status(StatusCode::NOT_FOUND, "File not found.");
}
diff --git a/contrib/libs/grpc/src/cpp/server/channel_argument_option.cc b/contrib/libs/grpc/src/cpp/server/channel_argument_option.cc
index 9aad932429d..fce23e49d5d 100644
--- a/contrib/libs/grpc/src/cpp/server/channel_argument_option.cc
+++ b/contrib/libs/grpc/src/cpp/server/channel_argument_option.cc
@@ -27,10 +27,10 @@ std::unique_ptr<ServerBuilderOption> MakeChannelArgumentOption(
StringOption(const TString& name, const TString& value)
: name_(name), value_(value) {}
- virtual void UpdateArguments(ChannelArguments* args) override {
+ void UpdateArguments(ChannelArguments* args) override {
args->SetString(name_, value_);
}
- virtual void UpdatePlugins(
+ void UpdatePlugins(
std::vector<std::unique_ptr<ServerBuilderPlugin>>* /*plugins*/)
override {}
@@ -48,10 +48,10 @@ std::unique_ptr<ServerBuilderOption> MakeChannelArgumentOption(
IntOption(const TString& name, int value)
: name_(name), value_(value) {}
- virtual void UpdateArguments(ChannelArguments* args) override {
+ void UpdateArguments(ChannelArguments* args) override {
args->SetInt(name_, value_);
}
- virtual void UpdatePlugins(
+ void UpdatePlugins(
std::vector<std::unique_ptr<ServerBuilderPlugin>>* /*plugins*/)
override {}
diff --git a/contrib/libs/grpc/src/cpp/server/channelz/channelz_service_plugin.cc b/contrib/libs/grpc/src/cpp/server/channelz/channelz_service_plugin.cc
index ae26a447ab3..b18624e3b65 100644
--- a/contrib/libs/grpc/src/cpp/server/channelz/channelz_service_plugin.cc
+++ b/contrib/libs/grpc/src/cpp/server/channelz/channelz_service_plugin.cc
@@ -67,13 +67,6 @@ CreateChannelzServicePlugin() {
new ChannelzServicePlugin());
}
-} // namespace experimental
-} // namespace channelz
-} // namespace grpc
-namespace grpc_impl {
-namespace channelz {
-namespace experimental {
-
void InitChannelzService() {
static struct Initializer {
Initializer() {
@@ -85,4 +78,4 @@ void InitChannelzService() {
} // namespace experimental
} // namespace channelz
-} // namespace grpc_impl
+} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.cc b/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.cc
index 77c5d6a263d..e96dc4c4551 100644
--- a/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.cc
+++ b/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.cc
@@ -27,11 +27,12 @@ namespace grpc {
DynamicThreadPool::DynamicThread::DynamicThread(DynamicThreadPool* pool)
: pool_(pool),
- thd_("grpcpp_dynamic_pool",
- [](void* th) {
- static_cast<DynamicThreadPool::DynamicThread*>(th)->ThreadFunc();
- },
- this) {
+ thd_(
+ "grpcpp_dynamic_pool",
+ [](void* th) {
+ static_cast<DynamicThreadPool::DynamicThread*>(th)->ThreadFunc();
+ },
+ this) {
thd_.Start();
}
DynamicThreadPool::DynamicThread::~DynamicThread() { thd_.Join(); }
@@ -67,7 +68,7 @@ void DynamicThreadPool::ThreadFunc() {
if (!callbacks_.empty()) {
auto cb = callbacks_.front();
callbacks_.pop();
- lock.Unlock();
+ lock.Release();
cb();
} else if (shutdown_) {
break;
@@ -96,7 +97,7 @@ void DynamicThreadPool::ReapThreads(std::list<DynamicThread*>* tlist) {
DynamicThreadPool::~DynamicThreadPool() {
grpc_core::MutexLock lock(&mu_);
shutdown_ = true;
- cv_.Broadcast();
+ cv_.SignalAll();
while (nthreads_ != 0) {
shutdown_cv_.Wait(&mu_);
}
diff --git a/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.h b/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.h
index 6f9f943bc38..954aaff35da 100644
--- a/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.h
+++ b/contrib/libs/grpc/src/cpp/server/dynamic_thread_pool.h
@@ -34,14 +34,14 @@ namespace grpc {
class DynamicThreadPool final : public ThreadPoolInterface {
public:
explicit DynamicThreadPool(int reserve_threads);
- ~DynamicThreadPool();
+ ~DynamicThreadPool() override;
void Add(const std::function<void()>& callback) override;
private:
class DynamicThread {
public:
- DynamicThread(DynamicThreadPool* pool);
+ explicit DynamicThread(DynamicThreadPool* pool);
~DynamicThread();
private:
diff --git a/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.cc b/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.cc
index 3cc508d0cbf..f39270924b0 100644
--- a/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.cc
+++ b/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.cc
@@ -18,6 +18,7 @@
#include <memory>
+#include "y_absl/memory/memory.h"
#include "upb/upb.hpp"
#include <grpc/slice.h>
@@ -114,7 +115,7 @@ DefaultHealthCheckService::HealthCheckServiceImpl*
DefaultHealthCheckService::GetHealthCheckService(
std::unique_ptr<ServerCompletionQueue> cq) {
GPR_ASSERT(impl_ == nullptr);
- impl_.reset(new HealthCheckServiceImpl(this, std::move(cq)));
+ impl_ = y_absl::make_unique<HealthCheckServiceImpl>(this, std::move(cq));
return impl_.get();
}
@@ -160,8 +161,8 @@ DefaultHealthCheckService::HealthCheckServiceImpl::HealthCheckServiceImpl(
AddMethod(new internal::RpcServiceMethod(
kHealthWatchMethodName, internal::RpcMethod::SERVER_STREAMING, nullptr));
// Create serving thread.
- thread_ = std::unique_ptr<::grpc_core::Thread>(
- new ::grpc_core::Thread("grpc_health_check_service", Serve, this));
+ thread_ = y_absl::make_unique<::grpc_core::Thread>("grpc_health_check_service",
+ Serve, this);
}
DefaultHealthCheckService::HealthCheckServiceImpl::~HealthCheckServiceImpl() {
@@ -242,10 +243,9 @@ bool DefaultHealthCheckService::HealthCheckServiceImpl::EncodeResponse(
grpc_health_v1_HealthCheckResponse_new(arena.ptr());
grpc_health_v1_HealthCheckResponse_set_status(
response_struct,
- status == NOT_FOUND
- ? grpc_health_v1_HealthCheckResponse_SERVICE_UNKNOWN
- : status == SERVING ? grpc_health_v1_HealthCheckResponse_SERVING
- : grpc_health_v1_HealthCheckResponse_NOT_SERVING);
+ status == NOT_FOUND ? grpc_health_v1_HealthCheckResponse_SERVICE_UNKNOWN
+ : status == SERVING ? grpc_health_v1_HealthCheckResponse_SERVING
+ : grpc_health_v1_HealthCheckResponse_NOT_SERVING);
size_t buf_length;
char* buf = grpc_health_v1_HealthCheckResponse_serialize(
response_struct, arena.ptr(), &buf_length);
diff --git a/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.h b/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.h
index 9da1dfc15fa..fe3d2b219a6 100644
--- a/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.h
+++ b/contrib/libs/grpc/src/cpp/server/health/default_health_check_service.h
@@ -56,7 +56,7 @@ class DefaultHealthCheckService final : public HealthCheckServiceInterface {
HealthCheckServiceImpl(DefaultHealthCheckService* database,
std::unique_ptr<ServerCompletionQueue> cq);
- ~HealthCheckServiceImpl();
+ ~HealthCheckServiceImpl() override;
void StartServingThread();
diff --git a/contrib/libs/grpc/src/cpp/server/insecure_server_credentials.cc b/contrib/libs/grpc/src/cpp/server/insecure_server_credentials.cc
index 3f33f4e045c..4eb492e0732 100644
--- a/contrib/libs/grpc/src/cpp/server/insecure_server_credentials.cc
+++ b/contrib/libs/grpc/src/cpp/server/insecure_server_credentials.cc
@@ -33,6 +33,9 @@ class InsecureServerCredentialsImpl final : public ServerCredentials {
(void)processor;
GPR_ASSERT(0); // Should not be called on InsecureServerCredentials.
}
+
+ private:
+ bool IsInsecure() const override { return true; }
};
} // namespace
diff --git a/contrib/libs/grpc/src/cpp/server/load_reporter/constants.h b/contrib/libs/grpc/src/cpp/server/load_reporter/constants.h
index 00ad794a049..dc9fadeab0a 100644
--- a/contrib/libs/grpc/src/cpp/server/load_reporter/constants.h
+++ b/contrib/libs/grpc/src/cpp/server/load_reporter/constants.h
@@ -21,6 +21,8 @@
#include <grpc/impl/codegen/port_platform.h>
+#include <stddef.h>
+
namespace grpc {
namespace load_reporter {
diff --git a/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc b/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc
index f07fa812a7d..16542bfddf6 100644
--- a/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc
+++ b/contrib/libs/grpc/src/cpp/server/load_reporter/load_data_store.cc
@@ -43,7 +43,7 @@ bool UnorderedMapOfSetEraseKeyValue(std::unordered_map<K, std::set<V>>& map,
auto it = map.find(key);
if (it != map.end()) {
size_t erased = it->second.erase(value);
- if (it->second.size() == 0) {
+ if (it->second.empty()) {
map.erase(it);
}
return erased;
diff --git a/contrib/libs/grpc/src/cpp/server/secure_server_credentials.cc b/contrib/libs/grpc/src/cpp/server/secure_server_credentials.cc
index 732602bcb70..b6ea87f4fe1 100644
--- a/contrib/libs/grpc/src/cpp/server/secure_server_credentials.cc
+++ b/contrib/libs/grpc/src/cpp/server/secure_server_credentials.cc
@@ -55,18 +55,18 @@ void AuthMetadataProcessorAyncWrapper::Process(
}
void AuthMetadataProcessorAyncWrapper::InvokeProcessor(
- grpc_auth_context* ctx, const grpc_metadata* md, size_t num_md,
+ grpc_auth_context* context, const grpc_metadata* md, size_t num_md,
grpc_process_auth_metadata_done_cb cb, void* user_data) {
AuthMetadataProcessor::InputMetadata metadata;
for (size_t i = 0; i < num_md; i++) {
metadata.insert(std::make_pair(StringRefFromSlice(&md[i].key),
StringRefFromSlice(&md[i].value)));
}
- SecureAuthContext context(ctx);
+ SecureAuthContext ctx(context);
AuthMetadataProcessor::OutputMetadata consumed_metadata;
AuthMetadataProcessor::OutputMetadata response_metadata;
- Status status = processor_->Process(metadata, &context, &consumed_metadata,
+ Status status = processor_->Process(metadata, &ctx, &consumed_metadata,
&response_metadata);
std::vector<grpc_metadata> consumed_md;
@@ -145,8 +145,7 @@ std::shared_ptr<ServerCredentials> LocalServerCredentials(
}
std::shared_ptr<ServerCredentials> TlsServerCredentials(
- const grpc::experimental::TlsCredentialsOptions& options) {
- grpc::GrpcLibraryCodegen init;
+ const grpc::experimental::TlsServerCredentialsOptions& options) {
return std::shared_ptr<ServerCredentials>(new SecureServerCredentials(
grpc_tls_server_credentials_create(options.c_credentials_options())));
}
diff --git a/contrib/libs/grpc/src/cpp/server/secure_server_credentials.h b/contrib/libs/grpc/src/cpp/server/secure_server_credentials.h
index 9e3fb3f9ebf..f2b65c28646 100644
--- a/contrib/libs/grpc/src/cpp/server/secure_server_credentials.h
+++ b/contrib/libs/grpc/src/cpp/server/secure_server_credentials.h
@@ -40,7 +40,7 @@ class AuthMetadataProcessorAyncWrapper final {
const grpc_metadata* md, size_t num_md,
grpc_process_auth_metadata_done_cb cb, void* user_data);
- AuthMetadataProcessorAyncWrapper(
+ explicit AuthMetadataProcessorAyncWrapper(
const std::shared_ptr<AuthMetadataProcessor>& processor)
: processor_(processor) {
if (processor && processor->IsBlocking()) {
@@ -69,7 +69,11 @@ class SecureServerCredentials final : public ServerCredentials {
void SetAuthMetadataProcessor(
const std::shared_ptr<grpc::AuthMetadataProcessor>& processor) override;
+ grpc_server_credentials* c_creds() { return creds_; }
+
private:
+ SecureServerCredentials* AsSecureServerCredentials() override { return this; }
+
grpc_server_credentials* creds_;
std::unique_ptr<grpc::AuthMetadataProcessorAyncWrapper> processor_;
};
diff --git a/contrib/libs/grpc/src/cpp/server/server_builder.cc b/contrib/libs/grpc/src/cpp/server/server_builder.cc
index 0cc00b365ff..502d4f20ae6 100644
--- a/contrib/libs/grpc/src/cpp/server/server_builder.cc
+++ b/contrib/libs/grpc/src/cpp/server/server_builder.cc
@@ -83,9 +83,9 @@ ServerBuilder& ServerBuilder::RegisterService(Service* service) {
return *this;
}
-ServerBuilder& ServerBuilder::RegisterService(const TString& addr,
+ServerBuilder& ServerBuilder::RegisterService(const TString& host,
Service* service) {
- services_.emplace_back(new NamedService(addr, service));
+ services_.emplace_back(new NamedService(host, service));
return *this;
}
@@ -95,7 +95,7 @@ ServerBuilder& ServerBuilder::RegisterAsyncGenericService(
gpr_log(GPR_ERROR,
"Adding multiple generic services is unsupported for now. "
"Dropping the service %p",
- (void*)service);
+ service);
} else {
generic_service_ = service;
}
@@ -122,7 +122,7 @@ ServerBuilder& ServerBuilder::experimental_type::RegisterCallbackGenericService(
gpr_log(GPR_ERROR,
"Adding multiple generic services is unsupported for now. "
"Dropping the service %p",
- (void*)service);
+ service);
} else {
builder_->callback_generic_service_ = service;
}
@@ -130,6 +130,12 @@ ServerBuilder& ServerBuilder::experimental_type::RegisterCallbackGenericService(
}
#endif
+ServerBuilder& ServerBuilder::experimental_type::SetContextAllocator(
+ std::unique_ptr<grpc::ContextAllocator> context_allocator) {
+ builder_->context_allocator_ = std::move(context_allocator);
+ return *builder_;
+}
+
std::unique_ptr<grpc::experimental::ExternalConnectionAcceptor>
ServerBuilder::experimental_type::AddExternalConnectionAcceptor(
experimental_type::ExternalConnectionType type,
@@ -331,7 +337,7 @@ std::unique_ptr<grpc::Server> ServerBuilder::BuildAndStart() {
std::unique_ptr<grpc::Server> server(new grpc::Server(
&args, sync_server_cqs, sync_server_settings_.min_pollers,
sync_server_settings_.max_pollers, sync_server_settings_.cq_timeout_msec,
- std::move(acceptors_), resource_quota_,
+ std::move(acceptors_), server_config_fetcher_, resource_quota_,
std::move(interceptor_creators_)));
ServerInitializer* initializer = server->initializer();
@@ -369,6 +375,13 @@ std::unique_ptr<grpc::Server> ServerBuilder::BuildAndStart() {
return nullptr;
}
+#ifdef GRPC_CALLBACK_API_NONEXPERIMENTAL
+ server->RegisterContextAllocator(std::move(context_allocator_));
+#else
+ server->experimental_registration()->RegisterContextAllocator(
+ std::move(context_allocator_));
+#endif
+
for (const auto& value : services_) {
if (!server->RegisterService(value->host.get(), value->service)) {
return nullptr;
diff --git a/contrib/libs/grpc/src/cpp/server/server_callback.cc b/contrib/libs/grpc/src/cpp/server/server_callback.cc
index 40aef8e7359..f6b72c0fcce 100644
--- a/contrib/libs/grpc/src/cpp/server/server_callback.cc
+++ b/contrib/libs/grpc/src/cpp/server/server_callback.cc
@@ -35,14 +35,14 @@ void ServerCallbackCall::ScheduleOnDone(bool inline_ondone) {
grpc_closure closure;
ServerCallbackCall* call;
explicit ClosureWithArg(ServerCallbackCall* call_arg) : call(call_arg) {
- GRPC_CLOSURE_INIT(&closure,
- [](void* void_arg, grpc_error*) {
- ClosureWithArg* arg =
- static_cast<ClosureWithArg*>(void_arg);
- arg->call->CallOnDone();
- delete arg;
- },
- this, grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(
+ &closure,
+ [](void* void_arg, grpc_error*) {
+ ClosureWithArg* arg = static_cast<ClosureWithArg*>(void_arg);
+ arg->call->CallOnDone();
+ delete arg;
+ },
+ this, grpc_schedule_on_exec_ctx);
}
};
ClosureWithArg* arg = new ClosureWithArg(this);
@@ -64,15 +64,15 @@ void ServerCallbackCall::CallOnCancel(ServerReactor* reactor) {
ServerReactor* reactor;
ClosureWithArg(ServerCallbackCall* call_arg, ServerReactor* reactor_arg)
: call(call_arg), reactor(reactor_arg) {
- GRPC_CLOSURE_INIT(&closure,
- [](void* void_arg, grpc_error*) {
- ClosureWithArg* arg =
- static_cast<ClosureWithArg*>(void_arg);
- arg->reactor->OnCancel();
- arg->call->MaybeDone();
- delete arg;
- },
- this, grpc_schedule_on_exec_ctx);
+ GRPC_CLOSURE_INIT(
+ &closure,
+ [](void* void_arg, grpc_error*) {
+ ClosureWithArg* arg = static_cast<ClosureWithArg*>(void_arg);
+ arg->reactor->OnCancel();
+ arg->call->MaybeDone();
+ delete arg;
+ },
+ this, grpc_schedule_on_exec_ctx);
}
};
ClosureWithArg* arg = new ClosureWithArg(this, reactor);
diff --git a/contrib/libs/grpc/src/cpp/server/server_cc.cc b/contrib/libs/grpc/src/cpp/server/server_cc.cc
index c2a911c7f7c..dab7f488a7d 100644
--- a/contrib/libs/grpc/src/cpp/server/server_cc.cc
+++ b/contrib/libs/grpc/src/cpp/server/server_cc.cc
@@ -42,8 +42,12 @@
#include <grpcpp/server_context.h>
#include <grpcpp/support/time.h>
+#include "y_absl/memory/memory.h"
+
#include "src/core/ext/transport/inproc/inproc_transport.h"
+#include "src/core/lib/gprpp/manual_constructor.h"
#include "src/core/lib/iomgr/exec_ctx.h"
+#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/profiling/timers.h"
#include "src/core/lib/surface/call.h"
#include "src/core/lib/surface/completion_queue.h"
@@ -83,12 +87,16 @@ void InitGlobalCallbacks() {
class ShutdownTag : public internal::CompletionQueueTag {
public:
- bool FinalizeResult(void** /*tag*/, bool* /*status*/) { return false; }
+ bool FinalizeResult(void** /*tag*/, bool* /*status*/) override {
+ return false;
+ }
};
-class DummyTag : public internal::CompletionQueueTag {
+class PhonyTag : public internal::CompletionQueueTag {
public:
- bool FinalizeResult(void** /*tag*/, bool* /*status*/) { return true; }
+ bool FinalizeResult(void** /*tag*/, bool* /*status*/) override {
+ return true;
+ }
};
class UnimplementedAsyncRequestContext {
@@ -311,8 +319,8 @@ class Server::UnimplementedAsyncResponse final
grpc::internal::CallOpSendInitialMetadata,
grpc::internal::CallOpServerSendStatus> {
public:
- UnimplementedAsyncResponse(UnimplementedAsyncRequest* request);
- ~UnimplementedAsyncResponse() { delete request_; }
+ explicit UnimplementedAsyncResponse(UnimplementedAsyncRequest* request);
+ ~UnimplementedAsyncResponse() override { delete request_; }
bool FinalizeResult(void** tag, bool* status) override {
if (grpc::internal::CallOpSet<
@@ -332,199 +340,171 @@ class Server::UnimplementedAsyncResponse final
class Server::SyncRequest final : public grpc::internal::CompletionQueueTag {
public:
- SyncRequest(grpc::internal::RpcServiceMethod* method, void* method_tag)
- : method_(method),
- method_tag_(method_tag),
- in_flight_(false),
- has_request_payload_(method->method_type() ==
- grpc::internal::RpcMethod::NORMAL_RPC ||
- method->method_type() ==
- grpc::internal::RpcMethod::SERVER_STREAMING),
- call_details_(nullptr),
- cq_(nullptr) {
- grpc_metadata_array_init(&request_metadata_);
- }
-
- ~SyncRequest() {
- if (call_details_) {
- delete call_details_;
- }
- grpc_metadata_array_destroy(&request_metadata_);
- }
-
- void SetupRequest() { cq_ = grpc_completion_queue_create_for_pluck(nullptr); }
-
- void TeardownRequest() {
- grpc_completion_queue_destroy(cq_);
- cq_ = nullptr;
+ SyncRequest(Server* server, grpc::internal::RpcServiceMethod* method,
+ grpc_core::Server::RegisteredCallAllocation* data)
+ : SyncRequest(server, method) {
+ CommonSetup(data);
+ data->deadline = &deadline_;
+ data->optional_payload = has_request_payload_ ? &request_payload_ : nullptr;
}
- void Request(grpc_server* server, grpc_completion_queue* notify_cq) {
- GPR_ASSERT(cq_ && !in_flight_);
- in_flight_ = true;
- if (method_tag_) {
- if (grpc_server_request_registered_call(
- server, method_tag_, &call_, &deadline_, &request_metadata_,
- has_request_payload_ ? &request_payload_ : nullptr, cq_,
- notify_cq, this) != GRPC_CALL_OK) {
- TeardownRequest();
- return;
- }
- } else {
- if (!call_details_) {
- call_details_ = new grpc_call_details;
- grpc_call_details_init(call_details_);
- }
- if (grpc_server_request_call(server, &call_, call_details_,
- &request_metadata_, cq_, notify_cq,
- this) != GRPC_CALL_OK) {
- TeardownRequest();
- return;
- }
- }
+ SyncRequest(Server* server, grpc::internal::RpcServiceMethod* method,
+ grpc_core::Server::BatchCallAllocation* data)
+ : SyncRequest(server, method) {
+ CommonSetup(data);
+ call_details_ = new grpc_call_details;
+ grpc_call_details_init(call_details_);
+ data->details = call_details_;
}
- void PostShutdownCleanup() {
- if (call_) {
- grpc_call_unref(call_);
- call_ = nullptr;
+ ~SyncRequest() override {
+ // The destructor should only cleanup those objects created in the
+ // constructor, since some paths may or may not actually go through the
+ // Run stage where other objects are allocated.
+ if (has_request_payload_ && request_payload_) {
+ grpc_byte_buffer_destroy(request_payload_);
}
- if (cq_) {
- grpc_completion_queue_destroy(cq_);
- cq_ = nullptr;
+ if (call_details_ != nullptr) {
+ grpc_call_details_destroy(call_details_);
+ delete call_details_;
}
+ grpc_metadata_array_destroy(&request_metadata_);
+ server_->UnrefWithPossibleNotify();
}
bool FinalizeResult(void** /*tag*/, bool* status) override {
if (!*status) {
- grpc_completion_queue_destroy(cq_);
- cq_ = nullptr;
+ delete this;
+ return false;
}
if (call_details_) {
deadline_ = call_details_->deadline;
- grpc_call_details_destroy(call_details_);
- grpc_call_details_init(call_details_);
}
return true;
}
- // The CallData class represents a call that is "active" as opposed
- // to just being requested. It wraps and takes ownership of the cq from
- // the call request
- class CallData final {
- public:
- explicit CallData(Server* server, SyncRequest* mrd)
- : cq_(mrd->cq_),
- ctx_(mrd->deadline_, &mrd->request_metadata_),
- has_request_payload_(mrd->has_request_payload_),
- request_payload_(has_request_payload_ ? mrd->request_payload_
- : nullptr),
- request_(nullptr),
- method_(mrd->method_),
- call_(
- mrd->call_, server, &cq_, server->max_receive_message_size(),
- ctx_.set_server_rpc_info(method_->name(), method_->method_type(),
- server->interceptor_creators_)),
- server_(server),
- global_callbacks_(nullptr),
- resources_(false) {
- ctx_.set_call(mrd->call_);
- ctx_.cq_ = &cq_;
- GPR_ASSERT(mrd->in_flight_);
- mrd->in_flight_ = false;
- mrd->request_metadata_.count = 0;
+ void Run(const std::shared_ptr<GlobalCallbacks>& global_callbacks,
+ bool resources) {
+ ctx_.Init(deadline_, &request_metadata_);
+ wrapped_call_.Init(
+ call_, server_, &cq_, server_->max_receive_message_size(),
+ ctx_->ctx.set_server_rpc_info(method_->name(), method_->method_type(),
+ server_->interceptor_creators_));
+ ctx_->ctx.set_call(call_);
+ ctx_->ctx.cq_ = &cq_;
+ request_metadata_.count = 0;
+
+ global_callbacks_ = global_callbacks;
+ resources_ = resources;
+
+ interceptor_methods_.SetCall(&*wrapped_call_);
+ interceptor_methods_.SetReverse();
+ // Set interception point for RECV INITIAL METADATA
+ interceptor_methods_.AddInterceptionHookPoint(
+ grpc::experimental::InterceptionHookPoints::POST_RECV_INITIAL_METADATA);
+ interceptor_methods_.SetRecvInitialMetadata(&ctx_->ctx.client_metadata_);
+
+ if (has_request_payload_) {
+ // Set interception point for RECV MESSAGE
+ auto* handler = resources_ ? method_->handler()
+ : server_->resource_exhausted_handler_.get();
+ deserialized_request_ = handler->Deserialize(call_, request_payload_,
+ &request_status_, nullptr);
+
+ request_payload_ = nullptr;
+ interceptor_methods_.AddInterceptionHookPoint(
+ grpc::experimental::InterceptionHookPoints::POST_RECV_MESSAGE);
+ interceptor_methods_.SetRecvMessage(deserialized_request_, nullptr);
}
- ~CallData() {
- if (has_request_payload_ && request_payload_) {
- grpc_byte_buffer_destroy(request_payload_);
- }
+ if (interceptor_methods_.RunInterceptors(
+ [this]() { ContinueRunAfterInterception(); })) {
+ ContinueRunAfterInterception();
+ } else {
+ // There were interceptors to be run, so ContinueRunAfterInterception
+ // will be run when interceptors are done.
}
+ }
- void Run(const std::shared_ptr<GlobalCallbacks>& global_callbacks,
- bool resources) {
- global_callbacks_ = global_callbacks;
- resources_ = resources;
+ void ContinueRunAfterInterception() {
+ ctx_->ctx.BeginCompletionOp(&*wrapped_call_, nullptr, nullptr);
+ global_callbacks_->PreSynchronousRequest(&ctx_->ctx);
+ auto* handler = resources_ ? method_->handler()
+ : server_->resource_exhausted_handler_.get();
+ handler->RunHandler(grpc::internal::MethodHandler::HandlerParameter(
+ &*wrapped_call_, &ctx_->ctx, deserialized_request_, request_status_,
+ nullptr, nullptr));
+ global_callbacks_->PostSynchronousRequest(&ctx_->ctx);
- interceptor_methods_.SetCall(&call_);
- interceptor_methods_.SetReverse();
- // Set interception point for RECV INITIAL METADATA
- interceptor_methods_.AddInterceptionHookPoint(
- grpc::experimental::InterceptionHookPoints::
- POST_RECV_INITIAL_METADATA);
- interceptor_methods_.SetRecvInitialMetadata(&ctx_.client_metadata_);
+ cq_.Shutdown();
- if (has_request_payload_) {
- // Set interception point for RECV MESSAGE
- auto* handler = resources_ ? method_->handler()
- : server_->resource_exhausted_handler_.get();
- request_ = handler->Deserialize(call_.call(), request_payload_,
- &request_status_, nullptr);
+ grpc::internal::CompletionQueueTag* op_tag = ctx_->ctx.GetCompletionOpTag();
+ cq_.TryPluck(op_tag, gpr_inf_future(GPR_CLOCK_REALTIME));
- request_payload_ = nullptr;
- interceptor_methods_.AddInterceptionHookPoint(
- grpc::experimental::InterceptionHookPoints::POST_RECV_MESSAGE);
- interceptor_methods_.SetRecvMessage(request_, nullptr);
- }
+ // Ensure the cq_ is shutdown
+ grpc::PhonyTag ignored_tag;
+ GPR_ASSERT(cq_.Pluck(&ignored_tag) == false);
- if (interceptor_methods_.RunInterceptors(
- [this]() { ContinueRunAfterInterception(); })) {
- ContinueRunAfterInterception();
- } else {
- // There were interceptors to be run, so ContinueRunAfterInterception
- // will be run when interceptors are done.
- }
- }
+ // Cleanup structures allocated during Run/ContinueRunAfterInterception
+ wrapped_call_.Destroy();
+ ctx_.Destroy();
- void ContinueRunAfterInterception() {
- {
- ctx_.BeginCompletionOp(&call_, nullptr, nullptr);
- global_callbacks_->PreSynchronousRequest(&ctx_);
- auto* handler = resources_ ? method_->handler()
- : server_->resource_exhausted_handler_.get();
- handler->RunHandler(grpc::internal::MethodHandler::HandlerParameter(
- &call_, &ctx_, request_, request_status_, nullptr, nullptr));
- request_ = nullptr;
- global_callbacks_->PostSynchronousRequest(&ctx_);
-
- cq_.Shutdown();
-
- grpc::internal::CompletionQueueTag* op_tag = ctx_.GetCompletionOpTag();
- cq_.TryPluck(op_tag, gpr_inf_future(GPR_CLOCK_REALTIME));
-
- /* Ensure the cq_ is shutdown */
- grpc::DummyTag ignored_tag;
- GPR_ASSERT(cq_.Pluck(&ignored_tag) == false);
- }
- delete this;
- }
+ delete this;
+ }
- private:
- grpc::CompletionQueue cq_;
- grpc::ServerContext ctx_;
- const bool has_request_payload_;
- grpc_byte_buffer* request_payload_;
- void* request_;
- grpc::Status request_status_;
- grpc::internal::RpcServiceMethod* const method_;
- grpc::internal::Call call_;
- Server* server_;
- std::shared_ptr<GlobalCallbacks> global_callbacks_;
- bool resources_;
- grpc::internal::InterceptorBatchMethodsImpl interceptor_methods_;
- };
+ // For requests that must be only cleaned up but not actually Run
+ void Cleanup() {
+ cq_.Shutdown();
+ grpc_call_unref(call_);
+ delete this;
+ }
private:
+ SyncRequest(Server* server, grpc::internal::RpcServiceMethod* method)
+ : server_(server),
+ method_(method),
+ has_request_payload_(method->method_type() ==
+ grpc::internal::RpcMethod::NORMAL_RPC ||
+ method->method_type() ==
+ grpc::internal::RpcMethod::SERVER_STREAMING),
+ cq_(grpc_completion_queue_create_for_pluck(nullptr)) {}
+
+ template <class CallAllocation>
+ void CommonSetup(CallAllocation* data) {
+ server_->Ref();
+ grpc_metadata_array_init(&request_metadata_);
+ data->tag = static_cast<void*>(this);
+ data->call = &call_;
+ data->initial_metadata = &request_metadata_;
+ data->cq = cq_.cq();
+ }
+
+ Server* const server_;
grpc::internal::RpcServiceMethod* const method_;
- void* const method_tag_;
- bool in_flight_;
const bool has_request_payload_;
grpc_call* call_;
- grpc_call_details* call_details_;
+ grpc_call_details* call_details_ = nullptr;
gpr_timespec deadline_;
grpc_metadata_array request_metadata_;
- grpc_byte_buffer* request_payload_;
- grpc_completion_queue* cq_;
+ grpc_byte_buffer* request_payload_ = nullptr;
+ grpc::CompletionQueue cq_;
+ grpc::Status request_status_;
+ std::shared_ptr<GlobalCallbacks> global_callbacks_;
+ bool resources_;
+ void* deserialized_request_ = nullptr;
+ grpc::internal::InterceptorBatchMethodsImpl interceptor_methods_;
+
+ // ServerContextWrapper allows ManualConstructor while using a private
+ // contructor of ServerContext via this friend class.
+ struct ServerContextWrapper {
+ ServerContext ctx;
+
+ ServerContextWrapper(gpr_timespec deadline, grpc_metadata_array* arr)
+ : ctx(deadline, arr) {}
+ };
+
+ grpc_core::ManualConstructor<ServerContextWrapper> ctx_;
+ grpc_core::ManualConstructor<internal::Call> wrapped_call_;
};
template <class ServerContextType>
@@ -548,7 +528,10 @@ class Server::CallbackRequest final
method->method_type() ==
grpc::internal::RpcMethod::SERVER_STREAMING),
cq_(cq),
- tag_(this) {
+ tag_(this),
+ ctx_(server_->context_allocator() != nullptr
+ ? server_->context_allocator()->NewCallbackServerContext()
+ : nullptr) {
CommonSetup(server, data);
data->deadline = &deadline_;
data->optional_payload = has_request_payload_ ? &request_payload_ : nullptr;
@@ -563,18 +546,25 @@ class Server::CallbackRequest final
has_request_payload_(false),
call_details_(new grpc_call_details),
cq_(cq),
- tag_(this) {
+ tag_(this),
+ ctx_(server_->context_allocator() != nullptr
+ ? server_->context_allocator()
+ ->NewGenericCallbackServerContext()
+ : nullptr) {
CommonSetup(server, data);
grpc_call_details_init(call_details_);
data->details = call_details_;
}
- ~CallbackRequest() {
+ ~CallbackRequest() override {
delete call_details_;
grpc_metadata_array_destroy(&request_metadata_);
if (has_request_payload_ && request_payload_) {
grpc_byte_buffer_destroy(request_payload_);
}
+ if (ctx_alloc_by_default_ || server_->context_allocator() == nullptr) {
+ default_ctx_.Destroy();
+ }
server_->UnrefWithPossibleNotify();
}
@@ -588,7 +578,7 @@ class Server::CallbackRequest final
class CallbackCallTag : public grpc_experimental_completion_queue_functor {
public:
- CallbackCallTag(Server::CallbackRequest<ServerContextType>* req)
+ explicit CallbackCallTag(Server::CallbackRequest<ServerContextType>* req)
: req_(req) {
functor_run = &CallbackCallTag::StaticRun;
// Set inlineable to true since this callback is internally-controlled
@@ -627,10 +617,10 @@ class Server::CallbackRequest final
}
// Bind the call, deadline, and metadata from what we got
- req_->ctx_.set_call(req_->call_);
- req_->ctx_.cq_ = req_->cq_;
- req_->ctx_.BindDeadlineAndMetadata(req_->deadline_,
- &req_->request_metadata_);
+ req_->ctx_->set_call(req_->call_);
+ req_->ctx_->cq_ = req_->cq_;
+ req_->ctx_->BindDeadlineAndMetadata(req_->deadline_,
+ &req_->request_metadata_);
req_->request_metadata_.count = 0;
// Create a C++ Call to control the underlying core call
@@ -639,7 +629,7 @@ class Server::CallbackRequest final
grpc::internal::Call(
req_->call_, req_->server_, req_->cq_,
req_->server_->max_receive_message_size(),
- req_->ctx_.set_server_rpc_info(
+ req_->ctx_->set_server_rpc_info(
req_->method_name(),
(req_->method_ != nullptr)
? req_->method_->method_type()
@@ -653,7 +643,7 @@ class Server::CallbackRequest final
grpc::experimental::InterceptionHookPoints::
POST_RECV_INITIAL_METADATA);
req_->interceptor_methods_.SetRecvInitialMetadata(
- &req_->ctx_.client_metadata_);
+ &req_->ctx_->client_metadata_);
if (req_->has_request_payload_) {
// Set interception point for RECV MESSAGE
@@ -679,7 +669,7 @@ class Server::CallbackRequest final
? req_->method_->handler()
: req_->server_->generic_handler_.get();
handler->RunHandler(grpc::internal::MethodHandler::HandlerParameter(
- call_, &req_->ctx_, req_->request_, req_->request_status_,
+ call_, req_->ctx_, req_->request_, req_->request_status_,
req_->handler_data_, [this] { delete req_; }));
}
};
@@ -688,9 +678,16 @@ class Server::CallbackRequest final
void CommonSetup(Server* server, CallAllocation* data) {
server->Ref();
grpc_metadata_array_init(&request_metadata_);
- data->tag = &tag_;
+ data->tag = static_cast<void*>(&tag_);
data->call = &call_;
data->initial_metadata = &request_metadata_;
+ if (ctx_ == nullptr) {
+ default_ctx_.Init();
+ ctx_ = &*default_ctx_;
+ ctx_alloc_by_default_ = true;
+ }
+ ctx_->set_context_allocator(server->context_allocator());
+ data->cq = cq_->cq();
}
Server* const server_;
@@ -705,8 +702,10 @@ class Server::CallbackRequest final
gpr_timespec deadline_;
grpc_metadata_array request_metadata_;
grpc::CompletionQueue* const cq_;
+ bool ctx_alloc_by_default_ = false;
CallbackCallTag tag_;
- ServerContextType ctx_;
+ ServerContextType* ctx_ = nullptr;
+ grpc_core::ManualConstructor<ServerContextType> default_ctx_;
grpc::internal::InterceptorBatchMethodsImpl interceptor_methods_;
};
@@ -723,8 +722,8 @@ bool Server::CallbackRequest<
if (*status) {
deadline_ = call_details_->deadline;
// TODO(yangg) remove the copy here
- ctx_.method_ = grpc::StringFromCopiedSlice(call_details_->method);
- ctx_.host_ = grpc::StringFromCopiedSlice(call_details_->host);
+ ctx_->method_ = grpc::StringFromCopiedSlice(call_details_->method);
+ ctx_->host_ = grpc::StringFromCopiedSlice(call_details_->host);
}
grpc_slice_unref(call_details_->method);
grpc_slice_unref(call_details_->host);
@@ -740,7 +739,7 @@ const char* Server::CallbackRequest<grpc::CallbackServerContext>::method_name()
template <>
const char* Server::CallbackRequest<
grpc::GenericCallbackServerContext>::method_name() const {
- return ctx_.method().c_str();
+ return ctx_->method().c_str();
}
// Implementation of ThreadManager. Each instance of SyncRequestThreadManager
@@ -779,44 +778,39 @@ class Server::SyncRequestThreadManager : public grpc::ThreadManager {
}
void DoWork(void* tag, bool ok, bool resources) override {
+ (void)ok;
SyncRequest* sync_req = static_cast<SyncRequest*>(tag);
- if (!sync_req) {
- // No tag. Nothing to work on. This is an unlikley scenario and possibly a
- // bug in RPC Manager implementation.
- gpr_log(GPR_ERROR, "Sync server. DoWork() was called with NULL tag");
- return;
- }
-
- if (ok) {
- // Calldata takes ownership of the completion queue and interceptors
- // inside sync_req
- auto* cd = new SyncRequest::CallData(server_, sync_req);
- // Prepare for the next request
- if (!IsShutdown()) {
- sync_req->SetupRequest(); // Create new completion queue for sync_req
- sync_req->Request(server_->c_server(), server_cq_->cq());
- }
+ // Under the AllocatingRequestMatcher model we will never see an invalid tag
+ // here.
+ GPR_DEBUG_ASSERT(sync_req != nullptr);
+ GPR_DEBUG_ASSERT(ok);
- GPR_TIMER_SCOPE("cd.Run()", 0);
- cd->Run(global_callbacks_, resources);
- }
- // TODO (sreek) If ok is false here (which it isn't in case of
- // grpc_request_registered_call), we should still re-queue the request
- // object
+ GPR_TIMER_SCOPE("sync_req->Run()", 0);
+ sync_req->Run(global_callbacks_, resources);
}
void AddSyncMethod(grpc::internal::RpcServiceMethod* method, void* tag) {
- sync_requests_.emplace_back(new SyncRequest(method, tag));
+ server_->server()->core_server->SetRegisteredMethodAllocator(
+ server_cq_->cq(), tag, [this, method] {
+ grpc_core::Server::RegisteredCallAllocation result;
+ new SyncRequest(server_, method, &result);
+ return result;
+ });
+ has_sync_method_ = true;
}
void AddUnknownSyncMethod() {
- if (!sync_requests_.empty()) {
- unknown_method_.reset(new grpc::internal::RpcServiceMethod(
+ if (has_sync_method_) {
+ unknown_method_ = y_absl::make_unique<grpc::internal::RpcServiceMethod>(
"unknown", grpc::internal::RpcMethod::BIDI_STREAMING,
- new grpc::internal::UnknownMethodHandler));
- sync_requests_.emplace_back(
- new SyncRequest(unknown_method_.get(), nullptr));
+ new grpc::internal::UnknownMethodHandler);
+ server_->server()->core_server->SetBatchMethodAllocator(
+ server_cq_->cq(), [this] {
+ grpc_core::Server::BatchCallAllocation result;
+ new SyncRequest(server_, unknown_method_.get(), &result);
+ return result;
+ });
}
}
@@ -831,27 +825,14 @@ class Server::SyncRequestThreadManager : public grpc::ThreadManager {
void* tag;
bool ok;
while (server_cq_->Next(&tag, &ok)) {
- if (ok) {
- // If a request was pulled off the queue, it means that the thread
- // handling the request added it to the completion queue after shutdown
- // was called - because the thread had already started and checked the
- // shutdown flag before shutdown was called. In this case, we simply
- // clean it up here, *after* calling wait on all the worker threads, at
- // which point we are certain no in-flight requests will add more to the
- // queue. This fixes an intermittent memory leak on shutdown.
- SyncRequest* sync_req = static_cast<SyncRequest*>(tag);
- sync_req->PostShutdownCleanup();
- }
+ // This problem can arise if the server CQ gets a request queued to it
+ // before it gets shutdown but then pulls it after shutdown.
+ static_cast<SyncRequest*>(tag)->Cleanup();
}
}
void Start() {
- if (!sync_requests_.empty()) {
- for (const auto& value : sync_requests_) {
- value->SetupRequest();
- value->Request(server_->c_server(), server_cq_->cq());
- }
-
+ if (has_sync_method_) {
Initialize(); // ThreadManager's Initialize()
}
}
@@ -860,7 +841,7 @@ class Server::SyncRequestThreadManager : public grpc::ThreadManager {
Server* server_;
grpc::CompletionQueue* server_cq_;
int cq_timeout_msec_;
- std::vector<std::unique_ptr<SyncRequest>> sync_requests_;
+ bool has_sync_method_ = false;
std::unique_ptr<grpc::internal::RpcServiceMethod> unknown_method_;
std::shared_ptr<Server::GlobalCallbacks> global_callbacks_;
};
@@ -873,6 +854,7 @@ Server::Server(
int min_pollers, int max_pollers, int sync_cq_timeout_msec,
std::vector<std::shared_ptr<grpc::internal::ExternalConnectionAcceptorImpl>>
acceptors,
+ grpc_server_config_fetcher* server_config_fetcher,
grpc_resource_quota* server_rq,
std::vector<
std::unique_ptr<grpc::experimental::ServerInterceptorFactoryInterface>>
@@ -936,13 +918,14 @@ Server::Server(
}
}
server_ = grpc_server_create(&channel_args, nullptr);
+ grpc_server_set_config_fetcher(server_, server_config_fetcher);
}
Server::~Server() {
{
grpc::internal::ReleasableMutexLock lock(&mu_);
if (started_ && !shutdown_) {
- lock.Unlock();
+ lock.Release();
Shutdown();
} else if (!started_) {
// Shutdown the completion queues
@@ -950,7 +933,12 @@ Server::~Server() {
value->Shutdown();
}
if (callback_cq_ != nullptr) {
- callback_cq_->Shutdown();
+ if (grpc_iomgr_run_in_background()) {
+ // gRPC-core provides the backing needed for the preferred CQ type
+ callback_cq_->Shutdown();
+ } else {
+ CompletionQueue::ReleaseCallbackAlternativeCQ(callback_cq_);
+ }
callback_cq_ = nullptr;
}
}
@@ -1005,7 +993,7 @@ static grpc_server_register_method_payload_handling PayloadHandlingForMethod(
GPR_UNREACHABLE_CODE(return GRPC_SRM_PAYLOAD_NONE;);
}
-bool Server::RegisterService(const TString* host, grpc::Service* service) {
+bool Server::RegisterService(const TString* addr, grpc::Service* service) {
bool has_async_methods = service->has_async_methods();
if (has_async_methods) {
GPR_ASSERT(service->server_ == nullptr &&
@@ -1016,12 +1004,12 @@ bool Server::RegisterService(const TString* host, grpc::Service* service) {
const char* method_name = nullptr;
for (const auto& method : service->methods_) {
- if (method.get() == nullptr) { // Handled by generic service if any.
+ if (method == nullptr) { // Handled by generic service if any.
continue;
}
void* method_registration_tag = grpc_server_register_method(
- server_, method->name(), host ? host->c_str() : nullptr,
+ server_, method->name(), addr ? addr->c_str() : nullptr,
PayloadHandlingForMethod(method.get()), 0);
if (method_registration_tag == nullptr) {
gpr_log(GPR_DEBUG, "Attempt to register %s multiple times",
@@ -1118,7 +1106,9 @@ void Server::UnrefAndWaitLocked() {
shutdown_done_ = true;
return; // no need to wait on CV since done condition already set
}
- shutdown_done_cv_.WaitUntil(&mu_, [this] { return shutdown_done_; });
+ grpc::internal::WaitUntil(
+ &shutdown_done_cv_, &mu_,
+ [this]() Y_ABSL_EXCLUSIVE_LOCKS_REQUIRED(mu_) { return shutdown_done_; });
}
void Server::Start(grpc::ServerCompletionQueue** cqs, size_t num_cqs) {
@@ -1157,7 +1147,7 @@ void Server::Start(grpc::ServerCompletionQueue** cqs, size_t num_cqs) {
// service to handle any unimplemented methods using the default reactor
// creator
if (has_callback_methods_ && !has_callback_generic_service_) {
- unimplemented_service_.reset(new grpc::CallbackGenericService);
+ unimplemented_service_ = y_absl::make_unique<grpc::CallbackGenericService>();
RegisterCallbackGenericService(unimplemented_service_.get());
}
@@ -1167,13 +1157,27 @@ void Server::Start(grpc::ServerCompletionQueue** cqs, size_t num_cqs) {
}
#endif
- grpc_server_start(server_);
+ // If we have a generic service, all unmatched method names go there.
+ // Otherwise, we must provide at least one RPC request for an "unimplemented"
+ // RPC, which covers any RPC for a method name that isn't matched. If we
+ // have a sync service, let it be a sync unimplemented RPC, which must be
+ // registered before server start (to initialize an AllocatingRequestMatcher).
+ // If we have an AllocatingRequestMatcher, we can't also specify other
+ // unimplemented RPCs via explicit async requests, so we won't do so. If we
+ // only have async services, we can specify unimplemented RPCs on each async
+ // CQ so that some user polling thread will move them along as long as some
+ // progress is being made on any RPCs in the system.
+ bool unknown_rpc_needed =
+ !has_async_generic_service_ && !has_callback_generic_service_;
+
+ if (unknown_rpc_needed && !sync_req_mgrs_.empty()) {
+ sync_req_mgrs_[0]->AddUnknownSyncMethod();
+ unknown_rpc_needed = false;
+ }
- if (!has_async_generic_service_ && !has_callback_generic_service_) {
- for (const auto& value : sync_req_mgrs_) {
- value->AddUnknownSyncMethod();
- }
+ grpc_server_start(server_);
+ if (unknown_rpc_needed) {
for (size_t i = 0; i < num_cqs; i++) {
if (cqs[i]->IsFrequentlyPolled()) {
new UnimplementedAsyncRequest(this, cqs[i]);
@@ -1182,14 +1186,15 @@ void Server::Start(grpc::ServerCompletionQueue** cqs, size_t num_cqs) {
if (health_check_cq != nullptr) {
new UnimplementedAsyncRequest(this, health_check_cq);
}
+ unknown_rpc_needed = false;
}
// If this server has any support for synchronous methods (has any sync
// server CQs), make sure that we have a ResourceExhausted handler
// to deal with the case of thread exhaustion
if (sync_server_cqs_ != nullptr && !sync_server_cqs_->empty()) {
- resource_exhausted_handler_.reset(
- new grpc::internal::ResourceExhaustedHandler);
+ resource_exhausted_handler_ =
+ y_absl::make_unique<grpc::internal::ResourceExhaustedHandler>();
}
for (const auto& value : sync_req_mgrs_) {
@@ -1219,7 +1224,7 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
/// The completion queue to use for server shutdown completion notification
grpc::CompletionQueue shutdown_cq;
- grpc::ShutdownTag shutdown_tag; // Dummy shutdown tag
+ grpc::ShutdownTag shutdown_tag; // Phony shutdown tag
grpc_server_shutdown_and_notify(server_, shutdown_cq.cq(), &shutdown_tag);
shutdown_cq.Shutdown();
@@ -1237,6 +1242,9 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
// Else in case of SHUTDOWN or GOT_EVENT, it means that the server has
// successfully shutdown
+ // Drop the shutdown ref and wait for all other refs to drop as well.
+ UnrefAndWaitLocked();
+
// Shutdown all ThreadManagers. This will try to gracefully stop all the
// threads in the ThreadManagers (once they process any inflight requests)
for (const auto& value : sync_req_mgrs_) {
@@ -1248,13 +1256,15 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
value->Wait();
}
- // Drop the shutdown ref and wait for all other refs to drop as well.
- UnrefAndWaitLocked();
-
// Shutdown the callback CQ. The CQ is owned by its own shutdown tag, so it
// will delete itself at true shutdown.
if (callback_cq_ != nullptr) {
- callback_cq_->Shutdown();
+ if (grpc_iomgr_run_in_background()) {
+ // gRPC-core provides the backing needed for the preferred CQ type
+ callback_cq_->Shutdown();
+ } else {
+ CompletionQueue::ReleaseCallbackAlternativeCQ(callback_cq_);
+ }
callback_cq_ = nullptr;
}
@@ -1265,7 +1275,7 @@ void Server::ShutdownInternal(gpr_timespec deadline) {
}
shutdown_notified_ = true;
- shutdown_cv_.Broadcast();
+ shutdown_cv_.SignalAll();
#ifndef NDEBUG
// Unregister this server with the CQs passed into it by the user so that
@@ -1326,13 +1336,19 @@ grpc::CompletionQueue* Server::CallbackCQ() {
if (callback_cq_ != nullptr) {
return callback_cq_;
}
- auto* shutdown_callback = new grpc::ShutdownCallback;
- callback_cq_ = new grpc::CompletionQueue(grpc_completion_queue_attributes{
- GRPC_CQ_CURRENT_VERSION, GRPC_CQ_CALLBACK, GRPC_CQ_DEFAULT_POLLING,
- shutdown_callback});
-
- // Transfer ownership of the new cq to its own shutdown callback
- shutdown_callback->TakeCQ(callback_cq_);
+ if (grpc_iomgr_run_in_background()) {
+ // gRPC-core provides the backing needed for the preferred CQ type
+ auto* shutdown_callback = new grpc::ShutdownCallback;
+ callback_cq_ = new grpc::CompletionQueue(grpc_completion_queue_attributes{
+ GRPC_CQ_CURRENT_VERSION, GRPC_CQ_CALLBACK, GRPC_CQ_DEFAULT_POLLING,
+ shutdown_callback});
+
+ // Transfer ownership of the new cq to its own shutdown callback
+ shutdown_callback->TakeCQ(callback_cq_);
+ } else {
+ // Otherwise we need to use the alternative CQ variant
+ callback_cq_ = CompletionQueue::CallbackAlternativeCQ();
+ }
return callback_cq_;
}
diff --git a/contrib/libs/grpc/src/cpp/server/server_context.cc b/contrib/libs/grpc/src/cpp/server/server_context.cc
index 458ac20d87c..df82c69ed8e 100644
--- a/contrib/libs/grpc/src/cpp/server/server_context.cc
+++ b/contrib/libs/grpc/src/cpp/server/server_context.cc
@@ -28,6 +28,7 @@
#include <grpc/support/log.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/codegen/completion_queue.h>
+#include <grpcpp/impl/grpc_library.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/support/time.h>
@@ -37,6 +38,8 @@
namespace grpc {
+static internal::GrpcLibraryInitializer g_gli_initializer;
+
// CompletionOp
class ServerContextBase::CompletionOp final
@@ -62,7 +65,7 @@ class ServerContextBase::CompletionOp final
CompletionOp(CompletionOp&&) = delete;
CompletionOp& operator=(CompletionOp&&) = delete;
- ~CompletionOp() {
+ ~CompletionOp() override {
if (call_.server_rpc_info()) {
call_.server_rpc_info()->Unref();
}
@@ -121,11 +124,12 @@ class ServerContextBase::CompletionOp final
void ContinueFinalizeResultAfterInterception() override {
done_intercepting_ = true;
if (!has_tag_) {
- /* We don't have a tag to return. */
+ // We don't have a tag to return.
Unref();
+ // Unref can delete this, so do not access anything from this afterward.
return;
}
- /* Start a dummy op so that we can return the tag */
+ /* Start a phony op so that we can return the tag */
GPR_ASSERT(grpc_call_start_batch(call_.call(), nullptr, 0, core_cq_tag_,
nullptr) == GRPC_CALL_OK);
}
@@ -174,33 +178,41 @@ void ServerContextBase::CompletionOp::FillOps(internal::Call* call) {
}
bool ServerContextBase::CompletionOp::FinalizeResult(void** tag, bool* status) {
- // Decide whether to call the cancel callback within the lock
- bool call_cancel;
+ // Decide whether to do the unref or call the cancel callback within the lock
+ bool do_unref = false;
+ bool has_tag = false;
+ bool call_cancel = false;
{
grpc_core::MutexLock lock(&mu_);
if (done_intercepting_) {
// We are done intercepting.
- bool has_tag = has_tag_;
+ has_tag = has_tag_;
if (has_tag) {
*tag = tag_;
}
- Unref();
- return has_tag;
- }
- finalized_ = true;
+ // Release the lock before unreffing as Unref may delete this object
+ do_unref = true;
+ } else {
+ finalized_ = true;
+
+ // If for some reason the incoming status is false, mark that as a
+ // cancellation.
+ // TODO(vjpai): does this ever happen?
+ if (!*status) {
+ cancelled_ = 1;
+ }
- // If for some reason the incoming status is false, mark that as a
- // cancellation.
- // TODO(vjpai): does this ever happen?
- if (!*status) {
- cancelled_ = 1;
+ call_cancel = (cancelled_ != 0);
+ // Release the lock since we may call a callback and interceptors.
}
-
- call_cancel = (cancelled_ != 0);
- // Release the lock since we may call a callback and interceptors.
}
+ if (do_unref) {
+ Unref();
+ // Unref can delete this, so do not access anything from this afterward.
+ return has_tag;
+ }
if (call_cancel && callback_controller_ != nullptr) {
callback_controller_->MaybeCallOnCancel();
}
@@ -214,6 +226,7 @@ bool ServerContextBase::CompletionOp::FinalizeResult(void** tag, bool* status) {
*tag = tag_;
}
Unref();
+ // Unref can delete this, so do not access anything from this afterward.
return has_tag;
}
// There are interceptors to be run. Return false for now.
@@ -223,7 +236,9 @@ bool ServerContextBase::CompletionOp::FinalizeResult(void** tag, bool* status) {
// ServerContextBase body
ServerContextBase::ServerContextBase()
- : deadline_(gpr_inf_future(GPR_CLOCK_REALTIME)) {}
+ : deadline_(gpr_inf_future(GPR_CLOCK_REALTIME)) {
+ g_gli_initializer.summon();
+}
ServerContextBase::ServerContextBase(gpr_timespec deadline,
grpc_metadata_array* arr)
@@ -240,6 +255,7 @@ void ServerContextBase::BindDeadlineAndMetadata(gpr_timespec deadline,
ServerContextBase::~ServerContextBase() {
if (completion_op_) {
completion_op_->Unref();
+ // Unref can delete completion_op_, so do not access it afterward.
}
if (rpc_info_) {
rpc_info_->Unref();
diff --git a/contrib/libs/grpc/src/cpp/server/server_credentials.cc b/contrib/libs/grpc/src/cpp/server/server_credentials.cc
index c3b3a8b3793..36b5a52dc7c 100644
--- a/contrib/libs/grpc/src/cpp/server/server_credentials.cc
+++ b/contrib/libs/grpc/src/cpp/server/server_credentials.cc
@@ -18,8 +18,13 @@
#include <grpcpp/security/server_credentials.h>
+#include <grpcpp/impl/grpc_library.h>
+
namespace grpc {
+static internal::GrpcLibraryInitializer g_gli_initializer;
+ServerCredentials::ServerCredentials() { g_gli_initializer.summon(); }
+
ServerCredentials::~ServerCredentials() {}
} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/server/xds_server_credentials.cc b/contrib/libs/grpc/src/cpp/server/xds_server_credentials.cc
new file mode 100644
index 00000000000..b543f3f172d
--- /dev/null
+++ b/contrib/libs/grpc/src/cpp/server/xds_server_credentials.cc
@@ -0,0 +1,41 @@
+//
+//
+// 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 "src/cpp/server/secure_server_credentials.h"
+
+namespace grpc {
+namespace experimental {
+
+std::shared_ptr<ServerCredentials> XdsServerCredentials(
+ const std::shared_ptr<ServerCredentials>& fallback_credentials) {
+ GPR_ASSERT(fallback_credentials != nullptr);
+ if (fallback_credentials->IsInsecure()) {
+ grpc_server_credentials* insecure_creds =
+ grpc_insecure_server_credentials_create();
+ auto xds_creds = std::make_shared<SecureServerCredentials>(
+ grpc_xds_server_credentials_create(insecure_creds));
+ grpc_server_credentials_release(insecure_creds);
+ return xds_creds;
+ }
+ return std::make_shared<SecureServerCredentials>(
+ grpc_xds_server_credentials_create(
+ fallback_credentials->AsSecureServerCredentials()->c_creds()));
+}
+
+} // namespace experimental
+} // namespace grpc
diff --git a/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.cc b/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.cc
index c8560aa81dd..5155f610a8c 100644
--- a/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.cc
+++ b/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.cc
@@ -152,7 +152,7 @@ void ThreadManager::MainWorkLoop() {
bool ok;
WorkStatus work_status = PollForWork(&tag, &ok);
- grpc_core::ReleasableMutexLock lock(&mu_);
+ grpc_core::LockableAndReleasableMutexLock lock(&mu_);
// Reduce the number of pollers by 1 and check what happened with the poll
num_pollers_--;
bool done = false;
@@ -179,7 +179,7 @@ void ThreadManager::MainWorkLoop() {
max_active_threads_sofar_ = num_threads_;
}
// Drop lock before spawning thread to avoid contention
- lock.Unlock();
+ lock.Release();
WorkerThread* worker = new WorkerThread(this);
if (worker->created()) {
worker->Start();
@@ -195,17 +195,17 @@ void ThreadManager::MainWorkLoop() {
// There is still at least some thread polling, so we can go on
// even though we are below the number of pollers that we would
// like to have (min_pollers_)
- lock.Unlock();
+ lock.Release();
} else {
// There are no pollers to spare and we couldn't allocate
// a new thread, so resources are exhausted!
- lock.Unlock();
+ lock.Release();
resource_exhausted = true;
}
} else {
// There are a sufficient number of pollers available so we can do
// the work and continue polling with our existing poller threads
- lock.Unlock();
+ lock.Release();
}
// Lock is always released at this point - do the application work
// or return resource exhausted if there is new work but we couldn't
diff --git a/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.h b/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.h
index 43f1fd5585f..aae24177873 100644
--- a/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.h
+++ b/contrib/libs/grpc/src/cpp/thread_manager/thread_manager.h
@@ -119,7 +119,7 @@ class ThreadManager {
// not be called (and the need for this WorkerThread class is eliminated)
class WorkerThread {
public:
- WorkerThread(ThreadManager* thd_mgr);
+ explicit WorkerThread(ThreadManager* thd_mgr);
~WorkerThread();
bool created() const { return created_; }
diff --git a/contrib/libs/grpc/src/cpp/util/error_details.cc b/contrib/libs/grpc/src/cpp/util/error_details.cc
index dfd3351be15..0330f012c27 100644
--- a/contrib/libs/grpc/src/cpp/util/error_details.cc
+++ b/contrib/libs/grpc/src/cpp/util/error_details.cc
@@ -17,34 +17,3 @@
*/
#include <grpcpp/support/error_details.h>
-
-#include "src/proto/grpc/status/status.pb.h"
-
-namespace grpc {
-
-grpc::Status ExtractErrorDetails(const grpc::Status& from,
- ::google::rpc::Status* to) {
- if (to == nullptr) {
- return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
- }
- if (!to->ParseFromString(TProtoStringType(from.error_details()))) {
- return grpc::Status(grpc::StatusCode::INVALID_ARGUMENT, "");
- }
- return grpc::Status::OK;
-}
-
-grpc::Status SetErrorDetails(const ::google::rpc::Status& from,
- grpc::Status* to) {
- if (to == nullptr) {
- return grpc::Status(grpc::StatusCode::FAILED_PRECONDITION, "");
- }
- grpc::StatusCode code = grpc::StatusCode::UNKNOWN;
- if (from.code() >= grpc::StatusCode::OK &&
- from.code() <= grpc::StatusCode::UNAUTHENTICATED) {
- code = static_cast<grpc::StatusCode>(from.code());
- }
- *to = grpc::Status(code, from.message(), from.SerializeAsString());
- return grpc::Status::OK;
-}
-
-} // namespace grpc
diff --git a/contrib/libs/grpc/src/proto/grpc/auth/v1/authz_policy.proto b/contrib/libs/grpc/src/proto/grpc/auth/v1/authz_policy.proto
new file mode 100644
index 00000000000..347386f3e66
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/auth/v1/authz_policy.proto
@@ -0,0 +1,122 @@
+// Copyright 2021 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package grpc.auth.v1;
+
+// Peer specifies attributes of a peer. Fields in the Peer are ANDed together, once
+// we support multiple fields in the future.
+message Peer {
+ // Optional. A list of peer identities to match for authorization. The principals
+ // are one of, i.e., it matches if one of the principals matches. The field
+ // supports Exact, Prefix, Suffix, and Presence matches.
+ // - Exact match: "abc" will match on value "abc".
+ // - Prefix match: "abc*" will match on value "abc" and "abcd".
+ // - Suffix match: "*abc" will match on value "abc" and "xabc".
+ // - Presence match: "*" will match when the value is not empty.
+ repeated string principals = 1;
+}
+
+// Specification of HTTP header match attributes.
+message Header {
+ // Required. The name of the HTTP header to match. The following headers are *not*
+ // supported: "hop-by-hop" headers (e.g., those listed in "Connection" header),
+ // HTTP/2 pseudo headers (":"-prefixed), the "Host" header, and headers prefixed
+ // with "grpc-".
+ string key = 1;
+
+ // Required. A list of header values to match. The header values are ORed together,
+ // i.e., it matches if one of the values matches. This field supports Exact,
+ // Prefix, Suffix, and Presence match. Multi-valued headers are considered a single
+ // value with commas added between values.
+ // - Exact match: "abc" will match on value "abc".
+ // - Prefix match: "abc*" will match on value "abc" and "abcd".
+ // - Suffix match: "*abc" will match on value "abc" and "xabc".
+ // - Presence match: "*" will match when the value is not empty.
+ repeated string values = 2;
+}
+
+// Request specifies attributes of a request. Fields in the Request are ANDed
+// together.
+message Request {
+ // Optional. A list of paths to match for authorization. This is the fully
+ // qualified name in the form of "/package.service/method". The paths are ORed
+ // together, i.e., it matches if one of the paths matches. This field supports
+ // Exact, Prefix, Suffix, and Presence matches.
+ // - Exact match: "abc" will match on value "abc".
+ // - Prefix match: "abc*" will match on value "abc" and "abcd".
+ // - Suffix match: "*abc" will match on value "abc" and "xabc".
+ // - Presence match: "*" will match when the value is not empty.
+ repeated string paths = 1;
+
+ // Optional. A list of HTTP header key/value pairs to match against, for
+ // potentially advanced use cases. The headers are ANDed together, i.e., it matches
+ // only if *all* the headers match.
+ repeated Header headers = 3;
+}
+
+// Specification of rules.
+message Rule {
+ // Required. The name of an authorization rule.
+ // It is mainly for monitoring and error message generation.
+ string name = 1;
+
+ // Optional. If not set, no checks will be performed against the source. An empty
+ // rule is always matched (i.e., both source and request are empty).
+ Peer source = 2;
+
+ // Optional. If not set, no checks will be performed against the request. An empty
+ // rule is always matched (i.e., both source and request are empty).
+ Request request = 3;
+}
+
+// AuthorizationPolicy defines which principals are permitted to access which
+// resource. Resources are RPC methods scoped by services.
+//
+// In the following yaml policy example, a peer identity from ["admin1", "admin2", "admin3"]
+// is authorized to access any RPC methods in pkg.service, and peer identity "dev" is
+// authorized to access the "foo" and "bar" RPC methods.
+//
+// name: example-policy
+// allow_rules:
+// - name: admin-access
+// source:
+// principals:
+// - "spiffe://foo.com/sa/admin1"
+// - "spiffe://foo.com/sa/admin2"
+// - "spiffe://foo.com/sa/admin3"
+// request:
+// paths: ["/pkg.service/*"]
+// - name: dev-access
+// source:
+// principals: ["spiffe://foo.com/sa/dev"]
+// request:
+// paths: ["/pkg.service/foo", "/pkg.service/bar"]
+
+message AuthorizationPolicy {
+ // Required. The name of an authorization policy.
+ // It is mainly for monitoring and error message generation.
+ string name = 1;
+
+ // Optional. List of deny rules to match. If a request matches any of the deny
+ // rules, then it will be denied. If none of the deny rules matches or there are
+ // no deny rules, the allow rules will be evaluated.
+ repeated Rule deny_rules = 2;
+
+ // Required. List of allow rules to match. The allow rules will only be evaluated
+ // after the deny rules. If a request matches any of the allow rules, then it will
+ // allowed. If none of the allow rules matches, it will be denied.
+ repeated Rule allow_rules = 3;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/messages.proto b/contrib/libs/grpc/src/proto/grpc/testing/messages.proto
index 70e34277607..559876ed7c0 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/messages.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/messages.proto
@@ -212,3 +212,59 @@ message LoadBalancerStatsResponse {
int32 num_failures = 2;
map<string, RpcsByPeer> rpcs_by_method = 3;
}
+
+// Request for retrieving a test client's accumulated stats.
+message LoadBalancerAccumulatedStatsRequest {}
+
+// Accumulated stats for RPCs sent by a test client.
+message LoadBalancerAccumulatedStatsResponse {
+ // The total number of RPCs have ever issued for each type.
+ // Deprecated: use stats_per_method.rpcs_started instead.
+ map<string, int32> num_rpcs_started_by_method = 1 [deprecated = true];
+ // The total number of RPCs have ever completed successfully for each type.
+ // Deprecated: use stats_per_method.result instead.
+ map<string, int32> num_rpcs_succeeded_by_method = 2 [deprecated = true];
+ // The total number of RPCs have ever failed for each type.
+ // Deprecated: use stats_per_method.result instead.
+ map<string, int32> num_rpcs_failed_by_method = 3 [deprecated = true];
+
+ message MethodStats {
+ // The number of RPCs that were started for this method.
+ int32 rpcs_started = 1;
+
+ // The number of RPCs that completed with each status for this method. The
+ // key is the integral value of a google.rpc.Code; the value is the count.
+ map<int32, int32> result = 2;
+ }
+
+ // Per-method RPC statistics. The key is the RpcType in string form; e.g.
+ // 'EMPTY_CALL' or 'UNARY_CALL'
+ map<string, MethodStats> stats_per_method = 4;
+}
+
+// Configurations for a test client.
+message ClientConfigureRequest {
+ // Type of RPCs to send.
+ enum RpcType {
+ EMPTY_CALL = 0;
+ UNARY_CALL = 1;
+ }
+
+ // Metadata to be attached for the given type of RPCs.
+ message Metadata {
+ RpcType type = 1;
+ string key = 2;
+ string value = 3;
+ }
+
+ // The types of RPCs the client sends.
+ repeated RpcType types = 1;
+ // The collection of custom metadata to be attached to RPCs sent by the client.
+ repeated Metadata metadata = 2;
+ // The deadline to use, in seconds, for all RPCs. If unset or zero, the
+ // client will use the default from the command-line.
+ int32 timeout_sec = 3;
+}
+
+// Response for updating a test client's configuration.
+message ClientConfigureResponse {}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/test.proto b/contrib/libs/grpc/src/proto/grpc/testing/test.proto
index 1da43f48989..5805a41da99 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/test.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/test.proto
@@ -83,6 +83,10 @@ service LoadBalancerStatsService {
// Gets the backend distribution for RPCs sent by a test client.
rpc GetClientStats(LoadBalancerStatsRequest)
returns (LoadBalancerStatsResponse) {}
+
+ // Gets the accumulated stats for RPCs sent by a test client.
+ rpc GetClientAccumulatedStats(LoadBalancerAccumulatedStatsRequest)
+ returns (LoadBalancerAccumulatedStatsResponse) {}
}
// A service to remotely control health status of an xDS test server.
@@ -90,3 +94,9 @@ service XdsUpdateHealthService {
rpc SetServing(grpc.testing.Empty) returns (grpc.testing.Empty);
rpc SetNotServing(grpc.testing.Empty) returns (grpc.testing.Empty);
}
+
+// A service to dynamically update the configuration of an xDS test client.
+service XdsUpdateClientConfigureService {
+ // Update the tes client's configuration.
+ rpc Configure(ClientConfigureRequest) returns (ClientConfigureResponse);
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/src/proto/grpc/testing/xds/.yandex_meta/licenses.list.txt
index 9c1158fe2e9..a8fd056f8cc 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/.yandex_meta/licenses.list.txt
@@ -18,3 +18,7 @@
====================COPYRIGHT====================
// Copyright 2020 The gRPC Authors
+
+
+====================COPYRIGHT====================
+// Copyright 2021 The gRPC Authors
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/cds_for_test.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/cds_for_test.proto
index 8ea198d0ee7..3d3c1c164fb 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/cds_for_test.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/cds_for_test.proto
@@ -72,6 +72,15 @@ message CircuitBreakers {
repeated Thresholds thresholds = 1;
}
+message ClusterConfig {
+ repeated string clusters = 1;
+}
+
+message CustomClusterType {
+ string name = 1;
+ ClusterConfig typed_config = 2;
+}
+
message Cluster {
// Refer to :ref:`service discovery type <arch_overview_service_discovery_types>`
// for an explanation on each type.
@@ -106,6 +115,9 @@ message Cluster {
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
DiscoveryType type = 2;
+
+ // The custom cluster type: aggregate cluster in this case.
+ CustomClusterType cluster_type = 38;
}
// Only valid when discovery type is EDS.
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/address.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/address.proto
index abea8bf68a6..38592ccfda9 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/address.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/address.proto
@@ -18,6 +18,8 @@ syntax = "proto3";
package envoy.config.core.v3;
+import "google/protobuf/wrappers.proto";
+
// [#protodoc-title: Network addresses]
// [#next-free-field: 7]
@@ -48,3 +50,13 @@ message Address {
SocketAddress socket_address = 1;
}
}
+
+// CidrRange specifies an IP Address and a prefix length to construct
+// the subnet mask for a `CIDR <https://tools.ietf.org/html/rfc4632>`_ range.
+message CidrRange {
+ // IPv4 or IPv6 address, e.g. ``192.0.0.0`` or ``2001:db8::``.
+ string address_prefix = 1;
+
+ // Length of prefix, e.g. 0, 32.
+ google.protobuf.UInt32Value prefix_len = 2;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/ads.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/ads.proto
index aea815d0006..d576c1ddc57 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/ads.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/ads.proto
@@ -41,5 +41,5 @@ service AggregatedDiscoveryService {
// [#not-implemented-hide:] Not configuration. Workaround c++ protobuf issue with importing
// services: https://github.com/google/protobuf/issues/4221
-message AdsDummy {
+message AdsPhony {
}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/aggregate_cluster.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/aggregate_cluster.proto
new file mode 100644
index 00000000000..d14ad350bac
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/aggregate_cluster.proto
@@ -0,0 +1,28 @@
+// Copyright 2020 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.extensions.clusters.aggregate.v3;
+
+// Configuration for the aggregate cluster. See the :ref:`architecture overview
+// <arch_overview_aggregate_cluster>` for more information.
+// [#extension: envoy.clusters.aggregate]
+message ClusterConfig {
+ // Load balancing clusters in aggregate cluster. Clusters are prioritized based on the order they
+ // appear in this list.
+ repeated string clusters = 1;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/base.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/base.proto
index acecdda806a..b5acb0945b7 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/base.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/base.proto
@@ -20,6 +20,7 @@ package envoy.config.core.v3;
import "src/proto/grpc/testing/xds/v3/percent.proto";
+import "google/protobuf/any.proto";
import "google/protobuf/struct.proto";
// Identifies location of where either Envoy runs or where upstream hosts run.
@@ -109,3 +110,19 @@ message RuntimeFractionalPercent {
// Default value if the runtime value's for the numerator/denominator keys are not available.
type.v3.FractionalPercent default_value = 1;
}
+
+// Configuration for transport socket in :ref:`listeners <config_listeners>` and
+// :ref:`clusters <envoy_api_msg_config.cluster.v3.Cluster>`. If the configuration is
+// empty, a default transport socket implementation and configuration will be
+// chosen based on the platform and existence of tls_context.
+message TransportSocket {
+ // The name of the transport socket to instantiate. The name must match a supported transport
+ // socket implementation.
+ string name = 1;
+
+ // Implementation specific configuration which depends on the implementation being instantiated.
+ // See the supported transport socket implementations for further documentation.
+ oneof config_type {
+ google.protobuf.Any typed_config = 3;
+ }
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/cluster.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/cluster.proto
index c20d887bc21..c04fe20a919 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/cluster.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/cluster.proto
@@ -18,8 +18,10 @@ syntax = "proto3";
package envoy.config.cluster.v3;
+import "src/proto/grpc/testing/xds/v3/base.proto";
import "src/proto/grpc/testing/xds/v3/config_source.proto";
+import "google/protobuf/any.proto";
import "google/protobuf/wrappers.proto";
enum RoutingPriority {
@@ -35,6 +37,16 @@ message CircuitBreakers {
repeated Thresholds thresholds = 1;
}
+// Extended cluster type.
+message CustomClusterType {
+ // The type of the cluster to instantiate. The name must match a supported cluster type.
+ string name = 1;
+
+ // Cluster specific configuration which depends on the cluster being instantiated.
+ // See the supported cluster for further documentation.
+ google.protobuf.Any typed_config = 2;
+}
+
// [#protodoc-title: Cluster configuration]
// Configuration for a single upstream cluster.
@@ -133,6 +145,9 @@ message Cluster {
// The :ref:`service discovery type <arch_overview_service_discovery_types>`
// to use for resolving the cluster.
DiscoveryType type = 2;
+
+ // The custom cluster type.
+ CustomClusterType cluster_type = 38;
}
// Configuration to use for EDS updates for the Cluster.
@@ -144,6 +159,13 @@ message Cluster {
CircuitBreakers circuit_breakers = 10;
+ // Optional custom transport socket implementation to use for upstream connections.
+ // To setup TLS, set a transport socket with name `tls` and
+ // :ref:`UpstreamTlsContexts <envoy_api_msg_extensions.transport_sockets.tls.v3.UpstreamTlsContext>` in the `typed_config`.
+ // If no transport socket configuration is specified, new connections
+ // will be set up with plaintext.
+ core.v3.TransportSocket transport_socket = 24;
+
// [#not-implemented-hide:]
// If present, tells the client where to send load reports via LRS. If not present, the
// client will fall back to a client-side default, which may be either (a) don't send any
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/config_dump.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/config_dump.proto
new file mode 100644
index 00000000000..d69b3109aac
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/config_dump.proto
@@ -0,0 +1,284 @@
+// Copyright 2021 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.admin.v3;
+
+import "google/protobuf/any.proto";
+import "google/protobuf/timestamp.proto";
+
+// Resource status from the view of a xDS client, which tells the synchronization
+// status between the xDS client and the xDS server.
+enum ClientResourceStatus {
+ // Resource status is not available/unknown.
+ UNKNOWN = 0;
+
+ // Client requested this resource but hasn't received any update from management
+ // server. The client will not fail requests, but will queue them until update
+ // arrives or the client times out waiting for the resource.
+ REQUESTED = 1;
+
+ // This resource has been requested by the client but has either not been
+ // delivered by the server or was previously delivered by the server and then
+ // subsequently removed from resources provided by the server. For more
+ // information, please refer to the :ref:`"Knowing When a Requested Resource
+ // Does Not Exist" <xds_protocol_resource_not_existed>` section.
+ DOES_NOT_EXIST = 2;
+
+ // Client received this resource and replied with ACK.
+ ACKED = 3;
+
+ // Client received this resource and replied with NACK.
+ NACKED = 4;
+}
+
+message UpdateFailureState {
+ // What the component configuration would have been if the update had succeeded.
+ // This field may not be populated by xDS clients due to storage overhead.
+ google.protobuf.Any failed_configuration = 1;
+
+ // Time of the latest failed update attempt.
+ google.protobuf.Timestamp last_update_attempt = 2;
+
+ // Details about the last failed update attempt.
+ string details = 3;
+
+ // This is the version of the rejected resource.
+ // [#not-implemented-hide:]
+ string version_info = 4;
+}
+
+// Envoy's listener manager fills this message with all currently known listeners. Listener
+// configuration information can be used to recreate an Envoy configuration by populating all
+// listeners as static listeners or by returning them in a LDS response.
+message ListenersConfigDump {
+ // Describes a statically loaded listener.
+ message StaticListener {
+ // The listener config.
+ google.protobuf.Any listener = 1;
+
+ // The timestamp when the Listener was last successfully updated.
+ google.protobuf.Timestamp last_updated = 2;
+ }
+
+ message DynamicListenerState {
+ // This is the per-resource version information. This version is currently taken from the
+ // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
+ // that the listener was loaded. In the future, discrete per-listener versions may be supported
+ // by the API.
+ string version_info = 1;
+
+ // The listener config.
+ google.protobuf.Any listener = 2;
+
+ // The timestamp when the Listener was last successfully updated.
+ google.protobuf.Timestamp last_updated = 3;
+ }
+
+ // Describes a dynamically loaded listener via the LDS API.
+ // [#next-free-field: 7]
+ message DynamicListener {
+ // The name or unique id of this listener, pulled from the DynamicListenerState config.
+ string name = 1;
+
+ // The listener state for any active listener by this name.
+ // These are listeners that are available to service data plane traffic.
+ DynamicListenerState active_state = 2;
+
+ // The listener state for any warming listener by this name.
+ // These are listeners that are currently undergoing warming in preparation to service data
+ // plane traffic. Note that if attempting to recreate an Envoy configuration from a
+ // configuration dump, the warming listeners should generally be discarded.
+ DynamicListenerState warming_state = 3;
+
+ // The listener state for any draining listener by this name.
+ // These are listeners that are currently undergoing draining in preparation to stop servicing
+ // data plane traffic. Note that if attempting to recreate an Envoy configuration from a
+ // configuration dump, the draining listeners should generally be discarded.
+ DynamicListenerState draining_state = 4;
+
+ // Set if the last update failed, cleared after the next successful update.
+ // The *error_state* field contains the rejected version of this particular
+ // resource along with the reason and timestamp. For successfully updated or
+ // acknowledged resource, this field should be empty.
+ UpdateFailureState error_state = 5;
+
+ // The client status of this resource.
+ // [#not-implemented-hide:]
+ ClientResourceStatus client_status = 6;
+ }
+
+ // This is the :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
+ // last processed LDS discovery response. If there are only static bootstrap listeners, this field
+ // will be "".
+ string version_info = 1;
+
+ // The statically loaded listener configs.
+ repeated StaticListener static_listeners = 2;
+
+ // State for any warming, active, or draining listeners.
+ repeated DynamicListener dynamic_listeners = 3;
+}
+
+// Envoy's cluster manager fills this message with all currently known clusters. Cluster
+// configuration information can be used to recreate an Envoy configuration by populating all
+// clusters as static clusters or by returning them in a CDS response.
+message ClustersConfigDump {
+ // Describes a statically loaded cluster.
+ message StaticCluster {
+ // The cluster config.
+ google.protobuf.Any cluster = 1;
+
+ // The timestamp when the Cluster was last updated.
+ google.protobuf.Timestamp last_updated = 2;
+ }
+
+ // Describes a dynamically loaded cluster via the CDS API.
+ // [#next-free-field: 6]
+ message DynamicCluster {
+ // This is the per-resource version information. This version is currently taken from the
+ // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time
+ // that the cluster was loaded. In the future, discrete per-cluster versions may be supported by
+ // the API.
+ string version_info = 1;
+
+ // The cluster config.
+ google.protobuf.Any cluster = 2;
+
+ // The timestamp when the Cluster was last updated.
+ google.protobuf.Timestamp last_updated = 3;
+
+ // Set if the last update failed, cleared after the next successful update.
+ // The *error_state* field contains the rejected version of this particular
+ // resource along with the reason and timestamp. For successfully updated or
+ // acknowledged resource, this field should be empty.
+ // [#not-implemented-hide:]
+ UpdateFailureState error_state = 4;
+
+ // The client status of this resource.
+ // [#not-implemented-hide:]
+ ClientResourceStatus client_status = 5;
+ }
+
+ // This is the :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` in the
+ // last processed CDS discovery response. If there are only static bootstrap clusters, this field
+ // will be "".
+ string version_info = 1;
+
+ // The statically loaded cluster configs.
+ repeated StaticCluster static_clusters = 2;
+
+ // The dynamically loaded active clusters. These are clusters that are available to service
+ // data plane traffic.
+ repeated DynamicCluster dynamic_active_clusters = 3;
+
+ // The dynamically loaded warming clusters. These are clusters that are currently undergoing
+ // warming in preparation to service data plane traffic. Note that if attempting to recreate an
+ // Envoy configuration from a configuration dump, the warming clusters should generally be
+ // discarded.
+ repeated DynamicCluster dynamic_warming_clusters = 4;
+}
+
+// Envoy's RDS implementation fills this message with all currently loaded routes, as described by
+// their RouteConfiguration objects. Static routes that are either defined in the bootstrap configuration
+// or defined inline while configuring listeners are separated from those configured dynamically via RDS.
+// Route configuration information can be used to recreate an Envoy configuration by populating all routes
+// as static routes or by returning them in RDS responses.
+message RoutesConfigDump {
+ message StaticRouteConfig {
+ // The route config.
+ google.protobuf.Any route_config = 1;
+
+ // The timestamp when the Route was last updated.
+ google.protobuf.Timestamp last_updated = 2;
+ }
+
+ // [#next-free-field: 6]
+ message DynamicRouteConfig {
+ // This is the per-resource version information. This version is currently taken from the
+ // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
+ // the route configuration was loaded.
+ string version_info = 1;
+
+ // The route config.
+ google.protobuf.Any route_config = 2;
+
+ // The timestamp when the Route was last updated.
+ google.protobuf.Timestamp last_updated = 3;
+
+ // Set if the last update failed, cleared after the next successful update.
+ // The *error_state* field contains the rejected version of this particular
+ // resource along with the reason and timestamp. For successfully updated or
+ // acknowledged resource, this field should be empty.
+ // [#not-implemented-hide:]
+ UpdateFailureState error_state = 4;
+
+ // The client status of this resource.
+ // [#not-implemented-hide:]
+ ClientResourceStatus client_status = 5;
+ }
+
+ // The statically loaded route configs.
+ repeated StaticRouteConfig static_route_configs = 2;
+
+ // The dynamically loaded route configs.
+ repeated DynamicRouteConfig dynamic_route_configs = 3;
+}
+
+// Envoy's admin fill this message with all currently known endpoints. Endpoint
+// configuration information can be used to recreate an Envoy configuration by populating all
+// endpoints as static endpoints or by returning them in an EDS response.
+message EndpointsConfigDump {
+ message StaticEndpointConfig {
+ // The endpoint config.
+ google.protobuf.Any endpoint_config = 1;
+
+ // [#not-implemented-hide:] The timestamp when the Endpoint was last updated.
+ google.protobuf.Timestamp last_updated = 2;
+ }
+
+ // [#next-free-field: 6]
+ message DynamicEndpointConfig {
+ // [#not-implemented-hide:] This is the per-resource version information. This version is currently taken from the
+ // :ref:`version_info <envoy_api_field_service.discovery.v3.DiscoveryResponse.version_info>` field at the time that
+ // the endpoint configuration was loaded.
+ string version_info = 1;
+
+ // The endpoint config.
+ google.protobuf.Any endpoint_config = 2;
+
+ // [#not-implemented-hide:] The timestamp when the Endpoint was last updated.
+ google.protobuf.Timestamp last_updated = 3;
+
+ // Set if the last update failed, cleared after the next successful update.
+ // The *error_state* field contains the rejected version of this particular
+ // resource along with the reason and timestamp. For successfully updated or
+ // acknowledged resource, this field should be empty.
+ // [#not-implemented-hide:]
+ UpdateFailureState error_state = 4;
+
+ // The client status of this resource.
+ // [#not-implemented-hide:]
+ ClientResourceStatus client_status = 5;
+ }
+
+ // The statically loaded endpoint configs.
+ repeated StaticEndpointConfig static_endpoint_configs = 2;
+
+ // The dynamically loaded endpoint configs.
+ repeated DynamicEndpointConfig dynamic_endpoint_configs = 3;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/csds.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/csds.proto
new file mode 100644
index 00000000000..bbdfd4e048b
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/csds.proto
@@ -0,0 +1,89 @@
+// Copyright 2021 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.service.status.v3;
+
+import "src/proto/grpc/testing/xds/v3/config_dump.proto";
+import "src/proto/grpc/testing/xds/v3/base.proto";
+
+
+// CSDS is Client Status Discovery Service. It can be used to get the status of
+// an xDS-compliant client from the management server's point of view. It can
+// also be used to get the current xDS states directly from the client.
+service ClientStatusDiscoveryService {
+ rpc StreamClientStatus(stream ClientStatusRequest) returns (stream ClientStatusResponse) {}
+ rpc FetchClientStatus(ClientStatusRequest) returns (ClientStatusResponse) {}
+}
+
+// Status of a config from a management server view.
+enum ConfigStatus {
+ // Status info is not available/unknown.
+ UNKNOWN = 0;
+
+ // Management server has sent the config to client and received ACK.
+ SYNCED = 1;
+
+ // Config is not sent.
+ NOT_SENT = 2;
+
+ // Management server has sent the config to client but hasn’t received
+ // ACK/NACK.
+ STALE = 3;
+
+ // Management server has sent the config to client but received NACK. The
+ // attached config dump will be the latest config (the rejected one), since
+ // it is the persisted version in the management server.
+ ERROR = 4;
+}
+
+// Request for client status of clients identified by a list of NodeMatchers.
+message ClientStatusRequest {
+ // The node making the csds request.
+ config.core.v3.Node node = 2;
+}
+
+// Detailed config (per xDS) with status.
+// [#next-free-field: 8]
+message PerXdsConfig {
+ // Config status generated by management servers. Will not be present if the
+ // CSDS server is an xDS client.
+ ConfigStatus status = 1;
+
+ oneof per_xds_config {
+ admin.v3.ListenersConfigDump listener_config = 2;
+
+ admin.v3.ClustersConfigDump cluster_config = 3;
+
+ admin.v3.RoutesConfigDump route_config = 4;
+
+ admin.v3.EndpointsConfigDump endpoint_config = 6;
+ }
+}
+
+// All xds configs for a particular client.
+message ClientConfig {
+ // Node for a particular client.
+ config.core.v3.Node node = 1;
+
+ repeated PerXdsConfig xds_config = 2;
+}
+
+message ClientStatusResponse {
+ // Client configs for the clients specified in the ClientStatusRequest.
+ repeated ClientConfig config = 1;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault.proto
new file mode 100644
index 00000000000..05ec641d0e0
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault.proto
@@ -0,0 +1,91 @@
+// Copyright 2020 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.extensions.filters.http.fault.v3;
+
+import "src/proto/grpc/testing/xds/v3/fault_common.proto";
+import "src/proto/grpc/testing/xds/v3/route.proto";
+import "src/proto/grpc/testing/xds/v3/percent.proto";
+
+import "google/protobuf/wrappers.proto";
+
+// [#protodoc-title: Fault Injection]
+// Fault Injection :ref:`configuration overview <config_http_filters_fault_injection>`.
+// [#extension: envoy.filters.http.fault]
+
+// [#next-free-field: 6]
+message FaultAbort {
+ // Fault aborts are controlled via an HTTP header (if applicable). See the
+ // :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>` documentation for
+ // more information.
+ message HeaderAbort {
+ }
+
+ reserved 1;
+
+ oneof error_type {
+ // HTTP status code to use to abort the HTTP request.
+ uint32 http_status = 2;
+
+ // gRPC status code to use to abort the gRPC request.
+ uint32 grpc_status = 5;
+
+ // Fault aborts are controlled via an HTTP header (if applicable).
+ HeaderAbort header_abort = 4;
+ }
+
+ // The percentage of requests/operations/connections that will be aborted with the error code
+ // provided.
+ type.v3.FractionalPercent percentage = 3;
+}
+
+// [#next-free-field: 15]
+message HTTPFault {
+ // If specified, the filter will inject delays based on the values in the
+ // object.
+ common.fault.v3.FaultDelay delay = 1;
+
+ // If specified, the filter will abort requests based on the values in
+ // the object. At least *abort* or *delay* must be specified.
+ FaultAbort abort = 2;
+
+ // Specifies a set of headers that the filter should match on. The fault
+ // injection filter can be applied selectively to requests that match a set of
+ // headers specified in the fault filter config. The chances of actual fault
+ // injection further depend on the value of the :ref:`percentage
+ // <envoy_api_field_extensions.filters.http.fault.v3.FaultAbort.percentage>` field.
+ // The filter will check the request's headers against all the specified
+ // headers in the filter config. A match will happen if all the headers in the
+ // config are present in the request with the same values (or based on
+ // presence if the *value* field is not in the config).
+ repeated config.route.v3.HeaderMatcher headers = 4;
+
+ // The maximum number of faults that can be active at a single time via the configured fault
+ // filter. Note that because this setting can be overridden at the route level, it's possible
+ // for the number of active faults to be greater than this value (if injected via a different
+ // route). If not specified, defaults to unlimited. This setting can be overridden via
+ // `runtime <config_http_filters_fault_injection_runtime>` and any faults that are not injected
+ // due to overflow will be indicated via the `faults_overflow
+ // <config_http_filters_fault_injection_stats>` stat.
+ //
+ // .. attention::
+ // Like other :ref:`circuit breakers <arch_overview_circuit_break>` in Envoy, this is a fuzzy
+ // limit. It's possible for the number of active faults to rise slightly above the configured
+ // amount due to the implementation details.
+ google.protobuf.UInt32Value max_active_faults = 6;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault_common.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault_common.proto
new file mode 100644
index 00000000000..2c2aedc7896
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/fault_common.proto
@@ -0,0 +1,49 @@
+// Copyright 2020 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.extensions.filters.common.fault.v3;
+
+import "src/proto/grpc/testing/xds/v3/percent.proto";
+
+import "google/protobuf/duration.proto";
+
+// Delay specification is used to inject latency into the
+// HTTP/gRPC/Mongo/Redis operation or delay proxying of TCP connections.
+message FaultDelay {
+ // Fault delays are controlled via an HTTP header (if applicable). See the
+ // :ref:`HTTP fault filter <config_http_filters_fault_injection_http_header>`
+ // documentation for more information.
+ message HeaderDelay {}
+
+ oneof fault_delay_secifier {
+ // Add a fixed delay before forwarding the operation upstream. See
+ // https://developers.google.com/protocol-buffers/docs/proto3#json for
+ // the JSON/YAML Duration mapping. For HTTP/Mongo/Redis, the specified
+ // delay will be injected before a new request/operation. For TCP
+ // connections, the proxying of the connection upstream will be delayed
+ // for the specified period. This is required if type is FIXED.
+ google.protobuf.Duration fixed_delay = 3;
+
+ // Fault delays are controlled via an HTTP header (if applicable).
+ HeaderDelay header_delay = 5;
+ }
+
+ // The percentage of operations/connections/requests on which the delay will
+ // be injected.
+ type.v3.FractionalPercent percentage = 4;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/http_connection_manager.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/http_connection_manager.proto
index 998ad561470..74477073c70 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/http_connection_manager.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/http_connection_manager.proto
@@ -18,14 +18,16 @@ syntax = "proto3";
package envoy.extensions.filters.network.http_connection_manager.v3;
+import "google/protobuf/any.proto";
+
import "src/proto/grpc/testing/xds/v3/config_source.proto";
+import "src/proto/grpc/testing/xds/v3/protocol.proto";
import "src/proto/grpc/testing/xds/v3/route.proto";
// [#protodoc-title: HTTP connection manager]
// HTTP connection manager :ref:`configuration overview <config_http_conn_man>`.
// [#extension: envoy.filters.network.http_connection_manager]
-// [#next-free-field: 38]
message HttpConnectionManager {
oneof route_specifier {
// The connection manager’s route table will be dynamically loaded via the RDS API.
@@ -39,6 +41,15 @@ message HttpConnectionManager {
// specified in this message.
ScopedRoutes scoped_routes = 31;
}
+
+ // A list of individual HTTP filters that make up the filter chain for
+ // requests made to the connection manager. :ref:`Order matters <arch_overview_http_filters_ordering>`
+ // as the filters are processed sequentially as request events happen.
+ repeated HttpFilter http_filters = 5;
+
+ // Additional settings for HTTP requests handled by the connection manager. These will be
+ // applicable to both HTTP1 and HTTP2 requests.
+ config.core.v3.HttpProtocolOptions common_http_protocol_options = 35;
}
message Rds {
@@ -54,3 +65,18 @@ message Rds {
message ScopedRoutes {
}
+
+message HttpFilter {
+ // The name of the filter configuration. The name is used as a fallback to
+ // select an extension if the type of the configuration proto is not
+ // sufficient. It also serves as a resource name in ExtensionConfigDS.
+ string name = 1;
+
+ oneof config_type {
+ // Filter specific configuration which depends on the filter being instantiated. See the supported
+ // filters for further documentation.
+ google.protobuf.Any typed_config = 4;
+ }
+
+ bool is_optional = 6;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/listener.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/listener.proto
index e9160e033e2..df9ee71e725 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/listener.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/listener.proto
@@ -18,7 +18,11 @@ syntax = "proto3";
package envoy.config.listener.v3;
+import "src/proto/grpc/testing/xds/v3/address.proto";
+import "src/proto/grpc/testing/xds/v3/base.proto";
+
import "google/protobuf/any.proto";
+import "google/protobuf/wrappers.proto";
// [#protodoc-title: Listener configuration]
// Listener :ref:`configuration overview <config_listeners>`
@@ -37,6 +41,126 @@ message ApiListener {
google.protobuf.Any api_listener = 1;
}
+message Filter {
+ reserved 3;
+
+ // The name of the filter to instantiate. The name must match a
+ // :ref:`supported filter <config_network_filters>`.
+ string name = 1;
+
+ // [#extension-category: envoy.filters.network]
+ oneof config_type {
+ // Filter specific configuration which depends on the filter being
+ // instantiated. See the supported filters for further documentation.
+ google.protobuf.Any typed_config = 4;
+ }
+}
+
+message FilterChainMatch {
+ enum ConnectionSourceType {
+ // Any connection source matches.
+ ANY = 0;
+
+ // Match a connection originating from the same host.
+ SAME_IP_OR_LOOPBACK = 1;
+
+ // Match a connection originating from a different host.
+ EXTERNAL = 2;
+ }
+
+ reserved 1;
+
+ // Optional destination port to consider when use_original_dst is set on the
+ // listener in determining a filter chain match.
+ google.protobuf.UInt32Value destination_port = 8;
+
+ // If non-empty, an IP address and prefix length to match addresses when the
+ // listener is bound to 0.0.0.0/:: or when use_original_dst is specified.
+ repeated core.v3.CidrRange prefix_ranges = 3;
+
+ // Specifies the connection source IP match type. Can be any, local or external network.
+ ConnectionSourceType source_type = 12;
+
+ // The criteria is satisfied if the source IP address of the downstream
+ // connection is contained in at least one of the specified subnets. If the
+ // parameter is not specified or the list is empty, the source IP address is
+ // ignored.
+ repeated core.v3.CidrRange source_prefix_ranges = 6;
+
+ // The criteria is satisfied if the source port of the downstream connection
+ // is contained in at least one of the specified ports. If the parameter is
+ // not specified, the source port is ignored.
+ repeated uint32 source_ports = 7;
+
+ // If non-empty, a list of server names (e.g. SNI for TLS protocol) to consider when determining
+ // a filter chain match. Those values will be compared against the server names of a new
+ // connection, when detected by one of the listener filters.
+ //
+ // The server name will be matched against all wildcard domains, i.e. ``www.example.com``
+ // will be first matched against ``www.example.com``, then ``*.example.com``, then ``*.com``.
+ //
+ // Note that partial wildcards are not supported, and values like ``*w.example.com`` are invalid.
+ //
+ // .. attention::
+ //
+ // See the :ref:`FAQ entry <faq_how_to_setup_sni>` on how to configure SNI for more
+ // information.
+ repeated string server_names = 11;
+
+ // If non-empty, a transport protocol to consider when determining a filter chain match.
+ // This value will be compared against the transport protocol of a new connection, when
+ // it's detected by one of the listener filters.
+ //
+ // Suggested values include:
+ //
+ // * ``raw_buffer`` - default, used when no transport protocol is detected,
+ // * ``tls`` - set by :ref:`envoy.filters.listener.tls_inspector <config_listener_filters_tls_inspector>`
+ // when TLS protocol is detected.
+ string transport_protocol = 9;
+
+ // If non-empty, a list of application protocols (e.g. ALPN for TLS protocol) to consider when
+ // determining a filter chain match. Those values will be compared against the application
+ // protocols of a new connection, when detected by one of the listener filters.
+ //
+ // Suggested values include:
+ //
+ // * ``http/1.1`` - set by :ref:`envoy.filters.listener.tls_inspector
+ // <config_listener_filters_tls_inspector>`,
+ // * ``h2`` - set by :ref:`envoy.filters.listener.tls_inspector <config_listener_filters_tls_inspector>`
+ //
+ // .. attention::
+ //
+ // Currently, only :ref:`TLS Inspector <config_listener_filters_tls_inspector>` provides
+ // application protocol detection based on the requested
+ // `ALPN <https://en.wikipedia.org/wiki/Application-Layer_Protocol_Negotiation>`_ values.
+ //
+ // However, the use of ALPN is pretty much limited to the HTTP/2 traffic on the Internet,
+ // and matching on values other than ``h2`` is going to lead to a lot of false negatives,
+ // unless all connecting clients are known to use ALPN.
+ repeated string application_protocols = 10;
+}
+
+// A filter chain wraps a set of match criteria, an option TLS context, a set of filters, and
+// various other parameters.
+// [#next-free-field: 10]
+message FilterChain {
+ // The criteria to use when matching a connection to this filter chain.
+ FilterChainMatch filter_chain_match = 1;
+
+ // A list of individual network filters that make up the filter chain for
+ // connections established with the listener. Order matters as the filters are
+ // processed sequentially as connection events happen. Note: If the filter
+ // list is empty, the connection will close by default.
+ repeated Filter filters = 3;
+
+ // Optional custom transport socket implementation to use for downstream connections.
+ // To setup TLS, set a transport socket with name `tls` and
+ // :ref:`DownstreamTlsContext <envoy_api_msg_extensions.transport_sockets.tls.v3.DownstreamTlsContext>` in the `typed_config`.
+ // If no transport socket configuration is specified, new connections
+ // will be set up with plaintext.
+ core.v3.TransportSocket transport_socket = 6;
+}
+
// [#next-free-field: 23]
message Listener {
// The unique name by which this listener is known. If no name is provided,
@@ -44,6 +168,31 @@ message Listener {
// updated or removed via :ref:`LDS <config_listeners_lds>` a unique name must be provided.
string name = 1;
+ // The address that the listener should listen on. In general, the address must be unique, though
+ // that is governed by the bind rules of the OS. E.g., multiple listeners can listen on port 0 on
+ // Linux as the actual port will be allocated by the OS.
+ core.v3.Address address = 2;
+
+ // A list of filter chains to consider for this listener. The
+ // :ref:`FilterChain <envoy_api_msg_config.listener.v3.FilterChain>` with the most specific
+ // :ref:`FilterChainMatch <envoy_api_msg_config.listener.v3.FilterChainMatch>` criteria is used on a
+ // connection.
+ //
+ // Example using SNI for filter chain selection can be found in the
+ // :ref:`FAQ entry <faq_how_to_setup_sni>`.
+ repeated FilterChain filter_chains = 3;
+
+ // If a connection is redirected using *iptables*, the port on which the proxy
+ // receives it might be different from the original destination address. When this flag is set to
+ // true, the listener hands off redirected connections to the listener associated with the
+ // original destination address. If there is no listener associated with the original destination
+ // address, the connection is handled by the listener that receives it. Defaults to false.
+ google.protobuf.BoolValue use_original_dst = 4;
+
+ // The default filter chain if none of the filter chain matches. If no default filter chain is supplied,
+ // the connection will be closed. The filter chain match is ignored in this field.
+ FilterChain default_filter_chain = 25;
+
// Used to represent an API listener, which is used in non-proxy clients. The type of API
// exposed to the non-proxy application depends on the type of API listener.
// When this field is set, no other field except for :ref:`name<envoy_api_field_config.listener.v3.Listener.name>`
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/protocol.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/protocol.proto
new file mode 100644
index 00000000000..886cc11ddfb
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/protocol.proto
@@ -0,0 +1,27 @@
+// Copyright 2020 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.config.core.v3;
+
+import "google/protobuf/duration.proto";
+
+// [#next-free-field: 5]
+message HttpProtocolOptions {
+ // The maximum duration of a connection.
+ google.protobuf.Duration max_stream_duration = 4;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/route.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/route.proto
index 309f80a019d..baeaaf644d4 100644
--- a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/route.proto
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/route.proto
@@ -23,6 +23,8 @@ 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";
+import "google/protobuf/any.proto";
+import "google/protobuf/duration.proto";
import "google/protobuf/wrappers.proto";
// [#protodoc-title: HTTP route components]
@@ -63,6 +65,13 @@ message VirtualHost {
// The list of routes that will be matched, in order, for incoming requests.
// The first route that matches will be used.
repeated Route routes = 3;
+
+ // The per_filter_config field can be used to provide virtual host-specific
+ // configurations for filters. The key should match the filter name, such as
+ // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
+ // specific; see the :ref:`HTTP filter documentation <config_http_filters>`
+ // for if and how it is utilized.
+ map<string, google.protobuf.Any> typed_per_filter_config = 15;
}
// A route is both a specification of how to match a request as well as an indication of what to do
@@ -87,6 +96,13 @@ message Route {
// Return a redirect.
RedirectAction redirect = 3;
}
+
+ // The typed_per_filter_config field can be used to provide route-specific
+ // configurations for filters. The key should match the filter name, such as
+ // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
+ // specific; see the :ref:`HTTP filter documentation <config_http_filters>` for
+ // if and how it is utilized.
+ map<string, google.protobuf.Any> typed_per_filter_config = 13;
}
// Compared to the :ref:`cluster <envoy_api_field_config.route.v3.RouteAction.cluster>` field that specifies a
@@ -107,6 +123,13 @@ message WeightedCluster {
// the choice of an upstream cluster is determined by its weight. The sum of weights across all
// entries in the clusters array must add up to the total_weight, which defaults to 100.
google.protobuf.UInt32Value weight = 2;
+
+ // The per_filter_config field can be used to provide weighted cluster-specific
+ // configurations for filters. The key should match the filter name, such as
+ // *envoy.filters.http.buffer* for the HTTP buffer filter. Use of this field is filter
+ // specific; see the :ref:`HTTP filter documentation <config_http_filters>`
+ // for if and how it is utilized.
+ map<string, google.protobuf.Any> typed_per_filter_config = 10;
}
// Specifies one or more upstream clusters associated with the route.
@@ -180,7 +203,25 @@ message RouteMatch {
repeated QueryParameterMatcher query_parameters = 7;
}
-// [#next-free-field: 34]
+message MaxStreamDuration {
+ // Specifies the maximum duration allowed for streams on the route. If not specified, the value
+ // from the :ref:`max_stream_duration
+ // <envoy_api_field_config.core.v3.HttpProtocolOptions.max_stream_duration>` field in
+ // :ref:`HttpConnectionManager.common_http_protocol_options
+ // <envoy_api_field_extensions.filters.network.http_connection_manager.v3.HttpConnectionManager.common_http_protocol_options>`
+ // is used. If this field is set explicitly to zero, any
+ // HttpConnectionManager max_stream_duration timeout will be disabled for
+ // this route.
+ google.protobuf.Duration max_stream_duration = 1;
+
+ // If present, and the request contains a `grpc-timeout header
+ // <https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md>`_, use that value as the
+ // *max_stream_duration*, but limit the applied timeout to the maximum value specified here.
+ // If set to 0, the `grpc-timeout` header is used without modification.
+ google.protobuf.Duration grpc_timeout_header_max = 2;
+}
+
+// [#next-free-field: 37]
message RouteAction {
oneof cluster_specifier {
// Indicates the upstream cluster to which the request should be routed
@@ -205,6 +246,8 @@ message RouteAction {
// for additional documentation.
WeightedCluster weighted_clusters = 3;
}
+ // Specifies the maximum stream duration for this route.
+ MaxStreamDuration max_stream_duration = 36;
}
// .. attention::
@@ -313,3 +356,13 @@ message RouteConfiguration {
message RedirectAction {
}
+
+message FilterConfig {
+ // The filter config.
+ google.protobuf.Any config = 1;
+
+ // If true, the filter is optional, meaning that if the client does
+ // not support the specified filter, it may ignore the map entry rather
+ // than rejecting the config.
+ bool is_optional = 2;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/router.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/router.proto
new file mode 100644
index 00000000000..00b11b37128
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/router.proto
@@ -0,0 +1,28 @@
+// Copyright 2021 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.extensions.filters.http.router.v3;
+
+// [#protodoc-title: Router]
+// Router :ref:`configuration overview <config_http_filters_router>`.
+// [#extension: envoy.filters.http.router]
+
+// We don't actually use any of the fields in this message, but we need
+// the message itself to signify which filter to use.
+message Router {
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/string.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/string.proto
new file mode 100644
index 00000000000..d7e773089d7
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/string.proto
@@ -0,0 +1,64 @@
+// Copyright 2020 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.type.matcher.v3;
+
+import "src/proto/grpc/testing/xds/v3/regex.proto";
+
+message StringMatcher {
+ oneof match_pattern {
+ // The input string must match exactly the string specified here.
+ //
+ // Examples:
+ //
+ // * *abc* only matches the value *abc*.
+ string exact = 1;
+
+ // The input string must have the prefix specified here.
+ // Note: empty prefix is not allowed, please use regex instead.
+ //
+ // Examples:
+ //
+ // * *abc* matches the value *abc.xyz*
+ string prefix = 2;
+
+ // The input string must have the suffix specified here.
+ // Note: empty prefix is not allowed, please use regex instead.
+ //
+ // Examples:
+ //
+ // * *abc* matches the value *xyz.abc*
+ string suffix = 3;
+
+ // The input string must match the regular expression specified here.
+ RegexMatcher safe_regex = 5;
+
+ // The input string must have the substring specified here.
+ // Note: empty contains match is not allowed, please use regex instead.
+ //
+ // Examples:
+ //
+ // * *abc* matches the value *xyz.abc.def*
+ string contains = 7;
+ }
+
+ // If true, indicates the exact/prefix/suffix matching should be case insensitive. This has no
+ // effect for the safe_regex match.
+ // For example, the matcher *data* will match both input string *Data* and *data* if set to true.
+ bool ignore_case = 6;
+}
diff --git a/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/tls.proto b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/tls.proto
new file mode 100644
index 00000000000..e9acfb52a62
--- /dev/null
+++ b/contrib/libs/grpc/src/proto/grpc/testing/xds/v3/tls.proto
@@ -0,0 +1,114 @@
+// Copyright 2020 The gRPC Authors
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Local copy of Envoy xDS proto file, used for testing only.
+
+syntax = "proto3";
+
+package envoy.extensions.transport_sockets.tls.v3;
+
+import "src/proto/grpc/testing/xds/v3/string.proto";
+
+import "google/protobuf/wrappers.proto";
+
+message CertificateValidationContext {
+ // An optional list of Subject Alternative name matchers. If specified, Envoy will verify that the
+ // Subject Alternative Name of the presented certificate matches one of the specified matchers.
+ //
+ // When a certificate has wildcard DNS SAN entries, to match a specific client, it should be
+ // configured with exact match type in the :ref:`string matcher <envoy_api_msg_type.matcher.v3.StringMatcher>`.
+ // For example if the certificate has "\*.example.com" as DNS SAN entry, to allow only "api.example.com",
+ // it should be configured as shown below.
+ //
+ // .. code-block:: yaml
+ //
+ // match_subject_alt_names:
+ // exact: "api.example.com"
+ //
+ // .. attention::
+ //
+ // Subject Alternative Names are easily spoofable and verifying only them is insecure,
+ // therefore this option must be used together with :ref:`trusted_ca
+ // <envoy_api_field_extensions.transport_sockets.tls.v3.CertificateValidationContext.trusted_ca>`.
+ repeated type.matcher.v3.StringMatcher match_subject_alt_names = 9;
+}
+
+message UpstreamTlsContext {
+ // Common TLS context settings.
+ //
+ // .. attention::
+ //
+ // Server certificate verification is not enabled by default. Configure
+ // :ref:`trusted_ca<envoy_api_field_extensions.transport_sockets.tls.v3.CertificateValidationContext.trusted_ca>` to enable
+ // verification.
+ CommonTlsContext common_tls_context = 1;
+}
+
+message DownstreamTlsContext {
+ // Common TLS context settings.
+ CommonTlsContext common_tls_context = 1;
+
+ // If specified, Envoy will reject connections without a valid client
+ // certificate.
+ google.protobuf.BoolValue require_client_certificate = 2;
+}
+
+
+// TLS context shared by both client and server TLS contexts.
+// [#next-free-field: 14]
+message CommonTlsContext {
+ // Similar to CertificateProvider above, but allows the provider instances to be configured on
+ // the client side instead of being sent from the control plane.
+ message CertificateProviderInstance {
+ // Provider instance name. This name must be defined in the client's configuration (e.g., a
+ // bootstrap file) to correspond to a provider instance (i.e., the same data in the typed_config
+ // field that would be sent in the CertificateProvider message if the config was sent by the
+ // control plane). If not present, defaults to "default".
+ //
+ // Instance names should generally be defined not in terms of the underlying provider
+ // implementation (e.g., "file_watcher") but rather in terms of the function of the
+ // certificates (e.g., "foo_deployment_identity").
+ string instance_name = 1;
+
+ // Opaque name used to specify certificate instances or types. For example, "ROOTCA" to specify
+ // a root-certificate (validation context) or "example.com" to specify a certificate for a
+ // particular domain. Not all provider instances will actually use this field, so the value
+ // defaults to the empty string.
+ string certificate_name = 2;
+ }
+
+ message CombinedCertificateValidationContext {
+ // How to validate peer certificates.
+ CertificateValidationContext default_validation_context = 1;
+
+ // Certificate provider instance for fetching validation context.
+ // Only one of validation_context_sds_secret_config, validation_context_certificate_provider,
+ // or validation_context_certificate_provider_instance may be used.
+ CertificateProviderInstance validation_context_certificate_provider_instance = 4;
+ }
+
+ // Certificate provider instance for fetching TLS certificates.
+ CertificateProviderInstance tls_certificate_certificate_provider_instance = 11;
+
+ oneof validation_context_type {
+ // Combined certificate validation context holds a default CertificateValidationContext
+ // and SDS config. When SDS server returns dynamic CertificateValidationContext, both dynamic
+ // and default CertificateValidationContext are merged into a new CertificateValidationContext
+ // for validation. This merge is done by Message::MergeFrom(), so dynamic
+ // CertificateValidationContext overwrites singular fields in default
+ // CertificateValidationContext, and concatenates repeated fields to default
+ // CertificateValidationContext, and logical OR is applied to boolean fields.
+ CombinedCertificateValidationContext combined_validation_context = 8;
+ }
+}
diff --git a/contrib/libs/grpc/src/python/grpcio/commands.py b/contrib/libs/grpc/src/python/grpcio/commands.py
index 8240beb2958..f4a3d2bdc04 100644
--- a/contrib/libs/grpc/src/python/grpcio/commands.py
+++ b/contrib/libs/grpc/src/python/grpcio/commands.py
@@ -24,6 +24,7 @@ import re
import shutil
import subprocess
import sys
+import sysconfig
import traceback
import setuptools
@@ -211,21 +212,38 @@ class BuildExt(build_ext.build_ext):
}
LINK_OPTIONS = {}
+ def get_ext_filename(self, ext_name):
+ # since python3.5, python extensions' shared libraries use a suffix that corresponds to the value
+ # of sysconfig.get_config_var('EXT_SUFFIX') and contains info about the architecture the library targets.
+ # E.g. on x64 linux the suffix is ".cpython-XYZ-x86_64-linux-gnu.so"
+ # When crosscompiling python wheels, we need to be able to override this suffix
+ # so that the resulting file name matches the target architecture and we end up with a well-formed
+ # wheel.
+ filename = build_ext.build_ext.get_ext_filename(self, ext_name)
+ orig_ext_suffix = sysconfig.get_config_var('EXT_SUFFIX')
+ new_ext_suffix = os.getenv('GRPC_PYTHON_OVERRIDE_EXT_SUFFIX')
+ if new_ext_suffix and filename.endswith(orig_ext_suffix):
+ filename = filename[:-len(orig_ext_suffix)] + new_ext_suffix
+ return filename
+
def build_extensions(self):
def compiler_ok_with_extra_std():
"""Test if default compiler is okay with specifying c++ version
when invoked in C mode. GCC is okay with this, while clang is not.
"""
- if platform.system() != 'Windows':
+ try:
+ # TODO(lidiz) Remove the generated a.out for success tests.
+ cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'],
+ stdin=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ _, cc_err = cc_test.communicate(input=b'int main(){return 0;}')
+ return not 'invalid argument' in str(cc_err)
+ except:
+ sys.stderr.write('Non-fatal exception:' +
+ traceback.format_exc() + '\n')
return False
- # TODO(lidiz) Remove the generated a.out for success tests.
- cc_test = subprocess.Popen(['cc', '-x', 'c', '-std=c++11', '-'],
- stdin=subprocess.PIPE,
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- _, cc_err = cc_test.communicate(input=b'int main(){return 0;}')
- return not 'invalid argument' in str(cc_err)
# This special conditioning is here due to difference of compiler
# behavior in gcc and clang. The clang doesn't take --stdc++11
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/__init__.py b/contrib/libs/grpc/src/python/grpcio/grpc/__init__.py
index abe87458c4f..69803ed1616 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/__init__.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/__init__.py
@@ -406,8 +406,6 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)):
class ClientCallDetails(six.with_metaclass(abc.ABCMeta)):
"""Describes an RPC to be invoked.
- This is an EXPERIMENTAL API.
-
Attributes:
method: The method name of the RPC.
timeout: An optional duration of time in seconds to allow for the RPC.
@@ -422,10 +420,7 @@ class ClientCallDetails(six.with_metaclass(abc.ABCMeta)):
class UnaryUnaryClientInterceptor(six.with_metaclass(abc.ABCMeta)):
- """Affords intercepting unary-unary invocations.
-
- This is an EXPERIMENTAL API.
- """
+ """Affords intercepting unary-unary invocations."""
@abc.abstractmethod
def intercept_unary_unary(self, continuation, client_call_details, request):
@@ -459,10 +454,7 @@ class UnaryUnaryClientInterceptor(six.with_metaclass(abc.ABCMeta)):
class UnaryStreamClientInterceptor(six.with_metaclass(abc.ABCMeta)):
- """Affords intercepting unary-stream invocations.
-
- This is an EXPERIMENTAL API.
- """
+ """Affords intercepting unary-stream invocations."""
@abc.abstractmethod
def intercept_unary_stream(self, continuation, client_call_details,
@@ -489,16 +481,14 @@ class UnaryStreamClientInterceptor(six.with_metaclass(abc.ABCMeta)):
An object that is both a Call for the RPC and an iterator of
response values. Drawing response values from the returned
Call-iterator may raise RpcError indicating termination of
- the RPC with non-OK status.
+ the RPC with non-OK status. This object *should* also fulfill the
+ Future interface, though it may not.
"""
raise NotImplementedError()
class StreamUnaryClientInterceptor(six.with_metaclass(abc.ABCMeta)):
- """Affords intercepting stream-unary invocations.
-
- This is an EXPERIMENTAL API.
- """
+ """Affords intercepting stream-unary invocations."""
@abc.abstractmethod
def intercept_stream_unary(self, continuation, client_call_details,
@@ -532,10 +522,7 @@ class StreamUnaryClientInterceptor(six.with_metaclass(abc.ABCMeta)):
class StreamStreamClientInterceptor(six.with_metaclass(abc.ABCMeta)):
- """Affords intercepting stream-stream invocations.
-
- This is an EXPERIMENTAL API.
- """
+ """Affords intercepting stream-stream invocations."""
@abc.abstractmethod
def intercept_stream_stream(self, continuation, client_call_details,
@@ -562,7 +549,8 @@ class StreamStreamClientInterceptor(six.with_metaclass(abc.ABCMeta)):
An object that is both a Call for the RPC and an iterator of
response values. Drawing response values from the returned
Call-iterator may raise RpcError indicating termination of
- the RPC with non-OK status.
+ the RPC with non-OK status. This object *should* also fulfill the
+ Future interface, though it may not.
"""
raise NotImplementedError()
@@ -797,10 +785,10 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
grpc.compression.Gzip. This is an EXPERIMENTAL option.
Returns:
- An object that is both a Call for the RPC and an iterator of
- response values. Drawing response values from the returned
- Call-iterator may raise RpcError indicating termination of the
- RPC with non-OK status.
+ An object that is a Call for the RPC, an iterator of response
+ values, and a Future for the RPC. Drawing response values from the
+ returned Call-iterator may raise RpcError indicating termination of
+ the RPC with non-OK status.
"""
raise NotImplementedError()
@@ -936,10 +924,10 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)):
grpc.compression.Gzip. This is an EXPERIMENTAL option.
Returns:
- An object that is both a Call for the RPC and an iterator of
- response values. Drawing response values from the returned
- Call-iterator may raise RpcError indicating termination of the
- RPC with non-OK status.
+ An object that is a Call for the RPC, an iterator of response
+ values, and a Future for the RPC. Drawing response values from the
+ returned Call-iterator may raise RpcError indicating termination of
+ the RPC with non-OK status.
"""
raise NotImplementedError()
@@ -1349,10 +1337,7 @@ class ServiceRpcHandler(six.with_metaclass(abc.ABCMeta, GenericRpcHandler)):
class ServerInterceptor(six.with_metaclass(abc.ABCMeta)):
- """Affords intercepting incoming RPCs on the service-side.
-
- This is an EXPERIMENTAL API.
- """
+ """Affords intercepting incoming RPCs on the service-side."""
@abc.abstractmethod
def intercept_service(self, continuation, handler_call_details):
@@ -1607,6 +1592,21 @@ def ssl_channel_credentials(root_certificates=None,
certificate_chain))
+def xds_channel_credentials(fallback_credentials=None):
+ """Creates a ChannelCredentials for use with xDS. This is an EXPERIMENTAL
+ API.
+
+ Args:
+ fallback_credentials: Credentials to use in case it is not possible to
+ establish a secure connection via xDS. If no fallback_credentials
+ argument is supplied, a default SSLChannelCredentials is used.
+ """
+ fallback_credentials = ssl_channel_credentials(
+ ) if fallback_credentials is None else fallback_credentials
+ return ChannelCredentials(
+ _cygrpc.XDSChannelCredentials(fallback_credentials._credentials))
+
+
def metadata_call_credentials(metadata_plugin, name=None):
"""Construct CallCredentials from an AuthMetadataPlugin.
@@ -1706,6 +1706,29 @@ def ssl_server_credentials(private_key_certificate_chain_pairs,
], require_client_auth))
+def xds_server_credentials(fallback_credentials):
+ """Creates a ServerCredentials for use with xDS. This is an EXPERIMENTAL
+ API.
+
+ Args:
+ fallback_credentials: Credentials to use in case it is not possible to
+ establish a secure connection via xDS. No default value is provided.
+ """
+ return ServerCredentials(
+ _cygrpc.xds_server_credentials(fallback_credentials._credentials))
+
+
+def insecure_server_credentials():
+ """Creates a credentials object directing the server to use no credentials.
+ This is an EXPERIMENTAL API.
+
+ This object cannot be used directly in a call to `add_secure_port`.
+ Instead, it should be used to construct other credentials objects, e.g.
+ with xds_server_credentials.
+ """
+ return ServerCredentials(_cygrpc.insecure_server_credentials())
+
+
def ssl_server_certificate_configuration(private_key_certificate_chain_pairs,
root_certificates=None):
"""Creates a ServerCertificateConfiguration for use with a Server.
@@ -1951,8 +1974,6 @@ def secure_channel(target, credentials, options=None, compression=None):
def intercept_channel(channel, *interceptors):
"""Intercepts a channel through a set of interceptors.
- This is an EXPERIMENTAL API.
-
Args:
channel: A Channel.
interceptors: Zero or more objects of type
@@ -1981,7 +2002,8 @@ def server(thread_pool,
interceptors=None,
options=None,
maximum_concurrent_rpcs=None,
- compression=None):
+ compression=None,
+ xds=False):
"""Creates a Server with which RPCs can be serviced.
Args:
@@ -2002,6 +2024,8 @@ def server(thread_pool,
compression: An element of grpc.compression, e.g.
grpc.compression.Gzip. This compression algorithm will be used for the
lifetime of the server unless overridden. This is an EXPERIMENTAL option.
+ xds: If set to true, retrieves server configuration via xDS. This is an
+ EXPERIMENTAL option.
Returns:
A Server object.
@@ -2011,7 +2035,7 @@ def server(thread_pool,
() if handlers is None else handlers,
() if interceptors is None else interceptors,
() if options is None else options,
- maximum_concurrent_rpcs, compression)
+ maximum_concurrent_rpcs, compression, xds)
@contextlib.contextmanager
@@ -2103,6 +2127,9 @@ __all__ = (
'protos',
'services',
'protos_and_services',
+ 'xds_channel_credentials',
+ 'xds_server_credentials',
+ 'insecure_server_credentials',
)
############################### Extension Shims ################################
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_channel.py b/contrib/libs/grpc/src/python/grpcio/grpc/_channel.py
index 11921d78838..b98f3002f4a 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_channel.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_channel.py
@@ -93,9 +93,16 @@ def _unknown_code_details(unknown_cygrpc_code, details):
class _RPCState(object):
def __init__(self, due, initial_metadata, trailing_metadata, code, details):
+ # `condition` guards all members of _RPCState. `notify_all` is called on
+ # `condition` when the state of the RPC has changed.
self.condition = threading.Condition()
+
# The cygrpc.OperationType objects representing events due from the RPC's
- # completion queue.
+ # completion queue. If an operation is in `due`, it is guaranteed that
+ # `operate()` has been called on a corresponding operation. But the
+ # converse is not true. That is, in the case of failed `operate()`
+ # calls, there may briefly be events in `due` that do not correspond to
+ # operations submitted to Core.
self.due = set(due)
self.initial_metadata = initial_metadata
self.response = None
@@ -103,6 +110,7 @@ class _RPCState(object):
self.code = code
self.details = details
self.debug_error_string = None
+
# The semantics of grpc.Future.cancel and grpc.Future.cancelled are
# slightly wonky, so they have to be tracked separately from the rest of the
# result of the RPC. This field tracks whether cancellation was requested
@@ -220,18 +228,18 @@ def _consume_request_iterator(request_iterator, state, call, request_serializer,
_abort(state, code, details)
return
else:
+ state.due.add(cygrpc.OperationType.send_message)
operations = (cygrpc.SendMessageOperation(
serialized_request, _EMPTY_FLAGS),)
operating = call.operate(operations, event_handler)
- if operating:
- state.due.add(cygrpc.OperationType.send_message)
- else:
+ if not operating:
+ state.due.remove(cygrpc.OperationType.send_message)
return
def _done():
return (state.code is not None or
- cygrpc.OperationType.send_message not in
- state.due)
+ cygrpc.OperationType.send_message
+ not in state.due)
_common.wait(state.condition.wait,
_done,
@@ -244,11 +252,13 @@ def _consume_request_iterator(request_iterator, state, call, request_serializer,
return
with state.condition:
if state.code is None:
+ state.due.add(cygrpc.OperationType.send_close_from_client)
operations = (
cygrpc.SendCloseFromClientOperation(_EMPTY_FLAGS),)
operating = call.operate(operations, event_handler)
- if operating:
- state.due.add(cygrpc.OperationType.send_close_from_client)
+ if not operating:
+ state.due.remove(
+ cygrpc.OperationType.send_close_from_client)
consumption_thread = cygrpc.ForkManagedThread(
target=consume_request_iterator)
@@ -609,10 +619,22 @@ class _SingleThreadedRendezvous(_Rendezvous, grpc.Call, grpc.Future): # pylint:
def _next(self):
with self._state.condition:
if self._state.code is None:
+ # We tentatively add the operation as expected and remove
+ # it if the enqueue operation fails. This allows us to guarantee that
+ # if an event has been submitted to the core completion queue,
+ # it is in `due`. If we waited until after a successful
+ # enqueue operation then a signal could interrupt this
+ # thread between the enqueue operation and the addition of the
+ # operation to `due`. This would cause an exception on the
+ # channel spin thread when the operation completes and no
+ # corresponding operation would be present in state.due.
+ # Note that, since `condition` is held through this block, there is
+ # no data race on `due`.
+ self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),), None)
- if operating:
- self._state.due.add(cygrpc.OperationType.receive_message)
+ if not operating:
+ self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
@@ -775,21 +797,22 @@ class _MultiThreadedRendezvous(_Rendezvous, grpc.Call, grpc.Future): # pylint:
if self._state.code is None:
event_handler = _event_handler(self._state,
self._response_deserializer)
+ self._state.due.add(cygrpc.OperationType.receive_message)
operating = self._call.operate(
(cygrpc.ReceiveMessageOperation(_EMPTY_FLAGS),),
event_handler)
- if operating:
- self._state.due.add(cygrpc.OperationType.receive_message)
+ if not operating:
+ self._state.due.remove(cygrpc.OperationType.receive_message)
elif self._state.code is grpc.StatusCode.OK:
raise StopIteration()
else:
raise self
def _response_ready():
- return (
- self._state.response is not None or
- (cygrpc.OperationType.receive_message not in self._state.due
- and self._state.code is not None))
+ return (self._state.response is not None or
+ (cygrpc.OperationType.receive_message
+ not in self._state.due and
+ self._state.code is not None))
_common.wait(self._state.condition.wait, _response_ready)
if self._state.response is not None:
@@ -1546,7 +1569,7 @@ class Channel(grpc.Channel):
# here (or more likely, call self._close() here). We don't do this today
# because many valid use cases today allow the channel to be deleted
# immediately after stubs are created. After a sufficient period of time
- # has passed for all users to be trusted to hang out to their channels
+ # has passed for all users to be trusted to freeze out to their channels
# for as long as they are in use and to close them after using them,
# then deletion of this grpc._channel.Channel instance can be made to
# effect closure of the underlying cygrpc.Channel instance.
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi
index 10c024e1b39..2c2a3ff3f6e 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/call.pyx.pxi
@@ -360,7 +360,7 @@ cdef class _AioCall(GrpcCallWrapper):
self,
self._loop
)
- if received_message:
+ if received_message is not None:
return received_message
else:
return EOF
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
index 86fc91e76a4..bc25c2e4bae 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/callback_common.pyx.pxi
@@ -130,6 +130,8 @@ async def _receive_message(GrpcCallWrapper grpc_call_wrapper,
#
# Since they all indicates finish, they are better be merged.
_LOGGER.debug('Failed to receive any message from Core')
+ # NOTE(lidiz) The returned message might be an empty bytes (aka. b'').
+ # Please explicitly check if it is None or falsey string object!
return receive_op.message()
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi
index 06c92cac586..9aec95520fb 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/grpc_aio.pyx.pxi
@@ -94,7 +94,7 @@ def _grpc_shutdown_wrapper(_):
Define functions are not allowed in "cdef" functions, and Cython complains
about a simple lambda with a C function.
"""
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef _actual_aio_shutdown():
@@ -106,7 +106,7 @@ cdef _actual_aio_shutdown():
future.add_done_callback(_grpc_shutdown_wrapper)
elif _global_aio_state.engine is AsyncIOEngine.POLLER:
(<PollerCompletionQueue>_global_aio_state.cq).shutdown()
- grpc_shutdown_blocking()
+ grpc_shutdown()
else:
raise ValueError('Unsupported engine type [%s]' % _global_aio_state.engine)
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pxd.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pxd.pxi
index 46a47bd1ba7..4651a6b6f22 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pxd.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pxd.pxi
@@ -67,6 +67,13 @@ cdef enum AioServerStatus:
AIO_SERVER_STATUS_STOPPING
+cdef class _ConcurrentRpcLimiter:
+ cdef int _maximum_concurrent_rpcs
+ cdef int _active_rpcs
+ cdef object _active_rpcs_condition # asyncio.Condition
+ cdef object _loop # asyncio.EventLoop
+
+
cdef class AioServer:
cdef Server _server
cdef list _generic_handlers
@@ -79,5 +86,6 @@ cdef class AioServer:
cdef object _crash_exception # Exception
cdef tuple _interceptors
cdef object _thread_pool # concurrent.futures.ThreadPoolExecutor
+ cdef _ConcurrentRpcLimiter _limiter
cdef thread_pool(self)
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi
index a630ed88117..38c0d713522 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/aio/server.pyx.pxi
@@ -252,6 +252,12 @@ cdef class _ServicerContext:
else:
return {}
+ def time_remaining(self):
+ if self._rpc_state.details.deadline.seconds == _GPR_INF_FUTURE.seconds:
+ return None
+ else:
+ return max(_time_from_timespec(self._rpc_state.details.deadline) - time.time(), 0)
+
cdef class _SyncServicerContext:
"""Sync servicer context for sync handler compatibility."""
@@ -311,6 +317,9 @@ cdef class _SyncServicerContext:
def auth_context(self):
return self._context.auth_context()
+ def time_remaining(self):
+ return self._context.time_remaining()
+
async def _run_interceptor(object interceptors, object query_handler,
object handler_call_details):
@@ -781,6 +790,40 @@ cdef CallbackFailureHandler SERVER_SHUTDOWN_FAILURE_HANDLER = CallbackFailureHan
InternalError)
+cdef class _ConcurrentRpcLimiter:
+
+ def __cinit__(self, int maximum_concurrent_rpcs, object loop):
+ if maximum_concurrent_rpcs <= 0:
+ raise ValueError("maximum_concurrent_rpcs should be a postive integer")
+ self._maximum_concurrent_rpcs = maximum_concurrent_rpcs
+ self._active_rpcs = 0
+ self._active_rpcs_condition = asyncio.Condition()
+ self._loop = loop
+
+ async def check_before_request_call(self):
+ await self._active_rpcs_condition.acquire()
+ try:
+ predicate = lambda: self._active_rpcs < self._maximum_concurrent_rpcs
+ await self._active_rpcs_condition.wait_for(predicate)
+ self._active_rpcs += 1
+ finally:
+ self._active_rpcs_condition.release()
+
+ async def _decrease_active_rpcs_count_with_lock(self):
+ await self._active_rpcs_condition.acquire()
+ try:
+ self._active_rpcs -= 1
+ self._active_rpcs_condition.notify()
+ finally:
+ self._active_rpcs_condition.release()
+
+ def _decrease_active_rpcs_count(self, unused_future):
+ self._loop.create_task(self._decrease_active_rpcs_count_with_lock())
+
+ def decrease_once_finished(self, object rpc_task):
+ rpc_task.add_done_callback(self._decrease_active_rpcs_count)
+
+
cdef class AioServer:
def __init__(self, loop, thread_pool, generic_handlers, interceptors,
@@ -788,7 +831,8 @@ cdef class AioServer:
init_grpc_aio()
# NOTE(lidiz) Core objects won't be deallocated automatically.
# If AioServer.shutdown is not called, those objects will leak.
- self._server = Server(options)
+ # TODO(rbellevi): Support xDS in aio server.
+ self._server = Server(options, False)
grpc_server_register_completion_queue(
self._server.c_server,
global_completion_queue(),
@@ -815,9 +859,9 @@ cdef class AioServer:
self._interceptors = ()
self._thread_pool = thread_pool
-
- if maximum_concurrent_rpcs:
- raise NotImplementedError()
+ if maximum_concurrent_rpcs is not None:
+ self._limiter = _ConcurrentRpcLimiter(maximum_concurrent_rpcs,
+ loop)
def add_generic_rpc_handlers(self, object generic_rpc_handlers):
self._generic_handlers.extend(generic_rpc_handlers)
@@ -860,6 +904,9 @@ cdef class AioServer:
if self._status != AIO_SERVER_STATUS_RUNNING:
break
+ if self._limiter is not None:
+ await self._limiter.check_before_request_call()
+
# Accepts new request from Core
rpc_state = await self._request_call()
@@ -874,7 +921,7 @@ cdef class AioServer:
self._loop)
# Fires off a task that listens on the cancellation from client.
- self._loop.create_task(
+ rpc_task = self._loop.create_task(
_schedule_rpc_coro(
rpc_coro,
rpc_state,
@@ -882,8 +929,13 @@ cdef class AioServer:
)
)
+ if self._limiter is not None:
+ self._limiter.decrease_once_finished(rpc_task)
+
def _serving_task_crash_handler(self, object task):
"""Shutdown the server immediately if unexpectedly exited."""
+ if task.cancelled():
+ return
if task.exception() is None:
return
if self._status != AIO_SERVER_STATUS_STOPPING:
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
index bdd155bea94..f68e166b17a 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi
@@ -86,7 +86,7 @@ cdef class Call:
with nogil:
if self.c_call != NULL:
grpc_call_unref(self.c_call)
- grpc_shutdown_blocking()
+ grpc_shutdown()
# The object *should* always be valid from Python. Used for debugging.
@property
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
index 74c7f6c1405..ebffb7b0a25 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi
@@ -425,7 +425,7 @@ cdef _close(Channel channel, grpc_status_code code, object details,
_destroy_c_completion_queue(state.c_connectivity_completion_queue)
grpc_channel_destroy(state.c_channel)
state.c_channel = NULL
- grpc_shutdown_blocking()
+ grpc_shutdown()
state.condition.notify_all()
else:
# Another call to close already completed in the past or is currently
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
index a47403ac51c..54c55f85f12 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi
@@ -115,4 +115,4 @@ cdef class CompletionQueue:
self.c_completion_queue, c_deadline, NULL)
self._interpret_event(event)
grpc_completion_queue_destroy(self.c_completion_queue)
- grpc_shutdown_blocking()
+ grpc_shutdown()
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
index ddaedb30bd4..827f6f17ca3 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi
@@ -76,6 +76,13 @@ cdef class CompositeChannelCredentials(ChannelCredentials):
cdef grpc_channel_credentials *c(self) except *
+cdef class XDSChannelCredentials(ChannelCredentials):
+
+ cdef readonly ChannelCredentials _fallback_credentials
+
+ cdef grpc_channel_credentials *c(self) except *
+
+
cdef class ServerCertificateConfig:
cdef grpc_ssl_server_certificate_config *c_cert_config
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
index c75579cc04f..e7e59261b45 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi
@@ -58,7 +58,7 @@ cdef int _get_metadata(void *state,
cdef void _destroy(void *state) except * with gil:
cpython.Py_DECREF(<object>state)
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef class MetadataPluginCallCredentials(CallCredentials):
@@ -124,7 +124,7 @@ cdef class SSLSessionCacheLRU:
def __dealloc__(self):
if self._cache != NULL:
grpc_ssl_session_cache_destroy(self._cache)
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef class SSLChannelCredentials(ChannelCredentials):
@@ -178,6 +178,18 @@ cdef class CompositeChannelCredentials(ChannelCredentials):
return c_composition
+cdef class XDSChannelCredentials(ChannelCredentials):
+
+ def __cinit__(self, fallback_credentials):
+ self._fallback_credentials = fallback_credentials
+
+ cdef grpc_channel_credentials *c(self) except *:
+ cdef grpc_channel_credentials *c_fallback_creds = self._fallback_credentials.c()
+ cdef grpc_channel_credentials *xds_creds = grpc_xds_credentials_create(c_fallback_creds)
+ grpc_channel_credentials_release(c_fallback_creds)
+ return xds_creds
+
+
cdef class ServerCertificateConfig:
def __cinit__(self):
@@ -190,7 +202,7 @@ cdef class ServerCertificateConfig:
def __dealloc__(self):
grpc_ssl_server_certificate_config_destroy(self.c_cert_config)
gpr_free(self.c_ssl_pem_key_cert_pairs)
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef class ServerCredentials:
@@ -206,7 +218,7 @@ cdef class ServerCredentials:
def __dealloc__(self):
if self.c_credentials != NULL:
grpc_server_credentials_release(self.c_credentials)
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef const char* _get_c_pem_root_certs(pem_root_certs):
if pem_root_certs is None:
@@ -347,11 +359,31 @@ cdef class LocalChannelCredentials(ChannelCredentials):
def channel_credentials_local(grpc_local_connect_type local_connect_type):
return LocalChannelCredentials(local_connect_type)
+cdef class InsecureChannelCredentials(ChannelCredentials):
+
+ cdef grpc_channel_credentials *c(self) except *:
+ return grpc_insecure_credentials_create()
+
+def channel_credentials_insecure():
+ return InsecureChannelCredentials()
+
def server_credentials_local(grpc_local_connect_type local_connect_type):
cdef ServerCredentials credentials = ServerCredentials()
credentials.c_credentials = grpc_local_server_credentials_create(local_connect_type)
return credentials
+def xds_server_credentials(ServerCredentials fallback_credentials):
+ cdef ServerCredentials credentials = ServerCredentials()
+ credentials.c_credentials = grpc_xds_server_credentials_create(fallback_credentials.c_credentials)
+ # NOTE: We do not need to call grpc_server_credentials_release on the
+ # fallback credentials here because this will be done by the __dealloc__
+ # method of its Cython wrapper.
+ return credentials
+
+def insecure_server_credentials():
+ cdef ServerCredentials credentials = ServerCredentials()
+ credentials.c_credentials = grpc_insecure_server_credentials_create()
+ return credentials
cdef class ALTSChannelCredentials(ChannelCredentials):
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
index 54eb7fdffc4..0b7c49a0377 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi
@@ -335,6 +335,7 @@ cdef extern from "grpc/grpc.h":
void grpc_dont_init_openssl() nogil
void grpc_init() nogil
+ void grpc_shutdown() nogil
void grpc_shutdown_blocking() nogil
int grpc_is_initialized() nogil
@@ -397,6 +398,23 @@ cdef extern from "grpc/grpc.h":
void grpc_server_register_completion_queue(grpc_server *server,
grpc_completion_queue *cq,
void *reserved) nogil
+
+ ctypedef struct grpc_server_config_fetcher:
+ pass
+
+ void grpc_server_set_config_fetcher(
+ grpc_server* server, grpc_server_config_fetcher* config_fetcher) nogil
+
+ ctypedef struct grpc_server_xds_status_notifier:
+ void (*on_serving_status_change)(void* user_data, const char* uri,
+ grpc_status_code code,
+ const char* error_message)
+ void* user_data;
+
+ grpc_server_config_fetcher* grpc_server_config_fetcher_xds_create(
+ grpc_server_xds_status_notifier notifier) nogil
+
+
int grpc_server_add_insecure_http2_port(
grpc_server *server, const char *addr) nogil
void grpc_server_start(grpc_server *server) nogil
@@ -514,6 +532,16 @@ cdef extern from "grpc/grpc_security.h":
void *reserved) nogil
void grpc_channel_credentials_release(grpc_channel_credentials *creds) nogil
+ grpc_channel_credentials *grpc_xds_credentials_create(
+ grpc_channel_credentials *fallback_creds) nogil
+
+ grpc_channel_credentials *grpc_insecure_credentials_create() nogil
+
+ grpc_server_credentials *grpc_xds_server_credentials_create(
+ grpc_server_credentials *fallback_creds) nogil
+
+ grpc_server_credentials *grpc_insecure_server_credentials_create() nogil
+
grpc_call_credentials *grpc_composite_call_credentials_create(
grpc_call_credentials *creds1, grpc_call_credentials *creds2,
void *reserved) nogil
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pyx.pxi
index 0f693ec6911..d857317ead0 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pyx.pxi
@@ -39,7 +39,7 @@ cdef class SocketWrapper:
self.len = 0
def __dealloc__(self):
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef grpc_error* socket_init(grpc_custom_socket* socket, int domain) with gil:
sw = SocketWrapper()
@@ -267,7 +267,7 @@ cdef class ResolveWrapper:
self.c_port = NULL
def __dealloc__(self):
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef socket_resolve_async_cython(ResolveWrapper resolve_wrapper):
try:
@@ -323,7 +323,7 @@ cdef class TimerWrapper:
self.timer.stop()
def __dealloc__(self):
- grpc_shutdown_blocking()
+ grpc_shutdown()
cdef void timer_start(grpc_custom_timer* t) with gil:
timer = TimerWrapper(t.timeout_ms / 1000.0)
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
index 308d677695f..05db7e3df9f 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi
@@ -137,7 +137,7 @@ cdef class CallDetails:
def __dealloc__(self):
with nogil:
grpc_call_details_destroy(&self.c_details)
- grpc_shutdown_blocking()
+ grpc_shutdown()
@property
def method(self):
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
index eff95c4f299..ed1dda292d6 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi
@@ -15,7 +15,7 @@
cdef class Server:
- def __cinit__(self, object arguments):
+ def __cinit__(self, object arguments, bint xds):
fork_handlers_and_grpc_init()
self.references = []
self.registered_completion_queues = []
@@ -25,6 +25,12 @@ cdef class Server:
self.c_server = NULL
cdef _ChannelArgs channel_args = _ChannelArgs(arguments)
self.c_server = grpc_server_create(channel_args.c_args(), NULL)
+ cdef grpc_server_xds_status_notifier notifier
+ notifier.on_serving_status_change = NULL
+ notifier.user_data = NULL
+ if xds:
+ grpc_server_set_config_fetcher(self.c_server,
+ grpc_server_config_fetcher_xds_create(notifier))
self.references.append(arguments)
def request_call(
@@ -154,4 +160,4 @@ cdef class Server:
def __dealloc__(self):
if self.c_server == NULL:
- grpc_shutdown_blocking()
+ grpc_shutdown()
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_grpcio_metadata.py b/contrib/libs/grpc/src/python/grpcio/grpc/_grpcio_metadata.py
index f5d0668407a..d182b9b7685 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_grpcio_metadata.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_grpcio_metadata.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc/_grpcio_metadata.py.template`!!!
-__version__ = """1.33.2"""
+__version__ = """1.37.1"""
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_runtime_protos.py b/contrib/libs/grpc/src/python/grpcio/grpc/_runtime_protos.py
index 7f555ccd9e4..2a3e1d459a2 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_runtime_protos.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_runtime_protos.py
@@ -15,41 +15,49 @@
import sys
_REQUIRED_SYMBOLS = ("_protos", "_services", "_protos_and_services")
+_MINIMUM_VERSION = (3, 5, 0)
+_UNINSTALLED_TEMPLATE = "Install the grpcio-tools package (1.32.0+) to use the {} function."
+_VERSION_ERROR_TEMPLATE = "The {} function is only on available on Python 3.X interpreters."
-def _uninstalled_protos(*args, **kwargs):
- raise NotImplementedError(
- "Install the grpcio-tools package (1.32.0+) to use the protos function."
- )
+def _has_runtime_proto_symbols(mod):
+ return all(hasattr(mod, sym) for sym in _REQUIRED_SYMBOLS)
-def _uninstalled_services(*args, **kwargs):
- raise NotImplementedError(
- "Install the grpcio-tools package (1.32.0+) to use the services function."
- )
-
-def _uninstalled_protos_and_services(*args, **kwargs):
- raise NotImplementedError(
- "Install the grpcio-tools package (1.32.0+) to use the protos_and_services function."
- )
-
-
-def _interpreter_version_protos(*args, **kwargs):
- raise NotImplementedError(
- "The protos function is only on available on Python 3.X interpreters.")
+def _is_grpc_tools_importable():
+ try:
+ import grpc_tools # pylint: disable=unused-import
+ return True
+ except ImportError as e:
+ # NOTE: It's possible that we're encountering a transitive ImportError, so
+ # we check for that and re-raise if so.
+ if "grpc_tools" not in e.args[0]:
+ raise
+ return False
-def _interpreter_version_services(*args, **kwargs):
- raise NotImplementedError(
- "The services function is only on available on Python 3.X interpreters."
- )
+def _call_with_lazy_import(fn_name, protobuf_path):
+ """Calls one of the three functions, lazily importing grpc_tools.
+ Args:
+ fn_name: The name of the function to import from grpc_tools.protoc.
+ protobuf_path: The path to import.
-def _interpreter_version_protos_and_services(*args, **kwargs):
- raise NotImplementedError(
- "The protos_and_services function is only on available on Python 3.X interpreters."
- )
+ Returns:
+ The appropriate module object.
+ """
+ if sys.version_info < _MINIMUM_VERSION:
+ raise NotImplementedError(_VERSION_ERROR_TEMPLATE.format(fn_name))
+ else:
+ if not _is_grpc_tools_importable():
+ raise NotImplementedError(_UNINSTALLED_TEMPLATE.format(fn_name))
+ import grpc_tools.protoc
+ if _has_runtime_proto_symbols(grpc_tools.protoc):
+ fn = getattr(grpc_tools.protoc, '_' + fn_name)
+ return fn(protobuf_path)
+ else:
+ raise NotImplementedError(_UNINSTALLED_TEMPLATE.format(fn_name))
def protos(protobuf_path): # pylint: disable=unused-argument
@@ -85,6 +93,7 @@ def protos(protobuf_path): # pylint: disable=unused-argument
A module object corresponding to the message code for the indicated
.proto file. Equivalent to a generated _pb2.py file.
"""
+ return _call_with_lazy_import("protos", protobuf_path)
def services(protobuf_path): # pylint: disable=unused-argument
@@ -121,6 +130,7 @@ def services(protobuf_path): # pylint: disable=unused-argument
A module object corresponding to the stub/service code for the indicated
.proto file. Equivalent to a generated _pb2_grpc.py file.
"""
+ return _call_with_lazy_import("services", protobuf_path)
def protos_and_services(protobuf_path): # pylint: disable=unused-argument
@@ -142,30 +152,4 @@ def protos_and_services(protobuf_path): # pylint: disable=unused-argument
Returns:
A 2-tuple of module objects corresponding to (protos(path), services(path)).
"""
-
-
-if sys.version_info < (3, 5, 0):
- protos = _interpreter_version_protos
- services = _interpreter_version_services
- protos_and_services = _interpreter_version_protos_and_services
-else:
- try:
- import grpc_tools # pylint: disable=unused-import
- except ImportError as e:
- # NOTE: It's possible that we're encountering a transitive ImportError, so
- # we check for that and re-raise if so.
- if "grpc_tools" not in e.args[0]:
- raise
- protos = _uninstalled_protos
- services = _uninstalled_services
- protos_and_services = _uninstalled_protos_and_services
- else:
- import grpc_tools.protoc # pylint: disable=unused-import
- if all(hasattr(grpc_tools.protoc, sym) for sym in _REQUIRED_SYMBOLS):
- from grpc_tools.protoc import _protos as protos # pylint: disable=unused-import
- from grpc_tools.protoc import _services as services # pylint: disable=unused-import
- from grpc_tools.protoc import _protos_and_services as protos_and_services # pylint: disable=unused-import
- else:
- protos = _uninstalled_protos
- services = _uninstalled_services
- protos_and_services = _uninstalled_protos_and_services
+ return _call_with_lazy_import("protos_and_services", protobuf_path)
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_server.py b/contrib/libs/grpc/src/python/grpcio/grpc/_server.py
index 48ff7439951..069ffa79822 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_server.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_server.py
@@ -945,9 +945,9 @@ class _Server(grpc.Server):
# pylint: disable=too-many-arguments
def __init__(self, thread_pool, generic_handlers, interceptors, options,
- maximum_concurrent_rpcs, compression):
+ maximum_concurrent_rpcs, compression, xds):
completion_queue = cygrpc.CompletionQueue()
- server = cygrpc.Server(_augment_options(options, compression))
+ server = cygrpc.Server(_augment_options(options, compression), xds)
server.register_completion_queue(completion_queue)
self._state = _ServerState(completion_queue, server, generic_handlers,
_interceptor.service_pipeline(interceptors),
@@ -989,7 +989,7 @@ class _Server(grpc.Server):
def create_server(thread_pool, generic_rpc_handlers, interceptors, options,
- maximum_concurrent_rpcs, compression):
+ maximum_concurrent_rpcs, compression, xds):
_validate_generic_rpc_handlers(generic_rpc_handlers)
return _Server(thread_pool, generic_rpc_handlers, interceptors, options,
- maximum_concurrent_rpcs, compression)
+ maximum_concurrent_rpcs, compression, xds)
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/_simple_stubs.py b/contrib/libs/grpc/src/python/grpcio/grpc/_simple_stubs.py
index baa7ae5dbe1..3dd44c705ed 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/_simple_stubs.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/_simple_stubs.py
@@ -28,8 +28,8 @@ RequestType = TypeVar('RequestType')
ResponseType = TypeVar('ResponseType')
OptionsType = Sequence[Tuple[str, str]]
-CacheKey = Tuple[str, OptionsType, Optional[grpc.ChannelCredentials], Optional[
- grpc.Compression]]
+CacheKey = Tuple[str, OptionsType, Optional[grpc.ChannelCredentials],
+ Optional[grpc.Compression]]
_LOGGER = logging.getLogger(__name__)
@@ -60,20 +60,13 @@ else:
def _create_channel(target: str, options: Sequence[Tuple[str, str]],
channel_credentials: Optional[grpc.ChannelCredentials],
compression: Optional[grpc.Compression]) -> grpc.Channel:
- if channel_credentials is grpc.experimental.insecure_channel_credentials():
- _LOGGER.debug(f"Creating insecure channel with options '{options}' " +
- f"and compression '{compression}'")
- return grpc.insecure_channel(target,
- options=options,
- compression=compression)
- else:
- _LOGGER.debug(
- f"Creating secure channel with credentials '{channel_credentials}', "
- + f"options '{options}' and compression '{compression}'")
- return grpc.secure_channel(target,
- credentials=channel_credentials,
- options=options,
- compression=compression)
+ _LOGGER.debug(
+ f"Creating secure channel with credentials '{channel_credentials}', " +
+ f"options '{options}' and compression '{compression}'")
+ return grpc.secure_channel(target,
+ credentials=channel_credentials,
+ options=options,
+ compression=compression)
class ChannelCache:
@@ -174,19 +167,19 @@ class ChannelCache:
@experimental_api
def unary_unary(
- request: RequestType,
- target: str,
- method: str,
- request_serializer: Optional[Callable[[Any], bytes]] = None,
- response_deserializer: Optional[Callable[[bytes], Any]] = None,
- options: Sequence[Tuple[AnyStr, AnyStr]] = (),
- channel_credentials: Optional[grpc.ChannelCredentials] = None,
- insecure: bool = False,
- call_credentials: Optional[grpc.CallCredentials] = None,
- compression: Optional[grpc.Compression] = None,
- wait_for_ready: Optional[bool] = None,
- timeout: Optional[float] = _DEFAULT_TIMEOUT,
- metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
+ request: RequestType,
+ target: str,
+ method: str,
+ request_serializer: Optional[Callable[[Any], bytes]] = None,
+ response_deserializer: Optional[Callable[[bytes], Any]] = None,
+ options: Sequence[Tuple[AnyStr, AnyStr]] = (),
+ channel_credentials: Optional[grpc.ChannelCredentials] = None,
+ insecure: bool = False,
+ call_credentials: Optional[grpc.CallCredentials] = None,
+ compression: Optional[grpc.Compression] = None,
+ wait_for_ready: Optional[bool] = None,
+ timeout: Optional[float] = _DEFAULT_TIMEOUT,
+ metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
) -> ResponseType:
"""Invokes a unary-unary RPC without an explicitly specified channel.
@@ -255,19 +248,19 @@ def unary_unary(
@experimental_api
def unary_stream(
- request: RequestType,
- target: str,
- method: str,
- request_serializer: Optional[Callable[[Any], bytes]] = None,
- response_deserializer: Optional[Callable[[bytes], Any]] = None,
- options: Sequence[Tuple[AnyStr, AnyStr]] = (),
- channel_credentials: Optional[grpc.ChannelCredentials] = None,
- insecure: bool = False,
- call_credentials: Optional[grpc.CallCredentials] = None,
- compression: Optional[grpc.Compression] = None,
- wait_for_ready: Optional[bool] = None,
- timeout: Optional[float] = _DEFAULT_TIMEOUT,
- metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
+ request: RequestType,
+ target: str,
+ method: str,
+ request_serializer: Optional[Callable[[Any], bytes]] = None,
+ response_deserializer: Optional[Callable[[bytes], Any]] = None,
+ options: Sequence[Tuple[AnyStr, AnyStr]] = (),
+ channel_credentials: Optional[grpc.ChannelCredentials] = None,
+ insecure: bool = False,
+ call_credentials: Optional[grpc.CallCredentials] = None,
+ compression: Optional[grpc.Compression] = None,
+ wait_for_ready: Optional[bool] = None,
+ timeout: Optional[float] = _DEFAULT_TIMEOUT,
+ metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
) -> Iterator[ResponseType]:
"""Invokes a unary-stream RPC without an explicitly specified channel.
@@ -335,19 +328,19 @@ def unary_stream(
@experimental_api
def stream_unary(
- request_iterator: Iterator[RequestType],
- target: str,
- method: str,
- request_serializer: Optional[Callable[[Any], bytes]] = None,
- response_deserializer: Optional[Callable[[bytes], Any]] = None,
- options: Sequence[Tuple[AnyStr, AnyStr]] = (),
- channel_credentials: Optional[grpc.ChannelCredentials] = None,
- insecure: bool = False,
- call_credentials: Optional[grpc.CallCredentials] = None,
- compression: Optional[grpc.Compression] = None,
- wait_for_ready: Optional[bool] = None,
- timeout: Optional[float] = _DEFAULT_TIMEOUT,
- metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
+ request_iterator: Iterator[RequestType],
+ target: str,
+ method: str,
+ request_serializer: Optional[Callable[[Any], bytes]] = None,
+ response_deserializer: Optional[Callable[[bytes], Any]] = None,
+ options: Sequence[Tuple[AnyStr, AnyStr]] = (),
+ channel_credentials: Optional[grpc.ChannelCredentials] = None,
+ insecure: bool = False,
+ call_credentials: Optional[grpc.CallCredentials] = None,
+ compression: Optional[grpc.Compression] = None,
+ wait_for_ready: Optional[bool] = None,
+ timeout: Optional[float] = _DEFAULT_TIMEOUT,
+ metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
) -> ResponseType:
"""Invokes a stream-unary RPC without an explicitly specified channel.
@@ -415,19 +408,19 @@ def stream_unary(
@experimental_api
def stream_stream(
- request_iterator: Iterator[RequestType],
- target: str,
- method: str,
- request_serializer: Optional[Callable[[Any], bytes]] = None,
- response_deserializer: Optional[Callable[[bytes], Any]] = None,
- options: Sequence[Tuple[AnyStr, AnyStr]] = (),
- channel_credentials: Optional[grpc.ChannelCredentials] = None,
- insecure: bool = False,
- call_credentials: Optional[grpc.CallCredentials] = None,
- compression: Optional[grpc.Compression] = None,
- wait_for_ready: Optional[bool] = None,
- timeout: Optional[float] = _DEFAULT_TIMEOUT,
- metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
+ request_iterator: Iterator[RequestType],
+ target: str,
+ method: str,
+ request_serializer: Optional[Callable[[Any], bytes]] = None,
+ response_deserializer: Optional[Callable[[bytes], Any]] = None,
+ options: Sequence[Tuple[AnyStr, AnyStr]] = (),
+ channel_credentials: Optional[grpc.ChannelCredentials] = None,
+ insecure: bool = False,
+ call_credentials: Optional[grpc.CallCredentials] = None,
+ compression: Optional[grpc.Compression] = None,
+ wait_for_ready: Optional[bool] = None,
+ timeout: Optional[float] = _DEFAULT_TIMEOUT,
+ metadata: Optional[Sequence[Tuple[str, Union[str, bytes]]]] = None
) -> Iterator[ResponseType]:
"""Invokes a stream-stream RPC without an explicitly specified channel.
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_channel.py b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_channel.py
index 4b4ea1355b4..b9a47efb41c 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_channel.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_channel.py
@@ -28,15 +28,16 @@ class UnaryUnaryMultiCallable(abc.ABC):
"""Enables asynchronous invocation of a unary-call RPC."""
@abc.abstractmethod
- def __call__(self,
- request: Any,
- *,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.UnaryUnaryCall:
+ def __call__(
+ self,
+ request: Any,
+ *,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.UnaryUnaryCall:
"""Asynchronously invokes the underlying RPC.
Args:
@@ -66,15 +67,16 @@ class UnaryStreamMultiCallable(abc.ABC):
"""Enables asynchronous invocation of a server-streaming RPC."""
@abc.abstractmethod
- def __call__(self,
- request: Any,
- *,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.UnaryStreamCall:
+ def __call__(
+ self,
+ request: Any,
+ *,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.UnaryStreamCall:
"""Asynchronously invokes the underlying RPC.
Args:
@@ -104,14 +106,15 @@ class StreamUnaryMultiCallable(abc.ABC):
"""Enables asynchronous invocation of a client-streaming RPC."""
@abc.abstractmethod
- def __call__(self,
- request_iterator: Optional[RequestIterableType] = None,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.StreamUnaryCall:
+ def __call__(
+ self,
+ request_iterator: Optional[RequestIterableType] = None,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.StreamUnaryCall:
"""Asynchronously invokes the underlying RPC.
Args:
@@ -142,14 +145,15 @@ class StreamStreamMultiCallable(abc.ABC):
"""Enables asynchronous invocation of a bidirectional-streaming RPC."""
@abc.abstractmethod
- def __call__(self,
- request_iterator: Optional[RequestIterableType] = None,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.StreamStreamCall:
+ def __call__(
+ self,
+ request_iterator: Optional[RequestIterableType] = None,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.StreamStreamCall:
"""Asynchronously invokes the underlying RPC.
Args:
@@ -234,8 +238,8 @@ class Channel(abc.ABC):
@abc.abstractmethod
async def wait_for_state_change(
- self,
- last_observed_state: grpc.ChannelConnectivity,
+ self,
+ last_observed_state: grpc.ChannelConnectivity,
) -> None:
"""Waits for a change in connectivity state.
@@ -264,10 +268,10 @@ class Channel(abc.ABC):
@abc.abstractmethod
def unary_unary(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> UnaryUnaryMultiCallable:
"""Creates a UnaryUnaryMultiCallable for a unary-unary method.
@@ -285,10 +289,10 @@ class Channel(abc.ABC):
@abc.abstractmethod
def unary_stream(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> UnaryStreamMultiCallable:
"""Creates a UnaryStreamMultiCallable for a unary-stream method.
@@ -306,10 +310,10 @@ class Channel(abc.ABC):
@abc.abstractmethod
def stream_unary(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> StreamUnaryMultiCallable:
"""Creates a StreamUnaryMultiCallable for a stream-unary method.
@@ -327,10 +331,10 @@ class Channel(abc.ABC):
@abc.abstractmethod
def stream_stream(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> StreamStreamMultiCallable:
"""Creates a StreamStreamMultiCallable for a stream-stream method.
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_server.py b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_server.py
index 926c8651714..7cbedf9b60c 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_server.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_base_server.py
@@ -169,8 +169,11 @@ class ServicerContext(Generic[RequestType, ResponseType], abc.ABC):
"""
@abc.abstractmethod
- async def abort(self, code: grpc.StatusCode, details: str,
- trailing_metadata: Metadata) -> None:
+ async def abort(
+ self,
+ code: grpc.StatusCode,
+ details: str = '',
+ trailing_metadata: Metadata = tuple()) -> None:
"""Raises an exception to terminate the RPC with a non-OK status.
The code and details passed as arguments will supercede any existing
@@ -292,3 +295,12 @@ class ServicerContext(Generic[RequestType, ResponseType], abc.ABC):
Returns:
A map of strings to an iterable of bytes for each auth property.
"""
+
+ def time_remaining(self) -> float:
+ """Describes the length of allowed time remaining for the RPC.
+
+ Returns:
+ A nonnegative float indicating the length of allowed time in seconds
+ remaining for the RPC to complete before it is considered to have
+ timed out, or None if no deadline was specified for the RPC.
+ """
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_call.py b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_call.py
index ba229f35c39..def89b4df01 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_call.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_call.py
@@ -393,9 +393,8 @@ class _StreamRequestMixin(Call):
def _metadata_sent_observer(self):
self._metadata_sent.set()
- async def _consume_request_iterator(self,
- request_iterator: RequestIterableType
- ) -> None:
+ async def _consume_request_iterator(
+ self, request_iterator: RequestIterableType) -> None:
try:
if inspect.isasyncgen(request_iterator) or hasattr(
request_iterator, '__aiter__'):
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_channel.py b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_channel.py
index 3af34677064..99f256e0b9c 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_channel.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_channel.py
@@ -73,13 +73,13 @@ class _BaseMultiCallable:
# pylint: disable=too-many-arguments
def __init__(
- self,
- channel: cygrpc.AioChannel,
- method: bytes,
- request_serializer: SerializingFunction,
- response_deserializer: DeserializingFunction,
- interceptors: Optional[Sequence[ClientInterceptor]],
- loop: asyncio.AbstractEventLoop,
+ self,
+ channel: cygrpc.AioChannel,
+ method: bytes,
+ request_serializer: SerializingFunction,
+ response_deserializer: DeserializingFunction,
+ interceptors: Optional[Sequence[ClientInterceptor]],
+ loop: asyncio.AbstractEventLoop,
) -> None:
self._loop = loop
self._channel = channel
@@ -89,9 +89,9 @@ class _BaseMultiCallable:
self._interceptors = interceptors
@staticmethod
- def _init_metadata(metadata: Optional[Metadata] = None,
- compression: Optional[grpc.Compression] = None
- ) -> Metadata:
+ def _init_metadata(
+ metadata: Optional[Metadata] = None,
+ compression: Optional[grpc.Compression] = None) -> Metadata:
"""Based on the provided values for <metadata> or <compression> initialise the final
metadata, as it should be used for the current call.
"""
@@ -105,15 +105,16 @@ class _BaseMultiCallable:
class UnaryUnaryMultiCallable(_BaseMultiCallable,
_base_channel.UnaryUnaryMultiCallable):
- def __call__(self,
- request: Any,
- *,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.UnaryUnaryCall:
+ def __call__(
+ self,
+ request: Any,
+ *,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.UnaryUnaryCall:
metadata = self._init_metadata(metadata, compression)
if not self._interceptors:
@@ -135,15 +136,16 @@ class UnaryUnaryMultiCallable(_BaseMultiCallable,
class UnaryStreamMultiCallable(_BaseMultiCallable,
_base_channel.UnaryStreamMultiCallable):
- def __call__(self,
- request: Any,
- *,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.UnaryStreamCall:
+ def __call__(
+ self,
+ request: Any,
+ *,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.UnaryStreamCall:
metadata = self._init_metadata(metadata, compression)
deadline = _timeout_to_deadline(timeout)
@@ -166,14 +168,15 @@ class UnaryStreamMultiCallable(_BaseMultiCallable,
class StreamUnaryMultiCallable(_BaseMultiCallable,
_base_channel.StreamUnaryMultiCallable):
- def __call__(self,
- request_iterator: Optional[RequestIterableType] = None,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.StreamUnaryCall:
+ def __call__(
+ self,
+ request_iterator: Optional[RequestIterableType] = None,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.StreamUnaryCall:
metadata = self._init_metadata(metadata, compression)
deadline = _timeout_to_deadline(timeout)
@@ -196,14 +199,15 @@ class StreamUnaryMultiCallable(_BaseMultiCallable,
class StreamStreamMultiCallable(_BaseMultiCallable,
_base_channel.StreamStreamMultiCallable):
- def __call__(self,
- request_iterator: Optional[RequestIterableType] = None,
- timeout: Optional[float] = None,
- metadata: Optional[Metadata] = None,
- credentials: Optional[grpc.CallCredentials] = None,
- wait_for_ready: Optional[bool] = None,
- compression: Optional[grpc.Compression] = None
- ) -> _base_call.StreamStreamCall:
+ def __call__(
+ self,
+ request_iterator: Optional[RequestIterableType] = None,
+ timeout: Optional[float] = None,
+ metadata: Optional[Metadata] = None,
+ credentials: Optional[grpc.CallCredentials] = None,
+ wait_for_ready: Optional[bool] = None,
+ compression: Optional[grpc.Compression] = None
+ ) -> _base_call.StreamStreamCall:
metadata = self._init_metadata(metadata, compression)
deadline = _timeout_to_deadline(timeout)
@@ -361,8 +365,8 @@ class Channel(_base_channel.Channel):
return _common.CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY[result]
async def wait_for_state_change(
- self,
- last_observed_state: grpc.ChannelConnectivity,
+ self,
+ last_observed_state: grpc.ChannelConnectivity,
) -> None:
assert await self._channel.watch_connectivity_state(
last_observed_state.value[0], None)
@@ -374,10 +378,10 @@ class Channel(_base_channel.Channel):
state = self.get_state(try_to_connect=True)
def unary_unary(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> UnaryUnaryMultiCallable:
return UnaryUnaryMultiCallable(self._channel, _common.encode(method),
request_serializer,
@@ -386,10 +390,10 @@ class Channel(_base_channel.Channel):
self._loop)
def unary_stream(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> UnaryStreamMultiCallable:
return UnaryStreamMultiCallable(self._channel, _common.encode(method),
request_serializer,
@@ -398,10 +402,10 @@ class Channel(_base_channel.Channel):
self._loop)
def stream_unary(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> StreamUnaryMultiCallable:
return StreamUnaryMultiCallable(self._channel, _common.encode(method),
request_serializer,
@@ -410,10 +414,10 @@ class Channel(_base_channel.Channel):
self._loop)
def stream_stream(
- self,
- method: str,
- request_serializer: Optional[SerializingFunction] = None,
- response_deserializer: Optional[DeserializingFunction] = None
+ self,
+ method: str,
+ request_serializer: Optional[SerializingFunction] = None,
+ response_deserializer: Optional[DeserializingFunction] = None
) -> StreamStreamMultiCallable:
return StreamStreamMultiCallable(self._channel, _common.encode(method),
request_serializer,
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_interceptor.py b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_interceptor.py
index 80e9625c553..f62685c1278 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/aio/_interceptor.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/aio/_interceptor.py
@@ -42,8 +42,8 @@ class ServerInterceptor(metaclass=ABCMeta):
@abstractmethod
async def intercept_service(
- self, continuation: Callable[[grpc.HandlerCallDetails], Awaitable[
- grpc.RpcMethodHandler]],
+ self, continuation: Callable[[grpc.HandlerCallDetails],
+ Awaitable[grpc.RpcMethodHandler]],
handler_call_details: grpc.HandlerCallDetails
) -> grpc.RpcMethodHandler:
"""Intercepts incoming RPCs before handing them over to a handler.
@@ -167,11 +167,11 @@ class StreamUnaryClientInterceptor(ClientInterceptor, metaclass=ABCMeta):
@abstractmethod
async def intercept_stream_unary(
- self,
- continuation: Callable[[ClientCallDetails, RequestType],
- UnaryStreamCall],
- client_call_details: ClientCallDetails,
- request_iterator: RequestIterableType,
+ self,
+ continuation: Callable[[ClientCallDetails, RequestType],
+ UnaryStreamCall],
+ client_call_details: ClientCallDetails,
+ request_iterator: RequestIterableType,
) -> StreamUnaryCall:
"""Intercepts a stream-unary invocation asynchronously.
@@ -208,11 +208,11 @@ class StreamStreamClientInterceptor(ClientInterceptor, metaclass=ABCMeta):
@abstractmethod
async def intercept_stream_stream(
- self,
- continuation: Callable[[ClientCallDetails, RequestType],
- UnaryStreamCall],
- client_call_details: ClientCallDetails,
- request_iterator: RequestIterableType,
+ self,
+ continuation: Callable[[ClientCallDetails, RequestType],
+ UnaryStreamCall],
+ client_call_details: ClientCallDetails,
+ request_iterator: RequestIterableType,
) -> Union[ResponseIterableType, StreamStreamCall]:
"""Intercepts a stream-stream invocation asynchronously.
@@ -280,9 +280,8 @@ class InterceptedCall:
def __del__(self):
self.cancel()
- def _fire_or_add_pending_done_callbacks(self,
- interceptors_task: asyncio.Task
- ) -> None:
+ def _fire_or_add_pending_done_callbacks(
+ self, interceptors_task: asyncio.Task) -> None:
if not self._pending_add_done_callbacks:
return
@@ -442,8 +441,8 @@ class _InterceptedStreamResponseMixin:
# consumed a logging warning is emmited by Asyncio.
self._response_aiter = None
- async def _wait_for_interceptor_task_response_iterator(self
- ) -> ResponseType:
+ async def _wait_for_interceptor_task_response_iterator(
+ self) -> ResponseType:
call = await self._interceptors_task
async for response in call:
yield response
@@ -572,14 +571,14 @@ class InterceptedUnaryUnaryCall(_InterceptedUnaryResponseMixin, InterceptedCall,
super().__init__(interceptors_task)
# pylint: disable=too-many-arguments
- async def _invoke(self, interceptors: Sequence[UnaryUnaryClientInterceptor],
- method: bytes, timeout: Optional[float],
- metadata: Optional[Metadata],
- credentials: Optional[grpc.CallCredentials],
- wait_for_ready: Optional[bool], request: RequestType,
- request_serializer: SerializingFunction,
- response_deserializer: DeserializingFunction
- ) -> UnaryUnaryCall:
+ async def _invoke(
+ self, interceptors: Sequence[UnaryUnaryClientInterceptor],
+ method: bytes, timeout: Optional[float],
+ metadata: Optional[Metadata],
+ credentials: Optional[grpc.CallCredentials],
+ wait_for_ready: Optional[bool], request: RequestType,
+ request_serializer: SerializingFunction,
+ response_deserializer: DeserializingFunction) -> UnaryUnaryCall:
"""Run the RPC call wrapped in interceptors"""
async def _run_interceptor(
@@ -646,20 +645,20 @@ class InterceptedUnaryStreamCall(_InterceptedStreamResponseMixin,
super().__init__(interceptors_task)
# pylint: disable=too-many-arguments
- async def _invoke(self, interceptors: Sequence[UnaryUnaryClientInterceptor],
- method: bytes, timeout: Optional[float],
- metadata: Optional[Metadata],
- credentials: Optional[grpc.CallCredentials],
- wait_for_ready: Optional[bool], request: RequestType,
- request_serializer: SerializingFunction,
- response_deserializer: DeserializingFunction
- ) -> UnaryStreamCall:
+ async def _invoke(
+ self, interceptors: Sequence[UnaryUnaryClientInterceptor],
+ method: bytes, timeout: Optional[float],
+ metadata: Optional[Metadata],
+ credentials: Optional[grpc.CallCredentials],
+ wait_for_ready: Optional[bool], request: RequestType,
+ request_serializer: SerializingFunction,
+ response_deserializer: DeserializingFunction) -> UnaryStreamCall:
"""Run the RPC call wrapped in interceptors"""
async def _run_interceptor(
- interceptors: Iterator[UnaryStreamClientInterceptor],
- client_call_details: ClientCallDetails,
- request: RequestType,
+ interceptors: Iterator[UnaryStreamClientInterceptor],
+ client_call_details: ClientCallDetails,
+ request: RequestType,
) -> _base_call.UnaryUnaryCall:
interceptor = next(interceptors, None)
@@ -741,9 +740,9 @@ class InterceptedStreamUnaryCall(_InterceptedUnaryResponseMixin,
"""Run the RPC call wrapped in interceptors"""
async def _run_interceptor(
- interceptors: Iterator[UnaryUnaryClientInterceptor],
- client_call_details: ClientCallDetails,
- request_iterator: RequestIterableType
+ interceptors: Iterator[UnaryUnaryClientInterceptor],
+ client_call_details: ClientCallDetails,
+ request_iterator: RequestIterableType
) -> _base_call.StreamUnaryCall:
interceptor = next(interceptors, None)
@@ -814,9 +813,9 @@ class InterceptedStreamStreamCall(_InterceptedStreamResponseMixin,
"""Run the RPC call wrapped in interceptors"""
async def _run_interceptor(
- interceptors: Iterator[StreamStreamClientInterceptor],
- client_call_details: ClientCallDetails,
- request_iterator: RequestIterableType
+ interceptors: Iterator[StreamStreamClientInterceptor],
+ client_call_details: ClientCallDetails,
+ request_iterator: RequestIterableType
) -> _base_call.StreamStreamCall:
interceptor = next(interceptors, None)
@@ -908,8 +907,8 @@ class _StreamCallResponseIterator:
_call: Union[_base_call.UnaryStreamCall, _base_call.StreamStreamCall]
_response_iterator: AsyncIterable[ResponseType]
- def __init__(self, call: Union[_base_call.UnaryStreamCall, _base_call.
- StreamStreamCall],
+ def __init__(self, call: Union[_base_call.UnaryStreamCall,
+ _base_call.StreamStreamCall],
response_iterator: AsyncIterable[ResponseType]) -> None:
self._response_iterator = response_iterator
self._call = call
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc/experimental/__init__.py b/contrib/libs/grpc/src/python/grpcio/grpc/experimental/__init__.py
index a4e2660fb4e..c820bc9db3b 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc/experimental/__init__.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc/experimental/__init__.py
@@ -22,6 +22,7 @@ import sys
import warnings
import grpc
+from grpc._cython import cygrpc as _cygrpc
_EXPERIMENTAL_APIS_USED = set()
@@ -41,19 +42,16 @@ class UsageError(Exception):
"""Raised by the gRPC library to indicate usage not allowed by the API."""
-_insecure_channel_credentials_sentinel = object()
+# It's important that there be a single insecure credentials object so that its
+# hash is deterministic and can be used for indexing in the simple stubs cache.
_insecure_channel_credentials = grpc.ChannelCredentials(
- _insecure_channel_credentials_sentinel)
+ _cygrpc.channel_credentials_insecure())
def insecure_channel_credentials():
"""Creates a ChannelCredentials for use with an insecure channel.
THIS IS AN EXPERIMENTAL API.
-
- This is not for use with secure_channel function. Intead, this should be
- used with grpc.unary_unary, grpc.unary_stream, grpc.stream_unary, or
- grpc.stream_stream.
"""
return _insecure_channel_credentials
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc_core_dependencies.py b/contrib/libs/grpc/src/python/grpcio/grpc_core_dependencies.py
index 67f985e1f46..f3d11423ef2 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc_core_dependencies.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc_core_dependencies.py
@@ -24,6 +24,7 @@ CORE_SOURCE_FILES = [
'src/core/ext/filters/client_channel/client_channel_factory.cc',
'src/core/ext/filters/client_channel/client_channel_plugin.cc',
'src/core/ext/filters/client_channel/config_selector.cc',
+ 'src/core/ext/filters/client_channel/dynamic_filters.cc',
'src/core/ext/filters/client_channel/global_subchannel_pool.cc',
'src/core/ext/filters/client_channel/health/health_check_client.cc',
'src/core/ext/filters/client_channel/http_connect_handshaker.cc',
@@ -39,34 +40,33 @@ CORE_SOURCE_FILES = [
'src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc',
'src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc',
'src/core/ext/filters/client_channel/lb_policy/priority/priority.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc',
'src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc',
'src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/cds.cc',
- 'src/core/ext/filters/client_channel/lb_policy/xds/eds.cc',
- 'src/core/ext/filters/client_channel/lb_policy/xds/eds_drop.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc',
'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc',
+ 'src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc',
'src/core/ext/filters/client_channel/lb_policy_registry.cc',
'src/core/ext/filters/client_channel/local_subchannel_pool.cc',
'src/core/ext/filters/client_channel/proxy_mapper_registry.cc',
'src/core/ext/filters/client_channel/resolver.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc',
- 'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_posix.cc',
'src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc',
'src/core/ext/filters/client_channel/resolver/dns/dns_resolver_selection.cc',
'src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc',
'src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc',
+ 'src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc',
'src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc',
'src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc',
'src/core/ext/filters/client_channel/resolver_registry.cc',
'src/core/ext/filters/client_channel/resolver_result_parsing.cc',
- 'src/core/ext/filters/client_channel/resolving_lb_policy.cc',
'src/core/ext/filters/client_channel/retry_throttle.cc',
'src/core/ext/filters/client_channel/server_address.cc',
'src/core/ext/filters/client_channel/service_config.cc',
@@ -76,6 +76,8 @@ CORE_SOURCE_FILES = [
'src/core/ext/filters/client_channel/subchannel_pool_interface.cc',
'src/core/ext/filters/client_idle/client_idle_filter.cc',
'src/core/ext/filters/deadline/deadline_filter.cc',
+ 'src/core/ext/filters/fault_injection/fault_injection_filter.cc',
+ 'src/core/ext/filters/fault_injection/service_config_parser.cc',
'src/core/ext/filters/http/client/http_client_filter.cc',
'src/core/ext/filters/http/client_authority_filter.cc',
'src/core/ext/filters/http/http_filters_plugin.cc',
@@ -121,9 +123,11 @@ CORE_SOURCE_FILES = [
'src/core/ext/transport/chttp2/transport/writing.cc',
'src/core/ext/transport/inproc/inproc_plugin.cc',
'src/core/ext/transport/inproc/inproc_transport.cc',
+ 'src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c',
'src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c',
'src/core/ext/upb-generated/envoy/annotations/resource.upb.c',
'src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c',
+ 'src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c',
'src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c',
'src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c',
'src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c',
@@ -148,11 +152,17 @@ CORE_SOURCE_FILES = [
'src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c',
'src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c',
'src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c',
+ 'src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c',
+ 'src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c',
'src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c',
'src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c',
'src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c',
'src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c',
'src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c',
+ 'src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c',
+ 'src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c',
+ 'src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c',
+ 'src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c',
'src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c',
'src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c',
'src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c',
@@ -166,11 +176,14 @@ CORE_SOURCE_FILES = [
'src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c',
'src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.c',
'src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.c',
+ 'src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c',
+ 'src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c',
+ 'src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c',
'src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c',
'src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c',
'src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c',
@@ -200,20 +213,116 @@ CORE_SOURCE_FILES = [
'src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c',
'src/core/ext/upb-generated/udpa/annotations/status.upb.c',
'src/core/ext/upb-generated/udpa/annotations/versioning.upb.c',
- 'src/core/ext/upb-generated/udpa/core/v1/authority.upb.c',
- 'src/core/ext/upb-generated/udpa/core/v1/collection_entry.upb.c',
- 'src/core/ext/upb-generated/udpa/core/v1/context_params.upb.c',
- 'src/core/ext/upb-generated/udpa/core/v1/resource.upb.c',
- 'src/core/ext/upb-generated/udpa/core/v1/resource_locator.upb.c',
- 'src/core/ext/upb-generated/udpa/core/v1/resource_name.upb.c',
'src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c',
+ 'src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c',
'src/core/ext/upb-generated/validate/validate.upb.c',
+ 'src/core/ext/upb-generated/xds/core/v3/authority.upb.c',
+ 'src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c',
+ 'src/core/ext/upb-generated/xds/core/v3/context_params.upb.c',
+ 'src/core/ext/upb-generated/xds/core/v3/resource.upb.c',
+ 'src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c',
+ 'src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c',
+ 'src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/api/http.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c',
+ '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/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',
+ 'src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/validate/validate.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c',
+ 'src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c',
'src/core/ext/xds/certificate_provider_registry.cc',
- 'src/core/ext/xds/google_mesh_ca_certificate_provider_factory.cc',
+ 'src/core/ext/xds/certificate_provider_store.cc',
+ 'src/core/ext/xds/file_watcher_certificate_provider_factory.cc',
'src/core/ext/xds/xds_api.cc',
'src/core/ext/xds/xds_bootstrap.cc',
+ 'src/core/ext/xds/xds_certificate_provider.cc',
'src/core/ext/xds/xds_client.cc',
'src/core/ext/xds/xds_client_stats.cc',
+ 'src/core/ext/xds/xds_http_fault_filter.cc',
+ 'src/core/ext/xds/xds_http_filters.cc',
+ 'src/core/ext/xds/xds_server_config_fetcher.cc',
'src/core/lib/avl/avl.cc',
'src/core/lib/backoff/backoff.cc',
'src/core/lib/channel/channel_args.cc',
@@ -269,12 +378,16 @@ CORE_SOURCE_FILES = [
'src/core/lib/gpr/tmpfile_windows.cc',
'src/core/lib/gpr/wrap_memcpy.cc',
'src/core/lib/gprpp/arena.cc',
+ 'src/core/lib/gprpp/examine_stack.cc',
'src/core/lib/gprpp/fork.cc',
'src/core/lib/gprpp/global_config_env.cc',
'src/core/lib/gprpp/host_port.cc',
'src/core/lib/gprpp/mpscq.cc',
+ 'src/core/lib/gprpp/stat_posix.cc',
+ 'src/core/lib/gprpp/stat_windows.cc',
'src/core/lib/gprpp/thd_posix.cc',
'src/core/lib/gprpp/thd_windows.cc',
+ 'src/core/lib/gprpp/time_util.cc',
'src/core/lib/http/format_request.cc',
'src/core/lib/http/httpcli.cc',
'src/core/lib/http/httpcli_security_connector.cc',
@@ -378,10 +491,9 @@ CORE_SOURCE_FILES = [
'src/core/lib/json/json_reader.cc',
'src/core/lib/json/json_util.cc',
'src/core/lib/json/json_writer.cc',
+ 'src/core/lib/matchers/matchers.cc',
'src/core/lib/profiling/basic_timers.cc',
'src/core/lib/profiling/stap_timers.cc',
- 'src/core/lib/security/authorization/authorization_engine.cc',
- 'src/core/lib/security/authorization/evaluate_args.cc',
'src/core/lib/security/context/security_context.cc',
'src/core/lib/security/credentials/alts/alts_credentials.cc',
'src/core/lib/security/credentials/alts/check_gcp_environment.cc',
@@ -394,10 +506,16 @@ CORE_SOURCE_FILES = [
'src/core/lib/security/credentials/composite/composite_credentials.cc',
'src/core/lib/security/credentials/credentials.cc',
'src/core/lib/security/credentials/credentials_metadata.cc',
+ 'src/core/lib/security/credentials/external/aws_external_account_credentials.cc',
+ 'src/core/lib/security/credentials/external/aws_request_signer.cc',
+ 'src/core/lib/security/credentials/external/external_account_credentials.cc',
+ 'src/core/lib/security/credentials/external/file_external_account_credentials.cc',
+ 'src/core/lib/security/credentials/external/url_external_account_credentials.cc',
'src/core/lib/security/credentials/fake/fake_credentials.cc',
'src/core/lib/security/credentials/google_default/credentials_generic.cc',
'src/core/lib/security/credentials/google_default/google_default_credentials.cc',
'src/core/lib/security/credentials/iam/iam_credentials.cc',
+ 'src/core/lib/security/credentials/insecure/insecure_credentials.cc',
'src/core/lib/security/credentials/jwt/json_token.cc',
'src/core/lib/security/credentials/jwt/jwt_credentials.cc',
'src/core/lib/security/credentials/jwt/jwt_verifier.cc',
@@ -406,11 +524,14 @@ CORE_SOURCE_FILES = [
'src/core/lib/security/credentials/plugin/plugin_credentials.cc',
'src/core/lib/security/credentials/ssl/ssl_credentials.cc',
'src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc',
+ 'src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc',
'src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc',
'src/core/lib/security/credentials/tls/tls_credentials.cc',
+ 'src/core/lib/security/credentials/tls/tls_utils.cc',
'src/core/lib/security/credentials/xds/xds_credentials.cc',
'src/core/lib/security/security_connector/alts/alts_security_connector.cc',
'src/core/lib/security/security_connector/fake/fake_security_connector.cc',
+ 'src/core/lib/security/security_connector/insecure/insecure_security_connector.cc',
'src/core/lib/security/security_connector/load_system_roots_fallback.cc',
'src/core/lib/security/security_connector/load_system_roots_linux.cc',
'src/core/lib/security/security_connector/local/local_security_connector.cc',
@@ -494,7 +615,6 @@ CORE_SOURCE_FILES = [
'src/core/tsi/ssl_transport_security.cc',
'src/core/tsi/transport_security.cc',
'src/core/tsi/transport_security_grpc.cc',
- 'third_party/abseil-cpp/y_absl/base/dynamic_annotations.cc',
'third_party/abseil-cpp/y_absl/base/internal/cycleclock.cc',
'third_party/abseil-cpp/y_absl/base/internal/exponential_biased.cc',
'third_party/abseil-cpp/y_absl/base/internal/low_level_alloc.cc',
@@ -520,6 +640,7 @@ CORE_SOURCE_FILES = [
'third_party/abseil-cpp/y_absl/numeric/int128.cc',
'third_party/abseil-cpp/y_absl/status/status.cc',
'third_party/abseil-cpp/y_absl/status/status_payload_printer.cc',
+ 'third_party/abseil-cpp/y_absl/status/statusor.cc',
'third_party/abseil-cpp/y_absl/strings/ascii.cc',
'third_party/abseil-cpp/y_absl/strings/charconv.cc',
'third_party/abseil-cpp/y_absl/strings/cord.cc',
@@ -613,6 +734,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl-with-bazel/src/crypto/bio/printf.c',
'third_party/boringssl-with-bazel/src/crypto/bio/socket.c',
'third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c',
+ 'third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c',
'third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c',
'third_party/boringssl-with-bazel/src/crypto/bn_extra/convert.c',
'third_party/boringssl-with-bazel/src/crypto/buf/buf.c',
@@ -637,6 +759,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl-with-bazel/src/crypto/conf/conf.c',
'third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-fuchsia.c',
'third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-linux.c',
+ 'third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-win.c',
'third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c',
'third_party/boringssl-with-bazel/src/crypto/cpu-arm.c',
'third_party/boringssl-with-bazel/src/crypto/cpu-intel.c',
@@ -644,10 +767,8 @@ CORE_SOURCE_FILES = [
'third_party/boringssl-with-bazel/src/crypto/crypto.c',
'third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c',
'third_party/boringssl-with-bazel/src/crypto/curve25519/spake25519.c',
- 'third_party/boringssl-with-bazel/src/crypto/dh/check.c',
- 'third_party/boringssl-with-bazel/src/crypto/dh/dh.c',
- 'third_party/boringssl-with-bazel/src/crypto/dh/dh_asn1.c',
- 'third_party/boringssl-with-bazel/src/crypto/dh/params.c',
+ 'third_party/boringssl-with-bazel/src/crypto/dh_extra/dh_asn1.c',
+ 'third_party/boringssl-with-bazel/src/crypto/dh_extra/params.c',
'third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c',
'third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c',
'third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c',
@@ -706,6 +827,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl-with-bazel/src/crypto/rand_extra/deterministic.c',
'third_party/boringssl-with-bazel/src/crypto/rand_extra/forkunsafe.c',
'third_party/boringssl-with-bazel/src/crypto/rand_extra/fuchsia.c',
+ 'third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c',
'third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c',
'third_party/boringssl-with-bazel/src/crypto/rand_extra/windows.c',
'third_party/boringssl-with-bazel/src/crypto/rc4/rc4.c',
@@ -721,6 +843,7 @@ CORE_SOURCE_FILES = [
'third_party/boringssl-with-bazel/src/crypto/thread_win.c',
'third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c',
'third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c',
+ 'third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c',
'third_party/boringssl-with-bazel/src/crypto/x509/a_digest.c',
'third_party/boringssl-with-bazel/src/crypto/x509/a_sign.c',
'third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c',
@@ -911,10 +1034,13 @@ CORE_SOURCE_FILES = [
'third_party/re2/util/rune.cc',
'third_party/re2/util/strutil.cc',
'third_party/upb/upb/decode.c',
+ 'third_party/upb/upb/decode_fast.c',
+ 'third_party/upb/upb/def.c',
'third_party/upb/upb/encode.c',
'third_party/upb/upb/msg.c',
- 'third_party/upb/upb/port.c',
+ 'third_party/upb/upb/reflection.c',
'third_party/upb/upb/table.c',
+ 'third_party/upb/upb/text_encode.c',
'third_party/upb/upb/upb.c',
'third_party/zlib/adler32.c',
'third_party/zlib/compress.c',
@@ -946,62 +1072,51 @@ ASM_SOURCE_FILES = {
'third_party/boringssl-with-bazel/ios-aarch64/crypto/fipsmodule/vpaes-armv8.S',
'third_party/boringssl-with-bazel/ios-aarch64/crypto/test/trampoline-armv8.S',
],
- 'crypto_mac_x86_64': [
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/chacha/chacha-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/aesni-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/ghash-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/md5-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/p256-x86_64-asm.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/rdrand-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/rsaz-avx2.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/sha1-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/sha256-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/sha512-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/vpaes-x86_64.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/x86_64-mont.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/x86_64-mont5.S',
- 'third_party/boringssl-with-bazel/mac-x86_64/crypto/test/trampoline-x86_64.S',
+ 'crypto_ios_arm': [
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/chacha/chacha-armv4.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/aesv8-armx32.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/armv4-mont.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/bsaes-armv7.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/ghash-armv4.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/ghashv8-armx32.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/sha1-armv4-large.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/sha256-armv4.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/sha512-armv4.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/vpaes-armv7.S',
+ 'third_party/boringssl-with-bazel/ios-arm/crypto/test/trampoline-armv4.S',
],
- 'crypto_win_x86': [
- 'third_party/boringssl-with-bazel/win-x86/crypto/chacha/chacha-x86.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/aesni-x86.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/bn-586.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/co-586.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/ghash-ssse3-x86.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/ghash-x86.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/md5-586.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/sha1-586.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/sha256-586.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/sha512-586.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/vpaes-x86.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/x86-mont.asm',
- 'third_party/boringssl-with-bazel/win-x86/crypto/test/trampoline-x86.asm',
+ 'crypto_linux_aarch64': [
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/chacha/chacha-armv8.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/aesv8-armx64.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/armv8-mont.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/ghash-neon-armv8.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/sha1-armv8.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/sha256-armv8.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/sha512-armv8.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/vpaes-armv8.S',
+ 'third_party/boringssl-with-bazel/linux-aarch64/crypto/test/trampoline-armv8.S',
+ ],
+ 'crypto_linux_arm': [
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/chacha/chacha-armv4.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/aesv8-armx32.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/armv4-mont.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/bsaes-armv7.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/ghash-armv4.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/ghashv8-armx32.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/sha1-armv4-large.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/sha256-armv4.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/sha512-armv4.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/vpaes-armv7.S',
+ 'third_party/boringssl-with-bazel/linux-arm/crypto/test/trampoline-armv4.S',
+ 'third_party/boringssl-with-bazel/src/crypto/curve25519/asm/x25519-asm-arm.S',
+ 'third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm_asm.S',
],
'crypto_linux_ppc64le': [
'third_party/boringssl-with-bazel/linux-ppc64le/crypto/fipsmodule/aesp8-ppc.S',
'third_party/boringssl-with-bazel/linux-ppc64le/crypto/fipsmodule/ghashp8-ppc.S',
'third_party/boringssl-with-bazel/linux-ppc64le/crypto/test/trampoline-ppc.S',
],
- 'crypto_mac_x86': [
- 'third_party/boringssl-with-bazel/mac-x86/crypto/chacha/chacha-x86.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/aesni-x86.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/bn-586.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/co-586.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/ghash-ssse3-x86.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/ghash-x86.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/md5-586.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/sha1-586.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/sha256-586.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/sha512-586.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/vpaes-x86.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/x86-mont.S',
- 'third_party/boringssl-with-bazel/mac-x86/crypto/test/trampoline-x86.S',
- ],
'crypto_linux_x86': [
'third_party/boringssl-with-bazel/linux-x86/crypto/chacha/chacha-x86.S',
'third_party/boringssl-with-bazel/linux-x86/crypto/fipsmodule/aesni-x86.S',
@@ -1017,19 +1132,6 @@ ASM_SOURCE_FILES = {
'third_party/boringssl-with-bazel/linux-x86/crypto/fipsmodule/x86-mont.S',
'third_party/boringssl-with-bazel/linux-x86/crypto/test/trampoline-x86.S',
],
- 'crypto_ios_arm': [
- 'third_party/boringssl-with-bazel/ios-arm/crypto/chacha/chacha-armv4.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/aesv8-armx32.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/armv4-mont.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/bsaes-armv7.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/ghash-armv4.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/ghashv8-armx32.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/sha1-armv4-large.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/sha256-armv4.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/sha512-armv4.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/fipsmodule/vpaes-armv7.S',
- 'third_party/boringssl-with-bazel/ios-arm/crypto/test/trampoline-armv4.S',
- ],
'crypto_linux_x86_64': [
'third_party/boringssl-with-bazel/linux-x86_64/crypto/chacha/chacha-x86_64.S',
'third_party/boringssl-with-bazel/linux-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S',
@@ -1052,6 +1154,69 @@ ASM_SOURCE_FILES = {
'third_party/boringssl-with-bazel/linux-x86_64/crypto/test/trampoline-x86_64.S',
'third_party/boringssl-with-bazel/src/crypto/hrss/asm/poly_rq_mul.S',
],
+ 'crypto_mac_x86': [
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/chacha/chacha-x86.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/aesni-x86.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/bn-586.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/co-586.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/ghash-ssse3-x86.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/ghash-x86.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/md5-586.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/sha1-586.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/sha256-586.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/sha512-586.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/vpaes-x86.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/fipsmodule/x86-mont.S',
+ 'third_party/boringssl-with-bazel/mac-x86/crypto/test/trampoline-x86.S',
+ ],
+ 'crypto_mac_x86_64': [
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/chacha/chacha-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/cipher_extra/chacha20_poly1305_x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/aesni-gcm-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/aesni-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/ghash-ssse3-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/ghash-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/md5-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/p256-x86_64-asm.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/p256_beeu-x86_64-asm.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/rdrand-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/rsaz-avx2.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/sha1-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/sha256-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/sha512-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/vpaes-x86_64.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/x86_64-mont.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/fipsmodule/x86_64-mont5.S',
+ 'third_party/boringssl-with-bazel/mac-x86_64/crypto/test/trampoline-x86_64.S',
+ ],
+ 'crypto_win_aarch64': [
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/chacha/chacha-armv8.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/aesv8-armx64.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/armv8-mont.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/ghash-neon-armv8.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/ghashv8-armx64.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/sha1-armv8.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/sha256-armv8.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/sha512-armv8.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/fipsmodule/vpaes-armv8.S',
+ 'third_party/boringssl-with-bazel/win-aarch64/crypto/test/trampoline-armv8.S',
+ ],
+ 'crypto_win_x86': [
+ 'third_party/boringssl-with-bazel/win-x86/crypto/chacha/chacha-x86.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/aesni-x86.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/bn-586.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/co-586.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/ghash-ssse3-x86.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/ghash-x86.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/md5-586.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/sha1-586.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/sha256-586.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/sha512-586.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/vpaes-x86.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/fipsmodule/x86-mont.asm',
+ 'third_party/boringssl-with-bazel/win-x86/crypto/test/trampoline-x86.asm',
+ ],
'crypto_win_x86_64': [
'third_party/boringssl-with-bazel/win-x86_64/crypto/chacha/chacha-x86_64.asm',
'third_party/boringssl-with-bazel/win-x86_64/crypto/cipher_extra/aes128gcmsiv-x86_64.asm',
@@ -1073,31 +1238,4 @@ ASM_SOURCE_FILES = {
'third_party/boringssl-with-bazel/win-x86_64/crypto/fipsmodule/x86_64-mont5.asm',
'third_party/boringssl-with-bazel/win-x86_64/crypto/test/trampoline-x86_64.asm',
],
- 'crypto_linux_aarch64': [
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/chacha/chacha-armv8.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/aesv8-armx64.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/armv8-mont.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/ghash-neon-armv8.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/ghashv8-armx64.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/sha1-armv8.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/sha256-armv8.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/sha512-armv8.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/fipsmodule/vpaes-armv8.S',
- 'third_party/boringssl-with-bazel/linux-aarch64/crypto/test/trampoline-armv8.S',
- ],
- 'crypto_linux_arm': [
- 'third_party/boringssl-with-bazel/linux-arm/crypto/chacha/chacha-armv4.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/aesv8-armx32.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/armv4-mont.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/bsaes-armv7.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/ghash-armv4.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/ghashv8-armx32.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/sha1-armv4-large.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/sha256-armv4.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/sha512-armv4.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/fipsmodule/vpaes-armv7.S',
- 'third_party/boringssl-with-bazel/linux-arm/crypto/test/trampoline-armv4.S',
- 'third_party/boringssl-with-bazel/src/crypto/curve25519/asm/x25519-asm-arm.S',
- 'third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm_asm.S',
- ],
}
diff --git a/contrib/libs/grpc/src/python/grpcio/grpc_version.py b/contrib/libs/grpc/src/python/grpcio/grpc_version.py
index 9237f14e2fc..ece1ae87a5f 100644
--- a/contrib/libs/grpc/src/python/grpcio/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_channelz/grpc_channelz/v1/_async.py b/contrib/libs/grpc/src/python/grpcio_channelz/grpc_channelz/v1/_async.py
index 50911b0fd95..3f0d93fdc35 100644
--- a/contrib/libs/grpc/src/python/grpcio_channelz/grpc_channelz/v1/_async.py
+++ b/contrib/libs/grpc/src/python/grpcio_channelz/grpc_channelz/v1/_async.py
@@ -24,43 +24,46 @@ class ChannelzServicer(_channelz_pb2_grpc.ChannelzServicer):
"""AsyncIO servicer for handling RPCs for service statuses."""
@staticmethod
- async def GetTopChannels(request: _channelz_pb2.GetTopChannelsRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetTopChannelsResponse:
+ async def GetTopChannels(
+ request: _channelz_pb2.GetTopChannelsRequest,
+ context: aio.ServicerContext
+ ) -> _channelz_pb2.GetTopChannelsResponse:
return _SyncChannelzServicer.GetTopChannels(request, context)
@staticmethod
- async def GetServers(request: _channelz_pb2.GetServersRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetServersResponse:
+ async def GetServers(
+ request: _channelz_pb2.GetServersRequest,
+ context: aio.ServicerContext) -> _channelz_pb2.GetServersResponse:
return _SyncChannelzServicer.GetServers(request, context)
@staticmethod
- async def GetServer(request: _channelz_pb2.GetServerRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetServerResponse:
+ async def GetServer(
+ request: _channelz_pb2.GetServerRequest,
+ context: aio.ServicerContext) -> _channelz_pb2.GetServerResponse:
return _SyncChannelzServicer.GetServer(request, context)
@staticmethod
- async def GetServerSockets(request: _channelz_pb2.GetServerSocketsRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetServerSocketsResponse:
+ async def GetServerSockets(
+ request: _channelz_pb2.GetServerSocketsRequest,
+ context: aio.ServicerContext
+ ) -> _channelz_pb2.GetServerSocketsResponse:
return _SyncChannelzServicer.GetServerSockets(request, context)
@staticmethod
- async def GetChannel(request: _channelz_pb2.GetChannelRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetChannelResponse:
+ async def GetChannel(
+ request: _channelz_pb2.GetChannelRequest,
+ context: aio.ServicerContext) -> _channelz_pb2.GetChannelResponse:
return _SyncChannelzServicer.GetChannel(request, context)
@staticmethod
- async def GetSubchannel(request: _channelz_pb2.GetSubchannelRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetSubchannelResponse:
+ async def GetSubchannel(
+ request: _channelz_pb2.GetSubchannelRequest,
+ context: aio.ServicerContext
+ ) -> _channelz_pb2.GetSubchannelResponse:
return _SyncChannelzServicer.GetSubchannel(request, context)
@staticmethod
- async def GetSocket(request: _channelz_pb2.GetSocketRequest,
- context: aio.ServicerContext
- ) -> _channelz_pb2.GetSocketResponse:
+ async def GetSocket(
+ request: _channelz_pb2.GetSocketRequest,
+ context: aio.ServicerContext) -> _channelz_pb2.GetSocketResponse:
return _SyncChannelzServicer.GetSocket(request, context)
diff --git a/contrib/libs/grpc/src/python/grpcio_channelz/grpc_version.py b/contrib/libs/grpc/src/python/grpcio_channelz/grpc_version.py
index 52cb1a9d3b3..197b5299222 100644
--- a/contrib/libs/grpc/src/python/grpcio_channelz/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio_channelz/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_channelz/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_health/v1/_async.py b/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_health/v1/_async.py
index 752531f5171..de9712a7c51 100644
--- a/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_health/v1/_async.py
+++ b/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_health/v1/_async.py
@@ -71,9 +71,9 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
if request.service in self._server_watchers:
del self._server_watchers[request.service]
- async def _set(self, service: str,
- status: _health_pb2.HealthCheckResponse.ServingStatus
- ) -> None:
+ async def _set(
+ self, service: str,
+ status: _health_pb2.HealthCheckResponse.ServingStatus) -> None:
if service in self._server_watchers:
condition = self._server_watchers.get(service)
async with condition:
@@ -82,9 +82,9 @@ class HealthServicer(_health_pb2_grpc.HealthServicer):
else:
self._server_status[service] = status
- async def set(self, service: str,
- status: _health_pb2.HealthCheckResponse.ServingStatus
- ) -> None:
+ async def set(
+ self, service: str,
+ status: _health_pb2.HealthCheckResponse.ServingStatus) -> None:
"""Sets the status of a service.
Args:
diff --git a/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_version.py b/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_version.py
index f676be10684..3e60e12ef85 100644
--- a/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio_health_checking/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_health_checking/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py b/contrib/libs/grpc/src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py
index fb567fc09f5..bdd9b232897 100644
--- a/contrib/libs/grpc/src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py
+++ b/contrib/libs/grpc/src/python/grpcio_reflection/grpc_reflection/v1alpha/_async.py
@@ -25,8 +25,8 @@ class ReflectionServicer(BaseReflectionServicer):
"""Servicer handling RPCs for service statuses."""
async def ServerReflectionInfo(
- self, request_iterator: AsyncIterable[
- _reflection_pb2.ServerReflectionRequest], unused_context
+ self, request_iterator: AsyncIterable[
+ _reflection_pb2.ServerReflectionRequest], unused_context
) -> AsyncIterable[_reflection_pb2.ServerReflectionResponse]:
async for request in request_iterator:
if request.HasField('file_by_filename'):
diff --git a/contrib/libs/grpc/src/python/grpcio_reflection/grpc_version.py b/contrib/libs/grpc/src/python/grpcio_reflection/grpc_version.py
index 676511118a4..7b3e707985a 100644
--- a/contrib/libs/grpc/src/python/grpcio_reflection/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio_reflection/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_reflection/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_status/grpc_version.py b/contrib/libs/grpc/src/python/grpcio_status/grpc_version.py
index 2b6ec9c6597..95a2a872e84 100644
--- a/contrib/libs/grpc/src/python/grpcio_status/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio_status/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_status/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_testing/grpc_version.py b/contrib/libs/grpc/src/python/grpcio_testing/grpc_version.py
index c042934ba35..899dae77308 100644
--- a/contrib/libs/grpc/src/python/grpcio_testing/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio_testing/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_testing/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/src/python/grpcio_tests/.yandex_meta/licenses.list.txt
index e0080a7b1fc..a9192e37f1c 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/src/python/grpcio_tests/.yandex_meta/licenses.list.txt
@@ -61,6 +61,10 @@
====================COPYRIGHT====================
+# Copyright 2021 The gRPC authors.
+
+
+====================COPYRIGHT====================
// Copyright 2018 The gRPC Authors
@@ -70,3 +74,7 @@
====================COPYRIGHT====================
// Copyright 2020 The gRPC Authors
+
+
+====================COPYRIGHT====================
+// Copyright 2021 The gRPC Authors
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/grpc_version.py b/contrib/libs/grpc/src/python/grpcio_tests/grpc_version.py
index 219b336a429..69d40de2a52 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/grpc_version.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/grpc_version.py
@@ -14,4 +14,4 @@
# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!!
-VERSION = '1.33.2'
+VERSION = '1.37.1'
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/_runner.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/_runner.py
index 39da0399b02..92546fca49f 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/_runner.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/_runner.py
@@ -80,7 +80,7 @@ class CaptureFile(object):
value (str): What to write to the original file.
"""
if six.PY3 and not isinstance(value, six.binary_type):
- value = bytes(value, 'ascii')
+ value = value.encode('ascii')
if self._saved_fd is None:
os.write(self._redirect_fd, value)
else:
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py
index 784307ae005..a5008970293 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/channelz/_channelz_servicer_test.py
@@ -350,6 +350,15 @@ class ChannelzServicerTest(unittest.TestCase):
self.assertEqual(gsc_resp.subchannel.data.calls_succeeded,
gs_resp.socket.data.messages_received)
+ if gs_resp.socket.remote.HasField("tcpip_address"):
+ address = gs_resp.socket.remote.tcpip_address.ip_address
+ self.assertTrue(
+ len(address) == 4 or len(address) == 16, address)
+ if gs_resp.socket.local.HasField("tcpip_address"):
+ address = gs_resp.socket.local.tcpip_address.ip_address
+ self.assertTrue(
+ len(address) == 4 or len(address) == 16, address)
+
def test_streaming_rpc(self):
self._pairs = _generate_channel_server_pairs(1)
# In C++, the argument for _send_successful_stream_stream is message length.
@@ -413,6 +422,7 @@ class ChannelzServicerTest(unittest.TestCase):
gs_resp = self._channelz_stub.GetSocket(
channelz_pb2.GetSocketRequest(
socket_id=gss_resp.server[0].listen_socket[0].socket_id))
+
# If the RPC call failed, it will raise a grpc.RpcError
# So, if there is no exception raised, considered pass
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/_fork_interop_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/_fork_interop_test.py
index e2eff257fa1..a6fd5f8624c 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/_fork_interop_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/_fork_interop_test.py
@@ -16,13 +16,14 @@
import six
import subprocess
import sys
+import tempfile
import threading
import unittest
from grpc._cython import cygrpc
from tests.fork import methods
# New instance of multiprocessing.Process using fork without exec can and will
-# hang if the Python process has any other threads running. This includes the
+# freeze if the Python process has any other threads running. This includes the
# additional thread spawned by our _runner.py class. So in order to test our
# compatibility with multiprocessing, we first fork+exec a new process to ensure
# we don't have any conflicting background threads.
@@ -69,15 +70,23 @@ class ForkInteropTest(unittest.TestCase):
while True:
time.sleep(1)
"""
+ streams = tuple(tempfile.TemporaryFile() for _ in range(2))
self._server_process = subprocess.Popen(
[sys.executable, '-c', start_server_script],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stdout=streams[0],
+ stderr=streams[1])
timer = threading.Timer(_SUBPROCESS_TIMEOUT_S,
self._server_process.kill)
try:
timer.start()
- self._port = int(self._server_process.stdout.readline())
+ while True:
+ streams[0].seek(0)
+ s = streams[0].readline()
+ if not s:
+ continue
+ else:
+ self._port = int(s)
+ break
except ValueError:
raise Exception('Failed to get port from server')
finally:
@@ -125,26 +134,22 @@ class ForkInteropTest(unittest.TestCase):
def _verifyTestCase(self, test_case):
script = _CLIENT_FORK_SCRIPT_TEMPLATE % (test_case.name, self._port)
+ streams = tuple(tempfile.TemporaryFile() for _ in range(2))
process = subprocess.Popen([sys.executable, '-c', script],
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
+ stdout=streams[0],
+ stderr=streams[1])
timer = threading.Timer(_SUBPROCESS_TIMEOUT_S, process.kill)
- try:
- timer.start()
- try:
- out, err = process.communicate(timeout=_SUBPROCESS_TIMEOUT_S)
- except TypeError:
- # The timeout parameter was added in Python 3.3.
- out, err = process.communicate()
- except subprocess.TimeoutExpired:
- process.kill()
- raise RuntimeError('Process failed to terminate')
- finally:
- timer.cancel()
+ timer.start()
+ process.wait()
+ timer.cancel()
+ outputs = []
+ for stream in streams:
+ stream.seek(0)
+ outputs.append(stream.read())
self.assertEqual(
0, process.returncode,
- 'process failed with exit code %d (stdout: %s, stderr: %s)' %
- (process.returncode, out, err))
+ 'process failed with exit code %d (stdout: "%s", stderr: "%s")' %
+ (process.returncode, outputs[0], outputs[1]))
if __name__ == '__main__':
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/methods.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/methods.py
index 2123c699161..3ccebcf6510 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/methods.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/fork/methods.py
@@ -142,7 +142,8 @@ class _ChildProcess(object):
self._process.exitcode)
try:
exception = self._exceptions.get(block=False)
- raise ValueError('Child process failed: %s' % exception)
+ raise ValueError('Child process failed: "%s": "%s"' %
+ (repr(exception), exception))
except queue.Empty:
pass
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/benchmark_client.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/benchmark_client.py
index 17835e7c0db..29cd35efb17 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/benchmark_client.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/benchmark_client.py
@@ -34,6 +34,8 @@ class GenericStub(object):
def __init__(self, channel):
self.UnaryCall = channel.unary_unary(
'/grpc.testing.BenchmarkService/UnaryCall')
+ self.StreamingFromServer = channel.unary_stream(
+ '/grpc.testing.BenchmarkService/StreamingFromServer')
self.StreamingCall = channel.stream_stream(
'/grpc.testing.BenchmarkService/StreamingCall')
@@ -200,3 +202,43 @@ class StreamingSyncBenchmarkClient(BenchmarkClient):
stream.stop()
self._pool.shutdown(wait=True)
self._stub = None
+
+
+class ServerStreamingSyncBenchmarkClient(BenchmarkClient):
+
+ def __init__(self, server, config, hist):
+ super(ServerStreamingSyncBenchmarkClient,
+ self).__init__(server, config, hist)
+ if config.outstanding_rpcs_per_channel == 1:
+ self._pool = None
+ else:
+ self._pool = futures.ThreadPoolExecutor(
+ max_workers=config.outstanding_rpcs_per_channel)
+ self._rpcs = []
+ self._sender = None
+
+ def send_request(self):
+ if self._pool is None:
+ self._sender = threading.Thread(
+ target=self._one_stream_streaming_rpc, daemon=True)
+ self._sender.start()
+ else:
+ self._pool.submit(self._one_stream_streaming_rpc)
+
+ def _one_stream_streaming_rpc(self):
+ response_stream = self._stub.StreamingFromServer(
+ self._request, _TIMEOUT)
+ self._rpcs.append(response_stream)
+ start_time = time.time()
+ for _ in response_stream:
+ self._handle_response(self, time.time() - start_time)
+ start_time = time.time()
+
+ def stop(self):
+ for call in self._rpcs:
+ call.cancel()
+ if self._sender is not None:
+ self._sender.join()
+ if self._pool is not None:
+ self._pool.shutdown(wait=False)
+ self._stub = None
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/client_runner.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/client_runner.py
index c5d299f6463..a03174472c0 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/client_runner.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/client_runner.py
@@ -67,12 +67,15 @@ class OpenLoopClientRunner(ClientRunner):
class ClosedLoopClientRunner(ClientRunner):
- def __init__(self, client, request_count):
+ def __init__(self, client, request_count, no_ping_pong):
super(ClosedLoopClientRunner, self).__init__(client)
self._is_running = False
self._request_count = request_count
- # Send a new request on each response for closed loop
- self._client.add_response_callback(self._send_request)
+ # For server-streaming RPC, don't spawn new RPC after each responses.
+ # This yield at most ~17% for single RPC scenarios.
+ if not no_ping_pong:
+ # Send a new request on each response for closed loop
+ self._client.add_response_callback(self._send_request)
def start(self):
self._is_running = True
@@ -85,6 +88,6 @@ class ClosedLoopClientRunner(ClientRunner):
self._client.stop()
self._client = None
- def _send_request(self, client, response_time):
+ def _send_request(self, client, unused_response_time):
if self._is_running:
client.send_request()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/qps_worker.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/qps_worker.py
index a7e692821ac..de8eefbd7f5 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/qps_worker.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/qps_worker.py
@@ -14,6 +14,7 @@
"""The entry point for the qps worker."""
import argparse
+import logging
import time
import grpc
@@ -23,24 +24,33 @@ from tests.qps import worker_server
from tests.unit import test_common
-def run_worker_server(port):
+def run_worker_server(driver_port, server_port):
server = test_common.test_server()
- servicer = worker_server.WorkerServer()
+ servicer = worker_server.WorkerServer(server_port)
worker_service_pb2_grpc.add_WorkerServiceServicer_to_server(
servicer, server)
- server.add_insecure_port('[::]:{}'.format(port))
+ server.add_insecure_port('[::]:{}'.format(driver_port))
server.start()
servicer.wait_for_quit()
server.stop(0)
if __name__ == '__main__':
+ logging.basicConfig(level=logging.DEBUG)
parser = argparse.ArgumentParser(
description='gRPC Python performance testing worker')
- parser.add_argument('--driver_port',
- type=int,
- dest='port',
- help='The port the worker should listen on')
+ parser.add_argument(
+ '--driver_port',
+ type=int,
+ dest='driver_port',
+ help='The port for the worker to expose for driver communication')
+ parser.add_argument(
+ '--server_port',
+ type=int,
+ default=None,
+ dest='server_port',
+ help='The port for the server if not specified by server config message'
+ )
args = parser.parse_args()
- run_worker_server(args.port)
+ run_worker_server(args.driver_port, args.server_port)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/worker_server.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/worker_server.py
index 65b081e5d1c..327b8e3b4c0 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/worker_server.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/qps/worker_server.py
@@ -35,8 +35,9 @@ from tests.unit import test_common
class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
"""Python Worker Server implementation."""
- def __init__(self):
+ def __init__(self, server_port=None):
self._quit_event = threading.Event()
+ self._server_port = server_port
def RunServer(self, request_iterator, context):
config = next(request_iterator).setup #pylint: disable=stop-iteration-return
@@ -91,13 +92,18 @@ class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
raise Exception('Unsupported server type {}'.format(
config.server_type))
+ if self._server_port is not None and config.port == 0:
+ server_port = self._server_port
+ else:
+ server_port = config.port
+
if config.HasField('security_params'): # Use SSL
server_creds = grpc.ssl_server_credentials(
((resources.private_key(), resources.certificate_chain()),))
- port = server.add_secure_port('[::]:{}'.format(config.port),
+ port = server.add_secure_port('[::]:{}'.format(server_port),
server_creds)
else:
- port = server.add_insecure_port('[::]:{}'.format(config.port))
+ port = server.add_insecure_port('[::]:{}'.format(server_port))
return (server, port)
@@ -142,6 +148,7 @@ class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
return control_pb2.ClientStatus(stats=stats)
def _create_client_runner(self, server, config, qps_data):
+ no_ping_pong = False
if config.client_type == control_pb2.SYNC_CLIENT:
if config.rpc_type == control_pb2.UNARY:
client = benchmark_client.UnarySyncBenchmarkClient(
@@ -149,6 +156,10 @@ class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
elif config.rpc_type == control_pb2.STREAMING:
client = benchmark_client.StreamingSyncBenchmarkClient(
server, config, qps_data)
+ elif config.rpc_type == control_pb2.STREAMING_FROM_SERVER:
+ no_ping_pong = True
+ client = benchmark_client.ServerStreamingSyncBenchmarkClient(
+ server, config, qps_data)
elif config.client_type == control_pb2.ASYNC_CLIENT:
if config.rpc_type == control_pb2.UNARY:
client = benchmark_client.UnaryAsyncBenchmarkClient(
@@ -163,7 +174,7 @@ class WorkerServer(worker_service_pb2_grpc.WorkerServiceServicer):
load_factor = float(config.client_channels)
if config.load_params.WhichOneof('load') == 'closed_loop':
runner = client_runner.ClosedLoopClientRunner(
- client, config.outstanding_rpcs_per_channel)
+ client, config.outstanding_rpcs_per_channel, no_ping_pong)
else: # Open loop Poisson
alpha = config.load_params.poisson.offered_load / load_factor
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_api_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_api_test.py
index a459ee6e192..e98632d0d28 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_api_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_api_test.py
@@ -87,6 +87,9 @@ class AllTest(unittest.TestCase):
'protos',
'services',
'protos_and_services',
+ 'xds_channel_credentials',
+ 'xds_server_credentials',
+ 'insecure_server_credentials',
)
six.assertCountEqual(self, expected_grpc_code_elements,
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py
index b279f3d07c5..c84dff614ab 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py
@@ -144,12 +144,10 @@ class CancelManyCallsTest(unittest.TestCase):
test_constants.THREAD_CONCURRENCY)
server_completion_queue = cygrpc.CompletionQueue()
- server = cygrpc.Server([
- (
- b'grpc.so_reuseport',
- 0,
- ),
- ])
+ server = cygrpc.Server([(
+ b'grpc.so_reuseport',
+ 0,
+ )], False)
server.register_completion_queue(server_completion_queue)
port = server.add_http2_port(b'[::]:0')
server.start()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_common.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_common.py
index d8210f36f80..42ec655feee 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_common.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_common.py
@@ -96,7 +96,7 @@ class RpcTest(object):
def setUp(self):
self.server_completion_queue = cygrpc.CompletionQueue()
- self.server = cygrpc.Server([(b'grpc.so_reuseport', 0)])
+ self.server = cygrpc.Server([(b'grpc.so_reuseport', 0)], False)
self.server.register_completion_queue(self.server_completion_queue)
port = self.server.add_http2_port(b'[::]:0')
self.server.start()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
index 8a903bfaf91..4aad924427b 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py
@@ -115,7 +115,7 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase):
server = cygrpc.Server([(
b'grpc.so_reuseport',
0,
- )])
+ )], False)
server.register_completion_queue(server_completion_queue)
port = server.add_http2_port(b'[::]:0')
server.start()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_server_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_server_test.py
index bbd25457b3e..60b068243c0 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_server_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/_server_test.py
@@ -25,7 +25,7 @@ class Test(unittest.TestCase):
def test_lonely_server(self):
server_call_completion_queue = cygrpc.CompletionQueue()
server_shutdown_completion_queue = cygrpc.CompletionQueue()
- server = cygrpc.Server(None)
+ server = cygrpc.Server(None, False)
server.register_completion_queue(server_call_completion_queue)
server.register_completion_queue(server_shutdown_completion_queue)
port = server.add_http2_port(b'[::]:0')
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
index 1182f83a425..30cd5078ffa 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py
@@ -42,12 +42,10 @@ class TypeSmokeTest(unittest.TestCase):
del completion_queue
def testServerUpDown(self):
- server = cygrpc.Server(set([
- (
- b'grpc.so_reuseport',
- 0,
- ),
- ]))
+ server = cygrpc.Server(set([(
+ b'grpc.so_reuseport',
+ 0,
+ )]), False)
del server
def testChannelUpDown(self):
@@ -59,12 +57,10 @@ class TypeSmokeTest(unittest.TestCase):
b'test plugin name!')
def testServerStartNoExplicitShutdown(self):
- server = cygrpc.Server([
- (
- b'grpc.so_reuseport',
- 0,
- ),
- ])
+ server = cygrpc.Server([(
+ b'grpc.so_reuseport',
+ 0,
+ )], False)
completion_queue = cygrpc.CompletionQueue()
server.register_completion_queue(completion_queue)
port = server.add_http2_port(b'[::]:0')
@@ -79,7 +75,7 @@ class TypeSmokeTest(unittest.TestCase):
b'grpc.so_reuseport',
0,
),
- ])
+ ], False)
server.add_http2_port(b'[::]:0')
server.register_completion_queue(completion_queue)
server.start()
@@ -97,12 +93,10 @@ class ServerClientMixin(object):
def setUpMixin(self, server_credentials, client_credentials, host_override):
self.server_completion_queue = cygrpc.CompletionQueue()
- self.server = cygrpc.Server([
- (
- b'grpc.so_reuseport',
- 0,
- ),
- ])
+ self.server = cygrpc.Server([(
+ b'grpc.so_reuseport',
+ 0,
+ )], False)
self.server.register_completion_queue(self.server_completion_queue)
if server_credentials:
self.port = self.server.add_http2_port(b'[::]:0',
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py
index d2d8ce9f60b..5d4819dd170 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_dynamic_stubs_test.py
@@ -21,6 +21,8 @@ import os
import sys
import unittest
+_DATA_DIR = os.path.join("tests", "unit", "data")
+
@contextlib.contextmanager
def _grpc_tools_unimportable():
@@ -53,6 +55,18 @@ def _collect_errors(fn):
return _wrapped
+def _python3_check(fn):
+
+ @functools.wraps(fn)
+ def _wrapped():
+ if sys.version_info[0] == 3:
+ fn()
+ else:
+ _assert_unimplemented("Python 3")
+
+ return _wrapped
+
+
def _run_in_subprocess(test_case):
sys.path.insert(
0, os.path.join(os.path.realpath(os.path.dirname(__file__)), ".."))
@@ -80,24 +94,30 @@ def _assert_unimplemented(msg_substr):
@_collect_errors
+@_python3_check
def _test_sunny_day():
- if sys.version_info[0] == 3:
- import grpc
- protos, services = grpc.protos_and_services(
- os.path.join("tests", "unit", "data", "foo", "bar.proto"))
- assert protos.BarMessage is not None
- assert services.BarStub is not None
- else:
- _assert_unimplemented("Python 3")
+ import grpc
+ protos, services = grpc.protos_and_services(
+ os.path.join(_DATA_DIR, "foo", "bar.proto"))
+ assert protos.BarMessage is not None
+ assert services.BarStub is not None
+
+
+@_collect_errors
+@_python3_check
+def _test_well_known_types():
+ import grpc
+ protos, services = grpc.protos_and_services(
+ os.path.join(_DATA_DIR, "foo", "bar_with_wkt.proto"))
+ assert protos.BarMessage is not None
+ assert services.BarStub is not None
@_collect_errors
+@_python3_check
def _test_grpc_tools_unimportable():
with _grpc_tools_unimportable():
- if sys.version_info[0] == 3:
- _assert_unimplemented("grpcio-tools")
- else:
- _assert_unimplemented("Python 3")
+ _assert_unimplemented("grpcio-tools")
# NOTE(rbellevi): multiprocessing.Process fails to pickle function objects
@@ -110,6 +130,10 @@ class DynamicStubTest(unittest.TestCase):
def test_sunny_day(self):
_run_in_subprocess(_test_sunny_day)
+ @unittest.skip('grpcio-tools package required')
+ def test_well_known_types(self):
+ _run_in_subprocess(_test_well_known_types)
+
def test_grpc_tools_unimportable(self):
_run_in_subprocess(_test_grpc_tools_unimportable)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_exit_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_exit_test.py
index 4cf5ab63bdf..190b289fa91 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_exit_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_exit_test.py
@@ -14,7 +14,7 @@
"""Tests clean exit of server/client on Python Interpreter exit/sigint.
The tests in this module spawn a subprocess for each test case, the
-test is considered successful if it doesn't hang/timeout.
+test is considered successful if it doesn't freeze/timeout.
"""
import atexit
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py
index e2b36b1c70f..0dafc9e9825 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_metadata_flags_test.py
@@ -100,8 +100,8 @@ class _GenericHandler(grpc.GenericRpcHandler):
return None
-def create_dummy_channel():
- """Creating dummy channels is a workaround for retries"""
+def create_phony_channel():
+ """Creating phony channels is a workaround for retries"""
host, port, sock = get_socket(sock_options=(socket.SO_REUSEADDR,))
sock.close()
return grpc.insecure_channel('{}:{}'.format(host, port))
@@ -188,12 +188,12 @@ class MetadataFlagsTest(unittest.TestCase):
def test_call_wait_for_ready_default(self):
for perform_call in _ALL_CALL_CASES:
- with create_dummy_channel() as channel:
+ with create_phony_channel() as channel:
self.check_connection_does_failfast(perform_call, channel)
def test_call_wait_for_ready_disabled(self):
for perform_call in _ALL_CALL_CASES:
- with create_dummy_channel() as channel:
+ with create_phony_channel() as channel:
self.check_connection_does_failfast(perform_call,
channel,
wait_for_ready=False)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_server_shutdown_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_server_shutdown_test.py
index c1dc7585f80..1d203f63b30 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_server_shutdown_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_server_shutdown_test.py
@@ -14,7 +14,7 @@
"""Tests clean shutdown of server on various interpreter exit conditions.
The tests in this module spawn a subprocess for each test case, the
-test is considered successful if it doesn't hang/timeout.
+test is considered successful if it doesn't freeze/timeout.
"""
import atexit
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_signal_client.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_signal_client.py
index 0be1270749c..5cc68831f7e 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_signal_client.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_signal_client.py
@@ -82,7 +82,7 @@ def main_unary_with_exception(server_target):
sys.stderr.write("Running signal handler.\n")
sys.stderr.flush()
- # This call should not hang.
+ # This call should not freeze.
channel.close()
@@ -97,7 +97,7 @@ def main_streaming_with_exception(server_target):
sys.stderr.write("Running signal handler.\n")
sys.stderr.flush()
- # This call should not hang.
+ # This call should not freeze.
channel.close()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_xds_credentials_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_xds_credentials_test.py
new file mode 100644
index 00000000000..91d30c68ad5
--- /dev/null
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/_xds_credentials_test.py
@@ -0,0 +1,103 @@
+# Copyright 2021 The gRPC authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Tests xDS server and channel credentials."""
+
+import unittest
+
+import logging
+from concurrent import futures
+import contextlib
+
+import grpc
+import grpc.experimental
+from tests.unit import test_common
+from tests.unit import resources
+
+
+class _GenericHandler(grpc.GenericRpcHandler):
+
+ def service(self, handler_call_details):
+ return grpc.unary_unary_rpc_method_handler(
+ lambda request, unused_context: request)
+
+
+@contextlib.contextmanager
+def xds_channel_server_without_xds(server_fallback_creds):
+ server = grpc.server(futures.ThreadPoolExecutor())
+ server.add_generic_rpc_handlers((_GenericHandler(),))
+ server_server_fallback_creds = grpc.ssl_server_credentials(
+ ((resources.private_key(), resources.certificate_chain()),))
+ server_creds = grpc.xds_server_credentials(server_fallback_creds)
+ port = server.add_secure_port("localhost:0", server_creds)
+ server.start()
+ try:
+ yield "localhost:{}".format(port)
+ finally:
+ server.stop(None)
+
+
+class XdsCredentialsTest(unittest.TestCase):
+
+ def test_xds_creds_fallback_ssl(self):
+ # Since there is no xDS server, the fallback credentials will be used.
+ # In this case, SSL credentials.
+ server_fallback_creds = grpc.ssl_server_credentials(
+ ((resources.private_key(), resources.certificate_chain()),))
+ with xds_channel_server_without_xds(
+ server_fallback_creds) as server_address:
+ override_options = (("grpc.ssl_target_name_override",
+ "foo.test.google.fr"),)
+ channel_fallback_creds = grpc.ssl_channel_credentials(
+ root_certificates=resources.test_root_certificates(),
+ private_key=resources.private_key(),
+ certificate_chain=resources.certificate_chain())
+ channel_creds = grpc.xds_channel_credentials(channel_fallback_creds)
+ with grpc.secure_channel(server_address,
+ channel_creds,
+ options=override_options) as channel:
+ request = b"abc"
+ response = channel.unary_unary("/test/method")(
+ request, wait_for_ready=True)
+ self.assertEqual(response, request)
+
+ def test_xds_creds_fallback_insecure(self):
+ # Since there is no xDS server, the fallback credentials will be used.
+ # In this case, insecure.
+ server_fallback_creds = grpc.insecure_server_credentials()
+ with xds_channel_server_without_xds(
+ server_fallback_creds) as server_address:
+ channel_fallback_creds = grpc.experimental.insecure_channel_credentials(
+ )
+ channel_creds = grpc.xds_channel_credentials(channel_fallback_creds)
+ with grpc.secure_channel(server_address, channel_creds) as channel:
+ request = b"abc"
+ response = channel.unary_unary("/test/method")(
+ request, wait_for_ready=True)
+ self.assertEqual(response, request)
+
+ def test_start_xds_server(self):
+ server = grpc.server(futures.ThreadPoolExecutor(), xds=True)
+ server.add_generic_rpc_handlers((_GenericHandler(),))
+ server_fallback_creds = grpc.insecure_server_credentials()
+ server_creds = grpc.xds_server_credentials(server_fallback_creds)
+ port = server.add_secure_port("localhost:0", server_creds)
+ server.start()
+ server.stop(None)
+ # No exceptions thrown. A more comprehensive suite of tests will be
+ # provided by the interop tests.
+
+
+if __name__ == "__main__":
+ logging.basicConfig()
+ unittest.main()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/framework/common/test_control.py b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/framework/common/test_control.py
index 6a422825cc7..999cb5f229d 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/framework/common/test_control.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests/unit/framework/common/test_control.py
@@ -34,7 +34,7 @@ class Control(six.with_metaclass(abc.ABCMeta)):
Systems under test passed a Control should call its control() method
frequently during execution. The control() method may block, raise an
exception, or do nothing, all according to the enclosing test's desire for
- the system under test to simulate hanging, failing, or functioning.
+ the system under test to simulate freezing, failing, or functioning.
"""
@abc.abstractmethod
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/benchmark_client.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/benchmark_client.py
index 51a046c20c7..1f925ba3cd7 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/benchmark_client.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/benchmark_client.py
@@ -33,6 +33,8 @@ class GenericStub(object):
def __init__(self, channel: aio.Channel):
self.UnaryCall = channel.unary_unary(
'/grpc.testing.BenchmarkService/UnaryCall')
+ self.StreamingFromServer = channel.unary_stream(
+ '/grpc.testing.BenchmarkService/StreamingFromServer')
self.StreamingCall = channel.stream_stream(
'/grpc.testing.BenchmarkService/StreamingCall')
@@ -153,3 +155,32 @@ class StreamingAsyncBenchmarkClient(BenchmarkClient):
self._running = False
await self._stopped.wait()
await super().stop()
+
+
+class ServerStreamingAsyncBenchmarkClient(BenchmarkClient):
+
+ def __init__(self, address: str, config: control_pb2.ClientConfig,
+ hist: histogram.Histogram):
+ super().__init__(address, config, hist)
+ self._running = None
+ self._stopped = asyncio.Event()
+
+ async def _one_server_streaming_call(self):
+ call = self._stub.StreamingFromServer(self._request)
+ while self._running:
+ start_time = time.time()
+ await call.read()
+ self._record_query_time(time.time() - start_time)
+
+ async def run(self):
+ await super().run()
+ self._running = True
+ senders = (
+ self._one_server_streaming_call() for _ in range(self._concurrency))
+ await asyncio.gather(*senders)
+ self._stopped.set()
+
+ async def stop(self):
+ self._running = False
+ await self._stopped.wait()
+ await super().stop()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py
index 4f80095cd20..1893bb9f19b 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/benchmark/worker_servicer.py
@@ -105,9 +105,9 @@ def _create_server(config: control_pb2.ServerConfig) -> Tuple[aio.Server, int]:
return server, port
-def _get_client_status(start_time: float, end_time: float,
- qps_data: histogram.Histogram
- ) -> control_pb2.ClientStatus:
+def _get_client_status(
+ start_time: float, end_time: float,
+ qps_data: histogram.Histogram) -> control_pb2.ClientStatus:
"""Creates ClientStatus proto message."""
latencies = qps_data.get_data()
end_time = time.monotonic()
@@ -120,9 +120,9 @@ def _get_client_status(start_time: float, end_time: float,
return control_pb2.ClientStatus(stats=stats)
-def _create_client(server: str, config: control_pb2.ClientConfig,
- qps_data: histogram.Histogram
- ) -> benchmark_client.BenchmarkClient:
+def _create_client(
+ server: str, config: control_pb2.ClientConfig,
+ qps_data: histogram.Histogram) -> benchmark_client.BenchmarkClient:
"""Creates a client object according to the ClientConfig."""
if config.load_params.WhichOneof('load') != 'closed_loop':
raise NotImplementedError(
@@ -133,6 +133,8 @@ def _create_client(server: str, config: control_pb2.ClientConfig,
client_type = benchmark_client.UnaryAsyncBenchmarkClient
elif config.rpc_type == control_pb2.STREAMING:
client_type = benchmark_client.StreamingAsyncBenchmarkClient
+ elif config.rpc_type == control_pb2.STREAMING_FROM_SERVER:
+ client_type = benchmark_client.ServerStreamingAsyncBenchmarkClient
else:
raise NotImplementedError(
f'Unsupported rpc_type [{config.rpc_type}]')
@@ -213,8 +215,8 @@ class WorkerServicer(worker_service_pb2_grpc.WorkerServiceServicer):
await self._run_single_server(config, request_iterator, context)
else:
# If server_processes > 1, offload to other processes.
- sub_workers = await asyncio.gather(*(
- _create_sub_worker() for _ in range(config.server_processes)))
+ sub_workers = await asyncio.gather(
+ *[_create_sub_worker() for _ in range(config.server_processes)])
calls = [worker.stub.RunServer() for worker in sub_workers]
@@ -306,8 +308,8 @@ class WorkerServicer(worker_service_pb2_grpc.WorkerServiceServicer):
await self._run_single_client(config, request_iterator, context)
else:
# If client_processes > 1, offload the work to other processes.
- sub_workers = await asyncio.gather(*(
- _create_sub_worker() for _ in range(config.client_processes)))
+ sub_workers = await asyncio.gather(
+ *[_create_sub_worker() for _ in range(config.client_processes)])
calls = [worker.stub.RunClient() for worker in sub_workers]
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/interop/methods.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/interop/methods.py
index aa39976981f..24681aa6985 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/interop/methods.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/interop/methods.py
@@ -60,10 +60,10 @@ async def _validate_status_code_and_details(call: aio.Call,
await _expect_status_details(call, expected_details)
-def _validate_payload_type_and_length(
- response: Union[messages_pb2.SimpleResponse, messages_pb2.
- StreamingOutputCallResponse], expected_type: Any,
- expected_length: int) -> None:
+def _validate_payload_type_and_length(response: Union[
+ messages_pb2.SimpleResponse, messages_pb2.StreamingOutputCallResponse],
+ expected_type: Any,
+ expected_length: int) -> None:
if response.payload.type is not expected_type:
raise ValueError('expected payload type %s, got %s' %
(expected_type, type(response.payload.type)))
@@ -73,8 +73,8 @@ def _validate_payload_type_and_length(
async def _large_unary_common_behavior(
- stub: test_pb2_grpc.TestServiceStub, fill_username: bool,
- fill_oauth_scope: bool, call_credentials: Optional[grpc.CallCredentials]
+ stub: test_pb2_grpc.TestServiceStub, fill_username: bool,
+ fill_oauth_scope: bool, call_credentials: Optional[grpc.CallCredentials]
) -> messages_pb2.SimpleResponse:
size = 314159
request = messages_pb2.SimpleRequest(
@@ -436,10 +436,10 @@ _TEST_CASE_IMPLEMENTATION_MAPPING = {
}
-async def test_interoperability(case: TestCase,
- stub: test_pb2_grpc.TestServiceStub,
- args: Optional[argparse.Namespace] = None
- ) -> None:
+async def test_interoperability(
+ case: TestCase,
+ stub: test_pb2_grpc.TestServiceStub,
+ args: Optional[argparse.Namespace] = None) -> None:
method = _TEST_CASE_IMPLEMENTATION_MAPPING.get(case)
if method is None:
raise NotImplementedError(f'Test case "{case}" not implemented!')
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_common.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_common.py
index 016280a1528..11513a722c0 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_common.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_common.py
@@ -21,6 +21,8 @@ from grpc.aio._metadata import Metadata
from tests.unit.framework.common import test_constants
+ADHOC_METHOD = '/test/AdHoc'
+
def seen_metadata(expected: Metadata, actual: Metadata):
return not bool(set(tuple(expected)) - set(tuple(actual)))
@@ -97,3 +99,20 @@ class CountingResponseIterator:
def __aiter__(self):
return self._forward_responses()
+
+
+class AdhocGenericHandler(grpc.GenericRpcHandler):
+ """A generic handler to plugin testing server methods on the fly."""
+ _handler: grpc.RpcMethodHandler
+
+ def __init__(self):
+ self._handler = None
+
+ def set_adhoc_handler(self, handler: grpc.RpcMethodHandler):
+ self._handler = handler
+
+ def service(self, handler_call_details):
+ if handler_call_details.method == ADHOC_METHOD:
+ return self._handler
+ else:
+ return None
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_test_server.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_test_server.py
index 5e5081a38d0..ee137dedb68 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_test_server.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/_test_server.py
@@ -67,10 +67,13 @@ class TestServiceServicer(test_pb2_grpc.TestServiceServicer):
await asyncio.sleep(
datetime.timedelta(microseconds=response_parameters.
interval_us).total_seconds())
- yield messages_pb2.StreamingOutputCallResponse(
- payload=messages_pb2.Payload(type=request.response_type,
- body=b'\x00' *
- response_parameters.size))
+ if response_parameters.size != 0:
+ yield messages_pb2.StreamingOutputCallResponse(
+ payload=messages_pb2.Payload(type=request.response_type,
+ body=b'\x00' *
+ response_parameters.size))
+ else:
+ yield messages_pb2.StreamingOutputCallResponse()
# Next methods are extra ones that are registred programatically
# when the sever is instantiated. They are not being provided by
@@ -96,10 +99,13 @@ class TestServiceServicer(test_pb2_grpc.TestServiceServicer):
await asyncio.sleep(
datetime.timedelta(microseconds=response_parameters.
interval_us).total_seconds())
- yield messages_pb2.StreamingOutputCallResponse(
- payload=messages_pb2.Payload(type=request.payload.type,
- body=b'\x00' *
- response_parameters.size))
+ if response_parameters.size != 0:
+ yield messages_pb2.StreamingOutputCallResponse(
+ payload=messages_pb2.Payload(type=request.payload.type,
+ body=b'\x00' *
+ response_parameters.size))
+ else:
+ yield messages_pb2.StreamingOutputCallResponse()
def _create_extra_generic_handler(servicer: TestServiceServicer):
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/abort_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/abort_test.py
index 828b6884dfa..487c8c972e1 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/abort_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/abort_test.py
@@ -33,7 +33,7 @@ _RESPONSE = b'\x01\x01\x01'
_NUM_STREAM_RESPONSES = 5
_ABORT_CODE = grpc.StatusCode.RESOURCE_EXHAUSTED
-_ABORT_DETAILS = 'Dummy error details'
+_ABORT_DETAILS = 'Phony error details'
class _GenericHandler(grpc.GenericRpcHandler):
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/call_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/call_test.py
index 1961226fa6d..c7d99a20c48 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/call_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/call_test.py
@@ -472,6 +472,24 @@ class TestUnaryStreamCall(_MulticallableTestMixin, AioTestBase):
self.assertEqual(grpc.StatusCode.OK, await call.code())
+ async def test_empty_responses(self):
+ # Prepares the request
+ request = messages_pb2.StreamingOutputCallRequest()
+ for _ in range(_NUM_STREAM_RESPONSES):
+ request.response_parameters.append(
+ messages_pb2.ResponseParameters())
+
+ # Invokes the actual RPC
+ call = self._stub.StreamingOutputCall(request)
+
+ for _ in range(_NUM_STREAM_RESPONSES):
+ response = await call.read()
+ self.assertIs(type(response),
+ messages_pb2.StreamingOutputCallResponse)
+ self.assertEqual(b'', response.SerializeToString())
+
+ self.assertEqual(grpc.StatusCode.OK, await call.code())
+
class TestStreamUnaryCall(_MulticallableTestMixin, AioTestBase):
@@ -624,6 +642,10 @@ class TestStreamUnaryCall(_MulticallableTestMixin, AioTestBase):
_STREAM_OUTPUT_REQUEST_ONE_RESPONSE = messages_pb2.StreamingOutputCallRequest()
_STREAM_OUTPUT_REQUEST_ONE_RESPONSE.response_parameters.append(
messages_pb2.ResponseParameters(size=_RESPONSE_PAYLOAD_SIZE))
+_STREAM_OUTPUT_REQUEST_ONE_EMPTY_RESPONSE = messages_pb2.StreamingOutputCallRequest(
+)
+_STREAM_OUTPUT_REQUEST_ONE_EMPTY_RESPONSE.response_parameters.append(
+ messages_pb2.ResponseParameters())
class TestStreamStreamCall(_MulticallableTestMixin, AioTestBase):
@@ -808,6 +830,15 @@ class TestStreamStreamCall(_MulticallableTestMixin, AioTestBase):
self.assertEqual(await call.code(), grpc.StatusCode.OK)
+ async def test_empty_ping_pong(self):
+ call = self._stub.FullDuplexCall()
+ for _ in range(_NUM_STREAM_RESPONSES):
+ await call.write(_STREAM_OUTPUT_REQUEST_ONE_EMPTY_RESPONSE)
+ response = await call.read()
+ self.assertEqual(b'', response.SerializeToString())
+ await call.done_writing()
+ self.assertEqual(await call.code(), grpc.StatusCode.OK)
+
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/compatibility_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/compatibility_test.py
index 0bb3a3acc89..e1f0f4d5845 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/compatibility_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/compatibility_test.py
@@ -35,29 +35,12 @@ _NUM_STREAM_RESPONSES = 5
_REQUEST_PAYLOAD_SIZE = 7
_RESPONSE_PAYLOAD_SIZE = 42
_REQUEST = b'\x03\x07'
-_ADHOC_METHOD = '/test/AdHoc'
def _unique_options() -> Sequence[Tuple[str, float]]:
return (('iv', random.random()),)
-class _AdhocGenericHandler(grpc.GenericRpcHandler):
- _handler: grpc.RpcMethodHandler
-
- def __init__(self):
- self._handler = None
-
- def set_adhoc_handler(self, handler: grpc.RpcMethodHandler):
- self._handler = handler
-
- def service(self, handler_call_details):
- if handler_call_details.method == _ADHOC_METHOD:
- return self._handler
- else:
- return None
-
-
@unittest.skipIf(
os.environ.get('GRPC_ASYNCIO_ENGINE', '').lower() == 'custom_io_manager',
'Compatible mode needs POLLER completion queue.')
@@ -70,7 +53,7 @@ class TestCompatibility(AioTestBase):
test_pb2_grpc.add_TestServiceServicer_to_server(TestServiceServicer(),
self._async_server)
- self._adhoc_handlers = _AdhocGenericHandler()
+ self._adhoc_handlers = _common.AdhocGenericHandler()
self._async_server.add_generic_rpc_handlers((self._adhoc_handlers,))
port = self._async_server.add_insecure_port('[::]:0')
@@ -240,8 +223,8 @@ class TestCompatibility(AioTestBase):
return request
self._adhoc_handlers.set_adhoc_handler(echo_unary_unary)
- response = await self._async_channel.unary_unary(_ADHOC_METHOD)(_REQUEST
- )
+ response = await self._async_channel.unary_unary(_common.ADHOC_METHOD
+ )(_REQUEST)
self.assertEqual(_REQUEST, response)
async def test_sync_unary_unary_metadata(self):
@@ -253,7 +236,7 @@ class TestCompatibility(AioTestBase):
return request
self._adhoc_handlers.set_adhoc_handler(metadata_unary_unary)
- call = self._async_channel.unary_unary(_ADHOC_METHOD)(_REQUEST)
+ call = self._async_channel.unary_unary(_common.ADHOC_METHOD)(_REQUEST)
self.assertTrue(
_common.seen_metadata(aio.Metadata(*metadata), await
call.initial_metadata()))
@@ -266,7 +249,8 @@ class TestCompatibility(AioTestBase):
self._adhoc_handlers.set_adhoc_handler(abort_unary_unary)
with self.assertRaises(aio.AioRpcError) as exception_context:
- await self._async_channel.unary_unary(_ADHOC_METHOD)(_REQUEST)
+ await self._async_channel.unary_unary(_common.ADHOC_METHOD
+ )(_REQUEST)
self.assertEqual(grpc.StatusCode.INTERNAL,
exception_context.exception.code())
@@ -278,7 +262,8 @@ class TestCompatibility(AioTestBase):
self._adhoc_handlers.set_adhoc_handler(set_code_unary_unary)
with self.assertRaises(aio.AioRpcError) as exception_context:
- await self._async_channel.unary_unary(_ADHOC_METHOD)(_REQUEST)
+ await self._async_channel.unary_unary(_common.ADHOC_METHOD
+ )(_REQUEST)
self.assertEqual(grpc.StatusCode.INTERNAL,
exception_context.exception.code())
@@ -290,7 +275,7 @@ class TestCompatibility(AioTestBase):
yield request
self._adhoc_handlers.set_adhoc_handler(echo_unary_stream)
- call = self._async_channel.unary_stream(_ADHOC_METHOD)(_REQUEST)
+ call = self._async_channel.unary_stream(_common.ADHOC_METHOD)(_REQUEST)
async for response in call:
self.assertEqual(_REQUEST, response)
@@ -303,7 +288,7 @@ class TestCompatibility(AioTestBase):
raise RuntimeError('Test')
self._adhoc_handlers.set_adhoc_handler(error_unary_stream)
- call = self._async_channel.unary_stream(_ADHOC_METHOD)(_REQUEST)
+ call = self._async_channel.unary_stream(_common.ADHOC_METHOD)(_REQUEST)
with self.assertRaises(aio.AioRpcError) as exception_context:
async for response in call:
self.assertEqual(_REQUEST, response)
@@ -320,8 +305,8 @@ class TestCompatibility(AioTestBase):
self._adhoc_handlers.set_adhoc_handler(echo_stream_unary)
request_iterator = iter([_REQUEST] * _NUM_STREAM_RESPONSES)
- response = await self._async_channel.stream_unary(_ADHOC_METHOD)(
- request_iterator)
+ response = await self._async_channel.stream_unary(_common.ADHOC_METHOD
+ )(request_iterator)
self.assertEqual(_REQUEST, response)
async def test_sync_stream_unary_error(self):
@@ -335,8 +320,8 @@ class TestCompatibility(AioTestBase):
self._adhoc_handlers.set_adhoc_handler(echo_stream_unary)
request_iterator = iter([_REQUEST] * _NUM_STREAM_RESPONSES)
with self.assertRaises(aio.AioRpcError) as exception_context:
- response = await self._async_channel.stream_unary(_ADHOC_METHOD)(
- request_iterator)
+ response = await self._async_channel.stream_unary(
+ _common.ADHOC_METHOD)(request_iterator)
self.assertEqual(grpc.StatusCode.UNKNOWN,
exception_context.exception.code())
@@ -350,8 +335,8 @@ class TestCompatibility(AioTestBase):
self._adhoc_handlers.set_adhoc_handler(echo_stream_stream)
request_iterator = iter([_REQUEST] * _NUM_STREAM_RESPONSES)
- call = self._async_channel.stream_stream(_ADHOC_METHOD)(
- request_iterator)
+ call = self._async_channel.stream_stream(
+ _common.ADHOC_METHOD)(request_iterator)
async for response in call:
self.assertEqual(_REQUEST, response)
@@ -366,8 +351,8 @@ class TestCompatibility(AioTestBase):
self._adhoc_handlers.set_adhoc_handler(echo_stream_stream)
request_iterator = iter([_REQUEST] * _NUM_STREAM_RESPONSES)
- call = self._async_channel.stream_stream(_ADHOC_METHOD)(
- request_iterator)
+ call = self._async_channel.stream_stream(
+ _common.ADHOC_METHOD)(request_iterator)
with self.assertRaises(aio.AioRpcError) as exception_context:
async for response in call:
self.assertEqual(_REQUEST, response)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/init_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/init_test.py
index b9183a22c75..b7889b9942b 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/init_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/init_test.py
@@ -19,12 +19,12 @@ class TestInit(unittest.TestCase):
def test_grpc(self):
import grpc # pylint: disable=wrong-import-position
- channel = grpc.aio.insecure_channel('dummy')
+ channel = grpc.aio.insecure_channel('phony')
self.assertIsInstance(channel, grpc.aio.Channel)
def test_grpc_dot_aio(self):
import grpc.aio # pylint: disable=wrong-import-position
- channel = grpc.aio.insecure_channel('dummy')
+ channel = grpc.aio.insecure_channel('phony')
self.assertIsInstance(channel, grpc.aio.Channel)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py
index d891ecdb771..8eb846201a8 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py
@@ -38,8 +38,8 @@ class _LoggingInterceptor(aio.ServerInterceptor):
self.record = record
async def intercept_service(
- self, continuation: Callable[[grpc.HandlerCallDetails], Awaitable[
- grpc.RpcMethodHandler]],
+ self, continuation: Callable[[grpc.HandlerCallDetails],
+ Awaitable[grpc.RpcMethodHandler]],
handler_call_details: grpc.HandlerCallDetails
) -> grpc.RpcMethodHandler:
self.record.append(self.tag + ':intercept_service')
@@ -48,28 +48,29 @@ class _LoggingInterceptor(aio.ServerInterceptor):
class _GenericInterceptor(aio.ServerInterceptor):
- def __init__(self, fn: Callable[[
- Callable[[grpc.HandlerCallDetails], Awaitable[grpc.
- RpcMethodHandler]],
- grpc.HandlerCallDetails
- ], Any]) -> None:
+ def __init__(
+ self, fn: Callable[[
+ Callable[[grpc.HandlerCallDetails],
+ Awaitable[grpc.RpcMethodHandler]], grpc.HandlerCallDetails
+ ], Any]
+ ) -> None:
self._fn = fn
async def intercept_service(
- self, continuation: Callable[[grpc.HandlerCallDetails], Awaitable[
- grpc.RpcMethodHandler]],
+ self, continuation: Callable[[grpc.HandlerCallDetails],
+ Awaitable[grpc.RpcMethodHandler]],
handler_call_details: grpc.HandlerCallDetails
) -> grpc.RpcMethodHandler:
return await self._fn(continuation, handler_call_details)
-def _filter_server_interceptor(condition: Callable,
- interceptor: aio.ServerInterceptor
- ) -> aio.ServerInterceptor:
+def _filter_server_interceptor(
+ condition: Callable,
+ interceptor: aio.ServerInterceptor) -> aio.ServerInterceptor:
async def intercept_service(
- continuation: Callable[[grpc.HandlerCallDetails], Awaitable[
- grpc.RpcMethodHandler]],
+ continuation: Callable[[grpc.HandlerCallDetails],
+ Awaitable[grpc.RpcMethodHandler]],
handler_call_details: grpc.HandlerCallDetails
) -> grpc.RpcMethodHandler:
if condition(handler_call_details):
@@ -87,8 +88,8 @@ class _CacheInterceptor(aio.ServerInterceptor):
self.cache_store = cache_store or {}
async def intercept_service(
- self, continuation: Callable[[grpc.HandlerCallDetails], Awaitable[
- grpc.RpcMethodHandler]],
+ self, continuation: Callable[[grpc.HandlerCallDetails],
+ Awaitable[grpc.RpcMethodHandler]],
handler_call_details: grpc.HandlerCallDetails
) -> grpc.RpcMethodHandler:
# Get the actual handler
@@ -100,13 +101,14 @@ class _CacheInterceptor(aio.ServerInterceptor):
return handler
def wrapper(behavior: Callable[
- [messages_pb2.SimpleRequest, aio.
- ServicerContext], messages_pb2.SimpleResponse]):
+ [messages_pb2.SimpleRequest, aio.ServicerContext],
+ messages_pb2.SimpleResponse]):
@functools.wraps(behavior)
- async def wrapper(request: messages_pb2.SimpleRequest,
- context: aio.ServicerContext
- ) -> messages_pb2.SimpleResponse:
+ async def wrapper(
+ request: messages_pb2.SimpleRequest,
+ context: aio.ServicerContext
+ ) -> messages_pb2.SimpleResponse:
if request.response_size not in self.cache_store:
self.cache_store[request.response_size] = await behavior(
request, context)
@@ -118,7 +120,7 @@ class _CacheInterceptor(aio.ServerInterceptor):
async def _create_server_stub_pair(
- *interceptors: aio.ServerInterceptor
+ *interceptors: aio.ServerInterceptor
) -> Tuple[aio.Server, test_pb2_grpc.TestServiceStub]:
"""Creates a server-stub pair with given interceptors.
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_test.py
index 61d1edd5231..8ba3ce1901e 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_test.py
@@ -47,6 +47,7 @@ _REQUEST = b'\x00\x00\x00'
_RESPONSE = b'\x01\x01\x01'
_NUM_STREAM_REQUESTS = 3
_NUM_STREAM_RESPONSES = 5
+_MAXIMUM_CONCURRENT_RPCS = 5
class _GenericHandler(grpc.GenericRpcHandler):
@@ -189,7 +190,8 @@ class _GenericHandler(grpc.GenericRpcHandler):
context.set_code(grpc.StatusCode.INTERNAL)
def service(self, handler_details):
- self._called.set_result(None)
+ if not self._called.done():
+ self._called.set_result(None)
return self._routing_table.get(handler_details.method)
async def wait_for_call(self):
@@ -480,6 +482,30 @@ class TestServer(AioTestBase):
with self.assertRaises(RuntimeError):
server.add_secure_port(bind_address, server_credentials)
+ async def test_maximum_concurrent_rpcs(self):
+ # Build the server with concurrent rpc argument
+ server = aio.server(maximum_concurrent_rpcs=_MAXIMUM_CONCURRENT_RPCS)
+ port = server.add_insecure_port('localhost:0')
+ bind_address = "localhost:%d" % port
+ server.add_generic_rpc_handlers((_GenericHandler(),))
+ await server.start()
+ # Build the channel
+ channel = aio.insecure_channel(bind_address)
+ # Deplete the concurrent quota with 3 times of max RPCs
+ rpcs = []
+ for _ in range(3 * _MAXIMUM_CONCURRENT_RPCS):
+ rpcs.append(channel.unary_unary(_BLOCK_BRIEFLY)(_REQUEST))
+ task = self.loop.create_task(
+ asyncio.wait(rpcs, return_when=asyncio.FIRST_EXCEPTION))
+ # Each batch took test_constants.SHORT_TIMEOUT /2
+ start_time = time.time()
+ await task
+ elapsed_time = time.time() - start_time
+ self.assertGreater(elapsed_time, test_constants.SHORT_TIMEOUT * 3 / 2)
+ # Clean-up
+ await channel.close()
+ await server.stop(0)
+
if __name__ == '__main__':
logging.basicConfig(level=logging.DEBUG)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_time_remaining_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_time_remaining_test.py
new file mode 100644
index 00000000000..0de87b532fb
--- /dev/null
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/server_time_remaining_test.py
@@ -0,0 +1,70 @@
+# Copyright 2021 The gRPC Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+"""Test the time_remaining() method of async ServicerContext."""
+
+import asyncio
+import logging
+import unittest
+import datetime
+
+import grpc
+from grpc import aio
+
+from tests_aio.unit._common import ADHOC_METHOD, AdhocGenericHandler
+from tests_aio.unit._test_base import AioTestBase
+
+_REQUEST = b'\x09\x05'
+_REQUEST_TIMEOUT_S = datetime.timedelta(seconds=5).total_seconds()
+
+
+class TestServerTimeRemaining(AioTestBase):
+
+ async def setUp(self):
+ # Create async server
+ self._server = aio.server(options=(('grpc.so_reuseport', 0),))
+ self._adhoc_handlers = AdhocGenericHandler()
+ self._server.add_generic_rpc_handlers((self._adhoc_handlers,))
+ port = self._server.add_insecure_port('[::]:0')
+ address = 'localhost:%d' % port
+ await self._server.start()
+ # Create async channel
+ self._channel = aio.insecure_channel(address)
+
+ async def tearDown(self):
+ await self._channel.close()
+ await self._server.stop(None)
+
+ async def test_servicer_context_time_remaining(self):
+ seen_time_remaining = []
+
+ @grpc.unary_unary_rpc_method_handler
+ def log_time_remaining(request: bytes,
+ context: grpc.ServicerContext) -> bytes:
+ seen_time_remaining.append(context.time_remaining())
+ return b""
+
+ # Check if the deadline propagates properly
+ self._adhoc_handlers.set_adhoc_handler(log_time_remaining)
+ await self._channel.unary_unary(ADHOC_METHOD)(
+ _REQUEST, timeout=_REQUEST_TIMEOUT_S)
+ self.assertGreater(seen_time_remaining[0], _REQUEST_TIMEOUT_S / 2)
+ # Check if there is no timeout, the time_remaining will be None
+ self._adhoc_handlers.set_adhoc_handler(log_time_remaining)
+ await self._channel.unary_unary(ADHOC_METHOD)(_REQUEST)
+ self.assertIsNone(seen_time_remaining[1])
+
+
+if __name__ == '__main__':
+ logging.basicConfig(level=logging.DEBUG)
+ unittest.main(verbosity=2)
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/wait_for_connection_test.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/wait_for_connection_test.py
index cb6f7985290..4fbe074740e 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/wait_for_connection_test.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_aio/unit/wait_for_connection_test.py
@@ -42,11 +42,11 @@ class TestWaitForConnection(AioTestBase):
async def setUp(self):
address, self._server = await start_test_server()
self._channel = aio.insecure_channel(address)
- self._dummy_channel = aio.insecure_channel(UNREACHABLE_TARGET)
+ self._phony_channel = aio.insecure_channel(UNREACHABLE_TARGET)
self._stub = test_pb2_grpc.TestServiceStub(self._channel)
async def tearDown(self):
- await self._dummy_channel.close()
+ await self._phony_channel.close()
await self._channel.close()
await self._server.stop(None)
@@ -122,7 +122,7 @@ class TestWaitForConnection(AioTestBase):
self.assertEqual(grpc.StatusCode.OK, await call.code())
async def test_unary_unary_error(self):
- call = self._dummy_channel.unary_unary(_TEST_METHOD)(_REQUEST)
+ call = self._phony_channel.unary_unary(_TEST_METHOD)(_REQUEST)
with self.assertRaises(aio.AioRpcError) as exception_context:
await call.wait_for_connection()
@@ -130,7 +130,7 @@ class TestWaitForConnection(AioTestBase):
self.assertEqual(grpc.StatusCode.UNAVAILABLE, rpc_error.code())
async def test_unary_stream_error(self):
- call = self._dummy_channel.unary_stream(_TEST_METHOD)(_REQUEST)
+ call = self._phony_channel.unary_stream(_TEST_METHOD)(_REQUEST)
with self.assertRaises(aio.AioRpcError) as exception_context:
await call.wait_for_connection()
@@ -138,7 +138,7 @@ class TestWaitForConnection(AioTestBase):
self.assertEqual(grpc.StatusCode.UNAVAILABLE, rpc_error.code())
async def test_stream_unary_error(self):
- call = self._dummy_channel.stream_unary(_TEST_METHOD)()
+ call = self._phony_channel.stream_unary(_TEST_METHOD)()
with self.assertRaises(aio.AioRpcError) as exception_context:
await call.wait_for_connection()
@@ -146,7 +146,7 @@ class TestWaitForConnection(AioTestBase):
self.assertEqual(grpc.StatusCode.UNAVAILABLE, rpc_error.code())
async def test_stream_stream_error(self):
- call = self._dummy_channel.stream_stream(_TEST_METHOD)()
+ call = self._phony_channel.stream_stream(_TEST_METHOD)()
with self.assertRaises(aio.AioRpcError) as exception_context:
await call.wait_for_connection()
diff --git a/contrib/libs/grpc/src/python/grpcio_tests/tests_py3_only/interop/xds_interop_client.py b/contrib/libs/grpc/src/python/grpcio_tests/tests_py3_only/interop/xds_interop_client.py
index 21277a98cf2..fa953e5ac09 100644
--- a/contrib/libs/grpc/src/python/grpcio_tests/tests_py3_only/interop/xds_interop_client.py
+++ b/contrib/libs/grpc/src/python/grpcio_tests/tests_py3_only/interop/xds_interop_client.py
@@ -13,6 +13,8 @@
# limitations under the License.
import argparse
+import collections
+import datetime
import logging
import signal
import threading
@@ -42,8 +44,22 @@ _SUPPORTED_METHODS = (
"EmptyCall",
)
+_METHOD_CAMEL_TO_CAPS_SNAKE = {
+ "UnaryCall": "UNARY_CALL",
+ "EmptyCall": "EMPTY_CALL",
+}
+
+_METHOD_STR_TO_ENUM = {
+ "UnaryCall": messages_pb2.ClientConfigureRequest.UNARY_CALL,
+ "EmptyCall": messages_pb2.ClientConfigureRequest.EMPTY_CALL,
+}
+
+_METHOD_ENUM_TO_STR = {v: k for k, v in _METHOD_STR_TO_ENUM.items()}
+
PerMethodMetadataType = Mapping[str, Sequence[Tuple[str, str]]]
+_CONFIG_CHANGE_TIMEOUT = datetime.timedelta(milliseconds=500)
+
class _StatsWatcher:
_start: int
@@ -77,8 +93,8 @@ class _StatsWatcher:
self._rpcs_needed -= 1
self._condition.notify()
- def await_rpc_stats_response(self, timeout_sec: int
- ) -> messages_pb2.LoadBalancerStatsResponse:
+ def await_rpc_stats_response(
+ self, timeout_sec: int) -> messages_pb2.LoadBalancerStatsResponse:
"""Blocks until a full response has been collected."""
with self._condition:
self._condition.wait_for(lambda: not self._rpcs_needed,
@@ -98,9 +114,16 @@ _stop_event = threading.Event()
_global_rpc_id: int = 0
_watchers: Set[_StatsWatcher] = set()
_global_server = None
+_global_rpcs_started: Mapping[str, int] = collections.defaultdict(int)
+_global_rpcs_succeeded: Mapping[str, int] = collections.defaultdict(int)
+_global_rpcs_failed: Mapping[str, int] = collections.defaultdict(int)
+
+# Mapping[method, Mapping[status_code, count]]
+_global_rpc_statuses: Mapping[str, Mapping[int, int]] = collections.defaultdict(
+ lambda: collections.defaultdict(int))
-def _handle_sigint(sig, frame):
+def _handle_sigint(sig, frame) -> None:
_stop_event.set()
_global_server.stop(None)
@@ -111,9 +134,10 @@ class _LoadBalancerStatsServicer(test_pb2_grpc.LoadBalancerStatsServiceServicer
def __init__(self):
super(_LoadBalancerStatsServicer).__init__()
- def GetClientStats(self, request: messages_pb2.LoadBalancerStatsRequest,
- context: grpc.ServicerContext
- ) -> messages_pb2.LoadBalancerStatsResponse:
+ def GetClientStats(
+ self, request: messages_pb2.LoadBalancerStatsRequest,
+ context: grpc.ServicerContext
+ ) -> messages_pb2.LoadBalancerStatsResponse:
logger.info("Received stats request.")
start = None
end = None
@@ -126,15 +150,37 @@ class _LoadBalancerStatsServicer(test_pb2_grpc.LoadBalancerStatsServiceServicer
response = watcher.await_rpc_stats_response(request.timeout_sec)
with _global_lock:
_watchers.remove(watcher)
- logger.info("Returning stats response: {}".format(response))
+ logger.info("Returning stats response: %s", response)
+ return response
+
+ def GetClientAccumulatedStats(
+ self, request: messages_pb2.LoadBalancerAccumulatedStatsRequest,
+ context: grpc.ServicerContext
+ ) -> messages_pb2.LoadBalancerAccumulatedStatsResponse:
+ logger.info("Received cumulative stats request.")
+ response = messages_pb2.LoadBalancerAccumulatedStatsResponse()
+ with _global_lock:
+ for method in _SUPPORTED_METHODS:
+ caps_method = _METHOD_CAMEL_TO_CAPS_SNAKE[method]
+ response.num_rpcs_started_by_method[
+ caps_method] = _global_rpcs_started[method]
+ response.num_rpcs_succeeded_by_method[
+ caps_method] = _global_rpcs_succeeded[method]
+ response.num_rpcs_failed_by_method[
+ caps_method] = _global_rpcs_failed[method]
+ response.stats_per_method[
+ caps_method].rpcs_started = _global_rpcs_started[method]
+ for code, count in _global_rpc_statuses[method].items():
+ response.stats_per_method[caps_method].result[code] = count
+ logger.info("Returning cumulative stats response.")
return response
def _start_rpc(method: str, metadata: Sequence[Tuple[str, str]],
request_id: int, stub: test_pb2_grpc.TestServiceStub,
- timeout: float,
- futures: Mapping[int, Tuple[grpc.Future, str]]) -> None:
- logger.info(f"Sending {method} request to backend: {request_id}")
+ timeout: float, futures: Mapping[int, Tuple[grpc.Future,
+ str]]) -> None:
+ logger.debug(f"Sending {method} request to backend: {request_id}")
if method == "UnaryCall":
future = stub.UnaryCall.future(messages_pb2.SimpleRequest(),
metadata=metadata,
@@ -152,7 +198,10 @@ def _on_rpc_done(rpc_id: int, future: grpc.Future, method: str,
print_response: bool) -> None:
exception = future.exception()
hostname = ""
+ _global_rpc_statuses[method][future.code().value[0]] += 1
if exception is not None:
+ with _global_lock:
+ _global_rpcs_failed[method] += 1
if exception.code() == grpc.StatusCode.DEADLINE_EXCEEDED:
logger.error(f"RPC {rpc_id} timed out")
else:
@@ -166,11 +215,17 @@ def _on_rpc_done(rpc_id: int, future: grpc.Future, method: str,
break
else:
hostname = response.hostname
+ if future.code() == grpc.StatusCode.OK:
+ with _global_lock:
+ _global_rpcs_succeeded[method] += 1
+ else:
+ with _global_lock:
+ _global_rpcs_failed[method] += 1
if print_response:
if future.code() == grpc.StatusCode.OK:
- logger.info("Successful response.")
+ logger.debug("Successful response.")
else:
- logger.info(f"RPC failed: {call}")
+ logger.debug(f"RPC failed: {call}")
with _global_lock:
for watcher in _watchers:
watcher.on_rpc_complete(rpc_id, hostname, method)
@@ -194,24 +249,55 @@ def _cancel_all_rpcs(futures: Mapping[int, Tuple[grpc.Future, str]]) -> None:
future.cancel()
-def _run_single_channel(method: str, metadata: Sequence[Tuple[str, str]],
- qps: int, server: str, rpc_timeout_sec: int,
- print_response: bool):
+class _ChannelConfiguration:
+ """Configuration for a single client channel.
+
+ Instances of this class are meant to be dealt with as PODs. That is,
+ data member should be accessed directly. This class is not thread-safe.
+ When accessing any of its members, the lock member should be held.
+ """
+
+ def __init__(self, method: str, metadata: Sequence[Tuple[str,
+ str]], qps: int,
+ server: str, rpc_timeout_sec: int, print_response: bool):
+ # condition is signalled when a change is made to the config.
+ self.condition = threading.Condition()
+
+ self.method = method
+ self.metadata = metadata
+ self.qps = qps
+ self.server = server
+ self.rpc_timeout_sec = rpc_timeout_sec
+ self.print_response = print_response
+
+
+def _run_single_channel(config: _ChannelConfiguration) -> None:
global _global_rpc_id # pylint: disable=global-statement
- duration_per_query = 1.0 / float(qps)
+ with config.condition:
+ server = config.server
with grpc.insecure_channel(server) as channel:
stub = test_pb2_grpc.TestServiceStub(channel)
futures: Dict[int, Tuple[grpc.Future, str]] = {}
while not _stop_event.is_set():
+ with config.condition:
+ if config.qps == 0:
+ config.condition.wait(
+ timeout=_CONFIG_CHANGE_TIMEOUT.total_seconds())
+ continue
+ else:
+ duration_per_query = 1.0 / float(config.qps)
request_id = None
with _global_lock:
request_id = _global_rpc_id
_global_rpc_id += 1
+ _global_rpcs_started[config.method] += 1
start = time.time()
end = start + duration_per_query
- _start_rpc(method, metadata, request_id, stub,
- float(rpc_timeout_sec), futures)
- _remove_completed_rpcs(futures, print_response)
+ with config.condition:
+ _start_rpc(config.method, config.metadata, request_id, stub,
+ float(config.rpc_timeout_sec), futures)
+ with config.condition:
+ _remove_completed_rpcs(futures, config.print_response)
logger.debug(f"Currently {len(futures)} in-flight RPCs")
now = time.time()
while now < end:
@@ -220,30 +306,64 @@ def _run_single_channel(method: str, metadata: Sequence[Tuple[str, str]],
_cancel_all_rpcs(futures)
+class _XdsUpdateClientConfigureServicer(
+ test_pb2_grpc.XdsUpdateClientConfigureServiceServicer):
+
+ def __init__(self, per_method_configs: Mapping[str, _ChannelConfiguration],
+ qps: int):
+ super(_XdsUpdateClientConfigureServicer).__init__()
+ self._per_method_configs = per_method_configs
+ self._qps = qps
+
+ def Configure(
+ self, request: messages_pb2.ClientConfigureRequest,
+ context: grpc.ServicerContext
+ ) -> messages_pb2.ClientConfigureResponse:
+ logger.info("Received Configure RPC: %s", request)
+ method_strs = (_METHOD_ENUM_TO_STR[t] for t in request.types)
+ for method in _SUPPORTED_METHODS:
+ method_enum = _METHOD_STR_TO_ENUM[method]
+ channel_config = self._per_method_configs[method]
+ if method in method_strs:
+ qps = self._qps
+ metadata = ((md.key, md.value)
+ for md in request.metadata
+ if md.type == method_enum)
+ # For backward compatibility, do not change timeout when we
+ # receive a default value timeout.
+ if request.timeout_sec == 0:
+ timeout_sec = channel_config.rpc_timeout_sec
+ else:
+ timeout_sec = request.timeout_sec
+ else:
+ qps = 0
+ metadata = ()
+ # Leave timeout unchanged for backward compatibility.
+ timeout_sec = channel_config.rpc_timeout_sec
+ with channel_config.condition:
+ channel_config.qps = qps
+ channel_config.metadata = list(metadata)
+ channel_config.rpc_timeout_sec = timeout_sec
+ channel_config.condition.notify_all()
+ return messages_pb2.ClientConfigureResponse()
+
+
class _MethodHandle:
"""An object grouping together threads driving RPCs for a method."""
_channel_threads: List[threading.Thread]
- def __init__(self, method: str, metadata: Sequence[Tuple[str, str]],
- num_channels: int, qps: int, server: str, rpc_timeout_sec: int,
- print_response: bool):
+ def __init__(self, num_channels: int,
+ channel_config: _ChannelConfiguration):
"""Creates and starts a group of threads running the indicated method."""
self._channel_threads = []
for i in range(num_channels):
thread = threading.Thread(target=_run_single_channel,
- args=(
- method,
- metadata,
- qps,
- server,
- rpc_timeout_sec,
- print_response,
- ))
+ args=(channel_config,))
thread.start()
self._channel_threads.append(thread)
- def stop(self):
+ def stop(self) -> None:
"""Joins all threads referenced by the handle."""
for channel_thread in self._channel_threads:
channel_thread.join()
@@ -254,15 +374,24 @@ def _run(args: argparse.Namespace, methods: Sequence[str],
logger.info("Starting python xDS Interop Client.")
global _global_server # pylint: disable=global-statement
method_handles = []
- for method in methods:
- method_handles.append(
- _MethodHandle(method, per_method_metadata.get(method, []),
- args.num_channels, args.qps, args.server,
- args.rpc_timeout_sec, args.print_response))
+ channel_configs = {}
+ for method in _SUPPORTED_METHODS:
+ if method in methods:
+ qps = args.qps
+ else:
+ qps = 0
+ channel_config = _ChannelConfiguration(
+ method, per_method_metadata.get(method, []), qps, args.server,
+ args.rpc_timeout_sec, args.print_response)
+ channel_configs[method] = channel_config
+ method_handles.append(_MethodHandle(args.num_channels, channel_config))
_global_server = grpc.server(futures.ThreadPoolExecutor())
_global_server.add_insecure_port(f"0.0.0.0:{args.stats_port}")
test_pb2_grpc.add_LoadBalancerStatsServiceServicer_to_server(
_LoadBalancerStatsServicer(), _global_server)
+ test_pb2_grpc.add_XdsUpdateClientConfigureServiceServicer_to_server(
+ _XdsUpdateClientConfigureServicer(channel_configs, args.qps),
+ _global_server)
_global_server.start()
_global_server.wait_for_termination()
for method_handle in method_handles:
diff --git a/contrib/libs/grpc/test/core/util/cmdline.cc b/contrib/libs/grpc/test/core/util/cmdline.cc
index 62b47f927a2..350d4bc046a 100644
--- a/contrib/libs/grpc/test/core/util/cmdline.cc
+++ b/contrib/libs/grpc/test/core/util/cmdline.cc
@@ -59,7 +59,7 @@ struct gpr_cmdline {
int survive_failure;
};
-static int normal_state(gpr_cmdline* cl, char* arg);
+static int normal_state(gpr_cmdline* cl, char* str);
gpr_cmdline* gpr_cmdline_create(const char* description) {
gpr_cmdline* cl = static_cast<gpr_cmdline*>(gpr_zalloc(sizeof(gpr_cmdline)));
diff --git a/contrib/libs/grpc/test/core/util/cmdline_test.cc b/contrib/libs/grpc/test/core/util/cmdline_test.cc
index b1b7da6b170..6831684bf66 100644
--- a/contrib/libs/grpc/test/core/util/cmdline_test.cc
+++ b/contrib/libs/grpc/test/core/util/cmdline_test.cc
@@ -30,7 +30,7 @@
static void test_simple_int(void) {
int x = 1;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("-foo"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("-foo"),
const_cast<char*>("3")};
LOG_TEST();
@@ -46,7 +46,7 @@ static void test_simple_int(void) {
static void test_eq_int(void) {
int x = 1;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("-foo=3")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("-foo=3")};
LOG_TEST();
@@ -61,7 +61,7 @@ static void test_eq_int(void) {
static void test_2dash_int(void) {
int x = 1;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo"),
const_cast<char*>("3")};
LOG_TEST();
@@ -77,7 +77,7 @@ static void test_2dash_int(void) {
static void test_2dash_eq_int(void) {
int x = 1;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo=3")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo=3")};
LOG_TEST();
@@ -92,7 +92,7 @@ static void test_2dash_eq_int(void) {
static void test_simple_string(void) {
const char* x = nullptr;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("-foo"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("-foo"),
const_cast<char*>("3")};
LOG_TEST();
@@ -108,7 +108,7 @@ static void test_simple_string(void) {
static void test_eq_string(void) {
const char* x = nullptr;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("-foo=3")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("-foo=3")};
LOG_TEST();
@@ -123,7 +123,7 @@ static void test_eq_string(void) {
static void test_2dash_string(void) {
const char* x = nullptr;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo"),
const_cast<char*>("3")};
LOG_TEST();
@@ -139,7 +139,7 @@ static void test_2dash_string(void) {
static void test_2dash_eq_string(void) {
const char* x = nullptr;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo=3")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo=3")};
LOG_TEST();
@@ -154,7 +154,7 @@ static void test_2dash_eq_string(void) {
static void test_flag_on(void) {
int x = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo")};
LOG_TEST();
@@ -169,7 +169,7 @@ static void test_flag_on(void) {
static void test_flag_no(void) {
int x = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--no-foo")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--no-foo")};
LOG_TEST();
@@ -184,7 +184,7 @@ static void test_flag_no(void) {
static void test_flag_val_1(void) {
int x = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo=1")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo=1")};
LOG_TEST();
@@ -199,7 +199,7 @@ static void test_flag_val_1(void) {
static void test_flag_val_0(void) {
int x = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo=0")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo=0")};
LOG_TEST();
@@ -214,7 +214,7 @@ static void test_flag_val_0(void) {
static void test_flag_val_true(void) {
int x = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo=true")};
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--foo=true")};
LOG_TEST();
@@ -229,7 +229,8 @@ static void test_flag_val_true(void) {
static void test_flag_val_false(void) {
int x = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--foo=false")};
+ char* args[] = {const_cast<char*>(__FILE__),
+ const_cast<char*>("--foo=false")};
LOG_TEST();
@@ -247,7 +248,7 @@ static void test_many(void) {
int flag = 2;
gpr_cmdline* cl;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--str"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--str"),
const_cast<char*>("hello"), const_cast<char*>("-x=4"),
const_cast<char*>("-no-flag")};
@@ -275,7 +276,7 @@ static void extra_arg_cb(void* user_data, const char* arg) {
static void test_extra(void) {
gpr_cmdline* cl;
int count = 0;
- char* args[] = {(char*)__FILE__, const_cast<char*>("a"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("a"),
const_cast<char*>("b"), const_cast<char*>("c")};
LOG_TEST();
@@ -291,7 +292,7 @@ static void test_extra(void) {
static void test_extra_dashdash(void) {
gpr_cmdline* cl;
int count = 0;
- char* args[] = {(char*)__FILE__, const_cast<char*>("--"),
+ char* args[] = {const_cast<char*>(__FILE__), const_cast<char*>("--"),
const_cast<char*>("a"), const_cast<char*>("b"),
const_cast<char*>("c")};
@@ -341,7 +342,7 @@ static void test_help(void) {
int x = 0;
int flag = 2;
- char* help[] = {(char*)__FILE__, const_cast<char*>("-h")};
+ char* help[] = {const_cast<char*>(__FILE__), const_cast<char*>("-h")};
LOG_TEST();
@@ -365,7 +366,8 @@ static void test_badargs1(void) {
int x = 0;
int flag = 2;
- char* bad_arg_name[] = {(char*)__FILE__, const_cast<char*>("--y")};
+ char* bad_arg_name[] = {const_cast<char*>(__FILE__),
+ const_cast<char*>("--y")};
LOG_TEST();
@@ -390,7 +392,8 @@ static void test_badargs2(void) {
int x = 0;
int flag = 2;
- char* bad_int_value[] = {(char*)__FILE__, const_cast<char*>("--x"),
+ char* bad_int_value[] = {const_cast<char*>(__FILE__),
+ const_cast<char*>("--x"),
const_cast<char*>("henry")};
LOG_TEST();
@@ -416,7 +419,8 @@ static void test_badargs3(void) {
int x = 0;
int flag = 2;
- char* bad_bool_value[] = {(char*)__FILE__, const_cast<char*>("--flag=henry")};
+ char* bad_bool_value[] = {const_cast<char*>(__FILE__),
+ const_cast<char*>("--flag=henry")};
LOG_TEST();
@@ -441,7 +445,8 @@ static void test_badargs4(void) {
int x = 0;
int flag = 2;
- char* bad_bool_value[] = {(char*)__FILE__, const_cast<char*>("--no-str")};
+ char* bad_bool_value[] = {const_cast<char*>(__FILE__),
+ const_cast<char*>("--no-str")};
LOG_TEST();
diff --git a/contrib/libs/grpc/test/core/util/debugger_macros.cc b/contrib/libs/grpc/test/core/util/debugger_macros.cc
deleted file mode 100644
index fde68f32178..00000000000
--- a/contrib/libs/grpc/test/core/util/debugger_macros.cc
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- *
- * Copyright 2016 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.
- *
- */
-
-/*
- * A collection of 'macros' that help navigating the grpc object hierarchy
- * Not intended to be robust for main-line code, often cuts across abstraction
- * boundaries.
- */
-#include <stdio.h>
-
-#include "src/core/ext/filters/client_channel/client_channel.h"
-#include "src/core/ext/transport/chttp2/transport/internal.h"
-#include "src/core/lib/channel/connected_channel.h"
-#include "src/core/lib/surface/call.h"
-
-grpc_stream* grpc_transport_stream_from_call(grpc_call* call) {
- grpc_call_stack* cs = grpc_call_get_call_stack(call);
- for (;;) {
- grpc_call_element* el = grpc_call_stack_element(cs, cs->count - 1);
- if (el->filter == &grpc_client_channel_filter) {
- grpc_core::RefCountedPtr<grpc_core::SubchannelCall> scc =
- grpc_client_channel_get_subchannel_call(el);
- if (scc == nullptr) {
- fprintf(stderr, "No subchannel-call");
- fflush(stderr);
- return nullptr;
- }
- cs = scc->GetCallStack();
- } else if (el->filter == &grpc_connected_filter) {
- return grpc_connected_channel_get_stream(el);
- } else {
- fprintf(stderr, "Unrecognized filter: %s", el->filter->name);
- fflush(stderr);
- return nullptr;
- }
- }
-}
-
-grpc_chttp2_stream* grpc_chttp2_stream_from_call(grpc_call* call) {
- return reinterpret_cast<grpc_chttp2_stream*>(
- grpc_transport_stream_from_call(call));
-}
diff --git a/contrib/libs/grpc/test/core/util/debugger_macros.h b/contrib/libs/grpc/test/core/util/debugger_macros.h
deleted file mode 100644
index 71228c6e875..00000000000
--- a/contrib/libs/grpc/test/core/util/debugger_macros.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- *
- * Copyright 2016 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_TEST_CORE_UTIL_DEBUGGER_MACROS_H
-#define GRPC_TEST_CORE_UTIL_DEBUGGER_MACROS_H
-
-#include "src/core/ext/transport/chttp2/transport/internal.h"
-#include "src/core/lib/surface/call.h"
-
-grpc_chttp2_stream* grpc_chttp2_stream_from_call(grpc_call* call);
-
-#endif /* GRPC_TEST_CORE_UTIL_DEBUGGER_MACROS_H */
diff --git a/contrib/libs/grpc/test/core/util/eval_args_mock_endpoint.cc b/contrib/libs/grpc/test/core/util/eval_args_mock_endpoint.cc
index 00d4056ba53..cc8758da7f2 100644
--- a/contrib/libs/grpc/test/core/util/eval_args_mock_endpoint.cc
+++ b/contrib/libs/grpc/test/core/util/eval_args_mock_endpoint.cc
@@ -36,15 +36,16 @@ class EvalArgsMockEndpoint {
base_.vtable = &vtable_;
}
grpc_endpoint* base() const { return const_cast<grpc_endpoint*>(&base_); }
- static void Read(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, bool unused) {}
- static void Write(grpc_endpoint* ep, grpc_slice_buffer* slices,
- grpc_closure* cb, void* unused) {}
- static void AddToPollset(grpc_endpoint* ep, grpc_pollset* unused) {}
- static void AddToPollsetSet(grpc_endpoint* ep, grpc_pollset_set* unused) {}
- static void DeleteFromPollsetSet(grpc_endpoint* ep,
- grpc_pollset_set* unused) {}
- static void Shutdown(grpc_endpoint* ep, grpc_error* why) {}
+ static void Read(grpc_endpoint* /*ep*/, grpc_slice_buffer* /*slices*/,
+ grpc_closure* /*cb*/, bool /*unused*/) {}
+ static void Write(grpc_endpoint* /*ep*/, grpc_slice_buffer* /*slices*/,
+ grpc_closure* /*cb*/, void* /*unused*/) {}
+ static void AddToPollset(grpc_endpoint* /*ep*/, grpc_pollset* /*unused*/) {}
+ static void AddToPollsetSet(grpc_endpoint* /*ep*/,
+ grpc_pollset_set* /*unused*/) {}
+ static void DeleteFromPollsetSet(grpc_endpoint* /*ep*/,
+ grpc_pollset_set* /*unused*/) {}
+ static void Shutdown(grpc_endpoint* /*ep*/, grpc_error* /*why*/) {}
static void Destroy(grpc_endpoint* ep) {
EvalArgsMockEndpoint* m = reinterpret_cast<EvalArgsMockEndpoint*>(ep);
delete m;
@@ -60,12 +61,12 @@ class EvalArgsMockEndpoint {
return m->local_address_;
}
- static grpc_resource_user* GetResourceUser(grpc_endpoint* ep) {
+ static grpc_resource_user* GetResourceUser(grpc_endpoint* /*ep*/) {
return nullptr;
}
- static int GetFd(grpc_endpoint* unused) { return -1; }
- static bool CanTrackErr(grpc_endpoint* unused) { return false; }
+ static int GetFd(grpc_endpoint* /*unused*/) { return -1; }
+ static bool CanTrackErr(grpc_endpoint* /*unused*/) { return false; }
private:
static constexpr grpc_endpoint_vtable vtable_ = {
diff --git a/contrib/libs/grpc/test/core/util/fuzzer_corpus_test.cc b/contrib/libs/grpc/test/core/util/fuzzer_corpus_test.cc
index 99ab45120d0..5b3d728f8e9 100644
--- a/contrib/libs/grpc/test/core/util/fuzzer_corpus_test.cc
+++ b/contrib/libs/grpc/test/core/util/fuzzer_corpus_test.cc
@@ -16,18 +16,16 @@
*
*/
-#include <stdbool.h>
-
#include <dirent.h>
-#include <gflags/gflags.h>
+#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <gtest/gtest.h>
+#include <stdbool.h>
#include <stdio.h>
#include <sys/types.h>
-#include <grpc/grpc.h>
-
+#include "y_absl/flags/flag.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/iomgr/load_file.h"
#include "test/core/util/test_config.h"
@@ -37,15 +35,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
extern bool squelch;
extern bool leak_check;
-// In some distros, gflags is in the namespace google, and in some others,
-// in gflags. This hack is enabling us to find both.
-namespace google {}
-namespace gflags {}
-using namespace google;
-using namespace gflags;
-
-DEFINE_string(file, "", "Use this file as test data");
-DEFINE_string(directory, "", "Use this directory as test data");
+Y_ABSL_FLAG(TString, file, "", "Use this file as test data");
+Y_ABSL_FLAG(TString, directory, "", "Use this directory as test data");
class FuzzerCorpusTest : public ::testing::TestWithParam<TString> {};
@@ -65,7 +56,7 @@ TEST_P(FuzzerCorpusTest, RunOneExample) {
void* data = gpr_malloc(length);
memcpy(data, GPR_SLICE_START_PTR(buffer), length);
grpc_slice_unref(buffer);
- grpc_shutdown_blocking();
+ grpc_shutdown();
LLVMFuzzerTestOneInput(static_cast<uint8_t*>(data), length);
gpr_free(data);
}
@@ -73,18 +64,21 @@ TEST_P(FuzzerCorpusTest, RunOneExample) {
class ExampleGenerator
: public ::testing::internal::ParamGeneratorInterface<TString> {
public:
- virtual ::testing::internal::ParamIteratorInterface<TString>* Begin()
- const;
- virtual ::testing::internal::ParamIteratorInterface<TString>* End() const;
+ ::testing::internal::ParamIteratorInterface<TString>* Begin()
+ const override;
+ ::testing::internal::ParamIteratorInterface<TString>* End()
+ const override;
private:
void Materialize() const {
if (examples_.empty()) {
- if (!FLAGS_file.empty()) examples_.push_back(FLAGS_file);
- if (!FLAGS_directory.empty()) {
+ if (!y_absl::GetFlag(FLAGS_file).empty()) {
+ examples_.push_back(y_absl::GetFlag(FLAGS_file));
+ }
+ if (!y_absl::GetFlag(FLAGS_directory).empty()) {
char* test_srcdir = gpr_getenv("TEST_SRCDIR");
gpr_log(GPR_DEBUG, "test_srcdir=\"%s\"", test_srcdir);
- TString directory = FLAGS_directory;
+ TString directory = y_absl::GetFlag(FLAGS_directory);
if (test_srcdir != nullptr) {
directory =
test_srcdir + TString("/com_github_grpc_grpc/") + directory;
@@ -124,13 +118,13 @@ class ExampleIterator
std::vector<TString>::const_iterator begin)
: base_(base_), begin_(begin), current_(begin) {}
- virtual const ExampleGenerator* BaseGenerator() const { return &base_; }
+ const ExampleGenerator* BaseGenerator() const override { return &base_; }
- virtual void Advance() { current_++; }
- virtual ExampleIterator* Clone() const { return new ExampleIterator(*this); }
- virtual const TString* Current() const { return &*current_; }
+ void Advance() override { current_++; }
+ ExampleIterator* Clone() const override { return new ExampleIterator(*this); }
+ const TString* Current() const override { return &*current_; }
- virtual bool Equals(const ParamIteratorInterface<TString>& other) const {
+ bool Equals(const ParamIteratorInterface<TString>& other) const override {
return &base_ == other.BaseGenerator() &&
current_ == dynamic_cast<const ExampleIterator*>(&other)->current_;
}
diff --git a/contrib/libs/grpc/test/core/util/histogram.cc b/contrib/libs/grpc/test/core/util/histogram.cc
index f028ac404ee..afb2c16c91e 100644
--- a/contrib/libs/grpc/test/core/util/histogram.cc
+++ b/contrib/libs/grpc/test/core/util/histogram.cc
@@ -124,23 +124,23 @@ int grpc_histogram_merge(grpc_histogram* dst, const grpc_histogram* src) {
return 1;
}
-void grpc_histogram_merge_contents(grpc_histogram* dst, const uint32_t* data,
- size_t data_count, double min_seen,
- double max_seen, double sum,
+void grpc_histogram_merge_contents(grpc_histogram* histogram,
+ const uint32_t* data, size_t data_count,
+ double min_seen, double max_seen, double sum,
double sum_of_squares, double count) {
size_t i;
- GPR_ASSERT(dst->num_buckets == data_count);
- dst->sum += sum;
- dst->sum_of_squares += sum_of_squares;
- dst->count += count;
- if (min_seen < dst->min_seen) {
- dst->min_seen = min_seen;
+ GPR_ASSERT(histogram->num_buckets == data_count);
+ histogram->sum += sum;
+ histogram->sum_of_squares += sum_of_squares;
+ histogram->count += count;
+ if (min_seen < histogram->min_seen) {
+ histogram->min_seen = min_seen;
}
- if (max_seen > dst->max_seen) {
- dst->max_seen = max_seen;
+ if (max_seen > histogram->max_seen) {
+ histogram->max_seen = max_seen;
}
- for (i = 0; i < dst->num_buckets; i++) {
- dst->buckets[i] += data[i];
+ for (i = 0; i < histogram->num_buckets; i++) {
+ histogram->buckets[i] += data[i];
}
}
@@ -224,7 +224,8 @@ double grpc_histogram_sum_of_squares(grpc_histogram* h) {
return h->sum_of_squares;
}
-const uint32_t* grpc_histogram_get_contents(grpc_histogram* h, size_t* size) {
- *size = h->num_buckets;
- return h->buckets;
+const uint32_t* grpc_histogram_get_contents(grpc_histogram* histogram,
+ size_t* count) {
+ *count = histogram->num_buckets;
+ return histogram->buckets;
}
diff --git a/contrib/libs/grpc/test/core/util/mock_endpoint.cc b/contrib/libs/grpc/test/core/util/mock_endpoint.cc
index 3c2d6a3f8b1..35a0f6d9f71 100644
--- a/contrib/libs/grpc/test/core/util/mock_endpoint.cc
+++ b/contrib/libs/grpc/test/core/util/mock_endpoint.cc
@@ -132,7 +132,8 @@ grpc_endpoint* grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice),
grpc_resource_quota* resource_quota) {
mock_endpoint* m = static_cast<mock_endpoint*>(gpr_malloc(sizeof(*m)));
m->base.vtable = &vtable;
- TString name = y_absl::StrFormat("mock_endpoint_%" PRIxPTR, (intptr_t)m);
+ TString name =
+ y_absl::StrFormat("mock_endpoint_%" PRIxPTR, reinterpret_cast<intptr_t>(m));
m->resource_user = grpc_resource_user_create(resource_quota, name.c_str());
grpc_slice_buffer_init(&m->read_buffer);
gpr_mu_init(&m->mu);
diff --git a/contrib/libs/grpc/test/core/util/mock_endpoint.h b/contrib/libs/grpc/test/core/util/mock_endpoint.h
index 6521d3e8e81..8e58d65bebb 100644
--- a/contrib/libs/grpc/test/core/util/mock_endpoint.h
+++ b/contrib/libs/grpc/test/core/util/mock_endpoint.h
@@ -23,7 +23,6 @@
grpc_endpoint* grpc_mock_endpoint_create(void (*on_write)(grpc_slice slice),
grpc_resource_quota* resource_quota);
-void grpc_mock_endpoint_put_read(grpc_endpoint* mock_endpoint,
- grpc_slice slice);
+void grpc_mock_endpoint_put_read(grpc_endpoint* ep, grpc_slice slice);
#endif
diff --git a/contrib/libs/grpc/test/core/util/passthru_endpoint.cc b/contrib/libs/grpc/test/core/util/passthru_endpoint.cc
index a5baafad020..6db2b349b2d 100644
--- a/contrib/libs/grpc/test/core/util/passthru_endpoint.cc
+++ b/contrib/libs/grpc/test/core/util/passthru_endpoint.cc
@@ -197,8 +197,8 @@ static void half_init(half* m, passthru_endpoint* parent,
m->parent = parent;
grpc_slice_buffer_init(&m->read_buffer);
m->on_read = nullptr;
- TString name = y_absl::StrFormat("passthru_endpoint_%s_%" PRIxPTR,
- half_name, (intptr_t)parent);
+ TString name =
+ y_absl::StrFormat("passthru_endpoint_%s_%p", half_name, parent);
m->resource_user = grpc_resource_user_create(resource_quota, name.c_str());
}
@@ -209,7 +209,7 @@ void grpc_passthru_endpoint_create(grpc_endpoint** client,
passthru_endpoint* m =
static_cast<passthru_endpoint*>(gpr_malloc(sizeof(*m)));
m->halves = 2;
- m->shutdown = 0;
+ m->shutdown = false;
if (stats == nullptr) {
m->stats = grpc_passthru_endpoint_stats_create();
} else {
diff --git a/contrib/libs/grpc/test/core/util/port.cc b/contrib/libs/grpc/test/core/util/port.cc
index 5a34b6026f3..eae4fbfb35a 100644
--- a/contrib/libs/grpc/test/core/util/port.cc
+++ b/contrib/libs/grpc/test/core/util/port.cc
@@ -73,7 +73,7 @@ static void free_chosen_ports(void) {
for (i = 0; i < num_chosen_ports; i++) {
grpc_free_port_using_server(chosen_ports[i]);
}
- grpc_shutdown_blocking();
+ grpc_shutdown();
gpr_free(chosen_ports);
}
diff --git a/contrib/libs/grpc/test/core/util/reconnect_server.cc b/contrib/libs/grpc/test/core/util/reconnect_server.cc
index 070ab3fa0a2..06d4c1e39e2 100644
--- a/contrib/libs/grpc/test/core/util/reconnect_server.cc
+++ b/contrib/libs/grpc/test/core/util/reconnect_server.cc
@@ -62,7 +62,7 @@ static void on_connect(void* arg, grpc_endpoint* tcp,
grpc_tcp_server_acceptor* acceptor) {
gpr_free(acceptor);
y_absl::string_view peer;
- int last_colon;
+ y_absl::string_view::size_type last_colon;
reconnect_server* server = static_cast<reconnect_server*>(arg);
gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME);
timestamp_list* new_tail;
diff --git a/contrib/libs/grpc/test/core/util/resolve_localhost_ip46.cc b/contrib/libs/grpc/test/core/util/resolve_localhost_ip46.cc
new file mode 100644
index 00000000000..b465b754ba5
--- /dev/null
+++ b/contrib/libs/grpc/test/core/util/resolve_localhost_ip46.cc
@@ -0,0 +1,58 @@
+//
+//
+// 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/core/util/resolve_localhost_ip46.h"
+
+#include <grpc/support/log.h>
+
+#include "src/core/lib/iomgr/port.h"
+#include "src/core/lib/iomgr/resolve_address.h"
+#include "src/core/lib/iomgr/sockaddr.h"
+
+namespace grpc_core {
+namespace {
+
+bool localhost_to_ipv4 = false;
+bool localhost_to_ipv6 = false;
+gpr_once g_resolve_localhost_ipv46 = GPR_ONCE_INIT;
+
+void InitResolveLocalhost() {
+ grpc_resolved_addresses* addresses;
+ grpc_error* err =
+ grpc_blocking_resolve_address("localhost", "https", &addresses);
+ GPR_ASSERT(err == GRPC_ERROR_NONE);
+ for (size_t i = 0; i < addresses->naddrs; i++) {
+ grpc_sockaddr* addr =
+ reinterpret_cast<grpc_sockaddr*>(addresses->addrs[i].addr);
+ if (addr->sa_family == GRPC_AF_INET) {
+ localhost_to_ipv4 = true;
+ } else if (addr->sa_family == GRPC_AF_INET6) {
+ localhost_to_ipv6 = true;
+ }
+ }
+ grpc_resolved_addresses_destroy(addresses);
+}
+} // namespace
+
+void LocalhostResolves(bool* ipv4, bool* ipv6) {
+ gpr_once_init(&g_resolve_localhost_ipv46, InitResolveLocalhost);
+ *ipv4 = localhost_to_ipv4;
+ *ipv6 = localhost_to_ipv6;
+}
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/test/core/util/resolve_localhost_ip46.h b/contrib/libs/grpc/test/core/util/resolve_localhost_ip46.h
new file mode 100644
index 00000000000..d8f7883adfe
--- /dev/null
+++ b/contrib/libs/grpc/test/core/util/resolve_localhost_ip46.h
@@ -0,0 +1,29 @@
+//
+//
+// 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.
+//
+//
+
+#ifndef GRPC_TEST_CORE_UTIL_RESOLVE_LOCALHOST_IP46_H_
+#define GRPC_TEST_CORE_UTIL_RESOLVE_LOCALHOST_IP46_H_
+
+namespace grpc_core {
+
+// Test whether localhost resolves to ipv4 and/or ipv6
+void LocalhostResolves(bool* ipv4, bool* ipv6);
+
+} // namespace grpc_core
+
+#endif // GRPC_TEST_CORE_UTIL_RESOLVE_LOCALHOST_IP46_H_
diff --git a/contrib/libs/grpc/test/core/util/examine_stack.cc b/contrib/libs/grpc/test/core/util/stack_tracer.cc
index 4400a343b4c..c71dc142599 100644
--- a/contrib/libs/grpc/test/core/util/examine_stack.cc
+++ b/contrib/libs/grpc/test/core/util/stack_tracer.cc
@@ -18,7 +18,7 @@
#include <grpc/support/port_platform.h>
-#include "test/core/util/examine_stack.h"
+#include "test/core/util/stack_tracer.h"
#include <cstdio>
#include <util/generic/string.h>
@@ -26,6 +26,8 @@
#include "y_absl/debugging/stacktrace.h"
#include "y_absl/debugging/symbolize.h"
+#include "src/core/lib/gprpp/examine_stack.h"
+
namespace {
static constexpr int kPrintfPointerFieldWidth = 2 + 2 * sizeof(void*);
@@ -87,16 +89,22 @@ static void DebugWriteToString(const char* data, void* str) {
} // namespace
namespace grpc_core {
+namespace testing {
-TString CurrentStackTrace() {
+TString GetCurrentStackTrace() {
TString result = "Stack trace:\n";
constexpr int kNumStackFrames = 32;
void* stack[kNumStackFrames];
int frame_sizes[kNumStackFrames];
int depth = y_absl::GetStackFrames(stack, frame_sizes, kNumStackFrames, 1);
- DumpStackTrace(stack, frame_sizes, depth, true, DebugWriteToString,
- (void*)&result);
+ DumpStackTrace(stack, frame_sizes, depth, true, DebugWriteToString, &result);
return result;
}
+void InitializeStackTracer(const char* argv0) {
+ y_absl::InitializeSymbolizer(argv0);
+ grpc_core::SetCurrentStackTraceProvider(&GetCurrentStackTrace);
+}
+
+} // namespace testing
} // namespace grpc_core
diff --git a/contrib/libs/grpc/test/core/util/examine_stack.h b/contrib/libs/grpc/test/core/util/stack_tracer.h
index 1eaf95792d2..16c2a433462 100644
--- a/contrib/libs/grpc/test/core/util/examine_stack.h
+++ b/contrib/libs/grpc/test/core/util/stack_tracer.h
@@ -24,11 +24,25 @@
#include <util/generic/string.h>
namespace grpc_core {
+namespace testing {
-// Return the current stack trace as a string (on multiple lines, beginning with
-// "Stack trace:\n")
-TString CurrentStackTrace();
+// Returns the current stack trace as a string. To have symbolized stack-traces,
+// InitializeStackTracer needs to be called beforehand.
+//
+// Example of stack-trace is
+// Stack trace:
+// @ 0x405b0f 192 StackTracerTest_Basic_Test::TestBody()
+// @ 0x7fbace6baf75 288 testing::internal::RunAllTests()
+// @ 0x7fbace6baa93 144 testing::UnitTest::Run()
+// @ 0x405d4d 64 main
+//
+TString GetCurrentStackTrace();
+// Initializes a stack tracer so that GetCurrentStackTrace can work.
+// This inits debug symbols and sets this as a gRPC stack-trace provider.
+void InitializeStackTracer(const char* argv0);
+
+} // namespace testing
} // namespace grpc_core
#endif /* GRPC_TEST_CORE_UTIL_EXAMINE_STACK_H */
diff --git a/contrib/libs/grpc/test/core/util/stack_tracer_test.cc b/contrib/libs/grpc/test/core/util/stack_tracer_test.cc
new file mode 100644
index 00000000000..6b577984d61
--- /dev/null
+++ b/contrib/libs/grpc/test/core/util/stack_tracer_test.cc
@@ -0,0 +1,44 @@
+/*
+ *
+ * Copyright 2020 the gRPC authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include "test/core/util/stack_tracer.h"
+
+#include <gtest/gtest.h>
+#include <util/generic/string.h>
+
+#include "y_absl/debugging/symbolize.h"
+#include "y_absl/strings/match.h"
+
+#include <grpc/support/log.h>
+
+#include "test/core/util/test_config.h"
+
+TEST(StackTracerTest, Basic) {
+ TString stack_trace = grpc_core::testing::GetCurrentStackTrace();
+ gpr_log(GPR_INFO, "stack_trace=%s", stack_trace.c_str());
+#if !defined(NDEBUG) && !defined(GPR_MUSL_LIBC_COMPAT)
+ EXPECT_TRUE(y_absl::StrContains(stack_trace, "Basic"));
+#endif
+}
+
+int main(int argc, char** argv) {
+ grpc::testing::TestEnvironment env(argc, argv);
+ testing::InitGoogleTest(&argc, argv);
+ int ret = RUN_ALL_TESTS();
+ return ret;
+}
diff --git a/contrib/libs/grpc/test/core/util/test_config.cc b/contrib/libs/grpc/test/core/util/test_config.cc
index 9e57a486b26..274c5c04b34 100644
--- a/contrib/libs/grpc/test/core/util/test_config.cc
+++ b/contrib/libs/grpc/test/core/util/test_config.cc
@@ -32,7 +32,9 @@
#include "src/core/lib/gpr/string.h"
#include "src/core/lib/gpr/useful.h"
+#include "src/core/lib/gprpp/examine_stack.h"
#include "src/core/lib/surface/init.h"
+#include "test/core/util/stack_tracer.h"
#include "y_absl/debugging/failure_signal_handler.h"
#include "y_absl/debugging/symbolize.h"
@@ -50,226 +52,6 @@ static unsigned seed(void) { return static_cast<unsigned>(getpid()); }
static unsigned seed(void) { return (unsigned)_getpid(); }
#endif
-#if GPR_WINDOWS_CRASH_HANDLER
-#include <windows.h>
-
-#include <tchar.h>
-
-// disable warning 4091 - dbghelp.h is broken for msvc2015
-#pragma warning(disable : 4091)
-#define DBGHELP_TRANSLATE_TCHAR
-#include <dbghelp.h>
-
-#ifdef _MSC_VER
-#pragma comment(lib, "dbghelp.lib")
-#endif
-
-static void print_stack_from_context(HANDLE thread, CONTEXT c) {
- STACKFRAME s; // in/out stackframe
- memset(&s, 0, sizeof(s));
- DWORD imageType;
-#ifdef _M_IX86
- // normally, call ImageNtHeader() and use machine info from PE header
- imageType = IMAGE_FILE_MACHINE_I386;
- s.AddrPC.Offset = c.Eip;
- s.AddrPC.Mode = AddrModeFlat;
- s.AddrFrame.Offset = c.Ebp;
- s.AddrFrame.Mode = AddrModeFlat;
- s.AddrStack.Offset = c.Esp;
- s.AddrStack.Mode = AddrModeFlat;
-#elif _M_X64
- imageType = IMAGE_FILE_MACHINE_AMD64;
- s.AddrPC.Offset = c.Rip;
- s.AddrPC.Mode = AddrModeFlat;
- s.AddrFrame.Offset = c.Rbp;
- s.AddrFrame.Mode = AddrModeFlat;
- s.AddrStack.Offset = c.Rsp;
- s.AddrStack.Mode = AddrModeFlat;
-#elif _M_IA64
- imageType = IMAGE_FILE_MACHINE_IA64;
- s.AddrPC.Offset = c.StIIP;
- s.AddrPC.Mode = AddrModeFlat;
- s.AddrFrame.Offset = c.IntSp;
- s.AddrFrame.Mode = AddrModeFlat;
- s.AddrBStore.Offset = c.RsBSP;
- s.AddrBStore.Mode = AddrModeFlat;
- s.AddrStack.Offset = c.IntSp;
- s.AddrStack.Mode = AddrModeFlat;
-#else
-#error "Platform not supported!"
-#endif
-
- HANDLE process = GetCurrentProcess();
-
- SYMBOL_INFOW* symbol =
- (SYMBOL_INFOW*)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1);
- symbol->MaxNameLen = 255;
- symbol->SizeOfStruct = sizeof(SYMBOL_INFOW);
-
- const unsigned short MAX_CALLERS_SHOWN =
- 8192; // avoid flooding the stderr if stacktrace is way too long
- for (int frame = 0; frame < MAX_CALLERS_SHOWN &&
- StackWalk(imageType, process, thread, &s, &c, 0,
- SymFunctionTableAccess, SymGetModuleBase, 0);
- frame++) {
- PWSTR symbol_name = L"<<no symbol>>";
- DWORD64 symbol_address = 0;
- if (SymFromAddrW(process, (DWORD64)(s.AddrPC.Offset), 0, symbol)) {
- symbol_name = symbol->Name;
- symbol_address = (DWORD64)symbol->Address;
- }
-
- PWSTR file_name = L"<<no line info>>";
- int line_number = 0;
- IMAGEHLP_LINE64 line;
- line.SizeOfStruct = sizeof(IMAGEHLP_LINE64);
- DWORD displacement = 0;
- if (SymGetLineFromAddrW64(process, (DWORD64)(s.AddrPC.Offset),
- &displacement, &line)) {
- file_name = line.FileName;
- line_number = (int)line.LineNumber;
- }
-
- fwprintf(stderr, L"*** %d: %016I64X %ls - %016I64X (%ls:%d)\n", frame,
- (DWORD64)(s.AddrPC.Offset), symbol_name, symbol_address, file_name,
- line_number);
- fflush(stderr);
- }
-
- free(symbol);
-}
-
-static void print_current_stack() {
- CONTEXT context;
- RtlCaptureContext(&context);
- print_stack_from_context(GetCurrentThread(), context);
-}
-
-static LONG crash_handler(struct _EXCEPTION_POINTERS* ex_info) {
- fprintf(stderr, "Exception handler called, dumping information\n");
- bool try_to_print_stack = true;
- PEXCEPTION_RECORD exrec = ex_info->ExceptionRecord;
- while (exrec) {
- DWORD code = exrec->ExceptionCode;
- DWORD flgs = exrec->ExceptionFlags;
- PVOID addr = exrec->ExceptionAddress;
- if (code == EXCEPTION_STACK_OVERFLOW) try_to_print_stack = false;
- fprintf(stderr, "code: %x - flags: %d - address: %p\n", code, flgs, addr);
- exrec = exrec->ExceptionRecord;
- }
- if (try_to_print_stack) {
- print_stack_from_context(GetCurrentThread(), *ex_info->ContextRecord);
- }
- if (IsDebuggerPresent()) {
- __debugbreak();
- } else {
- _exit(1);
- }
- return EXCEPTION_EXECUTE_HANDLER;
-}
-
-static void abort_handler(int sig) {
- fprintf(stderr, "Abort handler called.\n");
- print_current_stack();
- if (IsDebuggerPresent()) {
- __debugbreak();
- } else {
- _exit(1);
- }
-}
-
-static void install_crash_handler() {
- if (!SymInitialize(GetCurrentProcess(), NULL, TRUE)) {
- fprintf(stderr, "SymInitialize failed: %d\n", GetLastError());
- }
- SetUnhandledExceptionFilter((LPTOP_LEVEL_EXCEPTION_FILTER)crash_handler);
- _set_abort_behavior(0, _WRITE_ABORT_MSG);
- _set_abort_behavior(0, _CALL_REPORTFAULT);
- signal(SIGABRT, abort_handler);
-}
-#elif GPR_POSIX_CRASH_HANDLER
-#include <errno.h>
-#include <execinfo.h>
-#include <stdio.h>
-#include <string.h>
-
-#define SIGNAL_NAMES_LENGTH 32
-
-static const char* const signal_names[] = {
- nullptr, "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP",
- "SIGABRT", "SIGBUS", "SIGFPE", "SIGKILL", "SIGUSR1", "SIGSEGV",
- "SIGUSR2", "SIGPIPE", "SIGALRM", "SIGTERM", "SIGSTKFLT", "SIGCHLD",
- "SIGCONT", "SIGSTOP", "SIGTSTP", "SIGTTIN", "SIGTTOU", "SIGURG",
- "SIGXCPU", "SIGXFSZ", "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGIO",
- "SIGPWR", "SIGSYS"};
-
-static char g_alt_stack[GPR_MAX(MINSIGSTKSZ, 65536)];
-
-#define MAX_FRAMES 32
-
-/* signal safe output */
-static void output_string(const char* string) {
- size_t len = strlen(string);
- ssize_t r;
-
- do {
- r = write(STDERR_FILENO, string, len);
- } while (r == -1 && errno == EINTR);
-}
-
-static void output_num(long num) {
- char buf[GPR_LTOA_MIN_BUFSIZE];
- gpr_ltoa(num, buf);
- output_string(buf);
-}
-
-static void crash_handler(int signum, siginfo_t* /*info*/, void* /*data*/) {
- void* addrlist[MAX_FRAMES + 1];
- int addrlen;
-
- output_string("\n\n\n*******************************\nCaught signal ");
- if (signum > 0 && signum < SIGNAL_NAMES_LENGTH) {
- output_string(signal_names[signum]);
- } else {
- output_num(signum);
- }
- output_string("\n");
-
- addrlen = backtrace(addrlist, GPR_ARRAY_SIZE(addrlist));
-
- if (addrlen == 0) {
- output_string(" no backtrace\n");
- } else {
- backtrace_symbols_fd(addrlist, addrlen, STDERR_FILENO);
- }
-
- /* try to get a core dump for SIGTERM */
- if (signum == SIGTERM) signum = SIGQUIT;
- raise(signum);
-}
-
-static void install_crash_handler() {
- stack_t ss;
- struct sigaction sa;
-
- memset(&ss, 0, sizeof(ss));
- memset(&sa, 0, sizeof(sa));
- ss.ss_size = sizeof(g_alt_stack);
- ss.ss_sp = g_alt_stack;
- GPR_ASSERT(sigaltstack(&ss, nullptr) == 0);
- sa.sa_flags = static_cast<int>(SA_SIGINFO | SA_ONSTACK | SA_RESETHAND);
- sa.sa_sigaction = crash_handler;
- GPR_ASSERT(sigaction(SIGILL, &sa, nullptr) == 0);
- GPR_ASSERT(sigaction(SIGABRT, &sa, nullptr) == 0);
- GPR_ASSERT(sigaction(SIGBUS, &sa, nullptr) == 0);
- GPR_ASSERT(sigaction(SIGSEGV, &sa, nullptr) == 0);
- GPR_ASSERT(sigaction(SIGTERM, &sa, nullptr) == 0);
- GPR_ASSERT(sigaction(SIGQUIT, &sa, nullptr) == 0);
-}
-#else
-static void install_crash_handler() {}
-#endif
-
bool BuiltUnderValgrind() {
#ifdef RUNNING_ON_VALGRIND
return true;
@@ -371,17 +153,11 @@ gpr_timespec grpc_timeout_milliseconds_to_deadline(int64_t time_ms) {
GPR_TIMESPAN));
}
-void grpc_test_init(int argc, char** argv) {
-#if GPR_WINDOWS
- // Windows cannot use y_absl::InitializeSymbolizer until it fixes mysterious
- // SymInitialize failure using Bazel RBE on Windows
- // https://github.com/grpc/grpc/issues/24178
- install_crash_handler();
-#else
- y_absl::InitializeSymbolizer(argv[0]);
+void grpc_test_init(int /*argc*/, char** argv) {
+ grpc_core::testing::InitializeStackTracer(argv[0]);
y_absl::FailureSignalHandlerOptions options;
y_absl::InstallFailureSignalHandler(options);
-#endif
+ gpr_log_verbosity_init();
gpr_log(GPR_DEBUG,
"test slowdown factor: sanitizer=%" PRId64 ", fixture=%" PRId64
", poller=%" PRId64 ", total=%" PRId64,
diff --git a/contrib/libs/grpc/test/core/util/test_lb_policies.cc b/contrib/libs/grpc/test/core/util/test_lb_policies.cc
index c1c1e9c56ae..f3734411402 100644
--- a/contrib/libs/grpc/test/core/util/test_lb_policies.cc
+++ b/contrib/libs/grpc/test/core/util/test_lb_policies.cc
@@ -103,7 +103,7 @@ class TestPickArgsLb : public ForwardingLoadBalancingPolicy {
: ForwardingLoadBalancingPolicy(
y_absl::make_unique<Helper>(RefCountedPtr<TestPickArgsLb>(this), cb),
std::move(args),
- /*delegate_lb_policy_name=*/"pick_first",
+ /*delegate_policy_name=*/"pick_first",
/*initial_refcount=*/2) {}
~TestPickArgsLb() override = default;
@@ -208,7 +208,7 @@ class InterceptRecvTrailingMetadataLoadBalancingPolicy
this),
std::move(cb)),
std::move(args),
- /*delegate_lb_policy_name=*/"pick_first",
+ /*delegate_policy_name=*/"pick_first",
/*initial_refcount=*/2) {}
~InterceptRecvTrailingMetadataLoadBalancingPolicy() override = default;
@@ -347,7 +347,7 @@ class AddressTestLoadBalancingPolicy : public ForwardingLoadBalancingPolicy {
RefCountedPtr<AddressTestLoadBalancingPolicy>(this),
std::move(cb)),
std::move(args),
- /*delegate_lb_policy_name=*/"pick_first",
+ /*delegate_policy_name=*/"pick_first",
/*initial_refcount=*/2) {}
~AddressTestLoadBalancingPolicy() override = default;
diff --git a/contrib/libs/grpc/test/core/util/test_tcp_server.h b/contrib/libs/grpc/test/core/util/test_tcp_server.h
index 8765ea9a221..549b47b259b 100644
--- a/contrib/libs/grpc/test/core/util/test_tcp_server.h
+++ b/contrib/libs/grpc/test/core/util/test_tcp_server.h
@@ -31,7 +31,7 @@ struct test_tcp_server {
grpc_closure shutdown_complete;
bool shutdown = false;
// mu is filled in by grpc_pollset_init and controls the pollset.
- // TODO: Switch this to a Mutex once pollset_init can provide a Mutex
+ // TODO(unknown): Switch this to a Mutex once pollset_init can provide a Mutex
gpr_mu* mu;
std::vector<grpc_pollset*> pollset;
grpc_tcp_server_cb on_connect;
diff --git a/contrib/libs/grpc/test/core/util/tls_utils.cc b/contrib/libs/grpc/test/core/util/tls_utils.cc
new file mode 100644
index 00000000000..cb812f12269
--- /dev/null
+++ b/contrib/libs/grpc/test/core/util/tls_utils.cc
@@ -0,0 +1,76 @@
+//
+// 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/core/util/tls_utils.h"
+
+#include "src/core/lib/gpr/tmpfile.h"
+#include "src/core/lib/iomgr/load_file.h"
+#include "src/core/lib/slice/slice_internal.h"
+
+namespace grpc_core {
+
+namespace testing {
+
+TmpFile::TmpFile(y_absl::string_view credential_data) {
+ name_ = CreateTmpFileAndWriteData(credential_data);
+ GPR_ASSERT(!name_.empty());
+}
+
+TmpFile::~TmpFile() { GPR_ASSERT(remove(name_.c_str()) == 0); }
+
+void TmpFile::RewriteFile(y_absl::string_view credential_data) {
+ // Create a new file containing new data.
+ TString new_name = CreateTmpFileAndWriteData(credential_data);
+ GPR_ASSERT(!new_name.empty());
+ // Remove the old file.
+ GPR_ASSERT(remove(name_.c_str()) == 0);
+ // Rename the new file to the original name.
+ GPR_ASSERT(rename(new_name.c_str(), name_.c_str()) == 0);
+}
+
+TString TmpFile::CreateTmpFileAndWriteData(
+ y_absl::string_view credential_data) {
+ char* name = nullptr;
+ FILE* file_descriptor = gpr_tmpfile("GrpcTlsCertificateProviderTest", &name);
+ GPR_ASSERT(fwrite(credential_data.data(), 1, credential_data.size(),
+ file_descriptor) == credential_data.size());
+ GPR_ASSERT(fclose(file_descriptor) == 0);
+ GPR_ASSERT(file_descriptor != nullptr);
+ GPR_ASSERT(name != nullptr);
+ TString name_to_return = name;
+ gpr_free(name);
+ return name_to_return;
+}
+
+PemKeyCertPairList MakeCertKeyPairs(y_absl::string_view private_key,
+ y_absl::string_view certs) {
+ if (private_key.empty() && certs.empty()) {
+ return {};
+ }
+ return PemKeyCertPairList{PemKeyCertPair(private_key, certs)};
+}
+
+TString GetFileContents(const char* path) {
+ grpc_slice slice = grpc_empty_slice();
+ GPR_ASSERT(GRPC_LOG_IF_ERROR("load_file", grpc_load_file(path, 0, &slice)));
+ TString credential = TString(StringViewFromSlice(slice));
+ grpc_slice_unref(slice);
+ return credential;
+}
+
+} // namespace testing
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/test/core/util/tls_utils.h b/contrib/libs/grpc/test/core/util/tls_utils.h
new file mode 100644
index 00000000000..e7ace3bf77a
--- /dev/null
+++ b/contrib/libs/grpc/test/core/util/tls_utils.h
@@ -0,0 +1,48 @@
+//
+// 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 "src/core/lib/security/security_connector/ssl_utils.h"
+
+namespace grpc_core {
+
+namespace testing {
+
+class TmpFile {
+ public:
+ // Create a temporary file with |credential_data| written in.
+ explicit TmpFile(y_absl::string_view credential_data);
+
+ ~TmpFile();
+
+ const TString& name() { return name_; }
+
+ // Rewrite |credential_data| to the temporary file, in an atomic way.
+ void RewriteFile(y_absl::string_view credential_data);
+
+ private:
+ TString CreateTmpFileAndWriteData(y_absl::string_view credential_data);
+
+ TString name_;
+};
+
+PemKeyCertPairList MakeCertKeyPairs(y_absl::string_view private_key,
+ y_absl::string_view certs);
+
+TString GetFileContents(const char* path);
+
+} // namespace testing
+
+} // namespace grpc_core
diff --git a/contrib/libs/grpc/test/core/util/tracer_util.cc b/contrib/libs/grpc/test/core/util/tracer_util.cc
index 34a132daa78..dc5a45568cb 100644
--- a/contrib/libs/grpc/test/core/util/tracer_util.cc
+++ b/contrib/libs/grpc/test/core/util/tracer_util.cc
@@ -24,7 +24,7 @@ namespace grpc_core {
namespace testing {
void grpc_tracer_enable_flag(grpc_core::TraceFlag* flag) {
- flag->set_enabled(1);
+ flag->set_enabled(true);
}
} // namespace testing
diff --git a/contrib/libs/grpc/test/cpp/end2end/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/test/cpp/end2end/.yandex_meta/licenses.list.txt
index a07ea0849dd..ef0151141b2 100644
--- a/contrib/libs/grpc/test/cpp/end2end/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/test/cpp/end2end/.yandex_meta/licenses.list.txt
@@ -12,6 +12,20 @@
* limitations under the License.
+====================Apache-2.0====================
+// 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.
+
+
====================COPYRIGHT====================
* Copyright 2015 gRPC authors.
@@ -29,8 +43,16 @@
====================COPYRIGHT====================
+ * Copyright 2020 gRPC authors.
+
+
+====================COPYRIGHT====================
# Copyright 2019 gRPC authors.
====================COPYRIGHT====================
// Copyright 2019 The gRPC Authors
+
+
+====================COPYRIGHT====================
+// Copyright 2021 gRPC authors.
diff --git a/contrib/libs/grpc/test/cpp/end2end/admin_services_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/admin_services_end2end_test.cc
new file mode 100644
index 00000000000..50225f3baf7
--- /dev/null
+++ b/contrib/libs/grpc/test/cpp/end2end/admin_services_end2end_test.cc
@@ -0,0 +1,107 @@
+//
+//
+// Copyright 2021 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 <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include "y_absl/strings/str_cat.h"
+
+#include <grpcpp/ext/proto_server_reflection_plugin.h>
+#include <grpcpp/grpcpp.h>
+
+#include "src/proto/grpc/reflection/v1alpha/reflection.grpc.pb.h"
+#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
+
+#ifndef DISABLED_XDS_PROTO_IN_CC
+#include <grpcpp/ext/admin_services.h>
+
+namespace grpc {
+namespace testing {
+
+class AdminServicesTest : public ::testing::Test {
+ public:
+ void SetUp() override {
+ TString address =
+ y_absl::StrCat("localhost:", grpc_pick_unused_port_or_die());
+ // Create admin server
+ grpc::reflection::InitProtoReflectionServerBuilderPlugin();
+ ServerBuilder builder;
+ builder.AddListeningPort(address, InsecureServerCredentials());
+ ::grpc::AddAdminServices(&builder);
+ server_ = builder.BuildAndStart();
+ // Create channel
+ auto reflection_stub = reflection::v1alpha::ServerReflection::NewStub(
+ CreateChannel(address, InsecureChannelCredentials()));
+ stream_ = reflection_stub->ServerReflectionInfo(&reflection_ctx_);
+ }
+
+ std::vector<TString> GetServiceList() {
+ std::vector<TString> services;
+ reflection::v1alpha::ServerReflectionRequest request;
+ reflection::v1alpha::ServerReflectionResponse response;
+ request.set_list_services("");
+ stream_->Write(request);
+ stream_->Read(&response);
+ for (auto& service : response.list_services_response().service()) {
+ services.push_back(service.name());
+ }
+ return services;
+ }
+
+ private:
+ std::unique_ptr<Server> server_;
+ ClientContext reflection_ctx_;
+ std::shared_ptr<
+ ClientReaderWriter<reflection::v1alpha::ServerReflectionRequest,
+ reflection::v1alpha::ServerReflectionResponse>>
+ stream_;
+};
+
+#ifndef GRPC_NO_XDS
+// The ifndef conflicts with TEST_F and EXPECT_THAT macros, so we better isolate
+// the condition at test case level.
+TEST_F(AdminServicesTest, XdsEnabled) {
+ EXPECT_THAT(GetServiceList(),
+ ::testing::UnorderedElementsAre(
+ "envoy.service.status.v3.ClientStatusDiscoveryService",
+ "grpc.channelz.v1.Channelz",
+ "grpc.reflection.v1alpha.ServerReflection"));
+}
+#endif // GRPC_NO_XDS
+
+#ifdef GRPC_NO_XDS
+TEST_F(AdminServicesTest, XdsDisabled) {
+ EXPECT_THAT(GetServiceList(),
+ ::testing::UnorderedElementsAre(
+ "grpc.channelz.v1.Channelz",
+ "grpc.reflection.v1alpha.ServerReflection"));
+}
+#endif // GRPC_NO_XDS
+
+} // namespace testing
+} // namespace grpc
+
+#endif // DISABLED_XDS_PROTO_IN_CC
+
+int main(int argc, char** argv) {
+ grpc::testing::TestEnvironment env(argc, argv);
+ ::testing::InitGoogleTest(&argc, argv);
+ int ret = RUN_ALL_TESTS();
+ return ret;
+}
diff --git a/contrib/libs/grpc/test/cpp/end2end/async_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/async_end2end_test.cc
index 45df8718f97..30f6d100924 100644
--- a/contrib/libs/grpc/test/cpp/end2end/async_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/async_end2end_test.cc
@@ -32,6 +32,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/core/ext/filters/client_channel/backup_poller.h"
#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/port.h"
@@ -51,7 +53,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using grpc::testing::kTlsCredentialsType;
using std::chrono::system_clock;
namespace grpc {
@@ -59,7 +60,7 @@ namespace testing {
namespace {
-void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+void* tag(int t) { return reinterpret_cast<void*>(t); }
int detag(void* p) { return static_cast<int>(reinterpret_cast<intptr_t>(p)); }
class Verifier {
@@ -271,8 +272,8 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> {
void* ignored_tag;
bool ignored_ok;
cq_->Shutdown();
- while (cq_->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq_->Next(&ignored_tag, &ignored_ok)) {
+ }
stub_.reset();
grpc_recycle_unused_port(port_);
}
@@ -282,7 +283,8 @@ class AsyncEnd2endTest : public ::testing::TestWithParam<TestScenario> {
auto server_creds = GetCredentialsProvider()->GetServerCredentials(
GetParam().credentials_type);
builder.AddListeningPort(server_address_.str(), server_creds);
- service_.reset(new grpc::testing::EchoTestService::AsyncService());
+ service_ =
+ y_absl::make_unique<grpc::testing::EchoTestService::AsyncService>();
builder.RegisterService(service_.get());
if (GetParam().health_check_service) {
builder.RegisterService(&health_check_);
@@ -426,8 +428,8 @@ TEST_P(AsyncEnd2endTest, ReconnectChannel) {
void* ignored_tag;
bool ignored_ok;
cq_->Shutdown();
- while (cq_->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq_->Next(&ignored_tag, &ignored_ok)) {
+ }
BuildAndStartServer();
// It needs more than GRPC_CLIENT_CHANNEL_BACKUP_POLL_INTERVAL_MS time to
// reconnect the channel.
@@ -1493,9 +1495,9 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest {
EXPECT_EQ(::grpc::StatusCode::CANCELLED, recv_status.error_code());
cli_cq.Shutdown();
- void* dummy_tag;
- bool dummy_ok;
- while (cli_cq.Next(&dummy_tag, &dummy_ok)) {
+ void* phony_tag;
+ bool phony_ok;
+ while (cli_cq.Next(&phony_tag, &phony_ok)) {
}
}
@@ -1642,9 +1644,9 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest {
EXPECT_EQ(::grpc::StatusCode::CANCELLED, recv_status.error_code());
cli_cq.Shutdown();
- void* dummy_tag;
- bool dummy_ok;
- while (cli_cq.Next(&dummy_tag, &dummy_ok)) {
+ void* phony_tag;
+ bool phony_ok;
+ while (cli_cq.Next(&phony_tag, &phony_ok)) {
}
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/cfstream_test.cc b/contrib/libs/grpc/test/cpp/end2end/cfstream_test.cc
index e6695982bd7..2e258d03d48 100644
--- a/contrib/libs/grpc/test/cpp/end2end/cfstream_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/cfstream_test.cc
@@ -42,7 +42,6 @@
#include "src/core/lib/gpr/env.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
-#include "test/core/util/debugger_macros.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
#include "test/cpp/end2end/test_service_impl.h"
@@ -145,18 +144,6 @@ class CFStreamTest : public ::testing::TestWithParam<TestScenario> {
return CreateCustomChannel(server_address.str(), channel_creds, args);
}
- int GetStreamID(ClientContext& context) {
- int stream_id = 0;
- grpc_call* call = context.c_call();
- if (call) {
- grpc_chttp2_stream* stream = grpc_chttp2_stream_from_call(call);
- if (stream) {
- stream_id = stream->id;
- }
- }
- return stream_id;
- }
-
void SendRpc(
const std::unique_ptr<grpc::testing::EchoTestService::Stub>& stub,
bool expect_success = false) {
@@ -166,13 +153,11 @@ class CFStreamTest : public ::testing::TestWithParam<TestScenario> {
request.set_message(msg);
ClientContext context;
Status status = stub->Echo(&context, request, response.get());
- int stream_id = GetStreamID(context);
if (status.ok()) {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d succeeded", stream_id);
+ gpr_log(GPR_DEBUG, "RPC with succeeded");
EXPECT_EQ(msg, response->message());
} else {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d failed: %s", stream_id,
- status.error_message().c_str());
+ gpr_log(GPR_DEBUG, "RPC failed: %s", status.error_message().c_str());
}
if (expect_success) {
EXPECT_TRUE(status.ok());
@@ -205,9 +190,9 @@ class CFStreamTest : public ::testing::TestWithParam<TestScenario> {
} else {
GPR_ASSERT(ret == grpc::CompletionQueue::TIMEOUT);
// This can happen if we hit the Apple CFStream bug which results in the
- // read stream hanging. We are ignoring hangs and timeouts, but these
+ // read stream freezing. We are ignoring hangs and timeouts, but these
// tests are still useful as they can catch memory memory corruptions,
- // crashes and other bugs that don't result in test hang/timeout.
+ // crashes and other bugs that don't result in test freeze/timeout.
return false;
}
}
@@ -392,17 +377,16 @@ TEST_P(CFStreamTest, NetworkFlapRpcsInFlight) {
++total_completions;
GPR_ASSERT(ok);
AsyncClientCall* call = static_cast<AsyncClientCall*>(got_tag);
- int stream_id = GetStreamID(call->context);
if (!call->status.ok()) {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d failed with error: %s",
- stream_id, call->status.error_message().c_str());
+ gpr_log(GPR_DEBUG, "RPC failed with error: %s",
+ call->status.error_message().c_str());
// Bring network up when RPCs start failing
if (network_down) {
NetworkUp();
network_down = false;
}
} else {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d succeeded", stream_id);
+ gpr_log(GPR_DEBUG, "RPC succeeded");
}
delete call;
}
@@ -440,13 +424,12 @@ TEST_P(CFStreamTest, ConcurrentRpc) {
++total_completions;
GPR_ASSERT(ok);
AsyncClientCall* call = static_cast<AsyncClientCall*>(got_tag);
- int stream_id = GetStreamID(call->context);
if (!call->status.ok()) {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d failed with error: %s",
- stream_id, call->status.error_message().c_str());
+ gpr_log(GPR_DEBUG, "RPC failed with error: %s",
+ call->status.error_message().c_str());
// Bring network up when RPCs start failing
} else {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d succeeded", stream_id);
+ gpr_log(GPR_DEBUG, "RPC succeeded");
}
delete call;
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/channelz_service_test.cc b/contrib/libs/grpc/test/cpp/end2end/channelz_service_test.cc
index 9c723bebb62..e076d8cc5d3 100644
--- a/contrib/libs/grpc/test/cpp/end2end/channelz_service_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/channelz_service_test.cc
@@ -19,25 +19,35 @@
#include <grpc/support/port_platform.h>
#include <grpc/grpc.h>
+#include <grpc/grpc_security.h>
#include <grpcpp/channel.h>
#include <grpcpp/client_context.h>
#include <grpcpp/create_channel.h>
+#include <grpcpp/ext/channelz_service_plugin.h>
#include <grpcpp/security/credentials.h>
#include <grpcpp/security/server_credentials.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
-#include <grpcpp/ext/channelz_service_plugin.h>
+#include "y_absl/memory/memory.h"
+
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/iomgr/load_file.h"
+#include "src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h"
+#include "src/core/lib/security/security_connector/ssl_utils.h"
+#include "src/core/lib/slice/slice_utils.h"
+#include "src/cpp/client/secure_credentials.h"
#include "src/proto/grpc/channelz/channelz.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
#include "test/cpp/end2end/test_service_impl.h"
+#include "test/cpp/util/test_credentials_provider.h"
#include <gtest/gtest.h>
+using grpc::channelz::v1::Address;
using grpc::channelz::v1::GetChannelRequest;
using grpc::channelz::v1::GetChannelResponse;
using grpc::channelz::v1::GetServerRequest;
@@ -57,6 +67,14 @@ namespace grpc {
namespace testing {
namespace {
+static bool ValidateAddress(const Address& address) {
+ if (address.address_case() != Address::kTcpipAddress) {
+ return true;
+ }
+ return address.tcpip_address().ip_address().size() == 4 ||
+ address.tcpip_address().ip_address().size() == 16;
+}
+
// Proxy service supports N backends. Sends RPC to backend dictated by
// request->backend_channel_idx().
class Proxy : public ::grpc::testing::EchoTestService::Service {
@@ -100,9 +118,75 @@ class Proxy : public ::grpc::testing::EchoTestService::Service {
std::vector<std::unique_ptr<::grpc::testing::EchoTestService::Stub>> stubs_;
};
-} // namespace
+enum class CredentialsType {
+ kInsecure = 0,
+ kTls = 1,
+ kMtls = 2,
+};
+
+constexpr char kCaCertPath[] = "src/core/tsi/test_creds/ca.pem";
+constexpr char kServerCertPath[] = "src/core/tsi/test_creds/server1.pem";
+constexpr char kServerKeyPath[] = "src/core/tsi/test_creds/server1.key";
+constexpr char kClientCertPath[] = "src/core/tsi/test_creds/client.pem";
+constexpr char kClientKeyPath[] = "src/core/tsi/test_creds/client.key";
+
+TString ReadFile(const char* file_path) {
+ grpc_slice slice;
+ GPR_ASSERT(
+ GRPC_LOG_IF_ERROR("load_file", grpc_load_file(file_path, 0, &slice)));
+ TString file_contents(grpc_core::StringViewFromSlice(slice));
+ grpc_slice_unref(slice);
+ return file_contents;
+}
+
+grpc_core::PemKeyCertPairList ReadTlsIdentityPair(const char* key_path,
+ const char* cert_path) {
+ return grpc_core::PemKeyCertPairList{
+ grpc_core::PemKeyCertPair(ReadFile(key_path), ReadFile(cert_path))};
+}
+
+std::shared_ptr<grpc::ChannelCredentials> GetChannelCredentials(
+ CredentialsType type, ChannelArguments* args) {
+ if (type == CredentialsType::kInsecure) {
+ return InsecureChannelCredentials();
+ }
+ args->SetSslTargetNameOverride("foo.test.google.fr");
+ std::vector<experimental::IdentityKeyCertPair> identity_key_cert_pairs = {
+ {ReadFile(kClientKeyPath), ReadFile(kClientCertPath)}};
+ grpc::experimental::TlsChannelCredentialsOptions options;
+ options.set_certificate_provider(
+ std::make_shared<grpc::experimental::StaticDataCertificateProvider>(
+ ReadFile(kCaCertPath), identity_key_cert_pairs));
+ if (type == CredentialsType::kMtls) {
+ options.watch_identity_key_cert_pairs();
+ }
+ options.watch_root_certs();
+ return grpc::experimental::TlsCredentials(options);
+}
+
+std::shared_ptr<grpc::ServerCredentials> GetServerCredentials(
+ CredentialsType type) {
+ if (type == CredentialsType::kInsecure) {
+ return InsecureServerCredentials();
+ }
+ std::vector<experimental::IdentityKeyCertPair> identity_key_cert_pairs = {
+ {ReadFile(kServerKeyPath), ReadFile(kServerCertPath)}};
+ auto certificate_provider =
+ std::make_shared<grpc::experimental::StaticDataCertificateProvider>(
+ ReadFile(kCaCertPath), identity_key_cert_pairs);
+ grpc::experimental::TlsServerCredentialsOptions options(certificate_provider);
+ options.watch_root_certs();
+ options.watch_identity_key_cert_pairs();
+ options.set_cert_request_type(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY);
+ return grpc::experimental::TlsServerCredentials(options);
+}
+
+TString RemoveWhitespaces(TString input) {
+ input.erase(remove_if(input.begin(), input.end(), isspace), input.end());
+ return input;
+}
-class ChannelzServerTest : public ::testing::Test {
+class ChannelzServerTest : public ::testing::TestWithParam<CredentialsType> {
public:
ChannelzServerTest() {}
static void SetUpTestCase() {
@@ -120,7 +204,7 @@ class ChannelzServerTest : public ::testing::Test {
ServerBuilder proxy_builder;
TString proxy_server_address = "localhost:" + to_string(proxy_port_);
proxy_builder.AddListeningPort(proxy_server_address,
- InsecureServerCredentials());
+ GetServerCredentials(GetParam()));
// forces channelz and channel tracing to be enabled.
proxy_builder.AddChannelArgument(GRPC_ARG_ENABLE_CHANNELZ, 1);
proxy_builder.AddChannelArgument(
@@ -139,8 +223,8 @@ class ChannelzServerTest : public ::testing::Test {
TString backend_server_address =
"localhost:" + to_string(backends_[i].port);
backend_builder.AddListeningPort(backend_server_address,
- InsecureServerCredentials());
- backends_[i].service.reset(new TestServiceImpl);
+ GetServerCredentials(GetParam()));
+ backends_[i].service = y_absl::make_unique<TestServiceImpl>();
// ensure that the backend itself has channelz disabled.
backend_builder.AddChannelArgument(GRPC_ARG_ENABLE_CHANNELZ, 0);
backend_builder.RegisterService(backends_[i].service.get());
@@ -152,7 +236,8 @@ class ChannelzServerTest : public ::testing::Test {
args.SetInt(GRPC_ARG_ENABLE_CHANNELZ, 1);
args.SetInt(GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE, 1024);
std::shared_ptr<Channel> channel_to_backend = ::grpc::CreateCustomChannel(
- backend_server_address, InsecureChannelCredentials(), args);
+ backend_server_address, GetChannelCredentials(GetParam(), &args),
+ args);
proxy_service_.AddChannelToBackend(channel_to_backend);
}
}
@@ -162,8 +247,8 @@ class ChannelzServerTest : public ::testing::Test {
ChannelArguments args;
// disable channelz. We only want to focus on proxy to backend outbound.
args.SetInt(GRPC_ARG_ENABLE_CHANNELZ, 0);
- std::shared_ptr<Channel> channel =
- ::grpc::CreateCustomChannel(target, InsecureChannelCredentials(), args);
+ std::shared_ptr<Channel> channel = ::grpc::CreateCustomChannel(
+ target, GetChannelCredentials(GetParam(), &args), args);
channelz_stub_ = grpc::channelz::v1::Channelz::NewStub(channel);
echo_stub_ = grpc::testing::EchoTestService::NewStub(channel);
}
@@ -175,8 +260,8 @@ class ChannelzServerTest : public ::testing::Test {
args.SetInt(GRPC_ARG_ENABLE_CHANNELZ, 0);
// This ensures that gRPC will not do connection sharing.
args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, true);
- std::shared_ptr<Channel> channel =
- ::grpc::CreateCustomChannel(target, InsecureChannelCredentials(), args);
+ std::shared_ptr<Channel> channel = ::grpc::CreateCustomChannel(
+ target, GetChannelCredentials(GetParam(), &args), args);
return grpc::testing::EchoTestService::NewStub(channel);
}
@@ -258,7 +343,7 @@ class ChannelzServerTest : public ::testing::Test {
std::vector<BackendData> backends_;
};
-TEST_F(ChannelzServerTest, BasicTest) {
+TEST_P(ChannelzServerTest, BasicTest) {
ResetStubs();
ConfigureProxy(1);
GetTopChannelsRequest request;
@@ -270,7 +355,7 @@ TEST_F(ChannelzServerTest, BasicTest) {
EXPECT_EQ(response.channel_size(), 1);
}
-TEST_F(ChannelzServerTest, HighStartId) {
+TEST_P(ChannelzServerTest, HighStartId) {
ResetStubs();
ConfigureProxy(1);
GetTopChannelsRequest request;
@@ -282,7 +367,7 @@ TEST_F(ChannelzServerTest, HighStartId) {
EXPECT_EQ(response.channel_size(), 0);
}
-TEST_F(ChannelzServerTest, SuccessfulRequestTest) {
+TEST_P(ChannelzServerTest, SuccessfulRequestTest) {
ResetStubs();
ConfigureProxy(1);
SendSuccessfulEcho(0);
@@ -297,7 +382,7 @@ TEST_F(ChannelzServerTest, SuccessfulRequestTest) {
EXPECT_EQ(response.channel().data().calls_failed(), 0);
}
-TEST_F(ChannelzServerTest, FailedRequestTest) {
+TEST_P(ChannelzServerTest, FailedRequestTest) {
ResetStubs();
ConfigureProxy(1);
SendFailedEcho(0);
@@ -312,7 +397,7 @@ TEST_F(ChannelzServerTest, FailedRequestTest) {
EXPECT_EQ(response.channel().data().calls_failed(), 1);
}
-TEST_F(ChannelzServerTest, ManyRequestsTest) {
+TEST_P(ChannelzServerTest, ManyRequestsTest) {
ResetStubs();
ConfigureProxy(1);
// send some RPCs
@@ -336,7 +421,7 @@ TEST_F(ChannelzServerTest, ManyRequestsTest) {
EXPECT_EQ(response.channel().data().calls_failed(), kNumFailed);
}
-TEST_F(ChannelzServerTest, ManyChannels) {
+TEST_P(ChannelzServerTest, ManyChannels) {
ResetStubs();
const int kNumChannels = 4;
ConfigureProxy(kNumChannels);
@@ -349,7 +434,7 @@ TEST_F(ChannelzServerTest, ManyChannels) {
EXPECT_EQ(response.channel_size(), kNumChannels);
}
-TEST_F(ChannelzServerTest, ManyRequestsManyChannels) {
+TEST_P(ChannelzServerTest, ManyRequestsManyChannels) {
ResetStubs();
const int kNumChannels = 4;
ConfigureProxy(kNumChannels);
@@ -418,7 +503,7 @@ TEST_F(ChannelzServerTest, ManyRequestsManyChannels) {
}
}
-TEST_F(ChannelzServerTest, ManySubchannels) {
+TEST_P(ChannelzServerTest, ManySubchannels) {
ResetStubs();
const int kNumChannels = 4;
ConfigureProxy(kNumChannels);
@@ -466,7 +551,7 @@ TEST_F(ChannelzServerTest, ManySubchannels) {
}
}
-TEST_F(ChannelzServerTest, BasicServerTest) {
+TEST_P(ChannelzServerTest, BasicServerTest) {
ResetStubs();
ConfigureProxy(1);
GetServersRequest request;
@@ -478,7 +563,7 @@ TEST_F(ChannelzServerTest, BasicServerTest) {
EXPECT_EQ(response.server_size(), 1);
}
-TEST_F(ChannelzServerTest, BasicGetServerTest) {
+TEST_P(ChannelzServerTest, BasicGetServerTest) {
ResetStubs();
ConfigureProxy(1);
GetServersRequest get_servers_request;
@@ -501,7 +586,7 @@ TEST_F(ChannelzServerTest, BasicGetServerTest) {
get_server_response.server().ref().server_id());
}
-TEST_F(ChannelzServerTest, ServerCallTest) {
+TEST_P(ChannelzServerTest, ServerCallTest) {
ResetStubs();
ConfigureProxy(1);
const int kNumSuccess = 10;
@@ -528,7 +613,7 @@ TEST_F(ChannelzServerTest, ServerCallTest) {
kNumSuccess + kNumFailed + 1);
}
-TEST_F(ChannelzServerTest, ManySubchannelsAndSockets) {
+TEST_P(ChannelzServerTest, ManySubchannelsAndSockets) {
ResetStubs();
const int kNumChannels = 4;
ConfigureProxy(kNumChannels);
@@ -594,10 +679,24 @@ TEST_F(ChannelzServerTest, ManySubchannelsAndSockets) {
// calls succeeded == messages received.
EXPECT_EQ(get_subchannel_resp.subchannel().data().calls_succeeded(),
get_socket_resp.socket().data().messages_received());
+ switch (GetParam()) {
+ case CredentialsType::kInsecure:
+ EXPECT_FALSE(get_socket_resp.socket().has_security());
+ break;
+ case CredentialsType::kTls:
+ case CredentialsType::kMtls:
+ EXPECT_TRUE(get_socket_resp.socket().has_security());
+ EXPECT_TRUE(get_socket_resp.socket().security().has_tls());
+ EXPECT_EQ(
+ RemoveWhitespaces(
+ get_socket_resp.socket().security().tls().remote_certificate()),
+ RemoveWhitespaces(ReadFile(kServerCertPath)));
+ break;
+ }
}
}
-TEST_F(ChannelzServerTest, StreamingRPC) {
+TEST_P(ChannelzServerTest, StreamingRPC) {
ResetStubs();
ConfigureProxy(1);
const int kNumMessages = 5;
@@ -645,9 +744,24 @@ TEST_F(ChannelzServerTest, StreamingRPC) {
EXPECT_EQ(get_socket_response.socket().data().messages_sent(), kNumMessages);
EXPECT_EQ(get_socket_response.socket().data().messages_received(),
kNumMessages);
+ switch (GetParam()) {
+ case CredentialsType::kInsecure:
+ EXPECT_FALSE(get_socket_response.socket().has_security());
+ break;
+ case CredentialsType::kTls:
+ case CredentialsType::kMtls:
+ EXPECT_TRUE(get_socket_response.socket().has_security());
+ EXPECT_TRUE(get_socket_response.socket().security().has_tls());
+ EXPECT_EQ(RemoveWhitespaces(get_socket_response.socket()
+ .security()
+ .tls()
+ .remote_certificate()),
+ RemoveWhitespaces(ReadFile(kServerCertPath)));
+ break;
+ }
}
-TEST_F(ChannelzServerTest, GetServerSocketsTest) {
+TEST_P(ChannelzServerTest, GetServerSocketsTest) {
ResetStubs();
ConfigureProxy(1);
GetServersRequest get_server_request;
@@ -670,9 +784,43 @@ TEST_F(ChannelzServerTest, GetServerSocketsTest) {
EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
EXPECT_EQ(get_server_sockets_response.socket_ref_size(), 1);
EXPECT_TRUE(get_server_sockets_response.socket_ref(0).name().find("http"));
+ // Get the socket to verify security information.
+ GetSocketRequest get_socket_request;
+ GetSocketResponse get_socket_response;
+ ClientContext get_socket_context;
+ get_socket_request.set_socket_id(
+ get_server_sockets_response.socket_ref(0).socket_id());
+ s = channelz_stub_->GetSocket(&get_socket_context, get_socket_request,
+ &get_socket_response);
+ EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+ EXPECT_TRUE(ValidateAddress(get_socket_response.socket().remote()));
+ EXPECT_TRUE(ValidateAddress(get_socket_response.socket().local()));
+ switch (GetParam()) {
+ case CredentialsType::kInsecure:
+ EXPECT_FALSE(get_socket_response.socket().has_security());
+ break;
+ case CredentialsType::kTls:
+ case CredentialsType::kMtls:
+ EXPECT_TRUE(get_socket_response.socket().has_security());
+ EXPECT_TRUE(get_socket_response.socket().security().has_tls());
+ if (GetParam() == CredentialsType::kMtls) {
+ EXPECT_EQ(RemoveWhitespaces(get_socket_response.socket()
+ .security()
+ .tls()
+ .remote_certificate()),
+ RemoveWhitespaces(ReadFile(kClientCertPath)));
+ } else {
+ EXPECT_TRUE(get_socket_response.socket()
+ .security()
+ .tls()
+ .remote_certificate()
+ .empty());
+ }
+ break;
+ }
}
-TEST_F(ChannelzServerTest, GetServerSocketsPaginationTest) {
+TEST_P(ChannelzServerTest, GetServerSocketsPaginationTest) {
ResetStubs();
ConfigureProxy(1);
std::vector<std::unique_ptr<grpc::testing::EchoTestService::Stub>> stubs;
@@ -733,7 +881,7 @@ TEST_F(ChannelzServerTest, GetServerSocketsPaginationTest) {
}
}
-TEST_F(ChannelzServerTest, GetServerListenSocketsTest) {
+TEST_P(ChannelzServerTest, GetServerListenSocketsTest) {
ResetStubs();
ConfigureProxy(1);
GetServersRequest get_server_request;
@@ -744,19 +892,41 @@ TEST_F(ChannelzServerTest, GetServerListenSocketsTest) {
&get_server_response);
EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
EXPECT_EQ(get_server_response.server_size(), 1);
- EXPECT_EQ(get_server_response.server(0).listen_socket_size(), 1);
+ // The resolver might return one or two addresses depending on the
+ // configuration, one for ipv4 and one for ipv6.
+ int listen_socket_size = get_server_response.server(0).listen_socket_size();
+ EXPECT_TRUE(listen_socket_size == 1 || listen_socket_size == 2);
GetSocketRequest get_socket_request;
GetSocketResponse get_socket_response;
get_socket_request.set_socket_id(
get_server_response.server(0).listen_socket(0).socket_id());
EXPECT_TRUE(
get_server_response.server(0).listen_socket(0).name().find("http"));
- ClientContext get_socket_context;
- s = channelz_stub_->GetSocket(&get_socket_context, get_socket_request,
+ ClientContext get_socket_context_1;
+ s = channelz_stub_->GetSocket(&get_socket_context_1, get_socket_request,
&get_socket_response);
EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+
+ EXPECT_TRUE(ValidateAddress(get_socket_response.socket().remote()));
+ EXPECT_TRUE(ValidateAddress(get_socket_response.socket().local()));
+ if (listen_socket_size == 2) {
+ get_socket_request.set_socket_id(
+ get_server_response.server(0).listen_socket(1).socket_id());
+ ClientContext get_socket_context_2;
+ EXPECT_TRUE(
+ get_server_response.server(0).listen_socket(1).name().find("http"));
+ s = channelz_stub_->GetSocket(&get_socket_context_2, get_socket_request,
+ &get_socket_response);
+ EXPECT_TRUE(s.ok()) << "s.error_message() = " << s.error_message();
+ }
}
+INSTANTIATE_TEST_SUITE_P(ChannelzServer, ChannelzServerTest,
+ ::testing::ValuesIn(std::vector<CredentialsType>(
+ {CredentialsType::kInsecure, CredentialsType::kTls,
+ CredentialsType::kMtls})));
+
+} // namespace
} // namespace testing
} // namespace grpc
diff --git a/contrib/libs/grpc/test/cpp/end2end/client_callback_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/client_callback_end2end_test.cc
index 12cb40a953c..1d81cdea70c 100644
--- a/contrib/libs/grpc/test/cpp/end2end/client_callback_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/client_callback_end2end_test.cc
@@ -34,6 +34,7 @@
#include <sstream>
#include <thread>
+#include "y_absl/memory/memory.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
@@ -45,17 +46,6 @@
#include "test/cpp/util/string_ref_helper.h"
#include "test/cpp/util/test_credentials_provider.h"
-// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration
-// should be skipped based on a decision made at SetUp time. In particular, any
-// callback tests can only be run if the iomgr can run in the background or if
-// the transport is in-process.
-#define MAYBE_SKIP_TEST \
- do { \
- if (do_not_test_) { \
- return; \
- } \
- } while (0)
-
namespace grpc {
namespace testing {
namespace {
@@ -119,21 +109,16 @@ class ClientCallbackEnd2endTest
std::vector<
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>
creators;
- // Add 20 dummy server interceptors
+ // Add 20 phony server interceptors
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
}
server_ = builder.BuildAndStart();
is_server_started_ = true;
- if (GetParam().protocol == Protocol::TCP &&
- !grpc_iomgr_run_in_background()) {
- do_not_test_ = true;
- }
}
void ResetStub() {
@@ -148,7 +133,7 @@ class ClientCallbackEnd2endTest
} else {
channel_ = CreateCustomChannelWithInterceptors(
server_address_.str(), channel_creds, args,
- CreateDummyClientInterceptors());
+ CreatePhonyClientInterceptors());
}
break;
case Protocol::INPROC:
@@ -156,15 +141,15 @@ class ClientCallbackEnd2endTest
channel_ = server_->InProcessChannel(args);
} else {
channel_ = server_->experimental().InProcessChannelWithInterceptors(
- args, CreateDummyClientInterceptors());
+ args, CreatePhonyClientInterceptors());
}
break;
default:
assert(false);
}
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
- generic_stub_.reset(new GenericStub(channel_));
- DummyInterceptor::Reset();
+ generic_stub_ = y_absl::make_unique<GenericStub>(channel_);
+ PhonyInterceptor::Reset();
}
void TearDown() override {
@@ -256,7 +241,7 @@ class ClientCallbackEnd2endTest
cv.notify_one();
#if GRPC_ALLOW_EXCEPTIONS
if (maybe_except) {
- throw - 1;
+ throw -1;
}
#else
GPR_ASSERT(!maybe_except);
@@ -282,7 +267,7 @@ class ClientCallbackEnd2endTest
: reuses_remaining_(reuses), do_writes_done_(do_writes_done) {
activate_ = [this, test, method_name, test_str] {
if (reuses_remaining_ > 0) {
- cli_ctx_.reset(new ClientContext);
+ cli_ctx_ = y_absl::make_unique<ClientContext>();
reuses_remaining_--;
test->generic_stub_->experimental().PrepareBidiStreamingCall(
cli_ctx_.get(), method_name, this);
@@ -337,7 +322,6 @@ class ClientCallbackEnd2endTest
rpc.Await();
}
}
- bool do_not_test_{false};
bool is_server_started_{false};
int picked_port_{0};
std::shared_ptr<Channel> channel_;
@@ -350,13 +334,11 @@ class ClientCallbackEnd2endTest
};
TEST_P(ClientCallbackEnd2endTest, SimpleRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpcs(1, false);
}
TEST_P(ClientCallbackEnd2endTest, SimpleRpcExpectedError) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
@@ -391,7 +373,6 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcExpectedError) {
}
TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLockNested) {
- MAYBE_SKIP_TEST;
ResetStub();
// The request/response state associated with an RPC and the synchronization
@@ -433,7 +414,7 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLockNested) {
rpc_state[index].done = true;
rpc_state[index].cv.notify_all();
// Call the next level of nesting if possible
- if (index + 1 < rpc_state.size()) {
+ if (index + 1 < int(rpc_state.size())) {
nested_call(index + 1);
}
});
@@ -452,7 +433,6 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLockNested) {
}
TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) {
- MAYBE_SKIP_TEST;
ResetStub();
std::mutex mu;
std::condition_variable cv;
@@ -480,13 +460,11 @@ TEST_P(ClientCallbackEnd2endTest, SimpleRpcUnderLock) {
}
TEST_P(ClientCallbackEnd2endTest, SequentialRpcs) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpcs(10, false);
}
TEST_P(ClientCallbackEnd2endTest, SendClientInitialMetadata) {
- MAYBE_SKIP_TEST;
ResetStub();
SimpleRequest request;
SimpleResponse response;
@@ -513,51 +491,43 @@ TEST_P(ClientCallbackEnd2endTest, SendClientInitialMetadata) {
}
TEST_P(ClientCallbackEnd2endTest, SimpleRpcWithBinaryMetadata) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpcs(1, true);
}
TEST_P(ClientCallbackEnd2endTest, SequentialRpcsWithVariedBinaryMetadataValue) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpcs(10, true);
}
TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcs) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpcsGeneric(10, false);
}
TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcsAsBidi) {
- MAYBE_SKIP_TEST;
ResetStub();
SendGenericEchoAsBidi(10, 1, /*do_writes_done=*/true);
}
TEST_P(ClientCallbackEnd2endTest, SequentialGenericRpcsAsBidiWithReactorReuse) {
- MAYBE_SKIP_TEST;
ResetStub();
SendGenericEchoAsBidi(10, 10, /*do_writes_done=*/true);
}
TEST_P(ClientCallbackEnd2endTest, GenericRpcNoWritesDone) {
- MAYBE_SKIP_TEST;
ResetStub();
SendGenericEchoAsBidi(1, 1, /*do_writes_done=*/false);
}
#if GRPC_ALLOW_EXCEPTIONS
TEST_P(ClientCallbackEnd2endTest, ExceptingRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpcsGeneric(10, true);
}
#endif
TEST_P(ClientCallbackEnd2endTest, MultipleRpcsWithVariedBinaryMetadataValue) {
- MAYBE_SKIP_TEST;
ResetStub();
std::vector<std::thread> threads;
threads.reserve(10);
@@ -570,7 +540,6 @@ TEST_P(ClientCallbackEnd2endTest, MultipleRpcsWithVariedBinaryMetadataValue) {
}
TEST_P(ClientCallbackEnd2endTest, MultipleRpcs) {
- MAYBE_SKIP_TEST;
ResetStub();
std::vector<std::thread> threads;
threads.reserve(10);
@@ -583,7 +552,6 @@ TEST_P(ClientCallbackEnd2endTest, MultipleRpcs) {
}
TEST_P(ClientCallbackEnd2endTest, CancelRpcBeforeStart) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -607,12 +575,11 @@ TEST_P(ClientCallbackEnd2endTest, CancelRpcBeforeStart) {
cv.wait(l);
}
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, RequestEchoServerCancel) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -743,70 +710,64 @@ class WriteClient : public grpc::experimental::ClientWriteReactor<EchoRequest> {
};
TEST_P(ClientCallbackEnd2endTest, RequestStream) {
- MAYBE_SKIP_TEST;
ResetStub();
WriteClient test{stub_.get(), DO_NOT_CANCEL, 3};
test.Await();
// Make sure that the server interceptors were not notified to cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, ClientCancelsRequestStream) {
- MAYBE_SKIP_TEST;
ResetStub();
WriteClient test{stub_.get(), DO_NOT_CANCEL, 3, ClientCancelInfo{2}};
test.Await();
// Make sure that the server interceptors got the cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel before doing reading the request
TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelBeforeReads) {
- MAYBE_SKIP_TEST;
ResetStub();
WriteClient test{stub_.get(), CANCEL_BEFORE_PROCESSING, 1};
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel while reading a request from the stream in parallel
TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelDuringRead) {
- MAYBE_SKIP_TEST;
ResetStub();
WriteClient test{stub_.get(), CANCEL_DURING_PROCESSING, 10};
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel after reading all the requests but before returning to the
// client
TEST_P(ClientCallbackEnd2endTest, RequestStreamServerCancelAfterReads) {
- MAYBE_SKIP_TEST;
ResetStub();
WriteClient test{stub_.get(), CANCEL_AFTER_PROCESSING, 4};
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, UnaryReactor) {
- MAYBE_SKIP_TEST;
ResetStub();
class UnaryClient : public grpc::experimental::ClientUnaryReactor {
public:
- UnaryClient(grpc::testing::EchoTestService::Stub* stub) {
+ explicit UnaryClient(grpc::testing::EchoTestService::Stub* stub) {
cli_ctx_.AddMetadata("key1", "val1");
cli_ctx_.AddMetadata("key2", "val2");
request_.mutable_param()->set_echo_metadata_initially(true);
@@ -856,12 +817,11 @@ TEST_P(ClientCallbackEnd2endTest, UnaryReactor) {
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, GenericUnaryReactor) {
- MAYBE_SKIP_TEST;
ResetStub();
const TString kMethodName("/grpc.testing.EchoTestService/Echo");
class UnaryClient : public grpc::experimental::ClientUnaryReactor {
@@ -922,7 +882,7 @@ TEST_P(ClientCallbackEnd2endTest, GenericUnaryReactor) {
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
@@ -1027,18 +987,16 @@ class ReadClient : public grpc::experimental::ClientReadReactor<EchoResponse> {
};
TEST_P(ClientCallbackEnd2endTest, ResponseStream) {
- MAYBE_SKIP_TEST;
ResetStub();
ReadClient test{stub_.get(), DO_NOT_CANCEL};
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, ClientCancelsResponseStream) {
- MAYBE_SKIP_TEST;
ResetStub();
ReadClient test{stub_.get(), DO_NOT_CANCEL, ClientCancelInfo{2}};
test.Await();
@@ -1048,38 +1006,35 @@ TEST_P(ClientCallbackEnd2endTest, ClientCancelsResponseStream) {
// Server to cancel before sending any response messages
TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelBefore) {
- MAYBE_SKIP_TEST;
ResetStub();
ReadClient test{stub_.get(), CANCEL_BEFORE_PROCESSING};
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel while writing a response to the stream in parallel
TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelDuring) {
- MAYBE_SKIP_TEST;
ResetStub();
ReadClient test{stub_.get(), CANCEL_DURING_PROCESSING};
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel after writing all the respones to the stream but before
// returning to the client
TEST_P(ClientCallbackEnd2endTest, ResponseStreamServerCancelAfter) {
- MAYBE_SKIP_TEST;
ResetStub();
ReadClient test{stub_.get(), CANCEL_AFTER_PROCESSING};
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
@@ -1238,7 +1193,6 @@ class BidiClient
};
TEST_P(ClientCallbackEnd2endTest, BidiStream) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), DO_NOT_CANCEL,
kServerDefaultResponseStreamsToSend,
@@ -1246,12 +1200,11 @@ TEST_P(ClientCallbackEnd2endTest, BidiStream) {
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, BidiStreamFirstWriteAsync) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), DO_NOT_CANCEL,
kServerDefaultResponseStreamsToSend,
@@ -1259,12 +1212,11 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamFirstWriteAsync) {
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, BidiStreamCorked) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), DO_NOT_CANCEL,
kServerDefaultResponseStreamsToSend,
@@ -1272,12 +1224,11 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamCorked) {
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, BidiStreamCorkedFirstWriteAsync) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), DO_NOT_CANCEL,
kServerDefaultResponseStreamsToSend,
@@ -1285,12 +1236,11 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamCorkedFirstWriteAsync) {
test.Await();
// Make sure that the server interceptors were not notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(0, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(0, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, ClientCancelsBidiStream) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), DO_NOT_CANCEL,
kServerDefaultResponseStreamsToSend,
@@ -1299,27 +1249,25 @@ TEST_P(ClientCallbackEnd2endTest, ClientCancelsBidiStream) {
test.Await();
// Make sure that the server interceptors were notified of a cancel
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel before reading/writing any requests/responses on the stream
TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelBefore) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), CANCEL_BEFORE_PROCESSING, /*num_msgs_to_send=*/2,
/*cork_metadata=*/false, /*first_write_async=*/false);
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel while reading/writing requests/responses on the stream in
// parallel
TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelDuring) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), CANCEL_DURING_PROCESSING,
/*num_msgs_to_send=*/10, /*cork_metadata=*/false,
@@ -1327,31 +1275,29 @@ TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelDuring) {
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Server to cancel after reading/writing all requests/responses on the stream
// but before returning to the client
TEST_P(ClientCallbackEnd2endTest, BidiStreamServerCancelAfter) {
- MAYBE_SKIP_TEST;
ResetStub();
BidiClient test(stub_.get(), CANCEL_AFTER_PROCESSING, /*num_msgs_to_send=*/5,
/*cork_metadata=*/false, /*first_write_async=*/false);
test.Await();
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(ClientCallbackEnd2endTest, SimultaneousReadAndWritesDone) {
- MAYBE_SKIP_TEST;
ResetStub();
class Client : public grpc::experimental::ClientBidiReactor<EchoRequest,
EchoResponse> {
public:
- Client(grpc::testing::EchoTestService::Stub* stub) {
+ explicit Client(grpc::testing::EchoTestService::Stub* stub) {
request_.set_message("Hello bidi ");
stub->experimental_async()->BidiStream(&context_, this);
StartWrite(&request_);
@@ -1394,7 +1340,6 @@ TEST_P(ClientCallbackEnd2endTest, SimultaneousReadAndWritesDone) {
}
TEST_P(ClientCallbackEnd2endTest, UnimplementedRpc) {
- MAYBE_SKIP_TEST;
ChannelArguments args;
const auto& channel_creds = GetCredentialsProvider()->GetChannelCredentials(
GetParam().credentials_type, &args);
@@ -1429,12 +1374,12 @@ TEST_P(ClientCallbackEnd2endTest, UnimplementedRpc) {
TEST_P(ClientCallbackEnd2endTest,
ResponseStreamExtraReactionFlowReadsUntilDone) {
- MAYBE_SKIP_TEST;
ResetStub();
class ReadAllIncomingDataClient
: public grpc::experimental::ClientReadReactor<EchoResponse> {
public:
- ReadAllIncomingDataClient(grpc::testing::EchoTestService::Stub* stub) {
+ explicit ReadAllIncomingDataClient(
+ grpc::testing::EchoTestService::Stub* stub) {
request_.set_message("Hello client ");
stub->experimental_async()->ResponseStream(&context_, &request_, this);
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/client_crash_test.cc b/contrib/libs/grpc/test/cpp/end2end/client_crash_test.cc
index 80e18693966..7fd8a224bb3 100644
--- a/contrib/libs/grpc/test/cpp/end2end/client_crash_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/client_crash_test.cc
@@ -26,6 +26,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -36,7 +38,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
static TString g_root;
@@ -54,7 +55,7 @@ class CrashTest : public ::testing::Test {
std::ostringstream addr_stream;
addr_stream << "localhost:" << port;
auto addr = addr_stream.str();
- server_.reset(new SubProcess({
+ server_ = y_absl::make_unique<SubProcess>(std::vector<TString>({
g_root + "/client_crash_test_server",
"--address=" + addr,
}));
diff --git a/contrib/libs/grpc/test/cpp/end2end/client_crash_test_server.cc b/contrib/libs/grpc/test/cpp/end2end/client_crash_test_server.cc
index 2d5be420f24..bf4ae9e0410 100644
--- a/contrib/libs/grpc/test/cpp/end2end/client_crash_test_server.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/client_crash_test_server.cc
@@ -16,31 +16,24 @@
*
*/
-#include <gflags/gflags.h>
-#include <iostream>
-#include <memory>
-#include <util/generic/string.h>
-
#include <grpc/support/log.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include <iostream>
+#include <memory>
+#include <util/generic/string.h>
+
+#include "y_absl/flags/flag.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/cpp/util/test_config.h"
-DEFINE_string(address, "", "Address to bind to");
+Y_ABSL_FLAG(TString, address, "", "Address to bind to");
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-// In some distros, gflags is in the namespace google, and in some others,
-// in gflags. This hack is enabling us to find both.
-namespace google {}
-namespace gflags {}
-using namespace google;
-using namespace gflags;
-
namespace grpc {
namespace testing {
@@ -63,10 +56,12 @@ void RunServer() {
ServiceImpl service;
ServerBuilder builder;
- builder.AddListeningPort(FLAGS_address, grpc::InsecureServerCredentials());
+ builder.AddListeningPort(y_absl::GetFlag(FLAGS_address),
+ grpc::InsecureServerCredentials());
builder.RegisterService(&service);
std::unique_ptr<Server> server(builder.BuildAndStart());
- std::cout << "Server listening on " << FLAGS_address << std::endl;
+ std::cout << "Server listening on " << y_absl::GetFlag(FLAGS_address)
+ << std::endl;
server->Wait();
}
} // namespace testing
diff --git a/contrib/libs/grpc/test/cpp/end2end/client_interceptors_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/client_interceptors_end2end_test.cc
index 956876d9f65..9088d07f652 100644
--- a/contrib/libs/grpc/test/cpp/end2end/client_interceptors_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/client_interceptors_end2end_test.cc
@@ -19,16 +19,21 @@
#include <memory>
#include <vector>
+#include "y_absl/memory/memory.h"
+
#include <grpcpp/channel.h>
#include <grpcpp/client_context.h>
#include <grpcpp/create_channel.h>
+#include <grpcpp/create_channel_posix.h>
#include <grpcpp/generic/generic_stub.h>
#include <grpcpp/impl/codegen/proto_utils.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include <grpcpp/server_posix.h>
#include <grpcpp/support/client_interceptor.h>
+#include "src/core/lib/iomgr/port.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -37,6 +42,11 @@
#include "test/cpp/util/byte_buffer_proto_helper.h"
#include "test/cpp/util/string_ref_helper.h"
+#ifdef GRPC_POSIX_SOCKET
+#include <fcntl.h>
+#include "src/core/lib/iomgr/socket_utils_posix.h"
+#endif /* GRPC_POSIX_SOCKET */
+
#include <gtest/gtest.h>
namespace grpc {
@@ -54,17 +64,22 @@ enum class RPCType {
kAsyncCQBidiStreaming,
};
+enum class ChannelType {
+ kHttpChannel,
+ kFdChannel,
+};
+
/* Hijacks Echo RPC and fills in the expected values */
class HijackingInterceptor : public experimental::Interceptor {
public:
- HijackingInterceptor(experimental::ClientRpcInfo* info) {
+ explicit HijackingInterceptor(experimental::ClientRpcInfo* info) {
info_ = info;
// Make sure it is the right method
EXPECT_EQ(strcmp("/grpc.testing.EchoTestService/Echo", info->method()), 0);
EXPECT_EQ(info->type(), experimental::ClientRpcInfo::Type::UNARY);
}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
bool hijack = false;
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
@@ -155,7 +170,7 @@ class HijackingInterceptor : public experimental::Interceptor {
class HijackingInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* info) override {
return new HijackingInterceptor(info);
}
@@ -163,13 +178,14 @@ class HijackingInterceptorFactory
class HijackingInterceptorMakesAnotherCall : public experimental::Interceptor {
public:
- HijackingInterceptorMakesAnotherCall(experimental::ClientRpcInfo* info) {
+ explicit HijackingInterceptorMakesAnotherCall(
+ experimental::ClientRpcInfo* info) {
info_ = info;
// Make sure it is the right method
EXPECT_EQ(strcmp("/grpc.testing.EchoTestService/Echo", info->method()), 0);
}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
auto* map = methods->GetSendInitialMetadata();
@@ -277,7 +293,7 @@ class HijackingInterceptorMakesAnotherCall : public experimental::Interceptor {
class HijackingInterceptorMakesAnotherCallFactory
: public experimental::ClientInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* info) override {
return new HijackingInterceptorMakesAnotherCall(info);
}
@@ -285,11 +301,12 @@ class HijackingInterceptorMakesAnotherCallFactory
class BidiStreamingRpcHijackingInterceptor : public experimental::Interceptor {
public:
- BidiStreamingRpcHijackingInterceptor(experimental::ClientRpcInfo* info) {
+ explicit BidiStreamingRpcHijackingInterceptor(
+ experimental::ClientRpcInfo* info) {
info_ = info;
}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
bool hijack = false;
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
@@ -355,10 +372,11 @@ class BidiStreamingRpcHijackingInterceptor : public experimental::Interceptor {
class ClientStreamingRpcHijackingInterceptor
: public experimental::Interceptor {
public:
- ClientStreamingRpcHijackingInterceptor(experimental::ClientRpcInfo* info) {
+ explicit ClientStreamingRpcHijackingInterceptor(
+ experimental::ClientRpcInfo* info) {
info_ = info;
}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
bool hijack = false;
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
@@ -400,7 +418,7 @@ bool ClientStreamingRpcHijackingInterceptor::got_failed_send_ = false;
class ClientStreamingRpcHijackingInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* info) override {
return new ClientStreamingRpcHijackingInterceptor(info);
}
@@ -409,12 +427,13 @@ class ClientStreamingRpcHijackingInterceptorFactory
class ServerStreamingRpcHijackingInterceptor
: public experimental::Interceptor {
public:
- ServerStreamingRpcHijackingInterceptor(experimental::ClientRpcInfo* info) {
+ explicit ServerStreamingRpcHijackingInterceptor(
+ experimental::ClientRpcInfo* info) {
info_ = info;
got_failed_message_ = false;
}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
bool hijack = false;
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
@@ -498,7 +517,7 @@ bool ServerStreamingRpcHijackingInterceptor::got_failed_message_ = false;
class ServerStreamingRpcHijackingInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* info) override {
return new ServerStreamingRpcHijackingInterceptor(info);
}
@@ -507,7 +526,7 @@ class ServerStreamingRpcHijackingInterceptorFactory
class BidiStreamingRpcHijackingInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* info) override {
return new BidiStreamingRpcHijackingInterceptor(info);
}
@@ -519,7 +538,7 @@ class BidiStreamingRpcHijackingInterceptorFactory
// single RPC should be made on the channel before calling the Verify methods.
class LoggingInterceptor : public experimental::Interceptor {
public:
- LoggingInterceptor(experimental::ClientRpcInfo* /*info*/) {
+ explicit LoggingInterceptor(experimental::ClientRpcInfo* /*info*/) {
pre_send_initial_metadata_ = false;
pre_send_message_count_ = 0;
pre_send_close_ = false;
@@ -528,7 +547,7 @@ class LoggingInterceptor : public experimental::Interceptor {
post_recv_status_ = false;
}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
auto* map = methods->GetSendInitialMetadata();
@@ -677,7 +696,7 @@ bool LoggingInterceptor::post_recv_status_;
class LoggingInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* info) override {
return new LoggingInterceptor(info);
}
@@ -685,22 +704,35 @@ class LoggingInterceptorFactory
class TestScenario {
public:
- explicit TestScenario(const RPCType& type) : type_(type) {}
+ explicit TestScenario(const ChannelType& channel_type,
+ const RPCType& rpc_type)
+ : channel_type_(channel_type), rpc_type_(rpc_type) {}
+
+ ChannelType channel_type() const { return channel_type_; }
- RPCType type() const { return type_; }
+ RPCType rpc_type() const { return rpc_type_; }
private:
- RPCType type_;
+ const ChannelType channel_type_;
+ const RPCType rpc_type_;
};
std::vector<TestScenario> CreateTestScenarios() {
std::vector<TestScenario> scenarios;
- scenarios.emplace_back(RPCType::kSyncUnary);
- scenarios.emplace_back(RPCType::kSyncClientStreaming);
- scenarios.emplace_back(RPCType::kSyncServerStreaming);
- scenarios.emplace_back(RPCType::kSyncBidiStreaming);
- scenarios.emplace_back(RPCType::kAsyncCQUnary);
- scenarios.emplace_back(RPCType::kAsyncCQServerStreaming);
+ std::vector<RPCType> rpc_types;
+ rpc_types.emplace_back(RPCType::kSyncUnary);
+ rpc_types.emplace_back(RPCType::kSyncClientStreaming);
+ rpc_types.emplace_back(RPCType::kSyncServerStreaming);
+ rpc_types.emplace_back(RPCType::kSyncBidiStreaming);
+ rpc_types.emplace_back(RPCType::kAsyncCQUnary);
+ rpc_types.emplace_back(RPCType::kAsyncCQServerStreaming);
+ for (const auto& rpc_type : rpc_types) {
+ scenarios.emplace_back(ChannelType::kHttpChannel, rpc_type);
+// TODO(yashykt): Maybe add support for non-posix sockets too
+#ifdef GRPC_POSIX_SOCKET
+ scenarios.emplace_back(ChannelType::kFdChannel, rpc_type);
+#endif /* GRPC_POSIX_SOCKET */
+ }
return scenarios;
}
@@ -708,19 +740,56 @@ class ParameterizedClientInterceptorsEnd2endTest
: public ::testing::TestWithParam<TestScenario> {
protected:
ParameterizedClientInterceptorsEnd2endTest() {
- int port = grpc_pick_unused_port_or_die();
-
ServerBuilder builder;
- server_address_ = "localhost:" + ToString(port);
- builder.AddListeningPort(server_address_, InsecureServerCredentials());
builder.RegisterService(&service_);
- server_ = builder.BuildAndStart();
+ if (GetParam().channel_type() == ChannelType::kHttpChannel) {
+ int port = grpc_pick_unused_port_or_die();
+ server_address_ = "localhost:" + ToString(port);
+ builder.AddListeningPort(server_address_, InsecureServerCredentials());
+ server_ = builder.BuildAndStart();
+ }
+#ifdef GRPC_POSIX_SOCKET
+ else if (GetParam().channel_type() == ChannelType::kFdChannel) {
+ int flags;
+ GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv_) == 0);
+ flags = fcntl(sv_[0], F_GETFL, 0);
+ GPR_ASSERT(fcntl(sv_[0], F_SETFL, flags | O_NONBLOCK) == 0);
+ flags = fcntl(sv_[1], F_GETFL, 0);
+ GPR_ASSERT(fcntl(sv_[1], F_SETFL, flags | O_NONBLOCK) == 0);
+ GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv_[0]) ==
+ GRPC_ERROR_NONE);
+ GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv_[1]) ==
+ GRPC_ERROR_NONE);
+ server_ = builder.BuildAndStart();
+ AddInsecureChannelFromFd(server_.get(), sv_[1]);
+ }
+#endif /* GRPC_POSIX_SOCKET */
+ }
+
+ ~ParameterizedClientInterceptorsEnd2endTest() override {
+ server_->Shutdown();
}
- ~ParameterizedClientInterceptorsEnd2endTest() { server_->Shutdown(); }
+ std::shared_ptr<grpc::Channel> CreateClientChannel(
+ std::vector<std::unique_ptr<
+ grpc::experimental::ClientInterceptorFactoryInterface>>
+ creators) {
+ if (GetParam().channel_type() == ChannelType::kHttpChannel) {
+ return experimental::CreateCustomChannelWithInterceptors(
+ server_address_, InsecureChannelCredentials(), ChannelArguments(),
+ std::move(creators));
+ }
+#ifdef GRPC_POSIX_SOCKET
+ else if (GetParam().channel_type() == ChannelType::kFdChannel) {
+ return experimental::CreateCustomInsecureChannelWithInterceptorsFromFd(
+ "", sv_[0], ChannelArguments(), std::move(creators));
+ }
+#endif /* GRPC_POSIX_SOCKET */
+ return nullptr;
+ }
void SendRPC(const std::shared_ptr<Channel>& channel) {
- switch (GetParam().type()) {
+ switch (GetParam().rpc_type()) {
case RPCType::kSyncUnary:
MakeCall(channel);
break;
@@ -749,6 +818,7 @@ class ParameterizedClientInterceptorsEnd2endTest
}
TString server_address_;
+ int sv_[2];
EchoTestServiceStreamingImpl service_;
std::unique_ptr<Server> server_;
};
@@ -756,22 +826,19 @@ class ParameterizedClientInterceptorsEnd2endTest
TEST_P(ParameterizedClientInterceptorsEnd2endTest,
ClientInterceptorLoggingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- // Add 20 dummy interceptors
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ // Add 20 phony interceptors
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
- auto channel = experimental::CreateCustomChannelWithInterceptors(
- server_address_, InsecureChannelCredentials(), args, std::move(creators));
+ auto channel = CreateClientChannel(std::move(creators));
SendRPC(channel);
- LoggingInterceptor::VerifyCall(GetParam().type());
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ LoggingInterceptor::VerifyCall(GetParam().rpc_type());
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
INSTANTIATE_TEST_SUITE_P(ParameterizedClientInterceptorsEnd2end,
@@ -791,7 +858,7 @@ class ClientInterceptorsEnd2endTest
server_ = builder.BuildAndStart();
}
- ~ClientInterceptorsEnd2endTest() { server_->Shutdown(); }
+ ~ClientInterceptorsEnd2endTest() override { server_->Shutdown(); }
TString server_address_;
TestServiceImpl service_;
@@ -803,8 +870,7 @@ TEST_F(ClientInterceptorsEnd2endTest,
ChannelArguments args;
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<HijackingInterceptorFactory>(
- new HijackingInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<HijackingInterceptorFactory>());
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, nullptr, args, std::move(creators));
MakeCall(channel);
@@ -812,37 +878,32 @@ TEST_F(ClientInterceptorsEnd2endTest,
TEST_F(ClientInterceptorsEnd2endTest, ClientInterceptorHijackingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- // Add 20 dummy interceptors before hijacking interceptor
+ // Add 20 phony interceptors before hijacking interceptor
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
- creators.push_back(std::unique_ptr<HijackingInterceptorFactory>(
- new HijackingInterceptorFactory()));
- // Add 20 dummy interceptors after hijacking interceptor
+ creators.push_back(y_absl::make_unique<HijackingInterceptorFactory>());
+ // Add 20 phony interceptors after hijacking interceptor
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeCall(channel);
- // Make sure only 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure only 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
TEST_F(ClientInterceptorsEnd2endTest, ClientInterceptorLogThenHijackTest) {
ChannelArguments args;
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- creators.push_back(std::unique_ptr<HijackingInterceptorFactory>(
- new HijackingInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ creators.push_back(y_absl::make_unique<HijackingInterceptorFactory>());
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeCall(channel);
@@ -852,22 +913,20 @@ TEST_F(ClientInterceptorsEnd2endTest, ClientInterceptorLogThenHijackTest) {
TEST_F(ClientInterceptorsEnd2endTest,
ClientInterceptorHijackingMakesAnotherCallTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- // Add 5 dummy interceptors before hijacking interceptor
+ // Add 5 phony interceptors before hijacking interceptor
creators.reserve(5);
for (auto i = 0; i < 5; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
creators.push_back(
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>(
new HijackingInterceptorMakesAnotherCallFactory()));
- // Add 7 dummy interceptors after hijacking interceptor
+ // Add 7 phony interceptors after hijacking interceptor
for (auto i = 0; i < 7; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = server_->experimental().InProcessChannelWithInterceptors(
args, std::move(creators));
@@ -875,7 +934,7 @@ TEST_F(ClientInterceptorsEnd2endTest,
MakeCall(channel);
// Make sure all interceptors were run once, since the hijacking interceptor
// makes an RPC on the intercepted channel
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 12);
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 12);
}
class ClientInterceptorsCallbackEnd2endTest : public ::testing::Test {
@@ -890,7 +949,7 @@ class ClientInterceptorsCallbackEnd2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- ~ClientInterceptorsCallbackEnd2endTest() { server_->Shutdown(); }
+ ~ClientInterceptorsCallbackEnd2endTest() override { server_->Shutdown(); }
TString server_address_;
TestServiceImpl service_;
@@ -900,45 +959,40 @@ class ClientInterceptorsCallbackEnd2endTest : public ::testing::Test {
TEST_F(ClientInterceptorsCallbackEnd2endTest,
ClientInterceptorLoggingTestWithCallback) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- // Add 20 dummy interceptors
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ // Add 20 phony interceptors
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = server_->experimental().InProcessChannelWithInterceptors(
args, std::move(creators));
MakeCallbackCall(channel);
LoggingInterceptor::VerifyUnaryCall();
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
TEST_F(ClientInterceptorsCallbackEnd2endTest,
ClientInterceptorFactoryAllowsNullptrReturn) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- // Add 20 dummy interceptors and 20 null interceptors
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ // Add 20 phony interceptors and 20 null interceptors
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
- creators.push_back(
- std::unique_ptr<NullInterceptorFactory>(new NullInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
+ creators.push_back(y_absl::make_unique<NullInterceptorFactory>());
}
auto channel = server_->experimental().InProcessChannelWithInterceptors(
args, std::move(creators));
MakeCallbackCall(channel);
LoggingInterceptor::VerifyUnaryCall();
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
class ClientInterceptorsStreamingEnd2endTest : public ::testing::Test {
@@ -953,7 +1007,7 @@ class ClientInterceptorsStreamingEnd2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- ~ClientInterceptorsStreamingEnd2endTest() { server_->Shutdown(); }
+ ~ClientInterceptorsStreamingEnd2endTest() override { server_->Shutdown(); }
TString server_address_;
EchoTestServiceStreamingImpl service_;
@@ -962,42 +1016,38 @@ class ClientInterceptorsStreamingEnd2endTest : public ::testing::Test {
TEST_F(ClientInterceptorsStreamingEnd2endTest, ClientStreamingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- // Add 20 dummy interceptors
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ // Add 20 phony interceptors
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeClientStreamingCall(channel);
LoggingInterceptor::VerifyClientStreamingCall();
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
TEST_F(ClientInterceptorsStreamingEnd2endTest, ServerStreamingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- // Add 20 dummy interceptors
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ // Add 20 phony interceptors
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeServerStreamingCall(channel);
LoggingInterceptor::VerifyServerStreamingCall();
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
TEST_F(ClientInterceptorsStreamingEnd2endTest, ClientStreamingHijackingTest) {
@@ -1005,8 +1055,7 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest, ClientStreamingHijackingTest) {
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
creators.push_back(
- std::unique_ptr<ClientStreamingRpcHijackingInterceptorFactory>(
- new ClientStreamingRpcHijackingInterceptorFactory()));
+ y_absl::make_unique<ClientStreamingRpcHijackingInterceptorFactory>());
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
@@ -1031,12 +1080,11 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest, ClientStreamingHijackingTest) {
TEST_F(ClientInterceptorsStreamingEnd2endTest, ServerStreamingHijackingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
creators.push_back(
- std::unique_ptr<ServerStreamingRpcHijackingInterceptorFactory>(
- new ServerStreamingRpcHijackingInterceptorFactory()));
+ y_absl::make_unique<ServerStreamingRpcHijackingInterceptorFactory>());
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeServerStreamingCall(channel);
@@ -1046,12 +1094,11 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest, ServerStreamingHijackingTest) {
TEST_F(ClientInterceptorsStreamingEnd2endTest,
AsyncCQServerStreamingHijackingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
creators.push_back(
- std::unique_ptr<ServerStreamingRpcHijackingInterceptorFactory>(
- new ServerStreamingRpcHijackingInterceptorFactory()));
+ y_absl::make_unique<ServerStreamingRpcHijackingInterceptorFactory>());
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeAsyncCQServerStreamingCall(channel);
@@ -1060,12 +1107,11 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest,
TEST_F(ClientInterceptorsStreamingEnd2endTest, BidiStreamingHijackingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
creators.push_back(
- std::unique_ptr<BidiStreamingRpcHijackingInterceptorFactory>(
- new BidiStreamingRpcHijackingInterceptorFactory()));
+ y_absl::make_unique<BidiStreamingRpcHijackingInterceptorFactory>());
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeBidiStreamingCall(channel);
@@ -1073,22 +1119,20 @@ TEST_F(ClientInterceptorsStreamingEnd2endTest, BidiStreamingHijackingTest) {
TEST_F(ClientInterceptorsStreamingEnd2endTest, BidiStreamingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- creators.push_back(std::unique_ptr<LoggingInterceptorFactory>(
- new LoggingInterceptorFactory()));
- // Add 20 dummy interceptors
+ creators.push_back(y_absl::make_unique<LoggingInterceptorFactory>());
+ // Add 20 phony interceptors
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeBidiStreamingCall(channel);
LoggingInterceptor::VerifyBidiStreamingCall();
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
class ClientGlobalInterceptorEnd2endTest : public ::testing::Test {
@@ -1103,34 +1147,33 @@ class ClientGlobalInterceptorEnd2endTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- ~ClientGlobalInterceptorEnd2endTest() { server_->Shutdown(); }
+ ~ClientGlobalInterceptorEnd2endTest() override { server_->Shutdown(); }
TString server_address_;
TestServiceImpl service_;
std::unique_ptr<Server> server_;
};
-TEST_F(ClientGlobalInterceptorEnd2endTest, DummyGlobalInterceptor) {
+TEST_F(ClientGlobalInterceptorEnd2endTest, PhonyGlobalInterceptor) {
// We should ideally be registering a global interceptor only once per
// process, but for the purposes of testing, it should be fine to modify the
// registered global interceptor when there are no ongoing gRPC operations
- DummyInterceptorFactory global_factory;
+ PhonyInterceptorFactory global_factory;
experimental::RegisterGlobalClientInterceptorFactory(&global_factory);
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- // Add 20 dummy interceptors
+ // Add 20 phony interceptors
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeCall(channel);
- // Make sure all 20 dummy interceptors were run with the global interceptor
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 21);
+ // Make sure all 20 phony interceptors were run with the global interceptor
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 21);
experimental::TestOnlyResetGlobalClientInterceptorFactory();
}
@@ -1141,21 +1184,20 @@ TEST_F(ClientGlobalInterceptorEnd2endTest, LoggingGlobalInterceptor) {
LoggingInterceptorFactory global_factory;
experimental::RegisterGlobalClientInterceptorFactory(&global_factory);
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- // Add 20 dummy interceptors
+ // Add 20 phony interceptors
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeCall(channel);
LoggingInterceptor::VerifyUnaryCall();
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
experimental::TestOnlyResetGlobalClientInterceptorFactory();
}
@@ -1166,20 +1208,19 @@ TEST_F(ClientGlobalInterceptorEnd2endTest, HijackingGlobalInterceptor) {
HijackingInterceptorFactory global_factory;
experimental::RegisterGlobalClientInterceptorFactory(&global_factory);
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- // Add 20 dummy interceptors
+ // Add 20 phony interceptors
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
auto channel = experimental::CreateCustomChannelWithInterceptors(
server_address_, InsecureChannelCredentials(), args, std::move(creators));
MakeCall(channel);
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
experimental::TestOnlyResetGlobalClientInterceptorFactory();
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/client_lb_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/client_lb_end2end_test.cc
index fd08dd163d4..990bab043e2 100644
--- a/contrib/libs/grpc/test/cpp/end2end/client_lb_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/client_lb_end2end_test.cc
@@ -24,6 +24,7 @@
#include <util/generic/string.h>
#include <thread>
+#include "y_absl/memory/memory.h"
#include "y_absl/strings/str_cat.h"
#include <grpc/grpc.h>
@@ -58,6 +59,7 @@
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "src/proto/grpc/testing/xds/orca_load_report_for_test.pb.h"
#include "test/core/util/port.h"
+#include "test/core/util/resolve_localhost_ip46.h"
#include "test/core/util/test_config.h"
#include "test/core/util/test_lb_policies.h"
#include "test/cpp/end2end/test_service_impl.h"
@@ -67,7 +69,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
// defined in tcp_client.cc
extern grpc_tcp_client_vtable* grpc_tcp_client_impl;
@@ -152,12 +153,14 @@ class MyTestServiceImpl : public TestServiceImpl {
class FakeResolverResponseGeneratorWrapper {
public:
- FakeResolverResponseGeneratorWrapper()
- : response_generator_(grpc_core::MakeRefCounted<
+ explicit FakeResolverResponseGeneratorWrapper(bool ipv6_only)
+ : ipv6_only_(ipv6_only),
+ response_generator_(grpc_core::MakeRefCounted<
grpc_core::FakeResolverResponseGenerator>()) {}
FakeResolverResponseGeneratorWrapper(
FakeResolverResponseGeneratorWrapper&& other) noexcept {
+ ipv6_only_ = other.ipv6_only_;
response_generator_ = std::move(other.response_generator_);
}
@@ -167,13 +170,15 @@ class FakeResolverResponseGeneratorWrapper {
std::unique_ptr<grpc_core::ServerAddress::AttributeInterface> attribute =
nullptr) {
grpc_core::ExecCtx exec_ctx;
- response_generator_->SetResponse(BuildFakeResults(
- ports, service_config_json, attribute_key, std::move(attribute)));
+ response_generator_->SetResponse(
+ BuildFakeResults(ipv6_only_, ports, service_config_json, attribute_key,
+ std::move(attribute)));
}
void SetNextResolutionUponError(const std::vector<int>& ports) {
grpc_core::ExecCtx exec_ctx;
- response_generator_->SetReresolutionResponse(BuildFakeResults(ports));
+ response_generator_->SetReresolutionResponse(
+ BuildFakeResults(ipv6_only_, ports));
}
void SetFailureOnReresolution() {
@@ -187,17 +192,18 @@ class FakeResolverResponseGeneratorWrapper {
private:
static grpc_core::Resolver::Result BuildFakeResults(
- const std::vector<int>& ports, const char* service_config_json = nullptr,
+ bool ipv6_only, const std::vector<int>& ports,
+ const char* service_config_json = nullptr,
const char* attribute_key = nullptr,
std::unique_ptr<grpc_core::ServerAddress::AttributeInterface> attribute =
nullptr) {
grpc_core::Resolver::Result result;
for (const int& port : ports) {
- TString lb_uri_str = y_absl::StrCat("ipv4:127.0.0.1:", port);
- grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true);
- GPR_ASSERT(lb_uri != nullptr);
+ y_absl::StatusOr<grpc_core::URI> lb_uri = grpc_core::URI::Parse(
+ y_absl::StrCat(ipv6_only ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", port));
+ GPR_ASSERT(lb_uri.ok());
grpc_resolved_address address;
- GPR_ASSERT(grpc_parse_uri(lb_uri, &address));
+ GPR_ASSERT(grpc_parse_uri(*lb_uri, &address));
std::map<const char*,
std::unique_ptr<grpc_core::ServerAddress::AttributeInterface>>
attributes;
@@ -206,7 +212,6 @@ class FakeResolverResponseGeneratorWrapper {
}
result.addresses.emplace_back(address.addr, address.len,
nullptr /* args */, std::move(attributes));
- grpc_uri_destroy(lb_uri);
}
if (service_config_json != nullptr) {
result.service_config = grpc_core::ServiceConfig::Create(
@@ -216,6 +221,7 @@ class FakeResolverResponseGeneratorWrapper {
return result;
}
+ bool ipv6_only_ = false;
grpc_core::RefCountedPtr<grpc_core::FakeResolverResponseGenerator>
response_generator_;
};
@@ -238,7 +244,14 @@ class ClientLbEnd2endTest : public ::testing::Test {
#endif
}
- void SetUp() override { grpc_init(); }
+ void SetUp() override {
+ grpc_init();
+ bool localhost_resolves_to_ipv4 = false;
+ bool localhost_resolves_to_ipv6 = false;
+ grpc_core::LocalhostResolves(&localhost_resolves_to_ipv4,
+ &localhost_resolves_to_ipv6);
+ ipv6_only_ = !localhost_resolves_to_ipv4 && localhost_resolves_to_ipv6;
+ }
void TearDown() override {
for (size_t i = 0; i < servers_.size(); ++i) {
@@ -246,7 +259,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
}
servers_.clear();
creds_.reset();
- grpc_shutdown_blocking();
+ grpc_shutdown();
}
void CreateServers(size_t num_servers,
@@ -278,7 +291,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
}
FakeResolverResponseGeneratorWrapper BuildResolverResponseGenerator() {
- return FakeResolverResponseGeneratorWrapper();
+ return FakeResolverResponseGeneratorWrapper(ipv6_only_);
}
std::unique_ptr<grpc::testing::EchoTestService::Stub> BuildStub(
@@ -290,7 +303,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
const TString& lb_policy_name,
const FakeResolverResponseGeneratorWrapper& response_generator,
ChannelArguments args = ChannelArguments()) {
- if (lb_policy_name.size() > 0) {
+ if (!lb_policy_name.empty()) {
args.SetLoadBalancingPolicyName(lb_policy_name);
} // else, default to pick first
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
@@ -359,9 +372,9 @@ class ClientLbEnd2endTest : public ::testing::Test {
grpc::internal::Mutex mu;
grpc::internal::MutexLock lock(&mu);
grpc::internal::CondVar cond;
- thread_.reset(new std::thread(
- std::bind(&ServerData::Serve, this, server_host, &mu, &cond)));
- cond.WaitUntil(&mu, [this] { return server_ready_; });
+ thread_ = y_absl::make_unique<std::thread>(
+ std::bind(&ServerData::Serve, this, server_host, &mu, &cond));
+ grpc::internal::WaitUntil(&cond, &mu, [this] { return server_ready_; });
server_ready_ = false;
gpr_log(GPR_INFO, "server startup complete");
}
@@ -412,7 +425,8 @@ class ClientLbEnd2endTest : public ::testing::Test {
}
bool WaitForChannelState(
- Channel* channel, std::function<bool(grpc_connectivity_state)> predicate,
+ Channel* channel,
+ const std::function<bool(grpc_connectivity_state)>& predicate,
bool try_to_connect = false, int timeout_seconds = 5) {
const gpr_timespec deadline =
grpc_timeout_seconds_to_deadline(timeout_seconds);
@@ -467,6 +481,7 @@ class ClientLbEnd2endTest : public ::testing::Test {
std::vector<std::unique_ptr<ServerData>> servers_;
const TString kRequestMessage_;
std::shared_ptr<ChannelCredentials> creds_;
+ bool ipv6_only_ = false;
};
TEST_F(ClientLbEnd2endTest, ChannelStateConnectingWhenResolving) {
@@ -1637,14 +1652,17 @@ TEST_F(ClientLbEnd2endTest, ChannelIdleness) {
// The initial channel state should be IDLE.
EXPECT_EQ(channel->GetState(false), GRPC_CHANNEL_IDLE);
// After sending RPC, channel state should be READY.
+ gpr_log(GPR_INFO, "*** SENDING RPC, CHANNEL SHOULD CONNECT ***");
response_generator.SetNextResolution(GetServersPorts());
CheckRpcSendOk(stub, DEBUG_LOCATION);
EXPECT_EQ(channel->GetState(false), GRPC_CHANNEL_READY);
// After a period time not using the channel, the channel state should switch
// to IDLE.
+ gpr_log(GPR_INFO, "*** WAITING FOR CHANNEL TO GO IDLE ***");
gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(1200));
EXPECT_EQ(channel->GetState(false), GRPC_CHANNEL_IDLE);
// Sending a new RPC should awake the IDLE channel.
+ gpr_log(GPR_INFO, "*** SENDING ANOTHER RPC, CHANNEL SHOULD RECONNECT ***");
response_generator.SetNextResolution(GetServersPorts());
CheckRpcSendOk(stub, DEBUG_LOCATION);
EXPECT_EQ(channel->GetState(false), GRPC_CHANNEL_READY);
@@ -1662,7 +1680,7 @@ class ClientLbPickArgsTest : public ClientLbEnd2endTest {
grpc_core::RegisterTestPickArgsLoadBalancingPolicy(SavePickArgs);
}
- static void TearDownTestCase() { grpc_shutdown_blocking(); }
+ static void TearDownTestCase() { grpc_shutdown(); }
const std::vector<grpc_core::PickArgsSeen>& args_seen_list() {
grpc::internal::MutexLock lock(&mu_);
@@ -1728,7 +1746,7 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest {
ReportTrailerIntercepted);
}
- static void TearDownTestCase() { grpc_shutdown_blocking(); }
+ static void TearDownTestCase() { grpc_shutdown(); }
int trailers_intercepted() {
grpc::internal::MutexLock lock(&mu_);
@@ -1754,7 +1772,8 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest {
self->trailers_intercepted_++;
self->trailing_metadata_ = args_seen.metadata;
if (backend_metric_data != nullptr) {
- self->load_report_.reset(new udpa::data::orca::v1::OrcaLoadReport);
+ self->load_report_ =
+ y_absl::make_unique<udpa::data::orca::v1::OrcaLoadReport>();
self->load_report_->set_cpu_utilization(
backend_metric_data->cpu_utilization);
self->load_report_->set_mem_utilization(
@@ -1762,13 +1781,11 @@ class ClientLbInterceptTrailingMetadataTest : public ClientLbEnd2endTest {
self->load_report_->set_rps(backend_metric_data->requests_per_second);
for (const auto& p : backend_metric_data->request_cost) {
TString name = TString(p.first);
- (*self->load_report_->mutable_request_cost())[std::move(name)] =
- p.second;
+ (*self->load_report_->mutable_request_cost())[name] = p.second;
}
for (const auto& p : backend_metric_data->utilization) {
TString name = TString(p.first);
- (*self->load_report_->mutable_utilization())[std::move(name)] =
- p.second;
+ (*self->load_report_->mutable_utilization())[name] = p.second;
}
}
}
@@ -1933,7 +1950,7 @@ class ClientLbAddressTest : public ClientLbEnd2endTest {
grpc_core::RegisterAddressTestLoadBalancingPolicy(SaveAddress);
}
- static void TearDownTestCase() { grpc_shutdown_blocking(); }
+ static void TearDownTestCase() { grpc_shutdown(); }
const std::vector<TString>& addresses_seen() {
grpc::internal::MutexLock lock(&mu_);
@@ -1972,8 +1989,9 @@ TEST_F(ClientLbAddressTest, Basic) {
// Make sure that the attributes wind up on the subchannels.
std::vector<TString> expected;
for (const int port : GetServersPorts()) {
- expected.emplace_back(y_absl::StrCat(
- "127.0.0.1:", port, " args={} attributes={", kAttributeKey, "=foo}"));
+ expected.emplace_back(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", port,
+ " args={} attributes={", kAttributeKey, "=foo}"));
}
EXPECT_EQ(addresses_seen(), expected);
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/context_allocator_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/context_allocator_end2end_test.cc
new file mode 100644
index 00000000000..7e207936788
--- /dev/null
+++ b/contrib/libs/grpc/test/cpp/end2end/context_allocator_end2end_test.cc
@@ -0,0 +1,334 @@
+/*
+ *
+ * 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 <grpc/impl/codegen/log.h>
+#include <grpcpp/channel.h>
+#include <grpcpp/client_context.h>
+#include <grpcpp/create_channel.h>
+#include <grpcpp/server.h>
+#include <grpcpp/server_builder.h>
+#include <grpcpp/server_context.h>
+#include <grpcpp/support/client_callback.h>
+#include <grpcpp/support/message_allocator.h>
+#include <gtest/gtest.h>
+
+#include <algorithm>
+#include <atomic>
+#include <condition_variable>
+#include <functional>
+#include <memory>
+#include <mutex>
+#include <sstream>
+#include <thread>
+
+#include "src/core/lib/iomgr/iomgr.h"
+#include "src/proto/grpc/testing/echo.grpc.pb.h"
+#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
+#include "test/cpp/end2end/test_service_impl.h"
+#include "test/cpp/util/test_credentials_provider.h"
+
+namespace grpc {
+namespace testing {
+namespace {
+
+enum class Protocol { INPROC, TCP };
+
+#ifndef GRPC_CALLBACK_API_NONEXPERIMENTAL
+using experimental::GenericCallbackServerContext;
+#endif
+
+class TestScenario {
+ public:
+ TestScenario(Protocol protocol, const TString& creds_type)
+ : protocol(protocol), credentials_type(creds_type) {}
+ void Log() const;
+ Protocol protocol;
+ const TString credentials_type;
+};
+
+static std::ostream& operator<<(std::ostream& out,
+ const TestScenario& scenario) {
+ return out << "TestScenario{protocol="
+ << (scenario.protocol == Protocol::INPROC ? "INPROC" : "TCP")
+ << "," << scenario.credentials_type << "}";
+}
+
+void TestScenario::Log() const {
+ std::ostringstream out;
+ out << *this;
+ gpr_log(GPR_INFO, "%s", out.str().c_str());
+}
+
+class ContextAllocatorEnd2endTestBase
+ : public ::testing::TestWithParam<TestScenario> {
+ protected:
+ static void SetUpTestCase() { grpc_init(); }
+ static void TearDownTestCase() { grpc_shutdown(); }
+ ContextAllocatorEnd2endTestBase() {}
+
+ ~ContextAllocatorEnd2endTestBase() override = default;
+
+ void SetUp() override { GetParam().Log(); }
+
+ void CreateServer(std::unique_ptr<grpc::ContextAllocator> context_allocator) {
+ ServerBuilder builder;
+
+ auto server_creds = GetCredentialsProvider()->GetServerCredentials(
+ GetParam().credentials_type);
+ if (GetParam().protocol == Protocol::TCP) {
+ picked_port_ = grpc_pick_unused_port_or_die();
+ server_address_ << "localhost:" << picked_port_;
+ builder.AddListeningPort(server_address_.str(), server_creds);
+ }
+ builder.experimental().SetContextAllocator(std::move(context_allocator));
+ builder.RegisterService(&callback_service_);
+
+ server_ = builder.BuildAndStart();
+ }
+
+ void DestroyServer() {
+ if (server_) {
+ server_->Shutdown();
+ server_.reset();
+ }
+ }
+
+ void ResetStub() {
+ ChannelArguments args;
+ auto channel_creds = GetCredentialsProvider()->GetChannelCredentials(
+ GetParam().credentials_type, &args);
+ switch (GetParam().protocol) {
+ case Protocol::TCP:
+ channel_ = ::grpc::CreateCustomChannel(server_address_.str(),
+ channel_creds, args);
+ break;
+ case Protocol::INPROC:
+ channel_ = server_->InProcessChannel(args);
+ break;
+ default:
+ assert(false);
+ }
+ stub_ = EchoTestService::NewStub(channel_);
+ }
+
+ void TearDown() override {
+ DestroyServer();
+ if (picked_port_ > 0) {
+ grpc_recycle_unused_port(picked_port_);
+ }
+ }
+
+ void SendRpcs(int num_rpcs) {
+ TString test_string("");
+ for (int i = 0; i < num_rpcs; i++) {
+ EchoRequest request;
+ EchoResponse response;
+ ClientContext cli_ctx;
+
+ test_string += TString(1024, 'x');
+ request.set_message(test_string);
+ TString val;
+ cli_ctx.set_compression_algorithm(GRPC_COMPRESS_GZIP);
+
+ std::mutex mu;
+ std::condition_variable cv;
+ bool done = false;
+ stub_->experimental_async()->Echo(
+ &cli_ctx, &request, &response,
+ [&request, &response, &done, &mu, &cv, val](Status s) {
+ GPR_ASSERT(s.ok());
+
+ EXPECT_EQ(request.message(), response.message());
+ std::lock_guard<std::mutex> l(mu);
+ done = true;
+ cv.notify_one();
+ });
+ std::unique_lock<std::mutex> l(mu);
+ while (!done) {
+ cv.wait(l);
+ }
+ }
+ }
+
+ int picked_port_{0};
+ std::shared_ptr<Channel> channel_;
+ std::unique_ptr<EchoTestService::Stub> stub_;
+ CallbackTestServiceImpl callback_service_;
+ std::unique_ptr<Server> server_;
+ std::ostringstream server_address_;
+};
+
+class DefaultContextAllocatorTest : public ContextAllocatorEnd2endTestBase {};
+
+TEST_P(DefaultContextAllocatorTest, SimpleRpc) {
+ const int kRpcCount = 10;
+ CreateServer(nullptr);
+ ResetStub();
+ SendRpcs(kRpcCount);
+}
+
+class NullContextAllocatorTest : public ContextAllocatorEnd2endTestBase {
+ public:
+ class NullAllocator : public grpc::ContextAllocator {
+ public:
+ NullAllocator(std::atomic<int>* allocation_count,
+ std::atomic<int>* deallocation_count)
+ : allocation_count_(allocation_count),
+ deallocation_count_(deallocation_count) {}
+ grpc::CallbackServerContext* NewCallbackServerContext() override {
+ allocation_count_->fetch_add(1, std::memory_order_relaxed);
+ return nullptr;
+ }
+
+ GenericCallbackServerContext* NewGenericCallbackServerContext() override {
+ allocation_count_->fetch_add(1, std::memory_order_relaxed);
+ return nullptr;
+ }
+
+ void Release(
+ grpc::CallbackServerContext* /*callback_server_context*/) override {
+ deallocation_count_->fetch_add(1, std::memory_order_relaxed);
+ }
+
+ void Release(
+ GenericCallbackServerContext* /*generic_callback_server_context*/)
+ override {
+ deallocation_count_->fetch_add(1, std::memory_order_relaxed);
+ }
+
+ std::atomic<int>* allocation_count_;
+ std::atomic<int>* deallocation_count_;
+ };
+};
+
+TEST_P(NullContextAllocatorTest, UnaryRpc) {
+ const int kRpcCount = 10;
+ std::atomic<int> allocation_count{0};
+ std::atomic<int> deallocation_count{0};
+ std::unique_ptr<NullAllocator> allocator(
+ new NullAllocator(&allocation_count, &deallocation_count));
+ CreateServer(std::move(allocator));
+ ResetStub();
+ SendRpcs(kRpcCount);
+ // messages_deallocaton_count is updated in Release after server side
+ // OnDone.
+ DestroyServer();
+ EXPECT_EQ(kRpcCount, allocation_count);
+ EXPECT_EQ(kRpcCount, deallocation_count);
+}
+
+class SimpleContextAllocatorTest : public ContextAllocatorEnd2endTestBase {
+ public:
+ class SimpleAllocator : public grpc::ContextAllocator {
+ public:
+ SimpleAllocator(std::atomic<int>* allocation_count,
+ std::atomic<int>* deallocation_count)
+ : allocation_count_(allocation_count),
+ deallocation_count_(deallocation_count) {}
+ grpc::CallbackServerContext* NewCallbackServerContext() override {
+ allocation_count_->fetch_add(1, std::memory_order_relaxed);
+ return new grpc::CallbackServerContext();
+ }
+ GenericCallbackServerContext* NewGenericCallbackServerContext() override {
+ allocation_count_->fetch_add(1, std::memory_order_relaxed);
+ return new GenericCallbackServerContext();
+ }
+
+ void Release(
+ grpc::CallbackServerContext* callback_server_context) override {
+ deallocation_count_->fetch_add(1, std::memory_order_relaxed);
+ delete callback_server_context;
+ }
+
+ void Release(GenericCallbackServerContext* generic_callback_server_context)
+ override {
+ deallocation_count_->fetch_add(1, std::memory_order_relaxed);
+ delete generic_callback_server_context;
+ }
+
+ std::atomic<int>* allocation_count_;
+ std::atomic<int>* deallocation_count_;
+ };
+};
+
+TEST_P(SimpleContextAllocatorTest, UnaryRpc) {
+ const int kRpcCount = 10;
+ std::atomic<int> allocation_count{0};
+ std::atomic<int> deallocation_count{0};
+ std::unique_ptr<SimpleAllocator> allocator(
+ new SimpleAllocator(&allocation_count, &deallocation_count));
+ CreateServer(std::move(allocator));
+ ResetStub();
+ SendRpcs(kRpcCount);
+ // messages_deallocaton_count is updated in Release after server side
+ // OnDone.
+ DestroyServer();
+ EXPECT_EQ(kRpcCount, allocation_count);
+ EXPECT_EQ(kRpcCount, deallocation_count);
+}
+
+std::vector<TestScenario> CreateTestScenarios(bool test_insecure) {
+ std::vector<TestScenario> scenarios;
+ std::vector<TString> credentials_types{
+ GetCredentialsProvider()->GetSecureCredentialsTypeList()};
+ auto insec_ok = [] {
+ // Only allow insecure credentials type when it is registered with the
+ // provider. User may create providers that do not have insecure.
+ return GetCredentialsProvider()->GetChannelCredentials(
+ kInsecureCredentialsType, nullptr) != nullptr;
+ };
+ if (test_insecure && insec_ok()) {
+ credentials_types.push_back(kInsecureCredentialsType);
+ }
+ GPR_ASSERT(!credentials_types.empty());
+
+ Protocol parr[]{Protocol::INPROC, Protocol::TCP};
+ for (Protocol p : parr) {
+ for (const auto& cred : credentials_types) {
+ if (p == Protocol::INPROC &&
+ (cred != kInsecureCredentialsType || !insec_ok())) {
+ continue;
+ }
+ scenarios.emplace_back(p, cred);
+ }
+ }
+ return scenarios;
+}
+
+// TODO(ddyihai): adding client streaming/server streaming/bidi streaming
+// test.
+
+INSTANTIATE_TEST_SUITE_P(DefaultContextAllocatorTest,
+ DefaultContextAllocatorTest,
+ ::testing::ValuesIn(CreateTestScenarios(true)));
+INSTANTIATE_TEST_SUITE_P(NullContextAllocatorTest, NullContextAllocatorTest,
+ ::testing::ValuesIn(CreateTestScenarios(true)));
+INSTANTIATE_TEST_SUITE_P(SimpleContextAllocatorTest, SimpleContextAllocatorTest,
+ ::testing::ValuesIn(CreateTestScenarios(true)));
+
+} // namespace
+} // namespace testing
+} // namespace grpc
+
+int main(int argc, char** argv) {
+ grpc::testing::TestEnvironment env(argc, argv);
+ ::testing::InitGoogleTest(&argc, argv);
+ int ret = RUN_ALL_TESTS();
+ return ret;
+}
diff --git a/contrib/libs/grpc/test/cpp/end2end/delegating_channel_test.cc b/contrib/libs/grpc/test/cpp/end2end/delegating_channel_test.cc
index 5d025ecb943..424ef1979ed 100644
--- a/contrib/libs/grpc/test/cpp/end2end/delegating_channel_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/delegating_channel_test.cc
@@ -45,7 +45,8 @@ namespace {
class TestChannel : public experimental::DelegatingChannel {
public:
- TestChannel(const std::shared_ptr<ChannelInterface>& delegate_channel)
+ explicit TestChannel(
+ const std::shared_ptr<ChannelInterface>& delegate_channel)
: experimental::DelegatingChannel(delegate_channel) {}
// Always returns GRPC_CHANNEL_READY
grpc_connectivity_state GetState(bool /*try_to_connect*/) override {
@@ -64,7 +65,7 @@ class DelegatingChannelTest : public ::testing::Test {
server_ = builder.BuildAndStart();
}
- ~DelegatingChannelTest() { server_->Shutdown(); }
+ ~DelegatingChannelTest() override { server_->Shutdown(); }
TString server_address_;
TestServiceImpl service_;
diff --git a/contrib/libs/grpc/test/cpp/end2end/end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/end2end_test.cc
index ad2ddb7e844..d8c20bd575e 100644
--- a/contrib/libs/grpc/test/cpp/end2end/end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/end2end_test.cc
@@ -37,7 +37,10 @@
#include <mutex>
#include <thread>
+#include "y_absl/memory/memory.h"
+#include "y_absl/strings/match.h"
#include "y_absl/strings/str_format.h"
+
#include "src/core/ext/filters/client_channel/backup_poller.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/iomgr/iomgr.h"
@@ -62,17 +65,6 @@ using grpc::testing::EchoResponse;
using grpc::testing::kTlsCredentialsType;
using std::chrono::system_clock;
-// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration
-// should be skipped based on a decision made at SetUp time. In particular,
-// tests that use the callback server can only be run if the iomgr can run in
-// the background or if the transport is in-process.
-#define MAYBE_SKIP_TEST \
- do { \
- if (do_not_test_) { \
- return; \
- } \
- } while (0)
-
namespace grpc {
namespace testing {
namespace {
@@ -202,7 +194,8 @@ class TestAuthMetadataProcessor : public AuthMetadataProcessor {
public:
static const char kGoodGuy[];
- TestAuthMetadataProcessor(bool is_blocking) : is_blocking_(is_blocking) {}
+ explicit TestAuthMetadataProcessor(bool is_blocking)
+ : is_blocking_(is_blocking) {}
std::shared_ptr<CallCredentials> GetCompatibleClientCreds() {
return grpc::MetadataCredentialsFromPlugin(
@@ -257,7 +250,7 @@ const char TestAuthMetadataProcessor::kIdentityPropName[] = "novel identity";
class Proxy : public ::grpc::testing::EchoTestService::Service {
public:
- Proxy(const std::shared_ptr<Channel>& channel)
+ explicit Proxy(const std::shared_ptr<Channel>& channel)
: stub_(grpc::testing::EchoTestService::NewStub(channel)) {}
Status Echo(ServerContext* server_context, const EchoRequest* request,
@@ -327,14 +320,6 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
GetParam().Log();
}
- void SetUp() override {
- if (GetParam().callback_server && !GetParam().inproc &&
- !grpc_iomgr_run_in_background()) {
- do_not_test_ = true;
- return;
- }
- }
-
void TearDown() override {
if (is_server_started_) {
server_->Shutdown();
@@ -348,7 +333,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
void StartServer(const std::shared_ptr<AuthMetadataProcessor>& processor) {
int port = grpc_pick_unused_port_or_die();
first_picked_port_ = port;
- server_address_ << "127.0.0.1:" << port;
+ server_address_ << "localhost:" << port;
// Setup server
BuildAndStartServer(processor);
}
@@ -373,11 +358,10 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
std::vector<
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>>
creators;
- // Add 20 dummy server interceptors
+ // Add 20 phony server interceptors
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
}
@@ -426,7 +410,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
} else {
channel_ = CreateCustomChannelWithInterceptors(
server_address_.str(), channel_creds, args,
- interceptor_creators.empty() ? CreateDummyClientInterceptors()
+ interceptor_creators.empty() ? CreatePhonyClientInterceptors()
: std::move(interceptor_creators));
}
} else {
@@ -435,7 +419,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
} else {
channel_ = server_->experimental().InProcessChannelWithInterceptors(
args, interceptor_creators.empty()
- ? CreateDummyClientInterceptors()
+ ? CreatePhonyClientInterceptors()
: std::move(interceptor_creators));
}
}
@@ -447,7 +431,7 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
interceptor_creators = {}) {
ResetChannel(std::move(interceptor_creators));
if (GetParam().use_proxy) {
- proxy_service_.reset(new Proxy(channel_));
+ proxy_service_ = y_absl::make_unique<Proxy>(channel_);
int port = grpc_pick_unused_port_or_die();
std::ostringstream proxyaddr;
proxyaddr << "localhost:" << port;
@@ -466,10 +450,9 @@ class End2endTest : public ::testing::TestWithParam<TestScenario> {
}
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
}
- bool do_not_test_{false};
bool is_server_started_;
std::shared_ptr<Channel> channel_;
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
@@ -525,7 +508,6 @@ class End2endServerTryCancelTest : public End2endTest {
// NOTE: Do not call this function with server_try_cancel == DO_NOT_CANCEL.
void TestRequestStreamServerCancel(
ServerTryCancelRequestPhase server_try_cancel, int num_msgs_to_send) {
- MAYBE_SKIP_TEST;
RestartServer(std::shared_ptr<AuthMetadataProcessor>());
ResetStub();
EchoRequest request;
@@ -585,7 +567,7 @@ class End2endServerTryCancelTest : public End2endTest {
EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code());
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
@@ -604,7 +586,6 @@ class End2endServerTryCancelTest : public End2endTest {
// NOTE: Do not call this function with server_try_cancel == DO_NOT_CANCEL.
void TestResponseStreamServerCancel(
ServerTryCancelRequestPhase server_try_cancel) {
- MAYBE_SKIP_TEST;
RestartServer(std::shared_ptr<AuthMetadataProcessor>());
ResetStub();
EchoRequest request;
@@ -667,7 +648,7 @@ class End2endServerTryCancelTest : public End2endTest {
EXPECT_FALSE(s.ok());
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
@@ -686,7 +667,6 @@ class End2endServerTryCancelTest : public End2endTest {
// NOTE: Do not call this function with server_try_cancel == DO_NOT_CANCEL.
void TestBidiStreamServerCancel(ServerTryCancelRequestPhase server_try_cancel,
int num_messages) {
- MAYBE_SKIP_TEST;
RestartServer(std::shared_ptr<AuthMetadataProcessor>());
ResetStub();
EchoRequest request;
@@ -756,13 +736,12 @@ class End2endServerTryCancelTest : public End2endTest {
EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code());
// Make sure that the server interceptors were notified
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
};
TEST_P(End2endServerTryCancelTest, RequestEchoServerCancel) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -825,7 +804,6 @@ TEST_P(End2endServerTryCancelTest, BidiStreamServerCancelAfter) {
}
TEST_P(End2endTest, SimpleRpcWithCustomUserAgentPrefix) {
- MAYBE_SKIP_TEST;
// User-Agent is an HTTP header for HTTP transports only
if (GetParam().inproc) {
return;
@@ -849,7 +827,6 @@ TEST_P(End2endTest, SimpleRpcWithCustomUserAgentPrefix) {
}
TEST_P(End2endTest, MultipleRpcsWithVariedBinaryMetadataValue) {
- MAYBE_SKIP_TEST;
ResetStub();
std::vector<std::thread> threads;
threads.reserve(10);
@@ -862,7 +839,6 @@ TEST_P(End2endTest, MultipleRpcsWithVariedBinaryMetadataValue) {
}
TEST_P(End2endTest, MultipleRpcs) {
- MAYBE_SKIP_TEST;
ResetStub();
std::vector<std::thread> threads;
threads.reserve(10);
@@ -875,7 +851,6 @@ TEST_P(End2endTest, MultipleRpcs) {
}
TEST_P(End2endTest, ManyStubs) {
- MAYBE_SKIP_TEST;
ResetStub();
ChannelTestPeer peer(channel_.get());
int registered_calls_pre = peer.registered_calls();
@@ -888,7 +863,6 @@ TEST_P(End2endTest, ManyStubs) {
}
TEST_P(End2endTest, EmptyBinaryMetadata) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -901,7 +875,6 @@ TEST_P(End2endTest, EmptyBinaryMetadata) {
}
TEST_P(End2endTest, ReconnectChannel) {
- MAYBE_SKIP_TEST;
if (GetParam().inproc) {
return;
}
@@ -929,7 +902,6 @@ TEST_P(End2endTest, ReconnectChannel) {
}
TEST_P(End2endTest, RequestStreamOneRequest) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -946,7 +918,6 @@ TEST_P(End2endTest, RequestStreamOneRequest) {
}
TEST_P(End2endTest, RequestStreamOneRequestWithCoalescingApi) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -962,7 +933,6 @@ TEST_P(End2endTest, RequestStreamOneRequestWithCoalescingApi) {
}
TEST_P(End2endTest, RequestStreamTwoRequests) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -979,7 +949,6 @@ TEST_P(End2endTest, RequestStreamTwoRequests) {
}
TEST_P(End2endTest, RequestStreamTwoRequestsWithWriteThrough) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -996,7 +965,6 @@ TEST_P(End2endTest, RequestStreamTwoRequestsWithWriteThrough) {
}
TEST_P(End2endTest, RequestStreamTwoRequestsWithCoalescingApi) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1013,7 +981,6 @@ TEST_P(End2endTest, RequestStreamTwoRequestsWithCoalescingApi) {
}
TEST_P(End2endTest, ResponseStream) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1032,7 +999,6 @@ TEST_P(End2endTest, ResponseStream) {
}
TEST_P(End2endTest, ResponseStreamWithCoalescingApi) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1054,7 +1020,6 @@ TEST_P(End2endTest, ResponseStreamWithCoalescingApi) {
// This was added to prevent regression from issue:
// https://github.com/grpc/grpc/issues/11546
TEST_P(End2endTest, ResponseStreamWithEverythingCoalesced) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1076,7 +1041,6 @@ TEST_P(End2endTest, ResponseStreamWithEverythingCoalesced) {
}
TEST_P(End2endTest, BidiStream) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1101,7 +1065,6 @@ TEST_P(End2endTest, BidiStream) {
}
TEST_P(End2endTest, BidiStreamWithCoalescingApi) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1137,7 +1100,6 @@ TEST_P(End2endTest, BidiStreamWithCoalescingApi) {
// This was added to prevent regression from issue:
// https://github.com/grpc/grpc/issues/11546
TEST_P(End2endTest, BidiStreamWithEverythingCoalesced) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1163,7 +1125,6 @@ TEST_P(End2endTest, BidiStreamWithEverythingCoalesced) {
// Talk to the two services with the same name but different package names.
// The two stubs are created on the same channel.
TEST_P(End2endTest, DiffPackageServices) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1192,7 +1153,6 @@ void CancelRpc(ClientContext* context, int delay_us, ServiceType* service) {
}
TEST_P(End2endTest, CancelRpcBeforeStart) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1203,12 +1163,11 @@ TEST_P(End2endTest, CancelRpcBeforeStart) {
EXPECT_EQ("", response.message());
EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code());
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(End2endTest, CancelRpcAfterStart) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1239,13 +1198,12 @@ TEST_P(End2endTest, CancelRpcAfterStart) {
EXPECT_EQ("", response.message());
EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code());
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Client cancels request stream after sending two messages
TEST_P(End2endTest, ClientCancelsRequestStream) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1263,13 +1221,12 @@ TEST_P(End2endTest, ClientCancelsRequestStream) {
EXPECT_EQ(response.message(), "");
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Client cancels server stream after sending some messages
TEST_P(End2endTest, ClientCancelsResponseStream) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1299,13 +1256,12 @@ TEST_P(End2endTest, ClientCancelsResponseStream) {
// who won the race.
EXPECT_GE(grpc::StatusCode::CANCELLED, s.error_code());
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
// Client cancels bidi stream after sending some messages
TEST_P(End2endTest, ClientCancelsBidi) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1336,12 +1292,11 @@ TEST_P(End2endTest, ClientCancelsBidi) {
Status s = stream->Finish();
EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code());
if (GetParam().use_interceptors) {
- EXPECT_EQ(20, DummyInterceptor::GetNumTimesCancel());
+ EXPECT_EQ(20, PhonyInterceptor::GetNumTimesCancel());
}
}
TEST_P(End2endTest, RpcMaxMessageSize) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1356,7 +1311,7 @@ TEST_P(End2endTest, RpcMaxMessageSize) {
void ReaderThreadFunc(ClientReaderWriter<EchoRequest, EchoResponse>* stream,
gpr_event* ev) {
EchoResponse resp;
- gpr_event_set(ev, (void*)1);
+ gpr_event_set(ev, reinterpret_cast<void*>(1));
while (stream->Read(&resp)) {
gpr_log(GPR_INFO, "Read message");
}
@@ -1364,7 +1319,6 @@ void ReaderThreadFunc(ClientReaderWriter<EchoRequest, EchoResponse>* stream,
// Run a Read and a WritesDone simultaneously.
TEST_P(End2endTest, SimultaneousReadWritesDone) {
- MAYBE_SKIP_TEST;
ResetStub();
ClientContext context;
gpr_event ev;
@@ -1379,7 +1333,6 @@ TEST_P(End2endTest, SimultaneousReadWritesDone) {
}
TEST_P(End2endTest, ChannelState) {
- MAYBE_SKIP_TEST;
if (GetParam().inproc) {
return;
}
@@ -1413,7 +1366,7 @@ TEST_P(End2endTest, ChannelStateTimeout) {
}
int port = grpc_pick_unused_port_or_die();
std::ostringstream server_address;
- server_address << "127.0.0.1:" << port;
+ server_address << "localhost:" << port;
// Channel to non-existing server
auto channel =
grpc::CreateChannel(server_address.str(), InsecureChannelCredentials());
@@ -1430,7 +1383,6 @@ TEST_P(End2endTest, ChannelStateTimeout) {
// Talking to a non-existing service.
TEST_P(End2endTest, NonExistingService) {
- MAYBE_SKIP_TEST;
ResetChannel();
std::unique_ptr<grpc::testing::UnimplementedEchoService::Stub> stub;
stub = grpc::testing::UnimplementedEchoService::NewStub(channel_);
@@ -1448,7 +1400,6 @@ TEST_P(End2endTest, NonExistingService) {
// Ask the server to send back a serialized proto in trailer.
// This is an example of setting error details.
TEST_P(End2endTest, BinaryTrailerTest) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1475,7 +1426,6 @@ TEST_P(End2endTest, BinaryTrailerTest) {
}
TEST_P(End2endTest, ExpectErrorTest) {
- MAYBE_SKIP_TEST;
ResetStub();
std::vector<ErrorStatus> expected_status;
@@ -1510,13 +1460,11 @@ TEST_P(End2endTest, ExpectErrorTest) {
EXPECT_EQ(iter->code(), s.error_code());
EXPECT_EQ(iter->error_message(), s.error_message());
EXPECT_EQ(iter->binary_error_details(), s.error_details());
- EXPECT_TRUE(context.debug_error_string().find("created") !=
- TString::npos);
- EXPECT_TRUE(context.debug_error_string().find("file") != TString::npos);
- EXPECT_TRUE(context.debug_error_string().find("line") != TString::npos);
- EXPECT_TRUE(context.debug_error_string().find("status") !=
- TString::npos);
- EXPECT_TRUE(context.debug_error_string().find("13") != TString::npos);
+ EXPECT_TRUE(y_absl::StrContains(context.debug_error_string(), "created"));
+ EXPECT_TRUE(y_absl::StrContains(context.debug_error_string(), "file"));
+ EXPECT_TRUE(y_absl::StrContains(context.debug_error_string(), "line"));
+ EXPECT_TRUE(y_absl::StrContains(context.debug_error_string(), "status"));
+ EXPECT_TRUE(y_absl::StrContains(context.debug_error_string(), "13"));
}
}
@@ -1527,13 +1475,11 @@ class ProxyEnd2endTest : public End2endTest {
};
TEST_P(ProxyEnd2endTest, SimpleRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
SendRpc(stub_.get(), 1, false);
}
TEST_P(ProxyEnd2endTest, SimpleRpcWithEmptyMessages) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1544,7 +1490,6 @@ TEST_P(ProxyEnd2endTest, SimpleRpcWithEmptyMessages) {
}
TEST_P(ProxyEnd2endTest, MultipleRpcs) {
- MAYBE_SKIP_TEST;
ResetStub();
std::vector<std::thread> threads;
threads.reserve(10);
@@ -1558,7 +1503,6 @@ TEST_P(ProxyEnd2endTest, MultipleRpcs) {
// Set a 10us deadline and make sure proper error is returned.
TEST_P(ProxyEnd2endTest, RpcDeadlineExpires) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1584,7 +1528,6 @@ TEST_P(ProxyEnd2endTest, RpcDeadlineExpires) {
// Set a long but finite deadline.
TEST_P(ProxyEnd2endTest, RpcLongDeadline) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1601,7 +1544,6 @@ TEST_P(ProxyEnd2endTest, RpcLongDeadline) {
// Ask server to echo back the deadline it sees.
TEST_P(ProxyEnd2endTest, EchoDeadline) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1627,7 +1569,6 @@ TEST_P(ProxyEnd2endTest, EchoDeadline) {
// Ask server to echo back the deadline it sees. The rpc has no deadline.
TEST_P(ProxyEnd2endTest, EchoDeadlineForNoDeadlineRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1643,7 +1584,6 @@ TEST_P(ProxyEnd2endTest, EchoDeadlineForNoDeadlineRpc) {
}
TEST_P(ProxyEnd2endTest, UnimplementedRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1659,7 +1599,6 @@ TEST_P(ProxyEnd2endTest, UnimplementedRpc) {
// Client cancels rpc after 10ms
TEST_P(ProxyEnd2endTest, ClientCancelsRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1694,7 +1633,6 @@ TEST_P(ProxyEnd2endTest, ClientCancelsRpc) {
// Server cancels rpc after 1ms
TEST_P(ProxyEnd2endTest, ServerCancelsRpc) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1709,7 +1647,6 @@ TEST_P(ProxyEnd2endTest, ServerCancelsRpc) {
// Make the response larger than the flow control window.
TEST_P(ProxyEnd2endTest, HugeResponse) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1727,7 +1664,6 @@ TEST_P(ProxyEnd2endTest, HugeResponse) {
}
TEST_P(ProxyEnd2endTest, Peer) {
- MAYBE_SKIP_TEST;
// Peer is not meaningful for inproc
if (GetParam().inproc) {
return;
@@ -1756,7 +1692,6 @@ class SecureEnd2endTest : public End2endTest {
};
TEST_P(SecureEnd2endTest, SimpleRpcWithHost) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
@@ -1788,7 +1723,6 @@ bool MetadataContains(
}
TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorSuccess) {
- MAYBE_SKIP_TEST;
auto* processor = new TestAuthMetadataProcessor(true);
StartServer(std::shared_ptr<AuthMetadataProcessor>(processor));
ResetStub();
@@ -1814,7 +1748,6 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorSuccess) {
}
TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorFailure) {
- MAYBE_SKIP_TEST;
auto* processor = new TestAuthMetadataProcessor(true);
StartServer(std::shared_ptr<AuthMetadataProcessor>(processor));
ResetStub();
@@ -1830,7 +1763,6 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginAndProcessorFailure) {
}
TEST_P(SecureEnd2endTest, SetPerCallCredentials) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1856,9 +1788,10 @@ TEST_P(SecureEnd2endTest, SetPerCallCredentials) {
class CredentialsInterceptor : public experimental::Interceptor {
public:
- CredentialsInterceptor(experimental::ClientRpcInfo* info) : info_(info) {}
+ explicit CredentialsInterceptor(experimental::ClientRpcInfo* info)
+ : info_(info) {}
- void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
std::shared_ptr<CallCredentials> creds =
@@ -1875,20 +1808,19 @@ class CredentialsInterceptor : public experimental::Interceptor {
class CredentialsInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface {
CredentialsInterceptor* CreateClientInterceptor(
- experimental::ClientRpcInfo* info) {
+ experimental::ClientRpcInfo* info) override {
return new CredentialsInterceptor(info);
}
};
TEST_P(SecureEnd2endTest, CallCredentialsInterception) {
- MAYBE_SKIP_TEST;
if (!GetParam().use_interceptors) {
return;
}
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators;
- interceptor_creators.push_back(std::unique_ptr<CredentialsInterceptorFactory>(
- new CredentialsInterceptorFactory()));
+ interceptor_creators.push_back(
+ y_absl::make_unique<CredentialsInterceptorFactory>());
ResetStub(std::move(interceptor_creators));
EchoRequest request;
EchoResponse response;
@@ -1911,14 +1843,13 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterception) {
}
TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) {
- MAYBE_SKIP_TEST;
if (!GetParam().use_interceptors) {
return;
}
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators;
- interceptor_creators.push_back(std::unique_ptr<CredentialsInterceptorFactory>(
- new CredentialsInterceptorFactory()));
+ interceptor_creators.push_back(
+ y_absl::make_unique<CredentialsInterceptorFactory>());
ResetStub(std::move(interceptor_creators));
EchoRequest request;
EchoResponse response;
@@ -1946,7 +1877,6 @@ TEST_P(SecureEnd2endTest, CallCredentialsInterceptionWithSetCredentials) {
}
TEST_P(SecureEnd2endTest, OverridePerCallCredentials) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -1984,7 +1914,6 @@ TEST_P(SecureEnd2endTest, OverridePerCallCredentials) {
}
TEST_P(SecureEnd2endTest, AuthMetadataPluginKeyFailure) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -2005,7 +1934,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginKeyFailure) {
}
TEST_P(SecureEnd2endTest, AuthMetadataPluginValueFailure) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -2025,7 +1953,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginValueFailure) {
}
TEST_P(SecureEnd2endTest, AuthMetadataPluginWithDeadline) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
request.mutable_param()->set_skip_cancelled_check(true);
@@ -2051,7 +1978,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginWithDeadline) {
}
TEST_P(SecureEnd2endTest, AuthMetadataPluginWithCancel) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
request.mutable_param()->set_skip_cancelled_check(true);
@@ -2080,7 +2006,6 @@ TEST_P(SecureEnd2endTest, AuthMetadataPluginWithCancel) {
}
TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -2104,7 +2029,6 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) {
}
TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) {
- MAYBE_SKIP_TEST;
auto* processor = new TestAuthMetadataProcessor(false);
StartServer(std::shared_ptr<AuthMetadataProcessor>(processor));
ResetStub();
@@ -2133,7 +2057,6 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) {
}
TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorFailure) {
- MAYBE_SKIP_TEST;
auto* processor = new TestAuthMetadataProcessor(false);
StartServer(std::shared_ptr<AuthMetadataProcessor>(processor));
ResetStub();
@@ -2152,7 +2075,6 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorFailure) {
}
TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -2176,7 +2098,6 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) {
}
TEST_P(SecureEnd2endTest, CompositeCallCreds) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -2209,7 +2130,6 @@ TEST_P(SecureEnd2endTest, CompositeCallCreds) {
}
TEST_P(SecureEnd2endTest, ClientAuthContext) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
EchoResponse response;
@@ -2245,7 +2165,7 @@ class ResourceQuotaEnd2endTest : public End2endTest {
ResourceQuotaEnd2endTest()
: server_resource_quota_("server_resource_quota") {}
- virtual void ConfigureServerBuilder(ServerBuilder* builder) override {
+ void ConfigureServerBuilder(ServerBuilder* builder) override {
builder->SetResourceQuota(server_resource_quota_);
}
@@ -2254,7 +2174,6 @@ class ResourceQuotaEnd2endTest : public End2endTest {
};
TEST_P(ResourceQuotaEnd2endTest, SimpleRequest) {
- MAYBE_SKIP_TEST;
ResetStub();
EchoRequest request;
diff --git a/contrib/libs/grpc/test/cpp/end2end/exception_test.cc b/contrib/libs/grpc/test/cpp/end2end/exception_test.cc
index cd29eb8a10b..404abfad376 100644
--- a/contrib/libs/grpc/test/cpp/end2end/exception_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/exception_test.cc
@@ -41,7 +41,7 @@ class ExceptingServiceImpl : public ::grpc::testing::EchoTestService::Service {
public:
Status Echo(ServerContext* /*server_context*/, const EchoRequest* /*request*/,
EchoResponse* /*response*/) override {
- throw - 1;
+ throw -1;
}
Status RequestStream(ServerContext* /*context*/,
ServerReader<EchoRequest>* /*reader*/,
diff --git a/contrib/libs/grpc/test/cpp/end2end/filter_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/filter_end2end_test.cc
index 2f26d0716c7..e0ac3d325ed 100644
--- a/contrib/libs/grpc/test/cpp/end2end/filter_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/filter_end2end_test.cc
@@ -34,6 +34,8 @@
#include <grpcpp/support/config.h>
#include <grpcpp/support/slice.h>
+#include "y_absl/memory/memory.h"
+
#include "src/cpp/common/channel_filter.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -44,13 +46,12 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
namespace grpc {
namespace testing {
namespace {
-void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+void* tag(int i) { return reinterpret_cast<void*>(i); }
void verify_ok(CompletionQueue* cq, int i, bool expect_ok) {
bool ok;
@@ -101,7 +102,7 @@ int GetCallCounterValue() {
class ChannelDataImpl : public ChannelData {
public:
grpc_error* Init(grpc_channel_element* /*elem*/,
- grpc_channel_element_args* /*args*/) {
+ grpc_channel_element_args* /*args*/) override {
IncrementConnectionCounter();
return GRPC_ERROR_NONE;
}
@@ -151,16 +152,16 @@ class FilterEnd2endTest : public ::testing::Test {
bool ignored_ok;
cli_cq_.Shutdown();
srv_cq_->Shutdown();
- while (cli_cq_.Next(&ignored_tag, &ignored_ok))
- ;
- while (srv_cq_->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cli_cq_.Next(&ignored_tag, &ignored_ok)) {
+ }
+ while (srv_cq_->Next(&ignored_tag, &ignored_ok)) {
+ }
}
void ResetStub() {
std::shared_ptr<Channel> channel = grpc::CreateChannel(
server_address_.str(), InsecureChannelCredentials());
- generic_stub_.reset(new GenericStub(channel));
+ generic_stub_ = y_absl::make_unique<GenericStub>(channel);
ResetConnectionCounter();
ResetCallCounter();
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/flaky_network_test.cc b/contrib/libs/grpc/test/cpp/end2end/flaky_network_test.cc
index 3ee75952c03..8570b58a0e7 100644
--- a/contrib/libs/grpc/test/cpp/end2end/flaky_network_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/flaky_network_test.cc
@@ -38,10 +38,11 @@
#include <random>
#include <thread>
+#include "y_absl/memory/memory.h"
+
#include "src/core/lib/backoff/backoff.h"
#include "src/core/lib/gpr/env.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
-#include "test/core/util/debugger_macros.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
#include "test/cpp/end2end/test_service_impl.h"
@@ -180,7 +181,7 @@ class FlakyNetworkTest : public ::testing::TestWithParam<TestScenario> {
// ip6-looopback, but ipv6 support is not enabled by default in docker.
port_ = SERVER_PORT;
- server_.reset(new ServerData(port_, GetParam().credentials_type));
+ server_ = y_absl::make_unique<ServerData>(port_, GetParam().credentials_type);
server_->Start(server_host_);
}
void StopServer() { server_->Shutdown(); }
@@ -193,7 +194,7 @@ class FlakyNetworkTest : public ::testing::TestWithParam<TestScenario> {
std::shared_ptr<Channel> BuildChannel(
const TString& lb_policy_name,
ChannelArguments args = ChannelArguments()) {
- if (lb_policy_name.size() > 0) {
+ if (!lb_policy_name.empty()) {
args.SetLoadBalancingPolicyName(lb_policy_name);
} // else, default to pick first
auto channel_creds = GetCredentialsProvider()->GetChannelCredentials(
@@ -206,7 +207,7 @@ class FlakyNetworkTest : public ::testing::TestWithParam<TestScenario> {
bool SendRpc(
const std::unique_ptr<grpc::testing::EchoTestService::Stub>& stub,
int timeout_ms = 0, bool wait_for_ready = false) {
- auto response = std::unique_ptr<EchoResponse>(new EchoResponse());
+ auto response = y_absl::make_unique<EchoResponse>();
EchoRequest request;
auto& msg = GetParam().message_content;
request.set_message(msg);
@@ -224,19 +225,10 @@ class FlakyNetworkTest : public ::testing::TestWithParam<TestScenario> {
}
Status status = stub->Echo(&context, request, response.get());
auto ok = status.ok();
- int stream_id = 0;
- grpc_call* call = context.c_call();
- if (call) {
- grpc_chttp2_stream* stream = grpc_chttp2_stream_from_call(call);
- if (stream) {
- stream_id = stream->id;
- }
- }
if (ok) {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d succeeded", stream_id);
+ gpr_log(GPR_DEBUG, "RPC succeeded");
} else {
- gpr_log(GPR_DEBUG, "RPC with stream_id %d failed: %s", stream_id,
- status.error_message().c_str());
+ gpr_log(GPR_DEBUG, "RPC failed: %s", status.error_message().c_str());
}
return ok;
}
@@ -257,8 +249,8 @@ class FlakyNetworkTest : public ::testing::TestWithParam<TestScenario> {
std::mutex mu;
std::unique_lock<std::mutex> lock(mu);
std::condition_variable cond;
- thread_.reset(new std::thread(
- std::bind(&ServerData::Serve, this, server_host, &mu, &cond)));
+ thread_ = y_absl::make_unique<std::thread>(
+ std::bind(&ServerData::Serve, this, server_host, &mu, &cond));
cond.wait(lock, [this] { return server_ready_; });
server_ready_ = false;
gpr_log(GPR_INFO, "server startup complete");
diff --git a/contrib/libs/grpc/test/cpp/end2end/generic_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/generic_end2end_test.cc
index 59eec49fb2a..4d9dcbade48 100644
--- a/contrib/libs/grpc/test/cpp/end2end/generic_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/generic_end2end_test.cc
@@ -32,6 +32,8 @@
#include <grpcpp/server_context.h>
#include <grpcpp/support/slice.h>
+#include "y_absl/memory/memory.h"
+
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -41,13 +43,12 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
namespace grpc {
namespace testing {
namespace {
-void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+void* tag(int i) { return reinterpret_cast<void*>(i); }
void verify_ok(CompletionQueue* cq, int i, bool expect_ok) {
bool ok;
@@ -85,10 +86,10 @@ class GenericEnd2endTest : public ::testing::Test {
bool ignored_ok;
cli_cq_.Shutdown();
srv_cq_->Shutdown();
- while (cli_cq_.Next(&ignored_tag, &ignored_ok))
- ;
- while (srv_cq_->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cli_cq_.Next(&ignored_tag, &ignored_ok)) {
+ }
+ while (srv_cq_->Next(&ignored_tag, &ignored_ok)) {
+ }
shut_down_ = true;
}
}
@@ -98,7 +99,7 @@ class GenericEnd2endTest : public ::testing::Test {
std::shared_ptr<Channel> channel = grpc::CreateChannel(
server_address_.str(), InsecureChannelCredentials());
stub_ = grpc::testing::EchoTestService::NewStub(channel);
- generic_stub_.reset(new GenericStub(channel));
+ generic_stub_ = y_absl::make_unique<GenericStub>(channel);
}
void server_ok(int i) { verify_ok(srv_cq_.get(), i, true); }
@@ -285,8 +286,8 @@ TEST_F(GenericEnd2endTest, SequentialUnaryRpcs) {
SerializeToByteBuffer(&send_request);
std::thread request_call([this]() { server_ok(4); });
std::unique_ptr<GenericClientAsyncResponseReader> call =
- generic_stub_->PrepareUnaryCall(&cli_ctx, kMethodName,
- *cli_send_buffer.get(), &cli_cq_);
+ generic_stub_->PrepareUnaryCall(&cli_ctx, kMethodName, *cli_send_buffer,
+ &cli_cq_);
call->StartCall();
ByteBuffer cli_recv_buffer;
call->Finish(&cli_recv_buffer, &recv_status, tag(1));
diff --git a/contrib/libs/grpc/test/cpp/end2end/grpclb_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/grpclb_end2end_test.cc
index 6208dc25354..8cd73aa9a91 100644
--- a/contrib/libs/grpc/test/cpp/end2end/grpclb_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/grpclb_end2end_test.cc
@@ -24,6 +24,7 @@
#include <util/generic/string.h>
#include <thread>
+#include "y_absl/memory/memory.h"
#include "y_absl/strings/str_cat.h"
#include "y_absl/strings/str_format.h"
@@ -53,6 +54,7 @@
#include "src/cpp/server/secure_server_credentials.h"
#include "test/core/util/port.h"
+#include "test/core/util/resolve_localhost_ip46.h"
#include "test/core/util/test_config.h"
#include "test/cpp/end2end/test_service_impl.h"
@@ -184,6 +186,12 @@ TString Ip4ToPackedString(const char* ip_str) {
return TString(reinterpret_cast<const char*>(&ip4), sizeof(ip4));
}
+TString Ip6ToPackedString(const char* ip_str) {
+ struct in6_addr ip6;
+ GPR_ASSERT(inet_pton(AF_INET6, ip_str, &ip6) == 1);
+ return TString(reinterpret_cast<const char*>(&ip6), sizeof(ip6));
+}
+
struct ClientStats {
size_t num_calls_started = 0;
size_t num_calls_finished = 0;
@@ -266,7 +274,8 @@ class BalancerServiceImpl : public BalancerService {
}
{
grpc::internal::MutexLock lock(&mu_);
- serverlist_cond_.WaitUntil(&mu_, [this] { return serverlist_done_; });
+ grpc::internal::WaitUntil(&serverlist_cond_, &mu_,
+ [this] { return serverlist_done_; });
}
if (client_load_reporting_interval_seconds_ > 0) {
@@ -321,35 +330,13 @@ class BalancerServiceImpl : public BalancerService {
gpr_log(GPR_INFO, "LB[%p]: shut down", this);
}
- static LoadBalanceResponse BuildResponseForBackends(
- const std::vector<int>& backend_ports,
- const std::map<TString, size_t>& drop_token_counts) {
- LoadBalanceResponse response;
- for (const auto& drop_token_count : drop_token_counts) {
- for (size_t i = 0; i < drop_token_count.second; ++i) {
- auto* server = response.mutable_server_list()->add_servers();
- server->set_drop(true);
- server->set_load_balance_token(drop_token_count.first);
- }
- }
- for (const int& backend_port : backend_ports) {
- auto* server = response.mutable_server_list()->add_servers();
- server->set_ip_address(Ip4ToPackedString("127.0.0.1"));
- server->set_port(backend_port);
- static int token_count = 0;
- server->set_load_balance_token(
- y_absl::StrFormat("token%03d", ++token_count));
- }
- return response;
- }
-
ClientStats WaitForLoadReport() {
grpc::internal::MutexLock lock(&mu_);
grpc::internal::CondVar cv;
if (load_report_queue_.empty()) {
load_report_cond_ = &cv;
- load_report_cond_->WaitUntil(
- &mu_, [this] { return !load_report_queue_.empty(); });
+ grpc::internal::WaitUntil(load_report_cond_, &mu_,
+ [this] { return !load_report_queue_.empty(); });
load_report_cond_ = nullptr;
}
ClientStats load_report = std::move(load_report_queue_.front());
@@ -361,7 +348,7 @@ class BalancerServiceImpl : public BalancerService {
grpc::internal::MutexLock lock(&mu_);
if (!serverlist_done_) {
serverlist_done_ = true;
- serverlist_cond_.Broadcast();
+ serverlist_cond_.SignalAll();
}
}
@@ -418,6 +405,11 @@ class GrpclbEnd2endTest : public ::testing::Test {
static void TearDownTestCase() { grpc_shutdown(); }
void SetUp() override {
+ bool localhost_resolves_to_ipv4 = false;
+ bool localhost_resolves_to_ipv6 = false;
+ grpc_core::LocalhostResolves(&localhost_resolves_to_ipv4,
+ &localhost_resolves_to_ipv6);
+ ipv6_only_ = !localhost_resolves_to_ipv4 && localhost_resolves_to_ipv6;
response_generator_ =
grpc_core::MakeRefCounted<grpc_core::FakeResolverResponseGenerator>();
// Start the backends.
@@ -546,26 +538,26 @@ class GrpclbEnd2endTest : public ::testing::Test {
TString balancer_name;
};
- static grpc_core::ServerAddressList CreateLbAddressesFromAddressDataList(
+ grpc_core::ServerAddressList CreateLbAddressesFromAddressDataList(
const std::vector<AddressData>& address_data) {
grpc_core::ServerAddressList addresses;
for (const auto& addr : address_data) {
- TString lb_uri_str = y_absl::StrCat("ipv4:127.0.0.1:", addr.port);
- grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true);
- GPR_ASSERT(lb_uri != nullptr);
+ y_absl::StatusOr<grpc_core::URI> lb_uri =
+ grpc_core::URI::Parse(y_absl::StrCat(
+ ipv6_only_ ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", addr.port));
+ GPR_ASSERT(lb_uri.ok());
grpc_resolved_address address;
- GPR_ASSERT(grpc_parse_uri(lb_uri, &address));
+ GPR_ASSERT(grpc_parse_uri(*lb_uri, &address));
grpc_arg arg = grpc_core::CreateAuthorityOverrideChannelArg(
addr.balancer_name.c_str());
grpc_channel_args* args =
grpc_channel_args_copy_and_add(nullptr, &arg, 1);
addresses.emplace_back(address.addr, address.len, args);
- grpc_uri_destroy(lb_uri);
}
return addresses;
}
- static grpc_core::Resolver::Result MakeResolverResult(
+ grpc_core::Resolver::Result MakeResolverResult(
const std::vector<AddressData>& balancer_address_data,
const std::vector<AddressData>& backend_address_data = {},
const char* service_config_json = kDefaultServiceConfig) {
@@ -612,8 +604,8 @@ class GrpclbEnd2endTest : public ::testing::Test {
response_generator_->SetReresolutionResponse(std::move(result));
}
- const std::vector<int> GetBackendPorts(size_t start_index = 0,
- size_t stop_index = 0) const {
+ std::vector<int> GetBackendPorts(size_t start_index = 0,
+ size_t stop_index = 0) const {
if (stop_index == 0) stop_index = backends_.size();
std::vector<int> backend_ports;
for (size_t i = start_index; i < stop_index; ++i) {
@@ -628,6 +620,29 @@ class GrpclbEnd2endTest : public ::testing::Test {
balancers_[i]->service_.add_response(response, delay_ms);
}
+ LoadBalanceResponse BuildResponseForBackends(
+ const std::vector<int>& backend_ports,
+ const std::map<TString, size_t>& drop_token_counts) {
+ LoadBalanceResponse response;
+ for (const auto& drop_token_count : drop_token_counts) {
+ for (size_t i = 0; i < drop_token_count.second; ++i) {
+ auto* server = response.mutable_server_list()->add_servers();
+ server->set_drop(true);
+ server->set_load_balance_token(drop_token_count.first);
+ }
+ }
+ for (const int& backend_port : backend_ports) {
+ auto* server = response.mutable_server_list()->add_servers();
+ server->set_ip_address(ipv6_only_ ? Ip6ToPackedString("::1")
+ : Ip4ToPackedString("127.0.0.1"));
+ server->set_port(backend_port);
+ static int token_count = 0;
+ server->set_load_balance_token(
+ y_absl::StrFormat("token%03d", ++token_count));
+ }
+ return response;
+ }
+
Status SendRpc(EchoResponse* response = nullptr, int timeout_ms = 1000,
bool wait_for_ready = false,
const Status& expected_status = Status::OK) {
@@ -682,8 +697,8 @@ class GrpclbEnd2endTest : public ::testing::Test {
// by ServerThread::Serve from firing before the wait below is hit.
grpc::internal::MutexLock lock(&mu);
grpc::internal::CondVar cond;
- thread_.reset(new std::thread(
- std::bind(&ServerThread::Serve, this, server_host, &mu, &cond)));
+ thread_ = y_absl::make_unique<std::thread>(
+ std::bind(&ServerThread::Serve, this, server_host, &mu, &cond));
cond.Wait(&mu);
gpr_log(GPR_INFO, "%s server startup complete", type_.c_str());
}
@@ -726,6 +741,7 @@ class GrpclbEnd2endTest : public ::testing::Test {
const size_t num_backends_;
const size_t num_balancers_;
const int client_load_reporting_interval_seconds_;
+ bool ipv6_only_ = false;
std::shared_ptr<Channel> channel_;
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
std::vector<std::unique_ptr<ServerThread<BackendServiceImpl>>> backends_;
@@ -745,8 +761,7 @@ TEST_F(SingleBalancerTest, Vanilla) {
SetNextResolutionAllBalancers();
const size_t kNumRpcsPerAddress = 100;
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
// Make sure that trying to connect works without a call.
channel_->GetState(true /* try_to_connect */);
// We need to wait for all backends to come online.
@@ -771,8 +786,7 @@ TEST_F(SingleBalancerTest, Vanilla) {
TEST_F(SingleBalancerTest, ReturnServerStatus) {
SetNextResolutionAllBalancers();
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
// We need to wait for all backends to come online.
WaitForAllBackends();
// Send a request that the backend will fail, and make sure we get
@@ -793,8 +807,7 @@ TEST_F(SingleBalancerTest, SelectGrpclbWithMigrationServiceConfig) {
" ]\n"
"}");
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
CheckRpcSendOk(1, 1000 /* timeout_ms */, true /* wait_for_ready */);
balancers_[0]->service_.NotifyDoneWithServerlists();
// The balancer got a single request.
@@ -841,8 +854,7 @@ TEST_F(SingleBalancerTest, UsePickFirstChildPolicy) {
" ]\n"
"}");
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
const size_t kNumRpcs = num_backends_ * 2;
CheckRpcSendOk(kNumRpcs, 1000 /* timeout_ms */, true /* wait_for_ready */);
balancers_[0]->service_.NotifyDoneWithServerlists();
@@ -872,8 +884,7 @@ TEST_F(SingleBalancerTest, SwapChildPolicy) {
" ]\n"
"}");
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
const size_t kNumRpcs = num_backends_ * 2;
CheckRpcSendOk(kNumRpcs, 1000 /* timeout_ms */, true /* wait_for_ready */);
// Check that all requests went to the first backend. This verifies
@@ -908,8 +919,7 @@ TEST_F(SingleBalancerTest, SameBackendListedMultipleTimes) {
ports.push_back(backends_[0]->port_);
ports.push_back(backends_[0]->port_);
const size_t kNumRpcsPerAddress = 10;
- ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(ports, {}), 0);
+ ScheduleResponseForBalancer(0, BuildResponseForBackends(ports, {}), 0);
// We need to wait for the backend to come online.
WaitForBackend(0);
// Send kNumRpcsPerAddress RPCs per server.
@@ -927,8 +937,7 @@ TEST_F(SingleBalancerTest, SecureNaming) {
SetNextResolution({AddressData{balancers_[0]->port_, "lb"}});
const size_t kNumRpcsPerAddress = 100;
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
// Make sure that trying to connect works without a call.
channel_->GetState(true /* try_to_connect */);
// We need to wait for all backends to come online.
@@ -970,8 +979,7 @@ TEST_F(SingleBalancerTest, InitiallyEmptyServerlist) {
ScheduleResponseForBalancer(0, LoadBalanceResponse(), 0);
// Send non-empty serverlist only after kServerlistDelayMs
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- kServerlistDelayMs);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), kServerlistDelayMs);
const auto t0 = system_clock::now();
// Client will block: LB will initially send empty serverlist.
CheckRpcSendOk(1, kCallDeadlineMs, true /* wait_for_ready */);
@@ -997,8 +1005,7 @@ TEST_F(SingleBalancerTest, AllServersUnreachableFailFast) {
for (size_t i = 0; i < kNumUnreachableServers; ++i) {
ports.push_back(grpc_pick_unused_port_or_die());
}
- ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(ports, {}), 0);
+ ScheduleResponseForBalancer(0, BuildResponseForBackends(ports, {}), 0);
const Status status = SendRpc();
// The error shouldn't be DEADLINE_EXCEEDED.
EXPECT_EQ(StatusCode::UNAVAILABLE, status.error_code());
@@ -1027,7 +1034,7 @@ TEST_F(SingleBalancerTest, Fallback) {
// Send non-empty serverlist only after kServerlistDelayMs.
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
+ BuildResponseForBackends(
GetBackendPorts(kNumBackendsInResolution /* start_index */), {}),
kServerlistDelayMs);
@@ -1096,7 +1103,7 @@ TEST_F(SingleBalancerTest, FallbackUpdate) {
// Send non-empty serverlist only after kServerlistDelayMs.
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
+ BuildResponseForBackends(
GetBackendPorts(kNumBackendsInResolution +
kNumBackendsInResolutionUpdate /* start_index */),
{}),
@@ -1201,10 +1208,9 @@ TEST_F(SingleBalancerTest,
balancer_addresses.emplace_back(AddressData{balancers_[i]->port_, ""});
}
SetNextResolution(balancer_addresses, backend_addresses);
- ScheduleResponseForBalancer(0,
- BalancerServiceImpl::BuildResponseForBackends(
- GetBackendPorts(kNumFallbackBackends), {}),
- 0);
+ ScheduleResponseForBalancer(
+ 0, BuildResponseForBackends(GetBackendPorts(kNumFallbackBackends), {}),
+ 0);
// Try to connect.
channel_->GetState(true /* try_to_connect */);
WaitForAllBackends(1 /* num_requests_multiple_of */,
@@ -1234,10 +1240,9 @@ TEST_F(SingleBalancerTest,
// Now start the balancer again. This should cause us to exit
// fallback mode.
balancers_[0]->Start(server_host_);
- ScheduleResponseForBalancer(0,
- BalancerServiceImpl::BuildResponseForBackends(
- GetBackendPorts(kNumFallbackBackends), {}),
- 0);
+ ScheduleResponseForBalancer(
+ 0, BuildResponseForBackends(GetBackendPorts(kNumFallbackBackends), {}),
+ 0);
WaitForAllBackends(1 /* num_requests_multiple_of */,
kNumFallbackBackends /* start_index */);
}
@@ -1256,10 +1261,9 @@ TEST_F(SingleBalancerTest,
balancer_addresses.emplace_back(AddressData{balancers_[i]->port_, ""});
}
SetNextResolution(balancer_addresses, backend_addresses);
- ScheduleResponseForBalancer(0,
- BalancerServiceImpl::BuildResponseForBackends(
- GetBackendPorts(kNumFallbackBackends), {}),
- 0);
+ ScheduleResponseForBalancer(
+ 0, BuildResponseForBackends(GetBackendPorts(kNumFallbackBackends), {}),
+ 0);
// Try to connect.
channel_->GetState(true /* try_to_connect */);
WaitForAllBackends(1 /* num_requests_multiple_of */,
@@ -1287,10 +1291,9 @@ TEST_F(SingleBalancerTest,
// Now start the balancer again. This should cause us to exit
// fallback mode.
balancers_[0]->Start(server_host_);
- ScheduleResponseForBalancer(0,
- BalancerServiceImpl::BuildResponseForBackends(
- GetBackendPorts(kNumFallbackBackends), {}),
- 0);
+ ScheduleResponseForBalancer(
+ 0, BuildResponseForBackends(GetBackendPorts(kNumFallbackBackends), {}),
+ 0);
WaitForAllBackends(1 /* num_requests_multiple_of */,
kNumFallbackBackends /* start_index */);
}
@@ -1358,7 +1361,7 @@ TEST_F(SingleBalancerTest, FallbackControlledByBalancer_AfterFirstServerlist) {
// then sends the serverlist again.
// The serverlist points to backend 1.
LoadBalanceResponse serverlist_resp =
- BalancerServiceImpl::BuildResponseForBackends({backends_[1]->port_}, {});
+ BuildResponseForBackends({backends_[1]->port_}, {});
LoadBalanceResponse fallback_resp;
fallback_resp.mutable_fallback_response();
ScheduleResponseForBalancer(0, serverlist_resp, 0);
@@ -1375,8 +1378,7 @@ TEST_F(SingleBalancerTest, BackendsRestart) {
SetNextResolutionAllBalancers();
const size_t kNumRpcsPerAddress = 100;
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
// Make sure that trying to connect works without a call.
channel_->GetState(true /* try_to_connect */);
// Send kNumRpcsPerAddress RPCs per server.
@@ -1406,8 +1408,7 @@ TEST_F(SingleBalancerTest, ServiceNameFromLbPolicyConfig) {
SetNextResolutionAllBalancers(kServiceConfigWithTarget);
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
// Make sure that trying to connect works without a call.
channel_->GetState(true /* try_to_connect */);
// We need to wait for all backends to come online.
@@ -1424,10 +1425,10 @@ TEST_F(UpdatesTest, UpdateBalancersButKeepUsingOriginalBalancer) {
SetNextResolutionAllBalancers();
const std::vector<int> first_backend{GetBackendPorts()[0]};
const std::vector<int> second_backend{GetBackendPorts()[1]};
- ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0);
- ScheduleResponseForBalancer(
- 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0);
+ ScheduleResponseForBalancer(0, BuildResponseForBackends(first_backend, {}),
+ 0);
+ ScheduleResponseForBalancer(1, BuildResponseForBackends(second_backend, {}),
+ 0);
// Wait until the first backend is ready.
WaitForBackend(0);
@@ -1482,10 +1483,10 @@ TEST_F(UpdatesTest, UpdateBalancersRepeated) {
const std::vector<int> first_backend{GetBackendPorts()[0]};
const std::vector<int> second_backend{GetBackendPorts()[0]};
- ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0);
- ScheduleResponseForBalancer(
- 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0);
+ ScheduleResponseForBalancer(0, BuildResponseForBackends(first_backend, {}),
+ 0);
+ ScheduleResponseForBalancer(1, BuildResponseForBackends(second_backend, {}),
+ 0);
// Wait until the first backend is ready.
WaitForBackend(0);
@@ -1555,10 +1556,10 @@ TEST_F(UpdatesTest, UpdateBalancersDeadUpdate) {
const std::vector<int> first_backend{GetBackendPorts()[0]};
const std::vector<int> second_backend{GetBackendPorts()[1]};
- ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0);
- ScheduleResponseForBalancer(
- 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0);
+ ScheduleResponseForBalancer(0, BuildResponseForBackends(first_backend, {}),
+ 0);
+ ScheduleResponseForBalancer(1, BuildResponseForBackends(second_backend, {}),
+ 0);
// Start servers and send 10 RPCs per server.
gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH ==========");
@@ -1688,10 +1689,10 @@ class UpdatesWithClientLoadReportingTest : public GrpclbEnd2endTest {
TEST_F(UpdatesWithClientLoadReportingTest, ReresolveDeadBalancer) {
const std::vector<int> first_backend{GetBackendPorts()[0]};
const std::vector<int> second_backend{GetBackendPorts()[1]};
- ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(first_backend, {}), 0);
- ScheduleResponseForBalancer(
- 1, BalancerServiceImpl::BuildResponseForBackends(second_backend, {}), 0);
+ ScheduleResponseForBalancer(0, BuildResponseForBackends(first_backend, {}),
+ 0);
+ ScheduleResponseForBalancer(1, BuildResponseForBackends(second_backend, {}),
+ 0);
// Ask channel to connect to trigger resolver creation.
channel_->GetState(true);
@@ -1767,7 +1768,7 @@ TEST_F(SingleBalancerTest, Drop) {
const int num_total_addresses = num_backends_ + num_of_drop_addresses;
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
+ BuildResponseForBackends(
GetBackendPorts(),
{{"rate_limiting", num_of_drop_by_rate_limiting_addresses},
{"load_balancing", num_of_drop_by_load_balancing_addresses}}),
@@ -1806,7 +1807,7 @@ TEST_F(SingleBalancerTest, DropAllFirst) {
const int num_of_drop_by_load_balancing_addresses = 1;
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
+ BuildResponseForBackends(
{}, {{"rate_limiting", num_of_drop_by_rate_limiting_addresses},
{"load_balancing", num_of_drop_by_load_balancing_addresses}}),
0);
@@ -1818,13 +1819,12 @@ TEST_F(SingleBalancerTest, DropAllFirst) {
TEST_F(SingleBalancerTest, DropAll) {
SetNextResolutionAllBalancers();
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
const int num_of_drop_by_rate_limiting_addresses = 1;
const int num_of_drop_by_load_balancing_addresses = 1;
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
+ BuildResponseForBackends(
{}, {{"rate_limiting", num_of_drop_by_rate_limiting_addresses},
{"load_balancing", num_of_drop_by_load_balancing_addresses}}),
1000);
@@ -1850,8 +1850,7 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, Vanilla) {
SetNextResolutionAllBalancers();
const size_t kNumRpcsPerAddress = 100;
ScheduleResponseForBalancer(
- 0, BalancerServiceImpl::BuildResponseForBackends(GetBackendPorts(), {}),
- 0);
+ 0, BuildResponseForBackends(GetBackendPorts(), {}), 0);
// Wait until all backends are ready.
int num_ok = 0;
int num_failure = 0;
@@ -1892,8 +1891,7 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, BalancerRestart) {
// Balancer returns backends starting at index 1.
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
- GetBackendPorts(0, kNumBackendsFirstPass), {}),
+ BuildResponseForBackends(GetBackendPorts(0, kNumBackendsFirstPass), {}),
0);
// Wait until all backends returned by the balancer are ready.
int num_ok = 0;
@@ -1922,10 +1920,9 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, BalancerRestart) {
}
// Now restart the balancer, this time pointing to all backends.
balancers_[0]->Start(server_host_);
- ScheduleResponseForBalancer(0,
- BalancerServiceImpl::BuildResponseForBackends(
- GetBackendPorts(kNumBackendsFirstPass), {}),
- 0);
+ ScheduleResponseForBalancer(
+ 0, BuildResponseForBackends(GetBackendPorts(kNumBackendsFirstPass), {}),
+ 0);
// Wait for queries to start going to one of the new backends.
// This tells us that we're now using the new serverlist.
do {
@@ -1955,7 +1952,7 @@ TEST_F(SingleBalancerWithClientLoadReportingTest, Drop) {
const int num_total_addresses = num_backends_ + num_of_drop_addresses;
ScheduleResponseForBalancer(
0,
- BalancerServiceImpl::BuildResponseForBackends(
+ BuildResponseForBackends(
GetBackendPorts(),
{{"rate_limiting", num_of_drop_by_rate_limiting_addresses},
{"load_balancing", num_of_drop_by_load_balancing_addresses}}),
diff --git a/contrib/libs/grpc/test/cpp/end2end/hybrid_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/hybrid_end2end_test.cc
index e4ebee8e93e..4c9896522e5 100644
--- a/contrib/libs/grpc/test/cpp/end2end/hybrid_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/hybrid_end2end_test.cc
@@ -49,7 +49,7 @@ using ::grpc::experimental::GenericCallbackServerContext;
using ::grpc::experimental::ServerGenericBidiReactor;
#endif
-void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+void* tag(int i) { return reinterpret_cast<void*>(i); }
bool VerifyReturnSuccess(CompletionQueue* cq, int i) {
void* got_tag;
@@ -305,8 +305,8 @@ class HybridEnd2endTest : public ::testing::TestWithParam<bool> {
bool ignored_ok;
for (auto it = cqs_.begin(); it != cqs_.end(); ++it) {
(*it)->Shutdown();
- while ((*it)->Next(&ignored_tag, &ignored_ok))
- ;
+ while ((*it)->Next(&ignored_tag, &ignored_ok)) {
+ }
}
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/interceptors_util.cc b/contrib/libs/grpc/test/cpp/end2end/interceptors_util.cc
index ff88953651d..ca22077a5c9 100644
--- a/contrib/libs/grpc/test/cpp/end2end/interceptors_util.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/interceptors_util.cc
@@ -17,14 +17,17 @@
*/
#include "test/cpp/end2end/interceptors_util.h"
+
+#include "y_absl/memory/memory.h"
+
#include <util/string/cast.h>
namespace grpc {
namespace testing {
-std::atomic<int> DummyInterceptor::num_times_run_;
-std::atomic<int> DummyInterceptor::num_times_run_reverse_;
-std::atomic<int> DummyInterceptor::num_times_cancel_;
+std::atomic<int> PhonyInterceptor::num_times_run_;
+std::atomic<int> PhonyInterceptor::num_times_run_reverse_;
+std::atomic<int> PhonyInterceptor::num_times_cancel_;
void MakeCall(const std::shared_ptr<Channel>& channel) {
auto stub = grpc::testing::EchoTestService::NewStub(channel);
@@ -198,14 +201,13 @@ bool CheckMetadata(const std::multimap<TString, TString>& map,
}
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
-CreateDummyClientInterceptors() {
+CreatePhonyClientInterceptors() {
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
creators;
- // Add 20 dummy interceptors before hijacking interceptor
+ // Add 20 phony interceptors before hijacking interceptor
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
return creators;
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/interceptors_util.h b/contrib/libs/grpc/test/cpp/end2end/interceptors_util.h
index c95170bbbc0..d0c91ea9b7e 100644
--- a/contrib/libs/grpc/test/cpp/end2end/interceptors_util.h
+++ b/contrib/libs/grpc/test/cpp/end2end/interceptors_util.h
@@ -29,11 +29,11 @@ namespace grpc {
namespace testing {
/* This interceptor does nothing. Just keeps a global count on the number of
* times it was invoked. */
-class DummyInterceptor : public experimental::Interceptor {
+class PhonyInterceptor : public experimental::Interceptor {
public:
- DummyInterceptor() {}
+ PhonyInterceptor() {}
- virtual void Intercept(experimental::InterceptorBatchMethods* methods) {
+ void Intercept(experimental::InterceptorBatchMethods* methods) override {
if (methods->QueryInterceptionHookPoint(
experimental::InterceptionHookPoints::PRE_SEND_INITIAL_METADATA)) {
num_times_run_++;
@@ -67,18 +67,18 @@ class DummyInterceptor : public experimental::Interceptor {
static std::atomic<int> num_times_cancel_;
};
-class DummyInterceptorFactory
+class PhonyInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface,
public experimental::ServerInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* /*info*/) override {
- return new DummyInterceptor();
+ return new PhonyInterceptor();
}
- virtual experimental::Interceptor* CreateServerInterceptor(
+ experimental::Interceptor* CreateServerInterceptor(
experimental::ServerRpcInfo* /*info*/) override {
- return new DummyInterceptor();
+ return new PhonyInterceptor();
}
};
@@ -87,12 +87,12 @@ class NullInterceptorFactory
: public experimental::ClientInterceptorFactoryInterface,
public experimental::ServerInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateClientInterceptor(
+ experimental::Interceptor* CreateClientInterceptor(
experimental::ClientRpcInfo* /*info*/) override {
return nullptr;
}
- virtual experimental::Interceptor* CreateServerInterceptor(
+ experimental::Interceptor* CreateServerInterceptor(
experimental::ServerRpcInfo* /*info*/) override {
return nullptr;
}
@@ -189,9 +189,9 @@ bool CheckMetadata(const std::multimap<TString, TString>& map,
const string& key, const string& value);
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
-CreateDummyClientInterceptors();
+CreatePhonyClientInterceptors();
-inline void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+inline void* tag(int i) { return reinterpret_cast<void*>(i); }
inline int detag(void* p) {
return static_cast<int>(reinterpret_cast<intptr_t>(p));
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/message_allocator_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/message_allocator_end2end_test.cc
index 4bf755206e3..d6a1444501d 100644
--- a/contrib/libs/grpc/test/cpp/end2end/message_allocator_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/message_allocator_end2end_test.cc
@@ -45,17 +45,6 @@
#include "test/core/util/test_config.h"
#include "test/cpp/util/test_credentials_provider.h"
-// MAYBE_SKIP_TEST is a macro to determine if this particular test configuration
-// should be skipped based on a decision made at SetUp time. In particular, any
-// callback tests can only be run if the iomgr can run in the background or if
-// the transport is in-process.
-#define MAYBE_SKIP_TEST \
- do { \
- if (do_not_test_) { \
- return; \
- } \
- } while (0)
-
namespace grpc {
namespace testing {
namespace {
@@ -69,7 +58,7 @@ class CallbackTestServiceImpl
std::function<void(experimental::RpcAllocatorState* allocator_state,
const EchoRequest* req, EchoResponse* resp)>
mutator) {
- allocator_mutator_ = mutator;
+ allocator_mutator_ = std::move(mutator);
}
experimental::ServerUnaryReactor* Echo(
@@ -117,17 +106,9 @@ void TestScenario::Log() const {
class MessageAllocatorEnd2endTestBase
: public ::testing::TestWithParam<TestScenario> {
protected:
- MessageAllocatorEnd2endTestBase() {
- GetParam().Log();
- if (GetParam().protocol == Protocol::TCP) {
- if (!grpc_iomgr_run_in_background()) {
- do_not_test_ = true;
- return;
- }
- }
- }
+ MessageAllocatorEnd2endTestBase() { GetParam().Log(); }
- ~MessageAllocatorEnd2endTestBase() = default;
+ ~MessageAllocatorEnd2endTestBase() override = default;
void CreateServer(
experimental::MessageAllocator<EchoRequest, EchoResponse>* allocator) {
@@ -210,7 +191,6 @@ class MessageAllocatorEnd2endTestBase
}
}
- bool do_not_test_{false};
int picked_port_{0};
std::shared_ptr<Channel> channel_;
std::unique_ptr<EchoTestService::Stub> stub_;
@@ -222,7 +202,6 @@ class MessageAllocatorEnd2endTestBase
class NullAllocatorTest : public MessageAllocatorEnd2endTestBase {};
TEST_P(NullAllocatorTest, SimpleRpc) {
- MAYBE_SKIP_TEST;
CreateServer(nullptr);
ResetStub();
SendRpcs(1);
@@ -278,7 +257,6 @@ class SimpleAllocatorTest : public MessageAllocatorEnd2endTestBase {
};
TEST_P(SimpleAllocatorTest, SimpleRpc) {
- MAYBE_SKIP_TEST;
const int kRpcCount = 10;
std::unique_ptr<SimpleAllocator> allocator(new SimpleAllocator);
CreateServer(allocator.get());
@@ -293,7 +271,6 @@ TEST_P(SimpleAllocatorTest, SimpleRpc) {
}
TEST_P(SimpleAllocatorTest, RpcWithEarlyFreeRequest) {
- MAYBE_SKIP_TEST;
const int kRpcCount = 10;
std::unique_ptr<SimpleAllocator> allocator(new SimpleAllocator);
auto mutator = [](experimental::RpcAllocatorState* allocator_state,
@@ -318,7 +295,6 @@ TEST_P(SimpleAllocatorTest, RpcWithEarlyFreeRequest) {
}
TEST_P(SimpleAllocatorTest, RpcWithReleaseRequest) {
- MAYBE_SKIP_TEST;
const int kRpcCount = 10;
std::unique_ptr<SimpleAllocator> allocator(new SimpleAllocator);
std::vector<EchoRequest*> released_requests;
@@ -378,7 +354,6 @@ class ArenaAllocatorTest : public MessageAllocatorEnd2endTestBase {
};
TEST_P(ArenaAllocatorTest, SimpleRpc) {
- MAYBE_SKIP_TEST;
const int kRpcCount = 10;
std::unique_ptr<ArenaAllocator> allocator(new ArenaAllocator);
CreateServer(allocator.get());
@@ -429,10 +404,7 @@ INSTANTIATE_TEST_SUITE_P(ArenaAllocatorTest, ArenaAllocatorTest,
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
- // The grpc_init is to cover the MAYBE_SKIP_TEST.
- grpc_init();
::testing::InitGoogleTest(&argc, argv);
int ret = RUN_ALL_TESTS();
- grpc_shutdown();
return ret;
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/mock_test.cc b/contrib/libs/grpc/test/cpp/end2end/mock_test.cc
index a3d61c4e982..da3f48fa64a 100644
--- a/contrib/libs/grpc/test/cpp/end2end/mock_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/mock_test.cc
@@ -48,11 +48,9 @@ using grpc::testing::EchoResponse;
using grpc::testing::EchoTestService;
using grpc::testing::MockClientReaderWriter;
using std::vector;
-using std::chrono::system_clock;
using ::testing::_;
using ::testing::AtLeast;
using ::testing::DoAll;
-using ::testing::Invoke;
using ::testing::Return;
using ::testing::SaveArg;
using ::testing::SetArgPointee;
@@ -207,7 +205,7 @@ TEST_F(MockCallbackTest, MockedCallSucceedsWithWait) {
req.set_message("mock 1");
auto* reactor = service_.Echo(&ctx, &req, &resp);
- cv.WaitUntil(&mu, [&] {
+ grpc::internal::WaitUntil(&cv, &mu, [&] {
grpc::internal::MutexLock l(&mu);
return status_set;
});
@@ -290,7 +288,7 @@ class TestServiceImpl : public EchoTestService::Service {
}
private:
- const vector<TString> split(const TString& input) {
+ vector<TString> split(const TString& input) {
TString buff("");
vector<TString> result;
@@ -299,11 +297,11 @@ class TestServiceImpl : public EchoTestService::Service {
buff += n;
continue;
}
- if (buff == "") continue;
+ if (buff.empty()) continue;
result.push_back(buff);
buff = "";
}
- if (buff != "") result.push_back(buff);
+ if (!buff.empty()) result.push_back(buff);
return result;
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/nonblocking_test.cc b/contrib/libs/grpc/test/cpp/end2end/nonblocking_test.cc
index 4be070ec717..73e8fa2e719 100644
--- a/contrib/libs/grpc/test/cpp/end2end/nonblocking_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/nonblocking_test.cc
@@ -25,6 +25,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/core/lib/gpr/tls.h"
#include "src/core/lib/iomgr/port.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
@@ -99,8 +101,8 @@ class NonblockingTest : public ::testing::Test {
void* ignored_tag;
bool ignored_ok;
cq_->Shutdown();
- while (LoopForTag(&ignored_tag, &ignored_ok))
- ;
+ while (LoopForTag(&ignored_tag, &ignored_ok)) {
+ }
stub_.reset();
grpc_recycle_unused_port(port_);
}
@@ -109,7 +111,8 @@ class NonblockingTest : public ::testing::Test {
ServerBuilder builder;
builder.AddListeningPort(server_address_.str(),
grpc::InsecureServerCredentials());
- service_.reset(new grpc::testing::EchoTestService::AsyncService());
+ service_ =
+ y_absl::make_unique<grpc::testing::EchoTestService::AsyncService>();
builder.RegisterService(service_.get());
cq_ = builder.AddCompletionQueue();
server_ = builder.BuildAndStart();
@@ -209,6 +212,8 @@ int main(int argc, char** argv) {
gpr_tls_destroy(&g_is_nonblocking_poll);
return ret;
#else // GRPC_POSIX_SOCKET
+ (void)argc;
+ (void)argv;
return 0;
#endif // GRPC_POSIX_SOCKET
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/proto_server_reflection_test.cc b/contrib/libs/grpc/test/cpp/end2end/proto_server_reflection_test.cc
index d79b33da700..44b8f9211ed 100644
--- a/contrib/libs/grpc/test/cpp/end2end/proto_server_reflection_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/proto_server_reflection_test.cc
@@ -27,6 +27,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -57,8 +59,8 @@ class ProtoServerReflectionTest : public ::testing::Test {
std::shared_ptr<Channel> channel =
grpc::CreateChannel(target, InsecureChannelCredentials());
stub_ = grpc::testing::EchoTestService::NewStub(channel);
- desc_db_.reset(new ProtoReflectionDescriptorDatabase(channel));
- desc_pool_.reset(new protobuf::DescriptorPool(desc_db_.get()));
+ desc_db_ = y_absl::make_unique<ProtoReflectionDescriptorDatabase>(channel);
+ desc_pool_ = y_absl::make_unique<protobuf::DescriptorPool>(desc_db_.get());
}
string to_string(const int number) {
@@ -133,7 +135,7 @@ TEST_F(ProtoServerReflectionTest, CheckResponseWithLocalDescriptorPool) {
std::vector<TString> services;
desc_db_->GetServices(&services);
// The service list has at least one service (reflection servcie).
- EXPECT_TRUE(services.size() > 0);
+ EXPECT_TRUE(!services.empty());
for (auto it = services.begin(); it != services.end(); ++it) {
CompareService(*it);
diff --git a/contrib/libs/grpc/test/cpp/end2end/raw_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/raw_end2end_test.cc
index 184dc1e5f56..d6300ecad66 100644
--- a/contrib/libs/grpc/test/cpp/end2end/raw_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/raw_end2end_test.cc
@@ -50,7 +50,7 @@ namespace testing {
namespace {
-void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+void* tag(int i) { return reinterpret_cast<void*>(i); }
int detag(void* p) { return static_cast<int>(reinterpret_cast<intptr_t>(p)); }
class Verifier {
@@ -110,8 +110,8 @@ class RawEnd2EndTest : public ::testing::Test {
void* ignored_tag;
bool ignored_ok;
cq_->Shutdown();
- while (cq_->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq_->Next(&ignored_tag, &ignored_ok)) {
+ }
stub_.reset();
grpc_recycle_unused_port(port_);
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/server_builder_plugin_test.cc b/contrib/libs/grpc/test/cpp/end2end/server_builder_plugin_test.cc
index 004902cad32..cf47dade7cf 100644
--- a/contrib/libs/grpc/test/cpp/end2end/server_builder_plugin_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/server_builder_plugin_test.cc
@@ -31,6 +31,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -138,7 +140,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void SetUp() override {
port_ = grpc_pick_unused_port_or_die();
- builder_.reset(new ServerBuilder());
+ builder_ = y_absl::make_unique<ServerBuilder>();
}
void InsertPlugin() {
@@ -227,8 +229,8 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam<bool> {
void RunCQ() {
void* tag;
bool ok;
- while (cq_->Next(&tag, &ok))
- ;
+ while (cq_->Next(&tag, &ok)) {
+ }
}
};
diff --git a/contrib/libs/grpc/test/cpp/end2end/server_crash_test.cc b/contrib/libs/grpc/test/cpp/end2end/server_crash_test.cc
index 3616d680f9a..1f5103cb515 100644
--- a/contrib/libs/grpc/test/cpp/end2end/server_crash_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/server_crash_test.cc
@@ -26,6 +26,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -36,7 +38,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
static TString g_root;
@@ -99,7 +100,8 @@ class CrashTest : public ::testing::Test {
std::ostringstream addr_stream;
addr_stream << "localhost:" << port;
auto addr = addr_stream.str();
- client_.reset(new SubProcess({g_root + "/server_crash_test_client",
+ client_ = y_absl::make_unique<SubProcess>(
+ std::vector<TString>({g_root + "/server_crash_test_client",
"--address=" + addr, "--mode=" + mode}));
GPR_ASSERT(client_);
diff --git a/contrib/libs/grpc/test/cpp/end2end/server_crash_test_client.cc b/contrib/libs/grpc/test/cpp/end2end/server_crash_test_client.cc
index 202fb2836cd..ee9b3d7b886 100644
--- a/contrib/libs/grpc/test/cpp/end2end/server_crash_test_client.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/server_crash_test_client.cc
@@ -16,37 +16,37 @@
*
*/
-#include <gflags/gflags.h>
-#include <iostream>
-#include <memory>
-#include <sstream>
-#include <util/generic/string.h>
-
#include <grpc/support/log.h>
#include <grpcpp/channel.h>
#include <grpcpp/client_context.h>
#include <grpcpp/create_channel.h>
+#include <iostream>
+#include <memory>
+#include <sstream>
+#include <util/generic/string.h>
+
+#include "y_absl/flags/flag.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/cpp/util/test_config.h"
-DEFINE_string(address, "", "Address to connect to");
-DEFINE_string(mode, "", "Test mode to use");
+Y_ABSL_FLAG(TString, address, "", "Address to connect to");
+Y_ABSL_FLAG(TString, mode, "", "Test mode to use");
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
int main(int argc, char** argv) {
grpc::testing::InitTest(&argc, &argv, true);
- auto stub = grpc::testing::EchoTestService::NewStub(
- grpc::CreateChannel(FLAGS_address, grpc::InsecureChannelCredentials()));
+ auto stub = grpc::testing::EchoTestService::NewStub(grpc::CreateChannel(
+ y_absl::GetFlag(FLAGS_address), grpc::InsecureChannelCredentials()));
EchoRequest request;
EchoResponse response;
grpc::ClientContext context;
context.set_wait_for_ready(true);
- if (FLAGS_mode == "bidi") {
+ if (y_absl::GetFlag(FLAGS_mode) == "bidi") {
auto stream = stub->BidiStream(&context);
for (int i = 0;; i++) {
std::ostringstream msg;
@@ -56,7 +56,7 @@ int main(int argc, char** argv) {
GPR_ASSERT(stream->Read(&response));
GPR_ASSERT(response.message() == request.message());
}
- } else if (FLAGS_mode == "response") {
+ } else if (y_absl::GetFlag(FLAGS_mode) == "response") {
EchoRequest request;
request.set_message("Hello");
auto stream = stub->ResponseStream(&context, request);
@@ -64,7 +64,8 @@ int main(int argc, char** argv) {
GPR_ASSERT(stream->Read(&response));
}
} else {
- gpr_log(GPR_ERROR, "invalid test mode '%s'", FLAGS_mode.c_str());
+ gpr_log(GPR_ERROR, "invalid test mode '%s'",
+ y_absl::GetFlag(FLAGS_mode).c_str());
return 1;
}
diff --git a/contrib/libs/grpc/test/cpp/end2end/server_early_return_test.cc b/contrib/libs/grpc/test/cpp/end2end/server_early_return_test.cc
index 0f340516b03..543dcf64e4a 100644
--- a/contrib/libs/grpc/test/cpp/end2end/server_early_return_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/server_early_return_test.cc
@@ -115,7 +115,7 @@ class ServerEarlyReturnTest : public ::testing::Test {
void SetUp() override {
int port = grpc_pick_unused_port_or_die();
picked_port_ = port;
- server_address_ << "127.0.0.1:" << port;
+ server_address_ << "localhost:" << port;
ServerBuilder builder;
builder.AddListeningPort(server_address_.str(),
InsecureServerCredentials());
diff --git a/contrib/libs/grpc/test/cpp/end2end/server_interceptors_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/server_interceptors_end2end_test.cc
index 6d2dc772ef7..a57f4712806 100644
--- a/contrib/libs/grpc/test/cpp/end2end/server_interceptors_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/server_interceptors_end2end_test.cc
@@ -29,6 +29,9 @@
#include <grpcpp/server_context.h>
#include <grpcpp/support/server_interceptor.h>
+#include "y_absl/memory/memory.h"
+#include "y_absl/strings/match.h"
+
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
#include "test/core/util/test_config.h"
@@ -44,7 +47,7 @@ namespace {
class LoggingInterceptor : public experimental::Interceptor {
public:
- LoggingInterceptor(experimental::ServerRpcInfo* info) {
+ explicit LoggingInterceptor(experimental::ServerRpcInfo* info) {
info_ = info;
// Check the method name and compare to the type
@@ -96,8 +99,8 @@ class LoggingInterceptor : public experimental::Interceptor {
bool found = false;
// Check that we received the metadata as an echo
for (const auto& pair : *map) {
- found = pair.first.find("testkey") == 0 &&
- pair.second.find("testvalue") == 0;
+ found = y_absl::StartsWith(pair.first, "testkey") &&
+ y_absl::StartsWith(pair.second, "testvalue");
if (found) break;
}
EXPECT_EQ(found, true);
@@ -138,7 +141,7 @@ class LoggingInterceptor : public experimental::Interceptor {
class LoggingInterceptorFactory
: public experimental::ServerInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateServerInterceptor(
+ experimental::Interceptor* CreateServerInterceptor(
experimental::ServerRpcInfo* info) override {
return new LoggingInterceptor(info);
}
@@ -147,7 +150,7 @@ class LoggingInterceptorFactory
// Test if SendMessage function family works as expected for sync/callback apis
class SyncSendMessageTester : public experimental::Interceptor {
public:
- SyncSendMessageTester(experimental::ServerRpcInfo* /*info*/) {}
+ explicit SyncSendMessageTester(experimental::ServerRpcInfo* /*info*/) {}
void Intercept(experimental::InterceptorBatchMethods* methods) override {
if (methods->QueryInterceptionHookPoint(
@@ -168,7 +171,7 @@ class SyncSendMessageTester : public experimental::Interceptor {
class SyncSendMessageTesterFactory
: public experimental::ServerInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateServerInterceptor(
+ experimental::Interceptor* CreateServerInterceptor(
experimental::ServerRpcInfo* info) override {
return new SyncSendMessageTester(info);
}
@@ -177,7 +180,7 @@ class SyncSendMessageTesterFactory
// Test if SendMessage function family works as expected for sync/callback apis
class SyncSendMessageVerifier : public experimental::Interceptor {
public:
- SyncSendMessageVerifier(experimental::ServerRpcInfo* /*info*/) {}
+ explicit SyncSendMessageVerifier(experimental::ServerRpcInfo* /*info*/) {}
void Intercept(experimental::InterceptorBatchMethods* methods) override {
if (methods->QueryInterceptionHookPoint(
@@ -203,7 +206,7 @@ class SyncSendMessageVerifier : public experimental::Interceptor {
class SyncSendMessageVerifierFactory
: public experimental::ServerInterceptorFactoryInterface {
public:
- virtual experimental::Interceptor* CreateServerInterceptor(
+ experimental::Interceptor* CreateServerInterceptor(
experimental::ServerRpcInfo* info) override {
return new SyncSendMessageVerifier(info);
}
@@ -249,12 +252,10 @@ class ServerInterceptorsEnd2endSyncUnaryTest : public ::testing::Test {
creators.push_back(
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>(
new LoggingInterceptorFactory()));
- // Add 20 dummy interceptor factories and null interceptor factories
+ // Add 20 phony interceptor factories and null interceptor factories
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
- creators.push_back(std::unique_ptr<NullInterceptorFactory>(
- new NullInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
+ creators.push_back(y_absl::make_unique<NullInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
server_ = builder.BuildAndStart();
@@ -266,12 +267,12 @@ class ServerInterceptorsEnd2endSyncUnaryTest : public ::testing::Test {
TEST_F(ServerInterceptorsEnd2endSyncUnaryTest, UnaryTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
auto channel =
grpc::CreateChannel(server_address_, InsecureChannelCredentials());
MakeCall(channel);
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
class ServerInterceptorsEnd2endSyncStreamingTest : public ::testing::Test {
@@ -297,8 +298,7 @@ class ServerInterceptorsEnd2endSyncStreamingTest : public ::testing::Test {
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>(
new LoggingInterceptorFactory()));
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
server_ = builder.BuildAndStart();
@@ -310,38 +310,38 @@ class ServerInterceptorsEnd2endSyncStreamingTest : public ::testing::Test {
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ClientStreamingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
auto channel =
grpc::CreateChannel(server_address_, InsecureChannelCredentials());
MakeClientStreamingCall(channel);
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, ServerStreamingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
auto channel =
grpc::CreateChannel(server_address_, InsecureChannelCredentials());
MakeServerStreamingCall(channel);
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
TEST_F(ServerInterceptorsEnd2endSyncStreamingTest, BidiStreamingTest) {
ChannelArguments args;
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
auto channel =
grpc::CreateChannel(server_address_, InsecureChannelCredentials());
MakeBidiStreamingCall(channel);
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
}
class ServerInterceptorsAsyncEnd2endTest : public ::testing::Test {};
TEST_F(ServerInterceptorsAsyncEnd2endTest, UnaryTest) {
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
int port = 5006; // grpc_pick_unused_port_or_die();
string server_address = "localhost:" + ::ToString(port);
ServerBuilder builder;
@@ -354,8 +354,7 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, UnaryTest) {
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>(
new LoggingInterceptorFactory()));
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
auto cq = builder.AddCompletionQueue();
@@ -401,20 +400,20 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, UnaryTest) {
EXPECT_TRUE(CheckMetadata(cli_ctx.GetServerTrailingMetadata(), "testkey",
"testvalue"));
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
server->Shutdown();
cq->Shutdown();
void* ignored_tag;
bool ignored_ok;
- while (cq->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq->Next(&ignored_tag, &ignored_ok)) {
+ }
// grpc_recycle_unused_port(port);
}
TEST_F(ServerInterceptorsAsyncEnd2endTest, BidiStreamingTest) {
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
int port = 5007; // grpc_pick_unused_port_or_die();
string server_address = "localhost:" + ::ToString(port);
ServerBuilder builder;
@@ -427,8 +426,7 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, BidiStreamingTest) {
std::unique_ptr<experimental::ServerInterceptorFactoryInterface>(
new LoggingInterceptorFactory()));
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
auto cq = builder.AddCompletionQueue();
@@ -484,20 +482,20 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, BidiStreamingTest) {
EXPECT_TRUE(CheckMetadata(cli_ctx.GetServerTrailingMetadata(), "testkey",
"testvalue"));
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
server->Shutdown();
cq->Shutdown();
void* ignored_tag;
bool ignored_ok;
- while (cq->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq->Next(&ignored_tag, &ignored_ok)) {
+ }
// grpc_recycle_unused_port(port);
}
TEST_F(ServerInterceptorsAsyncEnd2endTest, GenericRPCTest) {
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
int port = 5008; // grpc_pick_unused_port_or_die();
string server_address = "localhost:" + ::ToString(port);
ServerBuilder builder;
@@ -508,8 +506,7 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, GenericRPCTest) {
creators;
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
auto srv_cq = builder.AddCompletionQueue();
@@ -591,21 +588,21 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, GenericRPCTest) {
EXPECT_TRUE(CheckMetadata(cli_ctx.GetServerTrailingMetadata(), "testkey",
"testvalue"));
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
server->Shutdown();
void* ignored_tag;
bool ignored_ok;
- while (cli_cq.Next(&ignored_tag, &ignored_ok))
- ;
- while (srv_cq->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cli_cq.Next(&ignored_tag, &ignored_ok)) {
+ }
+ while (srv_cq->Next(&ignored_tag, &ignored_ok)) {
+ }
// grpc_recycle_unused_port(port);
}
TEST_F(ServerInterceptorsAsyncEnd2endTest, UnimplementedRpcTest) {
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
int port = 5009; // grpc_pick_unused_port_or_die();
string server_address = "localhost:" + ::ToString(port);
ServerBuilder builder;
@@ -614,8 +611,7 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, UnimplementedRpcTest) {
creators;
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
auto cq = builder.AddCompletionQueue();
@@ -641,15 +637,15 @@ TEST_F(ServerInterceptorsAsyncEnd2endTest, UnimplementedRpcTest) {
EXPECT_EQ(StatusCode::UNIMPLEMENTED, recv_status.error_code());
EXPECT_EQ("", recv_status.error_message());
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
server->Shutdown();
cq->Shutdown();
void* ignored_tag;
bool ignored_ok;
- while (cq->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq->Next(&ignored_tag, &ignored_ok)) {
+ }
// grpc_recycle_unused_port(port);
}
@@ -657,7 +653,7 @@ class ServerInterceptorsSyncUnimplementedEnd2endTest : public ::testing::Test {
};
TEST_F(ServerInterceptorsSyncUnimplementedEnd2endTest, UnimplementedRpcTest) {
- DummyInterceptor::Reset();
+ PhonyInterceptor::Reset();
int port = 5010; // grpc_pick_unused_port_or_die();
string server_address = "localhost:" + ::ToString(port);
ServerBuilder builder;
@@ -668,8 +664,7 @@ TEST_F(ServerInterceptorsSyncUnimplementedEnd2endTest, UnimplementedRpcTest) {
creators;
creators.reserve(20);
for (auto i = 0; i < 20; i++) {
- creators.push_back(std::unique_ptr<DummyInterceptorFactory>(
- new DummyInterceptorFactory()));
+ creators.push_back(y_absl::make_unique<PhonyInterceptorFactory>());
}
builder.experimental().SetInterceptorCreators(std::move(creators));
auto server = builder.BuildAndStart();
@@ -690,8 +685,8 @@ TEST_F(ServerInterceptorsSyncUnimplementedEnd2endTest, UnimplementedRpcTest) {
EXPECT_EQ(StatusCode::UNIMPLEMENTED, recv_status.error_code());
EXPECT_EQ("", recv_status.error_message());
- // Make sure all 20 dummy interceptors were run
- EXPECT_EQ(DummyInterceptor::GetNumTimesRun(), 20);
+ // Make sure all 20 phony interceptors were run
+ EXPECT_EQ(PhonyInterceptor::GetNumTimesRun(), 20);
server->Shutdown();
// grpc_recycle_unused_port(port);
diff --git a/contrib/libs/grpc/test/cpp/end2end/server_load_reporting_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/server_load_reporting_end2end_test.cc
index 13833cf66c2..e97b51f21eb 100644
--- a/contrib/libs/grpc/test/cpp/end2end/server_load_reporting_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/server_load_reporting_end2end_test.cc
@@ -96,7 +96,7 @@ class ServerLoadReportingEnd2endTest : public ::testing::Test {
auto stub = EchoTestService::NewStub(
grpc::CreateChannel(server_address_, InsecureChannelCredentials()));
TString lb_token = lb_id + lb_tag;
- for (int i = 0; i < num_requests; ++i) {
+ for (size_t i = 0; i < num_requests; ++i) {
ClientContext ctx;
if (!lb_token.empty()) ctx.AddMetadata(GRPC_LB_TOKEN_MD_KEY, lb_token);
EchoRequest request;
diff --git a/contrib/libs/grpc/test/cpp/end2end/service_config_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/service_config_end2end_test.cc
index cee33343c11..12dde9f35ef 100644
--- a/contrib/libs/grpc/test/cpp/end2end/service_config_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/service_config_end2end_test.cc
@@ -24,6 +24,7 @@
#include <util/generic/string.h>
#include <thread>
+#include "y_absl/memory/memory.h"
#include "y_absl/strings/str_cat.h"
#include <grpc/grpc.h>
@@ -56,6 +57,7 @@
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
+#include "test/core/util/resolve_localhost_ip46.h"
#include "test/core/util/test_config.h"
#include "test/cpp/end2end/test_service_impl.h"
@@ -64,7 +66,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
namespace grpc {
namespace testing {
@@ -131,6 +132,11 @@ class ServiceConfigEnd2endTest : public ::testing::Test {
grpc_init();
response_generator_ =
grpc_core::MakeRefCounted<grpc_core::FakeResolverResponseGenerator>();
+ bool localhost_resolves_to_ipv4 = false;
+ bool localhost_resolves_to_ipv6 = false;
+ grpc_core::LocalhostResolves(&localhost_resolves_to_ipv4,
+ &localhost_resolves_to_ipv6);
+ ipv6_only_ = !localhost_resolves_to_ipv4 && localhost_resolves_to_ipv6;
}
void TearDown() override {
@@ -143,7 +149,7 @@ class ServiceConfigEnd2endTest : public ::testing::Test {
stub_.reset();
servers_.clear();
creds_.reset();
- grpc_shutdown_blocking();
+ grpc_shutdown();
}
void CreateServers(size_t num_servers,
@@ -169,14 +175,14 @@ class ServiceConfigEnd2endTest : public ::testing::Test {
grpc_core::Resolver::Result BuildFakeResults(const std::vector<int>& ports) {
grpc_core::Resolver::Result result;
for (const int& port : ports) {
- TString lb_uri_str = y_absl::StrCat("ipv4:127.0.0.1:", port);
- grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true);
- GPR_ASSERT(lb_uri != nullptr);
+ TString lb_uri_str =
+ y_absl::StrCat(ipv6_only_ ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", port);
+ y_absl::StatusOr<grpc_core::URI> lb_uri = grpc_core::URI::Parse(lb_uri_str);
+ GPR_ASSERT(lb_uri.ok());
grpc_resolved_address address;
- GPR_ASSERT(grpc_parse_uri(lb_uri, &address));
+ GPR_ASSERT(grpc_parse_uri(*lb_uri, &address));
result.addresses.emplace_back(address.addr, address.len,
nullptr /* args */);
- grpc_uri_destroy(lb_uri);
}
return result;
}
@@ -311,9 +317,9 @@ class ServiceConfigEnd2endTest : public ::testing::Test {
grpc::internal::Mutex mu;
grpc::internal::MutexLock lock(&mu);
grpc::internal::CondVar cond;
- thread_.reset(new std::thread(
- std::bind(&ServerData::Serve, this, server_host, &mu, &cond)));
- cond.WaitUntil(&mu, [this] { return server_ready_; });
+ thread_ = y_absl::make_unique<std::thread>(
+ std::bind(&ServerData::Serve, this, server_host, &mu, &cond));
+ grpc::internal::WaitUntil(&cond, &mu, [this] { return server_ready_; });
server_ready_ = false;
gpr_log(GPR_INFO, "server startup complete");
}
@@ -422,6 +428,7 @@ class ServiceConfigEnd2endTest : public ::testing::Test {
return "{\"version\": \"invalid_default\"";
}
+ bool ipv6_only_ = false;
const TString server_host_;
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
std::vector<std::unique_ptr<ServerData>> servers_;
diff --git a/contrib/libs/grpc/test/cpp/end2end/shutdown_test.cc b/contrib/libs/grpc/test/cpp/end2end/shutdown_test.cc
index 3aa7a766c43..734b9344ddc 100644
--- a/contrib/libs/grpc/test/cpp/end2end/shutdown_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/shutdown_test.cc
@@ -48,7 +48,7 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
Status Echo(ServerContext* context, const EchoRequest* /*request*/,
EchoResponse* /*response*/) override {
- gpr_event_set(ev_, (void*)1);
+ gpr_event_set(ev_, reinterpret_cast<void*>(1));
while (!context->IsCancelled()) {
}
return Status::OK;
diff --git a/contrib/libs/grpc/test/cpp/end2end/streaming_throughput_test.cc b/contrib/libs/grpc/test/cpp/end2end/streaming_throughput_test.cc
index f2252063fb1..bfc0d1e370c 100644
--- a/contrib/libs/grpc/test/cpp/end2end/streaming_throughput_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/streaming_throughput_test.cc
@@ -42,7 +42,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
const char* kLargeString =
"("
diff --git a/contrib/libs/grpc/test/cpp/end2end/test_service_impl.h b/contrib/libs/grpc/test/cpp/end2end/test_service_impl.h
index 5f207f1979e..eb4583ff878 100644
--- a/contrib/libs/grpc/test/cpp/end2end/test_service_impl.h
+++ b/contrib/libs/grpc/test/cpp/end2end/test_service_impl.h
@@ -38,8 +38,6 @@
#include <util/string/cast.h>
-using std::chrono::system_clock;
-
namespace grpc {
namespace testing {
diff --git a/contrib/libs/grpc/test/cpp/end2end/thread_stress_test.cc b/contrib/libs/grpc/test/cpp/end2end/thread_stress_test.cc
index 8acb9537298..1a0ca6c0ab4 100644
--- a/contrib/libs/grpc/test/cpp/end2end/thread_stress_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/thread_stress_test.cc
@@ -42,7 +42,6 @@
using grpc::testing::EchoRequest;
using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
const int kNumThreads = 100; // Number of threads
const int kNumAsyncSendThreads = 2;
@@ -207,8 +206,8 @@ class CommonStressTestAsyncServer : public BaseClass {
void* ignored_tag;
bool ignored_ok;
- while (cq_->Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq_->Next(&ignored_tag, &ignored_ok)) {
+ }
this->TearDownEnd();
}
@@ -246,7 +245,7 @@ class CommonStressTestAsyncServer : public BaseClass {
service_.RequestEcho(contexts_[i].srv_ctx.get(),
&contexts_[i].recv_request,
contexts_[i].response_writer.get(), cq_.get(),
- cq_.get(), (void*)static_cast<intptr_t>(i));
+ cq_.get(), reinterpret_cast<void*>(i));
}
}
struct Context {
@@ -342,8 +341,8 @@ class AsyncClientEnd2endTest : public ::testing::Test {
void TearDown() override {
void* ignored_tag;
bool ignored_ok;
- while (cq_.Next(&ignored_tag, &ignored_ok))
- ;
+ while (cq_.Next(&ignored_tag, &ignored_ok)) {
+ }
common_.TearDown();
}
@@ -370,8 +369,7 @@ class AsyncClientEnd2endTest : public ::testing::Test {
request.set_message(TString("Hello: " + grpc::to_string(i)).c_str());
call->response_reader =
common_.GetStub()->AsyncEcho(&call->context, request, &cq_);
- call->response_reader->Finish(&call->response, &call->status,
- (void*)call);
+ call->response_reader->Finish(&call->response, &call->status, call);
grpc::internal::MutexLock l(&mu_);
rpcs_outstanding_++;
diff --git a/contrib/libs/grpc/test/cpp/end2end/time_change_test.cc b/contrib/libs/grpc/test/cpp/end2end/time_change_test.cc
index 48b9eace129..ef879f899c7 100644
--- a/contrib/libs/grpc/test/cpp/end2end/time_change_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/time_change_test.cc
@@ -26,6 +26,8 @@
#include <grpcpp/server_builder.h>
#include <grpcpp/server_context.h>
+#include "y_absl/memory/memory.h"
+
#include "src/core/lib/iomgr/timer.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
#include "test/core/util/port.h"
@@ -95,7 +97,7 @@ namespace {
// gpr_now() is called with invalid clock_type
TEST(TimespecTest, GprNowInvalidClockType) {
// initialize to some junk value
- gpr_clock_type invalid_clock_type = (gpr_clock_type)32641;
+ gpr_clock_type invalid_clock_type = static_cast<gpr_clock_type>(32641);
EXPECT_DEATH(gpr_now(invalid_clock_type), ".*");
}
@@ -133,7 +135,7 @@ class TimeChangeTest : public ::testing::Test {
std::ostringstream addr_stream;
addr_stream << "localhost:" << port;
server_address_ = addr_stream.str();
- server_.reset(new SubProcess({
+ server_ = y_absl::make_unique<SubProcess>(std::vector<TString>({
g_root + "/client_crash_test_server",
"--address=" + server_address_,
}));
@@ -148,14 +150,14 @@ class TimeChangeTest : public ::testing::Test {
static void TearDownTestCase() { server_.reset(); }
- void SetUp() {
+ void SetUp() override {
channel_ =
grpc::CreateChannel(server_address_, InsecureChannelCredentials());
GPR_ASSERT(channel_);
stub_ = grpc::testing::EchoTestService::NewStub(channel_);
}
- void TearDown() { reset_now_offset(); }
+ void TearDown() override { reset_now_offset(); }
std::unique_ptr<grpc::testing::EchoTestService::Stub> CreateStub() {
return grpc::testing::EchoTestService::NewStub(channel_);
diff --git a/contrib/libs/grpc/test/cpp/end2end/xds_credentials_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/xds_credentials_end2end_test.cc
new file mode 100644
index 00000000000..fb5cfc9f4a5
--- /dev/null
+++ b/contrib/libs/grpc/test/cpp/end2end/xds_credentials_end2end_test.cc
@@ -0,0 +1,127 @@
+//
+//
+// 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 <gmock/gmock.h>
+#include <gtest/gtest.h>
+
+#include <grpc/grpc.h>
+#include <grpcpp/server_builder.h>
+
+#include "test/core/util/port.h"
+#include "test/core/util/test_config.h"
+#include "test/cpp/end2end/test_service_impl.h"
+#include "test/cpp/util/test_credentials_provider.h"
+
+namespace grpc {
+namespace testing {
+namespace {
+
+class XdsCredentialsEnd2EndFallbackTest
+ : public ::testing::TestWithParam<const char*> {
+ protected:
+ XdsCredentialsEnd2EndFallbackTest() {
+ int port = grpc_pick_unused_port_or_die();
+ ServerBuilder builder;
+ server_address_ = "localhost:" + ToString(port);
+ builder.AddListeningPort(
+ server_address_,
+ GetCredentialsProvider()->GetServerCredentials(GetParam()));
+ builder.RegisterService(&service_);
+ server_ = builder.BuildAndStart();
+ }
+
+ TString server_address_;
+ TestServiceImpl service_;
+ std::unique_ptr<Server> server_;
+};
+
+TEST_P(XdsCredentialsEnd2EndFallbackTest, NoXdsSchemeInTarget) {
+ // Target does not use 'xds:///' scheme and should result in using fallback
+ // credentials.
+ ChannelArguments args;
+ auto channel = grpc::CreateCustomChannel(
+ server_address_,
+ grpc::experimental::XdsCredentials(
+ GetCredentialsProvider()->GetChannelCredentials(GetParam(), &args)),
+ args);
+ auto stub = grpc::testing::EchoTestService::NewStub(channel);
+ ClientContext ctx;
+ EchoRequest req;
+ req.set_message("Hello");
+ EchoResponse resp;
+ Status s = stub->Echo(&ctx, req, &resp);
+ EXPECT_EQ(s.ok(), true);
+ EXPECT_EQ(resp.message(), "Hello");
+}
+
+class XdsServerCredentialsEnd2EndFallbackTest
+ : public ::testing::TestWithParam<const char*> {
+ protected:
+ XdsServerCredentialsEnd2EndFallbackTest() {
+ int port = grpc_pick_unused_port_or_die();
+ // Build a server that is not xDS enabled but uses XdsServerCredentials.
+ ServerBuilder builder;
+ server_address_ = "localhost:" + ToString(port);
+ builder.AddListeningPort(
+ server_address_,
+ grpc::experimental::XdsServerCredentials(
+ GetCredentialsProvider()->GetServerCredentials(GetParam())));
+ builder.RegisterService(&service_);
+ server_ = builder.BuildAndStart();
+ }
+
+ TString server_address_;
+ TestServiceImpl service_;
+ std::unique_ptr<Server> server_;
+};
+
+TEST_P(XdsServerCredentialsEnd2EndFallbackTest, Basic) {
+ ChannelArguments args;
+ auto channel = grpc::CreateCustomChannel(
+ server_address_,
+ GetCredentialsProvider()->GetChannelCredentials(GetParam(), &args), args);
+ auto stub = grpc::testing::EchoTestService::NewStub(channel);
+ ClientContext ctx;
+ EchoRequest req;
+ req.set_message("Hello");
+ EchoResponse resp;
+ Status s = stub->Echo(&ctx, req, &resp);
+ EXPECT_EQ(s.ok(), true);
+ EXPECT_EQ(resp.message(), "Hello");
+}
+
+INSTANTIATE_TEST_SUITE_P(XdsCredentialsEnd2EndFallback,
+ XdsCredentialsEnd2EndFallbackTest,
+ ::testing::ValuesIn(std::vector<const char*>(
+ {kInsecureCredentialsType, kTlsCredentialsType})));
+
+INSTANTIATE_TEST_SUITE_P(XdsServerCredentialsEnd2EndFallback,
+ XdsServerCredentialsEnd2EndFallbackTest,
+ ::testing::ValuesIn(std::vector<const char*>(
+ {kInsecureCredentialsType, kTlsCredentialsType})));
+
+} // namespace
+} // namespace testing
+} // namespace grpc
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleTest(&argc, argv);
+ grpc::testing::TestEnvironment env(argc, argv);
+ const auto result = RUN_ALL_TESTS();
+ return result;
+}
diff --git a/contrib/libs/grpc/test/cpp/end2end/xds_end2end_test.cc b/contrib/libs/grpc/test/cpp/end2end/xds_end2end_test.cc
index 603e6186bf0..8ca7f8e6f20 100644
--- a/contrib/libs/grpc/test/cpp/end2end/xds_end2end_test.cc
+++ b/contrib/libs/grpc/test/cpp/end2end/xds_end2end_test.cc
@@ -29,56 +29,74 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+#include "y_absl/functional/bind_front.h"
+#include "y_absl/memory/memory.h"
#include "y_absl/strings/str_cat.h"
+#include "y_absl/strings/str_join.h"
#include "y_absl/types/optional.h"
#include <grpc/grpc.h>
+#include <grpc/grpc_security.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpcpp/channel.h>
#include <grpcpp/client_context.h>
#include <grpcpp/create_channel.h>
+#include <grpcpp/security/tls_certificate_provider.h>
#include <grpcpp/server.h>
#include <grpcpp/server_builder.h>
+#include <grpcpp/xds_server_builder.h>
#include "src/core/ext/filters/client_channel/backup_poller.h"
+#include "src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h"
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
#include "src/core/ext/filters/client_channel/server_address.h"
+#include "src/core/ext/xds/certificate_provider_registry.h"
#include "src/core/ext/xds/xds_api.h"
#include "src/core/ext/xds/xds_channel_args.h"
#include "src/core/ext/xds/xds_client.h"
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/env.h"
+#include "src/core/lib/gpr/string.h"
+#include "src/core/lib/gpr/time_precise.h"
#include "src/core/lib/gpr/tmpfile.h"
-#include "src/core/lib/gprpp/map.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/sync.h"
+#include "src/core/lib/gprpp/time_util.h"
+#include "src/core/lib/iomgr/load_file.h"
#include "src/core/lib/iomgr/parse_address.h"
#include "src/core/lib/iomgr/sockaddr.h"
#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 "test/core/util/port.h"
-#include "test/core/util/test_config.h"
-#include "test/cpp/end2end/test_service_impl.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"
#include "src/proto/grpc/testing/xds/eds_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/xds/lds_rds_for_test.grpc.pb.h"
#include "src/proto/grpc/testing/xds/lrs_for_test.grpc.pb.h"
-
#include "src/proto/grpc/testing/xds/v3/ads.grpc.pb.h"
+#include "src/proto/grpc/testing/xds/v3/aggregate_cluster.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/cluster.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/discovery.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/endpoint.grpc.pb.h"
+#include "src/proto/grpc/testing/xds/v3/fault.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/http_connection_manager.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/listener.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/lrs.grpc.pb.h"
#include "src/proto/grpc/testing/xds/v3/route.grpc.pb.h"
+#include "src/proto/grpc/testing/xds/v3/router.grpc.pb.h"
+#include "src/proto/grpc/testing/xds/v3/tls.grpc.pb.h"
+#include "test/core/util/port.h"
+#include "test/core/util/resolve_localhost_ip46.h"
+#include "test/core/util/test_config.h"
+#include "test/cpp/end2end/test_service_impl.h"
+
+#ifndef DISABLED_XDS_PROTO_IN_CC
+#include "src/cpp/server/csds/csds.h"
+#include "src/proto/grpc/testing/xds/v3/csds.grpc.pb.h"
+#endif // DISABLED_XDS_PROTO_IN_CC
namespace grpc {
namespace testing {
@@ -86,15 +104,27 @@ namespace {
using std::chrono::system_clock;
+#ifndef DISABLED_XDS_PROTO_IN_CC
+using ::envoy::admin::v3::ClientResourceStatus;
+#endif // DISABLED_XDS_PROTO_IN_CC
using ::envoy::config::cluster::v3::CircuitBreakers;
using ::envoy::config::cluster::v3::Cluster;
+using ::envoy::config::cluster::v3::CustomClusterType;
using ::envoy::config::cluster::v3::RoutingPriority;
using ::envoy::config::endpoint::v3::ClusterLoadAssignment;
using ::envoy::config::endpoint::v3::HealthStatus;
+using ::envoy::config::listener::v3::FilterChainMatch;
using ::envoy::config::listener::v3::Listener;
using ::envoy::config::route::v3::RouteConfiguration;
+using ::envoy::extensions::clusters::aggregate::v3::ClusterConfig;
+using ::envoy::extensions::filters::http::fault::v3::HTTPFault;
using ::envoy::extensions::filters::network::http_connection_manager::v3::
HttpConnectionManager;
+using ::envoy::extensions::filters::network::http_connection_manager::v3::
+ HttpFilter;
+using ::envoy::extensions::transport_sockets::tls::v3::DownstreamTlsContext;
+using ::envoy::extensions::transport_sockets::tls::v3::UpstreamTlsContext;
+using ::envoy::type::matcher::v3::StringMatcher;
using ::envoy::type::v3::FractionalPercent;
constexpr char kLdsTypeUrl[] =
@@ -129,9 +159,12 @@ constexpr char kDefaultServiceConfig[] =
"{\n"
" \"loadBalancingConfig\":[\n"
" { \"does_not_exist\":{} },\n"
- " { \"eds_experimental\":{\n"
- " \"clusterName\": \"server.example.com\",\n"
- " \"lrsLoadReportingServerName\": \"\"\n"
+ " { \"xds_cluster_resolver_experimental\":{\n"
+ " \"discoveryMechanisms\": [\n"
+ " { \"clusterName\": \"server.example.com\",\n"
+ " \"type\": \"EDS\",\n"
+ " \"lrsLoadReportingServerName\": \"\"\n"
+ " } ]\n"
" } }\n"
" ]\n"
"}";
@@ -139,8 +172,11 @@ constexpr char kDefaultServiceConfigWithoutLoadReporting[] =
"{\n"
" \"loadBalancingConfig\":[\n"
" { \"does_not_exist\":{} },\n"
- " { \"eds_experimental\":{\n"
- " \"clusterName\": \"server.example.com\"\n"
+ " { \"xds_cluster_resolver_experimental\":{\n"
+ " \"discoveryMechanisms\": [\n"
+ " { \"clusterName\": \"server.example.com\",\n"
+ " \"type\": \"EDS\"\n"
+ " } ]\n"
" } }\n"
" ]\n"
"}";
@@ -167,7 +203,25 @@ constexpr char kBootstrapFileV3[] =
" \"locality\": {\n"
" \"region\": \"corp\",\n"
" \"zone\": \"svl\",\n"
- " \"subzone\": \"mp3\"\n"
+ " \"sub_zone\": \"mp3\"\n"
+ " }\n"
+ " },\n"
+ " \"server_listener_resource_name_template\": "
+ "\"grpc/server?xds.resource.listening_address=%s\",\n"
+ " \"certificate_providers\": {\n"
+ " \"fake_plugin1\": {\n"
+ " \"plugin_name\": \"fake1\"\n"
+ " },\n"
+ " \"fake_plugin2\": {\n"
+ " \"plugin_name\": \"fake2\"\n"
+ " },\n"
+ " \"file_plugin\": {\n"
+ " \"plugin_name\": \"file_watcher\",\n"
+ " \"config\": {\n"
+ " \"certificate_file\": \"src/core/tsi/test_creds/client.pem\",\n"
+ " \"private_key_file\": \"src/core/tsi/test_creds/client.key\",\n"
+ " \"ca_certificate_file\": \"src/core/tsi/test_creds/ca.pem\"\n"
+ " }"
" }\n"
" }\n"
"}\n";
@@ -193,10 +247,17 @@ constexpr char kBootstrapFileV2[] =
" \"locality\": {\n"
" \"region\": \"corp\",\n"
" \"zone\": \"svl\",\n"
- " \"subzone\": \"mp3\"\n"
+ " \"sub_zone\": \"mp3\"\n"
" }\n"
" }\n"
"}\n";
+constexpr char kCaCertPath[] = "src/core/tsi/test_creds/ca.pem";
+constexpr char kServerCertPath[] = "src/core/tsi/test_creds/server1.pem";
+constexpr char kServerKeyPath[] = "src/core/tsi/test_creds/server1.key";
+constexpr char kClientCertPath[] = "src/core/tsi/test_creds/client.pem";
+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";
char* g_bootstrap_file_v3;
char* g_bootstrap_file_v2;
@@ -213,25 +274,6 @@ void WriteBootstrapFiles() {
g_bootstrap_file_v2 = bootstrap_file;
}
-// Helper class to minimize the number of unique ports we use for this test.
-class PortSaver {
- public:
- int GetPort() {
- if (idx_ >= ports_.size()) {
- ports_.push_back(grpc_pick_unused_port_or_die());
- }
- return ports_[idx_++];
- }
-
- void Reset() { idx_ = 0; }
-
- private:
- std::vector<int> ports_;
- size_t idx_ = 0;
-};
-
-PortSaver* g_port_saver = nullptr;
-
template <typename ServiceType>
class CountedService : public ServiceType {
public:
@@ -266,9 +308,6 @@ class CountedService : public ServiceType {
size_t response_count_ = 0;
};
-const char g_kCallCredsMdKey[] = "Balancer should not ...";
-const char g_kCallCredsMdValue[] = "... receive me";
-
template <typename RpcService>
class BackendServiceImpl
: public CountedService<TestMultipleServiceImpl<RpcService>> {
@@ -277,19 +316,20 @@ class BackendServiceImpl
Status Echo(ServerContext* context, const EchoRequest* request,
EchoResponse* response) override {
- // Backend should receive the call credentials metadata.
- auto call_credentials_entry =
- context->client_metadata().find(g_kCallCredsMdKey);
- EXPECT_NE(call_credentials_entry, context->client_metadata().end());
- if (call_credentials_entry != context->client_metadata().end()) {
- EXPECT_EQ(call_credentials_entry->second, g_kCallCredsMdValue);
- }
+ auto peer_identity = context->auth_context()->GetPeerIdentity();
CountedService<TestMultipleServiceImpl<RpcService>>::IncreaseRequestCount();
const auto status =
TestMultipleServiceImpl<RpcService>::Echo(context, request, response);
CountedService<
TestMultipleServiceImpl<RpcService>>::IncreaseResponseCount();
- AddClient(context->peer());
+ {
+ grpc_core::MutexLock lock(&mu_);
+ clients_.insert(context->peer());
+ last_peer_identity_.clear();
+ for (const auto& entry : peer_identity) {
+ last_peer_identity_.emplace_back(entry.data(), entry.size());
+ }
+ }
return status;
}
@@ -307,18 +347,19 @@ class BackendServiceImpl
void Shutdown() {}
std::set<TString> clients() {
- grpc_core::MutexLock lock(&clients_mu_);
+ grpc_core::MutexLock lock(&mu_);
return clients_;
}
- private:
- void AddClient(const TString& client) {
- grpc_core::MutexLock lock(&clients_mu_);
- clients_.insert(client);
+ const std::vector<TString>& last_peer_identity() {
+ grpc_core::MutexLock lock(&mu_);
+ return last_peer_identity_;
}
- grpc_core::Mutex clients_mu_;
+ private:
+ grpc_core::Mutex mu_;
std::set<TString> clients_;
+ std::vector<TString> last_peer_identity_;
};
class ClientStats {
@@ -328,7 +369,7 @@ class ClientStats {
// Converts from proto message class.
template <class UpstreamLocalityStats>
- LocalityStats(const UpstreamLocalityStats& upstream_locality_stats)
+ explicit LocalityStats(const UpstreamLocalityStats& upstream_locality_stats)
: total_successful_requests(
upstream_locality_stats.total_successful_requests()),
total_requests_in_progress(
@@ -440,7 +481,7 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
struct EdsResourceArgs {
struct Locality {
- Locality(const TString& sub_zone, std::vector<int> ports,
+ Locality(TString sub_zone, std::vector<int> ports,
int lb_weight = kDefaultLocalityWeight,
int priority = kDefaultLocalityPriority,
std::vector<HealthStatus> health_statuses = {})
@@ -467,32 +508,9 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
FractionalPercent::MILLION;
};
- explicit AdsServiceImpl(bool enable_load_reporting)
+ AdsServiceImpl()
: v2_rpc_service_(this, /*is_v2=*/true),
- v3_rpc_service_(this, /*is_v2=*/false) {
- // Construct RDS response data.
- default_route_config_.set_name(kDefaultRouteConfigurationName);
- auto* virtual_host = default_route_config_.add_virtual_hosts();
- virtual_host->add_domains("*");
- auto* route = virtual_host->add_routes();
- route->mutable_match()->set_prefix("");
- route->mutable_route()->set_cluster(kDefaultClusterName);
- SetRdsResource(default_route_config_);
- // Construct LDS response data (with inlined RDS result).
- default_listener_ = BuildListener(default_route_config_);
- SetLdsResource(default_listener_);
- // Construct CDS response data.
- default_cluster_.set_name(kDefaultClusterName);
- default_cluster_.set_type(Cluster::EDS);
- auto* eds_config = default_cluster_.mutable_eds_cluster_config();
- eds_config->mutable_eds_config()->mutable_ads();
- eds_config->set_service_name(kDefaultEdsServiceName);
- default_cluster_.set_lb_policy(Cluster::ROUND_ROBIN);
- if (enable_load_reporting) {
- default_cluster_.mutable_lrs_server()->mutable_self();
- }
- SetCdsResource(default_cluster_);
- }
+ v3_rpc_service_(this, /*is_v2=*/false) {}
bool seen_v2_client() const { return seen_v2_client_; }
bool seen_v3_client() const { return seen_v3_client_; }
@@ -507,12 +525,6 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
return &v3_rpc_service_;
}
- Listener default_listener() const { return default_listener_; }
- RouteConfiguration default_route_config() const {
- return default_route_config_;
- }
- Cluster default_cluster() const { return default_cluster_; }
-
ResponseState lds_response_state() {
grpc_core::MutexLock lock(&ads_mu_);
return resource_type_response_state_[kLdsTypeUrl];
@@ -538,14 +550,24 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
resource_types_to_ignore_.emplace(type_url);
}
+ void SetResourceMinVersion(const TString& type_url, int version) {
+ grpc_core::MutexLock lock(&ads_mu_);
+ resource_type_min_versions_[type_url] = version;
+ }
+
void UnsetResource(const TString& type_url, const TString& name) {
grpc_core::MutexLock lock(&ads_mu_);
- ResourceState& state = resource_map_[type_url][name];
- ++state.version;
- state.resource.reset();
- gpr_log(GPR_INFO, "ADS[%p]: Unsetting %s resource %s to version %u", this,
- type_url.c_str(), name.c_str(), state.version);
- for (SubscriptionState* subscription : state.subscriptions) {
+ ResourceTypeState& resource_type_state = resource_map_[type_url];
+ ++resource_type_state.resource_type_version;
+ ResourceState& resource_state = resource_type_state.resource_name_map[name];
+ resource_state.resource_type_version =
+ resource_type_state.resource_type_version;
+ resource_state.resource.reset();
+ gpr_log(GPR_INFO,
+ "ADS[%p]: Unsetting %s resource %s; resource_type_version now %u",
+ this, type_url.c_str(), name.c_str(),
+ resource_type_state.resource_type_version);
+ for (SubscriptionState* subscription : resource_state.subscriptions) {
subscription->update_queue->emplace_back(type_url, name);
}
}
@@ -553,12 +575,17 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
void SetResource(google::protobuf::Any resource, const TString& type_url,
const TString& name) {
grpc_core::MutexLock lock(&ads_mu_);
- ResourceState& state = resource_map_[type_url][name];
- ++state.version;
- state.resource = std::move(resource);
- gpr_log(GPR_INFO, "ADS[%p]: Updating %s resource %s to version %u", this,
- type_url.c_str(), name.c_str(), state.version);
- for (SubscriptionState* subscription : state.subscriptions) {
+ ResourceTypeState& resource_type_state = resource_map_[type_url];
+ ++resource_type_state.resource_type_version;
+ ResourceState& resource_state = resource_type_state.resource_name_map[name];
+ resource_state.resource_type_version =
+ resource_type_state.resource_type_version;
+ resource_state.resource = std::move(resource);
+ gpr_log(GPR_INFO,
+ "ADS[%p]: Updating %s resource %s; resource_type_version now %u",
+ this, type_url.c_str(), name.c_str(),
+ resource_type_state.resource_type_version);
+ for (SubscriptionState* subscription : resource_state.subscriptions) {
subscription->update_queue->emplace_back(type_url, name);
}
}
@@ -587,68 +614,6 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
SetResource(std::move(resource), kEdsTypeUrl, assignment.cluster_name());
}
- void SetLdsToUseDynamicRds() {
- auto listener = default_listener_;
- HttpConnectionManager http_connection_manager;
- auto* rds = http_connection_manager.mutable_rds();
- rds->set_route_config_name(kDefaultRouteConfigurationName);
- rds->mutable_config_source()->mutable_ads();
- listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
- http_connection_manager);
- SetLdsResource(listener);
- }
-
- static Listener BuildListener(const RouteConfiguration& route_config) {
- HttpConnectionManager http_connection_manager;
- *(http_connection_manager.mutable_route_config()) = route_config;
- Listener listener;
- listener.set_name(kServerName);
- listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
- http_connection_manager);
- return listener;
- }
-
- static ClusterLoadAssignment BuildEdsResource(
- const EdsResourceArgs& args,
- const char* eds_service_name = kDefaultEdsServiceName) {
- ClusterLoadAssignment assignment;
- assignment.set_cluster_name(eds_service_name);
- for (const auto& locality : args.locality_list) {
- auto* endpoints = assignment.add_endpoints();
- endpoints->mutable_load_balancing_weight()->set_value(locality.lb_weight);
- endpoints->set_priority(locality.priority);
- endpoints->mutable_locality()->set_region(kDefaultLocalityRegion);
- endpoints->mutable_locality()->set_zone(kDefaultLocalityZone);
- endpoints->mutable_locality()->set_sub_zone(locality.sub_zone);
- for (size_t i = 0; i < locality.ports.size(); ++i) {
- const int& port = locality.ports[i];
- auto* lb_endpoints = endpoints->add_lb_endpoints();
- if (locality.health_statuses.size() > i &&
- locality.health_statuses[i] != HealthStatus::UNKNOWN) {
- lb_endpoints->set_health_status(locality.health_statuses[i]);
- }
- auto* endpoint = lb_endpoints->mutable_endpoint();
- auto* address = endpoint->mutable_address();
- auto* socket_address = address->mutable_socket_address();
- socket_address->set_address("127.0.0.1");
- socket_address->set_port_value(port);
- }
- }
- if (!args.drop_categories.empty()) {
- auto* policy = assignment.mutable_policy();
- for (const auto& p : args.drop_categories) {
- const TString& name = p.first;
- const uint32_t parts_per_million = p.second;
- auto* drop_overload = policy->add_drop_overloads();
- drop_overload->set_category(name);
- auto* drop_percentage = drop_overload->mutable_drop_percentage();
- drop_percentage->set_numerator(parts_per_million);
- drop_percentage->set_denominator(args.drop_denominator);
- }
- }
- return assignment;
- }
-
void Start() {
grpc_core::MutexLock lock(&ads_mu_);
ads_done_ = false;
@@ -671,7 +636,7 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
void NotifyDoneWithAdsCallLocked() {
if (!ads_done_) {
ads_done_ = true;
- ads_cond_.Broadcast();
+ ads_cond_.SignalAll();
}
}
@@ -688,8 +653,6 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
// A struct representing a client's subscription to a particular resource.
struct SubscriptionState {
- // Version that the client currently knows about.
- int current_version = 0;
// The queue upon which to place updates when the resource is updated.
UpdateQueue* update_queue;
};
@@ -700,20 +663,32 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
using SubscriptionMap =
std::map<TString /* type_url */, SubscriptionNameMap>;
- // A struct representing the current state for a resource:
- // - the version of the resource that is set by the SetResource() methods.
- // - a list of subscriptions interested in this resource.
+ // Sent state for a given resource type.
+ struct SentState {
+ int nonce = 0;
+ int resource_type_version = 0;
+ };
+
+ // A struct representing the current state for an individual resource.
struct ResourceState {
- int version = 0;
+ // The resource itself, if present.
y_absl::optional<google::protobuf::Any> resource;
+ // The resource type version that this resource was last updated in.
+ int resource_type_version = 0;
+ // A list of subscriptions to this resource.
std::set<SubscriptionState*> subscriptions;
};
- // A struct representing the current state for all resources:
- // LDS, CDS, EDS, and RDS for the class as a whole.
+ // The current state for all individual resources of a given type.
using ResourceNameMap =
std::map<TString /* resource_name */, ResourceState>;
- using ResourceMap = std::map<TString /* type_url */, ResourceNameMap>;
+
+ struct ResourceTypeState {
+ int resource_type_version = 0;
+ ResourceNameMap resource_name_map;
+ };
+
+ using ResourceMap = std::map<TString /* type_url */, ResourceTypeState>;
template <class RpcApi, class DiscoveryRequest, class DiscoveryResponse>
class RpcService : public RpcApi::Service {
@@ -732,201 +707,99 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
} else {
parent_->seen_v3_client_ = true;
}
+ // Take a reference of the AdsServiceImpl object, which will go
+ // out of scope when this request handler returns. This ensures
+ // that the parent won't be destroyed until this stream is complete.
+ std::shared_ptr<AdsServiceImpl> ads_service_impl =
+ parent_->shared_from_this();
// Resources (type/name pairs) that have changed since the client
// subscribed to them.
UpdateQueue update_queue;
// Resources that the client will be subscribed to keyed by resource type
// url.
SubscriptionMap subscription_map;
- [&]() {
+ // Sent state for each resource type.
+ std::map<TString /*type_url*/, SentState> sent_state_map;
+ // Spawn a thread to read requests from the stream.
+ // Requests will be delivered to this thread in a queue.
+ std::deque<DiscoveryRequest> requests;
+ bool stream_closed = false;
+ std::thread reader(std::bind(&RpcService::BlockingRead, this, stream,
+ &requests, &stream_closed));
+ // Main loop to process requests and updates.
+ while (true) {
+ // Boolean to keep track if the loop received any work to do: a
+ // request or an update; regardless whether a response was actually
+ // sent out.
+ bool did_work = false;
+ // Look for new requests and and decide what to handle.
+ y_absl::optional<DiscoveryResponse> response;
{
grpc_core::MutexLock lock(&parent_->ads_mu_);
- if (parent_->ads_done_) return;
- }
- // Balancer shouldn't receive the call credentials metadata.
- EXPECT_EQ(context->client_metadata().find(g_kCallCredsMdKey),
- context->client_metadata().end());
- // Current Version map keyed by resource type url.
- std::map<TString, int> resource_type_version;
- // Creating blocking thread to read from stream.
- std::deque<DiscoveryRequest> requests;
- bool stream_closed = false;
- // Take a reference of the AdsServiceImpl object, reference will go
- // out of scope after the reader thread is joined.
- std::shared_ptr<AdsServiceImpl> ads_service_impl =
- parent_->shared_from_this();
- std::thread reader(std::bind(&RpcService::BlockingRead, this, stream,
- &requests, &stream_closed));
- // Main loop to look for requests and updates.
- while (true) {
- // Look for new requests and and decide what to handle.
- y_absl::optional<DiscoveryResponse> response;
- // Boolean to keep track if the loop received any work to do: a
- // request or an update; regardless whether a response was actually
- // sent out.
- bool did_work = false;
- {
- grpc_core::MutexLock lock(&parent_->ads_mu_);
- if (stream_closed) break;
- if (!requests.empty()) {
- DiscoveryRequest request = std::move(requests.front());
- requests.pop_front();
- did_work = true;
- gpr_log(GPR_INFO,
- "ADS[%p]: Received request for type %s with content %s",
- this, request.type_url().c_str(),
- request.DebugString().c_str());
- const TString v3_resource_type =
- TypeUrlToV3(request.type_url());
- // As long as we are not in shutdown, identify ACK and NACK by
- // looking for version information and comparing it to nonce (this
- // server ensures they are always set to the same in a response.)
- auto it =
- parent_->resource_type_response_state_.find(v3_resource_type);
- if (it != parent_->resource_type_response_state_.end()) {
- if (!request.response_nonce().empty()) {
- it->second.state =
- (!request.version_info().empty() &&
- request.version_info() == request.response_nonce())
- ? ResponseState::ACKED
- : ResponseState::NACKED;
- }
- if (request.has_error_detail()) {
- it->second.error_message = request.error_detail().message();
- }
- }
- // As long as the test did not tell us to ignore this type of
- // request, look at all the resource names.
- if (parent_->resource_types_to_ignore_.find(v3_resource_type) ==
- parent_->resource_types_to_ignore_.end()) {
- auto& subscription_name_map =
- subscription_map[v3_resource_type];
- auto& resource_name_map =
- parent_->resource_map_[v3_resource_type];
- std::set<TString> resources_in_current_request;
- std::set<TString> resources_added_to_response;
- for (const TString& resource_name :
- request.resource_names()) {
- resources_in_current_request.emplace(resource_name);
- auto& subscription_state =
- subscription_name_map[resource_name];
- auto& resource_state = resource_name_map[resource_name];
- // Subscribe if needed.
- parent_->MaybeSubscribe(v3_resource_type, resource_name,
- &subscription_state, &resource_state,
- &update_queue);
- // Send update if needed.
- if (ClientNeedsResourceUpdate(resource_state,
- &subscription_state)) {
- gpr_log(GPR_INFO,
- "ADS[%p]: Sending update for type=%s name=%s "
- "version=%d",
- this, request.type_url().c_str(),
- resource_name.c_str(), resource_state.version);
- resources_added_to_response.emplace(resource_name);
- if (!response.has_value()) response.emplace();
- if (resource_state.resource.has_value()) {
- auto* resource = response->add_resources();
- resource->CopyFrom(resource_state.resource.value());
- if (is_v2_) {
- resource->set_type_url(request.type_url());
- }
- }
- } else {
- gpr_log(GPR_INFO,
- "ADS[%p]: client does not need update for "
- "type=%s name=%s version=%d",
- this, request.type_url().c_str(),
- resource_name.c_str(), resource_state.version);
- }
- }
- // Process unsubscriptions for any resource no longer
- // present in the request's resource list.
- parent_->ProcessUnsubscriptions(
- v3_resource_type, resources_in_current_request,
- &subscription_name_map, &resource_name_map);
- // Send response if needed.
- if (!resources_added_to_response.empty()) {
- CompleteBuildingDiscoveryResponse(
- v3_resource_type, request.type_url(),
- ++resource_type_version[v3_resource_type],
- subscription_name_map, resources_added_to_response,
- &response.value());
- }
- }
- }
- }
- if (response.has_value()) {
- gpr_log(GPR_INFO, "ADS[%p]: Sending response: %s", this,
- response->DebugString().c_str());
- stream->Write(response.value());
+ // If the stream has been closed or our parent is being shut
+ // down, stop immediately.
+ if (stream_closed || parent_->ads_done_) break;
+ // Otherwise, see if there's a request to read from the queue.
+ if (!requests.empty()) {
+ DiscoveryRequest request = std::move(requests.front());
+ requests.pop_front();
+ did_work = true;
+ gpr_log(GPR_INFO,
+ "ADS[%p]: Received request for type %s with content %s",
+ this, request.type_url().c_str(),
+ request.DebugString().c_str());
+ const TString v3_resource_type =
+ TypeUrlToV3(request.type_url());
+ SentState& sent_state = sent_state_map[v3_resource_type];
+ // Process request.
+ ProcessRequest(request, v3_resource_type, &update_queue,
+ &subscription_map, &sent_state, &response);
}
- response.reset();
- // Look for updates and decide what to handle.
- {
- grpc_core::MutexLock lock(&parent_->ads_mu_);
- if (!update_queue.empty()) {
- const TString resource_type =
- std::move(update_queue.front().first);
- const TString resource_name =
- std::move(update_queue.front().second);
- update_queue.pop_front();
- const TString v2_resource_type = TypeUrlToV2(resource_type);
- did_work = true;
- gpr_log(GPR_INFO, "ADS[%p]: Received update for type=%s name=%s",
- this, resource_type.c_str(), resource_name.c_str());
- auto& subscription_name_map = subscription_map[resource_type];
- auto& resource_name_map = parent_->resource_map_[resource_type];
- auto it = subscription_name_map.find(resource_name);
- if (it != subscription_name_map.end()) {
- SubscriptionState& subscription_state = it->second;
- ResourceState& resource_state =
- resource_name_map[resource_name];
- if (ClientNeedsResourceUpdate(resource_state,
- &subscription_state)) {
- gpr_log(
- GPR_INFO,
- "ADS[%p]: Sending update for type=%s name=%s version=%d",
- this, resource_type.c_str(), resource_name.c_str(),
- resource_state.version);
- response.emplace();
- if (resource_state.resource.has_value()) {
- auto* resource = response->add_resources();
- resource->CopyFrom(resource_state.resource.value());
- if (is_v2_) {
- resource->set_type_url(v2_resource_type);
- }
- }
- CompleteBuildingDiscoveryResponse(
- resource_type, v2_resource_type,
- ++resource_type_version[resource_type],
- subscription_name_map, {resource_name},
- &response.value());
- }
- }
- }
- }
- if (response.has_value()) {
- gpr_log(GPR_INFO, "ADS[%p]: Sending update response: %s", this,
- response->DebugString().c_str());
- stream->Write(response.value());
+ }
+ if (response.has_value()) {
+ gpr_log(GPR_INFO, "ADS[%p]: Sending response: %s", this,
+ response->DebugString().c_str());
+ stream->Write(response.value());
+ }
+ response.reset();
+ // Look for updates and decide what to handle.
+ {
+ grpc_core::MutexLock lock(&parent_->ads_mu_);
+ if (!update_queue.empty()) {
+ const TString resource_type =
+ std::move(update_queue.front().first);
+ const TString resource_name =
+ std::move(update_queue.front().second);
+ update_queue.pop_front();
+ did_work = true;
+ SentState& sent_state = sent_state_map[resource_type];
+ ProcessUpdate(resource_type, resource_name, &subscription_map,
+ &sent_state, &response);
}
- // If we didn't find anything to do, delay before the next loop
- // iteration; otherwise, check whether we should exit and then
- // immediately continue.
- gpr_timespec deadline =
- grpc_timeout_milliseconds_to_deadline(did_work ? 0 : 10);
- {
- grpc_core::MutexLock lock(&parent_->ads_mu_);
- if (!parent_->ads_cond_.WaitUntil(
- &parent_->ads_mu_, [this] { return parent_->ads_done_; },
- deadline)) {
- break;
- }
+ }
+ if (response.has_value()) {
+ gpr_log(GPR_INFO, "ADS[%p]: Sending update response: %s", this,
+ response->DebugString().c_str());
+ stream->Write(response.value());
+ }
+ // If we didn't find anything to do, delay before the next loop
+ // iteration; otherwise, check whether we should exit and then
+ // immediately continue.
+ gpr_timespec deadline =
+ grpc_timeout_milliseconds_to_deadline(did_work ? 0 : 10);
+ {
+ grpc_core::MutexLock lock(&parent_->ads_mu_);
+ if (!grpc_core::WaitUntilWithDeadline(
+ &parent_->ads_cond_, &parent_->ads_mu_,
+ [this] { return parent_->ads_done_; },
+ grpc_core::ToAbslTime(deadline))) {
+ break;
}
}
- reader.join();
- }();
+ }
+ // Done with main loop. Clean up before returning.
+ // Join reader thread.
+ reader.join();
// Clean up any subscriptions that were still active when the call
// finished.
{
@@ -937,8 +810,9 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
for (auto& q : subscription_name_map) {
const TString& resource_name = q.first;
SubscriptionState& subscription_state = q.second;
- ResourceState& resource_state =
- parent_->resource_map_[type_url][resource_name];
+ ResourceNameMap& resource_name_map =
+ parent_->resource_map_[type_url].resource_name_map;
+ ResourceState& resource_state = resource_name_map[resource_name];
resource_state.subscriptions.erase(&subscription_state);
}
}
@@ -949,20 +823,140 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
}
private:
- static TString TypeUrlToV2(const TString& resource_type) {
- if (resource_type == kLdsTypeUrl) return kLdsV2TypeUrl;
- if (resource_type == kRdsTypeUrl) return kRdsV2TypeUrl;
- if (resource_type == kCdsTypeUrl) return kCdsV2TypeUrl;
- if (resource_type == kEdsTypeUrl) return kEdsV2TypeUrl;
- return resource_type;
+ // Processes a response read from the client.
+ // Populates response if needed.
+ void ProcessRequest(const DiscoveryRequest& request,
+ const TString& v3_resource_type,
+ UpdateQueue* update_queue,
+ SubscriptionMap* subscription_map,
+ SentState* sent_state,
+ y_absl::optional<DiscoveryResponse>* response) {
+ // Check the nonce sent by the client, if any.
+ // (This will be absent on the first request on a stream.)
+ if (request.response_nonce().empty()) {
+ int client_resource_type_version = 0;
+ if (!request.version_info().empty()) {
+ GPR_ASSERT(y_absl::SimpleAtoi(request.version_info(),
+ &client_resource_type_version));
+ }
+ EXPECT_GE(client_resource_type_version,
+ parent_->resource_type_min_versions_[v3_resource_type])
+ << "resource_type: " << v3_resource_type;
+ } else {
+ int client_nonce;
+ GPR_ASSERT(y_absl::SimpleAtoi(request.response_nonce(), &client_nonce));
+ // Ignore requests with stale nonces.
+ if (client_nonce < sent_state->nonce) return;
+ // Check for ACK or NACK.
+ auto it = parent_->resource_type_response_state_.find(v3_resource_type);
+ if (it != parent_->resource_type_response_state_.end()) {
+ if (!request.has_error_detail()) {
+ it->second.state = ResponseState::ACKED;
+ it->second.error_message.clear();
+ gpr_log(GPR_INFO,
+ "ADS[%p]: client ACKed resource_type=%s version=%s", this,
+ request.type_url().c_str(), request.version_info().c_str());
+ } else {
+ it->second.state = ResponseState::NACKED;
+ EXPECT_EQ(request.error_detail().code(),
+ GRPC_STATUS_INVALID_ARGUMENT);
+ it->second.error_message = request.error_detail().message();
+ gpr_log(GPR_INFO,
+ "ADS[%p]: client NACKed resource_type=%s version=%s: %s",
+ this, request.type_url().c_str(),
+ request.version_info().c_str(),
+ it->second.error_message.c_str());
+ }
+ }
+ }
+ // Ignore resource types as requested by tests.
+ if (parent_->resource_types_to_ignore_.find(v3_resource_type) !=
+ parent_->resource_types_to_ignore_.end()) {
+ return;
+ }
+ // Look at all the resource names in the request.
+ auto& subscription_name_map = (*subscription_map)[v3_resource_type];
+ auto& resource_type_state = parent_->resource_map_[v3_resource_type];
+ auto& resource_name_map = resource_type_state.resource_name_map;
+ std::set<TString> resources_in_current_request;
+ std::set<TString> resources_added_to_response;
+ for (const TString& resource_name : request.resource_names()) {
+ resources_in_current_request.emplace(resource_name);
+ auto& subscription_state = subscription_name_map[resource_name];
+ auto& resource_state = resource_name_map[resource_name];
+ // Subscribe if needed.
+ // Send the resource in the response if either (a) this is
+ // a new subscription or (b) there is an updated version of
+ // this resource to send.
+ if (parent_->MaybeSubscribe(v3_resource_type, resource_name,
+ &subscription_state, &resource_state,
+ update_queue) ||
+ ClientNeedsResourceUpdate(resource_type_state, resource_state,
+ sent_state->resource_type_version)) {
+ gpr_log(GPR_INFO, "ADS[%p]: Sending update for type=%s name=%s", this,
+ request.type_url().c_str(), resource_name.c_str());
+ resources_added_to_response.emplace(resource_name);
+ if (!response->has_value()) response->emplace();
+ if (resource_state.resource.has_value()) {
+ auto* resource = (*response)->add_resources();
+ resource->CopyFrom(resource_state.resource.value());
+ if (is_v2_) {
+ resource->set_type_url(request.type_url());
+ }
+ }
+ } else {
+ gpr_log(GPR_INFO,
+ "ADS[%p]: client does not need update for type=%s name=%s",
+ this, request.type_url().c_str(), resource_name.c_str());
+ }
+ }
+ // Process unsubscriptions for any resource no longer
+ // present in the request's resource list.
+ parent_->ProcessUnsubscriptions(
+ v3_resource_type, resources_in_current_request,
+ &subscription_name_map, &resource_name_map);
+ // Construct response if needed.
+ if (!resources_added_to_response.empty()) {
+ CompleteBuildingDiscoveryResponse(
+ v3_resource_type, request.type_url(),
+ resource_type_state.resource_type_version, subscription_name_map,
+ resources_added_to_response, sent_state, &response->value());
+ }
}
- static TString TypeUrlToV3(const TString& resource_type) {
- if (resource_type == kLdsV2TypeUrl) return kLdsTypeUrl;
- if (resource_type == kRdsV2TypeUrl) return kRdsTypeUrl;
- if (resource_type == kCdsV2TypeUrl) return kCdsTypeUrl;
- if (resource_type == kEdsV2TypeUrl) return kEdsTypeUrl;
- return resource_type;
+ // Processes a resource update from the test.
+ // Populates response if needed.
+ void ProcessUpdate(const TString& resource_type,
+ const TString& resource_name,
+ SubscriptionMap* subscription_map, SentState* sent_state,
+ y_absl::optional<DiscoveryResponse>* response) {
+ const TString v2_resource_type = TypeUrlToV2(resource_type);
+ gpr_log(GPR_INFO, "ADS[%p]: Received update for type=%s name=%s", this,
+ resource_type.c_str(), resource_name.c_str());
+ auto& subscription_name_map = (*subscription_map)[resource_type];
+ auto& resource_type_state = parent_->resource_map_[resource_type];
+ auto& resource_name_map = resource_type_state.resource_name_map;
+ auto it = subscription_name_map.find(resource_name);
+ if (it != subscription_name_map.end()) {
+ ResourceState& resource_state = resource_name_map[resource_name];
+ if (ClientNeedsResourceUpdate(resource_type_state, resource_state,
+ sent_state->resource_type_version)) {
+ gpr_log(GPR_INFO, "ADS[%p]: Sending update for type=%s name=%s", this,
+ resource_type.c_str(), resource_name.c_str());
+ response->emplace();
+ if (resource_state.resource.has_value()) {
+ auto* resource = (*response)->add_resources();
+ resource->CopyFrom(resource_state.resource.value());
+ if (is_v2_) {
+ resource->set_type_url(v2_resource_type);
+ }
+ }
+ CompleteBuildingDiscoveryResponse(
+ resource_type, v2_resource_type,
+ resource_type_state.resource_type_version, subscription_name_map,
+ {resource_name}, sent_state, &response->value());
+ }
+ }
}
// Starting a thread to do blocking read on the stream until cancel.
@@ -989,29 +983,21 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
*stream_closed = true;
}
- static void CheckBuildVersion(
- const ::envoy::api::v2::DiscoveryRequest& request) {
- EXPECT_FALSE(request.node().build_version().empty());
- }
-
- static void CheckBuildVersion(
- const ::envoy::service::discovery::v3::DiscoveryRequest& request) {}
-
// Completing the building a DiscoveryResponse by adding common information
// for all resources and by adding all subscribed resources for LDS and CDS.
void CompleteBuildingDiscoveryResponse(
const TString& resource_type, const TString& v2_resource_type,
const int version, const SubscriptionNameMap& subscription_name_map,
const std::set<TString>& resources_added_to_response,
- DiscoveryResponse* response) {
+ SentState* sent_state, DiscoveryResponse* response) {
auto& response_state =
parent_->resource_type_response_state_[resource_type];
if (response_state.state == ResponseState::NOT_SENT) {
response_state.state = ResponseState::SENT;
}
response->set_type_url(is_v2_ ? v2_resource_type : resource_type);
- response->set_version_info(y_absl::StrCat(version));
- response->set_nonce(y_absl::StrCat(version));
+ response->set_version_info(ToString(version));
+ response->set_nonce(ToString(++sent_state->nonce));
if (resource_type == kLdsTypeUrl || resource_type == kCdsTypeUrl) {
// For LDS and CDS we must send back all subscribed resources
// (even the unchanged ones)
@@ -1019,8 +1005,10 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
const TString& resource_name = p.first;
if (resources_added_to_response.find(resource_name) ==
resources_added_to_response.end()) {
+ ResourceNameMap& resource_name_map =
+ parent_->resource_map_[resource_type].resource_name_map;
const ResourceState& resource_state =
- parent_->resource_map_[resource_type][resource_name];
+ resource_name_map[resource_name];
if (resource_state.resource.has_value()) {
auto* resource = response->add_resources();
resource->CopyFrom(resource_state.resource.value());
@@ -1031,39 +1019,64 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
}
}
}
+ sent_state->resource_type_version = version;
}
+ static TString TypeUrlToV2(const TString& resource_type) {
+ if (resource_type == kLdsTypeUrl) return kLdsV2TypeUrl;
+ if (resource_type == kRdsTypeUrl) return kRdsV2TypeUrl;
+ if (resource_type == kCdsTypeUrl) return kCdsV2TypeUrl;
+ if (resource_type == kEdsTypeUrl) return kEdsV2TypeUrl;
+ return resource_type;
+ }
+
+ static TString TypeUrlToV3(const TString& resource_type) {
+ if (resource_type == kLdsV2TypeUrl) return kLdsTypeUrl;
+ if (resource_type == kRdsV2TypeUrl) return kRdsTypeUrl;
+ if (resource_type == kCdsV2TypeUrl) return kCdsTypeUrl;
+ if (resource_type == kEdsV2TypeUrl) return kEdsTypeUrl;
+ return resource_type;
+ }
+
+ static void CheckBuildVersion(
+ const ::envoy::api::v2::DiscoveryRequest& request) {
+ EXPECT_FALSE(request.node().build_version().empty());
+ }
+
+ static void CheckBuildVersion(
+ const ::envoy::service::discovery::v3::DiscoveryRequest& /*request*/) {}
+
AdsServiceImpl* parent_;
const bool is_v2_;
};
// Checks whether the client needs to receive a newer version of
- // the resource. If so, updates subscription_state->current_version and
- // returns true.
- static bool ClientNeedsResourceUpdate(const ResourceState& resource_state,
- SubscriptionState* subscription_state) {
- if (subscription_state->current_version < resource_state.version) {
- subscription_state->current_version = resource_state.version;
- return true;
- }
- return false;
+ // the resource.
+ static bool ClientNeedsResourceUpdate(
+ const ResourceTypeState& resource_type_state,
+ const ResourceState& resource_state, int client_resource_type_version) {
+ return client_resource_type_version <
+ resource_type_state.resource_type_version &&
+ resource_state.resource_type_version <=
+ resource_type_state.resource_type_version;
}
// Subscribes to a resource if not already subscribed:
// 1. Sets the update_queue field in subscription_state.
// 2. Adds subscription_state to resource_state->subscriptions.
- void MaybeSubscribe(const TString& resource_type,
+ bool MaybeSubscribe(const TString& resource_type,
const TString& resource_name,
SubscriptionState* subscription_state,
ResourceState* resource_state,
UpdateQueue* update_queue) {
// The update_queue will be null if we were not previously subscribed.
- if (subscription_state->update_queue != nullptr) return;
+ if (subscription_state->update_queue != nullptr) return false;
subscription_state->update_queue = update_queue;
resource_state->subscriptions.emplace(subscription_state);
gpr_log(GPR_INFO, "ADS[%p]: subscribe to resource type %s name %s state %p",
this, resource_type.c_str(), resource_name.c_str(),
&subscription_state);
+ return true;
}
// Removes subscriptions for resources no longer present in the
@@ -1123,12 +1136,10 @@ class AdsServiceImpl : public std::enable_shared_from_this<AdsServiceImpl> {
// Protect the members below.
grpc_core::Mutex ads_mu_;
bool ads_done_ = false;
- Listener default_listener_;
- RouteConfiguration default_route_config_;
- Cluster default_cluster_;
std::map<TString /* type_url */, ResponseState>
resource_type_response_state_;
std::set<TString /*resource_type*/> resource_types_to_ignore_;
+ std::map<TString /*resource_type*/, int> resource_type_min_versions_;
// An instance data member containing the current state of all resources.
// Note that an entry will exist whenever either of the following is true:
// - The resource exists (i.e., has been created by SetResource() and has not
@@ -1193,8 +1204,8 @@ class LrsServiceImpl : public std::enable_shared_from_this<LrsServiceImpl> {
grpc_core::CondVar cv;
if (result_queue_.empty()) {
load_report_cond_ = &cv;
- load_report_cond_->WaitUntil(&load_report_mu_,
- [this] { return !result_queue_.empty(); });
+ grpc_core::WaitUntil(load_report_cond_, &load_report_mu_,
+ [this] { return !result_queue_.empty(); });
load_report_cond_ = nullptr;
}
std::vector<ClientStats> result = std::move(result_queue_.front());
@@ -1261,8 +1272,8 @@ class LrsServiceImpl : public std::enable_shared_from_this<LrsServiceImpl> {
}
// Wait until notified done.
grpc_core::MutexLock lock(&parent_->lrs_mu_);
- parent_->lrs_cv_.WaitUntil(&parent_->lrs_mu_,
- [this] { return parent_->lrs_done_; });
+ grpc_core::WaitUntil(&parent_->lrs_cv_, &parent_->lrs_mu_,
+ [this] { return parent_->lrs_done_; });
}
gpr_log(GPR_INFO, "LRS[%p]: StreamLoadStats done", this);
return Status::OK;
@@ -1275,7 +1286,7 @@ class LrsServiceImpl : public std::enable_shared_from_this<LrsServiceImpl> {
void NotifyDoneWithLrsCallLocked() {
if (!lrs_done_) {
lrs_done_ = true;
- lrs_cv_.Broadcast();
+ lrs_cv_.SignalAll();
}
}
@@ -1303,60 +1314,382 @@ class LrsServiceImpl : public std::enable_shared_from_this<LrsServiceImpl> {
class TestType {
public:
- TestType(bool use_xds_resolver, bool enable_load_reporting,
- bool enable_rds_testing = false, bool use_v2 = false)
- : use_xds_resolver_(use_xds_resolver),
- enable_load_reporting_(enable_load_reporting),
- enable_rds_testing_(enable_rds_testing),
- use_v2_(use_v2) {}
-
- bool use_xds_resolver() const { return use_xds_resolver_; }
+ enum FilterConfigSetup {
+ // Set the fault injection filter directly from LDS
+ kHTTPConnectionManagerOriginal,
+ // Enable the fault injection filter in LDS, but override the filter config
+ // in route.
+ kRouteOverride,
+ };
+
+ TestType& set_use_fake_resolver() {
+ use_fake_resolver_ = true;
+ return *this;
+ }
+
+ TestType& set_enable_load_reporting() {
+ enable_load_reporting_ = true;
+ return *this;
+ }
+
+ TestType& set_enable_rds_testing() {
+ enable_rds_testing_ = true;
+ return *this;
+ }
+
+ TestType& set_use_v2() {
+ use_v2_ = true;
+ return *this;
+ }
+
+ TestType& set_use_xds_credentials() {
+ use_xds_credentials_ = true;
+ return *this;
+ }
+
+ TestType& set_use_csds_streaming() {
+ use_csds_streaming_ = true;
+ return *this;
+ }
+
+ TestType& set_filter_config_setup(const FilterConfigSetup& setup) {
+ filter_config_setup_ = setup;
+ return *this;
+ }
+
+ bool use_fake_resolver() const { return use_fake_resolver_; }
bool enable_load_reporting() const { return enable_load_reporting_; }
bool enable_rds_testing() const { return enable_rds_testing_; }
bool use_v2() const { return use_v2_; }
+ bool use_xds_credentials() const { return use_xds_credentials_; }
+ bool use_csds_streaming() const { return use_csds_streaming_; }
+ const FilterConfigSetup& filter_config_setup() const {
+ return filter_config_setup_;
+ }
TString AsString() const {
- TString retval = (use_xds_resolver_ ? "XdsResolver" : "FakeResolver");
+ TString retval = (use_fake_resolver_ ? "FakeResolver" : "XdsResolver");
retval += (use_v2_ ? "V2" : "V3");
if (enable_load_reporting_) retval += "WithLoadReporting";
if (enable_rds_testing_) retval += "Rds";
+ if (use_xds_credentials_) retval += "XdsCreds";
+ if (use_csds_streaming_) retval += "CsdsStreaming";
+ if (filter_config_setup_ == kRouteOverride) {
+ retval += "FilterPerRouteOverride";
+ }
return retval;
}
private:
- const bool use_xds_resolver_;
- const bool enable_load_reporting_;
- const bool enable_rds_testing_;
- const bool use_v2_;
+ bool use_fake_resolver_ = false;
+ bool enable_load_reporting_ = false;
+ bool enable_rds_testing_ = false;
+ bool use_v2_ = false;
+ bool use_xds_credentials_ = false;
+ bool use_csds_streaming_ = false;
+ FilterConfigSetup filter_config_setup_ = kHTTPConnectionManagerOriginal;
+};
+
+TString ReadFile(const char* file_path) {
+ grpc_slice slice;
+ GPR_ASSERT(
+ GRPC_LOG_IF_ERROR("load_file", grpc_load_file(file_path, 0, &slice)));
+ TString file_contents(grpc_core::StringViewFromSlice(slice));
+ grpc_slice_unref(slice);
+ return file_contents;
+}
+
+grpc_core::PemKeyCertPairList ReadTlsIdentityPair(const char* key_path,
+ const char* cert_path) {
+ return grpc_core::PemKeyCertPairList{
+ grpc_core::PemKeyCertPair(ReadFile(key_path), ReadFile(cert_path))};
+}
+
+// Based on StaticDataCertificateProvider, but provides alternate certificates
+// if the certificate name is not empty.
+class FakeCertificateProvider final : public grpc_tls_certificate_provider {
+ public:
+ struct CertData {
+ TString root_certificate;
+ grpc_core::PemKeyCertPairList identity_key_cert_pairs;
+ };
+
+ using CertDataMap = std::map<TString /*cert_name */, CertData>;
+
+ explicit FakeCertificateProvider(CertDataMap cert_data_map)
+ : distributor_(
+ grpc_core::MakeRefCounted<grpc_tls_certificate_distributor>()),
+ cert_data_map_(std::move(cert_data_map)) {
+ distributor_->SetWatchStatusCallback([this](TString cert_name,
+ bool root_being_watched,
+ bool identity_being_watched) {
+ if (!root_being_watched && !identity_being_watched) return;
+ auto it = cert_data_map_.find(cert_name);
+ if (it == cert_data_map_.end()) {
+ grpc_error* error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(
+ y_absl::StrCat("No certificates available for cert_name \"",
+ cert_name, "\"")
+ .c_str());
+ distributor_->SetErrorForCert(cert_name, GRPC_ERROR_REF(error),
+ GRPC_ERROR_REF(error));
+ GRPC_ERROR_UNREF(error);
+ } else {
+ y_absl::optional<TString> root_certificate;
+ y_absl::optional<grpc_core::PemKeyCertPairList> pem_key_cert_pairs;
+ if (root_being_watched) {
+ root_certificate = it->second.root_certificate;
+ }
+ if (identity_being_watched) {
+ pem_key_cert_pairs = it->second.identity_key_cert_pairs;
+ }
+ distributor_->SetKeyMaterials(cert_name, std::move(root_certificate),
+ std::move(pem_key_cert_pairs));
+ }
+ });
+ }
+
+ ~FakeCertificateProvider() override {
+ distributor_->SetWatchStatusCallback(nullptr);
+ }
+
+ grpc_core::RefCountedPtr<grpc_tls_certificate_distributor> distributor()
+ const override {
+ return distributor_;
+ }
+
+ private:
+ grpc_core::RefCountedPtr<grpc_tls_certificate_distributor> distributor_;
+ CertDataMap cert_data_map_;
+};
+
+class FakeCertificateProviderFactory
+ : public grpc_core::CertificateProviderFactory {
+ public:
+ class Config : public grpc_core::CertificateProviderFactory::Config {
+ public:
+ explicit Config(const char* name) : name_(name) {}
+
+ const char* name() const override { return name_; }
+
+ TString ToString() const override { return "{}"; }
+
+ private:
+ const char* name_;
+ };
+
+ FakeCertificateProviderFactory(
+ const char* name, FakeCertificateProvider::CertDataMap** cert_data_map)
+ : name_(name), cert_data_map_(cert_data_map) {
+ GPR_ASSERT(cert_data_map != nullptr);
+ }
+
+ const char* name() const override { return name_; }
+
+ grpc_core::RefCountedPtr<grpc_core::CertificateProviderFactory::Config>
+ CreateCertificateProviderConfig(const grpc_core::Json& /*config_json*/,
+ grpc_error** /*error*/) override {
+ return grpc_core::MakeRefCounted<Config>(name_);
+ }
+
+ grpc_core::RefCountedPtr<grpc_tls_certificate_provider>
+ CreateCertificateProvider(
+ grpc_core::RefCountedPtr<grpc_core::CertificateProviderFactory::Config>
+ /*config*/) override {
+ if (*cert_data_map_ == nullptr) return nullptr;
+ return grpc_core::MakeRefCounted<FakeCertificateProvider>(**cert_data_map_);
+ }
+
+ private:
+ const char* name_;
+ FakeCertificateProvider::CertDataMap** cert_data_map_;
};
+// Global variables for each provider.
+FakeCertificateProvider::CertDataMap* g_fake1_cert_data_map = nullptr;
+FakeCertificateProvider::CertDataMap* g_fake2_cert_data_map = nullptr;
+
+int ServerAuthCheckSchedule(void* /* config_user_data */,
+ grpc_tls_server_authorization_check_arg* arg) {
+ arg->success = 1;
+ arg->status = GRPC_STATUS_OK;
+ return 0; /* synchronous check */
+}
+
+std::shared_ptr<ChannelCredentials> CreateTlsFallbackCredentials() {
+ // TODO(yashykt): Switch to using C++ API once b/173823806 is fixed.
+ grpc_tls_credentials_options* options = grpc_tls_credentials_options_create();
+ grpc_tls_credentials_options_set_server_verification_option(
+ options, GRPC_TLS_SKIP_HOSTNAME_VERIFICATION);
+ grpc_tls_credentials_options_set_certificate_provider(
+ options,
+ grpc_core::MakeRefCounted<grpc_core::StaticDataCertificateProvider>(
+ ReadFile(kCaCertPath),
+ ReadTlsIdentityPair(kServerKeyPath, kServerCertPath))
+ .get());
+ grpc_tls_credentials_options_watch_root_certs(options);
+ grpc_tls_credentials_options_watch_identity_key_cert_pairs(options);
+ grpc_tls_server_authorization_check_config* check_config =
+ grpc_tls_server_authorization_check_config_create(
+ nullptr, ServerAuthCheckSchedule, nullptr, nullptr);
+ grpc_tls_credentials_options_set_server_authorization_check_config(
+ options, check_config);
+ auto channel_creds = std::make_shared<SecureChannelCredentials>(
+ grpc_tls_credentials_create(options));
+ grpc_tls_server_authorization_check_config_release(check_config);
+ return channel_creds;
+}
+
+// A No-op HTTP filter used for verifying parsing logic.
+class NoOpHttpFilter : public grpc_core::XdsHttpFilterImpl {
+ public:
+ NoOpHttpFilter(TString name, bool supported_on_clients,
+ bool supported_on_servers)
+ : name_(std::move(name)),
+ supported_on_clients_(supported_on_clients),
+ supported_on_servers_(supported_on_servers) {}
+
+ void PopulateSymtab(upb_symtab* /* symtab */) const override {}
+
+ y_absl::StatusOr<grpc_core::XdsHttpFilterImpl::FilterConfig>
+ GenerateFilterConfig(upb_strview /* serialized_filter_config */,
+ upb_arena* /* arena */) const override {
+ return grpc_core::XdsHttpFilterImpl::FilterConfig{name_, grpc_core::Json()};
+ }
+
+ y_absl::StatusOr<grpc_core::XdsHttpFilterImpl::FilterConfig>
+ GenerateFilterConfigOverride(upb_strview /*serialized_filter_config*/,
+ upb_arena* /*arena*/) const override {
+ return grpc_core::XdsHttpFilterImpl::FilterConfig{name_, grpc_core::Json()};
+ }
+
+ const grpc_channel_filter* channel_filter() const override { return nullptr; }
+
+ y_absl::StatusOr<grpc_core::XdsHttpFilterImpl::ServiceConfigJsonEntry>
+ GenerateServiceConfig(
+ const FilterConfig& /*hcm_filter_config*/,
+ const FilterConfig* /*filter_config_override*/) const override {
+ return grpc_core::XdsHttpFilterImpl::ServiceConfigJsonEntry{name_, ""};
+ }
+
+ bool IsSupportedOnClients() const override { return supported_on_clients_; }
+
+ bool IsSupportedOnServers() const override { return supported_on_servers_; }
+
+ private:
+ const TString name_;
+ const bool supported_on_clients_;
+ const bool supported_on_servers_;
+};
+
+namespace {
+
+void* response_generator_arg_copy(void* p) {
+ auto* generator = static_cast<grpc_core::FakeResolverResponseGenerator*>(p);
+ generator->Ref().release();
+ return p;
+}
+
+void response_generator_arg_destroy(void* p) {
+ auto* generator = static_cast<grpc_core::FakeResolverResponseGenerator*>(p);
+ generator->Unref();
+}
+
+int response_generator_cmp(void* a, void* b) { return GPR_ICMP(a, b); }
+
+const grpc_arg_pointer_vtable
+ kLogicalDnsClusterResolverResponseGeneratorVtable = {
+ response_generator_arg_copy, response_generator_arg_destroy,
+ response_generator_cmp};
+
+// There is slight difference between time fetched by GPR and by C++ system
+// clock API. It's unclear if they are using the same syscall, but we do know
+// GPR round the number at millisecond-level. This creates a 1ms difference,
+// which could cause flake.
+grpc_millis NowFromCycleCounter() {
+ gpr_cycle_counter now = gpr_get_cycle_counter();
+ return grpc_cycle_counter_to_millis_round_up(now);
+}
+
+} // namespace
+
class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
protected:
+ // TODO(roth): We currently set the number of backends and number of
+ // balancers on a per-test-suite basis, not a per-test-case basis.
+ // However, not every individual test case in a given test suite uses
+ // the same number of backends or balancers, so we wind up having to
+ // set the numbers for the test suite to the max number needed by any
+ // one test case in that test suite. This results in starting more
+ // servers (and using more ports) than we actually need. When we have
+ // time, change each test to directly start the number of backends and
+ // balancers that it needs, so that we aren't wasting resources.
XdsEnd2endTest(size_t num_backends, size_t num_balancers,
- int client_load_reporting_interval_seconds = 100)
+ int client_load_reporting_interval_seconds = 100,
+ bool use_xds_enabled_server = false,
+ bool bootstrap_contents_from_env_var = false)
: num_backends_(num_backends),
num_balancers_(num_balancers),
client_load_reporting_interval_seconds_(
- client_load_reporting_interval_seconds) {}
-
- static void SetUpTestCase() {
- // Make the backup poller poll very frequently in order to pick up
- // updates from all the subchannels's FDs.
- GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 1);
-#if TARGET_OS_IPHONE
- // Workaround Apple CFStream bug
- gpr_setenv("grpc_cfstream", "0");
-#endif
- grpc_init();
- }
-
- static void TearDownTestCase() { grpc_shutdown(); }
+ client_load_reporting_interval_seconds),
+ use_xds_enabled_server_(use_xds_enabled_server),
+ bootstrap_contents_from_env_var_(bootstrap_contents_from_env_var) {}
void SetUp() override {
- gpr_setenv("GRPC_XDS_EXPERIMENTAL_V3_SUPPORT", "true");
- gpr_setenv("GRPC_XDS_BOOTSTRAP",
- GetParam().use_v2() ? g_bootstrap_file_v2 : g_bootstrap_file_v3);
- g_port_saver->Reset();
+ if (bootstrap_contents_from_env_var_) {
+ gpr_setenv("GRPC_XDS_BOOTSTRAP_CONFIG",
+ GetParam().use_v2() ? kBootstrapFileV2 : kBootstrapFileV3);
+ } else {
+ gpr_setenv("GRPC_XDS_BOOTSTRAP", GetParam().use_v2()
+ ? g_bootstrap_file_v2
+ : g_bootstrap_file_v3);
+ }
+ bool localhost_resolves_to_ipv4 = false;
+ bool localhost_resolves_to_ipv6 = false;
+ grpc_core::LocalhostResolves(&localhost_resolves_to_ipv4,
+ &localhost_resolves_to_ipv6);
+ ipv6_only_ = !localhost_resolves_to_ipv4 && localhost_resolves_to_ipv6;
+ // Initialize default xDS resources.
+ // Construct LDS resource.
+ default_listener_.set_name(kServerName);
+ HttpConnectionManager http_connection_manager;
+ if (!GetParam().use_v2()) {
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("router");
+ filter->mutable_typed_config()->PackFrom(
+ envoy::extensions::filters::http::router::v3::Router());
+ }
+ default_listener_.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ // Construct RDS resource.
+ default_route_config_.set_name(kDefaultRouteConfigurationName);
+ auto* virtual_host = default_route_config_.add_virtual_hosts();
+ virtual_host->add_domains("*");
+ auto* route = virtual_host->add_routes();
+ route->mutable_match()->set_prefix("");
+ route->mutable_route()->set_cluster(kDefaultClusterName);
+ // Construct CDS resource.
+ default_cluster_.set_name(kDefaultClusterName);
+ default_cluster_.set_type(Cluster::EDS);
+ auto* eds_config = default_cluster_.mutable_eds_cluster_config();
+ eds_config->mutable_eds_config()->mutable_ads();
+ eds_config->set_service_name(kDefaultEdsServiceName);
+ default_cluster_.set_lb_policy(Cluster::ROUND_ROBIN);
+ if (GetParam().enable_load_reporting()) {
+ default_cluster_.mutable_lrs_server()->mutable_self();
+ }
+ // Start the load balancers.
+ for (size_t i = 0; i < num_balancers_; ++i) {
+ balancers_.emplace_back(
+ new BalancerServerThread(GetParam().enable_load_reporting()
+ ? client_load_reporting_interval_seconds_
+ : 0));
+ balancers_.back()->Start();
+ // Initialize resources.
+ SetListenerAndRouteConfiguration(i, default_listener_,
+ default_route_config_);
+ balancers_.back()->ads_service()->SetCdsResource(default_cluster_);
+ }
+ // Initialize XdsClient state.
response_generator_ =
grpc_core::MakeRefCounted<grpc_core::FakeResolverResponseGenerator>();
// Inject xDS channel response generator.
@@ -1365,6 +1698,9 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
xds_channel_args_to_add_.emplace_back(
grpc_core::FakeResolverResponseGenerator::MakeChannelArg(
lb_channel_response_generator_.get()));
+ // Inject xDS logical cluster resolver response generator.
+ logical_dns_cluster_resolver_response_generator_ =
+ grpc_core::MakeRefCounted<grpc_core::FakeResolverResponseGenerator>();
if (xds_resource_does_not_exist_timeout_ms_ > 0) {
xds_channel_args_to_add_.emplace_back(grpc_channel_arg_integer_create(
const_cast<char*>(GRPC_ARG_XDS_RESOURCE_DOES_NOT_EXIST_TIMEOUT_MS),
@@ -1383,25 +1719,16 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
grpc_core::internal::UnsetGlobalXdsClientForTest();
// Start the backends.
for (size_t i = 0; i < num_backends_; ++i) {
- backends_.emplace_back(new BackendServerThread);
+ backends_.emplace_back(new BackendServerThread(use_xds_enabled_server_));
backends_.back()->Start();
}
- // Start the load balancers.
- for (size_t i = 0; i < num_balancers_; ++i) {
- balancers_.emplace_back(
- new BalancerServerThread(GetParam().enable_load_reporting()
- ? client_load_reporting_interval_seconds_
- : 0));
- balancers_.back()->Start();
- if (GetParam().enable_rds_testing()) {
- balancers_[i]->ads_service()->SetLdsToUseDynamicRds();
- }
- }
+ // Create channel and stub.
ResetStub();
}
const char* DefaultEdsServiceName() const {
- return GetParam().use_xds_resolver() ? kDefaultEdsServiceName : kServerName;
+ return GetParam().use_fake_resolver() ? kServerName
+ : kDefaultEdsServiceName;
}
void TearDown() override {
@@ -1410,6 +1737,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
// Clear global xDS channel args, since they will go out of scope
// when this test object is destroyed.
grpc_core::internal::SetXdsChannelArgsForTest(nullptr);
+ gpr_unsetenv("GRPC_XDS_BOOTSTRAP");
+ gpr_unsetenv("GRPC_XDS_BOOTSTRAP_CONFIG");
}
void StartAllBackends() {
@@ -1432,31 +1761,33 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
}
std::shared_ptr<Channel> CreateChannel(
- int failover_timeout = 0, const char* server_name = kServerName) {
+ int failover_timeout = 0, const char* server_name = kServerName,
+ grpc_core::FakeResolverResponseGenerator* response_generator = nullptr) {
ChannelArguments args;
if (failover_timeout > 0) {
args.SetInt(GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS, failover_timeout);
}
// If the parent channel is using the fake resolver, we inject the
// response generator here.
- if (!GetParam().use_xds_resolver()) {
+ if (GetParam().use_fake_resolver()) {
+ if (response_generator == nullptr) {
+ response_generator = response_generator_.get();
+ }
args.SetPointer(GRPC_ARG_FAKE_RESOLVER_RESPONSE_GENERATOR,
- response_generator_.get());
+ response_generator);
}
+ args.SetPointerWithVtable(
+ GRPC_ARG_XDS_LOGICAL_DNS_CLUSTER_FAKE_RESOLVER_RESPONSE_GENERATOR,
+ logical_dns_cluster_resolver_response_generator_.get(),
+ &kLogicalDnsClusterResolverResponseGeneratorVtable);
TString uri = y_absl::StrCat(
- GetParam().use_xds_resolver() ? "xds" : "fake", ":///", server_name);
- // TODO(dgq): templatize tests to run everything using both secure and
- // insecure channel credentials.
- grpc_channel_credentials* channel_creds =
- grpc_fake_transport_security_credentials_create();
- grpc_call_credentials* call_creds = grpc_md_only_test_credentials_create(
- g_kCallCredsMdKey, g_kCallCredsMdValue, false);
- std::shared_ptr<ChannelCredentials> creds(
- new SecureChannelCredentials(grpc_composite_channel_credentials_create(
- channel_creds, call_creds, nullptr)));
- call_creds->Unref();
- channel_creds->Unref();
- return ::grpc::CreateCustomChannel(uri, creds, args);
+ GetParam().use_fake_resolver() ? "fake" : "xds", ":///", server_name);
+ std::shared_ptr<ChannelCredentials> channel_creds =
+ GetParam().use_xds_credentials()
+ ? experimental::XdsCredentials(CreateTlsFallbackCredentials())
+ : std::make_shared<SecureChannelCredentials>(
+ grpc_fake_transport_security_credentials_create());
+ return ::grpc::CreateCustomChannel(uri, channel_creds, args);
}
enum RpcService {
@@ -1478,6 +1809,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
bool wait_for_ready = false;
bool server_fail = false;
std::vector<std::pair<TString, TString>> metadata;
+ int client_cancel_after_us = 0;
+ bool skip_cancelled_check = false;
RpcOptions() {}
@@ -1506,11 +1839,45 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
return *this;
}
+ RpcOptions& set_skip_cancelled_check(bool rpc_skip_cancelled_check) {
+ skip_cancelled_check = rpc_skip_cancelled_check;
+ return *this;
+ }
+
RpcOptions& set_metadata(
std::vector<std::pair<TString, TString>> rpc_metadata) {
- metadata = rpc_metadata;
+ metadata = std::move(rpc_metadata);
return *this;
}
+
+ RpcOptions& set_client_cancel_after_us(int rpc_client_cancel_after_us) {
+ client_cancel_after_us = rpc_client_cancel_after_us;
+ return *this;
+ }
+
+ // Populates context and request.
+ void SetupRpc(ClientContext* context, EchoRequest* request) const {
+ for (const auto& item : metadata) {
+ context->AddMetadata(item.first, item.second);
+ }
+ if (timeout_ms != 0) {
+ context->set_deadline(
+ grpc_timeout_milliseconds_to_deadline(timeout_ms));
+ }
+ if (wait_for_ready) context->set_wait_for_ready(true);
+ request->set_message(kRequestMessage);
+ if (server_fail) {
+ request->mutable_param()->mutable_expected_error()->set_code(
+ GRPC_STATUS_FAILED_PRECONDITION);
+ }
+ if (client_cancel_after_us != 0) {
+ request->mutable_param()->set_client_cancel_after_us(
+ client_cancel_after_us);
+ }
+ if (skip_cancelled_check) {
+ request->mutable_param()->set_skip_cancelled_check(true);
+ }
+ }
};
template <typename Stub>
@@ -1525,6 +1892,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
case METHOD_ECHO2:
return (*stub)->Echo2(context, request, response);
}
+ GPR_UNREACHABLE_CODE();
}
void ResetBackendCounters(size_t start_index = 0, size_t stop_index = 0) {
@@ -1542,16 +1910,19 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
for (size_t i = start_index; i < stop_index; ++i) {
switch (rpc_options.service) {
case SERVICE_ECHO:
- if (backends_[i]->backend_service()->request_count() == 0)
+ if (backends_[i]->backend_service()->request_count() == 0) {
return false;
+ }
break;
case SERVICE_ECHO1:
- if (backends_[i]->backend_service1()->request_count() == 0)
+ if (backends_[i]->backend_service1()->request_count() == 0) {
return false;
+ }
break;
case SERVICE_ECHO2:
- if (backends_[i]->backend_service2()->request_count() == 0)
+ if (backends_[i]->backend_service2()->request_count() == 0) {
return false;
+ }
break;
}
}
@@ -1560,12 +1931,14 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
void SendRpcAndCount(int* num_total, int* num_ok, int* num_failure,
int* num_drops,
- const RpcOptions& rpc_options = RpcOptions()) {
+ const RpcOptions& rpc_options = RpcOptions(),
+ const char* drop_error_message =
+ "Call dropped by load balancing policy") {
const Status status = SendRpc(rpc_options);
if (status.ok()) {
++*num_ok;
} else {
- if (status.error_message() == "Call dropped by load balancing policy") {
+ if (status.error_message() == drop_error_message) {
++*num_drops;
} else {
++*num_failure;
@@ -1615,19 +1988,20 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
const std::vector<int>& ports) {
grpc_core::ServerAddressList addresses;
for (int port : ports) {
- TString lb_uri_str = y_absl::StrCat("ipv4:127.0.0.1:", port);
- grpc_uri* lb_uri = grpc_uri_parse(lb_uri_str.c_str(), true);
- GPR_ASSERT(lb_uri != nullptr);
+ y_absl::StatusOr<grpc_core::URI> lb_uri = grpc_core::URI::Parse(
+ y_absl::StrCat(ipv6_only_ ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", port));
+ GPR_ASSERT(lb_uri.ok());
grpc_resolved_address address;
- GPR_ASSERT(grpc_parse_uri(lb_uri, &address));
+ GPR_ASSERT(grpc_parse_uri(*lb_uri, &address));
addresses.emplace_back(address.addr, address.len, nullptr);
- grpc_uri_destroy(lb_uri);
}
return addresses;
}
- void SetNextResolution(const std::vector<int>& ports) {
- if (GetParam().use_xds_resolver()) return; // Not used with xds resolver.
+ void SetNextResolution(
+ const std::vector<int>& ports,
+ grpc_core::FakeResolverResponseGenerator* response_generator = nullptr) {
+ if (!GetParam().use_fake_resolver()) return; // Not used with xds resolver.
grpc_core::ExecCtx exec_ctx;
grpc_core::Resolver::Result result;
result.addresses = CreateAddressListFromPortList(ports);
@@ -1640,7 +2014,10 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
grpc_core::ServiceConfig::Create(nullptr, service_config_json, &error);
ASSERT_EQ(error, GRPC_ERROR_NONE) << grpc_error_string(error);
ASSERT_NE(result.service_config.get(), nullptr);
- response_generator_->SetResponse(std::move(result));
+ if (response_generator == nullptr) {
+ response_generator = response_generator_.get();
+ }
+ response_generator->SetResponse(std::move(result));
}
void SetNextResolutionForLbChannelAllBalancers(
@@ -1683,8 +2060,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
response_generator_->SetReresolutionResponse(std::move(result));
}
- const std::vector<int> GetBackendPorts(size_t start_index = 0,
- size_t stop_index = 0) const {
+ std::vector<int> GetBackendPorts(size_t start_index = 0,
+ size_t stop_index = 0) const {
if (stop_index == 0) stop_index = backends_.size();
std::vector<int> backend_ports;
for (size_t i = start_index; i < stop_index; ++i) {
@@ -1697,21 +2074,9 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
EchoResponse* response = nullptr) {
const bool local_response = (response == nullptr);
if (local_response) response = new EchoResponse;
- EchoRequest request;
ClientContext context;
- for (const auto& metadata : rpc_options.metadata) {
- context.AddMetadata(metadata.first, metadata.second);
- }
- if (rpc_options.timeout_ms != 0) {
- context.set_deadline(
- grpc_timeout_milliseconds_to_deadline(rpc_options.timeout_ms));
- }
- if (rpc_options.wait_for_ready) context.set_wait_for_ready(true);
- request.set_message(kRequestMessage);
- if (rpc_options.server_fail) {
- request.mutable_param()->mutable_expected_error()->set_code(
- GRPC_STATUS_FAILED_PRECONDITION);
- }
+ EchoRequest request;
+ rpc_options.SetupRpc(&context, &request);
Status status;
switch (rpc_options.service) {
case SERVICE_ECHO:
@@ -1742,20 +2107,97 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
}
}
- void CheckRpcSendFailure(const size_t times = 1,
- const RpcOptions& rpc_options = RpcOptions()) {
+ void CheckRpcSendFailure(
+ const size_t times = 1, const RpcOptions& rpc_options = RpcOptions(),
+ const StatusCode expected_error_code = StatusCode::OK) {
for (size_t i = 0; i < times; ++i) {
const Status status = SendRpc(rpc_options);
EXPECT_FALSE(status.ok());
+ if (expected_error_code != StatusCode::OK) {
+ EXPECT_EQ(expected_error_code, status.error_code());
+ }
}
}
+ static Listener BuildListener(const RouteConfiguration& route_config) {
+ HttpConnectionManager http_connection_manager;
+ *(http_connection_manager.mutable_route_config()) = route_config;
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("router");
+ filter->mutable_typed_config()->PackFrom(
+ envoy::extensions::filters::http::router::v3::Router());
+ Listener listener;
+ listener.set_name(kServerName);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ return listener;
+ }
+
+ ClusterLoadAssignment BuildEdsResource(
+ const AdsServiceImpl::EdsResourceArgs& args,
+ const char* eds_service_name = kDefaultEdsServiceName) {
+ ClusterLoadAssignment assignment;
+ assignment.set_cluster_name(eds_service_name);
+ for (const auto& locality : args.locality_list) {
+ auto* endpoints = assignment.add_endpoints();
+ endpoints->mutable_load_balancing_weight()->set_value(locality.lb_weight);
+ endpoints->set_priority(locality.priority);
+ endpoints->mutable_locality()->set_region(kDefaultLocalityRegion);
+ endpoints->mutable_locality()->set_zone(kDefaultLocalityZone);
+ endpoints->mutable_locality()->set_sub_zone(locality.sub_zone);
+ for (size_t i = 0; i < locality.ports.size(); ++i) {
+ const int& port = locality.ports[i];
+ auto* lb_endpoints = endpoints->add_lb_endpoints();
+ if (locality.health_statuses.size() > i &&
+ locality.health_statuses[i] != HealthStatus::UNKNOWN) {
+ lb_endpoints->set_health_status(locality.health_statuses[i]);
+ }
+ auto* endpoint = lb_endpoints->mutable_endpoint();
+ auto* address = endpoint->mutable_address();
+ auto* socket_address = address->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(port);
+ }
+ }
+ if (!args.drop_categories.empty()) {
+ auto* policy = assignment.mutable_policy();
+ for (const auto& p : args.drop_categories) {
+ const TString& name = p.first;
+ const uint32_t parts_per_million = p.second;
+ auto* drop_overload = policy->add_drop_overloads();
+ drop_overload->set_category(name);
+ auto* drop_percentage = drop_overload->mutable_drop_percentage();
+ drop_percentage->set_numerator(parts_per_million);
+ drop_percentage->set_denominator(args.drop_denominator);
+ }
+ }
+ return assignment;
+ }
+
+ void SetListenerAndRouteConfiguration(
+ int idx, Listener listener, const RouteConfiguration& route_config) {
+ auto* api_listener =
+ listener.mutable_api_listener()->mutable_api_listener();
+ HttpConnectionManager http_connection_manager;
+ api_listener->UnpackTo(&http_connection_manager);
+ if (GetParam().enable_rds_testing()) {
+ auto* rds = http_connection_manager.mutable_rds();
+ rds->set_route_config_name(kDefaultRouteConfigurationName);
+ rds->mutable_config_source()->mutable_ads();
+ balancers_[idx]->ads_service()->SetRdsResource(route_config);
+ } else {
+ *http_connection_manager.mutable_route_config() = route_config;
+ }
+ api_listener->PackFrom(http_connection_manager);
+ balancers_[idx]->ads_service()->SetLdsResource(listener);
+ }
+
void SetRouteConfiguration(int idx, const RouteConfiguration& route_config) {
if (GetParam().enable_rds_testing()) {
balancers_[idx]->ads_service()->SetRdsResource(route_config);
} else {
balancers_[idx]->ads_service()->SetLdsResource(
- AdsServiceImpl::BuildListener(route_config));
+ BuildListener(route_config));
}
}
@@ -1779,9 +2221,36 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
}
protected:
+ class XdsServingStatusNotifier
+ : public grpc::experimental::XdsServerServingStatusNotifierInterface {
+ public:
+ void OnServingStatusChange(TString uri, grpc::Status status) override {
+ grpc_core::MutexLock lock(&mu_);
+ status_map[uri] = status;
+ cond_.Signal();
+ }
+
+ void WaitOnServingStatusChange(TString uri,
+ grpc::StatusCode expected_status) {
+ grpc_core::MutexLock lock(&mu_);
+ std::map<TString, grpc::Status>::iterator it;
+ while ((it = status_map.find(uri)) == status_map.end() ||
+ it->second.error_code() != expected_status) {
+ cond_.Wait(&mu_);
+ }
+ }
+
+ private:
+ grpc_core::Mutex mu_;
+ grpc_core::CondVar cond_;
+ std::map<TString, grpc::Status> status_map;
+ };
+
class ServerThread {
public:
- ServerThread() : port_(g_port_saver->GetPort()) {}
+ explicit ServerThread(bool use_xds_enabled_server = false)
+ : port_(grpc_pick_unused_port_or_die()),
+ use_xds_enabled_server_(use_xds_enabled_server) {}
virtual ~ServerThread(){};
void Start() {
@@ -1794,8 +2263,8 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
// by ServerThread::Serve from firing before the wait below is hit.
grpc_core::MutexLock lock(&mu);
grpc_core::CondVar cond;
- thread_.reset(
- new std::thread(std::bind(&ServerThread::Serve, this, &mu, &cond)));
+ thread_ = y_absl::make_unique<std::thread>(
+ std::bind(&ServerThread::Serve, this, &mu, &cond));
cond.Wait(&mu);
gpr_log(GPR_INFO, "%s server startup complete", Type());
}
@@ -1806,12 +2275,18 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
grpc_core::MutexLock lock(mu);
std::ostringstream server_address;
server_address << "localhost:" << port_;
- ServerBuilder builder;
- std::shared_ptr<ServerCredentials> creds(new SecureServerCredentials(
- grpc_fake_transport_security_server_credentials_create()));
- builder.AddListeningPort(server_address.str(), creds);
- RegisterAllServices(&builder);
- server_ = builder.BuildAndStart();
+ if (use_xds_enabled_server_) {
+ experimental::XdsServerBuilder builder;
+ builder.set_status_notifier(&notifier_);
+ builder.AddListeningPort(server_address.str(), Credentials());
+ RegisterAllServices(&builder);
+ server_ = builder.BuildAndStart();
+ } else {
+ ServerBuilder builder;
+ builder.AddListeningPort(server_address.str(), Credentials());
+ RegisterAllServices(&builder);
+ server_ = builder.BuildAndStart();
+ }
cond->Signal();
}
@@ -1825,8 +2300,17 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
running_ = false;
}
+ virtual std::shared_ptr<ServerCredentials> Credentials() {
+ return std::make_shared<SecureServerCredentials>(
+ grpc_fake_transport_security_server_credentials_create());
+ }
+
int port() const { return port_; }
+ bool use_xds_enabled_server() const { return use_xds_enabled_server_; }
+
+ XdsServingStatusNotifier* notifier() { return &notifier_; }
+
private:
virtual void RegisterAllServices(ServerBuilder* builder) = 0;
virtual void StartAllServices() = 0;
@@ -1836,12 +2320,17 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
const int port_;
std::unique_ptr<Server> server_;
+ XdsServingStatusNotifier notifier_;
std::unique_ptr<std::thread> thread_;
bool running_ = false;
+ const bool use_xds_enabled_server_;
};
class BackendServerThread : public ServerThread {
public:
+ explicit BackendServerThread(bool use_xds_enabled_server)
+ : ServerThread(use_xds_enabled_server) {}
+
BackendServiceImpl<::grpc::testing::EchoTestService::Service>*
backend_service() {
return &backend_service_;
@@ -1855,6 +2344,34 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
return &backend_service2_;
}
+ std::shared_ptr<ServerCredentials> Credentials() override {
+ if (GetParam().use_xds_credentials()) {
+ if (use_xds_enabled_server()) {
+ // We are testing server's use of XdsServerCredentials
+ return experimental::XdsServerCredentials(
+ InsecureServerCredentials());
+ } else {
+ // We are testing client's use of XdsCredentials
+ TString root_cert = ReadFile(kCaCertPath);
+ TString identity_cert = ReadFile(kServerCertPath);
+ TString private_key = ReadFile(kServerKeyPath);
+ std::vector<experimental::IdentityKeyCertPair>
+ identity_key_cert_pairs = {{private_key, identity_cert}};
+ auto certificate_provider = std::make_shared<
+ grpc::experimental::StaticDataCertificateProvider>(
+ root_cert, identity_key_cert_pairs);
+ grpc::experimental::TlsServerCredentialsOptions options(
+ certificate_provider);
+ options.watch_root_certs();
+ options.watch_identity_key_cert_pairs();
+ options.set_cert_request_type(
+ GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY);
+ return grpc::experimental::TlsServerCredentials(options);
+ }
+ }
+ return ServerThread::Credentials();
+ }
+
private:
void RegisterAllServices(ServerBuilder* builder) override {
builder->RegisterService(&backend_service_);
@@ -1887,7 +2404,7 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
class BalancerServerThread : public ServerThread {
public:
explicit BalancerServerThread(int client_load_reporting_interval = 0)
- : ads_service_(new AdsServiceImpl(client_load_reporting_interval > 0)),
+ : ads_service_(new AdsServiceImpl()),
lrs_service_(new LrsServiceImpl(client_load_reporting_interval)) {}
AdsServiceImpl* ads_service() { return ads_service_.get(); }
@@ -1917,9 +2434,55 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
std::shared_ptr<LrsServiceImpl> lrs_service_;
};
+#ifndef DISABLED_XDS_PROTO_IN_CC
+ class AdminServerThread : public ServerThread {
+ private:
+ void RegisterAllServices(ServerBuilder* builder) override {
+ builder->RegisterService(&csds_service_);
+ }
+ void StartAllServices() override {}
+ void ShutdownAllServices() override {}
+
+ const char* Type() override { return "Admin"; }
+
+ grpc::xds::experimental::ClientStatusDiscoveryService csds_service_;
+ };
+#endif // DISABLED_XDS_PROTO_IN_CC
+
+ class LongRunningRpc {
+ public:
+ void StartRpc(grpc::testing::EchoTestService::Stub* stub,
+ const RpcOptions& rpc_options =
+ RpcOptions().set_client_cancel_after_us(1 * 1000 *
+ 1000)) {
+ sender_thread_ = std::thread([this, stub, rpc_options]() {
+ EchoRequest request;
+ EchoResponse response;
+ rpc_options.SetupRpc(&context_, &request);
+ status_ = stub->Echo(&context_, request, &response);
+ });
+ }
+
+ void CancelRpc() {
+ context_.TryCancel();
+ if (sender_thread_.joinable()) sender_thread_.join();
+ }
+
+ Status GetStatus() {
+ if (sender_thread_.joinable()) sender_thread_.join();
+ return status_;
+ }
+
+ private:
+ std::thread sender_thread_;
+ ClientContext context_;
+ Status status_;
+ };
+
const size_t num_backends_;
const size_t num_balancers_;
const int client_load_reporting_interval_seconds_;
+ bool ipv6_only_ = false;
std::shared_ptr<Channel> channel_;
std::unique_ptr<grpc::testing::EchoTestService::Stub> stub_;
std::unique_ptr<grpc::testing::EchoTest1Service::Stub> stub1_;
@@ -1930,9 +2493,17 @@ class XdsEnd2endTest : public ::testing::TestWithParam<TestType> {
response_generator_;
grpc_core::RefCountedPtr<grpc_core::FakeResolverResponseGenerator>
lb_channel_response_generator_;
+ grpc_core::RefCountedPtr<grpc_core::FakeResolverResponseGenerator>
+ logical_dns_cluster_resolver_response_generator_;
int xds_resource_does_not_exist_timeout_ms_ = 0;
y_absl::InlinedVector<grpc_arg, 2> xds_channel_args_to_add_;
grpc_channel_args xds_channel_args_;
+
+ Listener default_listener_;
+ RouteConfiguration default_route_config_;
+ Cluster default_cluster_;
+ bool use_xds_enabled_server_;
+ bool bootstrap_contents_from_env_var_;
};
class BasicTest : public XdsEnd2endTest {
@@ -1950,7 +2521,7 @@ TEST_P(BasicTest, Vanilla) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Make sure that trying to connect works without a call.
channel_->GetState(true /* try_to_connect */);
// We need to wait for all backends to come online.
@@ -1963,9 +2534,10 @@ TEST_P(BasicTest, Vanilla) {
backends_[i]->backend_service()->request_count());
}
// Check LB policy name for the channel.
- EXPECT_EQ((GetParam().use_xds_resolver() ? "xds_cluster_manager_experimental"
- : "eds_experimental"),
- channel_->GetLoadBalancingPolicyName());
+ EXPECT_EQ(
+ (GetParam().use_fake_resolver() ? "xds_cluster_resolver_experimental"
+ : "xds_cluster_manager_experimental"),
+ channel_->GetLoadBalancingPolicyName());
}
TEST_P(BasicTest, IgnoresUnhealthyEndpoints) {
@@ -1980,7 +2552,7 @@ TEST_P(BasicTest, IgnoresUnhealthyEndpoints) {
{HealthStatus::DRAINING}},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Make sure that trying to connect works without a call.
channel_->GetState(true /* try_to_connect */);
// We need to wait for all backends to come online.
@@ -2006,7 +2578,7 @@ TEST_P(BasicTest, SameBackendListedMultipleTimes) {
});
const size_t kNumRpcsPerAddress = 10;
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// We need to wait for the backend to come online.
WaitForBackend(0);
// Send kNumRpcsPerAddress RPCs per server.
@@ -2031,15 +2603,14 @@ TEST_P(BasicTest, InitiallyEmptyServerlist) {
empty_locality,
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Send non-empty serverlist only after kServerlistDelayMs.
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", GetBackendPorts()},
});
- std::thread delayed_resource_setter(
- std::bind(&BasicTest::SetEdsResourceWithDelay, this, 0,
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()),
- kServerlistDelayMs));
+ std::thread delayed_resource_setter(std::bind(
+ &BasicTest::SetEdsResourceWithDelay, this, 0,
+ BuildEdsResource(args, DefaultEdsServiceName()), kServerlistDelayMs));
const auto t0 = system_clock::now();
// Client will block: LB will initially send empty serverlist.
CheckRpcSendOk(
@@ -2063,13 +2634,13 @@ TEST_P(BasicTest, AllServersUnreachableFailFast) {
const size_t kNumUnreachableServers = 5;
std::vector<int> ports;
for (size_t i = 0; i < kNumUnreachableServers; ++i) {
- ports.push_back(g_port_saver->GetPort());
+ ports.push_back(grpc_pick_unused_port_or_die());
}
AdsServiceImpl::EdsResourceArgs args({
{"locality0", ports},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
const Status status = SendRpc();
// The error shouldn't be DEADLINE_EXCEEDED.
EXPECT_EQ(StatusCode::UNAVAILABLE, status.error_code());
@@ -2084,7 +2655,7 @@ TEST_P(BasicTest, BackendsRestart) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForAllBackends();
// Stop backends. RPCs should fail.
ShutdownAllBackends();
@@ -2111,7 +2682,7 @@ TEST_P(BasicTest, IgnoresDuplicateUpdates) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait for all backends to come online.
WaitForAllBackends();
// Send kNumRpcsPerAddress RPCs per server, but send an EDS update in
@@ -2121,7 +2692,7 @@ TEST_P(BasicTest, IgnoresDuplicateUpdates) {
for (size_t i = 0; i < kNumRpcsPerAddress; ++i) {
CheckRpcSendOk(2);
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
CheckRpcSendOk(2);
}
// Each backend should have gotten the right number of requests.
@@ -2133,6 +2704,34 @@ TEST_P(BasicTest, IgnoresDuplicateUpdates) {
using XdsResolverOnlyTest = BasicTest;
+TEST_P(XdsResolverOnlyTest, ResourceTypeVersionPersistsAcrossStreamRestarts) {
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ // Wait for backends to come online.
+ WaitForAllBackends(0, 1);
+ // Stop balancer.
+ balancers_[0]->Shutdown();
+ // Tell balancer to require minimum version 1 for all resource types.
+ balancers_[0]->ads_service()->SetResourceMinVersion(kLdsTypeUrl, 1);
+ balancers_[0]->ads_service()->SetResourceMinVersion(kRdsTypeUrl, 1);
+ balancers_[0]->ads_service()->SetResourceMinVersion(kCdsTypeUrl, 1);
+ balancers_[0]->ads_service()->SetResourceMinVersion(kEdsTypeUrl, 1);
+ // Update backend, just so we can be sure that the client has
+ // reconnected to the balancer.
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", GetBackendPorts(1, 2)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args2));
+ // Restart balancer.
+ balancers_[0]->Start();
+ // Make sure client has reconnected.
+ WaitForAllBackends(1, 2);
+}
+
// Tests switching over from one cluster to another.
TEST_P(XdsResolverOnlyTest, ChangeClusters) {
const char* kNewClusterName = "new_cluster_name";
@@ -2142,8 +2741,7 @@ TEST_P(XdsResolverOnlyTest, ChangeClusters) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts(0, 2)},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// We need to wait for all backends to come online.
WaitForAllBackends(0, 2);
// Populate new EDS resource.
@@ -2151,23 +2749,20 @@ TEST_P(XdsResolverOnlyTest, ChangeClusters) {
{"locality0", GetBackendPorts(2, 4)},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsServiceName));
+ BuildEdsResource(args2, kNewEdsServiceName));
// Populate new CDS resource.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Change RDS resource to point to new cluster.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
new_route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->set_cluster(kNewClusterName);
- Listener listener =
- balancers_[0]->ads_service()->BuildListener(new_route_config);
- balancers_[0]->ads_service()->SetLdsResource(listener);
+ SetListenerAndRouteConfiguration(0, default_listener_, new_route_config);
// Wait for all new backends to be used.
std::tuple<int, int, int> counts = WaitForAllBackends(2, 4);
// Make sure no RPCs failed in the transition.
@@ -2181,8 +2776,7 @@ TEST_P(XdsResolverOnlyTest, ClusterRemoved) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts()},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// We need to wait for all backends to come online.
WaitForAllBackends();
// Unset CDS resource.
@@ -2199,7 +2793,18 @@ TEST_P(XdsResolverOnlyTest, ClusterRemoved) {
// Tests that we restart all xDS requests when we reestablish the ADS call.
TEST_P(XdsResolverOnlyTest, RestartsRequestsUponReconnection) {
- balancers_[0]->ads_service()->SetLdsToUseDynamicRds();
+ // Manually configure use of RDS.
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* rds = http_connection_manager.mutable_rds();
+ rds->set_route_config_name(kDefaultRouteConfigurationName);
+ rds->mutable_config_source()->mutable_ads();
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ balancers_[0]->ads_service()->SetRdsResource(default_route_config_);
const char* kNewClusterName = "new_cluster_name";
const char* kNewEdsServiceName = "new_eds_service_name";
SetNextResolution({});
@@ -2207,8 +2812,7 @@ TEST_P(XdsResolverOnlyTest, RestartsRequestsUponReconnection) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts(0, 2)},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// We need to wait for all backends to come online.
WaitForAllBackends(0, 2);
// Now shut down and restart the balancer. When the client
@@ -2223,16 +2827,15 @@ TEST_P(XdsResolverOnlyTest, RestartsRequestsUponReconnection) {
{"locality0", GetBackendPorts(2, 4)},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsServiceName));
+ BuildEdsResource(args2, kNewEdsServiceName));
// Populate new CDS resource.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Change RDS resource to point to new cluster.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
new_route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
@@ -2245,52 +2848,23 @@ TEST_P(XdsResolverOnlyTest, RestartsRequestsUponReconnection) {
}
TEST_P(XdsResolverOnlyTest, DefaultRouteSpecifiesSlashPrefix) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_match()
->set_prefix("/");
- balancers_[0]->ads_service()->SetLdsResource(
- AdsServiceImpl::BuildListener(route_config));
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts()},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// We need to wait for all backends to come online.
WaitForAllBackends();
}
TEST_P(XdsResolverOnlyTest, CircuitBreaking) {
- class TestRpc {
- public:
- TestRpc() {}
-
- void StartRpc(grpc::testing::EchoTestService::Stub* stub) {
- sender_thread_ = std::thread([this, stub]() {
- EchoResponse response;
- EchoRequest request;
- request.mutable_param()->set_client_cancel_after_us(1 * 1000 * 1000);
- request.set_message(kRequestMessage);
- status_ = stub->Echo(&context_, request, &response);
- });
- }
-
- void CancelRpc() {
- context_.TryCancel();
- sender_thread_.join();
- }
-
- private:
- std::thread sender_thread_;
- ClientContext context_;
- Status status_;
- };
-
- gpr_setenv("GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING", "true");
constexpr size_t kMaxConcurrentRequests = 10;
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
@@ -2298,17 +2872,16 @@ TEST_P(XdsResolverOnlyTest, CircuitBreaking) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts(0, 1)},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// Update CDS resource to set max concurrent request.
CircuitBreakers circuit_breaks;
- Cluster cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster cluster = default_cluster_;
auto* threshold = cluster.mutable_circuit_breakers()->add_thresholds();
threshold->set_priority(RoutingPriority::DEFAULT);
threshold->mutable_max_requests()->set_value(kMaxConcurrentRequests);
balancers_[0]->ads_service()->SetCdsResource(cluster);
// Send exactly max_concurrent_requests long RPCs.
- TestRpc rpcs[kMaxConcurrentRequests];
+ LongRunningRpc rpcs[kMaxConcurrentRequests];
for (size_t i = 0; i < kMaxConcurrentRequests; ++i) {
rpcs[i].StartRpc(stub_.get());
}
@@ -2333,55 +2906,38 @@ TEST_P(XdsResolverOnlyTest, CircuitBreaking) {
// Make sure RPCs go to the correct backend:
EXPECT_EQ(kMaxConcurrentRequests + 1,
backends_[0]->backend_service()->request_count());
- gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_CIRCUIT_BREAKING");
}
-TEST_P(XdsResolverOnlyTest, CircuitBreakingDisabled) {
- class TestRpc {
- public:
- TestRpc() {}
-
- void StartRpc(grpc::testing::EchoTestService::Stub* stub) {
- sender_thread_ = std::thread([this, stub]() {
- EchoResponse response;
- EchoRequest request;
- request.mutable_param()->set_client_cancel_after_us(1 * 1000 * 1000);
- request.set_message(kRequestMessage);
- status_ = stub->Echo(&context_, request, &response);
- });
- }
-
- void CancelRpc() {
- context_.TryCancel();
- sender_thread_.join();
- }
-
- private:
- std::thread sender_thread_;
- ClientContext context_;
- Status status_;
- };
-
+TEST_P(XdsResolverOnlyTest, CircuitBreakingMultipleChannelsShareCallCounter) {
constexpr size_t kMaxConcurrentRequests = 10;
- SetNextResolution({});
- SetNextResolutionForLbChannelAllBalancers();
// Populate new EDS resources.
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts(0, 1)},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// Update CDS resource to set max concurrent request.
CircuitBreakers circuit_breaks;
- Cluster cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster cluster = default_cluster_;
auto* threshold = cluster.mutable_circuit_breakers()->add_thresholds();
threshold->set_priority(RoutingPriority::DEFAULT);
threshold->mutable_max_requests()->set_value(kMaxConcurrentRequests);
balancers_[0]->ads_service()->SetCdsResource(cluster);
- // Send exactly max_concurrent_requests long RPCs.
- TestRpc rpcs[kMaxConcurrentRequests];
+ // Create second channel.
+ auto response_generator2 =
+ grpc_core::MakeRefCounted<grpc_core::FakeResolverResponseGenerator>();
+ auto channel2 = CreateChannel(
+ /*failover_timeout=*/0, /*server_name=*/kServerName,
+ response_generator2.get());
+ auto stub2 = grpc::testing::EchoTestService::NewStub(channel2);
+ // Set resolution results for both channels and for the xDS channel.
+ SetNextResolution({});
+ SetNextResolution({}, response_generator2.get());
+ SetNextResolutionForLbChannelAllBalancers();
+ // Send exactly max_concurrent_requests long RPCs, alternating between
+ // the two channels.
+ LongRunningRpc rpcs[kMaxConcurrentRequests];
for (size_t i = 0; i < kMaxConcurrentRequests; ++i) {
- rpcs[i].StartRpc(stub_.get());
+ rpcs[i].StartRpc(i % 2 == 0 ? stub_.get() : stub2.get());
}
// Wait for all RPCs to be in flight.
while (backends_[0]->backend_service()->RpcsWaitingForClientCancel() <
@@ -2389,10 +2945,16 @@ TEST_P(XdsResolverOnlyTest, CircuitBreakingDisabled) {
gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_micros(1 * 1000, GPR_TIMESPAN)));
}
- // Sending a RPC now should not fail as circuit breaking is disabled.
+ // Sending a RPC now should fail, the error message should tell us
+ // we hit the max concurrent requests limit and got dropped.
Status status = SendRpc();
+ EXPECT_FALSE(status.ok());
+ EXPECT_EQ(status.error_message(), "Call dropped by load balancing policy");
+ // Cancel one RPC to allow another one through
+ rpcs[0].CancelRpc();
+ status = SendRpc();
EXPECT_TRUE(status.ok());
- for (size_t i = 0; i < kMaxConcurrentRequests; ++i) {
+ for (size_t i = 1; i < kMaxConcurrentRequests; ++i) {
rpcs[i].CancelRpc();
}
// Make sure RPCs go to the correct backend:
@@ -2402,16 +2964,15 @@ TEST_P(XdsResolverOnlyTest, CircuitBreakingDisabled) {
TEST_P(XdsResolverOnlyTest, MultipleChannelsShareXdsClient) {
const char* kNewServerName = "new-server.example.com";
- Listener listener = balancers_[0]->ads_service()->default_listener();
+ Listener listener = default_listener_;
listener.set_name(kNewServerName);
- balancers_[0]->ads_service()->SetLdsResource(listener);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts()},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
WaitForAllBackends();
// Create second channel and tell it to connect to kNewServerName.
auto channel2 = CreateChannel(/*failover_timeout=*/0, kNewServerName);
@@ -2439,16 +3000,15 @@ TEST_P(XdsResolverLoadReportingOnlyTest, ChangeClusters) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts(0, 2)},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// cluster kNewClusterName -> locality1 -> backends 2 and 3
AdsServiceImpl::EdsResourceArgs args2({
{"locality1", GetBackendPorts(2, 4)},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsServiceName));
+ BuildEdsResource(args2, kNewEdsServiceName));
// CDS resource for kNewClusterName.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
@@ -2485,15 +3045,12 @@ TEST_P(XdsResolverLoadReportingOnlyTest, ChangeClusters) {
::testing::Property(&ClientStats::total_dropped_requests,
num_drops))));
// Change RDS resource to point to new cluster.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
new_route_config.mutable_virtual_hosts(0)
->mutable_routes(0)
->mutable_route()
->set_cluster(kNewClusterName);
- Listener listener =
- balancers_[0]->ads_service()->BuildListener(new_route_config);
- balancers_[0]->ads_service()->SetLdsResource(listener);
+ SetListenerAndRouteConfiguration(0, default_listener_, new_route_config);
// Wait for all new backends to be used.
std::tie(num_ok, num_failure, num_drops) = WaitForAllBackends(2, 4);
// The load report received at the balancer should be correct.
@@ -2569,7 +3126,7 @@ TEST_P(SecureNamingTest, TargetNameIsExpected) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
CheckRpcSendOk();
}
@@ -2583,7 +3140,7 @@ TEST_P(SecureNamingTest, TargetNameIsUnexpected) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Make sure that we blow up (via abort() from the security connector) when
// the name from the balancer doesn't match expectations.
ASSERT_DEATH_IF_SUPPORTED({ CheckRpcSendOk(); }, "");
@@ -2594,23 +3151,27 @@ using LdsTest = BasicTest;
// Tests that LDS client should send a NACK if there is no API listener in the
// Listener in the LDS response.
TEST_P(LdsTest, NoApiListener) {
- auto listener = balancers_[0]->ads_service()->default_listener();
+ auto listener = default_listener_;
listener.clear_api_listener();
balancers_[0]->ads_service()->SetLdsResource(listener);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->lds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "Listener has no ApiListener.");
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Listener has neither address nor ApiListener"));
}
// Tests that LDS client should send a NACK if the route_specifier in the
// http_connection_manager is neither inlined route_config nor RDS.
TEST_P(LdsTest, WrongRouteSpecifier) {
- auto listener = balancers_[0]->ads_service()->default_listener();
+ auto listener = default_listener_;
HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
http_connection_manager.mutable_scoped_routes();
listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
http_connection_manager);
@@ -2618,18 +3179,22 @@ TEST_P(LdsTest, WrongRouteSpecifier) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->lds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "HttpConnectionManager neither has inlined route_config nor RDS.");
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "HttpConnectionManager neither has inlined route_config nor RDS."));
}
// Tests that LDS client should send a NACK if the rds message in the
// http_connection_manager is missing the config_source field.
TEST_P(LdsTest, RdsMissingConfigSource) {
- auto listener = balancers_[0]->ads_service()->default_listener();
+ auto listener = default_listener_;
HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
http_connection_manager.mutable_rds()->set_route_config_name(
kDefaultRouteConfigurationName);
listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
@@ -2638,18 +3203,21 @@ TEST_P(LdsTest, RdsMissingConfigSource) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->lds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "HttpConnectionManager missing config_source for RDS.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "HttpConnectionManager missing config_source for RDS."));
}
// Tests that LDS client should send a NACK if the rds message in the
// http_connection_manager has a config_source field that does not specify ADS.
TEST_P(LdsTest, RdsConfigSourceDoesNotSpecifyAds) {
- auto listener = balancers_[0]->ads_service()->default_listener();
+ auto listener = default_listener_;
HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
auto* rds = http_connection_manager.mutable_rds();
rds->set_route_config_name(kDefaultRouteConfigurationName);
rds->mutable_config_source()->mutable_self();
@@ -2659,11 +3227,358 @@ TEST_P(LdsTest, RdsConfigSourceDoesNotSpecifyAds) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "HttpConnectionManager ConfigSource for RDS does not specify ADS."));
+}
+
+// Tests that the NACK for multiple bad LDS resources includes both errors.
+TEST_P(LdsTest, MultipleBadResources) {
+ constexpr char kServerName2[] = "server.other.com";
+ auto listener = default_listener_;
+ listener.clear_api_listener();
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.set_name(kServerName2);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendFailure();
+ // Need to create a second channel to subscribe to a second LDS resource.
+ auto channel2 = CreateChannel(0, kServerName2);
+ auto stub2 = grpc::testing::EchoTestService::NewStub(channel2);
+ ClientContext context;
+ EchoRequest request;
+ request.set_message(kRequestMessage);
+ EchoResponse response;
+ grpc::Status status = stub2->Echo(&context, request, &response);
+ EXPECT_FALSE(status.ok());
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::AllOf(
+ ::testing::HasSubstr(y_absl::StrCat(
+ kServerName, ": Listener has neither address nor ApiListener")),
+ ::testing::HasSubstr(
+ y_absl::StrCat(kServerName2,
+ ": Listener has neither address nor ApiListener"))));
+}
+
+// Tests that we ignore filters after the router filter.
+TEST_P(LdsTest, IgnoresHttpFiltersAfterRouterFilter) {
+ SetNextResolutionForLbChannelAllBalancers();
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ filter->mutable_typed_config()->set_type_url(
+ "grpc.testing.client_only_http_filter");
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ WaitForAllBackends();
+}
+
+// Test that we fail RPCs if there is no router filter.
+TEST_P(LdsTest, FailRpcsIfNoHttpRouterFilter) {
+ SetNextResolutionForLbChannelAllBalancers();
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ http_connection_manager.clear_http_filters();
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ Status status = SendRpc();
+ EXPECT_EQ(status.error_code(), StatusCode::UNAVAILABLE);
+ EXPECT_EQ(status.error_message(), "no xDS HTTP router filter configured");
+ // Wait until xDS server sees ACK.
+ while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT) {
+ CheckRpcSendFailure();
+ }
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK empty filter names.
+TEST_P(LdsTest, RejectsEmptyHttpFilterName) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->mutable_typed_config()->PackFrom(Listener());
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("empty filter name at index 1"));
+}
+
+// Test that we NACK duplicate HTTP filter names.
+TEST_P(LdsTest, RejectsDuplicateHttpFilterName) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ *http_connection_manager.add_http_filters() =
+ http_connection_manager.http_filters(0);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
balancers_[0]->ads_service()->lds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "HttpConnectionManager ConfigSource for RDS does not specify ADS.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("duplicate HTTP filter name: router"));
+}
+
+// Test that we NACK unknown filter types.
+TEST_P(LdsTest, RejectsUnknownHttpFilterType) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ filter->mutable_typed_config()->PackFrom(Listener());
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("no filter registered for config type "
+ "envoy.config.listener.v3.Listener"));
+}
+
+// Test that we ignore optional unknown filter types.
+TEST_P(LdsTest, IgnoresOptionalUnknownHttpFilterType) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ filter->mutable_typed_config()->PackFrom(Listener());
+ filter->set_is_optional(true);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state().state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK filters without configs.
+TEST_P(LdsTest, RejectsHttpFilterWithoutConfig) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we ignore optional filters without configs.
+TEST_P(LdsTest, IgnoresOptionalHttpFilterWithoutConfig) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ filter->set_is_optional(true);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state().state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK unparseable filter configs.
+TEST_P(LdsTest, RejectsUnparseableHttpFilterType) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ filter->mutable_typed_config()->PackFrom(listener);
+ filter->mutable_typed_config()->set_type_url(
+ "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router");
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "filter config for type "
+ "envoy.extensions.filters.http.router.v3.Router failed to parse"));
+}
+
+// Test that we NACK HTTP filters unsupported on client-side.
+TEST_P(LdsTest, RejectsHttpFiltersNotSupportedOnClients) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("grpc.testing.server_only_http_filter");
+ filter->mutable_typed_config()->set_type_url(
+ "grpc.testing.server_only_http_filter");
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Filter grpc.testing.server_only_http_filter is not "
+ "supported on clients"));
+}
+
+// Test that we ignore optional HTTP filters unsupported on client-side.
+TEST_P(LdsTest, IgnoresOptionalHttpFiltersNotSupportedOnClients) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("grpc.testing.server_only_http_filter");
+ filter->mutable_typed_config()->set_type_url(
+ "grpc.testing.server_only_http_filter");
+ filter->set_is_optional(true);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForBackend(0);
+ EXPECT_EQ(balancers_[0]->ads_service()->lds_response_state().state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+using LdsV2Test = LdsTest;
+
+// Tests that we ignore the HTTP filter list in v2.
+// TODO(roth): The test framework is not set up to allow us to test
+// the server sending v2 resources when the client requests v3, so this
+// just tests a pure v2 setup. When we have time, fix this.
+TEST_P(LdsV2Test, IgnoresHttpFilters) {
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ auto* filter = http_connection_manager.add_http_filters();
+ filter->set_name("unknown");
+ filter->mutable_typed_config()->PackFrom(Listener());
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendOk();
}
using LdsRdsTest = BasicTest;
@@ -2690,8 +3605,7 @@ TEST_P(LdsRdsTest, ListenerRemoved) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts()},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
// We need to wait for all backends to come online.
WaitForAllBackends();
// Unset LDS resource.
@@ -2709,8 +3623,7 @@ TEST_P(LdsRdsTest, ListenerRemoved) {
// Tests that LDS client ACKs but fails if matching domain can't be found in
// the LDS response.
TEST_P(LdsRdsTest, NoMatchedDomain) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
route_config.mutable_virtual_hosts(0)->clear_domains();
route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain");
SetRouteConfiguration(0, route_config);
@@ -2719,15 +3632,14 @@ TEST_P(LdsRdsTest, NoMatchedDomain) {
CheckRpcSendFailure();
// Do a bit of polling, to allow the ACK to get to the ADS server.
channel_->WaitForConnected(grpc_timeout_milliseconds_to_deadline(100));
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
// Tests that LDS client should choose the virtual host with matching domain if
// multiple virtual hosts exist in the LDS response.
TEST_P(LdsRdsTest, ChooseMatchedDomain) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
*(route_config.add_virtual_hosts()) = route_config.virtual_hosts(0);
route_config.mutable_virtual_hosts(0)->clear_domains();
route_config.mutable_virtual_hosts(0)->add_domains("unmatched_domain");
@@ -2742,8 +3654,7 @@ TEST_P(LdsRdsTest, ChooseMatchedDomain) {
// Tests that LDS client should choose the last route in the virtual host if
// multiple routes exist in the LDS response.
TEST_P(LdsRdsTest, ChooseLastRoute) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
*(route_config.mutable_virtual_hosts(0)->add_routes()) =
route_config.virtual_hosts(0).routes(0);
route_config.mutable_virtual_hosts(0)
@@ -2758,27 +3669,9 @@ TEST_P(LdsRdsTest, ChooseLastRoute) {
AdsServiceImpl::ResponseState::ACKED);
}
-// Tests that LDS client should send a NACK if route match has a case_sensitive
-// set to false.
-TEST_P(LdsRdsTest, RouteMatchHasCaseSensitiveFalse) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
- auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
- route1->mutable_match()->mutable_case_sensitive()->set_value(false);
- SetRouteConfiguration(0, route_config);
- SetNextResolution({});
- SetNextResolutionForLbChannelAllBalancers();
- CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
- EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "case_sensitive if set must be set to true.");
-}
-
// Tests that LDS client should ignore route which has query_parameters.
TEST_P(LdsRdsTest, RouteMatchHasQueryParameters) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
route1->mutable_match()->add_query_parameters();
@@ -2786,16 +3679,16 @@ TEST_P(LdsRdsTest, RouteMatchHasQueryParameters) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should send a ACK if route match has a prefix
// that is either empty or a single slash
TEST_P(LdsRdsTest, RouteMatchHasValidPrefixEmptyOrSingleSlash) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("");
auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes();
@@ -2805,159 +3698,158 @@ TEST_P(LdsRdsTest, RouteMatchHasValidPrefixEmptyOrSingleSlash) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
(void)SendRpc();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
// Tests that LDS client should ignore route which has a path
// prefix string does not start with "/".
TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixNoLeadingSlash) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("grpc.testing.EchoTest1Service/");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has a prefix
// string with more than 2 slashes.
TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixExtraContent) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/Echo1/");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has a prefix
// string "//".
TEST_P(LdsRdsTest, RouteMatchHasInvalidPrefixDoubleSlash) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("//");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has path
// but it's empty.
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathEmptyPath) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has path
// string does not start with "/".
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathNoLeadingSlash) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("grpc.testing.EchoTest1Service/Echo1");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has path
// string that has too many slashes; for example, ends with "/".
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathTooManySlashes) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/Echo1/");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has path
// string that has only 1 slash: missing "/" between service and method.
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathOnlyOneSlash) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service.Echo1");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has path
// string that is missing service.
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingService) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("//Echo1");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Tests that LDS client should ignore route which has path
// string that is missing method.
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathMissingMethod) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/");
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No valid routes specified.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No valid routes specified."));
}
// Test that LDS client should reject route which has invalid path regex.
TEST_P(LdsRdsTest, RouteMatchHasInvalidPathRegex) {
const char* kNewCluster1Name = "new_cluster_1";
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->mutable_safe_regex()->set_regex("a[z-a]");
route1->mutable_route()->set_cluster(kNewCluster1Name);
@@ -2965,30 +3857,30 @@ TEST_P(LdsRdsTest, RouteMatchHasInvalidPathRegex) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "Invalid regex string specified in path matcher.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "path matcher: Invalid regex string specified in matcher."));
}
// Tests that LDS client should send a NACK if route has an action other than
// RouteAction in the LDS response.
TEST_P(LdsRdsTest, RouteHasNoRouteAction) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
route_config.mutable_virtual_hosts(0)->mutable_routes(0)->mutable_redirect();
SetRouteConfiguration(0, route_config);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "No RouteAction found in route.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("No RouteAction found in route."));
}
TEST_P(LdsRdsTest, RouteActionClusterHasEmptyClusterName) {
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
route1->mutable_route()->set_cluster("");
@@ -2999,17 +3891,17 @@ TEST_P(LdsRdsTest, RouteActionClusterHasEmptyClusterName) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "RouteAction cluster contains empty cluster name.");
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("RouteAction cluster contains empty cluster name."));
}
TEST_P(LdsRdsTest, RouteActionWeightedTargetHasIncorrectTotalWeightSet) {
const size_t kWeight75 = 75;
const char* kNewCluster1Name = "new_cluster_1";
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* weighted_cluster1 =
@@ -3027,16 +3919,44 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetHasIncorrectTotalWeightSet) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "RouteAction weighted_cluster has incorrect total weight");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "RouteAction weighted_cluster has incorrect total weight"));
+}
+
+TEST_P(LdsRdsTest, RouteActionWeightedClusterHasZeroTotalWeight) {
+ const char* kNewCluster1Name = "new_cluster_1";
+ RouteConfiguration route_config = default_route_config_;
+ auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
+ route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
+ auto* weighted_cluster1 =
+ route1->mutable_route()->mutable_weighted_clusters()->add_clusters();
+ weighted_cluster1->set_name(kNewCluster1Name);
+ weighted_cluster1->mutable_weight()->set_value(0);
+ route1->mutable_route()
+ ->mutable_weighted_clusters()
+ ->mutable_total_weight()
+ ->set_value(0);
+ auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes();
+ default_route->mutable_match()->set_prefix("");
+ default_route->mutable_route()->set_cluster(kDefaultClusterName);
+ SetRouteConfiguration(0, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendFailure();
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "RouteAction weighted_cluster has no valid clusters specified."));
}
TEST_P(LdsRdsTest, RouteActionWeightedTargetClusterHasEmptyClusterName) {
const size_t kWeight75 = 75;
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* weighted_cluster1 =
@@ -3054,18 +3974,18 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetClusterHasEmptyClusterName) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(
+ EXPECT_THAT(
response_state.error_message,
- "RouteAction weighted_cluster cluster contains empty cluster name.");
+ ::testing::HasSubstr(
+ "RouteAction weighted_cluster cluster contains empty cluster name."));
}
TEST_P(LdsRdsTest, RouteActionWeightedTargetClusterHasNoWeight) {
const size_t kWeight75 = 75;
const char* kNewCluster1Name = "new_cluster_1";
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* weighted_cluster1 =
@@ -3082,16 +4002,16 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetClusterHasNoWeight) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "RouteAction weighted_cluster cluster missing weight");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "RouteAction weighted_cluster cluster missing weight"));
}
TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRegex) {
const char* kNewCluster1Name = "new_cluster_1";
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* header_matcher1 = route1->mutable_match()->add_headers();
@@ -3102,16 +4022,17 @@ TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRegex) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "Invalid regex string specified in header matcher.");
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "header matcher: Invalid regex string specified in matcher."));
}
TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRange) {
const char* kNewCluster1Name = "new_cluster_1";
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* header_matcher1 = route1->mutable_match()->add_headers();
@@ -3123,11 +4044,13 @@ TEST_P(LdsRdsTest, RouteHeaderMatchInvalidRange) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "Invalid range header matcher specifier specified: end "
- "cannot be smaller than start.");
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "header matcher: Invalid range specifier specified: end cannot be "
+ "smaller than start."));
}
// Tests that LDS client should choose the default route (with no matching
@@ -3152,26 +4075,24 @@ TEST_P(LdsRdsTest, XdsRoutingPathMatching) {
AdsServiceImpl::EdsResourceArgs args2({
{"locality0", GetBackendPorts(3, 4)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
// Populating Route Configurations for LDS.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/Echo1");
route1->mutable_route()->set_cluster(kNewCluster1Name);
@@ -3210,6 +4131,70 @@ TEST_P(LdsRdsTest, XdsRoutingPathMatching) {
EXPECT_EQ(kNumEcho2Rpcs, backends_[3]->backend_service2()->request_count());
}
+TEST_P(LdsRdsTest, XdsRoutingPathMatchingCaseInsensitive) {
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ const size_t kNumEcho1Rpcs = 10;
+ const size_t kNumEchoRpcs = 30;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", GetBackendPorts(1, 2)},
+ });
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", GetBackendPorts(2, 3)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ // Populating Route Configurations for LDS.
+ RouteConfiguration new_route_config = default_route_config_;
+ // First route will not match, since it's case-sensitive.
+ // Second route will match with same path.
+ auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
+ route1->mutable_match()->set_path("/GrPc.TeStInG.EcHoTeSt1SErViCe/EcHo1");
+ route1->mutable_route()->set_cluster(kNewCluster1Name);
+ auto* route2 = new_route_config.mutable_virtual_hosts(0)->add_routes();
+ route2->mutable_match()->set_path("/GrPc.TeStInG.EcHoTeSt1SErViCe/EcHo1");
+ route2->mutable_match()->mutable_case_sensitive()->set_value(false);
+ route2->mutable_route()->set_cluster(kNewCluster2Name);
+ 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(0, new_route_config);
+ CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_wait_for_ready(true));
+ CheckRpcSendOk(kNumEcho1Rpcs, RpcOptions()
+ .set_rpc_service(SERVICE_ECHO1)
+ .set_rpc_method(METHOD_ECHO1)
+ .set_wait_for_ready(true));
+ // Make sure RPCs all go to the correct backend.
+ EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count());
+ EXPECT_EQ(0, backends_[0]->backend_service1()->request_count());
+ EXPECT_EQ(0, backends_[1]->backend_service()->request_count());
+ EXPECT_EQ(0, backends_[1]->backend_service1()->request_count());
+ EXPECT_EQ(0, backends_[2]->backend_service()->request_count());
+ EXPECT_EQ(kNumEcho1Rpcs, backends_[2]->backend_service1()->request_count());
+}
+
TEST_P(LdsRdsTest, XdsRoutingPrefixMatching) {
const char* kNewCluster1Name = "new_cluster_1";
const char* kNewEdsService1Name = "new_eds_service_name_1";
@@ -3230,26 +4215,24 @@ TEST_P(LdsRdsTest, XdsRoutingPrefixMatching) {
AdsServiceImpl::EdsResourceArgs args2({
{"locality0", GetBackendPorts(3, 4)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
// Populating Route Configurations for LDS.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
route1->mutable_route()->set_cluster(kNewCluster1Name);
@@ -3283,6 +4266,70 @@ TEST_P(LdsRdsTest, XdsRoutingPrefixMatching) {
EXPECT_EQ(kNumEcho2Rpcs, backends_[3]->backend_service2()->request_count());
}
+TEST_P(LdsRdsTest, XdsRoutingPrefixMatchingCaseInsensitive) {
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ const size_t kNumEcho1Rpcs = 10;
+ const size_t kNumEchoRpcs = 30;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", GetBackendPorts(1, 2)},
+ });
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", GetBackendPorts(2, 3)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ // Populating Route Configurations for LDS.
+ RouteConfiguration new_route_config = default_route_config_;
+ // First route will not match, since it's case-sensitive.
+ // Second route will match with same path.
+ auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
+ route1->mutable_match()->set_prefix("/GrPc.TeStInG.EcHoTeSt1SErViCe");
+ route1->mutable_route()->set_cluster(kNewCluster1Name);
+ auto* route2 = new_route_config.mutable_virtual_hosts(0)->add_routes();
+ route2->mutable_match()->set_prefix("/GrPc.TeStInG.EcHoTeSt1SErViCe");
+ route2->mutable_match()->mutable_case_sensitive()->set_value(false);
+ route2->mutable_route()->set_cluster(kNewCluster2Name);
+ 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(0, new_route_config);
+ CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_wait_for_ready(true));
+ CheckRpcSendOk(kNumEcho1Rpcs, RpcOptions()
+ .set_rpc_service(SERVICE_ECHO1)
+ .set_rpc_method(METHOD_ECHO1)
+ .set_wait_for_ready(true));
+ // Make sure RPCs all go to the correct backend.
+ EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count());
+ EXPECT_EQ(0, backends_[0]->backend_service1()->request_count());
+ EXPECT_EQ(0, backends_[1]->backend_service()->request_count());
+ EXPECT_EQ(0, backends_[1]->backend_service1()->request_count());
+ EXPECT_EQ(0, backends_[2]->backend_service()->request_count());
+ EXPECT_EQ(kNumEcho1Rpcs, backends_[2]->backend_service1()->request_count());
+}
+
TEST_P(LdsRdsTest, XdsRoutingPathRegexMatching) {
const char* kNewCluster1Name = "new_cluster_1";
const char* kNewEdsService1Name = "new_eds_service_name_1";
@@ -3303,26 +4350,24 @@ TEST_P(LdsRdsTest, XdsRoutingPathRegexMatching) {
AdsServiceImpl::EdsResourceArgs args2({
{"locality0", GetBackendPorts(3, 4)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
// Populating Route Configurations for LDS.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
// Will match "/grpc.testing.EchoTest1Service/"
route1->mutable_match()->mutable_safe_regex()->set_regex(".*1.*");
@@ -3358,11 +4403,78 @@ TEST_P(LdsRdsTest, XdsRoutingPathRegexMatching) {
EXPECT_EQ(kNumEcho2Rpcs, backends_[3]->backend_service2()->request_count());
}
+TEST_P(LdsRdsTest, XdsRoutingPathRegexMatchingCaseInsensitive) {
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ const size_t kNumEcho1Rpcs = 10;
+ const size_t kNumEchoRpcs = 30;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", GetBackendPorts(1, 2)},
+ });
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", GetBackendPorts(2, 3)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ // Populating Route Configurations for LDS.
+ RouteConfiguration new_route_config = default_route_config_;
+ // First route will not match, since it's case-sensitive.
+ // Second route will match with same path.
+ auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
+ route1->mutable_match()->mutable_safe_regex()->set_regex(
+ ".*EcHoTeSt1SErViCe.*");
+ route1->mutable_route()->set_cluster(kNewCluster1Name);
+ auto* route2 = new_route_config.mutable_virtual_hosts(0)->add_routes();
+ route2->mutable_match()->mutable_safe_regex()->set_regex(
+ ".*EcHoTeSt1SErViCe.*");
+ route2->mutable_match()->mutable_case_sensitive()->set_value(false);
+ route2->mutable_route()->set_cluster(kNewCluster2Name);
+ 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(0, new_route_config);
+ CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_wait_for_ready(true));
+ CheckRpcSendOk(kNumEcho1Rpcs, RpcOptions()
+ .set_rpc_service(SERVICE_ECHO1)
+ .set_rpc_method(METHOD_ECHO1)
+ .set_wait_for_ready(true));
+ // Make sure RPCs all go to the correct backend.
+ EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count());
+ EXPECT_EQ(0, backends_[0]->backend_service1()->request_count());
+ EXPECT_EQ(0, backends_[1]->backend_service()->request_count());
+ EXPECT_EQ(0, backends_[1]->backend_service1()->request_count());
+ EXPECT_EQ(0, backends_[2]->backend_service()->request_count());
+ EXPECT_EQ(kNumEcho1Rpcs, backends_[2]->backend_service1()->request_count());
+}
+
TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) {
const char* kNewCluster1Name = "new_cluster_1";
const char* kNewEdsService1Name = "new_eds_service_name_1";
const char* kNewCluster2Name = "new_cluster_2";
const char* kNewEdsService2Name = "new_eds_service_name_2";
+ const char* kNotUsedClusterName = "not_used_cluster";
const size_t kNumEcho1Rpcs = 1000;
const size_t kNumEchoRpcs = 10;
const size_t kWeight75 = 75;
@@ -3379,26 +4491,24 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) {
AdsServiceImpl::EdsResourceArgs args2({
{"locality0", GetBackendPorts(2, 3)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
// Populating Route Configurations for LDS.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* weighted_cluster1 =
@@ -3409,6 +4519,11 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) {
route1->mutable_route()->mutable_weighted_clusters()->add_clusters();
weighted_cluster2->set_name(kNewCluster2Name);
weighted_cluster2->mutable_weight()->set_value(kWeight25);
+ // Cluster with weight 0 will not be used.
+ auto* weighted_cluster3 =
+ route1->mutable_route()->mutable_weighted_clusters()->add_clusters();
+ weighted_cluster3->set_name(kNotUsedClusterName);
+ weighted_cluster3->mutable_weight()->set_value(0);
route1->mutable_route()
->mutable_weighted_clusters()
->mutable_total_weight()
@@ -3431,21 +4546,23 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedCluster) {
const int weight_25_request_count =
backends_[2]->backend_service1()->request_count();
const double kErrorTolerance = 0.2;
- EXPECT_THAT(weight_75_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 + kErrorTolerance))));
- // TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
+ EXPECT_THAT(
+ weight_75_request_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 + kErrorTolerance))));
+ // TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
weight_75_request_count, weight_25_request_count);
EXPECT_THAT(weight_25_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 - kErrorToleranceSmallLoad)),
- ::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 + kErrorToleranceSmallLoad))));
+ ::testing::AllOf(
+ ::testing::Ge(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 - kErrorToleranceSmallLoad)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 + kErrorToleranceSmallLoad))));
}
TEST_P(LdsRdsTest, RouteActionWeightedTargetDefaultRoute) {
@@ -3468,26 +4585,24 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetDefaultRoute) {
AdsServiceImpl::EdsResourceArgs args2({
{"locality0", GetBackendPorts(2, 3)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
// Populating Route Configurations for LDS.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("");
auto* weighted_cluster1 =
@@ -3512,21 +4627,23 @@ TEST_P(LdsRdsTest, RouteActionWeightedTargetDefaultRoute) {
const int weight_25_request_count =
backends_[2]->backend_service()->request_count();
const double kErrorTolerance = 0.2;
- EXPECT_THAT(weight_75_request_count,
- ::testing::AllOf(::testing::Ge(kNumEchoRpcs * kWeight75 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEchoRpcs * kWeight75 / 100 *
- (1 + kErrorTolerance))));
- // TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
+ EXPECT_THAT(
+ weight_75_request_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEchoRpcs) *
+ kWeight75 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEchoRpcs) *
+ kWeight75 / 100 * (1 + kErrorTolerance))));
+ // TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
weight_75_request_count, weight_25_request_count);
EXPECT_THAT(weight_25_request_count,
- ::testing::AllOf(::testing::Ge(kNumEchoRpcs * kWeight25 / 100 *
- (1 - kErrorToleranceSmallLoad)),
- ::testing::Le(kNumEchoRpcs * kWeight25 / 100 *
- (1 + kErrorToleranceSmallLoad))));
+ ::testing::AllOf(
+ ::testing::Ge(static_cast<double>(kNumEchoRpcs) * kWeight25 /
+ 100 * (1 - kErrorToleranceSmallLoad)),
+ ::testing::Le(static_cast<double>(kNumEchoRpcs) * kWeight25 /
+ 100 * (1 + kErrorToleranceSmallLoad))));
}
TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) {
@@ -3556,33 +4673,31 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) {
AdsServiceImpl::EdsResourceArgs args3({
{"locality0", GetBackendPorts(3, 4)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args3, kNewEdsService3Name));
+ BuildEdsResource(args3, kNewEdsService3Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
- Cluster new_cluster3 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster3 = default_cluster_;
new_cluster3.set_name(kNewCluster3Name);
new_cluster3.mutable_eds_cluster_config()->set_service_name(
kNewEdsService3Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster3);
// Populating Route Configurations.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* weighted_cluster1 =
@@ -3618,21 +4733,23 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) {
EXPECT_EQ(0, backends_[3]->backend_service()->request_count());
EXPECT_EQ(0, backends_[3]->backend_service1()->request_count());
const double kErrorTolerance = 0.2;
- EXPECT_THAT(weight_75_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 + kErrorTolerance))));
- // TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
+ EXPECT_THAT(
+ weight_75_request_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 + kErrorTolerance))));
+ // TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
weight_75_request_count, weight_25_request_count);
EXPECT_THAT(weight_25_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 - kErrorToleranceSmallLoad)),
- ::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 + kErrorToleranceSmallLoad))));
+ ::testing::AllOf(
+ ::testing::Ge(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 - kErrorToleranceSmallLoad)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 + kErrorToleranceSmallLoad))));
// Change Route Configurations: same clusters different weights.
weighted_cluster1->mutable_weight()->set_value(kWeight50);
weighted_cluster2->mutable_weight()->set_value(kWeight50);
@@ -3655,16 +4772,18 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateWeights) {
backends_[2]->backend_service1()->request_count();
EXPECT_EQ(kNumEchoRpcs, backends_[3]->backend_service()->request_count());
EXPECT_EQ(0, backends_[3]->backend_service1()->request_count());
- EXPECT_THAT(weight_50_request_count_1,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 + kErrorTolerance))));
- EXPECT_THAT(weight_50_request_count_2,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 + kErrorTolerance))));
+ EXPECT_THAT(
+ weight_50_request_count_1,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 + kErrorTolerance))));
+ EXPECT_THAT(
+ weight_50_request_count_2,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 + kErrorTolerance))));
}
TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
@@ -3694,33 +4813,31 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
AdsServiceImpl::EdsResourceArgs args3({
{"locality0", GetBackendPorts(3, 4)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args3, kNewEdsService3Name));
+ BuildEdsResource(args3, kNewEdsService3Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
- Cluster new_cluster3 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster3 = default_cluster_;
new_cluster3.set_name(kNewCluster3Name);
new_cluster3.mutable_eds_cluster_config()->set_service_name(
kNewEdsService3Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster3);
// Populating Route Configurations.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* weighted_cluster1 =
@@ -3755,21 +4872,23 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
EXPECT_EQ(0, backends_[3]->backend_service()->request_count());
EXPECT_EQ(0, backends_[3]->backend_service1()->request_count());
const double kErrorTolerance = 0.2;
- EXPECT_THAT(weight_75_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 + kErrorTolerance))));
- // TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
+ EXPECT_THAT(
+ weight_75_request_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 + kErrorTolerance))));
+ // TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
const double kErrorToleranceSmallLoad = 0.3;
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
weight_75_request_count, weight_25_request_count);
EXPECT_THAT(weight_25_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 - kErrorToleranceSmallLoad)),
- ::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 + kErrorToleranceSmallLoad))));
+ ::testing::AllOf(
+ ::testing::Ge(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 - kErrorToleranceSmallLoad)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 + kErrorToleranceSmallLoad))));
// Change Route Configurations: new set of clusters with different weights.
weighted_cluster1->mutable_weight()->set_value(kWeight50);
weighted_cluster2->set_name(kNewCluster2Name);
@@ -3790,16 +4909,18 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
backends_[2]->backend_service1()->request_count();
EXPECT_EQ(0, backends_[3]->backend_service()->request_count());
EXPECT_EQ(0, backends_[3]->backend_service1()->request_count());
- EXPECT_THAT(weight_50_request_count_1,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 + kErrorTolerance))));
- EXPECT_THAT(weight_50_request_count_2,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight50 / 100 *
- (1 + kErrorTolerance))));
+ EXPECT_THAT(
+ weight_50_request_count_1,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 + kErrorTolerance))));
+ EXPECT_THAT(
+ weight_50_request_count_2,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight50 / 100 * (1 + kErrorTolerance))));
// Change Route Configurations.
weighted_cluster1->mutable_weight()->set_value(kWeight75);
weighted_cluster2->set_name(kNewCluster3Name);
@@ -3818,20 +4939,22 @@ TEST_P(LdsRdsTest, XdsRoutingWeightedClusterUpdateClusters) {
EXPECT_EQ(0, backends_[2]->backend_service1()->request_count());
EXPECT_EQ(0, backends_[3]->backend_service()->request_count());
weight_25_request_count = backends_[3]->backend_service1()->request_count();
- EXPECT_THAT(weight_75_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 - kErrorTolerance)),
- ::testing::Le(kNumEcho1Rpcs * kWeight75 / 100 *
- (1 + kErrorTolerance))));
- // TODO: (@donnadionne) Reduce tolerance: increased the tolerance to keep the
+ EXPECT_THAT(
+ weight_75_request_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) *
+ kWeight75 / 100 * (1 + kErrorTolerance))));
+ // TODO(@donnadionne): Reduce tolerance: increased the tolerance to keep the
// test from flaking while debugging potential root cause.
gpr_log(GPR_INFO, "target_75 received %d rpcs and target_25 received %d rpcs",
weight_75_request_count, weight_25_request_count);
EXPECT_THAT(weight_25_request_count,
- ::testing::AllOf(::testing::Ge(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 - kErrorToleranceSmallLoad)),
- ::testing::Le(kNumEcho1Rpcs * kWeight25 / 100 *
- (1 + kErrorToleranceSmallLoad))));
+ ::testing::AllOf(
+ ::testing::Ge(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 - kErrorToleranceSmallLoad)),
+ ::testing::Le(static_cast<double>(kNumEcho1Rpcs) * kWeight25 /
+ 100 * (1 + kErrorToleranceSmallLoad))));
}
TEST_P(LdsRdsTest, XdsRoutingClusterUpdateClusters) {
@@ -3847,19 +4970,17 @@ TEST_P(LdsRdsTest, XdsRoutingClusterUpdateClusters) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsServiceName));
+ BuildEdsResource(args1, kNewEdsServiceName));
// Populate new CDS resources.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Send Route Configuration.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
SetRouteConfiguration(0, new_route_config);
WaitForAllBackends(0, 1);
CheckRpcSendOk(kNumEchoRpcs);
@@ -3888,12 +5009,11 @@ TEST_P(LdsRdsTest, XdsRoutingClusterUpdateClustersWithPickingDelays) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsServiceName));
+ BuildEdsResource(args1, kNewEdsServiceName));
// Populate new CDS resources.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
@@ -3903,8 +5023,7 @@ TEST_P(LdsRdsTest, XdsRoutingClusterUpdateClustersWithPickingDelays) {
ShutdownBackend(0);
// Send a RouteConfiguration with a default route that points to
// backend 0.
- RouteConfiguration new_route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration new_route_config = default_route_config_;
SetRouteConfiguration(0, new_route_config);
// Send exactly one RPC with no deadline and with wait_for_ready=true.
// This RPC will not complete until after backend 0 is started.
@@ -3932,6 +5051,305 @@ TEST_P(LdsRdsTest, XdsRoutingClusterUpdateClustersWithPickingDelays) {
EXPECT_EQ(1, backends_[1]->backend_service()->request_count());
}
+TEST_P(LdsRdsTest, XdsRoutingApplyXdsTimeout) {
+ const int64_t kTimeoutMillis = 500;
+ const int64_t kTimeoutNano = kTimeoutMillis * 1000000;
+ const int64_t kTimeoutGrpcTimeoutHeaderMaxSecond = 1;
+ const int64_t kTimeoutMaxStreamDurationSecond = 2;
+ const int64_t kTimeoutHttpMaxStreamDurationSecond = 3;
+ const int64_t kTimeoutApplicationSecond = 4;
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ const char* kNewCluster3Name = "new_cluster_3";
+ const char* kNewEdsService3Name = "new_eds_service_name_3";
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ AdsServiceImpl::EdsResourceArgs args3({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args3, kNewEdsService3Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ Cluster new_cluster3 = default_cluster_;
+ new_cluster3.set_name(kNewCluster3Name);
+ new_cluster3.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService3Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster3);
+ // Construct listener.
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ // Set up HTTP max_stream_duration of 3.5 seconds
+ auto* duration =
+ http_connection_manager.mutable_common_http_protocol_options()
+ ->mutable_max_stream_duration();
+ duration->set_seconds(kTimeoutHttpMaxStreamDurationSecond);
+ duration->set_nanos(kTimeoutNano);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ // Construct route config.
+ RouteConfiguration new_route_config = default_route_config_;
+ // route 1: Set max_stream_duration of 2.5 seconds, Set
+ // grpc_timeout_header_max of 1.5
+ auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
+ route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/Echo1");
+ route1->mutable_route()->set_cluster(kNewCluster1Name);
+ auto* max_stream_duration =
+ route1->mutable_route()->mutable_max_stream_duration();
+ duration = max_stream_duration->mutable_max_stream_duration();
+ duration->set_seconds(kTimeoutMaxStreamDurationSecond);
+ duration->set_nanos(kTimeoutNano);
+ duration = max_stream_duration->mutable_grpc_timeout_header_max();
+ duration->set_seconds(kTimeoutGrpcTimeoutHeaderMaxSecond);
+ duration->set_nanos(kTimeoutNano);
+ // route 2: Set max_stream_duration of 2.5 seconds
+ auto* route2 = new_route_config.mutable_virtual_hosts(0)->add_routes();
+ route2->mutable_match()->set_path("/grpc.testing.EchoTest2Service/Echo2");
+ route2->mutable_route()->set_cluster(kNewCluster2Name);
+ max_stream_duration = route2->mutable_route()->mutable_max_stream_duration();
+ duration = max_stream_duration->mutable_max_stream_duration();
+ duration->set_seconds(kTimeoutMaxStreamDurationSecond);
+ duration->set_nanos(kTimeoutNano);
+ // route 3: No timeout values in route configuration
+ auto* route3 = new_route_config.mutable_virtual_hosts(0)->add_routes();
+ route3->mutable_match()->set_path("/grpc.testing.EchoTestService/Echo");
+ route3->mutable_route()->set_cluster(kNewCluster3Name);
+ // Set listener and route config.
+ SetListenerAndRouteConfiguration(0, std::move(listener), new_route_config);
+ // Test grpc_timeout_header_max of 1.5 seconds applied
+ grpc_millis t0 = NowFromCycleCounter();
+ grpc_millis t1 =
+ t0 + kTimeoutGrpcTimeoutHeaderMaxSecond * 1000 + kTimeoutMillis;
+ grpc_millis t2 = t0 + kTimeoutMaxStreamDurationSecond * 1000 + kTimeoutMillis;
+ CheckRpcSendFailure(1,
+ RpcOptions()
+ .set_rpc_service(SERVICE_ECHO1)
+ .set_rpc_method(METHOD_ECHO1)
+ .set_wait_for_ready(true)
+ .set_timeout_ms(kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ t0 = NowFromCycleCounter();
+ EXPECT_GE(t0, t1);
+ EXPECT_LT(t0, t2);
+ // Test max_stream_duration of 2.5 seconds applied
+ t0 = NowFromCycleCounter();
+ t1 = t0 + kTimeoutMaxStreamDurationSecond * 1000 + kTimeoutMillis;
+ t2 = t0 + kTimeoutHttpMaxStreamDurationSecond * 1000 + kTimeoutMillis;
+ CheckRpcSendFailure(1,
+ RpcOptions()
+ .set_rpc_service(SERVICE_ECHO2)
+ .set_rpc_method(METHOD_ECHO2)
+ .set_wait_for_ready(true)
+ .set_timeout_ms(kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ t0 = NowFromCycleCounter();
+ EXPECT_GE(t0, t1);
+ EXPECT_LT(t0, t2);
+ // Test http_stream_duration of 3.5 seconds applied
+ t0 = NowFromCycleCounter();
+ t1 = t0 + kTimeoutHttpMaxStreamDurationSecond * 1000 + kTimeoutMillis;
+ t2 = t0 + kTimeoutApplicationSecond * 1000 + kTimeoutMillis;
+ CheckRpcSendFailure(1,
+ RpcOptions().set_wait_for_ready(true).set_timeout_ms(
+ kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ t0 = NowFromCycleCounter();
+ EXPECT_GE(t0, t1);
+ EXPECT_LT(t0, t2);
+}
+
+TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenXdsTimeoutExplicit0) {
+ const int64_t kTimeoutNano = 500000000;
+ const int64_t kTimeoutMaxStreamDurationSecond = 2;
+ const int64_t kTimeoutHttpMaxStreamDurationSecond = 3;
+ const int64_t kTimeoutApplicationSecond = 4;
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ // Construct listener.
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ // Set up HTTP max_stream_duration of 3.5 seconds
+ auto* duration =
+ http_connection_manager.mutable_common_http_protocol_options()
+ ->mutable_max_stream_duration();
+ duration->set_seconds(kTimeoutHttpMaxStreamDurationSecond);
+ duration->set_nanos(kTimeoutNano);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ // Construct route config.
+ RouteConfiguration new_route_config = default_route_config_;
+ // route 1: Set max_stream_duration of 2.5 seconds, Set
+ // grpc_timeout_header_max of 0
+ auto* route1 = new_route_config.mutable_virtual_hosts(0)->mutable_routes(0);
+ route1->mutable_match()->set_path("/grpc.testing.EchoTest1Service/Echo1");
+ route1->mutable_route()->set_cluster(kNewCluster1Name);
+ auto* max_stream_duration =
+ route1->mutable_route()->mutable_max_stream_duration();
+ duration = max_stream_duration->mutable_max_stream_duration();
+ duration->set_seconds(kTimeoutMaxStreamDurationSecond);
+ duration->set_nanos(kTimeoutNano);
+ duration = max_stream_duration->mutable_grpc_timeout_header_max();
+ duration->set_seconds(0);
+ duration->set_nanos(0);
+ // route 2: Set max_stream_duration to 0
+ auto* route2 = new_route_config.mutable_virtual_hosts(0)->add_routes();
+ route2->mutable_match()->set_path("/grpc.testing.EchoTest2Service/Echo2");
+ route2->mutable_route()->set_cluster(kNewCluster2Name);
+ max_stream_duration = route2->mutable_route()->mutable_max_stream_duration();
+ duration = max_stream_duration->mutable_max_stream_duration();
+ duration->set_seconds(0);
+ duration->set_nanos(0);
+ // Set listener and route config.
+ SetListenerAndRouteConfiguration(0, std::move(listener), new_route_config);
+ // Test application timeout is applied for route 1
+ auto t0 = system_clock::now();
+ CheckRpcSendFailure(1,
+ RpcOptions()
+ .set_rpc_service(SERVICE_ECHO1)
+ .set_rpc_method(METHOD_ECHO1)
+ .set_wait_for_ready(true)
+ .set_timeout_ms(kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ auto ellapsed_nano_seconds =
+ std::chrono::duration_cast<std::chrono::nanoseconds>(system_clock::now() -
+ t0);
+ EXPECT_GT(ellapsed_nano_seconds.count(),
+ kTimeoutApplicationSecond * 1000000000);
+ // Test application timeout is applied for route 2
+ t0 = system_clock::now();
+ CheckRpcSendFailure(1,
+ RpcOptions()
+ .set_rpc_service(SERVICE_ECHO2)
+ .set_rpc_method(METHOD_ECHO2)
+ .set_wait_for_ready(true)
+ .set_timeout_ms(kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ ellapsed_nano_seconds = std::chrono::duration_cast<std::chrono::nanoseconds>(
+ system_clock::now() - t0);
+ EXPECT_GT(ellapsed_nano_seconds.count(),
+ kTimeoutApplicationSecond * 1000000000);
+}
+
+TEST_P(LdsRdsTest, XdsRoutingApplyApplicationTimeoutWhenHttpTimeoutExplicit0) {
+ const int64_t kTimeoutApplicationSecond = 4;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ auto listener = default_listener_;
+ HttpConnectionManager http_connection_manager;
+ listener.mutable_api_listener()->mutable_api_listener()->UnpackTo(
+ &http_connection_manager);
+ // Set up HTTP max_stream_duration to be explicit 0
+ auto* duration =
+ http_connection_manager.mutable_common_http_protocol_options()
+ ->mutable_max_stream_duration();
+ duration->set_seconds(0);
+ duration->set_nanos(0);
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ // Set listener and route config.
+ SetListenerAndRouteConfiguration(0, std::move(listener),
+ default_route_config_);
+ // Test application timeout is applied for route 1
+ auto t0 = system_clock::now();
+ CheckRpcSendFailure(1,
+ RpcOptions().set_wait_for_ready(true).set_timeout_ms(
+ kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ auto ellapsed_nano_seconds =
+ std::chrono::duration_cast<std::chrono::nanoseconds>(system_clock::now() -
+ t0);
+ EXPECT_GT(ellapsed_nano_seconds.count(),
+ kTimeoutApplicationSecond * 1000000000);
+}
+
+// Test to ensure application-specified deadline won't be affected when
+// the xDS config does not specify a timeout.
+TEST_P(LdsRdsTest, XdsRoutingWithOnlyApplicationTimeout) {
+ const int64_t kTimeoutApplicationSecond = 4;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {grpc_pick_unused_port_or_die()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
+ auto t0 = system_clock::now();
+ CheckRpcSendFailure(1,
+ RpcOptions().set_wait_for_ready(true).set_timeout_ms(
+ kTimeoutApplicationSecond * 1000),
+ StatusCode::DEADLINE_EXCEEDED);
+ auto ellapsed_nano_seconds =
+ std::chrono::duration_cast<std::chrono::nanoseconds>(system_clock::now() -
+ t0);
+ EXPECT_GT(ellapsed_nano_seconds.count(),
+ kTimeoutApplicationSecond * 1000000000);
+}
+
TEST_P(LdsRdsTest, XdsRoutingHeadersMatching) {
const char* kNewClusterName = "new_cluster";
const char* kNewEdsServiceName = "new_eds_service_name";
@@ -3946,19 +5364,17 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatching) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsServiceName));
+ BuildEdsResource(args1, kNewEdsServiceName));
// Populate new CDS resources.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Populating Route Configurations for LDS.
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* header_matcher1 = route1->mutable_match()->add_headers();
@@ -3976,20 +5392,27 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatching) {
header_matcher4->set_present_match(false);
auto* header_matcher5 = route1->mutable_match()->add_headers();
header_matcher5->set_name("header5");
- header_matcher5->set_prefix_match("/grpc");
+ header_matcher5->set_present_match(true);
auto* header_matcher6 = route1->mutable_match()->add_headers();
header_matcher6->set_name("header6");
- header_matcher6->set_suffix_match(".cc");
- header_matcher6->set_invert_match(true);
+ header_matcher6->set_prefix_match("/grpc");
+ auto* header_matcher7 = route1->mutable_match()->add_headers();
+ header_matcher7->set_name("header7");
+ header_matcher7->set_suffix_match(".cc");
+ header_matcher7->set_invert_match(true);
route1->mutable_route()->set_cluster(kNewClusterName);
auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes();
default_route->mutable_match()->set_prefix("");
default_route->mutable_route()->set_cluster(kDefaultClusterName);
SetRouteConfiguration(0, route_config);
std::vector<std::pair<TString, TString>> metadata = {
- {"header1", "POST"}, {"header2", "blah"},
- {"header3", "1"}, {"header5", "/grpc.testing.EchoTest1Service/"},
- {"header1", "PUT"}, {"header6", "grpc.java"},
+ {"header1", "POST"},
+ {"header2", "blah"},
+ {"header3", "1"},
+ {"header5", "anything"},
+ {"header6", "/grpc.testing.EchoTest1Service/"},
+ {"header1", "PUT"},
+ {"header7", "grpc.java"},
{"header1", "GET"},
};
const auto header_match_rpc_options = RpcOptions()
@@ -4008,7 +5431,7 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatching) {
EXPECT_EQ(0, backends_[1]->backend_service()->request_count());
EXPECT_EQ(kNumEcho1Rpcs, backends_[1]->backend_service1()->request_count());
EXPECT_EQ(0, backends_[1]->backend_service2()->request_count());
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
@@ -4025,19 +5448,17 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingSpecialHeaderContentType) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsServiceName));
+ BuildEdsResource(args1, kNewEdsServiceName));
// Populate new CDS resources.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Populating Route Configurations for LDS.
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("");
auto* header_matcher1 = route1->mutable_match()->add_headers();
@@ -4057,15 +5478,13 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingSpecialHeaderContentType) {
CheckRpcSendOk(kNumEchoRpcs);
EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count());
EXPECT_EQ(0, backends_[1]->backend_service()->request_count());
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingSpecialCasesToIgnore) {
const char* kNewCluster1Name = "new_cluster_1";
const char* kNewEdsService1Name = "new_eds_service_name_1";
- const char* kNewCluster2Name = "new_cluster_2";
- const char* kNewEdsService2Name = "new_eds_service_name_2";
const size_t kNumEchoRpcs = 100;
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
@@ -4076,41 +5495,23 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingSpecialCasesToIgnore) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
- AdsServiceImpl::EdsResourceArgs args2({
- {"locality0", GetBackendPorts(2, 3)},
- });
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args1, kNewEdsService1Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
- new_cluster2.set_name(kNewCluster2Name);
- new_cluster2.mutable_eds_cluster_config()->set_service_name(
- kNewEdsService2Name);
- balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
// Populating Route Configurations for LDS.
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("");
auto* header_matcher1 = route1->mutable_match()->add_headers();
header_matcher1->set_name("grpc-foo-bin");
header_matcher1->set_present_match(true);
route1->mutable_route()->set_cluster(kNewCluster1Name);
- auto route2 = route_config.mutable_virtual_hosts(0)->add_routes();
- route2->mutable_match()->set_prefix("");
- auto* header_matcher2 = route2->mutable_match()->add_headers();
- header_matcher2->set_name("grpc-previous-rpc-attempts");
- header_matcher2->set_present_match(true);
- route2->mutable_route()->set_cluster(kNewCluster2Name);
auto* default_route = route_config.mutable_virtual_hosts(0)->add_routes();
default_route->mutable_match()->set_prefix("");
default_route->mutable_route()->set_cluster(kDefaultClusterName);
@@ -4118,7 +5519,6 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingSpecialCasesToIgnore) {
// Send headers which will mismatch each route
std::vector<std::pair<TString, TString>> metadata = {
{"grpc-foo-bin", "grpc-foo-bin"},
- {"grpc-previous-rpc-attempts", "grpc-previous-rpc-attempts"},
};
WaitForAllBackends(0, 1);
CheckRpcSendOk(kNumEchoRpcs, RpcOptions().set_metadata(metadata));
@@ -4126,8 +5526,7 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingSpecialCasesToIgnore) {
// were mismatched.
EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count());
EXPECT_EQ(0, backends_[1]->backend_service()->request_count());
- EXPECT_EQ(0, backends_[2]->backend_service()->request_count());
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
@@ -4144,19 +5543,17 @@ TEST_P(LdsRdsTest, XdsRoutingRuntimeFractionMatching) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsServiceName));
+ BuildEdsResource(args1, kNewEdsServiceName));
// Populate new CDS resources.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Populating Route Configurations for LDS.
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()
->mutable_runtime_fraction()
@@ -4174,15 +5571,19 @@ TEST_P(LdsRdsTest, XdsRoutingRuntimeFractionMatching) {
const int matched_backend_count =
backends_[1]->backend_service()->request_count();
const double kErrorTolerance = 0.2;
- EXPECT_THAT(default_backend_count,
- ::testing::AllOf(
- ::testing::Ge(kNumRpcs * 75 / 100 * (1 - kErrorTolerance)),
- ::testing::Le(kNumRpcs * 75 / 100 * (1 + kErrorTolerance))));
- EXPECT_THAT(matched_backend_count,
- ::testing::AllOf(
- ::testing::Ge(kNumRpcs * 25 / 100 * (1 - kErrorTolerance)),
- ::testing::Le(kNumRpcs * 25 / 100 * (1 + kErrorTolerance))));
- const auto& response_state = RouteConfigurationResponseState(0);
+ EXPECT_THAT(
+ default_backend_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumRpcs) * 75 / 100 *
+ (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumRpcs) * 75 / 100 *
+ (1 + kErrorTolerance))));
+ EXPECT_THAT(
+ matched_backend_count,
+ ::testing::AllOf(::testing::Ge(static_cast<double>(kNumRpcs) * 25 / 100 *
+ (1 - kErrorTolerance)),
+ ::testing::Le(static_cast<double>(kNumRpcs) * 25 / 100 *
+ (1 + kErrorTolerance))));
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
@@ -4210,33 +5611,31 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingUnmatchCases) {
AdsServiceImpl::EdsResourceArgs args3({
{"locality0", GetBackendPorts(3, 4)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsService1Name));
+ BuildEdsResource(args1, kNewEdsService1Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args2, kNewEdsService2Name));
+ BuildEdsResource(args2, kNewEdsService2Name));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args3, kNewEdsService3Name));
+ BuildEdsResource(args3, kNewEdsService3Name));
// Populate new CDS resources.
- Cluster new_cluster1 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster1 = default_cluster_;
new_cluster1.set_name(kNewCluster1Name);
new_cluster1.mutable_eds_cluster_config()->set_service_name(
kNewEdsService1Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
- Cluster new_cluster2 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster2 = default_cluster_;
new_cluster2.set_name(kNewCluster2Name);
new_cluster2.mutable_eds_cluster_config()->set_service_name(
kNewEdsService2Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
- Cluster new_cluster3 = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster3 = default_cluster_;
new_cluster3.set_name(kNewCluster3Name);
new_cluster3.mutable_eds_cluster_config()->set_service_name(
kNewEdsService3Name);
balancers_[0]->ads_service()->SetCdsResource(new_cluster3);
// Populating Route Configurations for LDS.
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
auto* header_matcher1 = route1->mutable_match()->add_headers();
@@ -4283,7 +5682,7 @@ TEST_P(LdsRdsTest, XdsRoutingHeadersMatchingUnmatchCases) {
EXPECT_EQ(kNumEchoRpcs, backends_[0]->backend_service()->request_count());
EXPECT_EQ(kNumEcho1Rpcs, backends_[0]->backend_service1()->request_count());
EXPECT_EQ(0, backends_[0]->backend_service2()->request_count());
- const auto& response_state = RouteConfigurationResponseState(0);
+ const auto response_state = RouteConfigurationResponseState(0);
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
}
@@ -4299,19 +5698,17 @@ TEST_P(LdsRdsTest, XdsRoutingChangeRoutesWithoutChangingClusters) {
AdsServiceImpl::EdsResourceArgs args1({
{"locality0", GetBackendPorts(1, 2)},
});
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args1, kNewEdsServiceName));
+ BuildEdsResource(args1, kNewEdsServiceName));
// Populate new CDS resources.
- Cluster new_cluster = balancers_[0]->ads_service()->default_cluster();
+ Cluster new_cluster = default_cluster_;
new_cluster.set_name(kNewClusterName);
new_cluster.mutable_eds_cluster_config()->set_service_name(
kNewEdsServiceName);
balancers_[0]->ads_service()->SetCdsResource(new_cluster);
// Populating Route Configurations for LDS.
- RouteConfiguration route_config =
- balancers_[0]->ads_service()->default_route_config();
+ RouteConfiguration route_config = default_route_config_;
auto* route1 = route_config.mutable_virtual_hosts(0)->mutable_routes(0);
route1->mutable_match()->set_prefix("/grpc.testing.EchoTest1Service/");
route1->mutable_route()->set_cluster(kNewClusterName);
@@ -4352,6 +5749,454 @@ TEST_P(LdsRdsTest, XdsRoutingChangeRoutesWithoutChangingClusters) {
EXPECT_EQ(1, backends_[1]->backend_service2()->request_count());
}
+// Test that we NACK unknown filter types in VirtualHost.
+TEST_P(LdsRdsTest, RejectsUnknownHttpFilterTypeInVirtualHost) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config =
+ route_config.mutable_virtual_hosts(0)->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(Listener());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("no filter registered for config type "
+ "envoy.config.listener.v3.Listener"));
+}
+
+// Test that we ignore optional unknown filter types in VirtualHost.
+TEST_P(LdsRdsTest, IgnoresOptionalUnknownHttpFilterTypeInVirtualHost) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config =
+ route_config.mutable_virtual_hosts(0)->mutable_typed_per_filter_config();
+ ::envoy::config::route::v3::FilterConfig filter_config;
+ filter_config.mutable_config()->PackFrom(Listener());
+ filter_config.set_is_optional(true);
+ (*per_filter_config)["unknown"].PackFrom(filter_config);
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(RouteConfigurationResponseState(0).state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK filters without configs in VirtualHost.
+TEST_P(LdsRdsTest, RejectsHttpFilterWithoutConfigInVirtualHost) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config =
+ route_config.mutable_virtual_hosts(0)->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"];
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we NACK filters without configs in FilterConfig in VirtualHost.
+TEST_P(LdsRdsTest, RejectsHttpFilterWithoutConfigInFilterConfigInVirtualHost) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config =
+ route_config.mutable_virtual_hosts(0)->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(
+ ::envoy::config::route::v3::FilterConfig());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we ignore optional filters without configs in VirtualHost.
+TEST_P(LdsRdsTest, IgnoresOptionalHttpFilterWithoutConfigInVirtualHost) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config =
+ route_config.mutable_virtual_hosts(0)->mutable_typed_per_filter_config();
+ ::envoy::config::route::v3::FilterConfig filter_config;
+ filter_config.set_is_optional(true);
+ (*per_filter_config)["unknown"].PackFrom(filter_config);
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(RouteConfigurationResponseState(0).state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK unparseable filter types in VirtualHost.
+TEST_P(LdsRdsTest, RejectsUnparseableHttpFilterTypeInVirtualHost) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config =
+ route_config.mutable_virtual_hosts(0)->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(
+ envoy::extensions::filters::http::router::v3::Router());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("router filter does not support config override"));
+}
+
+// Test that we NACK unknown filter types in Route.
+TEST_P(LdsRdsTest, RejectsUnknownHttpFilterTypeInRoute) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(Listener());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("no filter registered for config type "
+ "envoy.config.listener.v3.Listener"));
+}
+
+// Test that we ignore optional unknown filter types in Route.
+TEST_P(LdsRdsTest, IgnoresOptionalUnknownHttpFilterTypeInRoute) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ ::envoy::config::route::v3::FilterConfig filter_config;
+ filter_config.mutable_config()->PackFrom(Listener());
+ filter_config.set_is_optional(true);
+ (*per_filter_config)["unknown"].PackFrom(filter_config);
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(RouteConfigurationResponseState(0).state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK filters without configs in Route.
+TEST_P(LdsRdsTest, RejectsHttpFilterWithoutConfigInRoute) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"];
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we NACK filters without configs in FilterConfig in Route.
+TEST_P(LdsRdsTest, RejectsHttpFilterWithoutConfigInFilterConfigInRoute) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(
+ ::envoy::config::route::v3::FilterConfig());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we ignore optional filters without configs in Route.
+TEST_P(LdsRdsTest, IgnoresOptionalHttpFilterWithoutConfigInRoute) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ ::envoy::config::route::v3::FilterConfig filter_config;
+ filter_config.set_is_optional(true);
+ (*per_filter_config)["unknown"].PackFrom(filter_config);
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(RouteConfigurationResponseState(0).state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK unparseable filter types in Route.
+TEST_P(LdsRdsTest, RejectsUnparseableHttpFilterTypeInRoute) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* per_filter_config = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(
+ envoy::extensions::filters::http::router::v3::Router());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("router filter does not support config override"));
+}
+
+// Test that we NACK unknown filter types in ClusterWeight.
+TEST_P(LdsRdsTest, RejectsUnknownHttpFilterTypeInClusterWeight) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* cluster_weight = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_route()
+ ->mutable_weighted_clusters()
+ ->add_clusters();
+ cluster_weight->set_name(kDefaultClusterName);
+ cluster_weight->mutable_weight()->set_value(100);
+ auto* per_filter_config = cluster_weight->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(Listener());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("no filter registered for config type "
+ "envoy.config.listener.v3.Listener"));
+}
+
+// Test that we ignore optional unknown filter types in ClusterWeight.
+TEST_P(LdsRdsTest, IgnoresOptionalUnknownHttpFilterTypeInClusterWeight) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* cluster_weight = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_route()
+ ->mutable_weighted_clusters()
+ ->add_clusters();
+ cluster_weight->set_name(kDefaultClusterName);
+ cluster_weight->mutable_weight()->set_value(100);
+ auto* per_filter_config = cluster_weight->mutable_typed_per_filter_config();
+ ::envoy::config::route::v3::FilterConfig filter_config;
+ filter_config.mutable_config()->PackFrom(Listener());
+ filter_config.set_is_optional(true);
+ (*per_filter_config)["unknown"].PackFrom(filter_config);
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(RouteConfigurationResponseState(0).state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK filters without configs in ClusterWeight.
+TEST_P(LdsRdsTest, RejectsHttpFilterWithoutConfigInClusterWeight) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* cluster_weight = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_route()
+ ->mutable_weighted_clusters()
+ ->add_clusters();
+ cluster_weight->set_name(kDefaultClusterName);
+ cluster_weight->mutable_weight()->set_value(100);
+ auto* per_filter_config = cluster_weight->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"];
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we NACK filters without configs in FilterConfig in ClusterWeight.
+TEST_P(LdsRdsTest,
+ RejectsHttpFilterWithoutConfigInFilterConfigInClusterWeight) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* cluster_weight = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_route()
+ ->mutable_weighted_clusters()
+ ->add_clusters();
+ cluster_weight->set_name(kDefaultClusterName);
+ cluster_weight->mutable_weight()->set_value(100);
+ auto* per_filter_config = cluster_weight->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(
+ ::envoy::config::route::v3::FilterConfig());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "no filter config specified for filter name unknown"));
+}
+
+// Test that we ignore optional filters without configs in ClusterWeight.
+TEST_P(LdsRdsTest, IgnoresOptionalHttpFilterWithoutConfigInClusterWeight) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* cluster_weight = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_route()
+ ->mutable_weighted_clusters()
+ ->add_clusters();
+ cluster_weight->set_name(kDefaultClusterName);
+ cluster_weight->mutable_weight()->set_value(100);
+ auto* per_filter_config = cluster_weight->mutable_typed_per_filter_config();
+ ::envoy::config::route::v3::FilterConfig filter_config;
+ filter_config.set_is_optional(true);
+ (*per_filter_config)["unknown"].PackFrom(filter_config);
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ WaitForAllBackends();
+ EXPECT_EQ(RouteConfigurationResponseState(0).state,
+ AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Test that we NACK unparseable filter types in ClusterWeight.
+TEST_P(LdsRdsTest, RejectsUnparseableHttpFilterTypeInClusterWeight) {
+ if (GetParam().use_v2()) return; // Filters supported in v3 only.
+ RouteConfiguration route_config = default_route_config_;
+ auto* cluster_weight = route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_route()
+ ->mutable_weighted_clusters()
+ ->add_clusters();
+ cluster_weight->set_name(kDefaultClusterName);
+ cluster_weight->mutable_weight()->set_value(100);
+ auto* per_filter_config = cluster_weight->mutable_typed_per_filter_config();
+ (*per_filter_config)["unknown"].PackFrom(
+ envoy::extensions::filters::http::router::v3::Router());
+ SetListenerAndRouteConfiguration(0, default_listener_, route_config);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Wait until xDS server sees NACK.
+ do {
+ CheckRpcSendFailure();
+ } while (RouteConfigurationResponseState(0).state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state = RouteConfigurationResponseState(0);
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("router filter does not support config override"));
+}
+
using CdsTest = BasicTest;
// Tests that CDS client should send an ACK upon correct CDS response.
@@ -4363,64 +6208,2470 @@ TEST_P(CdsTest, Vanilla) {
AdsServiceImpl::ResponseState::ACKED);
}
+TEST_P(CdsTest, LogicalDNSClusterType) {
+ gpr_setenv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER",
+ "true");
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create Logical DNS Cluster
+ auto cluster = default_cluster_;
+ cluster.set_type(Cluster::LOGICAL_DNS);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // Set Logical DNS result
+ {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_core::Resolver::Result result;
+ result.addresses = CreateAddressListFromPortList(GetBackendPorts(1, 2));
+ logical_dns_cluster_resolver_response_generator_->SetResponse(
+ std::move(result));
+ }
+ // Wait for traffic to go to backend 1.
+ WaitForBackend(1);
+ gpr_unsetenv(
+ "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER");
+}
+
+TEST_P(CdsTest, AggregateClusterType) {
+ gpr_setenv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER",
+ "true");
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", GetBackendPorts(1, 2)},
+ });
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", GetBackendPorts(2, 3)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ // Create Aggregate Cluster
+ auto cluster = default_cluster_;
+ CustomClusterType* custom_cluster = cluster.mutable_cluster_type();
+ custom_cluster->set_name("envoy.clusters.aggregate");
+ ClusterConfig cluster_config;
+ cluster_config.add_clusters(kNewCluster1Name);
+ cluster_config.add_clusters(kNewCluster2Name);
+ custom_cluster->mutable_typed_config()->PackFrom(cluster_config);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // Wait for traffic to go to backend 1.
+ WaitForBackend(1);
+ // Shutdown backend 1 and wait for all traffic to go to backend 2.
+ ShutdownBackend(1);
+ WaitForBackend(2);
+ EXPECT_EQ(balancers_[0]->ads_service()->cds_response_state().state,
+ AdsServiceImpl::ResponseState::ACKED);
+ // Bring backend 1 back and ensure all traffic go back to it.
+ StartBackend(1);
+ WaitForBackend(1);
+ gpr_unsetenv(
+ "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER");
+}
+
+TEST_P(CdsTest, AggregateClusterEdsToLogicalDns) {
+ gpr_setenv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER",
+ "true");
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ const char* kNewCluster1Name = "new_cluster_1";
+ const char* kNewEdsService1Name = "new_eds_service_name_1";
+ const char* kLogicalDNSClusterName = "logical_dns_cluster";
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args1({
+ {"locality0", GetBackendPorts(1, 2)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args1, kNewEdsService1Name));
+ // Populate new CDS resources.
+ Cluster new_cluster1 = default_cluster_;
+ new_cluster1.set_name(kNewCluster1Name);
+ new_cluster1.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService1Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster1);
+ // Create Logical DNS Cluster
+ auto logical_dns_cluster = default_cluster_;
+ logical_dns_cluster.set_name(kLogicalDNSClusterName);
+ logical_dns_cluster.set_type(Cluster::LOGICAL_DNS);
+ balancers_[0]->ads_service()->SetCdsResource(logical_dns_cluster);
+ // Create Aggregate Cluster
+ auto cluster = default_cluster_;
+ CustomClusterType* custom_cluster = cluster.mutable_cluster_type();
+ custom_cluster->set_name("envoy.clusters.aggregate");
+ ClusterConfig cluster_config;
+ cluster_config.add_clusters(kNewCluster1Name);
+ cluster_config.add_clusters(kLogicalDNSClusterName);
+ custom_cluster->mutable_typed_config()->PackFrom(cluster_config);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // Set Logical DNS result
+ {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_core::Resolver::Result result;
+ result.addresses = CreateAddressListFromPortList(GetBackendPorts(2, 3));
+ logical_dns_cluster_resolver_response_generator_->SetResponse(
+ std::move(result));
+ }
+ // Wait for traffic to go to backend 1.
+ WaitForBackend(1);
+ // Shutdown backend 1 and wait for all traffic to go to backend 2.
+ ShutdownBackend(1);
+ WaitForBackend(2);
+ EXPECT_EQ(balancers_[0]->ads_service()->cds_response_state().state,
+ AdsServiceImpl::ResponseState::ACKED);
+ // Bring backend 1 back and ensure all traffic go back to it.
+ StartBackend(1);
+ WaitForBackend(1);
+ gpr_unsetenv(
+ "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER");
+}
+
+TEST_P(CdsTest, AggregateClusterLogicalDnsToEds) {
+ gpr_setenv("GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER",
+ "true");
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ const char* kNewCluster2Name = "new_cluster_2";
+ const char* kNewEdsService2Name = "new_eds_service_name_2";
+ const char* kLogicalDNSClusterName = "logical_dns_cluster";
+ // Populate new EDS resources.
+ AdsServiceImpl::EdsResourceArgs args2({
+ {"locality0", GetBackendPorts(2, 3)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args2, kNewEdsService2Name));
+ // Populate new CDS resources.
+ Cluster new_cluster2 = default_cluster_;
+ new_cluster2.set_name(kNewCluster2Name);
+ new_cluster2.mutable_eds_cluster_config()->set_service_name(
+ kNewEdsService2Name);
+ balancers_[0]->ads_service()->SetCdsResource(new_cluster2);
+ // Create Logical DNS Cluster
+ auto logical_dns_cluster = default_cluster_;
+ logical_dns_cluster.set_name(kLogicalDNSClusterName);
+ logical_dns_cluster.set_type(Cluster::LOGICAL_DNS);
+ balancers_[0]->ads_service()->SetCdsResource(logical_dns_cluster);
+ // Create Aggregate Cluster
+ auto cluster = default_cluster_;
+ CustomClusterType* custom_cluster = cluster.mutable_cluster_type();
+ custom_cluster->set_name("envoy.clusters.aggregate");
+ ClusterConfig cluster_config;
+ cluster_config.add_clusters(kLogicalDNSClusterName);
+ cluster_config.add_clusters(kNewCluster2Name);
+ custom_cluster->mutable_typed_config()->PackFrom(cluster_config);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // Set Logical DNS result
+ {
+ grpc_core::ExecCtx exec_ctx;
+ grpc_core::Resolver::Result result;
+ result.addresses = CreateAddressListFromPortList(GetBackendPorts(1, 2));
+ logical_dns_cluster_resolver_response_generator_->SetResponse(
+ std::move(result));
+ }
+ // Wait for traffic to go to backend 1.
+ WaitForBackend(1);
+ // Shutdown backend 1 and wait for all traffic to go to backend 2.
+ ShutdownBackend(1);
+ WaitForBackend(2);
+ EXPECT_EQ(balancers_[0]->ads_service()->cds_response_state().state,
+ AdsServiceImpl::ResponseState::ACKED);
+ // Bring backend 1 back and ensure all traffic go back to it.
+ StartBackend(1);
+ WaitForBackend(1);
+ gpr_unsetenv(
+ "GRPC_XDS_EXPERIMENTAL_ENABLE_AGGREGATE_AND_LOGICAL_DNS_CLUSTER");
+}
+
+// Test that CDS client should send a NACK if cluster type is Logical DNS but
+// the feature is not yet supported.
+TEST_P(CdsTest, LogicalDNSClusterTypeDisabled) {
+ auto cluster = default_cluster_;
+ cluster.set_type(Cluster::LOGICAL_DNS);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendFailure();
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("DiscoveryType is not valid."));
+}
+
+// Test that CDS client should send a NACK if cluster type is AGGREGATE but
+// the feature is not yet supported.
+TEST_P(CdsTest, AggregateClusterTypeDisabled) {
+ auto cluster = default_cluster_;
+ CustomClusterType* custom_cluster = cluster.mutable_cluster_type();
+ custom_cluster->set_name("envoy.clusters.aggregate");
+ ClusterConfig cluster_config;
+ cluster_config.add_clusters("cluster1");
+ cluster_config.add_clusters("cluster2");
+ custom_cluster->mutable_typed_config()->PackFrom(cluster_config);
+ cluster.set_type(Cluster::LOGICAL_DNS);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendFailure();
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("DiscoveryType is not valid."));
+}
+
// Tests that CDS client should send a NACK if the cluster type in CDS response
-// is other than EDS.
-TEST_P(CdsTest, WrongClusterType) {
- auto cluster = balancers_[0]->ads_service()->default_cluster();
+// is unsupported.
+TEST_P(CdsTest, UnsupportedClusterType) {
+ auto cluster = default_cluster_;
cluster.set_type(Cluster::STATIC);
balancers_[0]->ads_service()->SetCdsResource(cluster);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->cds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "DiscoveryType is not EDS.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("DiscoveryType is not valid."));
+}
+
+// Tests that the NACK for multiple bad resources includes both errors.
+TEST_P(CdsTest, MultipleBadResources) {
+ constexpr char kClusterName2[] = "cluster_name_2";
+ // Use unsupported type for default cluster.
+ auto cluster = default_cluster_;
+ cluster.set_type(Cluster::STATIC);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // Add second cluster with the same error.
+ cluster.set_name(kClusterName2);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // Change RouteConfig to point to both clusters.
+ RouteConfiguration route_config = default_route_config_;
+ auto* route = route_config.mutable_virtual_hosts(0)->add_routes();
+ route->mutable_match()->set_prefix("");
+ route->mutable_route()->set_cluster(kClusterName2);
+ SetRouteConfiguration(0, route_config);
+ // Send RPC.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendFailure();
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::AllOf(
+ ::testing::HasSubstr(y_absl::StrCat(
+ kDefaultClusterName, ": DiscoveryType is not valid.")),
+ ::testing::HasSubstr(y_absl::StrCat(
+ kClusterName2, ": DiscoveryType is not valid."))));
}
// Tests that CDS client should send a NACK if the eds_config in CDS response is
// other than ADS.
TEST_P(CdsTest, WrongEdsConfig) {
- auto cluster = balancers_[0]->ads_service()->default_cluster();
+ auto cluster = default_cluster_;
cluster.mutable_eds_cluster_config()->mutable_eds_config()->mutable_self();
balancers_[0]->ads_service()->SetCdsResource(cluster);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->cds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "EDS ConfigSource is not ADS.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("EDS ConfigSource is not ADS."));
}
// Tests that CDS client should send a NACK if the lb_policy in CDS response is
// other than ROUND_ROBIN.
TEST_P(CdsTest, WrongLbPolicy) {
- auto cluster = balancers_[0]->ads_service()->default_cluster();
+ auto cluster = default_cluster_;
cluster.set_lb_policy(Cluster::LEAST_REQUEST);
balancers_[0]->ads_service()->SetCdsResource(cluster);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->cds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "LB policy is not ROUND_ROBIN.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("LB policy is not supported."));
}
// Tests that CDS client should send a NACK if the lrs_server in CDS response is
// other than SELF.
TEST_P(CdsTest, WrongLrsServer) {
- auto cluster = balancers_[0]->ads_service()->default_cluster();
+ auto cluster = default_cluster_;
cluster.mutable_lrs_server()->mutable_ads();
balancers_[0]->ads_service()->SetCdsResource(cluster);
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("LRS ConfigSource is not self."));
+}
+
+class XdsSecurityTest : public BasicTest {
+ protected:
+ static void SetUpTestCase() {
+ gpr_setenv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT", "true");
+ BasicTest::SetUpTestCase();
+ }
+
+ static void TearDownTestCase() {
+ BasicTest::TearDownTestCase();
+ gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT");
+ }
+
+ void SetUp() override {
+ BasicTest::SetUp();
+ root_cert_ = ReadFile(kCaCertPath);
+ bad_root_cert_ = ReadFile(kBadClientCertPath);
+ identity_pair_ = ReadTlsIdentityPair(kClientKeyPath, kClientCertPath);
+ // TODO(yashykt): Use different client certs here instead of reusing server
+ // certs after https://github.com/grpc/grpc/pull/24876 is merged
+ fallback_identity_pair_ =
+ ReadTlsIdentityPair(kServerKeyPath, kServerCertPath);
+ bad_identity_pair_ =
+ ReadTlsIdentityPair(kBadClientKeyPath, kBadClientCertPath);
+ server_san_exact_.set_exact("*.test.google.fr");
+ server_san_prefix_.set_prefix("waterzooi.test.google");
+ server_san_suffix_.set_suffix("google.fr");
+ server_san_contains_.set_contains("google");
+ server_san_regex_.mutable_safe_regex()->mutable_google_re2();
+ server_san_regex_.mutable_safe_regex()->set_regex(
+ "(foo|waterzooi).test.google.(fr|be)");
+ bad_san_1_.set_exact("192.168.1.4");
+ bad_san_2_.set_exact("foo.test.google.in");
+ authenticated_identity_ = {"testclient"};
+ fallback_authenticated_identity_ = {"*.test.google.fr",
+ "waterzooi.test.google.be",
+ "*.test.youtube.com", "192.168.1.3"};
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolutionForLbChannelAllBalancers();
+ }
+
+ void TearDown() override {
+ g_fake1_cert_data_map = nullptr;
+ g_fake2_cert_data_map = nullptr;
+ BasicTest::TearDown();
+ }
+
+ // Sends CDS updates with the new security configuration and verifies that
+ // after propagation, this new configuration is used for connections. If \a
+ // identity_instance_name and \a root_instance_name are both empty,
+ // connections are expected to use fallback credentials.
+ void UpdateAndVerifyXdsSecurityConfiguration(
+ y_absl::string_view root_instance_name,
+ y_absl::string_view root_certificate_name,
+ y_absl::string_view identity_instance_name,
+ y_absl::string_view identity_certificate_name,
+ const std::vector<StringMatcher>& san_matchers,
+ const std::vector<TString>& expected_authenticated_identity,
+ bool test_expects_failure = false) {
+ auto cluster = default_cluster_;
+ if (!identity_instance_name.empty() || !root_instance_name.empty()) {
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ UpstreamTlsContext upstream_tls_context;
+ if (!identity_instance_name.empty()) {
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_instance_name(TString(identity_instance_name));
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_certificate_name(TString(identity_certificate_name));
+ }
+ if (!root_instance_name.empty()) {
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_instance_name(TString(root_instance_name));
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_certificate_name(TString(root_certificate_name));
+ }
+ if (!san_matchers.empty()) {
+ auto* validation_context =
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_default_validation_context();
+ for (const auto& san_matcher : san_matchers) {
+ *validation_context->add_match_subject_alt_names() = san_matcher;
+ }
+ }
+ transport_socket->mutable_typed_config()->PackFrom(upstream_tls_context);
+ }
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // The updates might take time to have an effect, so use a retry loop.
+ constexpr int kRetryCount = 100;
+ int num_tries = 0;
+ for (; num_tries < kRetryCount; num_tries++) {
+ // Give some time for the updates to propagate.
+ gpr_sleep_until(grpc_timeout_milliseconds_to_deadline(100));
+ if (test_expects_failure) {
+ // Restart the servers to force a reconnection so that previously
+ // connected subchannels are not used for the RPC.
+ ShutdownBackend(0);
+ StartBackend(0);
+ if (SendRpc().ok()) {
+ gpr_log(GPR_ERROR, "RPC succeeded. Failure expected. Trying again.");
+ continue;
+ }
+ } else {
+ WaitForBackend(0);
+ Status status = SendRpc();
+ if (!status.ok()) {
+ gpr_log(GPR_ERROR, "RPC failed. code=%d message=%s Trying again.",
+ status.error_code(), status.error_message().c_str());
+ continue;
+ }
+ if (backends_[0]->backend_service()->last_peer_identity() !=
+ expected_authenticated_identity) {
+ gpr_log(
+ GPR_ERROR,
+ "Expected client identity does not match. (actual) %s vs "
+ "(expected) %s Trying again.",
+ y_absl::StrJoin(
+ backends_[0]->backend_service()->last_peer_identity(), ",")
+ .c_str(),
+ y_absl::StrJoin(expected_authenticated_identity, ",").c_str());
+ continue;
+ }
+ }
+ break;
+ }
+ EXPECT_LT(num_tries, kRetryCount);
+ }
+
+ TString root_cert_;
+ TString bad_root_cert_;
+ grpc_core::PemKeyCertPairList identity_pair_;
+ grpc_core::PemKeyCertPairList fallback_identity_pair_;
+ grpc_core::PemKeyCertPairList bad_identity_pair_;
+ StringMatcher server_san_exact_;
+ StringMatcher server_san_prefix_;
+ StringMatcher server_san_suffix_;
+ StringMatcher server_san_contains_;
+ StringMatcher server_san_regex_;
+ StringMatcher bad_san_1_;
+ StringMatcher bad_san_2_;
+ std::vector<TString> authenticated_identity_;
+ std::vector<TString> fallback_authenticated_identity_;
+};
+
+TEST_P(XdsSecurityTest,
+ TLSConfigurationWithoutValidationContextCertificateProviderInstance) {
+ auto cluster = default_cluster_;
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ CheckRpcSendFailure();
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "TLS configuration provided but no "
+ "validation_context_certificate_provider_instance found."));
+}
+
+TEST_P(
+ XdsSecurityTest,
+ MatchSubjectAltNamesProvidedWithoutValidationContextCertificateProviderInstance) {
+ auto cluster = default_cluster_;
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ UpstreamTlsContext upstream_tls_context;
+ auto* validation_context = upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_default_validation_context();
+ *validation_context->add_match_subject_alt_names() = server_san_exact_;
+ transport_socket->mutable_typed_config()->PackFrom(upstream_tls_context);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ CheckRpcSendFailure();
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "TLS configuration provided but no "
+ "validation_context_certificate_provider_instance found."));
+}
+
+TEST_P(
+ XdsSecurityTest,
+ TlsCertificateCertificateProviderInstanceWithoutValidationContextCertificateProviderInstance) {
+ auto cluster = default_cluster_;
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ UpstreamTlsContext upstream_tls_context;
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_instance_name(TString("instance_name"));
+ transport_socket->mutable_typed_config()->PackFrom(upstream_tls_context);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ CheckRpcSendFailure();
+ const auto response_state =
balancers_[0]->ads_service()->cds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message, "LRS ConfigSource is not self.");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "TLS configuration provided but no "
+ "validation_context_certificate_provider_instance found."));
+}
+
+TEST_P(XdsSecurityTest, RegexSanMatcherDoesNotAllowIgnoreCase) {
+ auto cluster = default_cluster_;
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ UpstreamTlsContext upstream_tls_context;
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_instance_name(TString("fake_plugin1"));
+ auto* validation_context = upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_default_validation_context();
+ StringMatcher matcher;
+ matcher.mutable_safe_regex()->mutable_google_re2();
+ matcher.mutable_safe_regex()->set_regex(
+ "(foo|waterzooi).test.google.(fr|be)");
+ matcher.set_ignore_case(true);
+ *validation_context->add_match_subject_alt_names() = matcher;
+ transport_socket->mutable_typed_config()->PackFrom(upstream_tls_context);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ CheckRpcSendFailure();
+ const auto response_state =
+ balancers_[0]->ads_service()->cds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "StringMatcher: ignore_case has no effect for SAFE_REGEX."));
+}
+
+TEST_P(XdsSecurityTest, UnknownRootCertificateProvider) {
+ auto cluster = default_cluster_;
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ UpstreamTlsContext upstream_tls_context;
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_instance_name("unknown");
+ transport_socket->mutable_typed_config()->PackFrom(upstream_tls_context);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ CheckRpcSendFailure(1, RpcOptions(), StatusCode::UNAVAILABLE);
+}
+
+TEST_P(XdsSecurityTest, UnknownIdentityCertificateProvider) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ auto cluster = default_cluster_;
+ auto* transport_socket = cluster.mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ UpstreamTlsContext upstream_tls_context;
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_instance_name("unknown");
+ upstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_instance_name("fake_plugin1");
+ transport_socket->mutable_typed_config()->PackFrom(upstream_tls_context);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ CheckRpcSendFailure(1, RpcOptions(), StatusCode::UNAVAILABLE);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithNoSanMatchers) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {}, authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithExactSanMatcher) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithPrefixSanMatcher) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_prefix_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithSuffixSanMatcher) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_suffix_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithContainsSanMatcher) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_contains_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithRegexSanMatcher) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_regex_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithSanMatchersUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin1", "", "fake_plugin1", "",
+ {server_san_exact_, server_san_prefix_}, authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {bad_san_1_, bad_san_2_}, {},
+ true /* failure */);
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin1", "", "fake_plugin1", "",
+ {server_san_prefix_, server_san_regex_}, authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithRootPluginUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin2" /* bad root */, "",
+ "fake_plugin1", "", {}, {},
+ true /* failure */);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+ g_fake2_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithIdentityPluginUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {root_cert_, fallback_identity_pair_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin2",
+ "", {server_san_exact_},
+ fallback_authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+ g_fake2_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithBothPluginsUpdated) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {bad_root_cert_, bad_identity_pair_}},
+ {"good", {root_cert_, fallback_identity_pair_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin2", "", "fake_plugin2",
+ "", {}, {}, true /* failure */);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_prefix_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin2", "good", "fake_plugin2", "good", {server_san_prefix_},
+ fallback_authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+ g_fake2_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithRootCertificateNameUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"bad", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_regex_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "bad", "fake_plugin1",
+ "", {server_san_regex_}, {},
+ true /* failure */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest,
+ TestMtlsConfigurationWithIdentityCertificateNameUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"bad", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "bad", {server_san_exact_}, {},
+ true /* failure */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest,
+ TestMtlsConfigurationWithIdentityCertificateNameUpdateGoodCerts) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"good", {root_cert_, fallback_identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "good", {server_san_exact_},
+ fallback_authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsConfigurationWithBothCertificateNamesUpdated) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"bad", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "bad", "fake_plugin1",
+ "bad", {server_san_prefix_}, {},
+ true /* failure */);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_prefix_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsConfigurationWithNoSanMatchers) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "", {},
+ {} /* unauthenticated */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsConfigurationWithSanMatchers) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin1", "", "", "",
+ {server_san_exact_, server_san_prefix_, server_san_regex_},
+ {} /* unauthenticated */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsConfigurationWithSanMatchersUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin1", "", "", "", {server_san_exact_, server_san_prefix_},
+ {} /* unauthenticated */);
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin1", "", "", "", {bad_san_1_, bad_san_2_},
+ {} /* unauthenticated */, true /* failure */);
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin1", "", "", "", {server_san_prefix_, server_san_regex_},
+ {} /* unauthenticated */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsConfigurationWithRootCertificateNameUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"bad", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "",
+ {server_san_exact_},
+ {} /* unauthenticated */);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "bad", "", "",
+ {server_san_exact_}, {},
+ true /* failure */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsConfigurationWithRootPluginUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "",
+ {server_san_exact_},
+ {} /* unauthenticated */);
+ UpdateAndVerifyXdsSecurityConfiguration(
+ "fake_plugin2", "", "", "", {server_san_exact_}, {}, true /* failure */);
+ g_fake1_cert_data_map = nullptr;
+ g_fake2_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestFallbackConfiguration) {
+ UpdateAndVerifyXdsSecurityConfiguration("", "", "", "", {},
+ fallback_authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsToTls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "",
+ {server_san_exact_},
+ {} /* unauthenticated */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestMtlsToFallback) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("", "", "", "", {},
+ fallback_authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsToMtls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "",
+ {server_san_exact_},
+ {} /* unauthenticated */);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestTlsToFallback) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "",
+ {server_san_exact_},
+ {} /* unauthenticated */);
+ UpdateAndVerifyXdsSecurityConfiguration("", "", "", "", {},
+ fallback_authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestFallbackToMtls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("", "", "", "", {},
+ fallback_authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "fake_plugin1",
+ "", {server_san_exact_},
+ authenticated_identity_);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestFallbackToTls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ UpdateAndVerifyXdsSecurityConfiguration("", "", "", "", {},
+ fallback_authenticated_identity_);
+ UpdateAndVerifyXdsSecurityConfiguration("fake_plugin1", "", "", "",
+ {server_san_exact_},
+ {} /* unauthenticated */);
+ g_fake1_cert_data_map = nullptr;
+}
+
+TEST_P(XdsSecurityTest, TestFileWatcherCertificateProvider) {
+ UpdateAndVerifyXdsSecurityConfiguration("file_plugin", "", "file_plugin", "",
+ {server_san_exact_},
+ authenticated_identity_);
+}
+
+class XdsEnabledServerTest : public XdsEnd2endTest {
+ protected:
+ XdsEnabledServerTest()
+ : XdsEnd2endTest(1, 1, 100, true /* use_xds_enabled_server */) {}
+
+ void SetUp() override {
+ XdsEnd2endTest::SetUp();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ }
+};
+
+TEST_P(XdsEnabledServerTest, Basic) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ WaitForBackend(0);
+}
+
+TEST_P(XdsEnabledServerTest, BadLdsUpdateNoApiListenerNorAddress) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Listener has neither address nor ApiListener"));
+}
+
+TEST_P(XdsEnabledServerTest, BadLdsUpdateBothApiListenerAndAddress) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ listener.mutable_api_listener();
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Listener has both address and ApiListener"));
+}
+
+TEST_P(XdsEnabledServerTest, UnsupportedL4Filter) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(default_listener_ /* any proto object other than HttpConnectionManager */);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("Unsupported filter type"));
+}
+
+TEST_P(XdsEnabledServerTest, UnsupportedHttpFilter) {
+ // Set env var to enable filters parsing.
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ HttpConnectionManager http_connection_manager;
+ auto* http_filter = http_connection_manager.add_http_filters();
+ http_filter->set_name("grpc.testing.unsupported_http_filter");
+ http_filter->mutable_typed_config()->set_type_url(
+ "grpc.testing.unsupported_http_filter");
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ http_connection_manager);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=[::1]:",
+ backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("no filter registered for config type "
+ "grpc.testing.unsupported_http_filter"));
+}
+
+TEST_P(XdsEnabledServerTest, HttpFilterNotSupportedOnServer) {
+ // Set env var to enable filters parsing.
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ HttpConnectionManager http_connection_manager;
+ auto* http_filter = http_connection_manager.add_http_filters();
+ http_filter->set_name("grpc.testing.client_only_http_filter");
+ http_filter->mutable_typed_config()->set_type_url(
+ "grpc.testing.client_only_http_filter");
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ http_connection_manager);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=[::1]:",
+ backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Filter grpc.testing.client_only_http_filter is not "
+ "supported on servers"));
+}
+
+TEST_P(XdsEnabledServerTest,
+ HttpFilterNotSupportedOnServerIgnoredWhenOptional) {
+ // Set env var to enable filters parsing.
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ HttpConnectionManager http_connection_manager;
+ auto* http_filter = http_connection_manager.add_http_filters();
+ http_filter->set_name("grpc.testing.client_only_http_filter");
+ http_filter->mutable_typed_config()->set_type_url(
+ "grpc.testing.client_only_http_filter");
+ http_filter->set_is_optional(true);
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ http_connection_manager);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=[::1]:",
+ backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ WaitForBackend(0);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::ACKED);
+}
+
+// Verify that a mismatch of listening address results in "not serving" status.
+TEST_P(XdsEnabledServerTest, ListenerAddressMismatch) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ WaitForBackend(0);
+ // Set a different listening address in the LDS update
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ "192.168.1.1");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::FAILED_PRECONDITION);
+}
+
+TEST_P(XdsEnabledServerTest, UseOriginalDstNotSupported) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ listener.add_filter_chains()->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ listener.mutable_use_original_dst()->set_value(true);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Field \'use_original_dst\' is not supported."));
+}
+
+class XdsServerSecurityTest : public XdsEnd2endTest {
+ protected:
+ XdsServerSecurityTest()
+ : XdsEnd2endTest(1, 1, 100, true /* use_xds_enabled_server */) {}
+
+ static void SetUpTestCase() {
+ gpr_setenv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT", "true");
+ XdsEnd2endTest::SetUpTestCase();
+ }
+
+ static void TearDownTestCase() {
+ XdsEnd2endTest::TearDownTestCase();
+ gpr_unsetenv("GRPC_XDS_EXPERIMENTAL_SECURITY_SUPPORT");
+ }
+
+ void SetUp() override {
+ XdsEnd2endTest::SetUp();
+ root_cert_ = ReadFile(kCaCertPath);
+ bad_root_cert_ = ReadFile(kBadClientCertPath);
+ identity_pair_ = ReadTlsIdentityPair(kServerKeyPath, kServerCertPath);
+ bad_identity_pair_ =
+ ReadTlsIdentityPair(kBadClientKeyPath, kBadClientCertPath);
+ identity_pair_2_ = ReadTlsIdentityPair(kClientKeyPath, kClientCertPath);
+ server_authenticated_identity_ = {"*.test.google.fr",
+ "waterzooi.test.google.be",
+ "*.test.youtube.com", "192.168.1.3"};
+ server_authenticated_identity_2_ = {"testclient"};
+ client_authenticated_identity_ = {"*.test.google.fr",
+ "waterzooi.test.google.be",
+ "*.test.youtube.com", "192.168.1.3"};
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts(0, 1)},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ }
+
+ void TearDown() override {
+ g_fake1_cert_data_map = nullptr;
+ g_fake2_cert_data_map = nullptr;
+ XdsEnd2endTest::TearDown();
+ }
+
+ void SetLdsUpdate(y_absl::string_view root_instance_name,
+ y_absl::string_view root_certificate_name,
+ y_absl::string_view identity_instance_name,
+ y_absl::string_view identity_certificate_name,
+ bool require_client_certificates) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=127.0.0.1:",
+ backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address(
+ "127.0.0.1");
+ listener.mutable_address()->mutable_socket_address()->set_port_value(
+ backends_[0]->port());
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ if (!identity_instance_name.empty()) {
+ auto* transport_socket = filter_chain->mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ DownstreamTlsContext downstream_tls_context;
+ downstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_instance_name(TString(identity_instance_name));
+ downstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_certificate_name(TString(identity_certificate_name));
+ if (!root_instance_name.empty()) {
+ downstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_instance_name(TString(root_instance_name));
+ downstream_tls_context.mutable_common_tls_context()
+ ->mutable_combined_validation_context()
+ ->mutable_validation_context_certificate_provider_instance()
+ ->set_certificate_name(TString(root_certificate_name));
+ downstream_tls_context.mutable_require_client_certificate()->set_value(
+ require_client_certificates);
+ }
+ transport_socket->mutable_typed_config()->PackFrom(
+ downstream_tls_context);
+ }
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=[::1]:",
+ backends_[0]->port()));
+ listener.mutable_address()->mutable_socket_address()->set_address("[::1]");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ }
+
+ std::shared_ptr<grpc::Channel> CreateMtlsChannel() {
+ ChannelArguments args;
+ // Override target name for host name check
+ args.SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG,
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1);
+ TString uri = y_absl::StrCat(
+ ipv6_only_ ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", backends_[0]->port());
+ // TODO(yashykt): Switch to using C++ API once b/173823806 is fixed.
+ grpc_tls_credentials_options* options =
+ grpc_tls_credentials_options_create();
+ grpc_tls_credentials_options_set_server_verification_option(
+ options, GRPC_TLS_SKIP_HOSTNAME_VERIFICATION);
+ grpc_tls_credentials_options_set_certificate_provider(
+ options,
+ grpc_core::MakeRefCounted<grpc_core::StaticDataCertificateProvider>(
+ ReadFile(kCaCertPath),
+ ReadTlsIdentityPair(kServerKeyPath, kServerCertPath))
+ .get());
+ grpc_tls_credentials_options_watch_root_certs(options);
+ grpc_tls_credentials_options_watch_identity_key_cert_pairs(options);
+ grpc_tls_server_authorization_check_config* check_config =
+ grpc_tls_server_authorization_check_config_create(
+ nullptr, ServerAuthCheckSchedule, nullptr, nullptr);
+ grpc_tls_credentials_options_set_server_authorization_check_config(
+ options, check_config);
+ auto channel_creds = std::make_shared<SecureChannelCredentials>(
+ grpc_tls_credentials_create(options));
+ grpc_tls_server_authorization_check_config_release(check_config);
+ return CreateCustomChannel(uri, channel_creds, args);
+ }
+
+ std::shared_ptr<grpc::Channel> CreateTlsChannel() {
+ ChannelArguments args;
+ // Override target name for host name check
+ args.SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG,
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1);
+ TString uri = y_absl::StrCat(
+ ipv6_only_ ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", backends_[0]->port());
+ // TODO(yashykt): Switch to using C++ API once b/173823806 is fixed.
+ grpc_tls_credentials_options* options =
+ grpc_tls_credentials_options_create();
+ grpc_tls_credentials_options_set_server_verification_option(
+ options, GRPC_TLS_SKIP_HOSTNAME_VERIFICATION);
+ grpc_tls_credentials_options_set_certificate_provider(
+ options,
+ grpc_core::MakeRefCounted<grpc_core::StaticDataCertificateProvider>(
+ ReadFile(kCaCertPath),
+ ReadTlsIdentityPair(kServerKeyPath, kServerCertPath))
+ .get());
+ grpc_tls_credentials_options_watch_root_certs(options);
+ grpc_tls_server_authorization_check_config* check_config =
+ grpc_tls_server_authorization_check_config_create(
+ nullptr, ServerAuthCheckSchedule, nullptr, nullptr);
+ grpc_tls_credentials_options_set_server_authorization_check_config(
+ options, check_config);
+ auto channel_creds = std::make_shared<SecureChannelCredentials>(
+ grpc_tls_credentials_create(options));
+ grpc_tls_server_authorization_check_config_release(check_config);
+ return CreateCustomChannel(uri, channel_creds, args);
+ }
+
+ std::shared_ptr<grpc::Channel> CreateInsecureChannel() {
+ ChannelArguments args;
+ // Override target name for host name check
+ args.SetString(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG,
+ ipv6_only_ ? "::1" : "127.0.0.1");
+ args.SetInt(GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL, 1);
+ TString uri = y_absl::StrCat(
+ ipv6_only_ ? "ipv6:[::1]:" : "ipv4:127.0.0.1:", backends_[0]->port());
+ return CreateCustomChannel(uri, InsecureChannelCredentials(), args);
+ }
+
+ void SendRpc(std::function<std::shared_ptr<grpc::Channel>()> channel_creator,
+ std::vector<TString> expected_server_identity,
+ std::vector<TString> expected_client_identity,
+ bool test_expects_failure = false) {
+ gpr_log(GPR_INFO, "Sending RPC");
+ int num_tries = 0;
+ constexpr int kRetryCount = 10;
+ for (; num_tries < kRetryCount; num_tries++) {
+ auto channel = channel_creator();
+ auto stub = grpc::testing::EchoTestService::NewStub(channel);
+ ClientContext context;
+ context.set_wait_for_ready(true);
+ context.set_deadline(grpc_timeout_milliseconds_to_deadline(2000));
+ EchoRequest request;
+ request.set_message(kRequestMessage);
+ EchoResponse response;
+ Status status = stub->Echo(&context, request, &response);
+ if (test_expects_failure) {
+ if (status.ok()) {
+ gpr_log(GPR_ERROR, "RPC succeeded. Failure expected. Trying again.");
+ continue;
+ }
+ } else {
+ if (!status.ok()) {
+ gpr_log(GPR_ERROR, "RPC failed. code=%d message=%s Trying again.",
+ status.error_code(), status.error_message().c_str());
+ continue;
+ }
+ EXPECT_EQ(response.message(), kRequestMessage);
+ std::vector<TString> peer_identity;
+ for (const auto& entry : context.auth_context()->GetPeerIdentity()) {
+ peer_identity.emplace_back(
+ TString(entry.data(), entry.size()).c_str());
+ }
+ if (peer_identity != expected_server_identity) {
+ gpr_log(GPR_ERROR,
+ "Expected server identity does not match. (actual) %s vs "
+ "(expected) %s Trying again.",
+ y_absl::StrJoin(peer_identity, ",").c_str(),
+ y_absl::StrJoin(expected_server_identity, ",").c_str());
+ continue;
+ }
+ if (backends_[0]->backend_service()->last_peer_identity() !=
+ expected_client_identity) {
+ gpr_log(
+ GPR_ERROR,
+ "Expected client identity does not match. (actual) %s vs "
+ "(expected) %s Trying again.",
+ y_absl::StrJoin(
+ backends_[0]->backend_service()->last_peer_identity(), ",")
+ .c_str(),
+ y_absl::StrJoin(expected_client_identity, ",").c_str());
+ continue;
+ }
+ }
+ break;
+ }
+ EXPECT_LT(num_tries, kRetryCount);
+ }
+
+ TString root_cert_;
+ TString bad_root_cert_;
+ grpc_core::PemKeyCertPairList identity_pair_;
+ grpc_core::PemKeyCertPairList bad_identity_pair_;
+ grpc_core::PemKeyCertPairList identity_pair_2_;
+ std::vector<TString> server_authenticated_identity_;
+ std::vector<TString> server_authenticated_identity_2_;
+ std::vector<TString> client_authenticated_identity_;
+};
+
+TEST_P(XdsServerSecurityTest, TlsConfigurationWithoutRootProviderInstance) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ auto* transport_socket = filter_chain->mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ DownstreamTlsContext downstream_tls_context;
+ transport_socket->mutable_typed_config()->PackFrom(downstream_tls_context);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ CheckRpcSendFailure(1, RpcOptions().set_wait_for_ready(true));
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr(
+ "TLS configuration provided but no "
+ "tls_certificate_certificate_provider_instance found."));
+}
+
+TEST_P(XdsServerSecurityTest, UnknownIdentityCertificateProvider) {
+ SetLdsUpdate("", "", "unknown", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerSecurityTest, UnknownRootCertificateProvider) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ SetLdsUpdate("unknown", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsWithRootPluginUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("fake_plugin2", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsWithIdentityPluginUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {root_cert_, identity_pair_2_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin2", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_2_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsWithBothPluginsUpdated) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"good", {root_cert_, identity_pair_2_}},
+ {"", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ SetLdsUpdate("fake_plugin2", "", "fake_plugin2", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("fake_plugin2", "good", "fake_plugin2", "good", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_2_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsWithRootCertificateNameUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"bad", {bad_root_cert_, bad_identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("fake_plugin1", "bad", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsWithIdentityCertificateNameUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"good", {root_cert_, identity_pair_2_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "good", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_2_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsWithBothCertificateNamesUpdated) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"good", {root_cert_, identity_pair_2_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("fake_plugin1", "good", "fake_plugin1", "good", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_2_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsNotRequiringButProvidingClientCerts) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsNotRequiringAndNotProvidingClientCerts) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestTls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestTlsWithIdentityPluginUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ FakeCertificateProvider::CertDataMap fake2_cert_map = {
+ {"", {root_cert_, identity_pair_2_}}};
+ g_fake2_cert_data_map = &fake2_cert_map;
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+ SetLdsUpdate("", "", "fake_plugin2", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_2_, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestTlsWithIdentityCertificateNameUpdate) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}},
+ {"good", {root_cert_, identity_pair_2_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+ SetLdsUpdate("", "", "fake_plugin1", "good", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_2_, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestFallback) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "", "", false);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsToTls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateTlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestTlsToMtls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateTlsChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerSecurityTest, TestMtlsToFallback) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+ SetLdsUpdate("", "", "", "", false);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestFallbackToMtls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "", "", false);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+ SetLdsUpdate("fake_plugin1", "", "fake_plugin1", "", true);
+ SendRpc([this]() { return CreateMtlsChannel(); },
+ server_authenticated_identity_, client_authenticated_identity_);
+}
+
+TEST_P(XdsServerSecurityTest, TestTlsToFallback) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+ SetLdsUpdate("", "", "", "", false);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerSecurityTest, TestFallbackToTls) {
+ FakeCertificateProvider::CertDataMap fake1_cert_map = {
+ {"", {root_cert_, identity_pair_}}};
+ g_fake1_cert_data_map = &fake1_cert_map;
+ SetLdsUpdate("", "", "", "", false);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+ SetLdsUpdate("", "", "fake_plugin1", "", false);
+ SendRpc([this]() { return CreateTlsChannel(); },
+ server_authenticated_identity_, {});
+}
+
+class XdsEnabledServerStatusNotificationTest : public XdsServerSecurityTest {
+ protected:
+ void SetValidLdsUpdate() { SetLdsUpdate("", "", "", "", false); }
+
+ void SetInvalidLdsUpdate() {
+ Listener listener;
+ listener.set_name(y_absl::StrCat(
+ "grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ }
+
+ void UnsetLdsUpdate() {
+ balancers_[0]->ads_service()->UnsetResource(
+ kLdsTypeUrl, y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:",
+ backends_[0]->port()));
+ }
+};
+
+TEST_P(XdsEnabledServerStatusNotificationTest, ServingStatus) {
+ SetValidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::OK);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsEnabledServerStatusNotificationTest, NotServingStatus) {
+ SetInvalidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::UNAVAILABLE);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsEnabledServerStatusNotificationTest, ErrorUpdateWhenAlreadyServing) {
+ SetValidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::OK);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+ // Invalid update does not lead to a change in the serving status.
+ SetInvalidLdsUpdate();
+ do {
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::OK);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsEnabledServerStatusNotificationTest,
+ NotServingStatusToServingStatusTransition) {
+ SetInvalidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::UNAVAILABLE);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+ // Send a valid LDS update to change to serving status
+ SetValidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::OK);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+// This test verifies that the resource getting deleted when already serving
+// results in future connections being dropped.
+TEST_P(XdsEnabledServerStatusNotificationTest,
+ ServingStatusToNonServingStatusTransition) {
+ SetValidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::OK);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+ // Deleting the resource should result in a non-serving status.
+ UnsetLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::NOT_FOUND);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsEnabledServerStatusNotificationTest, RepeatedServingStatusChanges) {
+ for (int i = 0; i < 5; i++) {
+ // Send a valid LDS update to get the server to start listening
+ SetValidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:",
+ backends_[0]->port()),
+ grpc::StatusCode::OK);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+ // Deleting the resource will make the server start rejecting connections
+ UnsetLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:",
+ backends_[0]->port()),
+ grpc::StatusCode::NOT_FOUND);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+ }
+}
+
+TEST_P(XdsEnabledServerStatusNotificationTest, ExistingRpcsOnResourceDeletion) {
+ // Send a valid LDS update to get the server to start listening
+ SetValidLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::OK);
+ constexpr int kNumChannels = 10;
+ struct StreamingRpc {
+ std::shared_ptr<Channel> channel;
+ std::unique_ptr<grpc::testing::EchoTestService::Stub> stub;
+ ClientContext context;
+ std::unique_ptr<ClientWriter<EchoRequest>> writer;
+ } streaming_rpcs[kNumChannels];
+ EchoRequest request;
+ EchoResponse response;
+ request.set_message("Hello");
+ for (int i = 0; i < kNumChannels; i++) {
+ streaming_rpcs[i].channel = CreateInsecureChannel();
+ streaming_rpcs[i].stub =
+ grpc::testing::EchoTestService::NewStub(streaming_rpcs[i].channel);
+ streaming_rpcs[i].context.set_wait_for_ready(true);
+ streaming_rpcs[i].writer = streaming_rpcs[i].stub->RequestStream(
+ &streaming_rpcs[i].context, &response);
+ EXPECT_TRUE(streaming_rpcs[i].writer->Write(request));
+ }
+ // Deleting the resource will make the server start rejecting connections
+ UnsetLdsUpdate();
+ backends_[0]->notifier()->WaitOnServingStatusChange(
+ y_absl::StrCat(ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()),
+ grpc::StatusCode::NOT_FOUND);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+ for (int i = 0; i < kNumChannels; i++) {
+ EXPECT_TRUE(streaming_rpcs[i].writer->Write(request));
+ EXPECT_TRUE(streaming_rpcs[i].writer->WritesDone());
+ EXPECT_TRUE(streaming_rpcs[i].writer->Finish().ok());
+ // New RPCs on the existing channels should fail.
+ ClientContext new_context;
+ new_context.set_deadline(grpc_timeout_milliseconds_to_deadline(1000));
+ EXPECT_FALSE(
+ streaming_rpcs[i].stub->Echo(&new_context, request, &response).ok());
+ }
+}
+
+using XdsServerFilterChainMatchTest = XdsServerSecurityTest;
+
+TEST_P(XdsServerFilterChainMatchTest,
+ DefaultFilterChainUsedWhenNoFilterChainMentioned) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ listener.mutable_default_filter_chain()
+ ->add_filters()
+ ->mutable_typed_config()
+ ->PackFrom(HttpConnectionManager());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ DefaultFilterChainUsedWhenOtherFilterChainsDontMatch) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add a filter chain that will never get matched
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()
+ ->mutable_destination_port()
+ ->set_value(8080);
+ // Add default filter chain that should get used
+ listener.mutable_default_filter_chain()
+ ->add_filters()
+ ->mutable_typed_config()
+ ->PackFrom(HttpConnectionManager());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithDestinationPortDontMatch) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with destination port that should never get matched
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()
+ ->mutable_destination_port()
+ ->set_value(8080);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // RPC should fail since no matching filter chain was found and no default
+ // filter chain is configured.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerFilterChainMatchTest, FilterChainsWithServerNamesDontMatch) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with server name that should never get matched
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_server_names("server_name");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // RPC should fail since no matching filter chain was found and no default
+ // filter chain is configured.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithTransportProtocolsOtherThanRawBufferDontMatch) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with transport protocol "tls" that should never match
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_transport_protocol("tls");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // RPC should fail since no matching filter chain was found and no default
+ // filter chain is configured.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithApplicationProtocolsDontMatch) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with application protocol that should never get matched
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_application_protocols("h2");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // RPC should fail since no matching filter chain was found and no default
+ // filter chain is configured.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {},
+ true /* test_expects_failure */);
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithTransportProtocolRawBufferIsPreferred) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with "raw_buffer" transport protocol
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_transport_protocol(
+ "raw_buffer");
+ // Add another filter chain with no transport protocol set but application
+ // protocol set (fails match)
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_application_protocols("h2");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // A successful RPC proves that filter chains that mention "raw_buffer" as the
+ // transport protocol are chosen as the best match in the round.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithMoreSpecificDestinationPrefixRangesArePreferred) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with prefix range (length 4 and 16) but with server name
+ // mentioned. (Prefix range is matched first.)
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ auto* prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(4);
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(16);
+ filter_chain->mutable_filter_chain_match()->add_server_names("server_name");
+ // Add filter chain with two prefix ranges (length 8 and 24). Since 24 is the
+ // highest match, it should be chosen.
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(8);
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(24);
+ // Add another filter chain with a non-matching prefix range (with length 30)
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix("192.168.1.1");
+ prefix_range->mutable_prefix_len()->set_value(30);
+ filter_chain->mutable_filter_chain_match()->add_server_names("server_name");
+ // Add another filter chain with no prefix range mentioned
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_server_names("server_name");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // A successful RPC proves that the filter chain with the longest matching
+ // prefix range was the best match.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsThatMentionSourceTypeArePreferred) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with the local source type (best match)
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_source_type(
+ FilterChainMatch::SAME_IP_OR_LOOPBACK);
+ // Add filter chain with the external source type but bad source port.
+ // Note that backends_[0]->port() will never be a match for the source port
+ // because it is already being used by a backend.
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_source_type(
+ FilterChainMatch::EXTERNAL);
+ filter_chain->mutable_filter_chain_match()->add_source_ports(
+ backends_[0]->port());
+ // Add filter chain with the default source type (ANY) but bad source port.
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_source_ports(
+ backends_[0]->port());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // A successful RPC proves that the filter chain with the longest matching
+ // prefix range was the best match.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithMoreSpecificSourcePrefixRangesArePreferred) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with source prefix range (length 16) but with a bad source
+ // port mentioned. (Prefix range is matched first.)
+ // Note that backends_[0]->port() will never be a match for the source port
+ // because it is already being used by a backend.
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ auto* source_prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ source_prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ source_prefix_range->mutable_prefix_len()->set_value(4);
+ source_prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ source_prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ source_prefix_range->mutable_prefix_len()->set_value(16);
+ filter_chain->mutable_filter_chain_match()->add_source_ports(
+ backends_[0]->port());
+ // Add filter chain with two source prefix ranges (length 8 and 24). Since 24
+ // is the highest match, it should be chosen.
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ source_prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ source_prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ source_prefix_range->mutable_prefix_len()->set_value(8);
+ source_prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ source_prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ source_prefix_range->mutable_prefix_len()->set_value(24);
+ // Add another filter chain with a non-matching source prefix range (with
+ // length 30) and bad source port
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ source_prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ source_prefix_range->set_address_prefix("192.168.1.1");
+ source_prefix_range->mutable_prefix_len()->set_value(30);
+ filter_chain->mutable_filter_chain_match()->add_source_ports(
+ backends_[0]->port());
+ // Add another filter chain with no source prefix range mentioned and bad
+ // source port
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_source_ports(
+ backends_[0]->port());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // A successful RPC proves that the filter chain with the longest matching
+ // source prefix range was the best match.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ FilterChainsWithMoreSpecificSourcePortArePreferred) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ // Since we don't know which port will be used by the channel, just add all
+ // ports except for 0.
+ for (int i = 1; i < 65536; i++) {
+ filter_chain->mutable_filter_chain_match()->add_source_ports(i);
+ }
+ // Add another filter chain with no source prefix range mentioned with a bad
+ // DownstreamTlsContext configuration.
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ auto* transport_socket = filter_chain->mutable_transport_socket();
+ transport_socket->set_name("envoy.transport_sockets.tls");
+ DownstreamTlsContext downstream_tls_context;
+ downstream_tls_context.mutable_common_tls_context()
+ ->mutable_tls_certificate_certificate_provider_instance()
+ ->set_instance_name("unknown");
+ transport_socket->mutable_typed_config()->PackFrom(downstream_tls_context);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // A successful RPC proves that the filter chain with matching source port
+ // was chosen.
+ SendRpc([this]() { return CreateInsecureChannel(); }, {}, {});
+}
+
+TEST_P(XdsServerFilterChainMatchTest, DuplicateMatchNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ // Add a duplicate filter chain
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "Duplicate matching rules detected when adding filter chain: {}"));
+}
+
+TEST_P(XdsServerFilterChainMatchTest, DuplicateMatchOnPrefixRangesNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with prefix range
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ auto* prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(16);
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(24);
+ // Add a filter chain with a duplicate prefix range entry
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(16);
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(32);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "Duplicate matching rules detected when adding filter chain: "
+ "{prefix_ranges={{address_prefix=127.0.0.0:0, prefix_len=16}, "
+ "{address_prefix=127.0.0.1:0, prefix_len=32}}}"));
+}
+
+TEST_P(XdsServerFilterChainMatchTest, DuplicateMatchOnTransportProtocolNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with "raw_buffer" transport protocol
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_transport_protocol(
+ "raw_buffer");
+ // Add a duplicate filter chain with the same "raw_buffer" transport protocol
+ // entry
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_transport_protocol(
+ "raw_buffer");
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Duplicate matching rules detected when adding "
+ "filter chain: {transport_protocol=raw_buffer}"));
+}
+
+TEST_P(XdsServerFilterChainMatchTest, DuplicateMatchOnLocalSourceTypeNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with the local source type
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_source_type(
+ FilterChainMatch::SAME_IP_OR_LOOPBACK);
+ // Add a duplicate filter chain with the same local source type entry
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_source_type(
+ FilterChainMatch::SAME_IP_OR_LOOPBACK);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Duplicate matching rules detected when adding "
+ "filter chain: {source_type=SAME_IP_OR_LOOPBACK}"));
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ DuplicateMatchOnExternalSourceTypeNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with the external source type
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_source_type(
+ FilterChainMatch::EXTERNAL);
+ // Add a duplicate filter chain with the same external source type entry
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->set_source_type(
+ FilterChainMatch::EXTERNAL);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Duplicate matching rules detected when adding "
+ "filter chain: {source_type=EXTERNAL}"));
+}
+
+TEST_P(XdsServerFilterChainMatchTest,
+ DuplicateMatchOnSourcePrefixRangesNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with source prefix range
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ auto* prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(16);
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(24);
+ // Add a filter chain with a duplicate source prefix range entry
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(16);
+ prefix_range =
+ filter_chain->mutable_filter_chain_match()->add_source_prefix_ranges();
+ prefix_range->set_address_prefix(ipv6_only_ ? "[::1]" : "127.0.0.1");
+ prefix_range->mutable_prefix_len()->set_value(32);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr(
+ "Duplicate matching rules detected when adding filter chain: "
+ "{source_prefix_ranges={{address_prefix=127.0.0.0:0, prefix_len=16}, "
+ "{address_prefix=127.0.0.1:0, prefix_len=32}}}"));
+}
+
+TEST_P(XdsServerFilterChainMatchTest, DuplicateMatchOnSourcePortNacked) {
+ Listener listener;
+ listener.set_name(
+ y_absl::StrCat("grpc/server?xds.resource.listening_address=",
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", backends_[0]->port()));
+ auto* socket_address = listener.mutable_address()->mutable_socket_address();
+ socket_address->set_address(ipv6_only_ ? "::1" : "127.0.0.1");
+ socket_address->set_port_value(backends_[0]->port());
+ // Add filter chain with the external source type
+ auto* filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_source_ports(8080);
+ // Add a duplicate filter chain with the same source port entry
+ filter_chain = listener.add_filter_chains();
+ filter_chain->add_filters()->mutable_typed_config()->PackFrom(
+ HttpConnectionManager());
+ filter_chain->mutable_filter_chain_match()->add_source_ports(8080);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ do {
+ CheckRpcSendFailure();
+ } while (balancers_[0]->ads_service()->lds_response_state().state ==
+ AdsServiceImpl::ResponseState::SENT);
+ const auto response_state =
+ balancers_[0]->ads_service()->lds_response_state();
+ EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
+ EXPECT_THAT(
+ response_state.error_message,
+ ::testing::HasSubstr("Duplicate matching rules detected when adding "
+ "filter chain: {source_ports={8080}}"));
}
using EdsTest = BasicTest;
@@ -4433,14 +8684,13 @@ TEST_P(EdsTest, NacksSparsePriorityList) {
AdsServiceImpl::EdsResourceArgs args({
{"locality0", GetBackendPorts(), kDefaultLocalityWeight, 1},
});
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args));
+ balancers_[0]->ads_service()->SetEdsResource(BuildEdsResource(args));
CheckRpcSendFailure();
- const auto& response_state =
+ const auto response_state =
balancers_[0]->ads_service()->eds_response_state();
EXPECT_EQ(response_state.state, AdsServiceImpl::ResponseState::NACKED);
- EXPECT_EQ(response_state.error_message,
- "EDS update includes sparse priority list");
+ EXPECT_THAT(response_state.error_message,
+ ::testing::HasSubstr("sparse priority list"));
}
// In most of our tests, we use different names for different resource
@@ -4453,8 +8703,8 @@ TEST_P(EdsTest, EdsServiceNameDefaultsToClusterName) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, kDefaultClusterName));
- Cluster cluster = balancers_[0]->ads_service()->default_cluster();
+ BuildEdsResource(args, kDefaultClusterName));
+ Cluster cluster = default_cluster_;
cluster.mutable_eds_cluster_config()->clear_service_name();
balancers_[0]->ads_service()->SetCdsResource(cluster);
SetNextResolution({});
@@ -4521,7 +8771,7 @@ TEST_P(LocalityMapTest, WeightedRoundRobin) {
{"locality1", GetBackendPorts(1, 2), kLocalityWeight1},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait for both backends to be ready.
WaitForAllBackends(0, 2);
// Send kNumRpcs RPCs.
@@ -4555,7 +8805,7 @@ TEST_P(LocalityMapTest, LocalityContainingNoEndpoints) {
{"locality1", {}},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait for both backends to be ready.
WaitForAllBackends();
// Send kNumRpcs RPCs.
@@ -4576,7 +8826,7 @@ TEST_P(LocalityMapTest, NoLocalities) {
SetNextResolution({});
SetNextResolutionForLbChannelAllBalancers();
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource({}, DefaultEdsServiceName()));
+ BuildEdsResource({}, DefaultEdsServiceName()));
Status status = SendRpc();
EXPECT_FALSE(status.ok());
EXPECT_EQ(status.error_code(), StatusCode::UNAVAILABLE);
@@ -4598,15 +8848,14 @@ TEST_P(LocalityMapTest, StressTest) {
args.locality_list.emplace_back(std::move(locality));
}
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// The second ADS response contains 1 locality, which contains backend 1.
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", GetBackendPorts(1, 2)},
});
std::thread delayed_resource_setter(
std::bind(&BasicTest::SetEdsResourceWithDelay, this, 0,
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()),
- 60 * 1000));
+ BuildEdsResource(args, DefaultEdsServiceName()), 60 * 1000));
// Wait until backend 0 is ready, before which kNumLocalities localities are
// received and handled by the xds policy.
WaitForBackend(0, /*reset_counters=*/false);
@@ -4628,6 +8877,7 @@ TEST_P(LocalityMapTest, UpdateMap) {
const double kTotalLocalityWeight0 =
std::accumulate(kLocalityWeights0.begin(), kLocalityWeights0.end(), 0);
std::vector<double> locality_weight_rate_0;
+ locality_weight_rate_0.reserve(kLocalityWeights0.size());
for (int weight : kLocalityWeights0) {
locality_weight_rate_0.push_back(weight / kTotalLocalityWeight0);
}
@@ -4647,7 +8897,7 @@ TEST_P(LocalityMapTest, UpdateMap) {
{"locality2", GetBackendPorts(2, 3), 4},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait for the first 3 backends to be ready.
WaitForAllBackends(0, 3);
gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH ==========");
@@ -4678,7 +8928,7 @@ TEST_P(LocalityMapTest, UpdateMap) {
{"locality3", GetBackendPorts(3, 4), 6},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Backend 3 hasn't received any request.
EXPECT_EQ(0U, backends_[3]->backend_service()->request_count());
// Wait until the locality update has been processed, as signaled by backend 3
@@ -4718,13 +8968,13 @@ TEST_P(LocalityMapTest, ReplaceAllLocalitiesInPriority) {
{"locality0", GetBackendPorts(0, 1)},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
args = AdsServiceImpl::EdsResourceArgs({
{"locality1", GetBackendPorts(1, 2)},
});
- std::thread delayed_resource_setter(std::bind(
- &BasicTest::SetEdsResourceWithDelay, this, 0,
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()), 5000));
+ std::thread delayed_resource_setter(
+ std::bind(&BasicTest::SetEdsResourceWithDelay, this, 0,
+ BuildEdsResource(args, DefaultEdsServiceName()), 5000));
// Wait for the first backend to be ready.
WaitForBackend(0);
// Keep sending RPCs until we switch over to backend 1, which tells us
@@ -4753,7 +9003,7 @@ TEST_P(FailoverTest, ChooseHighestPriority) {
{"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 0},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForBackend(3, false);
for (size_t i = 0; i < 3; ++i) {
EXPECT_EQ(0U, backends_[i]->backend_service()->request_count());
@@ -4771,7 +9021,7 @@ TEST_P(FailoverTest, DoesNotUsePriorityWithNoEndpoints) {
{"locality3", {}, kDefaultLocalityWeight, 0},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForBackend(0, false);
for (size_t i = 1; i < 3; ++i) {
EXPECT_EQ(0U, backends_[i]->backend_service()->request_count());
@@ -4787,7 +9037,7 @@ TEST_P(FailoverTest, DoesNotUseLocalityWithNoEndpoints) {
{"locality1", GetBackendPorts(), kDefaultLocalityWeight, 0},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait for all backends to be used.
std::tuple<int, int, int> counts = WaitForAllBackends();
// Make sure no RPCs failed in the transition.
@@ -4808,7 +9058,7 @@ TEST_P(FailoverTest, Failover) {
ShutdownBackend(3);
ShutdownBackend(0);
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForBackend(1, false);
for (size_t i = 0; i < 4; ++i) {
if (i == 1) continue;
@@ -4828,10 +9078,11 @@ TEST_P(FailoverTest, SwitchBackToHigherPriority) {
{"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 3},
{"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 0},
});
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ WaitForBackend(3);
ShutdownBackend(3);
ShutdownBackend(0);
- balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
WaitForBackend(1, false);
for (size_t i = 0; i < 4; ++i) {
if (i == 1) continue;
@@ -4853,7 +9104,7 @@ TEST_P(FailoverTest, UpdateInitialUnavailable) {
{"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 1},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 0},
{"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 1},
@@ -4862,9 +9113,9 @@ TEST_P(FailoverTest, UpdateInitialUnavailable) {
});
ShutdownBackend(0);
ShutdownBackend(1);
- std::thread delayed_resource_setter(std::bind(
- &BasicTest::SetEdsResourceWithDelay, this, 0,
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()), 1000));
+ std::thread delayed_resource_setter(
+ std::bind(&BasicTest::SetEdsResourceWithDelay, this, 0,
+ BuildEdsResource(args, DefaultEdsServiceName()), 1000));
gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME),
gpr_time_from_millis(500, GPR_TIMESPAN));
// Send 0.5 second worth of RPCs.
@@ -4892,16 +9143,16 @@ TEST_P(FailoverTest, UpdatePriority) {
{"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 0},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 2},
{"locality1", GetBackendPorts(1, 2), kDefaultLocalityWeight, 0},
{"locality2", GetBackendPorts(2, 3), kDefaultLocalityWeight, 1},
{"locality3", GetBackendPorts(3, 4), kDefaultLocalityWeight, 3},
});
- std::thread delayed_resource_setter(std::bind(
- &BasicTest::SetEdsResourceWithDelay, this, 0,
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()), 1000));
+ std::thread delayed_resource_setter(
+ std::bind(&BasicTest::SetEdsResourceWithDelay, this, 0,
+ BuildEdsResource(args, DefaultEdsServiceName()), 1000));
WaitForBackend(3, false);
for (size_t i = 0; i < 3; ++i) {
EXPECT_EQ(0U, backends_[i]->backend_service()->request_count());
@@ -4925,7 +9176,7 @@ TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) {
{"locality1", GetBackendPorts(1, 3), kDefaultLocalityWeight, 1},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Second update:
// - Priority 0 contains both localities 0 and 1.
// - Priority 1 is not present.
@@ -4935,9 +9186,9 @@ TEST_P(FailoverTest, MoveAllLocalitiesInCurrentPriorityToHigherPriority) {
{"locality0", GetBackendPorts(0, 1), kDefaultLocalityWeight, 0},
{"locality1", GetBackendPorts(1, 4), kDefaultLocalityWeight, 0},
});
- std::thread delayed_resource_setter(std::bind(
- &BasicTest::SetEdsResourceWithDelay, this, 0,
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()), 1000));
+ std::thread delayed_resource_setter(
+ std::bind(&BasicTest::SetEdsResourceWithDelay, this, 0,
+ BuildEdsResource(args, DefaultEdsServiceName()), 1000));
// When we get the first update, all backends in priority 0 are down,
// so we will create priority 1. Backends 1 and 2 should have traffic,
// but backend 3 should not.
@@ -4971,7 +9222,7 @@ TEST_P(DropTest, Vanilla) {
args.drop_categories = {{kLbDropType, kDropPerMillionForLb},
{kThrottleDropType, kDropPerMillionForThrottle}};
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForAllBackends();
// Send kNumRpcs RPCs and count the drops.
size_t num_drops = 0;
@@ -5011,7 +9262,7 @@ TEST_P(DropTest, DropPerHundred) {
args.drop_categories = {{kLbDropType, kDropPerHundredForLb}};
args.drop_denominator = FractionalPercent::HUNDRED;
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForAllBackends();
// Send kNumRpcs RPCs and count the drops.
size_t num_drops = 0;
@@ -5050,7 +9301,7 @@ TEST_P(DropTest, DropPerTenThousand) {
args.drop_categories = {{kLbDropType, kDropPerTenThousandForLb}};
args.drop_denominator = FractionalPercent::TEN_THOUSAND;
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForAllBackends();
// Send kNumRpcs RPCs and count the drops.
size_t num_drops = 0;
@@ -5092,7 +9343,7 @@ TEST_P(DropTest, Update) {
});
args.drop_categories = {{kLbDropType, kDropPerMillionForLb}};
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
WaitForAllBackends();
// Send kNumRpcs RPCs and count the drops.
size_t num_drops = 0;
@@ -5123,7 +9374,7 @@ TEST_P(DropTest, Update) {
args.drop_categories = {{kLbDropType, kDropPerMillionForLb},
{kThrottleDropType, kDropPerMillionForThrottle}};
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until the drop rate increases to the middle of the two configs, which
// implies that the update has been in effect.
const double kDropRateThreshold =
@@ -5181,7 +9432,7 @@ TEST_P(DropTest, DropAll) {
args.drop_categories = {{kLbDropType, kDropPerMillionForLb},
{kThrottleDropType, kDropPerMillionForThrottle}};
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Send kNumRpcs RPCs and all of them are dropped.
for (size_t i = 0; i < kNumRpcs; ++i) {
EchoResponse response;
@@ -5205,12 +9456,12 @@ TEST_P(BalancerUpdateTest, UpdateBalancersButKeepUsingOriginalBalancer) {
{"locality0", {backends_[0]->port()}},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", {backends_[1]->port()}},
});
balancers_[1]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until the first backend is ready.
WaitForBackend(0);
// Send 10 requests.
@@ -5268,12 +9519,12 @@ TEST_P(BalancerUpdateTest, Repeated) {
{"locality0", {backends_[0]->port()}},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", {backends_[1]->port()}},
});
balancers_[1]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until the first backend is ready.
WaitForBackend(0);
// Send 10 requests.
@@ -5338,12 +9589,12 @@ TEST_P(BalancerUpdateTest, DeadUpdate) {
{"locality0", {backends_[0]->port()}},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
args = AdsServiceImpl::EdsResourceArgs({
{"locality0", {backends_[1]->port()}},
});
balancers_[1]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Start servers and send 10 RPCs per server.
gpr_log(GPR_INFO, "========= BEFORE FIRST BATCH ==========");
CheckRpcSendOk(10);
@@ -5413,14 +9664,6 @@ TEST_P(BalancerUpdateTest, DeadUpdate) {
<< balancers_[2]->ads_service()->eds_response_state().error_message;
}
-// The re-resolution tests are deferred because they rely on the fallback mode,
-// which hasn't been supported.
-
-// TODO(juanlishen): Add TEST_P(BalancerUpdateTest, ReresolveDeadBackend).
-
-// TODO(juanlishen): Add TEST_P(UpdatesWithClientLoadReportingTest,
-// ReresolveDeadBalancer)
-
class ClientLoadReportingTest : public XdsEnd2endTest {
public:
ClientLoadReportingTest() : XdsEnd2endTest(4, 1, 3) {}
@@ -5428,7 +9671,7 @@ class ClientLoadReportingTest : public XdsEnd2endTest {
// Tests that the load report received at the balancer is correct.
TEST_P(ClientLoadReportingTest, Vanilla) {
- if (!GetParam().use_xds_resolver()) {
+ if (GetParam().use_fake_resolver()) {
balancers_[0]->lrs_service()->set_cluster_names({kServerName});
}
SetNextResolution({});
@@ -5441,7 +9684,7 @@ TEST_P(ClientLoadReportingTest, Vanilla) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until all backends are ready.
int num_ok = 0;
int num_failure = 0;
@@ -5488,7 +9731,7 @@ TEST_P(ClientLoadReportingTest, SendAllClusters) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until all backends are ready.
int num_ok = 0;
int num_failure = 0;
@@ -5533,7 +9776,7 @@ TEST_P(ClientLoadReportingTest, HonorsClustersRequestedByLrsServer) {
{"locality0", GetBackendPorts()},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until all backends are ready.
int num_ok = 0;
int num_failure = 0;
@@ -5558,7 +9801,7 @@ TEST_P(ClientLoadReportingTest, HonorsClustersRequestedByLrsServer) {
// Tests that if the balancer restarts, the client load report contains the
// stats before and after the restart correctly.
TEST_P(ClientLoadReportingTest, BalancerRestart) {
- if (!GetParam().use_xds_resolver()) {
+ if (GetParam().use_fake_resolver()) {
balancers_[0]->lrs_service()->set_cluster_names({kServerName});
}
SetNextResolution({});
@@ -5570,7 +9813,7 @@ TEST_P(ClientLoadReportingTest, BalancerRestart) {
{"locality0", GetBackendPorts(0, kNumBackendsFirstPass)},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait until all backends returned by the balancer are ready.
int num_ok = 0;
int num_failure = 0;
@@ -5608,7 +9851,7 @@ TEST_P(ClientLoadReportingTest, BalancerRestart) {
{"locality0", GetBackendPorts(kNumBackendsFirstPass)},
});
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
// Wait for queries to start going to one of the new backends.
// This tells us that we're now using the new serverlist.
std::tie(num_ok, num_failure, num_drops) =
@@ -5634,7 +9877,7 @@ class ClientLoadReportingWithDropTest : public XdsEnd2endTest {
// Tests that the drop stats are correctly reported by client load reporting.
TEST_P(ClientLoadReportingWithDropTest, Vanilla) {
- if (!GetParam().use_xds_resolver()) {
+ if (GetParam().use_fake_resolver()) {
balancers_[0]->lrs_service()->set_cluster_names({kServerName});
}
SetNextResolution({});
@@ -5653,7 +9896,7 @@ TEST_P(ClientLoadReportingWithDropTest, Vanilla) {
args.drop_categories = {{kLbDropType, kDropPerMillionForLb},
{kThrottleDropType, kDropPerMillionForThrottle}};
balancers_[0]->ads_service()->SetEdsResource(
- AdsServiceImpl::BuildEdsResource(args, DefaultEdsServiceName()));
+ BuildEdsResource(args, DefaultEdsServiceName()));
int num_ok = 0;
int num_failure = 0;
int num_drops = 0;
@@ -5706,117 +9949,1375 @@ TEST_P(ClientLoadReportingWithDropTest, Vanilla) {
kDropRateForThrottle * (1 + kErrorTolerance))));
}
+class FaultInjectionTest : public XdsEnd2endTest {
+ public:
+ FaultInjectionTest() : XdsEnd2endTest(1, 1) {}
+
+ // Builds a Listener with Fault Injection filter config. If the http_fault is
+ // nullptr, then assign an empty filter config. This filter config is required
+ // to enable the fault injection features.
+ static Listener BuildListenerWithFaultInjection(
+ const HTTPFault& http_fault = HTTPFault()) {
+ HttpConnectionManager http_connection_manager;
+ Listener listener;
+ listener.set_name(kServerName);
+ HttpFilter* fault_filter = http_connection_manager.add_http_filters();
+ fault_filter->set_name("envoy.fault");
+ fault_filter->mutable_typed_config()->PackFrom(http_fault);
+ HttpFilter* router_filter = http_connection_manager.add_http_filters();
+ router_filter->set_name("router");
+ router_filter->mutable_typed_config()->PackFrom(
+ envoy::extensions::filters::http::router::v3::Router());
+ listener.mutable_api_listener()->mutable_api_listener()->PackFrom(
+ http_connection_manager);
+ return listener;
+ }
+
+ RouteConfiguration BuildRouteConfigurationWithFaultInjection(
+ const HTTPFault& http_fault) {
+ // Package as Any
+ google::protobuf::Any filter_config;
+ filter_config.PackFrom(http_fault);
+ // Plug into the RouteConfiguration
+ RouteConfiguration new_route_config = default_route_config_;
+ auto* config_map = new_route_config.mutable_virtual_hosts(0)
+ ->mutable_routes(0)
+ ->mutable_typed_per_filter_config();
+ (*config_map)["envoy.fault"] = std::move(filter_config);
+ return new_route_config;
+ }
+
+ void SetFilterConfig(HTTPFault& http_fault) {
+ switch (GetParam().filter_config_setup()) {
+ case TestType::FilterConfigSetup::kRouteOverride: {
+ Listener listener = BuildListenerWithFaultInjection();
+ RouteConfiguration route =
+ BuildRouteConfigurationWithFaultInjection(http_fault);
+ SetListenerAndRouteConfiguration(0, listener, route);
+ break;
+ }
+ case TestType::FilterConfigSetup::kHTTPConnectionManagerOriginal: {
+ Listener listener = BuildListenerWithFaultInjection(http_fault);
+ SetListenerAndRouteConfiguration(0, listener, default_route_config_);
+ }
+ };
+ }
+};
+
+// Test to ensure the most basic fault injection config works.
+TEST_P(FaultInjectionTest, XdsFaultInjectionAlwaysAbort) {
+ const uint32_t kAbortPercentagePerHundred = 100;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* abort_percentage = http_fault.mutable_abort()->mutable_percentage();
+ abort_percentage->set_numerator(kAbortPercentagePerHundred);
+ abort_percentage->set_denominator(FractionalPercent::HUNDRED);
+ http_fault.mutable_abort()->set_grpc_status(
+ static_cast<uint32_t>(StatusCode::ABORTED));
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Fire several RPCs, and expect all of them to be aborted.
+ CheckRpcSendFailure(5, RpcOptions().set_wait_for_ready(true),
+ StatusCode::ABORTED);
+}
+
+// Without the listener config, the fault injection won't be enabled.
+TEST_P(FaultInjectionTest, XdsFaultInjectionWithoutListenerFilter) {
+ const uint32_t kAbortPercentagePerHundred = 100;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* abort_percentage = http_fault.mutable_abort()->mutable_percentage();
+ abort_percentage->set_numerator(kAbortPercentagePerHundred);
+ abort_percentage->set_denominator(FractionalPercent::HUNDRED);
+ http_fault.mutable_abort()->set_grpc_status(
+ static_cast<uint32_t>(StatusCode::ABORTED));
+ // Turn on fault injection
+ RouteConfiguration route =
+ BuildRouteConfigurationWithFaultInjection(http_fault);
+ SetListenerAndRouteConfiguration(0, default_listener_, route);
+ // Fire several RPCs, and expect all of them to be pass.
+ CheckRpcSendOk(5, RpcOptions().set_wait_for_ready(true));
+}
+
+TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageAbort) {
+ const size_t kNumRpcs = 100;
+ const uint32_t kAbortPercentagePerHundred = 50;
+ const double kAbortRate = kAbortPercentagePerHundred / 100.0;
+ const double kErrorTolerance = 0.2;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* abort_percentage = http_fault.mutable_abort()->mutable_percentage();
+ abort_percentage->set_numerator(kAbortPercentagePerHundred);
+ abort_percentage->set_denominator(FractionalPercent::HUNDRED);
+ http_fault.mutable_abort()->set_grpc_status(
+ static_cast<uint32_t>(StatusCode::ABORTED));
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Send kNumRpcs RPCs and count the aborts.
+ int num_total = 0, num_ok = 0, num_failure = 0, num_aborted = 0;
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ SendRpcAndCount(&num_total, &num_ok, &num_failure, &num_aborted,
+ RpcOptions(), "Fault injected");
+ }
+ EXPECT_EQ(kNumRpcs, num_total);
+ EXPECT_EQ(0, num_failure);
+ // The abort rate should be roughly equal to the expectation.
+ const double seen_abort_rate = static_cast<double>(num_aborted) / kNumRpcs;
+ EXPECT_THAT(seen_abort_rate,
+ ::testing::AllOf(::testing::Ge(kAbortRate - kErrorTolerance),
+ ::testing::Le(kAbortRate + kErrorTolerance)));
+}
+
+TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageAbortViaHeaders) {
+ const size_t kNumRpcs = 100;
+ const uint32_t kAbortPercentageCap = 100;
+ const uint32_t kAbortPercentage = 50;
+ const double kAbortRate = kAbortPercentage / 100.0;
+ const double kErrorTolerance = 0.2;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ http_fault.mutable_abort()->mutable_header_abort();
+ http_fault.mutable_abort()->mutable_percentage()->set_numerator(
+ kAbortPercentageCap);
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Send kNumRpcs RPCs and count the aborts.
+ std::vector<std::pair<TString, TString>> metadata = {
+ {"x-envoy-fault-abort-grpc-request", "10"},
+ {"x-envoy-fault-abort-percentage", ToString(kAbortPercentage)},
+ };
+ int num_total = 0, num_ok = 0, num_failure = 0, num_aborted = 0;
+ RpcOptions options = RpcOptions().set_metadata(metadata);
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ SendRpcAndCount(&num_total, &num_ok, &num_failure, &num_aborted, options,
+ "Fault injected");
+ }
+ EXPECT_EQ(kNumRpcs, num_total);
+ EXPECT_EQ(0, num_failure);
+ // The abort rate should be roughly equal to the expectation.
+ const double seen_abort_rate = static_cast<double>(num_aborted) / kNumRpcs;
+ EXPECT_THAT(seen_abort_rate,
+ ::testing::AllOf(::testing::Ge(kAbortRate - kErrorTolerance),
+ ::testing::Le(kAbortRate + kErrorTolerance)));
+}
+
+// TODO(lidiz) reduce the error tolerance to a lower level without dramatically
+// increase the duration of fault injection tests.
+TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageDelay) {
+ const size_t kNumRpcs = 100;
+ const uint32_t kFixedDelaySeconds = 100;
+ const uint32_t kRpcTimeoutMilliseconds = 10; // 10 ms
+ const uint32_t kDelayPercentagePerHundred = 95;
+ const double kDelayRate = kDelayPercentagePerHundred / 100.0;
+ const double kErrorTolerance = 0.2;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* delay_percentage = http_fault.mutable_delay()->mutable_percentage();
+ delay_percentage->set_numerator(kDelayPercentagePerHundred);
+ delay_percentage->set_denominator(FractionalPercent::HUNDRED);
+ auto* fixed_delay = http_fault.mutable_delay()->mutable_fixed_delay();
+ fixed_delay->set_seconds(kFixedDelaySeconds);
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Send kNumRpcs RPCs and count the delays.
+ int num_total = 0, num_ok = 0, num_delayed = 0, num_dropped = 0;
+ RpcOptions options = RpcOptions()
+ .set_timeout_ms(kRpcTimeoutMilliseconds)
+ .set_skip_cancelled_check(true);
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ SendRpcAndCount(&num_total, &num_ok, &num_delayed, &num_dropped, options);
+ }
+ EXPECT_EQ(kNumRpcs, num_total);
+ EXPECT_EQ(0, num_dropped);
+ // The delay rate should be roughly equal to the expectation.
+ const double seen_delay_rate = static_cast<double>(num_delayed) / kNumRpcs;
+ EXPECT_THAT(seen_delay_rate,
+ ::testing::AllOf(::testing::Ge(kDelayRate - kErrorTolerance),
+ ::testing::Le(kDelayRate + kErrorTolerance)));
+}
+
+TEST_P(FaultInjectionTest, XdsFaultInjectionPercentageDelayViaHeaders) {
+ const size_t kNumRpcs = 100;
+ const uint32_t kFixedDelayMilliseconds = 100000; // 100 seconds
+ const uint32_t kRpcTimeoutMilliseconds = 10; // 10 ms
+ const uint32_t kDelayPercentageCap = 100;
+ const uint32_t kDelayPercentage = 50;
+ const double kDelayRate = kDelayPercentage / 100.0;
+ const double kErrorTolerance = 0.2;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ http_fault.mutable_delay()->mutable_header_delay();
+ http_fault.mutable_delay()->mutable_percentage()->set_numerator(
+ kDelayPercentageCap);
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Send kNumRpcs RPCs and count the delays.
+ std::vector<std::pair<TString, TString>> metadata = {
+ {"x-envoy-fault-delay-request", ToString(kFixedDelayMilliseconds)},
+ {"x-envoy-fault-delay-request-percentage",
+ ToString(kDelayPercentage)},
+ };
+ int num_total = 0, num_ok = 0, num_delayed = 0, num_dropped = 0;
+ RpcOptions options = RpcOptions()
+ .set_metadata(metadata)
+ .set_timeout_ms(kRpcTimeoutMilliseconds)
+ .set_skip_cancelled_check(true);
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ SendRpcAndCount(&num_total, &num_ok, &num_delayed, &num_dropped, options);
+ }
+ // The delay rate should be roughly equal to the expectation.
+ const double seen_delay_rate = static_cast<double>(num_delayed) / kNumRpcs;
+ EXPECT_THAT(seen_delay_rate,
+ ::testing::AllOf(::testing::Ge(kDelayRate - kErrorTolerance),
+ ::testing::Le(kDelayRate + kErrorTolerance)));
+}
+
+TEST_P(FaultInjectionTest, XdsFaultInjectionAlwaysDelayPercentageAbort) {
+ const size_t kNumRpcs = 100;
+ const uint32_t kAbortPercentagePerHundred = 50;
+ const double kAbortRate = kAbortPercentagePerHundred / 100.0;
+ const uint32_t kFixedDelayNanos = 10 * 1000 * 1000; // 10 ms
+ const double kErrorTolerance = 0.2;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* abort_percentage = http_fault.mutable_abort()->mutable_percentage();
+ abort_percentage->set_numerator(kAbortPercentagePerHundred);
+ abort_percentage->set_denominator(FractionalPercent::HUNDRED);
+ http_fault.mutable_abort()->set_grpc_status(
+ static_cast<uint32_t>(StatusCode::ABORTED));
+ auto* delay_percentage = http_fault.mutable_delay()->mutable_percentage();
+ delay_percentage->set_numerator(1000000); // Always inject DELAY!
+ delay_percentage->set_denominator(FractionalPercent::MILLION);
+ auto* fixed_delay = http_fault.mutable_delay()->mutable_fixed_delay();
+ fixed_delay->set_nanos(kFixedDelayNanos);
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Send kNumRpcs RPCs and count the aborts.
+ int num_total = 0, num_ok = 0, num_failure = 0, num_aborted = 0;
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ grpc_millis t0 = NowFromCycleCounter();
+ SendRpcAndCount(&num_total, &num_ok, &num_failure, &num_aborted,
+ RpcOptions(), "Fault injected");
+ grpc_millis t1 = NowFromCycleCounter();
+ EXPECT_GE(t1, t0 + kFixedDelayNanos / 1000 / 1000);
+ }
+ EXPECT_EQ(kNumRpcs, num_total);
+ EXPECT_EQ(0, num_failure);
+ // The abort rate should be roughly equal to the expectation.
+ const double seen_abort_rate = static_cast<double>(num_aborted) / kNumRpcs;
+ EXPECT_THAT(seen_abort_rate,
+ ::testing::AllOf(::testing::Ge(kAbortRate - kErrorTolerance),
+ ::testing::Le(kAbortRate + kErrorTolerance)));
+}
+
+// This test and the above test apply different denominators to delay and abort.
+// This ensures that we are using the right denominator for each injected fault
+// in our code.
+TEST_P(FaultInjectionTest,
+ XdsFaultInjectionAlwaysDelayPercentageAbortSwitchDenominator) {
+ const size_t kNumRpcs = 100;
+ const uint32_t kAbortPercentagePerMillion = 500000;
+ const double kAbortRate = kAbortPercentagePerMillion / 1000000.0;
+ const uint32_t kFixedDelayNanos = 10 * 1000 * 1000; // 10 ms
+ const double kErrorTolerance = 0.2;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* abort_percentage = http_fault.mutable_abort()->mutable_percentage();
+ abort_percentage->set_numerator(kAbortPercentagePerMillion);
+ abort_percentage->set_denominator(FractionalPercent::MILLION);
+ http_fault.mutable_abort()->set_grpc_status(
+ static_cast<uint32_t>(StatusCode::ABORTED));
+ auto* delay_percentage = http_fault.mutable_delay()->mutable_percentage();
+ delay_percentage->set_numerator(100); // Always inject DELAY!
+ delay_percentage->set_denominator(FractionalPercent::HUNDRED);
+ auto* fixed_delay = http_fault.mutable_delay()->mutable_fixed_delay();
+ fixed_delay->set_nanos(kFixedDelayNanos);
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Send kNumRpcs RPCs and count the aborts.
+ int num_total = 0, num_ok = 0, num_failure = 0, num_aborted = 0;
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ grpc_millis t0 = NowFromCycleCounter();
+ SendRpcAndCount(&num_total, &num_ok, &num_failure, &num_aborted,
+ RpcOptions(), "Fault injected");
+ grpc_millis t1 = NowFromCycleCounter();
+ EXPECT_GE(t1, t0 + kFixedDelayNanos / 1000 / 1000);
+ }
+ EXPECT_EQ(kNumRpcs, num_total);
+ EXPECT_EQ(0, num_failure);
+ // The abort rate should be roughly equal to the expectation.
+ const double seen_abort_rate = static_cast<double>(num_aborted) / kNumRpcs;
+ EXPECT_THAT(seen_abort_rate,
+ ::testing::AllOf(::testing::Ge(kAbortRate - kErrorTolerance),
+ ::testing::Le(kAbortRate + kErrorTolerance)));
+}
+
+TEST_P(FaultInjectionTest, XdsFaultInjectionMaxFault) {
+ const uint32_t kMaxFault = 10;
+ const uint32_t kNumRpcs = 30; // kNumRpcs should be bigger than kMaxFault
+ const uint32_t kRpcTimeoutMs = 2000; // 2 seconds
+ const uint32_t kLongDelaySeconds = 100; // 100 seconds
+ const uint32_t kAlwaysDelayPercentage = 100;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create an EDS resource
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Construct the fault injection filter config
+ HTTPFault http_fault;
+ auto* delay_percentage = http_fault.mutable_delay()->mutable_percentage();
+ delay_percentage->set_numerator(
+ kAlwaysDelayPercentage); // Always inject DELAY!
+ delay_percentage->set_denominator(FractionalPercent::HUNDRED);
+ auto* fixed_delay = http_fault.mutable_delay()->mutable_fixed_delay();
+ fixed_delay->set_seconds(kLongDelaySeconds);
+ http_fault.mutable_max_active_faults()->set_value(kMaxFault);
+ // Config fault injection via different setup
+ SetFilterConfig(http_fault);
+ // Sends a batch of long running RPCs with long timeout to consume all
+ // active faults quota.
+ int num_ok = 0, num_delayed = 0;
+ LongRunningRpc rpcs[kNumRpcs];
+ RpcOptions rpc_options = RpcOptions().set_timeout_ms(kRpcTimeoutMs);
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ rpcs[i].StartRpc(stub_.get(), rpc_options);
+ }
+ for (size_t i = 0; i < kNumRpcs; ++i) {
+ Status status = rpcs[i].GetStatus();
+ if (status.ok()) {
+ ++num_ok;
+ } else {
+ EXPECT_EQ(StatusCode::DEADLINE_EXCEEDED, status.error_code());
+ ++num_delayed;
+ }
+ }
+ // Only kMaxFault number of RPC should be fault injected..
+ EXPECT_EQ(kMaxFault, num_delayed);
+ // Other RPCs should be ok.
+ EXPECT_EQ(kNumRpcs - kMaxFault, num_ok);
+}
+
+class BootstrapContentsFromEnvVarTest : public XdsEnd2endTest {
+ public:
+ BootstrapContentsFromEnvVarTest() : XdsEnd2endTest(4, 1, 100, false, true) {}
+};
+
+TEST_P(BootstrapContentsFromEnvVarTest, Vanilla) {
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", GetBackendPorts()},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ WaitForAllBackends();
+}
+
+#ifndef DISABLED_XDS_PROTO_IN_CC
+class ClientStatusDiscoveryServiceTest : public XdsEnd2endTest {
+ public:
+ ClientStatusDiscoveryServiceTest() : XdsEnd2endTest(1, 1) {}
+
+ void SetUp() override {
+ XdsEnd2endTest::SetUp();
+ admin_server_thread_ = y_absl::make_unique<AdminServerThread>();
+ admin_server_thread_->Start();
+ TString admin_server_address = y_absl::StrCat(
+ ipv6_only_ ? "[::1]:" : "127.0.0.1:", admin_server_thread_->port());
+ admin_channel_ = grpc::CreateChannel(
+ admin_server_address,
+ std::make_shared<SecureChannelCredentials>(
+ grpc_fake_transport_security_credentials_create()));
+ csds_stub_ =
+ envoy::service::status::v3::ClientStatusDiscoveryService::NewStub(
+ admin_channel_);
+ if (GetParam().use_csds_streaming()) {
+ stream_ = csds_stub_->StreamClientStatus(&stream_context_);
+ }
+ }
+
+ void TearDown() override {
+ if (stream_ != nullptr) {
+ EXPECT_TRUE(stream_->WritesDone());
+ Status status = stream_->Finish();
+ EXPECT_TRUE(status.ok()) << "code=" << status.error_code()
+ << " message=" << status.error_message();
+ }
+ admin_server_thread_->Shutdown();
+ XdsEnd2endTest::TearDown();
+ }
+
+ envoy::service::status::v3::ClientStatusResponse FetchCsdsResponse() {
+ envoy::service::status::v3::ClientStatusResponse response;
+ if (!GetParam().use_csds_streaming()) {
+ // Fetch through unary pulls
+ ClientContext context;
+ Status status = csds_stub_->FetchClientStatus(
+ &context, envoy::service::status::v3::ClientStatusRequest(),
+ &response);
+ EXPECT_TRUE(status.ok()) << "code=" << status.error_code()
+ << " message=" << status.error_message();
+ } else {
+ // Fetch through streaming pulls
+ EXPECT_TRUE(
+ stream_->Write(envoy::service::status::v3::ClientStatusRequest()));
+ EXPECT_TRUE(stream_->Read(&response));
+ }
+ return response;
+ }
+
+ private:
+ std::unique_ptr<AdminServerThread> admin_server_thread_;
+ std::shared_ptr<Channel> admin_channel_;
+ std::unique_ptr<
+ envoy::service::status::v3::ClientStatusDiscoveryService::Stub>
+ csds_stub_;
+ ClientContext stream_context_;
+ std::unique_ptr<
+ ClientReaderWriter<envoy::service::status::v3::ClientStatusRequest,
+ envoy::service::status::v3::ClientStatusResponse>>
+ stream_;
+};
+
+MATCHER_P4(EqNode, id, user_agent_name, user_agent_version, client_features,
+ "equals Node") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(id, arg.id(), result_listener);
+ ok &= ::testing::ExplainMatchResult(user_agent_name, arg.user_agent_name(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ user_agent_version, arg.user_agent_version(), result_listener);
+ ok &= ::testing::ExplainMatchResult(client_features, arg.client_features(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqListenersConfigDump, version_info, dynamic_listeners,
+ "equals ListenerConfigDump") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(::testing::ElementsAre(),
+ arg.static_listeners(), result_listener);
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(dynamic_listeners,
+ arg.dynamic_listeners(), result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqDynamicListenerState, version_info, listener,
+ "equals DynamicListenerState") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ ok &=
+ ::testing::ExplainMatchResult(listener, arg.listener(), result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqListener, name, api_listener, "equals Listener") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(name, arg.name(), result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ api_listener, arg.api_listener().api_listener(), result_listener);
+ return ok;
+}
+
+MATCHER_P(EqHttpConnectionManagerNotRds, route_config,
+ "equals HttpConnectionManager") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(route_config, arg.route_config(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P(EqRouteConfigurationName, name, "equals RouteConfiguration") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(name, arg.name(), result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqRouteConfiguration, name, cluster_name,
+ "equals RouteConfiguration") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(name, arg.name(), result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ ::testing::ElementsAre(::testing::Property(
+ &envoy::config::route::v3::VirtualHost::routes,
+ ::testing::ElementsAre(::testing::Property(
+ &envoy::config::route::v3::Route::route,
+ ::testing::Property(
+ &envoy::config::route::v3::RouteAction::cluster,
+ cluster_name))))),
+ arg.virtual_hosts(), result_listener);
+ return ok;
+}
+
+MATCHER_P(EqRoutesConfigDump, dynamic_route_configs,
+ "equals RoutesConfigDump") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(
+ ::testing::ElementsAre(), arg.static_route_configs(), result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ dynamic_route_configs, arg.dynamic_route_configs(), result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqClustersConfigDump, version_info, dynamic_active_clusters,
+ "equals ClustersConfigDump") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(::testing::ElementsAre(),
+ arg.static_clusters(), result_listener);
+ ok &= ::testing::ExplainMatchResult(::testing::ElementsAre(),
+ arg.dynamic_warming_clusters(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ dynamic_active_clusters, arg.dynamic_active_clusters(), result_listener);
+ return ok;
+}
+
+MATCHER_P(EqCluster, name, "equals Cluster") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(name, arg.name(), result_listener);
+ return ok;
+}
+
+MATCHER_P(EqEndpointsConfigDump, dynamic_endpoint_configs,
+ "equals EndpointsConfigDump") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(dynamic_endpoint_configs,
+ arg.dynamic_endpoint_configs(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P(EqEndpoint, port, "equals Endpoint") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(
+ port, arg.address().socket_address().port_value(), result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqLocalityLbEndpoints, port, weight, "equals LocalityLbEndpoints") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(
+ ::testing::ElementsAre(::testing::Property(
+ &envoy::config::endpoint::v3::LbEndpoint::endpoint,
+ EqEndpoint(port))),
+ arg.lb_endpoints(), result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ weight, arg.load_balancing_weight().value(), result_listener);
+ return ok;
+}
+
+MATCHER_P(EqClusterLoadAssignmentName, cluster_name,
+ "equals ClusterLoadAssignment") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(cluster_name, arg.cluster_name(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P3(EqClusterLoadAssignment, cluster_name, port, weight,
+ "equals ClusterLoadAssignment") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(cluster_name, arg.cluster_name(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(
+ ::testing::ElementsAre(EqLocalityLbEndpoints(port, weight)),
+ arg.endpoints(), result_listener);
+ return ok;
+}
+
+MATCHER_P2(EqUpdateFailureState, details, version_info,
+ "equals UpdateFailureState") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(details, arg.details(), result_listener);
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P(UnpackListener, matcher, "is a Listener") {
+ Listener config;
+ if (!::testing::ExplainMatchResult(true, arg.UnpackTo(&config),
+ result_listener)) {
+ return false;
+ }
+ return ::testing::ExplainMatchResult(matcher, config, result_listener);
+}
+
+MATCHER_P(UnpackRouteConfiguration, matcher, "is a RouteConfiguration") {
+ RouteConfiguration config;
+ if (!::testing::ExplainMatchResult(true, arg.UnpackTo(&config),
+ result_listener)) {
+ return false;
+ }
+ return ::testing::ExplainMatchResult(matcher, config, result_listener);
+}
+
+MATCHER_P(UnpackHttpConnectionManager, matcher, "is a HttpConnectionManager") {
+ HttpConnectionManager config;
+ if (!::testing::ExplainMatchResult(true, arg.UnpackTo(&config),
+ result_listener)) {
+ return false;
+ }
+ return ::testing::ExplainMatchResult(matcher, config, result_listener);
+}
+
+MATCHER_P(UnpackCluster, matcher, "is a Cluster") {
+ Cluster config;
+ if (!::testing::ExplainMatchResult(true, arg.UnpackTo(&config),
+ result_listener)) {
+ return false;
+ }
+ return ::testing::ExplainMatchResult(matcher, config, result_listener);
+}
+
+MATCHER_P(UnpackClusterLoadAssignment, matcher, "is a ClusterLoadAssignment") {
+ ClusterLoadAssignment config;
+ if (!::testing::ExplainMatchResult(true, arg.UnpackTo(&config),
+ result_listener)) {
+ return false;
+ }
+ return ::testing::ExplainMatchResult(matcher, config, result_listener);
+}
+
+MATCHER_P5(EqDynamicListener, name, version_info, client_status,
+ api_listener_matcher, error_state, "equals DynamicListener") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(false, arg.has_warming_state(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(false, arg.has_draining_state(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(name, arg.name(), result_listener);
+ ok &= ::testing::ExplainMatchResult(client_status, arg.client_status(),
+ result_listener);
+ if (client_status == ClientResourceStatus::ACKED ||
+ client_status == ClientResourceStatus::NACKED) {
+ ok &= ::testing::ExplainMatchResult(
+ EqDynamicListenerState(version_info, UnpackListener(EqListener(
+ name, api_listener_matcher))),
+ arg.active_state(), result_listener);
+ }
+ ok &= ::testing::ExplainMatchResult(error_state, arg.error_state(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P5(EqDynamicRouteConfig, name, version_info, client_status,
+ cluster_name, error_state, "equals DynamicRouteConfig") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ if (client_status == ClientResourceStatus::REQUESTED ||
+ client_status == ClientResourceStatus::DOES_NOT_EXIST) {
+ ok &= ::testing::ExplainMatchResult(
+ UnpackRouteConfiguration(EqRouteConfigurationName(name)),
+ arg.route_config(), result_listener);
+ } else {
+ ok &= ::testing::ExplainMatchResult(
+ UnpackRouteConfiguration(EqRouteConfiguration(name, cluster_name)),
+ arg.route_config(), result_listener);
+ }
+ ok &= ::testing::ExplainMatchResult(error_state, arg.error_state(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(client_status, arg.client_status(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P4(EqDynamicCluster, name, version_info, client_status, error_state,
+ "equals DynamicCluster") {
+ bool ok = true;
+ ok &= ::testing::ExplainMatchResult(UnpackCluster(EqCluster(name)),
+ arg.cluster(), result_listener);
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(client_status, arg.client_status(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(error_state, arg.error_state(),
+ result_listener);
+ return ok;
+}
+
+MATCHER_P6(EqDynamicEndpointConfig, name, version_info, client_status, port,
+ weight, error_state, "equals DynamicEndpointConfig") {
+ bool ok = true;
+ if (client_status == ClientResourceStatus::REQUESTED ||
+ client_status == ClientResourceStatus::DOES_NOT_EXIST) {
+ ok &= ::testing::ExplainMatchResult(
+ UnpackClusterLoadAssignment(EqClusterLoadAssignmentName(name)),
+ arg.endpoint_config(), result_listener);
+ } else {
+ ok &= ::testing::ExplainMatchResult(
+ UnpackClusterLoadAssignment(
+ EqClusterLoadAssignment(name, port, weight)),
+ arg.endpoint_config(), result_listener);
+ }
+ ok &= ::testing::ExplainMatchResult(version_info, arg.version_info(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(client_status, arg.client_status(),
+ result_listener);
+ ok &= ::testing::ExplainMatchResult(error_state, arg.error_state(),
+ result_listener);
+ return ok;
+}
+
+MATCHER(IsRdsEnabledHCM, "is a RDS enabled HttpConnectionManager") {
+ return ::testing::ExplainMatchResult(
+ UnpackHttpConnectionManager(
+ ::testing::Property(&HttpConnectionManager::has_rds, true)),
+ arg, result_listener);
+}
+
+MATCHER_P2(EqNoRdsHCM, route_configuration_name, cluster_name,
+ "equals RDS disabled HttpConnectionManager") {
+ return ::testing::ExplainMatchResult(
+ UnpackHttpConnectionManager(EqHttpConnectionManagerNotRds(
+ EqRouteConfiguration(route_configuration_name, cluster_name))),
+ arg, result_listener);
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpVanilla) {
+ const size_t kNumRpcs = 5;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {backends_[0]->port()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Send several RPCs to ensure the xDS setup works
+ CheckRpcSendOk(kNumRpcs);
+ // Fetches the client config
+ auto csds_response = FetchCsdsResponse();
+ gpr_log(GPR_INFO, "xDS config dump: %s", csds_response.DebugString().c_str());
+ EXPECT_EQ(1, csds_response.config_size());
+ const auto& client_config = csds_response.config(0);
+ // Validate the Node information
+ EXPECT_THAT(client_config.node(),
+ EqNode("xds_end2end_test", ::testing::HasSubstr("C-core"),
+ ::testing::HasSubstr(grpc_version_string()),
+ ::testing::ElementsAre(
+ "envoy.lb.does_not_support_overprovisioning")));
+ // Prepare matches for RDS on or off
+ ::testing::Matcher<google::protobuf::Any> api_listener_matcher;
+ ::testing::Matcher<envoy::admin::v3::RoutesConfigDump>
+ route_config_dump_matcher;
+ if (GetParam().enable_rds_testing()) {
+ api_listener_matcher = IsRdsEnabledHCM();
+ route_config_dump_matcher =
+ EqRoutesConfigDump(::testing::ElementsAre(EqDynamicRouteConfig(
+ kDefaultRouteConfigurationName, "1", ClientResourceStatus::ACKED,
+ kDefaultClusterName, ::testing::_)));
+ } else {
+ api_listener_matcher =
+ EqNoRdsHCM(kDefaultRouteConfigurationName, kDefaultClusterName);
+ route_config_dump_matcher = EqRoutesConfigDump(::testing::ElementsAre());
+ }
+ // Validate the dumped xDS configs
+ EXPECT_THAT(
+ client_config.xds_config(),
+ ::testing::UnorderedElementsAre(
+ ::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::listener_config,
+ EqListenersConfigDump(
+ "1", ::testing::ElementsAre(EqDynamicListener(
+ kServerName, "1", ClientResourceStatus::ACKED,
+ api_listener_matcher, ::testing::_)))),
+ ::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::route_config,
+ route_config_dump_matcher),
+ ::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::cluster_config,
+ EqClustersConfigDump(
+ "1", ::testing::ElementsAre(EqDynamicCluster(
+ kDefaultClusterName, "1",
+ ClientResourceStatus::ACKED, ::testing::_)))),
+ ::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::endpoint_config,
+ EqEndpointsConfigDump(
+ ::testing::ElementsAre(EqDynamicEndpointConfig(
+ kDefaultEdsServiceName, "1", ClientResourceStatus::ACKED,
+ backends_[0]->port(), kDefaultLocalityWeight,
+ ::testing::_))))));
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpEmpty) {
+ // The CSDS service should not fail if XdsClient is not initialized or there
+ // is no working xDS configs.
+ FetchCsdsResponse();
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpListenerError) {
+ int kFetchConfigRetries = 3;
+ int kFetchIntervalMilliseconds = 200;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {backends_[0]->port()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Ensure the xDS resolver has working configs.
+ CheckRpcSendOk();
+ // Bad Listener should be rejected.
+ Listener listener;
+ listener.set_name(kServerName);
+ balancers_[0]->ads_service()->SetLdsResource(listener);
+ // The old xDS configs should still be effective.
+ CheckRpcSendOk();
+ ::testing::Matcher<google::protobuf::Any> api_listener_matcher;
+ if (GetParam().enable_rds_testing()) {
+ api_listener_matcher = IsRdsEnabledHCM();
+ } else {
+ api_listener_matcher =
+ EqNoRdsHCM(kDefaultRouteConfigurationName, kDefaultClusterName);
+ }
+ for (int o = 0; o < kFetchConfigRetries; o++) {
+ auto csds_response = FetchCsdsResponse();
+ // Check if error state is propagated
+ bool ok = ::testing::Value(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::listener_config,
+ EqListenersConfigDump(
+ "1",
+ ::testing::ElementsAre(EqDynamicListener(
+ kServerName, "1", ClientResourceStatus::NACKED,
+ api_listener_matcher,
+ EqUpdateFailureState(
+ ::testing::HasSubstr(
+ "Listener has neither address nor ApiListener"),
+ "2")))))));
+ if (ok) return; // TEST PASSED!
+ gpr_sleep_until(
+ grpc_timeout_milliseconds_to_deadline(kFetchIntervalMilliseconds));
+ }
+ FAIL() << "error_state not seen in CSDS responses";
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpRouteError) {
+ int kFetchConfigRetries = 3;
+ int kFetchIntervalMilliseconds = 200;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {backends_[0]->port()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Ensure the xDS resolver has working configs.
+ CheckRpcSendOk();
+ // Bad route config will be rejected.
+ RouteConfiguration route_config;
+ route_config.set_name(kDefaultRouteConfigurationName);
+ route_config.add_virtual_hosts();
+ SetRouteConfiguration(0, route_config);
+ // The old xDS configs should still be effective.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendOk();
+ for (int o = 0; o < kFetchConfigRetries; o++) {
+ auto csds_response = FetchCsdsResponse();
+ bool ok = false;
+ if (GetParam().enable_rds_testing()) {
+ ok = ::testing::Value(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::route_config,
+ EqRoutesConfigDump(::testing::ElementsAre(EqDynamicRouteConfig(
+ kDefaultRouteConfigurationName, "1",
+ ClientResourceStatus::NACKED, kDefaultClusterName,
+ EqUpdateFailureState(
+ ::testing::HasSubstr("VirtualHost has no domains"),
+ "2")))))));
+ } else {
+ ok = ::testing::Value(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::listener_config,
+ EqListenersConfigDump(
+ "1",
+ ::testing::ElementsAre(EqDynamicListener(
+ kServerName, "1", ClientResourceStatus::NACKED,
+ EqNoRdsHCM(kDefaultRouteConfigurationName,
+ kDefaultClusterName),
+ EqUpdateFailureState(
+ ::testing::HasSubstr("VirtualHost has no domains"),
+ "2")))))));
+ }
+ if (ok) return; // TEST PASSED!
+ gpr_sleep_until(
+ grpc_timeout_milliseconds_to_deadline(kFetchIntervalMilliseconds));
+ }
+ FAIL() << "error_state not seen in CSDS responses";
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpClusterError) {
+ int kFetchConfigRetries = 3;
+ int kFetchIntervalMilliseconds = 200;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {backends_[0]->port()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Ensure the xDS resolver has working configs.
+ CheckRpcSendOk();
+ // Listener without any route, will be rejected.
+ Cluster cluster;
+ cluster.set_name(kDefaultClusterName);
+ balancers_[0]->ads_service()->SetCdsResource(cluster);
+ // The old xDS configs should still be effective.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendOk();
+ for (int o = 0; o < kFetchConfigRetries; o++) {
+ auto csds_response = FetchCsdsResponse();
+ // Check if error state is propagated
+ bool ok = ::testing::Value(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::cluster_config,
+ EqClustersConfigDump(
+ "1", ::testing::ElementsAre(EqDynamicCluster(
+ kDefaultClusterName, "1", ClientResourceStatus::NACKED,
+ EqUpdateFailureState(
+ ::testing::HasSubstr("DiscoveryType not found"),
+ "2")))))));
+ if (ok) return; // TEST PASSED!
+ gpr_sleep_until(
+ grpc_timeout_milliseconds_to_deadline(kFetchIntervalMilliseconds));
+ }
+ FAIL() << "error_state not seen in CSDS responses";
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpEndpointError) {
+ int kFetchConfigRetries = 3;
+ int kFetchIntervalMilliseconds = 200;
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ AdsServiceImpl::EdsResourceArgs args({
+ {"locality0", {backends_[0]->port()}},
+ });
+ balancers_[0]->ads_service()->SetEdsResource(
+ BuildEdsResource(args, DefaultEdsServiceName()));
+ // Ensure the xDS resolver has working configs.
+ CheckRpcSendOk();
+ // Bad endpoint config will be rejected.
+ ClusterLoadAssignment cluster_load_assignment;
+ cluster_load_assignment.set_cluster_name(kDefaultEdsServiceName);
+ auto* endpoints = cluster_load_assignment.add_endpoints();
+ endpoints->mutable_load_balancing_weight()->set_value(1);
+ auto* endpoint = endpoints->add_lb_endpoints()->mutable_endpoint();
+ endpoint->mutable_address()->mutable_socket_address()->set_port_value(1 << 1);
+ balancers_[0]->ads_service()->SetEdsResource(cluster_load_assignment);
+ // The old xDS configs should still be effective.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ CheckRpcSendOk();
+ for (int o = 0; o < kFetchConfigRetries; o++) {
+ auto csds_response = FetchCsdsResponse();
+
+ // Check if error state is propagated
+ bool ok = ::testing::Value(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::endpoint_config,
+ EqEndpointsConfigDump(
+ ::testing::ElementsAre(EqDynamicEndpointConfig(
+ kDefaultEdsServiceName, "1", ClientResourceStatus::NACKED,
+ backends_[0]->port(), kDefaultLocalityWeight,
+ EqUpdateFailureState(::testing::HasSubstr("Empty locality"),
+ "2")))))));
+ if (ok) return; // TEST PASSED!
+ gpr_sleep_until(
+ grpc_timeout_milliseconds_to_deadline(kFetchIntervalMilliseconds));
+ }
+ FAIL() << "error_state not seen in CSDS responses";
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpListenerRequested) {
+ int kTimeoutMillisecond = 1000;
+ balancers_[0]->ads_service()->UnsetResource(kLdsTypeUrl, kServerName);
+ CheckRpcSendFailure(1, RpcOptions().set_timeout_ms(kTimeoutMillisecond),
+ grpc::DEADLINE_EXCEEDED);
+ auto csds_response = FetchCsdsResponse();
+ EXPECT_THAT(csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::listener_config,
+ EqListenersConfigDump(
+ ::testing::_, ::testing::ElementsAre(EqDynamicListener(
+ kServerName, ::testing::_,
+ ClientResourceStatus::REQUESTED,
+ ::testing::_, ::testing::_))))));
+}
+
+TEST_P(ClientStatusDiscoveryServiceTest, XdsConfigDumpClusterRequested) {
+ int kTimeoutMillisecond = 1000;
+ TString kClusterName1 = "cluster-1";
+ TString kClusterName2 = "cluster-2";
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ // Create a route config requesting two non-existing clusters
+ RouteConfiguration route_config;
+ route_config.set_name(kDefaultRouteConfigurationName);
+ auto* vh = route_config.add_virtual_hosts();
+ // The VirtualHost must match the domain name, otherwise will cause resolver
+ // transient failure.
+ vh->add_domains("*");
+ auto* routes1 = vh->add_routes();
+ routes1->mutable_match()->set_prefix("");
+ routes1->mutable_route()->set_cluster(kClusterName1);
+ auto* routes2 = vh->add_routes();
+ routes2->mutable_match()->set_prefix("");
+ routes2->mutable_route()->set_cluster(kClusterName2);
+ SetRouteConfiguration(0, route_config);
+ // Try to get the configs plumb through
+ CheckRpcSendFailure(1, RpcOptions().set_timeout_ms(kTimeoutMillisecond),
+ grpc::DEADLINE_EXCEEDED);
+ auto csds_response = FetchCsdsResponse();
+ EXPECT_THAT(csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::cluster_config,
+ EqClustersConfigDump(
+ ::testing::_,
+ ::testing::UnorderedElementsAre(
+ EqDynamicCluster(kClusterName1, ::testing::_,
+ ClientResourceStatus::REQUESTED,
+ ::testing::_),
+ EqDynamicCluster(kClusterName2, ::testing::_,
+ ClientResourceStatus::REQUESTED,
+ ::testing::_))))));
+}
+
+class CsdsShortAdsTimeoutTest : public ClientStatusDiscoveryServiceTest {
+ void SetUp() override {
+ // Shorten the ADS subscription timeout to speed up the test run.
+ xds_resource_does_not_exist_timeout_ms_ = 500;
+ ClientStatusDiscoveryServiceTest::SetUp();
+ }
+};
+
+TEST_P(CsdsShortAdsTimeoutTest, XdsConfigDumpListenerDoesNotExist) {
+ int kTimeoutMillisecond = 1000000; // 1000s wait for the transient failure.
+ balancers_[0]->ads_service()->UnsetResource(kLdsTypeUrl, kServerName);
+ CheckRpcSendFailure(1, RpcOptions().set_timeout_ms(kTimeoutMillisecond),
+ grpc::UNAVAILABLE);
+ auto csds_response = FetchCsdsResponse();
+ EXPECT_THAT(csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::listener_config,
+ EqListenersConfigDump(
+ ::testing::_, ::testing::ElementsAre(EqDynamicListener(
+ kServerName, ::testing::_,
+ ClientResourceStatus::DOES_NOT_EXIST,
+ ::testing::_, ::testing::_))))));
+}
+
+TEST_P(CsdsShortAdsTimeoutTest, XdsConfigDumpRouteConfigDoesNotExist) {
+ if (!GetParam().enable_rds_testing()) return;
+ int kTimeoutMillisecond = 1000000; // 1000s wait for the transient failure.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ balancers_[0]->ads_service()->UnsetResource(kRdsTypeUrl,
+ kDefaultRouteConfigurationName);
+ CheckRpcSendFailure(1, RpcOptions().set_timeout_ms(kTimeoutMillisecond),
+ grpc::UNAVAILABLE);
+ auto csds_response = FetchCsdsResponse();
+ EXPECT_THAT(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::route_config,
+ EqRoutesConfigDump(::testing::ElementsAre(
+ EqDynamicRouteConfig(kDefaultRouteConfigurationName, ::testing::_,
+ ClientResourceStatus::DOES_NOT_EXIST,
+ ::testing::_, ::testing::_))))));
+}
+
+TEST_P(CsdsShortAdsTimeoutTest, XdsConfigDumpClusterDoesNotExist) {
+ int kTimeoutMillisecond = 1000000; // 1000s wait for the transient failure.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ balancers_[0]->ads_service()->UnsetResource(kCdsTypeUrl, kDefaultClusterName);
+ CheckRpcSendFailure(1, RpcOptions().set_timeout_ms(kTimeoutMillisecond),
+ grpc::UNAVAILABLE);
+ auto csds_response = FetchCsdsResponse();
+ EXPECT_THAT(csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::cluster_config,
+ EqClustersConfigDump(::testing::_,
+ ::testing::ElementsAre(EqDynamicCluster(
+ kDefaultClusterName, ::testing::_,
+ ClientResourceStatus::DOES_NOT_EXIST,
+ ::testing::_))))));
+}
+
+TEST_P(CsdsShortAdsTimeoutTest, XdsConfigDumpEndpointDoesNotExist) {
+ int kTimeoutMillisecond = 1000000; // 1000s wait for the transient failure.
+ SetNextResolution({});
+ SetNextResolutionForLbChannelAllBalancers();
+ balancers_[0]->ads_service()->UnsetResource(kEdsTypeUrl,
+ kDefaultEdsServiceName);
+ CheckRpcSendFailure(1, RpcOptions().set_timeout_ms(kTimeoutMillisecond),
+ grpc::UNAVAILABLE);
+ auto csds_response = FetchCsdsResponse();
+ EXPECT_THAT(
+ csds_response.config(0).xds_config(),
+ ::testing::Contains(::testing::Property(
+ &envoy::service::status::v3::PerXdsConfig::endpoint_config,
+ EqEndpointsConfigDump(::testing::ElementsAre(EqDynamicEndpointConfig(
+ kDefaultEdsServiceName, ::testing::_,
+ ClientResourceStatus::DOES_NOT_EXIST, ::testing::_, ::testing::_,
+ ::testing::_))))));
+}
+#endif // DISABLED_XDS_PROTO_IN_CC
+
TString TestTypeName(const ::testing::TestParamInfo<TestType>& info) {
return info.param.AsString();
}
-// TestType params:
-// - use_xds_resolver
-// - enable_load_reporting
-// - enable_rds_testing = false
-// - use_v2 = false
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, BasicTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, false),
- TestType(true, true)),
- &TestTypeName);
+// Run with all combinations of xds/fake resolver and enabling load reporting.
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, BasicTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_load_reporting(),
+ TestType().set_use_fake_resolver(),
+ TestType().set_use_fake_resolver().set_enable_load_reporting()),
+ &TestTypeName);
// Run with both fake resolver and xds resolver.
// Don't run with load reporting or v2 or RDS, since they are irrelevant to
// the tests.
INSTANTIATE_TEST_SUITE_P(XdsTest, SecureNamingTest,
- ::testing::Values(TestType(false, false),
- TestType(true, false)),
+ ::testing::Values(TestType(),
+ TestType().set_use_fake_resolver()),
&TestTypeName);
// LDS depends on XdsResolver.
-INSTANTIATE_TEST_SUITE_P(XdsTest, LdsTest,
- ::testing::Values(TestType(true, false),
- TestType(true, true)),
+INSTANTIATE_TEST_SUITE_P(XdsTest, LdsTest, ::testing::Values(TestType()),
+ &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(XdsTest, LdsV2Test,
+ ::testing::Values(TestType().set_use_v2()),
&TestTypeName);
// LDS/RDS commmon tests depend on XdsResolver.
-INSTANTIATE_TEST_SUITE_P(XdsTest, LdsRdsTest,
- ::testing::Values(TestType(true, false),
- TestType(true, true),
- TestType(true, false, true),
- TestType(true, true, true),
- // Also test with xDS v2.
- TestType(true, true, true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, LdsRdsTest,
+ ::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,
+ ::testing::Values(TestType(), TestType().set_enable_load_reporting()),
+ &TestTypeName);
// CDS depends on XdsResolver.
-INSTANTIATE_TEST_SUITE_P(XdsTest, CdsTest,
- ::testing::Values(TestType(true, false),
- TestType(true, true)),
+// Security depends on v3.
+// Not enabling load reporting or RDS, since those are irrelevant to these
+// tests.
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, XdsSecurityTest,
+ ::testing::Values(TestType().set_use_xds_credentials()), &TestTypeName);
+
+// We are only testing the server here.
+INSTANTIATE_TEST_SUITE_P(XdsTest, XdsEnabledServerTest,
+ ::testing::Values(TestType()), &TestTypeName);
+
+// We are only testing the server here.
+INSTANTIATE_TEST_SUITE_P(XdsTest, XdsServerSecurityTest,
+ ::testing::Values(TestType()
+ .set_use_fake_resolver()
+ .set_use_xds_credentials()),
+ &TestTypeName);
+
+// We are only testing the server here.
+INSTANTIATE_TEST_SUITE_P(XdsTest, XdsEnabledServerStatusNotificationTest,
+ ::testing::Values(TestType()
+ .set_use_fake_resolver()
+ .set_use_xds_credentials()),
+ &TestTypeName);
+
+// We are only testing the server here.
+INSTANTIATE_TEST_SUITE_P(XdsTest, XdsServerFilterChainMatchTest,
+ ::testing::Values(TestType()
+ .set_use_fake_resolver()
+ .set_use_xds_credentials()),
&TestTypeName);
// EDS could be tested with or without XdsResolver, but the tests would
// be the same either way, so we test it only with XdsResolver.
-INSTANTIATE_TEST_SUITE_P(XdsTest, EdsTest,
- ::testing::Values(TestType(true, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, EdsTest,
+ ::testing::Values(TestType(), TestType().set_enable_load_reporting()),
+ &TestTypeName);
// Test initial resource timeouts for each resource type.
// Do this only for XdsResolver with RDS enabled, so that we can test
// all resource types.
// Run with V3 only, since the functionality is no different in V2.
INSTANTIATE_TEST_SUITE_P(XdsTest, TimeoutTest,
- ::testing::Values(TestType(true, false, true)),
+ ::testing::Values(TestType().set_enable_rds_testing()),
&TestTypeName);
// XdsResolverOnlyTest depends on XdsResolver.
-INSTANTIATE_TEST_SUITE_P(XdsTest, XdsResolverOnlyTest,
- ::testing::Values(TestType(true, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, XdsResolverOnlyTest,
+ ::testing::Values(TestType(), TestType().set_enable_load_reporting()),
+ &TestTypeName);
// XdsResolverLoadReprtingOnlyTest depends on XdsResolver and load reporting.
-INSTANTIATE_TEST_SUITE_P(XdsTest, XdsResolverLoadReportingOnlyTest,
- ::testing::Values(TestType(true, true)),
- &TestTypeName);
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, LocalityMapTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, false),
- TestType(true, true)),
- &TestTypeName);
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, FailoverTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, false),
- TestType(true, true)),
- &TestTypeName);
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, DropTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, false),
- TestType(true, true)),
- &TestTypeName);
-
-INSTANTIATE_TEST_SUITE_P(XdsTest, BalancerUpdateTest,
- ::testing::Values(TestType(false, true),
- TestType(false, false),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, XdsResolverLoadReportingOnlyTest,
+ ::testing::Values(TestType().set_enable_load_reporting()), &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, LocalityMapTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_load_reporting(),
+ TestType().set_use_fake_resolver(),
+ TestType().set_use_fake_resolver().set_enable_load_reporting()),
+ &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, FailoverTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_load_reporting(),
+ TestType().set_use_fake_resolver(),
+ TestType().set_use_fake_resolver().set_enable_load_reporting()),
+ &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, DropTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_load_reporting(),
+ TestType().set_use_fake_resolver(),
+ TestType().set_use_fake_resolver().set_enable_load_reporting()),
+ &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, BalancerUpdateTest,
+ ::testing::Values(
+ TestType().set_use_fake_resolver(),
+ TestType().set_use_fake_resolver().set_enable_load_reporting(),
+ TestType().set_enable_load_reporting()),
+ &TestTypeName);
// Load reporting tests are not run with load reporting disabled.
-INSTANTIATE_TEST_SUITE_P(XdsTest, ClientLoadReportingTest,
- ::testing::Values(TestType(false, true),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, ClientLoadReportingTest,
+ ::testing::Values(
+ TestType().set_enable_load_reporting(),
+ TestType().set_enable_load_reporting().set_use_fake_resolver()),
+ &TestTypeName);
// Load reporting tests are not run with load reporting disabled.
-INSTANTIATE_TEST_SUITE_P(XdsTest, ClientLoadReportingWithDropTest,
- ::testing::Values(TestType(false, true),
- TestType(true, true)),
- &TestTypeName);
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, ClientLoadReportingWithDropTest,
+ ::testing::Values(
+ TestType().set_enable_load_reporting(),
+ TestType().set_enable_load_reporting().set_use_fake_resolver()),
+ &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, FaultInjectionTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_rds_testing(),
+ TestType().set_filter_config_setup(
+ TestType::FilterConfigSetup::kRouteOverride),
+ TestType().set_enable_rds_testing().set_filter_config_setup(
+ TestType::FilterConfigSetup::kRouteOverride)),
+ &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(XdsTest, BootstrapContentsFromEnvVarTest,
+ ::testing::Values(TestType()), &TestTypeName);
+
+#ifndef DISABLED_XDS_PROTO_IN_CC
+// Run CSDS tests with RDS enabled and disabled.
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, ClientStatusDiscoveryServiceTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_rds_testing(),
+ TestType().set_use_csds_streaming(),
+ TestType().set_enable_rds_testing().set_use_csds_streaming()),
+ &TestTypeName);
+
+INSTANTIATE_TEST_SUITE_P(
+ XdsTest, CsdsShortAdsTimeoutTest,
+ ::testing::Values(
+ TestType(), TestType().set_enable_rds_testing(),
+ TestType().set_use_csds_streaming(),
+ TestType().set_enable_rds_testing().set_use_csds_streaming()),
+ &TestTypeName);
+#endif // DISABLED_XDS_PROTO_IN_CC
} // namespace
} // namespace testing
@@ -5826,7 +11327,29 @@ int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
::testing::InitGoogleTest(&argc, argv);
grpc::testing::WriteBootstrapFiles();
- grpc::testing::g_port_saver = new grpc::testing::PortSaver();
+ // Make the backup poller poll very frequently in order to pick up
+ // updates from all the subchannels's FDs.
+ GPR_GLOBAL_CONFIG_SET(grpc_client_channel_backup_poll_interval_ms, 1);
+#if TARGET_OS_IPHONE
+ // Workaround Apple CFStream bug
+ gpr_setenv("grpc_cfstream", "0");
+#endif
+ grpc_core::CertificateProviderRegistry::RegisterCertificateProviderFactory(
+ y_absl::make_unique<grpc::testing::FakeCertificateProviderFactory>(
+ "fake1", &grpc::testing::g_fake1_cert_data_map));
+ grpc_core::CertificateProviderRegistry::RegisterCertificateProviderFactory(
+ y_absl::make_unique<grpc::testing::FakeCertificateProviderFactory>(
+ "fake2", &grpc::testing::g_fake2_cert_data_map));
+ grpc_init();
+ grpc_core::XdsHttpFilterRegistry::RegisterFilter(
+ y_absl::make_unique<grpc::testing::NoOpHttpFilter>(
+ "grpc.testing.client_only_http_filter", true, false),
+ {"grpc.testing.client_only_http_filter"});
+ grpc_core::XdsHttpFilterRegistry::RegisterFilter(
+ y_absl::make_unique<grpc::testing::NoOpHttpFilter>(
+ "grpc.testing.server_only_http_filter", false, true),
+ {"grpc.testing.server_only_http_filter"});
const auto result = RUN_ALL_TESTS();
+ grpc_shutdown();
return result;
}
diff --git a/contrib/libs/grpc/test/cpp/util/byte_buffer_proto_helper.cc b/contrib/libs/grpc/test/cpp/util/byte_buffer_proto_helper.cc
index 5971b530750..4ddbf701ba6 100644
--- a/contrib/libs/grpc/test/cpp/util/byte_buffer_proto_helper.cc
+++ b/contrib/libs/grpc/test/cpp/util/byte_buffer_proto_helper.cc
@@ -18,6 +18,8 @@
#include "test/cpp/util/byte_buffer_proto_helper.h"
+#include "y_absl/memory/memory.h"
+
namespace grpc {
namespace testing {
@@ -37,7 +39,7 @@ std::unique_ptr<ByteBuffer> SerializeToByteBuffer(
TString buf;
message->SerializeToString(&buf);
Slice slice(buf);
- return std::unique_ptr<ByteBuffer>(new ByteBuffer(&slice, 1));
+ return y_absl::make_unique<ByteBuffer>(&slice, 1);
}
bool SerializeToByteBufferInPlace(grpc::protobuf::Message* message,
diff --git a/contrib/libs/grpc/test/cpp/util/channelz_sampler.cc b/contrib/libs/grpc/test/cpp/util/channelz_sampler.cc
index e6bde685562..3761fe73fc8 100644
--- a/contrib/libs/grpc/test/cpp/util/channelz_sampler.cc
+++ b/contrib/libs/grpc/test/cpp/util/channelz_sampler.cc
@@ -25,9 +25,9 @@
#include <queue>
#include <util/generic/string.h>
+#include "y_absl/flags/flag.h"
#include "y_absl/strings/str_format.h"
#include "y_absl/strings/str_join.h"
-#include "gflags/gflags.h"
#include "google/protobuf/text_format.h"
#include "grpc/grpc.h"
#include "grpc/support/port_platform.h"
@@ -48,11 +48,13 @@
#include "test/cpp/util/test_config.h"
#include "test/cpp/util/test_credentials_provider.h"
-DEFINE_string(server_address, "", "channelz server address");
-DEFINE_string(custom_credentials_type, "", "custom credentials type");
-DEFINE_int64(sampling_times, 1, "number of sampling");
-DEFINE_int64(sampling_interval_seconds, 0, "sampling interval in seconds");
-DEFINE_string(output_json, "", "output filename in json format");
+Y_ABSL_FLAG(TString, server_address, "", "channelz server address");
+Y_ABSL_FLAG(TString, custom_credentials_type, "", "custom credentials type");
+Y_ABSL_FLAG(int64_t, sampling_times, 1, "number of sampling");
+// TODO(Capstan): Consider using y_absl::Duration
+Y_ABSL_FLAG(int64_t, sampling_interval_seconds, 0,
+ "sampling interval in seconds");
+Y_ABSL_FLAG(TString, output_json, "", "output filename in json format");
namespace {
using grpc::ClientContext;
@@ -60,10 +62,6 @@ using grpc::Status;
using grpc::StatusCode;
using grpc::channelz::v1::GetChannelRequest;
using grpc::channelz::v1::GetChannelResponse;
-using grpc::channelz::v1::GetServerRequest;
-using grpc::channelz::v1::GetServerResponse;
-using grpc::channelz::v1::GetServerSocketsRequest;
-using grpc::channelz::v1::GetServerSocketsResponse;
using grpc::channelz::v1::GetServersRequest;
using grpc::channelz::v1::GetServersResponse;
using grpc::channelz::v1::GetSocketRequest;
@@ -511,7 +509,8 @@ class ChannelzSampler final {
TString start, finish;
gpr_timespec ago = gpr_time_sub(
now_,
- gpr_time_from_seconds(FLAGS_sampling_interval_seconds, GPR_TIMESPAN));
+ gpr_time_from_seconds(y_absl::GetFlag(FLAGS_sampling_interval_seconds),
+ GPR_TIMESPAN));
std::stringstream ss;
const time_t time_now = now_.tv_sec;
ss << std::put_time(std::localtime(&time_now), "%F %T");
@@ -562,15 +561,18 @@ class ChannelzSampler final {
int main(int argc, char** argv) {
grpc::testing::TestEnvironment env(argc, argv);
grpc::testing::InitTest(&argc, &argv, true);
- std::ofstream output_file(FLAGS_output_json);
- for (int i = 0; i < FLAGS_sampling_times; ++i) {
+ std::ofstream output_file(y_absl::GetFlag(FLAGS_output_json));
+ for (int i = 0; i < y_absl::GetFlag(FLAGS_sampling_times); ++i) {
ChannelzSampler channelz_sampler;
- channelz_sampler.Setup(FLAGS_custom_credentials_type, FLAGS_server_address);
+ channelz_sampler.Setup(y_absl::GetFlag(FLAGS_custom_credentials_type),
+ y_absl::GetFlag(FLAGS_server_address));
std::cout << "Wait for sampling interval "
- << FLAGS_sampling_interval_seconds << "s..." << std::endl;
+ << y_absl::GetFlag(FLAGS_sampling_interval_seconds) << "s..."
+ << std::endl;
const gpr_timespec kDelay = gpr_time_add(
gpr_now(GPR_CLOCK_MONOTONIC),
- gpr_time_from_seconds(FLAGS_sampling_interval_seconds, GPR_TIMESPAN));
+ gpr_time_from_seconds(y_absl::GetFlag(FLAGS_sampling_interval_seconds),
+ GPR_TIMESPAN));
gpr_sleep_until(kDelay);
std::cout << "##### " << i << "th sampling #####" << std::endl;
channelz_sampler.RecordNow();
@@ -579,7 +581,7 @@ int main(int argc, char** argv) {
channelz_sampler.GetTopChannelsRPC();
channelz_sampler.TraverseTopChannels();
channelz_sampler.DumpStdout();
- if (!FLAGS_output_json.empty()) {
+ if (!y_absl::GetFlag(FLAGS_output_json).empty()) {
output_file << channelz_sampler.DumpJson() << "\n" << std::flush;
}
}
diff --git a/contrib/libs/grpc/test/cpp/util/channelz_sampler_test.cc b/contrib/libs/grpc/test/cpp/util/channelz_sampler_test.cc
index d81dbb0d05d..1aa3adb3e1b 100644
--- a/contrib/libs/grpc/test/cpp/util/channelz_sampler_test.cc
+++ b/contrib/libs/grpc/test/cpp/util/channelz_sampler_test.cc
@@ -64,9 +64,9 @@ TString output_json("output.json");
// Creata an echo server
class EchoServerImpl final : public grpc::testing::TestService::Service {
- Status EmptyCall(::grpc::ServerContext* context,
- const grpc::testing::Empty* request,
- grpc::testing::Empty* response) {
+ Status EmptyCall(::grpc::ServerContext* /*context*/,
+ const grpc::testing::Empty* /*request*/,
+ grpc::testing::Empty* /*response*/) override {
return Status::OK;
}
};
@@ -155,8 +155,8 @@ TEST(ChannelzSamplerTest, SimpleTest) {
GPR_ASSERT(0);
}
delete test_driver;
- gpr_event_set(&done_ev1, (void*)1);
- gpr_event_set(&done_ev2, (void*)1);
+ gpr_event_set(&done_ev1, reinterpret_cast<void*>(1));
+ gpr_event_set(&done_ev2, reinterpret_cast<void*>(1));
client_thread_1.join();
client_thread_2.join();
}
diff --git a/contrib/libs/grpc/test/cpp/util/cli_call.cc b/contrib/libs/grpc/test/cpp/util/cli_call.cc
index 5b3631667f8..ec3d2e9851c 100644
--- a/contrib/libs/grpc/test/cpp/util/cli_call.cc
+++ b/contrib/libs/grpc/test/cpp/util/cli_call.cc
@@ -32,7 +32,7 @@
namespace grpc {
namespace testing {
namespace {
-void* tag(int i) { return (void*)static_cast<intptr_t>(i); }
+void* tag(intptr_t t) { return reinterpret_cast<void*>(t); }
} // namespace
Status CliCall::Call(const std::shared_ptr<grpc::Channel>& channel,
diff --git a/contrib/libs/grpc/test/cpp/util/cli_credentials.cc b/contrib/libs/grpc/test/cpp/util/cli_credentials.cc
index efd548eb9b3..74c82bbe30c 100644
--- a/contrib/libs/grpc/test/cpp/util/cli_credentials.cc
+++ b/contrib/libs/grpc/test/cpp/util/cli_credentials.cc
@@ -18,45 +18,40 @@
#include "test/cpp/util/cli_credentials.h"
-#include <gflags/gflags.h>
#include <grpc/slice.h>
#include <grpc/support/log.h>
#include <grpcpp/impl/codegen/slice.h>
+#include "y_absl/flags/flag.h"
#include "src/core/lib/iomgr/load_file.h"
-DEFINE_bool(
- enable_ssl, false,
- "Whether to use ssl/tls. Deprecated. Use --channel_creds_type=ssl.");
-DEFINE_bool(use_auth, false,
- "Whether to create default google credentials. Deprecated. Use "
- "--channel_creds_type=gdc.");
-DEFINE_string(
- access_token, "",
- "The access token that will be sent to the server to authenticate RPCs. "
- "Deprecated. Use --call_creds=access_token=<token>.");
-DEFINE_string(
- ssl_target, "",
+Y_ABSL_RETIRED_FLAG(bool, enable_ssl, false,
+ "Replaced by --channel_creds_type=ssl.");
+Y_ABSL_RETIRED_FLAG(bool, use_auth, false,
+ "Replaced by --channel_creds_type=gdc.");
+Y_ABSL_RETIRED_FLAG(TString, access_token, "",
+ "Replaced by --call_creds=access_token=<token>.");
+Y_ABSL_FLAG(
+ TString, ssl_target, "",
"If not empty, treat the server host name as this for ssl/tls certificate "
"validation.");
-DEFINE_string(
- ssl_client_cert, "",
+Y_ABSL_FLAG(
+ TString, ssl_client_cert, "",
"If not empty, load this PEM formatted client certificate file. Requires "
"use of --ssl_client_key.");
-DEFINE_string(
- ssl_client_key, "",
- "If not empty, load this PEM formatted private key. Requires use of "
- "--ssl_client_cert");
-DEFINE_string(
- local_connect_type, "local_tcp",
+Y_ABSL_FLAG(TString, ssl_client_key, "",
+ "If not empty, load this PEM formatted private key. Requires use of "
+ "--ssl_client_cert");
+Y_ABSL_FLAG(
+ TString, local_connect_type, "local_tcp",
"The type of local connections for which local channel credentials will "
"be applied. Should be local_tcp or uds.");
-DEFINE_string(
- channel_creds_type, "",
+Y_ABSL_FLAG(
+ TString, channel_creds_type, "",
"The channel creds type: insecure, ssl, gdc (Google Default Credentials), "
"alts, or local.");
-DEFINE_string(
- call_creds, "",
+Y_ABSL_FLAG(
+ TString, call_creds, "",
"Call credentials to use: none (default), or access_token=<token>. If "
"provided, the call creds are composited on top of channel creds.");
@@ -84,128 +79,86 @@ TString AccessToken(const TString& auth) {
} // namespace
TString CliCredentials::GetDefaultChannelCredsType() const {
- // Compatibility logic for --enable_ssl.
- if (FLAGS_enable_ssl) {
- fprintf(stderr,
- "warning: --enable_ssl is deprecated. Use "
- "--channel_creds_type=ssl.\n");
- return "ssl";
- }
- // Compatibility logic for --use_auth.
- if (FLAGS_access_token.empty() && FLAGS_use_auth) {
- fprintf(stderr,
- "warning: --use_auth is deprecated. Use "
- "--channel_creds_type=gdc.\n");
- return "gdc";
- }
return "insecure";
}
-TString CliCredentials::GetDefaultCallCreds() const {
- if (!FLAGS_access_token.empty()) {
- fprintf(stderr,
- "warning: --access_token is deprecated. Use "
- "--call_creds=access_token=<token>.\n");
- return TString("access_token=") + FLAGS_access_token;
- }
- return "none";
-}
+TString CliCredentials::GetDefaultCallCreds() const { return "none"; }
std::shared_ptr<grpc::ChannelCredentials>
CliCredentials::GetChannelCredentials() const {
- if (FLAGS_channel_creds_type.compare("insecure") == 0) {
+ if (y_absl::GetFlag(FLAGS_channel_creds_type) == "insecure") {
return grpc::InsecureChannelCredentials();
- } else if (FLAGS_channel_creds_type.compare("ssl") == 0) {
+ } else if (y_absl::GetFlag(FLAGS_channel_creds_type) == "ssl") {
grpc::SslCredentialsOptions ssl_creds_options;
// TODO(@Capstan): This won't affect Google Default Credentials using SSL.
- if (!FLAGS_ssl_client_cert.empty()) {
+ if (!y_absl::GetFlag(FLAGS_ssl_client_cert).empty()) {
grpc_slice cert_slice = grpc_empty_slice();
GRPC_LOG_IF_ERROR(
"load_file",
- grpc_load_file(FLAGS_ssl_client_cert.c_str(), 1, &cert_slice));
+ grpc_load_file(y_absl::GetFlag(FLAGS_ssl_client_cert).c_str(), 1,
+ &cert_slice));
ssl_creds_options.pem_cert_chain =
grpc::StringFromCopiedSlice(cert_slice);
grpc_slice_unref(cert_slice);
}
- if (!FLAGS_ssl_client_key.empty()) {
+ if (!y_absl::GetFlag(FLAGS_ssl_client_key).empty()) {
grpc_slice key_slice = grpc_empty_slice();
GRPC_LOG_IF_ERROR(
"load_file",
- grpc_load_file(FLAGS_ssl_client_key.c_str(), 1, &key_slice));
+ grpc_load_file(y_absl::GetFlag(FLAGS_ssl_client_key).c_str(), 1,
+ &key_slice));
ssl_creds_options.pem_private_key =
grpc::StringFromCopiedSlice(key_slice);
grpc_slice_unref(key_slice);
}
return grpc::SslCredentials(ssl_creds_options);
- } else if (FLAGS_channel_creds_type.compare("gdc") == 0) {
+ } else if (y_absl::GetFlag(FLAGS_channel_creds_type) == "gdc") {
return grpc::GoogleDefaultCredentials();
- } else if (FLAGS_channel_creds_type.compare("alts") == 0) {
+ } else if (y_absl::GetFlag(FLAGS_channel_creds_type) == "alts") {
return grpc::experimental::AltsCredentials(
grpc::experimental::AltsCredentialsOptions());
- } else if (FLAGS_channel_creds_type.compare("local") == 0) {
- if (FLAGS_local_connect_type.compare("local_tcp") == 0) {
+ } else if (y_absl::GetFlag(FLAGS_channel_creds_type) == "local") {
+ if (y_absl::GetFlag(FLAGS_local_connect_type) == "local_tcp") {
return grpc::experimental::LocalCredentials(LOCAL_TCP);
- } else if (FLAGS_local_connect_type.compare("uds") == 0) {
+ } else if (y_absl::GetFlag(FLAGS_local_connect_type) == "uds") {
return grpc::experimental::LocalCredentials(UDS);
} else {
fprintf(stderr,
"--local_connect_type=%s invalid; must be local_tcp or uds.\n",
- FLAGS_local_connect_type.c_str());
+ y_absl::GetFlag(FLAGS_local_connect_type).c_str());
}
}
fprintf(stderr,
"--channel_creds_type=%s invalid; must be insecure, ssl, gdc, "
"alts, or local.\n",
- FLAGS_channel_creds_type.c_str());
+ y_absl::GetFlag(FLAGS_channel_creds_type).c_str());
return std::shared_ptr<grpc::ChannelCredentials>();
}
std::shared_ptr<grpc::CallCredentials> CliCredentials::GetCallCredentials()
const {
- if (IsAccessToken(FLAGS_call_creds.c_str())) {
- return grpc::AccessTokenCredentials(AccessToken(FLAGS_call_creds.c_str()));
+ if (IsAccessToken(y_absl::GetFlag(FLAGS_call_creds))) {
+ return grpc::AccessTokenCredentials(
+ AccessToken(y_absl::GetFlag(FLAGS_call_creds)));
}
- if (FLAGS_call_creds.compare("none") == 0) {
+ if (y_absl::GetFlag(FLAGS_call_creds) == "none") {
// Nothing to do; creds, if any, are baked into the channel.
return std::shared_ptr<grpc::CallCredentials>();
}
fprintf(stderr,
"--call_creds=%s invalid; must be none "
"or access_token=<token>.\n",
- FLAGS_call_creds.c_str());
+ y_absl::GetFlag(FLAGS_call_creds).c_str());
return std::shared_ptr<grpc::CallCredentials>();
}
std::shared_ptr<grpc::ChannelCredentials> CliCredentials::GetCredentials()
const {
- if (FLAGS_call_creds.empty()) {
- FLAGS_call_creds = GetDefaultCallCreds();
- } else if (!FLAGS_access_token.empty() && !IsAccessToken(FLAGS_call_creds.c_str())) {
- fprintf(stderr,
- "warning: ignoring --access_token because --call_creds "
- "already set to %s.\n",
- FLAGS_call_creds.c_str());
- }
- if (FLAGS_channel_creds_type.empty()) {
- FLAGS_channel_creds_type = GetDefaultChannelCredsType();
- } else if (FLAGS_enable_ssl && FLAGS_channel_creds_type.compare("ssl") != 0) {
- fprintf(stderr,
- "warning: ignoring --enable_ssl because "
- "--channel_creds_type already set to %s.\n",
- FLAGS_channel_creds_type.c_str());
- } else if (FLAGS_use_auth && FLAGS_channel_creds_type.compare("gdc") != 0) {
- fprintf(stderr,
- "warning: ignoring --use_auth because "
- "--channel_creds_type already set to %s.\n",
- FLAGS_channel_creds_type.c_str());
+ if (y_absl::GetFlag(FLAGS_call_creds).empty()) {
+ y_absl::SetFlag(&FLAGS_call_creds, GetDefaultCallCreds());
}
- // Legacy transport upgrade logic for insecure requests.
- if (IsAccessToken(FLAGS_call_creds.c_str()) &&
- FLAGS_channel_creds_type.compare("insecure") == 0) {
- fprintf(stderr,
- "warning: --channel_creds_type=insecure upgraded to ssl because "
- "an access token was provided.\n");
- FLAGS_channel_creds_type = "ssl";
+ if (y_absl::GetFlag(FLAGS_channel_creds_type).empty()) {
+ y_absl::SetFlag(&FLAGS_channel_creds_type, GetDefaultChannelCredsType());
}
std::shared_ptr<grpc::ChannelCredentials> channel_creds =
GetChannelCredentials();
@@ -216,16 +169,8 @@ std::shared_ptr<grpc::ChannelCredentials> CliCredentials::GetCredentials()
: grpc::CompositeChannelCredentials(channel_creds, call_creds);
}
-const TString CliCredentials::GetCredentialUsage() const {
- return " --enable_ssl ; Set whether to use ssl "
- "(deprecated)\n"
- " --use_auth ; Set whether to create default google"
- " credentials\n"
- " ; (deprecated)\n"
- " --access_token ; Set the access token in metadata,"
- " overrides --use_auth\n"
- " ; (deprecated)\n"
- " --ssl_target ; Set server host for ssl validation\n"
+TString CliCredentials::GetCredentialUsage() const {
+ return " --ssl_target ; Set server host for ssl validation\n"
" --ssl_client_cert ; Client cert for ssl\n"
" --ssl_client_key ; Client private key for ssl\n"
" --local_connect_type ; Set to local_tcp or uds\n"
@@ -235,10 +180,10 @@ const TString CliCredentials::GetCredentialUsage() const {
" access_token=<token>\n";
}
-const TString CliCredentials::GetSslTargetNameOverride() const {
- bool use_ssl = FLAGS_channel_creds_type.compare("ssl") == 0 ||
- FLAGS_channel_creds_type.compare("gdc") == 0;
- return use_ssl ? FLAGS_ssl_target : "";
+TString CliCredentials::GetSslTargetNameOverride() const {
+ bool use_ssl = y_absl::GetFlag(FLAGS_channel_creds_type) == "ssl" ||
+ y_absl::GetFlag(FLAGS_channel_creds_type) == "gdc";
+ return use_ssl ? y_absl::GetFlag(FLAGS_ssl_target) : "";
}
} // namespace testing
diff --git a/contrib/libs/grpc/test/cpp/util/cli_credentials.h b/contrib/libs/grpc/test/cpp/util/cli_credentials.h
index 3e695692fa6..a60d5c2c10d 100644
--- a/contrib/libs/grpc/test/cpp/util/cli_credentials.h
+++ b/contrib/libs/grpc/test/cpp/util/cli_credentials.h
@@ -29,8 +29,8 @@ class CliCredentials {
public:
virtual ~CliCredentials() {}
std::shared_ptr<grpc::ChannelCredentials> GetCredentials() const;
- virtual const TString GetCredentialUsage() const;
- virtual const TString GetSslTargetNameOverride() const;
+ virtual TString GetCredentialUsage() const;
+ virtual TString GetSslTargetNameOverride() const;
protected:
// Returns the appropriate channel_creds_type value for the set of legacy
diff --git a/contrib/libs/grpc/test/cpp/util/create_test_channel.cc b/contrib/libs/grpc/test/cpp/util/create_test_channel.cc
index 86d8e22af1d..ee9ec27f749 100644
--- a/contrib/libs/grpc/test/cpp/util/create_test_channel.cc
+++ b/contrib/libs/grpc/test/cpp/util/create_test_channel.cc
@@ -18,20 +18,18 @@
#include "test/cpp/util/create_test_channel.h"
-#include <gflags/gflags.h>
-
#include <grpc/support/log.h>
#include <grpcpp/create_channel.h>
#include <grpcpp/security/credentials.h>
+#include "y_absl/flags/flag.h"
#include "test/cpp/util/test_credentials_provider.h"
-DEFINE_string(
- grpc_test_use_grpclb_with_child_policy, "",
- "If non-empty, set a static service config on channels created by "
- "grpc::CreateTestChannel, that configures the grpclb LB policy "
- "with a child policy being the value of this flag (e.g. round_robin "
- "or pick_first).");
+Y_ABSL_FLAG(TString, grpc_test_use_grpclb_with_child_policy, "",
+ "If non-empty, set a static service config on channels created by "
+ "grpc::CreateTestChannel, that configures the grpclb LB policy "
+ "with a child policy being the value of this flag (e.g. round_robin "
+ "or pick_first).");
namespace grpc {
@@ -59,12 +57,13 @@ void AddProdSslType() {
}
void MaybeSetCustomChannelArgs(grpc::ChannelArguments* args) {
- if (FLAGS_grpc_test_use_grpclb_with_child_policy.size() > 0) {
- args->SetString("grpc.service_config",
- "{\"loadBalancingConfig\":[{\"grpclb\":{\"childPolicy\":[{"
- "\"" +
- FLAGS_grpc_test_use_grpclb_with_child_policy +
- "\":{}}]}}]}");
+ if (!y_absl::GetFlag(FLAGS_grpc_test_use_grpclb_with_child_policy).empty()) {
+ args->SetString(
+ "grpc.service_config",
+ "{\"loadBalancingConfig\":[{\"grpclb\":{\"childPolicy\":[{"
+ "\"" +
+ y_absl::GetFlag(FLAGS_grpc_test_use_grpclb_with_child_policy) +
+ "\":{}}]}}]}");
}
}
diff --git a/contrib/libs/grpc/test/cpp/util/grpc_cli.cc b/contrib/libs/grpc/test/cpp/util/grpc_cli.cc
index 45c6b94f84b..ded3b92cbeb 100644
--- a/contrib/libs/grpc/test/cpp/util/grpc_cli.cc
+++ b/contrib/libs/grpc/test/cpp/util/grpc_cli.cc
@@ -22,7 +22,8 @@
Example of talking to grpc interop server:
grpc_cli call localhost:50051 UnaryCall "response_size:10" \
- --protofiles=src/proto/grpc/testing/test.proto --enable_ssl=false
+ --protofiles=src/proto/grpc/testing/test.proto \
+ --channel_creds_type=insecure
Options:
1. --protofiles, use this flag to provide proto files if the server does
@@ -33,7 +34,8 @@
provided.
3. --metadata specifies metadata to be sent to the server, such as:
--metadata="MyHeaderKey1:Value1:MyHeaderKey2:Value2"
- 4. --enable_ssl, whether to use tls.
+ 4. --channel_creds_type, whether to use tls, insecure or platform-specific
+ options.
5. --use_auth, if set to true, attach a GoogleDefaultCredentials to the call
6. --infile, input filename (defaults to stdin)
7. --outfile, output filename (defaults to stdout)
@@ -58,17 +60,18 @@
address of the connection that each RPC is made on to stderr.
*/
+#include <grpcpp/support/config.h>
+
#include <fstream>
#include <functional>
#include <iostream>
-#include <gflags/gflags.h>
-#include <grpcpp/support/config.h>
+#include "y_absl/flags/flag.h"
#include "test/cpp/util/cli_credentials.h"
#include "test/cpp/util/grpc_tool.h"
#include "test/cpp/util/test_config.h"
-DEFINE_string(outfile, "", "Output file (default is stdout)");
+Y_ABSL_FLAG(TString, outfile, "", "Output file (default is stdout)");
static bool SimplePrint(const TString& outfile, const TString& output) {
if (outfile.empty()) {
@@ -85,6 +88,7 @@ int main(int argc, char** argv) {
grpc::testing::InitTest(&argc, &argv, true);
return grpc::testing::GrpcToolMainLib(
- argc, (const char**)argv, grpc::testing::CliCredentials(),
- std::bind(SimplePrint, TString(FLAGS_outfile.c_str()), std::placeholders::_1));
+ argc, const_cast<const char**>(argv), grpc::testing::CliCredentials(),
+ std::bind(SimplePrint, y_absl::GetFlag(FLAGS_outfile),
+ std::placeholders::_1));
}
diff --git a/contrib/libs/grpc/test/cpp/util/grpc_tool.cc b/contrib/libs/grpc/test/cpp/util/grpc_tool.cc
index 30f3024e25b..5cdae6b3eca 100644
--- a/contrib/libs/grpc/test/cpp/util/grpc_tool.cc
+++ b/contrib/libs/grpc/test/cpp/util/grpc_tool.cc
@@ -18,7 +18,6 @@
#include "test/cpp/util/grpc_tool.h"
-#include <gflags/gflags.h>
#include <grpc/grpc.h>
#include <grpc/support/port_platform.h>
#include <grpcpp/channel.h>
@@ -35,6 +34,8 @@
#include <util/generic/string.h>
#include <thread>
+#include "y_absl/flags/flag.h"
+#include "y_absl/memory/memory.h"
#include "test/cpp/util/cli_call.h"
#include "test/cpp/util/proto_file_parser.h"
#include "test/cpp/util/proto_reflection_descriptor_database.h"
@@ -46,38 +47,39 @@
#include <unistd.h>
#endif
+Y_ABSL_FLAG(bool, l, false, "Use a long listing format");
+Y_ABSL_FLAG(bool, remotedb, true,
+ "Use server types to parse and format messages");
+Y_ABSL_FLAG(TString, metadata, "",
+ "Metadata to send to server, in the form of key1:val1:key2:val2");
+Y_ABSL_FLAG(TString, proto_path, ".",
+ "Path to look for the proto file. "
+ "Multiple paths can be separated by " GRPC_CLI_PATH_SEPARATOR);
+Y_ABSL_FLAG(TString, protofiles, "", "Name of the proto file.");
+Y_ABSL_FLAG(bool, binary_input, false, "Input in binary format");
+Y_ABSL_FLAG(bool, binary_output, false, "Output in binary format");
+Y_ABSL_FLAG(TString, default_service_config, "",
+ "Default service config to use on the channel, if non-empty. Note "
+ "that this will be ignored if the name resolver returns a service "
+ "config.");
+Y_ABSL_FLAG(bool, display_peer_address, false,
+ "Log the peer socket address of the connection that each RPC is made "
+ "on to stderr.");
+Y_ABSL_FLAG(bool, json_input, false, "Input in json format");
+Y_ABSL_FLAG(bool, json_output, false, "Output in json format");
+Y_ABSL_FLAG(TString, infile, "", "Input file (default is stdin)");
+Y_ABSL_FLAG(bool, batch, false,
+ "Input contains multiple requests. Please do not use this to send "
+ "more than a few RPCs. gRPC CLI has very different performance "
+ "characteristics compared with normal RPC calls which make it "
+ "unsuitable for loadtesting or significant production traffic.");
+// TODO(Capstan): Consider using y_absl::Duration
+Y_ABSL_FLAG(double, timeout, -1,
+ "Specify timeout in seconds, used to set the deadline for all "
+ "RPCs. The default value of -1 means no deadline has been set.");
+
namespace grpc {
namespace testing {
-
-DEFINE_bool(l, false, "Use a long listing format");
-DEFINE_bool(remotedb, true, "Use server types to parse and format messages");
-DEFINE_string(metadata, "",
- "Metadata to send to server, in the form of key1:val1:key2:val2");
-DEFINE_string(proto_path, ".", "Path to look for the proto file.");
-DEFINE_string(protofiles, "", "Name of the proto file.");
-DEFINE_bool(binary_input, false, "Input in binary format");
-DEFINE_bool(binary_output, false, "Output in binary format");
-DEFINE_string(
- default_service_config, "",
- "Default service config to use on the channel, if non-empty. Note "
- "that this will be ignored if the name resolver returns a service "
- "config.");
-DEFINE_bool(
- display_peer_address, false,
- "Log the peer socket address of the connection that each RPC is made "
- "on to stderr.");
-DEFINE_bool(json_input, false, "Input in json format");
-DEFINE_bool(json_output, false, "Output in json format");
-DEFINE_string(infile, "", "Input file (default is stdin)");
-DEFINE_bool(batch, false,
- "Input contains multiple requests. Please do not use this to send "
- "more than a few RPCs. gRPC CLI has very different performance "
- "characteristics compared with normal RPC calls which make it "
- "unsuitable for loadtesting or significant production traffic.");
-DEFINE_double(timeout, -1,
- "Specify timeout in seconds, used to set the deadline for all "
- "RPCs. The default value of -1 means no deadline has been set.");
-
namespace {
class GrpcTool {
@@ -86,26 +88,26 @@ class GrpcTool {
virtual ~GrpcTool() {}
bool Help(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
bool CallMethod(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
bool ListServices(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
bool PrintType(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
// TODO(zyc): implement the following methods
// bool ListServices(int argc, const char** argv, GrpcToolOutputCallback
// callback);
// bool PrintTypeId(int argc, const char** argv, GrpcToolOutputCallback
// callback);
bool ParseMessage(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
bool ToText(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
bool ToJson(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
bool ToBinary(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
void SetPrintCommandMode(int exit_status) {
print_command_usage_ = true;
@@ -136,7 +138,7 @@ size_t ArraySize(T& a) {
void ParseMetadataFlag(
std::multimap<TString, TString>* client_metadata) {
- if (FLAGS_metadata.empty()) {
+ if (y_absl::GetFlag(FLAGS_metadata).empty()) {
return;
}
std::vector<TString> fields;
@@ -144,11 +146,11 @@ void ParseMetadataFlag(
const char escape = '\\';
size_t cur = -1;
std::stringstream ss;
- while (++cur < FLAGS_metadata.length()) {
- switch (FLAGS_metadata.at(cur)) {
+ while (++cur < y_absl::GetFlag(FLAGS_metadata).length()) {
+ switch (y_absl::GetFlag(FLAGS_metadata).at(cur)) {
case escape:
- if (cur < FLAGS_metadata.length() - 1) {
- char c = FLAGS_metadata.at(++cur);
+ if (cur < y_absl::GetFlag(FLAGS_metadata).length() - 1) {
+ char c = y_absl::GetFlag(FLAGS_metadata).at(++cur);
if (c == delim || c == escape) {
ss << c;
continue;
@@ -162,7 +164,7 @@ void ParseMetadataFlag(
ss.clear();
break;
default:
- ss << FLAGS_metadata.at(cur);
+ ss << y_absl::GetFlag(FLAGS_metadata).at(cur);
}
}
fields.push_back(ss.str());
@@ -193,8 +195,8 @@ void PrintMetadata(const T& m, const TString& message) {
}
void ReadResponse(CliCall* call, const TString& method_name,
- GrpcToolOutputCallback callback, ProtoFileParser* parser,
- gpr_mu* parser_mu, bool print_mode) {
+ const GrpcToolOutputCallback& callback,
+ ProtoFileParser* parser, gpr_mu* parser_mu, bool print_mode) {
TString serialized_response_proto;
std::multimap<grpc::string_ref, grpc::string_ref> server_initial_metadata;
@@ -203,11 +205,11 @@ void ReadResponse(CliCall* call, const TString& method_name,
receive_initial_metadata ? &server_initial_metadata : nullptr);
receive_initial_metadata = false) {
fprintf(stderr, "got response.\n");
- if (!FLAGS_binary_output) {
+ if (!y_absl::GetFlag(FLAGS_binary_output)) {
gpr_mu_lock(parser_mu);
serialized_response_proto = parser->GetFormattedStringFromMethod(
method_name, serialized_response_proto, false /* is_request */,
- FLAGS_json_output);
+ y_absl::GetFlag(FLAGS_json_output));
if (parser->HasError() && print_mode) {
fprintf(stderr, "Failed to parse response.\n");
}
@@ -229,10 +231,13 @@ std::shared_ptr<grpc::Channel> CreateCliChannel(
if (!cred.GetSslTargetNameOverride().empty()) {
args.SetSslTargetNameOverride(cred.GetSslTargetNameOverride());
}
- if (!FLAGS_default_service_config.empty()) {
+ if (!y_absl::GetFlag(FLAGS_default_service_config).empty()) {
args.SetString(GRPC_ARG_SERVICE_CONFIG,
- FLAGS_default_service_config.c_str());
+ y_absl::GetFlag(FLAGS_default_service_config).c_str());
}
+ // See |GRPC_ARG_MAX_METADATA_SIZE| in |grpc_types.h|.
+ // Set to large enough size (10M) that should work for most use cases.
+ args.SetInt(GRPC_ARG_MAX_METADATA_SIZE, 10 * 1024 * 1024);
return ::grpc::CreateCustomChannel(server_address, cred.GetCredentials(),
args);
}
@@ -277,7 +282,7 @@ void Usage(const TString& msg) {
}
const Command* FindCommand(const TString& name) {
- for (int i = 0; i < (int)ArraySize(ops); i++) {
+ for (int i = 0; i < static_cast<int>(ArraySize(ops)); i++) {
if (name == ops[i].command) {
return &ops[i];
}
@@ -287,7 +292,7 @@ const Command* FindCommand(const TString& name) {
} // namespace
int GrpcToolMainLib(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
if (argc < 2) {
Usage("No command specified");
}
@@ -324,7 +329,7 @@ void GrpcTool::CommandUsage(const TString& usage) const {
}
bool GrpcTool::Help(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Print help\n"
" grpc_cli help [subcommand]\n");
@@ -344,7 +349,7 @@ bool GrpcTool::Help(int argc, const char** argv, const CliCredentials& cred,
bool GrpcTool::ListServices(int argc, const char** argv,
const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"List services\n"
" grpc_cli ls <address> [<service>[/<method>]]\n"
@@ -372,7 +377,7 @@ bool GrpcTool::ListServices(int argc, const char** argv,
if (argc < 2) {
// List all services, if --l is passed, then include full description,
// otherwise include a summarized list only.
- if (FLAGS_l) {
+ if (y_absl::GetFlag(FLAGS_l)) {
output = DescribeServiceList(service_list, desc_pool);
} else {
for (auto it = service_list.begin(); it != service_list.end(); it++) {
@@ -409,14 +414,16 @@ bool GrpcTool::ListServices(int argc, const char** argv,
desc_pool.FindServiceByName(google::protobuf::string(service_name));
if (service != nullptr) {
if (method_name.empty()) {
- output = FLAGS_l ? DescribeService(service) : SummarizeService(service);
+ output = y_absl::GetFlag(FLAGS_l) ? DescribeService(service)
+ : SummarizeService(service);
} else {
method_name.insert(0, ".");
method_name.insert(0, service_name);
const grpc::protobuf::MethodDescriptor* method =
- desc_pool.FindMethodByName(google::protobuf::string(method_name));
+ desc_pool.FindMethodByName(google::protobuf::string(method_name));
if (method != nullptr) {
- output = FLAGS_l ? DescribeMethod(method) : SummarizeMethod(method);
+ output = y_absl::GetFlag(FLAGS_l) ? DescribeMethod(method)
+ : SummarizeMethod(method);
} else {
fprintf(stderr, "Method %s not found in service %s.\n",
method_name.c_str(), service_name.c_str());
@@ -431,7 +438,8 @@ bool GrpcTool::ListServices(int argc, const char** argv,
const grpc::protobuf::MethodDescriptor* method =
desc_pool.FindMethodByName(google::protobuf::string(service_name));
if (method != nullptr) {
- output = FLAGS_l ? DescribeMethod(method) : SummarizeMethod(method);
+ output = y_absl::GetFlag(FLAGS_l) ? DescribeMethod(method)
+ : SummarizeMethod(method);
} else {
fprintf(stderr, "Service or method %s not found.\n",
service_name.c_str());
@@ -445,7 +453,7 @@ bool GrpcTool::ListServices(int argc, const char** argv,
bool GrpcTool::PrintType(int /*argc*/, const char** argv,
const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Print type\n"
" grpc_cli type <address> <type>\n"
@@ -473,7 +481,7 @@ bool GrpcTool::PrintType(int /*argc*/, const char** argv,
bool GrpcTool::CallMethod(int argc, const char** argv,
const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Call method\n"
" grpc_cli call <address> <service>[.<method>] <request>\n"
@@ -483,8 +491,9 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
" <request> ; Text protobuffer (overrides infile)\n"
" --protofiles ; Comma separated proto files used as a"
" fallback when parsing request/response\n"
- " --proto_path ; The search path of proto files, valid"
- " only when --protofiles is given\n"
+ " --proto_path ; The search paths of proto files"
+ " (" GRPC_CLI_PATH_SEPARATOR
+ " separated), valid only when --protofiles is given\n"
" --noremotedb ; Don't attempt to use reflection service"
" at all\n"
" --metadata ; The metadata to be sent to the server\n"
@@ -507,16 +516,17 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
std::unique_ptr<ProtoFileParser> parser;
TString serialized_request_proto;
CliArgs cli_args;
- cli_args.timeout = FLAGS_timeout;
+ cli_args.timeout = y_absl::GetFlag(FLAGS_timeout);
bool print_mode = false;
std::shared_ptr<grpc::Channel> channel =
CreateCliChannel(server_address, cred);
- if (!FLAGS_binary_input || !FLAGS_binary_output) {
- parser.reset(
- new grpc::testing::ProtoFileParser(FLAGS_remotedb ? channel : nullptr,
- FLAGS_proto_path.c_str(), FLAGS_protofiles.c_str()));
+ if (!y_absl::GetFlag(FLAGS_binary_input) ||
+ !y_absl::GetFlag(FLAGS_binary_output)) {
+ parser = y_absl::make_unique<grpc::testing::ProtoFileParser>(
+ y_absl::GetFlag(FLAGS_remotedb) ? channel : nullptr,
+ y_absl::GetFlag(FLAGS_proto_path), y_absl::GetFlag(FLAGS_protofiles));
if (parser->HasError()) {
fprintf(
stderr,
@@ -525,7 +535,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
}
}
- if (FLAGS_binary_input) {
+ if (y_absl::GetFlag(FLAGS_binary_input)) {
formatted_method_name = method_name;
} else {
formatted_method_name = parser->GetFormattedMethodName(method_name);
@@ -543,7 +553,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
std::istream* input_stream;
std::ifstream input_file;
- if (FLAGS_batch) {
+ if (y_absl::GetFlag(FLAGS_batch)) {
fprintf(stderr, "Batch mode for streaming RPC is not supported.\n");
return false;
}
@@ -553,19 +563,20 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
PrintMetadata(client_metadata, "Sending client initial metadata:");
CliCall call(channel, formatted_method_name, client_metadata, cli_args);
- if (FLAGS_display_peer_address) {
+ if (y_absl::GetFlag(FLAGS_display_peer_address)) {
fprintf(stderr, "New call for method_name:%s has peer address:|%s|\n",
formatted_method_name.c_str(), call.peer().c_str());
}
- if (FLAGS_infile.empty()) {
+ if (y_absl::GetFlag(FLAGS_infile).empty()) {
if (isatty(fileno(stdin))) {
print_mode = true;
fprintf(stderr, "reading streaming request message from stdin...\n");
}
input_stream = &std::cin;
} else {
- input_file.open(FLAGS_infile, std::ios::in | std::ios::binary);
+ input_file.open(y_absl::GetFlag(FLAGS_infile),
+ std::ios::in | std::ios::binary);
input_stream = &input_file;
}
@@ -579,14 +590,14 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
while (!request_text.empty() ||
(!input_stream->eof() && getline(*input_stream, line))) {
if (!request_text.empty()) {
- if (FLAGS_binary_input) {
+ if (y_absl::GetFlag(FLAGS_binary_input)) {
serialized_request_proto = request_text;
request_text.clear();
} else {
gpr_mu_lock(&parser_mu);
serialized_request_proto = parser->GetSerializedProtoFromMethod(
method_name, request_text, true /* is_request */,
- FLAGS_json_input);
+ y_absl::GetFlag(FLAGS_json_input));
request_text.clear();
if (parser->HasError()) {
if (print_mode) {
@@ -635,7 +646,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
}
} else { // parser->IsStreaming(method_name, true /* is_request */)
- if (FLAGS_batch) {
+ if (y_absl::GetFlag(FLAGS_batch)) {
if (parser->IsStreaming(method_name, false /* is_request */)) {
fprintf(stderr, "Batch mode for streaming RPC is not supported.\n");
return false;
@@ -644,14 +655,15 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
std::istream* input_stream;
std::ifstream input_file;
- if (FLAGS_infile.empty()) {
+ if (y_absl::GetFlag(FLAGS_infile).empty()) {
if (isatty(fileno(stdin))) {
print_mode = true;
fprintf(stderr, "reading request messages from stdin...\n");
}
input_stream = &std::cin;
} else {
- input_file.open(FLAGS_infile, std::ios::in | std::ios::binary);
+ input_file.open(y_absl::GetFlag(FLAGS_infile),
+ std::ios::in | std::ios::binary);
input_stream = &input_file;
}
@@ -666,13 +678,13 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
while (!request_text.empty() ||
(!input_stream->eof() && getline(*input_stream, line))) {
if (!request_text.empty()) {
- if (FLAGS_binary_input) {
+ if (y_absl::GetFlag(FLAGS_binary_input)) {
serialized_request_proto = request_text;
request_text.clear();
} else {
serialized_request_proto = parser->GetSerializedProtoFromMethod(
method_name, request_text, true /* is_request */,
- FLAGS_json_input);
+ y_absl::GetFlag(FLAGS_json_input));
request_text.clear();
if (parser->HasError()) {
if (print_mode) {
@@ -687,7 +699,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
server_initial_metadata, server_trailing_metadata;
CliCall call(channel, formatted_method_name, client_metadata,
cli_args);
- if (FLAGS_display_peer_address) {
+ if (y_absl::GetFlag(FLAGS_display_peer_address)) {
fprintf(stderr,
"New call for method_name:%s has peer address:|%s|\n",
formatted_method_name.c_str(), call.peer().c_str());
@@ -709,14 +721,14 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
"Received trailing metadata from server:");
}
- if (FLAGS_binary_output) {
+ if (y_absl::GetFlag(FLAGS_binary_output)) {
if (!callback(serialized_response_proto)) {
break;
}
} else {
TString response_text = parser->GetFormattedStringFromMethod(
method_name, serialized_response_proto,
- false /* is_request */, FLAGS_json_output);
+ false /* is_request */, y_absl::GetFlag(FLAGS_json_output));
if (parser->HasError() && print_mode) {
fprintf(stderr, "Failed to parse response.\n");
@@ -752,29 +764,31 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
}
if (argc == 3) {
- if (!FLAGS_infile.empty()) {
+ if (!y_absl::GetFlag(FLAGS_infile).empty()) {
fprintf(stderr, "warning: request given in argv, ignoring --infile\n");
}
} else {
std::stringstream input_stream;
- if (FLAGS_infile.empty()) {
+ if (y_absl::GetFlag(FLAGS_infile).empty()) {
if (isatty(fileno(stdin))) {
fprintf(stderr, "reading request message from stdin...\n");
}
input_stream << std::cin.rdbuf();
} else {
- std::ifstream input_file(FLAGS_infile, std::ios::in | std::ios::binary);
+ std::ifstream input_file(y_absl::GetFlag(FLAGS_infile),
+ std::ios::in | std::ios::binary);
input_stream << input_file.rdbuf();
input_file.close();
}
request_text = input_stream.str();
}
- if (FLAGS_binary_input) {
+ if (y_absl::GetFlag(FLAGS_binary_input)) {
serialized_request_proto = request_text;
} else {
serialized_request_proto = parser->GetSerializedProtoFromMethod(
- method_name, request_text, true /* is_request */, FLAGS_json_input);
+ method_name, request_text, true /* is_request */,
+ y_absl::GetFlag(FLAGS_json_input));
if (parser->HasError()) {
fprintf(stderr, "Failed to parse request.\n");
return false;
@@ -790,7 +804,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
PrintMetadata(client_metadata, "Sending client initial metadata:");
CliCall call(channel, formatted_method_name, client_metadata, cli_args);
- if (FLAGS_display_peer_address) {
+ if (y_absl::GetFlag(FLAGS_display_peer_address)) {
fprintf(stderr, "New call for method_name:%s has peer address:|%s|\n",
formatted_method_name.c_str(), call.peer().c_str());
}
@@ -801,10 +815,10 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
&serialized_response_proto,
receive_initial_metadata ? &server_initial_metadata : nullptr);
receive_initial_metadata = false) {
- if (!FLAGS_binary_output) {
+ if (!y_absl::GetFlag(FLAGS_binary_output)) {
serialized_response_proto = parser->GetFormattedStringFromMethod(
method_name, serialized_response_proto, false /* is_request */,
- FLAGS_json_output);
+ y_absl::GetFlag(FLAGS_json_output));
if (parser->HasError()) {
fprintf(stderr, "Failed to parse response.\n");
return false;
@@ -836,7 +850,7 @@ bool GrpcTool::CallMethod(int argc, const char** argv,
bool GrpcTool::ParseMessage(int argc, const char** argv,
const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Parse message\n"
" grpc_cli parse <address> <type> [<message>]\n"
@@ -845,8 +859,9 @@ bool GrpcTool::ParseMessage(int argc, const char** argv,
" <message> ; Text protobuffer (overrides --infile)\n"
" --protofiles ; Comma separated proto files used as a"
" fallback when parsing request/response\n"
- " --proto_path ; The search path of proto files, valid"
- " only when --protofiles is given\n"
+ " --proto_path ; The search paths of proto files"
+ " (" GRPC_CLI_PATH_SEPARATOR
+ " separated), valid only when --protofiles is given\n"
" --noremotedb ; Don't attempt to use reflection service"
" at all\n"
" --infile ; Input filename (defaults to stdin)\n"
@@ -866,30 +881,32 @@ bool GrpcTool::ParseMessage(int argc, const char** argv,
if (argc == 3) {
message_text = argv[2];
- if (!FLAGS_infile.empty()) {
+ if (!y_absl::GetFlag(FLAGS_infile).empty()) {
fprintf(stderr, "warning: message given in argv, ignoring --infile.\n");
}
} else {
std::stringstream input_stream;
- if (FLAGS_infile.empty()) {
+ if (y_absl::GetFlag(FLAGS_infile).empty()) {
if (isatty(fileno(stdin))) {
fprintf(stderr, "reading request message from stdin...\n");
}
input_stream << std::cin.rdbuf();
} else {
- std::ifstream input_file(FLAGS_infile, std::ios::in | std::ios::binary);
+ std::ifstream input_file(y_absl::GetFlag(FLAGS_infile),
+ std::ios::in | std::ios::binary);
input_stream << input_file.rdbuf();
input_file.close();
}
message_text = input_stream.str();
}
- if (!FLAGS_binary_input || !FLAGS_binary_output) {
+ if (!y_absl::GetFlag(FLAGS_binary_input) ||
+ !y_absl::GetFlag(FLAGS_binary_output)) {
std::shared_ptr<grpc::Channel> channel =
CreateCliChannel(server_address, cred);
- parser.reset(
- new grpc::testing::ProtoFileParser(FLAGS_remotedb ? channel : nullptr,
- FLAGS_proto_path.c_str(), FLAGS_protofiles.c_str()));
+ parser = y_absl::make_unique<grpc::testing::ProtoFileParser>(
+ y_absl::GetFlag(FLAGS_remotedb) ? channel : nullptr,
+ y_absl::GetFlag(FLAGS_proto_path), y_absl::GetFlag(FLAGS_protofiles));
if (parser->HasError()) {
fprintf(
stderr,
@@ -898,23 +915,23 @@ bool GrpcTool::ParseMessage(int argc, const char** argv,
}
}
- if (FLAGS_binary_input) {
+ if (y_absl::GetFlag(FLAGS_binary_input)) {
serialized_request_proto = message_text;
} else {
serialized_request_proto = parser->GetSerializedProtoFromMessageType(
- type_name, message_text, FLAGS_json_input);
+ type_name, message_text, y_absl::GetFlag(FLAGS_json_input));
if (parser->HasError()) {
fprintf(stderr, "Failed to serialize the message.\n");
return false;
}
}
- if (FLAGS_binary_output) {
+ if (y_absl::GetFlag(FLAGS_binary_output)) {
output_ss << serialized_request_proto;
} else {
TString output_text;
output_text = parser->GetFormattedStringFromMessageType(
- type_name, serialized_request_proto, FLAGS_json_output);
+ type_name, serialized_request_proto, y_absl::GetFlag(FLAGS_json_output));
if (parser->HasError()) {
fprintf(stderr, "Failed to deserialize the message.\n");
return false;
@@ -927,57 +944,63 @@ bool GrpcTool::ParseMessage(int argc, const char** argv,
}
bool GrpcTool::ToText(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Convert binary message to text\n"
" grpc_cli totext <protofiles> <type>\n"
" <protofiles> ; Comma separated list of proto files\n"
" <type> ; Protocol buffer type name\n"
- " --proto_path ; The search path of proto files\n"
+ " --proto_path ; The search paths of proto files"
+ " (" GRPC_CLI_PATH_SEPARATOR
+ " separated)\n"
" --infile ; Input filename (defaults to stdin)\n"
" --outfile ; Output filename (defaults to stdout)\n");
- FLAGS_protofiles = argv[0];
- FLAGS_remotedb = false;
- FLAGS_binary_input = true;
- FLAGS_binary_output = false;
+ y_absl::SetFlag(&FLAGS_protofiles, argv[0]);
+ y_absl::SetFlag(&FLAGS_remotedb, false);
+ y_absl::SetFlag(&FLAGS_binary_input, true);
+ y_absl::SetFlag(&FLAGS_binary_output, false);
return ParseMessage(argc, argv, cred, callback);
}
bool GrpcTool::ToJson(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Convert binary message to json\n"
" grpc_cli tojson <protofiles> <type>\n"
" <protofiles> ; Comma separated list of proto files\n"
" <type> ; Protocol buffer type name\n"
- " --proto_path ; The search path of proto files\n"
+ " --proto_path ; The search paths of proto files"
+ " (" GRPC_CLI_PATH_SEPARATOR
+ " separated)\n"
" --infile ; Input filename (defaults to stdin)\n"
" --outfile ; Output filename (defaults to stdout)\n");
- FLAGS_protofiles = argv[0];
- FLAGS_remotedb = false;
- FLAGS_binary_input = true;
- FLAGS_binary_output = false;
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_protofiles, argv[0]);
+ y_absl::SetFlag(&FLAGS_remotedb, false);
+ y_absl::SetFlag(&FLAGS_binary_input, true);
+ y_absl::SetFlag(&FLAGS_binary_output, false);
+ y_absl::SetFlag(&FLAGS_json_output, true);
return ParseMessage(argc, argv, cred, callback);
}
bool GrpcTool::ToBinary(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback) {
+ const GrpcToolOutputCallback& callback) {
CommandUsage(
"Convert text message to binary\n"
" grpc_cli tobinary <protofiles> <type> [<message>]\n"
" <protofiles> ; Comma separated list of proto files\n"
" <type> ; Protocol buffer type name\n"
- " --proto_path ; The search path of proto files\n"
+ " --proto_path ; The search paths of proto files"
+ " (" GRPC_CLI_PATH_SEPARATOR
+ " separated)\n"
" --infile ; Input filename (defaults to stdin)\n"
" --outfile ; Output filename (defaults to stdout)\n");
- FLAGS_protofiles = argv[0];
- FLAGS_remotedb = false;
- FLAGS_binary_input = false;
- FLAGS_binary_output = true;
+ y_absl::SetFlag(&FLAGS_protofiles, argv[0]);
+ y_absl::SetFlag(&FLAGS_remotedb, false);
+ y_absl::SetFlag(&FLAGS_binary_input, false);
+ y_absl::SetFlag(&FLAGS_binary_output, true);
return ParseMessage(argc, argv, cred, callback);
}
diff --git a/contrib/libs/grpc/test/cpp/util/grpc_tool.h b/contrib/libs/grpc/test/cpp/util/grpc_tool.h
index 5bb43430d3f..7fbbe35c9ec 100644
--- a/contrib/libs/grpc/test/cpp/util/grpc_tool.h
+++ b/contrib/libs/grpc/test/cpp/util/grpc_tool.h
@@ -31,7 +31,7 @@ namespace testing {
typedef std::function<bool(const TString&)> GrpcToolOutputCallback;
int GrpcToolMainLib(int argc, const char** argv, const CliCredentials& cred,
- GrpcToolOutputCallback callback);
+ const GrpcToolOutputCallback& callback);
} // namespace testing
} // namespace grpc
diff --git a/contrib/libs/grpc/test/cpp/util/grpc_tool_test.cc b/contrib/libs/grpc/test/cpp/util/grpc_tool_test.cc
index ff610daadd6..54370727e22 100644
--- a/contrib/libs/grpc/test/cpp/util/grpc_tool_test.cc
+++ b/contrib/libs/grpc/test/cpp/util/grpc_tool_test.cc
@@ -18,7 +18,6 @@
#include "test/cpp/util/grpc_tool.h"
-#include <gflags/gflags.h>
#include <grpc/grpc.h>
#include <grpc/support/alloc.h>
#include <grpcpp/channel.h>
@@ -33,6 +32,8 @@
#include <chrono>
#include <sstream>
+#include "y_absl/flags/declare.h"
+#include "y_absl/flags/flag.h"
#include "src/core/lib/gpr/env.h"
#include "src/core/lib/iomgr/load_file.h"
#include "src/proto/grpc/testing/echo.grpc.pb.h"
@@ -110,31 +111,29 @@ using grpc::testing::EchoResponse;
" }\n" \
"}\n\n"
-DECLARE_string(channel_creds_type);
-DECLARE_string(ssl_target);
+Y_ABSL_DECLARE_FLAG(TString, channel_creds_type);
+Y_ABSL_DECLARE_FLAG(TString, ssl_target);
+Y_ABSL_DECLARE_FLAG(bool, binary_input);
+Y_ABSL_DECLARE_FLAG(bool, binary_output);
+Y_ABSL_DECLARE_FLAG(bool, json_input);
+Y_ABSL_DECLARE_FLAG(bool, json_output);
+Y_ABSL_DECLARE_FLAG(bool, l);
+Y_ABSL_DECLARE_FLAG(bool, batch);
+Y_ABSL_DECLARE_FLAG(TString, metadata);
+Y_ABSL_DECLARE_FLAG(TString, protofiles);
+Y_ABSL_DECLARE_FLAG(TString, proto_path);
+Y_ABSL_DECLARE_FLAG(TString, default_service_config);
+Y_ABSL_DECLARE_FLAG(double, timeout);
namespace grpc {
namespace testing {
-
-DECLARE_bool(binary_input);
-DECLARE_bool(binary_output);
-DECLARE_bool(json_input);
-DECLARE_bool(json_output);
-DECLARE_bool(l);
-DECLARE_bool(batch);
-DECLARE_string(metadata);
-DECLARE_string(protofiles);
-DECLARE_string(proto_path);
-DECLARE_string(default_service_config);
-DECLARE_double(timeout);
-
namespace {
const int kServerDefaultResponseStreamsToSend = 3;
class TestCliCredentials final : public grpc::testing::CliCredentials {
public:
- TestCliCredentials(bool secure = false) : secure_(secure) {}
+ explicit TestCliCredentials(bool secure = false) : secure_(secure) {}
std::shared_ptr<grpc::ChannelCredentials> GetChannelCredentials()
const override {
if (!secure_) {
@@ -151,7 +150,7 @@ class TestCliCredentials final : public grpc::testing::CliCredentials {
grpc_slice_unref(ca_slice);
return credential_ptr;
}
- const TString GetCredentialUsage() const override { return ""; }
+ TString GetCredentialUsage() const override { return ""; }
private:
const bool secure_;
@@ -185,7 +184,8 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
return Status::OK;
}
- Status CheckDeadlineSet(ServerContext* context, const SimpleRequest* request,
+ Status CheckDeadlineSet(ServerContext* context,
+ const SimpleRequest* /*request*/,
StringValue* response) override {
response->set_message(context->deadline() !=
std::chrono::system_clock::time_point::max()
@@ -197,14 +197,15 @@ class TestServiceImpl : public ::grpc::testing::EchoTestService::Service {
// Check if deadline - current time <= timeout
// If deadline set, timeout + current time should be an upper bound for it
Status CheckDeadlineUpperBound(ServerContext* context,
- const SimpleRequest* request,
+ const SimpleRequest* /*request*/,
StringValue* response) override {
auto seconds = std::chrono::duration_cast<std::chrono::seconds>(
context->deadline() - std::chrono::system_clock::now());
// Returning string instead of bool to avoid using embedded messages in
// proto3
- response->set_message(seconds.count() <= FLAGS_timeout ? "true" : "false");
+ response->set_message(
+ seconds.count() <= y_absl::GetFlag(FLAGS_timeout) ? "true" : "false");
return Status::OK;
}
@@ -283,7 +284,7 @@ class GrpcToolTest : public ::testing::Test {
// SetUpServer cannot be used with EXPECT_EXIT. grpc_pick_unused_port_or_die()
// uses atexit() to free chosen ports, and it will spawn a new thread in
// resolve_address_posix.c:192 at exit time.
- const TString SetUpServer(bool secure = false) {
+ TString SetUpServer(bool secure = false) {
std::ostringstream server_address;
int port = grpc_pick_unused_port_or_die();
server_address << "localhost:" << port;
@@ -372,7 +373,7 @@ TEST_F(GrpcToolTest, ListCommand) {
const TString server_address = SetUpServer();
const char* argv[] = {"grpc_cli", "ls", server_address.c_str()};
- FLAGS_l = false;
+ y_absl::SetFlag(&FLAGS_l, false);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -391,7 +392,7 @@ TEST_F(GrpcToolTest, ListOneService) {
const char* argv[] = {"grpc_cli", "ls", server_address.c_str(),
"grpc.testing.EchoTestService"};
// without -l flag
- FLAGS_l = false;
+ y_absl::SetFlag(&FLAGS_l, false);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -402,7 +403,7 @@ TEST_F(GrpcToolTest, ListOneService) {
// with -l flag
output_stream.str(TString());
output_stream.clear();
- FLAGS_l = true;
+ y_absl::SetFlag(&FLAGS_l, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -442,7 +443,7 @@ TEST_F(GrpcToolTest, ListOneMethod) {
const char* argv[] = {"grpc_cli", "ls", server_address.c_str(),
"grpc.testing.EchoTestService.Echo"};
// without -l flag
- FLAGS_l = false;
+ y_absl::SetFlag(&FLAGS_l, false);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -452,7 +453,7 @@ TEST_F(GrpcToolTest, ListOneMethod) {
// with -l flag
output_stream.str(TString());
output_stream.clear();
- FLAGS_l = true;
+ y_absl::SetFlag(&FLAGS_l, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -464,12 +465,12 @@ TEST_F(GrpcToolTest, ListOneMethod) {
}
TEST_F(GrpcToolTest, TypeNotFound) {
- // Test input "grpc_cli type localhost:<port> grpc.testing.DummyRequest"
+ // Test input "grpc_cli type localhost:<port> grpc.testing.PhonyRequest"
std::stringstream output_stream;
const TString server_address = SetUpServer();
const char* argv[] = {"grpc_cli", "type", server_address.c_str(),
- "grpc.testing.DummyRequest"};
+ "grpc.testing.PhonyRequest"};
EXPECT_TRUE(1 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -496,11 +497,12 @@ TEST_F(GrpcToolTest, CallCommand) {
output_stream.str(TString());
output_stream.clear();
- FLAGS_json_output = true;
+ // TODO(Capstan): Consider using y_absl::FlagSaver
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
// Expected output:
// {
@@ -520,7 +522,7 @@ TEST_F(GrpcToolTest, CallCommandJsonInput) {
const char* argv[] = {"grpc_cli", "call", server_address.c_str(), "Echo",
"{ \"message\": \"Hello\"}"};
- FLAGS_json_input = true;
+ y_absl::SetFlag(&FLAGS_json_input, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -532,12 +534,12 @@ TEST_F(GrpcToolTest, CallCommandJsonInput) {
output_stream.str(TString());
output_stream.clear();
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
- FLAGS_json_input = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
+ y_absl::SetFlag(&FLAGS_json_input, false);
// Expected output:
// {
@@ -562,11 +564,11 @@ TEST_F(GrpcToolTest, CallCommandBatch) {
std::istringstream ss("message: 'Hello1'\n\n message: 'Hello2'\n\n");
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output: "message: "Hello0"\nmessage: "Hello1"\nmessage:
// "Hello2"\n"
@@ -580,13 +582,13 @@ TEST_F(GrpcToolTest, CallCommandBatch) {
ss.seekg(0);
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output:
// {
@@ -623,12 +625,12 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInput) {
"{\"message\": \"Hello1\"}\n\n{\"message\": \"Hello2\" }\n\n");
std::cin.rdbuf(ss.rdbuf());
- FLAGS_json_input = true;
- FLAGS_batch = true;
+ y_absl::SetFlag(&FLAGS_json_input, true);
+ y_absl::SetFlag(&FLAGS_batch, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output: "message: "Hello0"\nmessage: "Hello1"\nmessage:
// "Hello2"\n"
@@ -642,14 +644,14 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInput) {
ss.seekg(0);
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
- FLAGS_batch = false;
- FLAGS_json_input = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
+ y_absl::SetFlag(&FLAGS_batch, false);
+ y_absl::SetFlag(&FLAGS_json_input, false);
// Expected output:
// {
@@ -685,11 +687,11 @@ TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) {
std::istringstream ss("message: 1\n\n message: 'Hello2'\n\n");
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output: "message: "Hello0"\nmessage: "Hello2"\n"
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
@@ -702,13 +704,13 @@ TEST_F(GrpcToolTest, CallCommandBatchWithBadRequest) {
ss.seekg(0);
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output:
// {
@@ -741,13 +743,13 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInputWithBadRequest) {
"{ \"message\": 1 }\n\n { \"message\": \"Hello2\" }\n\n");
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
- FLAGS_json_input = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
+ y_absl::SetFlag(&FLAGS_json_input, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_input = false;
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_json_input, false);
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output: "message: "Hello0"\nmessage: "Hello2"\n"
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
@@ -760,15 +762,15 @@ TEST_F(GrpcToolTest, CallCommandBatchJsonInputWithBadRequest) {
ss.seekg(0);
std::cin.rdbuf(ss.rdbuf());
- FLAGS_batch = true;
- FLAGS_json_input = true;
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_batch, true);
+ y_absl::SetFlag(&FLAGS_json_input, true);
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
- FLAGS_json_input = false;
- FLAGS_batch = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
+ y_absl::SetFlag(&FLAGS_json_input, false);
+ y_absl::SetFlag(&FLAGS_batch, false);
// Expected output:
// {
@@ -827,11 +829,11 @@ TEST_F(GrpcToolTest, CallCommandRequestStreamJsonInput) {
"{ \"message\": \"Hello1\" }\n\n{ \"message\": \"Hello2\" }\n\n");
std::cin.rdbuf(ss.rdbuf());
- FLAGS_json_input = true;
+ y_absl::SetFlag(&FLAGS_json_input, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_input = false;
+ y_absl::SetFlag(&FLAGS_json_input, false);
// Expected output: "message: \"Hello0Hello1Hello2\""
EXPECT_TRUE(nullptr != strstr(output_stream.str().c_str(),
@@ -880,11 +882,11 @@ TEST_F(GrpcToolTest, CallCommandRequestStreamWithBadRequestJsonInput) {
"{ \"bad_field\": \"Hello1\" }\n\n{ \"message\": \"Hello2\" }\n\n");
std::cin.rdbuf(ss.rdbuf());
- FLAGS_json_input = true;
+ y_absl::SetFlag(&FLAGS_json_input, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_input = false;
+ y_absl::SetFlag(&FLAGS_json_input, false);
// Expected output: "message: \"Hello0Hello2\""
EXPECT_TRUE(nullptr !=
@@ -902,7 +904,7 @@ TEST_F(GrpcToolTest, CallCommandWithTimeoutDeadlineSet) {
"CheckDeadlineSet"};
// Set timeout to 5000.25 seconds
- FLAGS_timeout = 5000.25;
+ y_absl::SetFlag(&FLAGS_timeout, 5000.25);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -923,7 +925,7 @@ TEST_F(GrpcToolTest, CallCommandWithTimeoutDeadlineUpperBound) {
"CheckDeadlineUpperBound"};
// Set timeout to 900 seconds
- FLAGS_timeout = 900;
+ y_absl::SetFlag(&FLAGS_timeout, 900);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -945,7 +947,7 @@ TEST_F(GrpcToolTest, CallCommandWithNegativeTimeoutValue) {
"CheckDeadlineSet"};
// Set timeout to -5 (deadline not set)
- FLAGS_timeout = -5;
+ y_absl::SetFlag(&FLAGS_timeout, -5);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -967,7 +969,7 @@ TEST_F(GrpcToolTest, CallCommandWithDefaultTimeoutValue) {
"CheckDeadlineSet"};
// Set timeout to -1 (default value, deadline not set)
- FLAGS_timeout = -1;
+ y_absl::SetFlag(&FLAGS_timeout, -1);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -1005,11 +1007,11 @@ TEST_F(GrpcToolTest, CallCommandResponseStream) {
output_stream.str(TString());
output_stream.clear();
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
// Expected output: "{\n \"message\": \"Hello{n}\"\n}\n"
for (int i = 0; i < kServerDefaultResponseStreamsToSend; i++) {
@@ -1085,8 +1087,8 @@ TEST_F(GrpcToolTest, ParseCommand) {
"grpc.testing.EchoResponse",
ECHO_RESPONSE_MESSAGE_TEXT_FORMAT};
- FLAGS_binary_input = false;
- FLAGS_binary_output = false;
+ y_absl::SetFlag(&FLAGS_binary_input, false);
+ y_absl::SetFlag(&FLAGS_binary_output, false);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -1098,11 +1100,11 @@ TEST_F(GrpcToolTest, ParseCommand) {
output_stream.str(TString());
output_stream.clear();
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
// Expected output: ECHO_RESPONSE_MESSAGE_JSON_FORMAT
EXPECT_TRUE(0 == strcmp(output_stream.str().c_str(),
@@ -1111,7 +1113,7 @@ TEST_F(GrpcToolTest, ParseCommand) {
// Parse text message to binary message and then parse it back to text message
output_stream.str(TString());
output_stream.clear();
- FLAGS_binary_output = true;
+ y_absl::SetFlag(&FLAGS_binary_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -1119,8 +1121,8 @@ TEST_F(GrpcToolTest, ParseCommand) {
output_stream.str(TString());
output_stream.clear();
argv[4] = binary_data.c_str();
- FLAGS_binary_input = true;
- FLAGS_binary_output = false;
+ y_absl::SetFlag(&FLAGS_binary_input, true);
+ y_absl::SetFlag(&FLAGS_binary_output, false);
EXPECT_TRUE(0 == GrpcToolMainLib(5, argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -1129,8 +1131,8 @@ TEST_F(GrpcToolTest, ParseCommand) {
EXPECT_TRUE(0 == strcmp(output_stream.str().c_str(),
ECHO_RESPONSE_MESSAGE_TEXT_FORMAT));
- FLAGS_binary_input = false;
- FLAGS_binary_output = false;
+ y_absl::SetFlag(&FLAGS_binary_input, false);
+ y_absl::SetFlag(&FLAGS_binary_output, false);
ShutdownServer();
}
@@ -1145,7 +1147,7 @@ TEST_F(GrpcToolTest, ParseCommandJsonFormat) {
"grpc.testing.EchoResponse",
ECHO_RESPONSE_MESSAGE_JSON_FORMAT};
- FLAGS_json_input = true;
+ y_absl::SetFlag(&FLAGS_json_input, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
@@ -1158,12 +1160,12 @@ TEST_F(GrpcToolTest, ParseCommandJsonFormat) {
output_stream.str(TString());
output_stream.clear();
- FLAGS_json_output = true;
+ y_absl::SetFlag(&FLAGS_json_output, true);
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_json_output = false;
- FLAGS_json_input = false;
+ y_absl::SetFlag(&FLAGS_json_output, false);
+ y_absl::SetFlag(&FLAGS_json_input, false);
// Expected output: ECHO_RESPONSE_MESSAGE_JSON_FORMAT
EXPECT_TRUE(0 == strcmp(output_stream.str().c_str(),
@@ -1211,7 +1213,7 @@ TEST_F(GrpcToolTest, CallCommandWithMetadata) {
{
std::stringstream output_stream;
- FLAGS_metadata = "key0:val0:key1:valq:key2:val2";
+ y_absl::SetFlag(&FLAGS_metadata, "key0:val0:key1:valq:key2:val2");
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv,
TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -1223,7 +1225,7 @@ TEST_F(GrpcToolTest, CallCommandWithMetadata) {
{
std::stringstream output_stream;
- FLAGS_metadata = "key:val\\:val";
+ y_absl::SetFlag(&FLAGS_metadata, "key:val\\:val");
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv,
TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -1235,7 +1237,7 @@ TEST_F(GrpcToolTest, CallCommandWithMetadata) {
{
std::stringstream output_stream;
- FLAGS_metadata = "key:val\\\\val";
+ y_absl::SetFlag(&FLAGS_metadata, "key:val\\\\val");
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv,
TestCliCredentials(),
std::bind(PrintStream, &output_stream,
@@ -1245,7 +1247,7 @@ TEST_F(GrpcToolTest, CallCommandWithMetadata) {
strstr(output_stream.str().c_str(), "message: \"Hello\""));
}
- FLAGS_metadata = "";
+ y_absl::SetFlag(&FLAGS_metadata, "");
ShutdownServer();
}
@@ -1254,15 +1256,16 @@ TEST_F(GrpcToolTest, CallCommandWithBadMetadata) {
const char* argv[] = {"grpc_cli", "call", "localhost:10000",
"grpc.testing.EchoTestService.Echo",
"message: 'Hello'"};
- FLAGS_protofiles = "src/proto/grpc/testing/echo.proto";
+ y_absl::SetFlag(&FLAGS_protofiles, "src/proto/grpc/testing/echo.proto");
char* test_srcdir = gpr_getenv("TEST_SRCDIR");
if (test_srcdir != nullptr) {
- FLAGS_proto_path = test_srcdir + TString("/com_github_grpc_grpc");
+ y_absl::SetFlag(&FLAGS_proto_path,
+ test_srcdir + TString("/com_github_grpc_grpc"));
}
{
std::stringstream output_stream;
- FLAGS_metadata = "key0:val0:key1";
+ y_absl::SetFlag(&FLAGS_metadata, "key0:val0:key1");
// Exit with 1
EXPECT_EXIT(
GrpcToolMainLib(
@@ -1273,7 +1276,7 @@ TEST_F(GrpcToolTest, CallCommandWithBadMetadata) {
{
std::stringstream output_stream;
- FLAGS_metadata = "key:val\\val";
+ y_absl::SetFlag(&FLAGS_metadata, "key:val\\val");
// Exit with 1
EXPECT_EXIT(
GrpcToolMainLib(
@@ -1282,8 +1285,8 @@ TEST_F(GrpcToolTest, CallCommandWithBadMetadata) {
::testing::ExitedWithCode(1), ".*Failed to parse metadata flag.*");
}
- FLAGS_metadata = "";
- FLAGS_protofiles = "";
+ y_absl::SetFlag(&FLAGS_metadata, "");
+ y_absl::SetFlag(&FLAGS_protofiles, "");
gpr_free(test_srcdir);
}
@@ -1295,9 +1298,9 @@ TEST_F(GrpcToolTest, ListCommand_OverrideSslHostName) {
// --ssl_target=z.test.google.fr"
std::stringstream output_stream;
const char* argv[] = {"grpc_cli", "ls", server_address.c_str()};
- FLAGS_l = false;
- FLAGS_channel_creds_type = "ssl";
- FLAGS_ssl_target = "z.test.google.fr";
+ y_absl::SetFlag(&FLAGS_l, false);
+ y_absl::SetFlag(&FLAGS_channel_creds_type, "ssl");
+ y_absl::SetFlag(&FLAGS_ssl_target, "z.test.google.fr");
EXPECT_TRUE(
0 == GrpcToolMainLib(
ArraySize(argv), argv, TestCliCredentials(true),
@@ -1306,8 +1309,8 @@ TEST_F(GrpcToolTest, ListCommand_OverrideSslHostName) {
"grpc.testing.EchoTestService\n"
"grpc.reflection.v1alpha.ServerReflection\n"));
- FLAGS_channel_creds_type = "";
- FLAGS_ssl_target = "";
+ y_absl::SetFlag(&FLAGS_channel_creds_type, "");
+ y_absl::SetFlag(&FLAGS_ssl_target, "");
ShutdownServer();
}
@@ -1320,13 +1323,13 @@ TEST_F(GrpcToolTest, ConfiguringDefaultServiceConfig) {
// Just check that the tool is still operational when --default_service_config
// is configured. This particular service config is in reality redundant with
// the channel's default configuration.
- FLAGS_l = false;
- FLAGS_default_service_config =
- "{\"loadBalancingConfig\":[{\"pick_first\":{}}]}";
+ y_absl::SetFlag(&FLAGS_l, false);
+ y_absl::SetFlag(&FLAGS_default_service_config,
+ "{\"loadBalancingConfig\":[{\"pick_first\":{}}]}");
EXPECT_TRUE(0 == GrpcToolMainLib(ArraySize(argv), argv, TestCliCredentials(),
std::bind(PrintStream, &output_stream,
std::placeholders::_1)));
- FLAGS_default_service_config = "";
+ y_absl::SetFlag(&FLAGS_default_service_config, "");
EXPECT_TRUE(0 == strcmp(output_stream.str().c_str(),
"grpc.testing.EchoTestService\n"
"grpc.reflection.v1alpha.ServerReflection\n"));
diff --git a/contrib/libs/grpc/test/cpp/util/proto_file_parser.cc b/contrib/libs/grpc/test/cpp/util/proto_file_parser.cc
index b0912a712c6..c324a7688bd 100644
--- a/contrib/libs/grpc/test/cpp/util/proto_file_parser.cc
+++ b/contrib/libs/grpc/test/cpp/util/proto_file_parser.cc
@@ -23,6 +23,9 @@
#include <sstream>
#include <unordered_set>
+#include "y_absl/memory/memory.h"
+#include "y_absl/strings/str_split.h"
+
#include <grpcpp/support/config.h>
namespace grpc {
@@ -70,21 +73,25 @@ ProtoFileParser::ProtoFileParser(const std::shared_ptr<grpc::Channel>& channel,
dynamic_factory_(new protobuf::DynamicMessageFactory()) {
std::vector<TString> service_list;
if (channel) {
- reflection_db_.reset(new grpc::ProtoReflectionDescriptorDatabase(channel));
+ reflection_db_ =
+ y_absl::make_unique<grpc::ProtoReflectionDescriptorDatabase>(channel);
reflection_db_->GetServices(&service_list);
}
std::unordered_set<TString> known_services;
if (!protofiles.empty()) {
- source_tree_.MapPath("", google::protobuf::string(proto_path));
- error_printer_.reset(new ErrorPrinter(this));
- importer_.reset(
- new protobuf::compiler::Importer(&source_tree_, error_printer_.get()));
+ for (const y_absl::string_view single_path : y_absl::StrSplit(
+ proto_path, GRPC_CLI_PATH_SEPARATOR, y_absl::AllowEmpty())) {
+ source_tree_.MapPath("", google::protobuf::string(single_path));
+ }
+ error_printer_ = y_absl::make_unique<ErrorPrinter>(this);
+ importer_ = y_absl::make_unique<protobuf::compiler::Importer>(
+ &source_tree_, error_printer_.get());
std::string file_name;
std::stringstream ss(protofiles);
while (std::getline(ss, file_name, ',')) {
- const auto* file_desc = importer_->Import(google::protobuf::string(file_name.c_str()));
+ const auto* file_desc = importer_->Import(google::protobuf::string(file_name));
if (file_desc) {
for (int i = 0; i < file_desc->service_count(); i++) {
service_desc_list_.push_back(file_desc->service(i));
@@ -95,7 +102,8 @@ ProtoFileParser::ProtoFileParser(const std::shared_ptr<grpc::Channel>& channel,
}
}
- file_db_.reset(new protobuf::DescriptorPoolDatabase(*importer_->pool()));
+ file_db_ =
+ y_absl::make_unique<protobuf::DescriptorPoolDatabase>(*importer_->pool());
}
if (!reflection_db_ && !file_db_) {
@@ -108,11 +116,11 @@ ProtoFileParser::ProtoFileParser(const std::shared_ptr<grpc::Channel>& channel,
} else if (!file_db_) {
desc_db_ = std::move(reflection_db_);
} else {
- desc_db_.reset(new protobuf::MergedDescriptorDatabase(reflection_db_.get(),
- file_db_.get()));
+ desc_db_ = y_absl::make_unique<protobuf::MergedDescriptorDatabase>(
+ reflection_db_.get(), file_db_.get());
}
- desc_pool_.reset(new protobuf::DescriptorPool(desc_db_.get()));
+ desc_pool_ = y_absl::make_unique<protobuf::DescriptorPool>(desc_db_.get());
for (auto it = service_list.begin(); it != service_list.end(); it++) {
if (known_services.find(*it) == known_services.end()) {
@@ -297,14 +305,14 @@ TString ProtoFileParser::GetFormattedStringFromMessageType(
if (is_json_format) {
grpc::protobuf::json::JsonPrintOptions jsonPrintOptions;
jsonPrintOptions.add_whitespace = true;
- if (!grpc::protobuf::json::MessageToJsonString(
- *msg.get(), &formatted_string, jsonPrintOptions)
+ if (!grpc::protobuf::json::MessageToJsonString(*msg, &formatted_string,
+ jsonPrintOptions)
.ok()) {
LogError("Failed to print proto message to json format");
return "";
}
} else {
- if (!protobuf::TextFormat::PrintToString(*msg.get(), &formatted_string)) {
+ if (!protobuf::TextFormat::PrintToString(*msg, &formatted_string)) {
LogError("Failed to print proto message to text format");
return "";
}
diff --git a/contrib/libs/grpc/test/cpp/util/proto_file_parser.h b/contrib/libs/grpc/test/cpp/util/proto_file_parser.h
index c0445641c73..9189b1ce0e8 100644
--- a/contrib/libs/grpc/test/cpp/util/proto_file_parser.h
+++ b/contrib/libs/grpc/test/cpp/util/proto_file_parser.h
@@ -26,6 +26,12 @@
#include "test/cpp/util/config_grpc_cli.h"
#include "test/cpp/util/proto_reflection_descriptor_database.h"
+#if defined(_WIN32) && !defined(__CYGWIN__)
+#define GRPC_CLI_PATH_SEPARATOR ";"
+#else
+#define GRPC_CLI_PATH_SEPARATOR ":"
+#endif
+
namespace grpc {
namespace testing {
class ErrorPrinter;
diff --git a/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.cc b/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.cc
index 27a4c1e4cf8..5def4c1e770 100644
--- a/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.cc
+++ b/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.cc
@@ -290,7 +290,7 @@ bool ProtoReflectionDescriptorDatabase::GetServices(
return false;
}
-const protobuf::FileDescriptorProto
+protobuf::FileDescriptorProto
ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse(
const TString& byte_fd_proto) {
protobuf::FileDescriptorProto file_desc_proto;
@@ -310,7 +310,7 @@ void ProtoReflectionDescriptorDatabase::AddFileFromResponse(
}
}
-const std::shared_ptr<ProtoReflectionDescriptorDatabase::ClientStream>
+std::shared_ptr<ProtoReflectionDescriptorDatabase::ClientStream>
ProtoReflectionDescriptorDatabase::GetStream() {
if (!stream_) {
stream_ = stub_->ServerReflectionInfo(&ctx_);
diff --git a/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.h b/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.h
index cdd6f0cccde..50e49d6741b 100644
--- a/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.h
+++ b/contrib/libs/grpc/test/cpp/util/proto_reflection_descriptor_database.h
@@ -40,7 +40,7 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
explicit ProtoReflectionDescriptorDatabase(
const std::shared_ptr<grpc::Channel>& channel);
- virtual ~ProtoReflectionDescriptorDatabase();
+ ~ProtoReflectionDescriptorDatabase() override;
// The following four methods implement DescriptorDatabase interfaces.
//
@@ -82,13 +82,13 @@ class ProtoReflectionDescriptorDatabase : public protobuf::DescriptorDatabase {
grpc::reflection::v1alpha::ServerReflectionResponse>
ClientStream;
- const protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse(
+ protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse(
const TString& byte_fd_proto);
void AddFileFromResponse(
const grpc::reflection::v1alpha::FileDescriptorResponse& response);
- const std::shared_ptr<ClientStream> GetStream();
+ std::shared_ptr<ClientStream> GetStream();
bool DoOneRequest(
const grpc::reflection::v1alpha::ServerReflectionRequest& request,
diff --git a/contrib/libs/grpc/test/cpp/util/slice_test.cc b/contrib/libs/grpc/test/cpp/util/slice_test.cc
index d7e945ae383..e6885fe4eec 100644
--- a/contrib/libs/grpc/test/cpp/util/slice_test.cc
+++ b/contrib/libs/grpc/test/cpp/util/slice_test.cc
@@ -94,13 +94,14 @@ TEST_F(SliceTest, SliceNewWithUserData) {
auto* t = new stest;
t->x = new char[strlen(kContent) + 1];
strcpy(t->x, kContent);
- Slice spp(t->x, strlen(t->x),
- [](void* p) {
- auto* t = static_cast<stest*>(p);
- delete[] t->x;
- delete t;
- },
- t);
+ Slice spp(
+ t->x, strlen(t->x),
+ [](void* p) {
+ auto* t = static_cast<stest*>(p);
+ delete[] t->x;
+ delete t;
+ },
+ t);
CheckSlice(spp, kContent);
}
diff --git a/contrib/libs/grpc/test/cpp/util/subprocess.h b/contrib/libs/grpc/test/cpp/util/subprocess.h
index 84dda31dd15..c01a15f0d7b 100644
--- a/contrib/libs/grpc/test/cpp/util/subprocess.h
+++ b/contrib/libs/grpc/test/cpp/util/subprocess.h
@@ -29,7 +29,7 @@ namespace grpc {
class SubProcess {
public:
- SubProcess(const std::vector<TString>& args);
+ explicit SubProcess(const std::vector<TString>& args);
~SubProcess();
int Join();
diff --git a/contrib/libs/grpc/test/cpp/util/test_config_cc.cc b/contrib/libs/grpc/test/cpp/util/test_config_cc.cc
index e4b68863354..601213290c8 100644
--- a/contrib/libs/grpc/test/cpp/util/test_config_cc.cc
+++ b/contrib/libs/grpc/test/cpp/util/test_config_cc.cc
@@ -16,21 +16,22 @@
*
*/
-#include <gflags/gflags.h>
-#include "test/cpp/util/test_config.h"
+#include <vector>
-// In some distros, gflags is in the namespace google, and in some others,
-// in gflags. This hack is enabling us to find both.
-namespace google {}
-namespace gflags {}
-using namespace google;
-using namespace gflags;
+#include "y_absl/flags/parse.h"
+#include "test/cpp/util/test_config.h"
namespace grpc {
namespace testing {
void InitTest(int* argc, char*** argv, bool remove_flags) {
- ParseCommandLineFlags(argc, argv, remove_flags);
+ std::vector<char*> reduced_argv = y_absl::ParseCommandLine(*argc, *argv);
+ if (remove_flags) {
+ *argc = reduced_argv.size();
+ for (int i = 0; i < *argc; i++) {
+ (*argv)[i] = reduced_argv.at(i);
+ }
+ }
}
} // namespace testing
diff --git a/contrib/libs/grpc/test/cpp/util/test_credentials_provider.cc b/contrib/libs/grpc/test/cpp/util/test_credentials_provider.cc
index f7134b773fb..7e91618b3d3 100644
--- a/contrib/libs/grpc/test/cpp/util/test_credentials_provider.cc
+++ b/contrib/libs/grpc/test/cpp/util/test_credentials_provider.cc
@@ -19,22 +19,23 @@
#include "test/cpp/util/test_credentials_provider.h"
+#include <grpc/support/log.h>
+#include <grpc/support/sync.h>
+#include <grpcpp/security/server_credentials.h>
+
#include <cstdio>
#include <fstream>
#include <iostream>
-
#include <mutex>
#include <unordered_map>
-#include <gflags/gflags.h>
-#include <grpc/support/log.h>
-#include <grpc/support/sync.h>
-#include <grpcpp/security/server_credentials.h>
-
+#include "y_absl/flags/flag.h"
#include "test/core/end2end/data/ssl_test_data.h"
-DEFINE_string(tls_cert_file, "", "The TLS cert file used when --use_tls=true");
-DEFINE_string(tls_key_file, "", "The TLS key file used when --use_tls=true");
+Y_ABSL_FLAG(TString, tls_cert_file, "",
+ "The TLS cert file used when --use_tls=true");
+Y_ABSL_FLAG(TString, tls_key_file, "",
+ "The TLS key file used when --use_tls=true");
namespace grpc {
namespace testing {
@@ -56,11 +57,11 @@ TString ReadFile(const TString& src_path) {
class DefaultCredentialsProvider : public CredentialsProvider {
public:
DefaultCredentialsProvider() {
- if (!FLAGS_tls_key_file.empty()) {
- custom_server_key_ = ReadFile(FLAGS_tls_key_file);
+ if (!y_absl::GetFlag(FLAGS_tls_key_file).empty()) {
+ custom_server_key_ = ReadFile(y_absl::GetFlag(FLAGS_tls_key_file));
}
- if (!FLAGS_tls_cert_file.empty()) {
- custom_server_cert_ = ReadFile(FLAGS_tls_cert_file);
+ if (!y_absl::GetFlag(FLAGS_tls_cert_file).empty()) {
+ custom_server_cert_ = ReadFile(y_absl::GetFlag(FLAGS_tls_cert_file));
}
}
~DefaultCredentialsProvider() override {}
diff --git a/contrib/libs/grpc/test/cpp/util/time_test.cc b/contrib/libs/grpc/test/cpp/util/time_test.cc
index bcbfa14f94f..a64bec7f7e3 100644
--- a/contrib/libs/grpc/test/cpp/util/time_test.cc
+++ b/contrib/libs/grpc/test/cpp/util/time_test.cc
@@ -22,7 +22,6 @@
#include "test/core/util/test_config.h"
-using std::chrono::duration_cast;
using std::chrono::microseconds;
using std::chrono::system_clock;
diff --git a/contrib/libs/grpc/third_party/ABSEIL_MANUAL.md b/contrib/libs/grpc/third_party/ABSEIL_MANUAL.md
new file mode 100644
index 00000000000..0fd4181199b
--- /dev/null
+++ b/contrib/libs/grpc/third_party/ABSEIL_MANUAL.md
@@ -0,0 +1,32 @@
+# Abseil in gRPC
+
+This document explains how to use Abseil throughout gRPC. Note that this isn't
+supposed to explain general usage of Abseil.
+
+## The version of Abseil
+
+gRPC intends to use the LTS versions of Abseil only because it simplifies
+dependency management. Abseil is being distributed via package distribution
+systems such as vcpkg and cocoapods. If gRPC depends on the certain version
+that aren't registered, gRPC in that system cannot get the right version of
+Abseil when being built, resulting in a build failure.
+Therefore, gRPC will use the LTS version only, preferably the latest one.
+
+## Libraries that are not ready to use
+
+Most of Abseil libraries are okay to use but there are some exceptions
+because they're not going well yet on some of our test machinaries or
+platforms it supports. The following is a list of targets that are NOT
+ready to use.
+
+- `y_absl/synchronization:*`: This will be ready from the LTS version in 2021.
+- `y_absl/random`: [WIP](https://github.com/grpc/grpc/pull/23346).
+- `y_absl/types:variant`: [WIP](https://github.com/grpc/grpc/pull/22961).
+
+## Implemetation only
+
+You can use Abseil in gRPC Core and gRPC C++. But you cannot use it in
+the public interface of gRPC C++ because i) it doesn't gurantee no breaking
+API changes like gRPC C++ does and ii) it may make users change their build
+system to address Abseil.
+ \ No newline at end of file
diff --git a/contrib/libs/grpc/third_party/README.md b/contrib/libs/grpc/third_party/README.md
index 9bf04831bcb..473b5426449 100644
--- a/contrib/libs/grpc/third_party/README.md
+++ b/contrib/libs/grpc/third_party/README.md
@@ -48,6 +48,14 @@ Usually the process is
Updating some dependencies requires extra care.
+### Updating third_party/abseil-cpp
+
+- Two additional steps should be done before running `generate_projects.sh` above.
+ - Running `src/abseil-cpp/preprocessed_builds.yaml.gen.py`.
+ - Updating `abseil_version =` scripts in `templates/gRPC-C++.podspec.template` and
+ `templates/gRPC-Core.podspec.template`.
+- You can see an example of previous [upgrade](https://github.com/grpc/grpc/pull/24270).
+
### Updating third_party/boringssl-with-bazel
- Update the `third_party/boringssl-with-bazel` submodule to the latest [`master-with-bazel`](https://github.com/google/boringssl/tree/master-with-bazel) branch
diff --git a/contrib/libs/grpc/third_party/address_sorting/include/address_sorting/address_sorting.h b/contrib/libs/grpc/third_party/address_sorting/include/address_sorting/address_sorting.h
index c58fafe3f70..074fc7554ed 100644
--- a/contrib/libs/grpc/third_party/address_sorting/include/address_sorting/address_sorting.h
+++ b/contrib/libs/grpc/third_party/address_sorting/include/address_sorting/address_sorting.h
@@ -41,6 +41,8 @@
#ifndef ADDRESS_SORTING_H
#define ADDRESS_SORTING_H
+#include <stddef.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/contrib/libs/grpc/third_party/upb/.yandex_meta/licenses.list.txt b/contrib/libs/grpc/third_party/upb/.yandex_meta/licenses.list.txt
index b1f339a11de..fb787bff114 100644
--- a/contrib/libs/grpc/third_party/upb/.yandex_meta/licenses.list.txt
+++ b/contrib/libs/grpc/third_party/upb/.yandex_meta/licenses.list.txt
@@ -23,9 +23,344 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
====================COPYRIGHT====================
+/* Copyright 2020 王一 Wang Yi <godspeed_china@yeah.net>
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+ See github.com/wangyi-fudan/wyhash/ LICENSE
+
+
+====================COPYRIGHT====================
Copyright (c) 2009-2011, Google Inc.
All rights reserved.
+====================File: AUTHORS====================
+Dropbox, Inc.
+Google Inc.
+Skyscanner Ltd.
+WeWork Companies Inc.
+
+
+====================File: LICENSE====================
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ 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.
+
+
+====================File: third_party/address_sorting/LICENSE====================
+Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. Neither the name of the project nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+====================File: third_party/upb/LICENSE====================
+
+Copyright (c) 2009-2011, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of Google Inc. nor the names of any other
+ contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+EVENT SHALL GOOGLE INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+
+====================File: third_party/upb/third_party/wyhash/LICENSE====================
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
+
+
+
====================Public-Domain====================
- * MurmurHash2, by Austin Appleby (released as public domain).
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+
+
+====================Unlicense====================
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+
+
+====================Unlicense====================
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
diff --git a/contrib/libs/grpc/third_party/upb/CMakeLists.txt b/contrib/libs/grpc/third_party/upb/CMakeLists.txt
index d3c68ad50fd..e0380063147 100644
--- a/contrib/libs/grpc/third_party/upb/CMakeLists.txt
+++ b/contrib/libs/grpc/third_party/upb/CMakeLists.txt
@@ -14,13 +14,20 @@ target_compile_options(grpc-third_party-upb PRIVATE
target_include_directories(grpc-third_party-upb PRIVATE
${CMAKE_BINARY_DIR}/contrib/libs/grpc
${CMAKE_SOURCE_DIR}/contrib/libs/grpc
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb
)
target_sources(grpc-third_party-upb PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/decode.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/decode_fast.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/def.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/encode.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/msg.c
- ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/port.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/reflection.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/table.c
+ ${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/text_encode.c
${CMAKE_SOURCE_DIR}/contrib/libs/grpc/third_party/upb/upb/upb.c
)
diff --git a/contrib/libs/grpc/third_party/upb/third_party/wyhash/LICENSE b/contrib/libs/grpc/third_party/upb/third_party/wyhash/LICENSE
new file mode 100644
index 00000000000..471f09f4cfb
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/third_party/wyhash/LICENSE
@@ -0,0 +1,25 @@
+This is free and unencumbered software released into the public domain.
+
+Anyone is free to copy, modify, publish, use, compile, sell, or
+distribute this software, either in source code form or as a compiled
+binary, for any purpose, commercial or non-commercial, and by any
+means.
+
+In jurisdictions that recognize copyright laws, the author or authors
+of this software dedicate any and all copyright interest in the
+software to the public domain. We make this dedication for the benefit
+of the public at large and to the detriment of our heirs and
+successors. We intend this dedication to be an overt act of
+relinquishment in perpetuity of all present and future rights to this
+software under copyright law.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+For more information, please refer to <http://unlicense.org/>
+
diff --git a/contrib/libs/grpc/third_party/upb/third_party/wyhash/wyhash.h b/contrib/libs/grpc/third_party/upb/third_party/wyhash/wyhash.h
new file mode 100644
index 00000000000..5658f02df3c
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/third_party/wyhash/wyhash.h
@@ -0,0 +1,145 @@
+/* Copyright 2020 王一 Wang Yi <godspeed_china@yeah.net>
+ This is free and unencumbered software released into the public domain. http://unlicense.org/
+ See github.com/wangyi-fudan/wyhash/ LICENSE
+ */
+#ifndef wyhash_final_version
+#define wyhash_final_version
+//defines that change behavior
+#ifndef WYHASH_CONDOM
+#define WYHASH_CONDOM 1 //0: read 8 bytes before and after boundaries, dangerous but fastest. 1: normal valid behavior 2: extra protection against entropy loss (probability=2^-63), aka. "blind multiplication"
+#endif
+#define WYHASH_32BIT_MUM 0 //faster on 32 bit system
+//includes
+#include <stdint.h>
+#include <string.h>
+#if defined(_MSC_VER) && defined(_M_X64)
+ #include <intrin.h>
+ #pragma intrinsic(_umul128)
+#endif
+#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
+ #define _likely_(x) __builtin_expect(x,1)
+ #define _unlikely_(x) __builtin_expect(x,0)
+#else
+ #define _likely_(x) (x)
+ #define _unlikely_(x) (x)
+#endif
+//mum function
+static inline uint64_t _wyrot(uint64_t x) { return (x>>32)|(x<<32); }
+static inline void _wymum(uint64_t *A, uint64_t *B){
+#if(WYHASH_32BIT_MUM)
+ uint64_t hh=(*A>>32)*(*B>>32), hl=(*A>>32)*(unsigned)*B, lh=(unsigned)*A*(*B>>32), ll=(uint64_t)(unsigned)*A*(unsigned)*B;
+ #if(WYHASH_CONDOM>1)
+ *A^=_wyrot(hl)^hh; *B^=_wyrot(lh)^ll;
+ #else
+ *A=_wyrot(hl)^hh; *B=_wyrot(lh)^ll;
+ #endif
+#elif defined(__SIZEOF_INT128__)
+ __uint128_t r=*A; r*=*B;
+ #if(WYHASH_CONDOM>1)
+ *A^=(uint64_t)r; *B^=(uint64_t)(r>>64);
+ #else
+ *A=(uint64_t)r; *B=(uint64_t)(r>>64);
+ #endif
+#elif defined(_MSC_VER) && defined(_M_X64)
+ #if(WYHASH_CONDOM>1)
+ uint64_t a, b;
+ a=_umul128(*A,*B,&b);
+ *A^=a; *B^=b;
+ #else
+ *A=_umul128(*A,*B,B);
+ #endif
+#else
+ uint64_t ha=*A>>32, hb=*B>>32, la=(uint32_t)*A, lb=(uint32_t)*B, hi, lo;
+ uint64_t rh=ha*hb, rm0=ha*lb, rm1=hb*la, rl=la*lb, t=rl+(rm0<<32), c=t<rl;
+ lo=t+(rm1<<32); c+=lo<t; hi=rh+(rm0>>32)+(rm1>>32)+c;
+ #if(WYHASH_CONDOM>1)
+ *A^=lo; *B^=hi;
+ #else
+ *A=lo; *B=hi;
+ #endif
+#endif
+}
+static inline uint64_t _wymix(uint64_t A, uint64_t B){ _wymum(&A,&B); return A^B; }
+//read functions
+#ifndef WYHASH_LITTLE_ENDIAN
+ #if defined(_WIN32) || defined(__LITTLE_ENDIAN__) || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
+ #define WYHASH_LITTLE_ENDIAN 1
+ #elif defined(__BIG_ENDIAN__) || (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+ #define WYHASH_LITTLE_ENDIAN 0
+ #endif
+#endif
+#if (WYHASH_LITTLE_ENDIAN)
+static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return v;}
+static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return v;}
+#elif defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
+static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return __builtin_bswap64(v);}
+static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return __builtin_bswap32(v);}
+#elif defined(_MSC_VER)
+static inline uint64_t _wyr8(const uint8_t *p) { uint64_t v; memcpy(&v, p, 8); return _byteswap_uint64(v);}
+static inline uint64_t _wyr4(const uint8_t *p) { unsigned v; memcpy(&v, p, 4); return _byteswap_ulong(v);}
+#endif
+static inline uint64_t _wyr3(const uint8_t *p, unsigned k) { return (((uint64_t)p[0])<<16)|(((uint64_t)p[k>>1])<<8)|p[k-1];}
+//wyhash function
+static inline uint64_t _wyfinish16(const uint8_t *p, uint64_t len, uint64_t seed, const uint64_t *secret, uint64_t i){
+#if(WYHASH_CONDOM>0)
+ uint64_t a, b;
+ if(_likely_(i<=8)){
+ if(_likely_(i>=4)){ a=_wyr4(p); b=_wyr4(p+i-4); }
+ else if (_likely_(i)){ a=_wyr3(p,i); b=0; }
+ else a=b=0;
+ }
+ else{ a=_wyr8(p); b=_wyr8(p+i-8); }
+ return _wymix(secret[1]^len,_wymix(a^secret[1], b^seed));
+#else
+ #define oneshot_shift ((i<8)*((8-i)<<3))
+ return _wymix(secret[1]^len,_wymix((_wyr8(p)<<oneshot_shift)^secret[1],(_wyr8(p+i-8)>>oneshot_shift)^seed));
+#endif
+}
+
+static inline uint64_t _wyfinish(const uint8_t *p, uint64_t len, uint64_t seed, const uint64_t *secret, uint64_t i){
+ if(_likely_(i<=16)) return _wyfinish16(p,len,seed,secret,i);
+ return _wyfinish(p+16,len,_wymix(_wyr8(p)^secret[1],_wyr8(p+8)^seed),secret,i-16);
+}
+
+static inline uint64_t wyhash(const void *key, uint64_t len, uint64_t seed, const uint64_t *secret){
+ const uint8_t *p=(const uint8_t *)key;
+ uint64_t i=len; seed^=*secret;
+ if(_unlikely_(i>64)){
+ uint64_t see1=seed;
+ do{
+ seed=_wymix(_wyr8(p)^secret[1],_wyr8(p+8)^seed)^_wymix(_wyr8(p+16)^secret[2],_wyr8(p+24)^seed);
+ see1=_wymix(_wyr8(p+32)^secret[3],_wyr8(p+40)^see1)^_wymix(_wyr8(p+48)^secret[4],_wyr8(p+56)^see1);
+ p+=64; i-=64;
+ }while(i>64);
+ seed^=see1;
+ }
+ return _wyfinish(p,len,seed,secret,i);
+}
+//utility functions
+const uint64_t _wyp[5] = {0xa0761d6478bd642full, 0xe7037ed1a0b428dbull, 0x8ebc6af09c88c6e3ull, 0x589965cc75374cc3ull, 0x1d8e4e27c47d124full};
+static inline uint64_t wyhash64(uint64_t A, uint64_t B){ A^=_wyp[0]; B^=_wyp[1]; _wymum(&A,&B); return _wymix(A^_wyp[0],B^_wyp[1]);}
+static inline uint64_t wyrand(uint64_t *seed){ *seed+=_wyp[0]; return _wymix(*seed,*seed^_wyp[1]);}
+static inline double wy2u01(uint64_t r){ const double _wynorm=1.0/(1ull<<52); return (r>>12)*_wynorm;}
+static inline double wy2gau(uint64_t r){ const double _wynorm=1.0/(1ull<<20); return ((r&0x1fffff)+((r>>21)&0x1fffff)+((r>>42)&0x1fffff))*_wynorm-3.0;}
+static inline uint64_t wy2u0k(uint64_t r, uint64_t k){ _wymum(&r,&k); return k; }
+
+static inline void make_secret(uint64_t seed, uint64_t *secret){
+ uint8_t c[] = {15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60, 71, 75, 77, 78, 83, 85, 86, 89, 90, 92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120, 135, 139, 141, 142, 147, 149, 150, 153, 154, 156, 163, 165, 166, 169, 170, 172, 177, 178, 180, 184, 195, 197, 198, 201, 202, 204, 209, 210, 212, 216, 225, 226, 228, 232, 240 };
+ for(size_t i=0;i<5;i++){
+ uint8_t ok;
+ do{
+ ok=1; secret[i]=0;
+ for(size_t j=0;j<64;j+=8) secret[i]|=((uint64_t)c[wyrand(&seed)%sizeof(c)])<<j;
+ if(secret[i]%2==0){ ok=0; continue; }
+ for(size_t j=0;j<i;j++)
+#if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__)
+ if(__builtin_popcountll(secret[j]^secret[i])!=32){ ok=0; break; }
+#elif defined(_MSC_VER) && defined(_M_X64)
+ if(_mm_popcnt_u64(secret[j]^secret[i])!=32){ ok=0; break; }
+#endif
+ if(!ok)continue;
+ for(uint64_t j=3;j<0x100000000ull;j+=2) if(secret[i]%j==0){ ok=0; break; }
+ }while(!ok);
+ }
+}
+#endif
diff --git a/contrib/libs/grpc/third_party/upb/upb/decode.c b/contrib/libs/grpc/third_party/upb/upb/decode.c
index a9f1cf548a0..a5f0666fa8b 100644
--- a/contrib/libs/grpc/third_party/upb/upb/decode.c
+++ b/contrib/libs/grpc/third_party/upb/upb/decode.c
@@ -1,33 +1,37 @@
+#include "upb/decode.h"
+
#include <setjmp.h>
#include <string.h>
-#include "upb/decode.h"
+#include "upb/decode.int.h"
#include "upb/upb.h"
+#include "upb/upb.int.h"
+/* Must be last. */
#include "upb/port_def.inc"
-/* Maps descriptor type -> upb field type. */
-static const uint8_t desctype_to_fieldtype[] = {
+/* Maps descriptor type -> elem_size_lg2. */
+static const uint8_t desctype_to_elem_size_lg2[] = {
-1, /* invalid descriptor type */
- UPB_TYPE_DOUBLE, /* DOUBLE */
- UPB_TYPE_FLOAT, /* FLOAT */
- UPB_TYPE_INT64, /* INT64 */
- UPB_TYPE_UINT64, /* UINT64 */
- UPB_TYPE_INT32, /* INT32 */
- UPB_TYPE_UINT64, /* FIXED64 */
- UPB_TYPE_UINT32, /* FIXED32 */
- UPB_TYPE_BOOL, /* BOOL */
- UPB_TYPE_STRING, /* STRING */
- UPB_TYPE_MESSAGE, /* GROUP */
- UPB_TYPE_MESSAGE, /* MESSAGE */
- UPB_TYPE_BYTES, /* BYTES */
- UPB_TYPE_UINT32, /* UINT32 */
- UPB_TYPE_ENUM, /* ENUM */
- UPB_TYPE_INT32, /* SFIXED32 */
- UPB_TYPE_INT64, /* SFIXED64 */
- UPB_TYPE_INT32, /* SINT32 */
- UPB_TYPE_INT64, /* SINT64 */
+ 3, /* DOUBLE */
+ 2, /* FLOAT */
+ 3, /* INT64 */
+ 3, /* UINT64 */
+ 2, /* INT32 */
+ 3, /* FIXED64 */
+ 2, /* FIXED32 */
+ 0, /* BOOL */
+ UPB_SIZE(3, 4), /* STRING */
+ UPB_SIZE(2, 3), /* GROUP */
+ UPB_SIZE(2, 3), /* MESSAGE */
+ UPB_SIZE(3, 4), /* BYTES */
+ 2, /* UINT32 */
+ 2, /* ENUM */
+ 2, /* SFIXED32 */
+ 3, /* SFIXED64 */
+ 2, /* SINT32 */
+ 3, /* SINT64 */
};
/* Maps descriptor type -> upb map size. */
@@ -134,106 +138,101 @@ static const int8_t delim_ops[37] = {
OP_VARPCK_LG2(3), /* REPEATED SINT64 */
};
-/* Data pertaining to the parse. */
-typedef struct {
- const char *limit; /* End of delimited region or end of buffer. */
- upb_arena *arena;
- int depth;
- uint32_t end_group; /* Set to field number of END_GROUP tag, if any. */
- jmp_buf err;
-} upb_decstate;
-
typedef union {
bool bool_val;
uint32_t uint32_val;
uint64_t uint64_val;
- upb_strview str_val;
+ uint32_t size;
} wireval;
static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
const upb_msglayout *layout);
-UPB_NORETURN static void decode_err(upb_decstate *d) { longjmp(d->err, 1); }
-
-void decode_verifyutf8(upb_decstate *d, const char *buf, int len) {
- static const uint8_t utf8_offset[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0,
- };
-
- int i, j;
- uint8_t offset;
-
- i = 0;
- while (i < len) {
- offset = utf8_offset[(uint8_t)buf[i]];
- if (offset == 0 || i + offset > len) {
- decode_err(d);
- }
- for (j = i + 1; j < i + offset; j++) {
- if ((buf[j] & 0xc0) != 0x80) {
- decode_err(d);
- }
- }
- i += offset;
- }
- if (i != len) decode_err(d);
+UPB_NORETURN static void decode_err(upb_decstate *d) { UPB_LONGJMP(d->err, 1); }
+
+const char *fastdecode_err(upb_decstate *d) {
+ longjmp(d->err, 1);
+ return NULL;
+}
+
+const uint8_t upb_utf8_offsets[] = {
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0,
+};
+
+static void decode_verifyutf8(upb_decstate *d, const char *buf, int len) {
+ if (!decode_verifyutf8_inl(buf, len)) decode_err(d);
}
static bool decode_reserve(upb_decstate *d, upb_array *arr, size_t elem) {
bool need_realloc = arr->size - arr->len < elem;
- if (need_realloc && !_upb_array_realloc(arr, arr->len + elem, d->arena)) {
+ if (need_realloc && !_upb_array_realloc(arr, arr->len + elem, &d->arena)) {
decode_err(d);
}
return need_realloc;
}
+typedef struct {
+ const char *ptr;
+ uint64_t val;
+} decode_vret;
+
UPB_NOINLINE
-static const char *decode_longvarint64(upb_decstate *d, const char *ptr,
- const char *limit, uint64_t *val) {
- uint8_t byte;
- int bitpos = 0;
- uint64_t out = 0;
-
- do {
- if (bitpos >= 70 || ptr == limit) decode_err(d);
- byte = *ptr;
- out |= (uint64_t)(byte & 0x7F) << bitpos;
- ptr++;
- bitpos += 7;
- } while (byte & 0x80);
-
- *val = out;
- return ptr;
+static decode_vret decode_longvarint64(const char *ptr, uint64_t val) {
+ decode_vret ret = {NULL, 0};
+ uint64_t byte;
+ int i;
+ for (i = 1; i < 10; i++) {
+ byte = (uint8_t)ptr[i];
+ val += (byte - 1) << (i * 7);
+ if (!(byte & 0x80)) {
+ ret.ptr = ptr + i + 1;
+ ret.val = val;
+ return ret;
+ }
+ }
+ return ret;
}
UPB_FORCEINLINE
static const char *decode_varint64(upb_decstate *d, const char *ptr,
- const char *limit, uint64_t *val) {
- if (UPB_LIKELY(ptr < limit && (*ptr & 0x80) == 0)) {
- *val = (uint8_t)*ptr;
+ uint64_t *val) {
+ uint64_t byte = (uint8_t)*ptr;
+ if (UPB_LIKELY((byte & 0x80) == 0)) {
+ *val = byte;
return ptr + 1;
} else {
- return decode_longvarint64(d, ptr, limit, val);
+ decode_vret res = decode_longvarint64(ptr, byte);
+ if (!res.ptr) decode_err(d);
+ *val = res.val;
+ return res.ptr;
}
}
-static const char *decode_varint32(upb_decstate *d, const char *ptr,
- const char *limit, uint32_t *val) {
- uint64_t u64;
- ptr = decode_varint64(d, ptr, limit, &u64);
- if (u64 > UINT32_MAX) decode_err(d);
- *val = (uint32_t)u64;
- return ptr;
+UPB_FORCEINLINE
+static const char *decode_tag(upb_decstate *d, const char *ptr,
+ uint32_t *val) {
+ uint64_t byte = (uint8_t)*ptr;
+ if (UPB_LIKELY((byte & 0x80) == 0)) {
+ *val = byte;
+ return ptr + 1;
+ } else {
+ const char *start = ptr;
+ decode_vret res = decode_longvarint64(ptr, byte);
+ ptr = res.ptr;
+ *val = res.val;
+ if (!ptr || *val > UINT32_MAX || ptr - start > 5) decode_err(d);
+ return ptr;
+ }
}
static void decode_munge(int type, wireval *val) {
@@ -280,33 +279,65 @@ static const upb_msglayout_field *upb_find_field(const upb_msglayout *l,
static upb_msg *decode_newsubmsg(upb_decstate *d, const upb_msglayout *layout,
const upb_msglayout_field *field) {
const upb_msglayout *subl = layout->submsgs[field->submsg_index];
- return _upb_msg_new(subl, d->arena);
+ return _upb_msg_new_inl(subl, &d->arena);
+}
+
+UPB_NOINLINE
+const char *decode_isdonefallback(upb_decstate *d, const char *ptr,
+ int overrun) {
+ ptr = decode_isdonefallback_inl(d, ptr, overrun);
+ if (ptr == NULL) {
+ decode_err(d);
+ }
+ return ptr;
+}
+
+static const char *decode_readstr(upb_decstate *d, const char *ptr, int size,
+ upb_strview *str) {
+ if (d->alias) {
+ str->data = ptr;
+ } else {
+ char *data = upb_arena_malloc(&d->arena, size);
+ if (!data) decode_err(d);
+ memcpy(data, ptr, size);
+ str->data = data;
+ }
+ str->size = size;
+ return ptr + size;
}
-static void decode_tosubmsg(upb_decstate *d, upb_msg *submsg,
- const upb_msglayout *layout,
- const upb_msglayout_field *field, upb_strview val) {
+UPB_FORCEINLINE
+static const char *decode_tosubmsg(upb_decstate *d, const char *ptr,
+ upb_msg *submsg, const upb_msglayout *layout,
+ const upb_msglayout_field *field, int size) {
const upb_msglayout *subl = layout->submsgs[field->submsg_index];
- const char *saved_limit = d->limit;
+ int saved_delta = decode_pushlimit(d, ptr, size);
if (--d->depth < 0) decode_err(d);
- d->limit = val.data + val.size;
- decode_msg(d, val.data, submsg, subl);
- d->limit = saved_limit;
- if (d->end_group != 0) decode_err(d);
+ if (!decode_isdone(d, &ptr)) {
+ ptr = decode_msg(d, ptr, submsg, subl);
+ }
+ if (d->end_group != DECODE_NOGROUP) decode_err(d);
+ decode_poplimit(d, ptr, saved_delta);
d->depth++;
+ return ptr;
}
+UPB_FORCEINLINE
static const char *decode_group(upb_decstate *d, const char *ptr,
upb_msg *submsg, const upb_msglayout *subl,
uint32_t number) {
if (--d->depth < 0) decode_err(d);
+ if (decode_isdone(d, &ptr)) {
+ decode_err(d);
+ }
ptr = decode_msg(d, ptr, submsg, subl);
if (d->end_group != number) decode_err(d);
- d->end_group = 0;
+ d->end_group = DECODE_NOGROUP;
d->depth++;
return ptr;
}
+UPB_FORCEINLINE
static const char *decode_togroup(upb_decstate *d, const char *ptr,
upb_msg *submsg, const upb_msglayout *layout,
const upb_msglayout_field *field) {
@@ -322,15 +353,15 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr,
upb_array *arr = *arrp;
void *mem;
- if (!arr) {
- upb_fieldtype_t type = desctype_to_fieldtype[field->descriptortype];
- arr = _upb_array_new(d->arena, type);
+ if (arr) {
+ decode_reserve(d, arr, 1);
+ } else {
+ size_t lg2 = desctype_to_elem_size_lg2[field->descriptortype];
+ arr = _upb_array_new(&d->arena, 4, lg2);
if (!arr) decode_err(d);
*arrp = arr;
}
- decode_reserve(d, arr, 1);
-
switch (op) {
case OP_SCALAR_LG2(0):
case OP_SCALAR_LG2(2):
@@ -341,15 +372,14 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr,
memcpy(mem, &val, 1 << op);
return ptr;
case OP_STRING:
- decode_verifyutf8(d, val.str_val.data, val.str_val.size);
+ decode_verifyutf8(d, ptr, val.size);
/* Fallthrough. */
- case OP_BYTES:
+ case OP_BYTES: {
/* Append bytes. */
- mem =
- UPB_PTR_AT(_upb_array_ptr(arr), arr->len * sizeof(upb_strview), void);
+ upb_strview *str = (upb_strview*)_upb_array_ptr(arr) + arr->len;
arr->len++;
- memcpy(mem, &val, sizeof(upb_strview));
- return ptr;
+ return decode_readstr(d, ptr, val.size, str);
+ }
case OP_SUBMSG: {
/* Append submessage / group. */
upb_msg *submsg = decode_newsubmsg(d, layout, field);
@@ -357,26 +387,25 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr,
submsg;
arr->len++;
if (UPB_UNLIKELY(field->descriptortype == UPB_DTYPE_GROUP)) {
- ptr = decode_togroup(d, ptr, submsg, layout, field);
+ return decode_togroup(d, ptr, submsg, layout, field);
} else {
- decode_tosubmsg(d, submsg, layout, field, val.str_val);
+ return decode_tosubmsg(d, ptr, submsg, layout, field, val.size);
}
- return ptr;
}
case OP_FIXPCK_LG2(2):
case OP_FIXPCK_LG2(3): {
/* Fixed packed. */
int lg2 = op - OP_FIXPCK_LG2(0);
int mask = (1 << lg2) - 1;
- size_t count = val.str_val.size >> lg2;
- if ((val.str_val.size & mask) != 0) {
+ size_t count = val.size >> lg2;
+ if ((val.size & mask) != 0) {
decode_err(d); /* Length isn't a round multiple of elem size. */
}
decode_reserve(d, arr, count);
mem = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << lg2, void);
arr->len += count;
- memcpy(mem, val.str_val.data, val.str_val.size);
- return ptr;
+ memcpy(mem, ptr, val.size); /* XXX: ptr boundary. */
+ return ptr + val.size;
}
case OP_VARPCK_LG2(0):
case OP_VARPCK_LG2(2):
@@ -384,12 +413,11 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr,
/* Varint packed. */
int lg2 = op - OP_VARPCK_LG2(0);
int scale = 1 << lg2;
- const char *ptr = val.str_val.data;
- const char *end = ptr + val.str_val.size;
+ int saved_limit = decode_pushlimit(d, ptr, val.size);
char *out = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << lg2, void);
- while (ptr < end) {
+ while (!decode_isdone(d, &ptr)) {
wireval elem;
- ptr = decode_varint64(d, ptr, end, &elem.uint64_val);
+ ptr = decode_varint64(d, ptr, &elem.uint64_val);
decode_munge(field->descriptortype, &elem);
if (decode_reserve(d, arr, 1)) {
out = UPB_PTR_AT(_upb_array_ptr(arr), arr->len << lg2, void);
@@ -398,7 +426,7 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr,
memcpy(out, &elem, scale);
out += scale;
}
- if (ptr != end) decode_err(d);
+ decode_poplimit(d, ptr, saved_limit);
return ptr;
}
default:
@@ -406,9 +434,9 @@ static const char *decode_toarray(upb_decstate *d, const char *ptr,
}
}
-static void decode_tomap(upb_decstate *d, upb_msg *msg,
- const upb_msglayout *layout,
- const upb_msglayout_field *field, wireval val) {
+static const char *decode_tomap(upb_decstate *d, const char *ptr, upb_msg *msg,
+ const upb_msglayout *layout,
+ const upb_msglayout_field *field, wireval val) {
upb_map **map_p = UPB_PTR_AT(msg, field->offset, upb_map *);
upb_map *map = *map_p;
upb_map_entry ent;
@@ -423,7 +451,7 @@ static void decode_tomap(upb_decstate *d, upb_msg *msg,
char val_size = desctype_to_mapsize[val_field->descriptortype];
UPB_ASSERT(key_field->offset == 0);
UPB_ASSERT(val_field->offset == sizeof(upb_strview));
- map = _upb_map_new(d->arena, key_size, val_size);
+ map = _upb_map_new(&d->arena, key_size, val_size);
*map_p = map;
}
@@ -433,13 +461,12 @@ static void decode_tomap(upb_decstate *d, upb_msg *msg,
if (entry->fields[1].descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE ||
entry->fields[1].descriptortype == UPB_DESCRIPTOR_TYPE_GROUP) {
/* Create proactively to handle the case where it doesn't appear. */
- ent.v.val = upb_value_ptr(_upb_msg_new(entry->submsgs[0], d->arena));
+ ent.v.val = upb_value_ptr(_upb_msg_new(entry->submsgs[0], &d->arena));
}
- decode_tosubmsg(d, &ent.k, layout, field, val.str_val);
-
- /* Insert into map. */
- _upb_map_set(map, &ent.k, map->key_size, &ent.v, map->val_size, d->arena);
+ ptr = decode_tosubmsg(d, ptr, &ent.k, layout, field, val.size);
+ _upb_map_set(map, &ent.k, map->key_size, &ent.v, map->val_size, &d->arena);
+ return ptr;
}
static const char *decode_tomsg(upb_decstate *d, const char *ptr, upb_msg *msg,
@@ -473,16 +500,15 @@ static const char *decode_tomsg(upb_decstate *d, const char *ptr, upb_msg *msg,
if (UPB_UNLIKELY(type == UPB_DTYPE_GROUP)) {
ptr = decode_togroup(d, ptr, submsg, layout, field);
} else {
- decode_tosubmsg(d, submsg, layout, field, val.str_val);
+ ptr = decode_tosubmsg(d, ptr, submsg, layout, field, val.size);
}
break;
}
case OP_STRING:
- decode_verifyutf8(d, val.str_val.data, val.str_val.size);
+ decode_verifyutf8(d, ptr, val.size);
/* Fallthrough. */
case OP_BYTES:
- memcpy(mem, &val, sizeof(upb_strview));
- break;
+ return decode_readstr(d, ptr, val.size, mem);
case OP_SCALAR_LG2(3):
memcpy(mem, &val, 8);
break;
@@ -499,9 +525,24 @@ static const char *decode_tomsg(upb_decstate *d, const char *ptr, upb_msg *msg,
return ptr;
}
+UPB_FORCEINLINE
+static bool decode_tryfastdispatch(upb_decstate *d, const char **ptr,
+ upb_msg *msg, const upb_msglayout *layout) {
+#if UPB_FASTTABLE
+ if (layout && layout->table_mask != (unsigned char)-1) {
+ uint16_t tag = fastdecode_loadtag(*ptr);
+ intptr_t table = decode_totable(layout);
+ *ptr = fastdecode_tagdispatch(d, *ptr, msg, table, 0, tag);
+ return true;
+ }
+#endif
+ return false;
+}
+
+UPB_NOINLINE
static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
const upb_msglayout *layout) {
- while (ptr < d->limit) {
+ while (true) {
uint32_t tag;
const upb_msglayout_field *field;
int field_number;
@@ -510,7 +551,8 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
wireval val;
int op;
- ptr = decode_varint32(d, ptr, d->limit, &tag);
+ UPB_ASSERT(ptr < d->limit_ptr);
+ ptr = decode_tag(d, ptr, &tag);
field_number = tag >> 3;
wire_type = tag & 7;
@@ -518,12 +560,11 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
switch (wire_type) {
case UPB_WIRE_TYPE_VARINT:
- ptr = decode_varint64(d, ptr, d->limit, &val.uint64_val);
+ ptr = decode_varint64(d, ptr, &val.uint64_val);
op = varint_ops[field->descriptortype];
decode_munge(field->descriptortype, &val);
break;
case UPB_WIRE_TYPE_32BIT:
- if (d->limit - ptr < 4) decode_err(d);
memcpy(&val.uint32_val, ptr, 4);
val.uint32_val = _upb_be_swap32(val.uint32_val);
ptr += 4;
@@ -531,7 +572,6 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
if (((1 << field->descriptortype) & fixed32_ok) == 0) goto unknown;
break;
case UPB_WIRE_TYPE_64BIT:
- if (d->limit - ptr < 8) decode_err(d);
memcpy(&val.uint64_val, ptr, 8);
val.uint64_val = _upb_be_swap64(val.uint64_val);
ptr += 8;
@@ -539,17 +579,16 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
if (((1 << field->descriptortype) & fixed64_ok) == 0) goto unknown;
break;
case UPB_WIRE_TYPE_DELIMITED: {
- uint32_t size;
int ndx = field->descriptortype;
+ uint64_t size;
if (_upb_isrepeated(field)) ndx += 18;
- ptr = decode_varint32(d, ptr, d->limit, &size);
- if (size >= INT32_MAX || (size_t)(d->limit - ptr) < size) {
+ ptr = decode_varint64(d, ptr, &size);
+ if (size >= INT32_MAX ||
+ ptr - d->end + (int32_t)size > d->limit) {
decode_err(d); /* Length overflow. */
}
- val.str_val.data = ptr;
- val.str_val.size = size;
- ptr += size;
op = delim_ops[ndx];
+ val.size = size;
break;
}
case UPB_WIRE_TYPE_START_GROUP:
@@ -572,7 +611,7 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
ptr = decode_toarray(d, ptr, msg, layout, field, val, op);
break;
case _UPB_LABEL_MAP:
- decode_tomap(d, msg, layout, field, val);
+ ptr = decode_tomap(d, ptr, msg, layout, field, val);
break;
default:
ptr = decode_tomsg(d, ptr, msg, layout, field, val, op);
@@ -582,36 +621,78 @@ static const char *decode_msg(upb_decstate *d, const char *ptr, upb_msg *msg,
unknown:
/* Skip unknown field. */
if (field_number == 0) decode_err(d);
- if (wire_type == UPB_WIRE_TYPE_START_GROUP) {
- ptr = decode_group(d, ptr, NULL, NULL, field_number);
- }
+ if (wire_type == UPB_WIRE_TYPE_DELIMITED) ptr += val.size;
if (msg) {
+ if (wire_type == UPB_WIRE_TYPE_START_GROUP) {
+ d->unknown = field_start;
+ d->unknown_msg = msg;
+ ptr = decode_group(d, ptr, NULL, NULL, field_number);
+ d->unknown_msg = NULL;
+ field_start = d->unknown;
+ }
if (!_upb_msg_addunknown(msg, field_start, ptr - field_start,
- d->arena)) {
+ &d->arena)) {
decode_err(d);
}
+ } else if (wire_type == UPB_WIRE_TYPE_START_GROUP) {
+ ptr = decode_group(d, ptr, NULL, NULL, field_number);
}
}
+
+ if (decode_isdone(d, &ptr)) return ptr;
+ if (decode_tryfastdispatch(d, &ptr, msg, layout)) return ptr;
}
+}
- if (ptr != d->limit) decode_err(d);
- return ptr;
+const char *fastdecode_generic(struct upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table, uint64_t hasbits,
+ uint64_t data) {
+ (void)data;
+ *(uint32_t*)msg |= hasbits;
+ return decode_msg(d, ptr, msg, decode_totablep(table));
}
-bool upb_decode(const char *buf, size_t size, void *msg, const upb_msglayout *l,
- upb_arena *arena) {
+bool _upb_decode(const char *buf, size_t size, void *msg,
+ const upb_msglayout *l, upb_arena *arena, int options) {
+ bool ok;
upb_decstate state;
- state.limit = buf + size;
- state.arena = arena;
- state.depth = 64;
- state.end_group = 0;
+ unsigned depth = (unsigned)options >> 16;
+
+ if (size == 0) {
+ return true;
+ } else if (size <= 16) {
+ memset(&state.patch, 0, 32);
+ memcpy(&state.patch, buf, size);
+ buf = state.patch;
+ state.end = buf + size;
+ state.limit = 0;
+ state.alias = false;
+ } else {
+ state.end = buf + size - 16;
+ state.limit = 16;
+ state.alias = options & UPB_DECODE_ALIAS;
+ }
- if (setjmp(state.err)) return false;
+ state.limit_ptr = state.end;
+ state.unknown_msg = NULL;
+ state.depth = depth ? depth : 64;
+ state.end_group = DECODE_NOGROUP;
+ state.arena.head = arena->head;
+ state.arena.last_size = arena->last_size;
+ state.arena.parent = arena;
- if (size == 0) return true;
- decode_msg(&state, buf, msg, l);
+ if (UPB_UNLIKELY(UPB_SETJMP(state.err))) {
+ ok = false;
+ } else {
+ if (!decode_tryfastdispatch(&state, &buf, msg, l)) {
+ decode_msg(&state, buf, msg, l);
+ }
+ ok = state.end_group == DECODE_NOGROUP;
+ }
- return state.end_group == 0;
+ arena->head.ptr = state.arena.head.ptr;
+ arena->head.end = state.arena.head.end;
+ return ok;
}
#undef OP_SCALAR_LG2
diff --git a/contrib/libs/grpc/third_party/upb/upb/decode.h b/contrib/libs/grpc/third_party/upb/upb/decode.h
index 9de8638de5c..eff4b8bd3d8 100644
--- a/contrib/libs/grpc/third_party/upb/upb/decode.h
+++ b/contrib/libs/grpc/third_party/upb/upb/decode.h
@@ -7,15 +7,34 @@
#include "upb/msg.h"
+/* Must be last. */
+#include "upb/port_def.inc"
+
#ifdef __cplusplus
extern "C" {
#endif
+enum {
+ /* If set, strings will alias the input buffer instead of copying into the
+ * arena. */
+ UPB_DECODE_ALIAS = 1,
+};
+
+#define UPB_DECODE_MAXDEPTH(depth) ((depth) << 16)
+
+bool _upb_decode(const char *buf, size_t size, upb_msg *msg,
+ const upb_msglayout *l, upb_arena *arena, int options);
+
+UPB_INLINE
bool upb_decode(const char *buf, size_t size, upb_msg *msg,
- const upb_msglayout *l, upb_arena *arena);
+ const upb_msglayout *l, upb_arena *arena) {
+ return _upb_decode(buf, size, msg, l, arena, 0);
+}
#ifdef __cplusplus
} /* extern "C" */
#endif
+#include "upb/port_undef.inc"
+
#endif /* UPB_DECODE_H_ */
diff --git a/contrib/libs/grpc/third_party/upb/upb/decode.int.h b/contrib/libs/grpc/third_party/upb/upb/decode.int.h
new file mode 100644
index 00000000000..e286b9cdd52
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/decode.int.h
@@ -0,0 +1,163 @@
+/*
+** Internal implementation details of the decoder that are shared between
+** decode.c and decode_fast.c.
+*/
+
+#ifndef UPB_DECODE_INT_H_
+#define UPB_DECODE_INT_H_
+
+#include <setjmp.h>
+
+#include "upb/msg.h"
+#include "upb/upb.int.h"
+
+/* Must be last. */
+#include "upb/port_def.inc"
+
+#define DECODE_NOGROUP -1
+
+typedef struct upb_decstate {
+ const char *end; /* Can read up to 16 bytes slop beyond this. */
+ const char *limit_ptr; /* = end + UPB_MIN(limit, 0) */
+ upb_msg *unknown_msg; /* If non-NULL, add unknown data at buffer flip. */
+ const char *unknown; /* Start of unknown data. */
+ int limit; /* Submessage limit relative to end. */
+ int depth;
+ uint32_t end_group; /* field number of END_GROUP tag, else DECODE_NOGROUP */
+ bool alias;
+ char patch[32];
+ upb_arena arena;
+ jmp_buf err;
+} upb_decstate;
+
+/* Error function that will abort decoding with longjmp(). We can't declare this
+ * UPB_NORETURN, even though it is appropriate, because if we do then compilers
+ * will "helpfully" refuse to tailcall to it
+ * (see: https://stackoverflow.com/a/55657013), which will defeat a major goal
+ * of our optimizations. That is also why we must declare it in a separate file,
+ * otherwise the compiler will see that it calls longjmp() and deduce that it is
+ * noreturn. */
+const char *fastdecode_err(upb_decstate *d);
+
+extern const uint8_t upb_utf8_offsets[];
+
+UPB_INLINE
+bool decode_verifyutf8_inl(const char *buf, int len) {
+ int i, j;
+ uint8_t offset;
+
+ i = 0;
+ while (i < len) {
+ offset = upb_utf8_offsets[(uint8_t)buf[i]];
+ if (offset == 0 || i + offset > len) {
+ return false;
+ }
+ for (j = i + 1; j < i + offset; j++) {
+ if ((buf[j] & 0xc0) != 0x80) {
+ return false;
+ }
+ }
+ i += offset;
+ }
+ return i == len;
+}
+
+/* x86-64 pointers always have the high 16 bits matching. So we can shift
+ * left 8 and right 8 without loss of information. */
+UPB_INLINE intptr_t decode_totable(const upb_msglayout *tablep) {
+ return ((intptr_t)tablep << 8) | tablep->table_mask;
+}
+
+UPB_INLINE const upb_msglayout *decode_totablep(intptr_t table) {
+ return (const upb_msglayout*)(table >> 8);
+}
+
+UPB_INLINE
+const char *decode_isdonefallback_inl(upb_decstate *d, const char *ptr,
+ int overrun) {
+ if (overrun < d->limit) {
+ /* Need to copy remaining data into patch buffer. */
+ UPB_ASSERT(overrun < 16);
+ if (d->unknown_msg) {
+ if (!_upb_msg_addunknown(d->unknown_msg, d->unknown, ptr - d->unknown,
+ &d->arena)) {
+ return NULL;
+ }
+ d->unknown = &d->patch[0] + overrun;
+ }
+ memset(d->patch + 16, 0, 16);
+ memcpy(d->patch, d->end, 16);
+ ptr = &d->patch[0] + overrun;
+ d->end = &d->patch[16];
+ d->limit -= 16;
+ d->limit_ptr = d->end + d->limit;
+ d->alias = false;
+ UPB_ASSERT(ptr < d->limit_ptr);
+ return ptr;
+ } else {
+ return NULL;
+ }
+}
+
+const char *decode_isdonefallback(upb_decstate *d, const char *ptr,
+ int overrun);
+
+UPB_INLINE
+bool decode_isdone(upb_decstate *d, const char **ptr) {
+ int overrun = *ptr - d->end;
+ if (UPB_LIKELY(*ptr < d->limit_ptr)) {
+ return false;
+ } else if (UPB_LIKELY(overrun == d->limit)) {
+ return true;
+ } else {
+ *ptr = decode_isdonefallback(d, *ptr, overrun);
+ return false;
+ }
+}
+
+UPB_INLINE
+const char *fastdecode_tagdispatch(upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table,
+ uint64_t hasbits, uint32_t tag) {
+ const upb_msglayout *table_p = decode_totablep(table);
+ uint8_t mask = table;
+ uint64_t data;
+ size_t idx = tag & mask;
+ UPB_ASSUME((idx & 7) == 0);
+ idx >>= 3;
+ data = table_p->fasttable[idx].field_data ^ tag;
+ return table_p->fasttable[idx].field_parser(d, ptr, msg, table, hasbits, data);
+}
+
+UPB_INLINE uint32_t fastdecode_loadtag(const char* ptr) {
+ uint16_t tag;
+ memcpy(&tag, ptr, 2);
+ return tag;
+}
+
+UPB_INLINE void decode_checklimit(upb_decstate *d) {
+ UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit));
+}
+
+UPB_INLINE int decode_pushlimit(upb_decstate *d, const char *ptr, int size) {
+ int limit = size + (int)(ptr - d->end);
+ int delta = d->limit - limit;
+ decode_checklimit(d);
+ d->limit = limit;
+ d->limit_ptr = d->end + UPB_MIN(0, limit);
+ decode_checklimit(d);
+ return delta;
+}
+
+UPB_INLINE void decode_poplimit(upb_decstate *d, const char *ptr,
+ int saved_delta) {
+ UPB_ASSERT(ptr - d->end == d->limit);
+ decode_checklimit(d);
+ d->limit += saved_delta;
+ d->limit_ptr = d->end + UPB_MIN(0, d->limit);
+ decode_checklimit(d);
+}
+
+#include "upb/port_undef.inc"
+
+#endif /* UPB_DECODE_INT_H_ */
diff --git a/contrib/libs/grpc/third_party/upb/upb/decode_fast.c b/contrib/libs/grpc/third_party/upb/upb/decode_fast.c
new file mode 100644
index 00000000000..f628e6dbd44
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/decode_fast.c
@@ -0,0 +1,1040 @@
+// Fast decoder: ~3x the speed of decode.c, but x86-64 specific.
+// Also the table size grows by 2x.
+//
+// Could potentially be ported to ARM64 or other 64-bit archs that pass at
+// least six arguments in registers.
+//
+// The overall design is to create specialized functions for every possible
+// field type (eg. oneof boolean field with a 1 byte tag) and then dispatch
+// to the specialized function as quickly as possible.
+
+#include "upb/decode_fast.h"
+
+#include "upb/decode.int.h"
+
+/* Must be last. */
+#include "upb/port_def.inc"
+
+#if UPB_FASTTABLE
+
+// The standard set of arguments passed to each parsing function.
+// Thanks to x86-64 calling conventions, these will stay in registers.
+#define UPB_PARSE_PARAMS \
+ upb_decstate *d, const char *ptr, upb_msg *msg, intptr_t table, \
+ uint64_t hasbits, uint64_t data
+
+#define UPB_PARSE_ARGS d, ptr, msg, table, hasbits, data
+
+#define RETURN_GENERIC(m) \
+ /* fprintf(stderr, m); */ \
+ return fastdecode_generic(d, ptr, msg, table, hasbits, 0);
+
+typedef enum {
+ CARD_s = 0, /* Singular (optional, non-repeated) */
+ CARD_o = 1, /* Oneof */
+ CARD_r = 2, /* Repeated */
+ CARD_p = 3 /* Packed Repeated */
+} upb_card;
+
+UPB_NOINLINE
+static const char *fastdecode_isdonefallback(upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table,
+ uint64_t hasbits, int overrun) {
+ ptr = decode_isdonefallback_inl(d, ptr, overrun);
+ if (ptr == NULL) {
+ return fastdecode_err(d);
+ }
+ uint16_t tag = fastdecode_loadtag(ptr);
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, tag);
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_dispatch(upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table,
+ uint64_t hasbits) {
+ if (UPB_UNLIKELY(ptr >= d->limit_ptr)) {
+ int overrun = ptr - d->end;
+ if (UPB_LIKELY(overrun == d->limit)) {
+ // Parse is finished.
+ *(uint32_t*)msg |= hasbits; // Sync hasbits.
+ return ptr;
+ } else {
+ return fastdecode_isdonefallback(d, ptr, msg, table, hasbits, overrun);
+ }
+ }
+
+ // Read two bytes of tag data (for a one-byte tag, the high byte is junk).
+ uint16_t tag = fastdecode_loadtag(ptr);
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, tag);
+}
+
+UPB_FORCEINLINE
+static bool fastdecode_checktag(uint64_t data, int tagbytes) {
+ if (tagbytes == 1) {
+ return (data & 0xff) == 0;
+ } else {
+ return (data & 0xffff) == 0;
+ }
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_longsize(const char *ptr, int *size) {
+ int i;
+ UPB_ASSERT(*size & 0x80);
+ *size &= 0xff;
+ for (i = 0; i < 3; i++) {
+ ptr++;
+ size_t byte = (uint8_t)ptr[-1];
+ *size += (byte - 1) << (7 + 7 * i);
+ if (UPB_LIKELY((byte & 0x80) == 0)) return ptr;
+ }
+ ptr++;
+ size_t byte = (uint8_t)ptr[-1];
+ // len is limited by 2gb not 4gb, hence 8 and not 16 as normally expected
+ // for a 32 bit varint.
+ if (UPB_UNLIKELY(byte >= 8)) return NULL;
+ *size += (byte - 1) << 28;
+ return ptr;
+}
+
+UPB_FORCEINLINE
+static bool fastdecode_boundscheck(const char *ptr, size_t len,
+ const char *end) {
+ uintptr_t uptr = (uintptr_t)ptr;
+ uintptr_t uend = (uintptr_t)end + 16;
+ uintptr_t res = uptr + len;
+ return res < uptr || res > uend;
+}
+
+UPB_FORCEINLINE
+static bool fastdecode_boundscheck2(const char *ptr, size_t len,
+ const char *end) {
+ // This is one extra branch compared to the more normal:
+ // return (size_t)(end - ptr) < size;
+ // However it is one less computation if we are just about to use "ptr + len":
+ // https://godbolt.org/z/35YGPz
+ // In microbenchmarks this shows an overall 4% improvement.
+ uintptr_t uptr = (uintptr_t)ptr;
+ uintptr_t uend = (uintptr_t)end;
+ uintptr_t res = uptr + len;
+ return res < uptr || res > uend;
+}
+
+typedef const char *fastdecode_delimfunc(upb_decstate *d, const char *ptr,
+ void *ctx);
+
+UPB_FORCEINLINE
+static const char *fastdecode_delimited(upb_decstate *d, const char *ptr,
+ fastdecode_delimfunc *func, void *ctx) {
+ ptr++;
+ int len = (int8_t)ptr[-1];
+ if (fastdecode_boundscheck2(ptr, len, d->limit_ptr)) {
+ // Slow case: Sub-message is >=128 bytes and/or exceeds the current buffer.
+ // If it exceeds the buffer limit, limit/limit_ptr will change during
+ // sub-message parsing, so we need to preserve delta, not limit.
+ if (UPB_UNLIKELY(len & 0x80)) {
+ // Size varint >1 byte (length >= 128).
+ ptr = fastdecode_longsize(ptr, &len);
+ if (!ptr) {
+ // Corrupt wire format: size exceeded INT_MAX.
+ return NULL;
+ }
+ }
+ if (ptr - d->end + (int)len > d->limit) {
+ // Corrupt wire format: invalid limit.
+ return NULL;
+ }
+ int delta = decode_pushlimit(d, ptr, len);
+ ptr = func(d, ptr, ctx);
+ decode_poplimit(d, ptr, delta);
+ } else {
+ // Fast case: Sub-message is <128 bytes and fits in the current buffer.
+ // This means we can preserve limit/limit_ptr verbatim.
+ const char *saved_limit_ptr = d->limit_ptr;
+ int saved_limit = d->limit;
+ d->limit_ptr = ptr + len;
+ d->limit = d->limit_ptr - d->end;
+ UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit));
+ ptr = func(d, ptr, ctx);
+ d->limit_ptr = saved_limit_ptr;
+ d->limit = saved_limit;
+ UPB_ASSERT(d->limit_ptr == d->end + UPB_MIN(0, d->limit));
+ }
+ return ptr;
+}
+
+/* singular, oneof, repeated field handling ***********************************/
+
+typedef struct {
+ upb_array *arr;
+ void *end;
+} fastdecode_arr;
+
+typedef enum {
+ FD_NEXT_ATLIMIT,
+ FD_NEXT_SAMEFIELD,
+ FD_NEXT_OTHERFIELD
+} fastdecode_next;
+
+typedef struct {
+ void *dst;
+ fastdecode_next next;
+ uint32_t tag;
+} fastdecode_nextret;
+
+UPB_FORCEINLINE
+static void *fastdecode_resizearr(upb_decstate *d, void *dst,
+ fastdecode_arr *farr, int valbytes) {
+ if (UPB_UNLIKELY(dst == farr->end)) {
+ size_t old_size = farr->arr->size;
+ size_t old_bytes = old_size * valbytes;
+ size_t new_size = old_size * 2;
+ size_t new_bytes = new_size * valbytes;
+ char *old_ptr = _upb_array_ptr(farr->arr);
+ char *new_ptr = upb_arena_realloc(&d->arena, old_ptr, old_bytes, new_bytes);
+ uint8_t elem_size_lg2 = __builtin_ctz(valbytes);
+ farr->arr->size = new_size;
+ farr->arr->data = _upb_array_tagptr(new_ptr, elem_size_lg2);
+ dst = (void*)(new_ptr + (old_size * valbytes));
+ farr->end = (void*)(new_ptr + (new_size * valbytes));
+ }
+ return dst;
+}
+
+UPB_FORCEINLINE
+static bool fastdecode_tagmatch(uint32_t tag, uint64_t data, int tagbytes) {
+ if (tagbytes == 1) {
+ return (uint8_t)tag == (uint8_t)data;
+ } else {
+ return (uint16_t)tag == (uint16_t)data;
+ }
+}
+
+UPB_FORCEINLINE
+static void fastdecode_commitarr(void *dst, fastdecode_arr *farr,
+ int valbytes) {
+ farr->arr->len =
+ (size_t)((char *)dst - (char *)_upb_array_ptr(farr->arr)) / valbytes;
+}
+
+UPB_FORCEINLINE
+static fastdecode_nextret fastdecode_nextrepeated(upb_decstate *d, void *dst,
+ const char **ptr,
+ fastdecode_arr *farr,
+ uint64_t data, int tagbytes,
+ int valbytes) {
+ fastdecode_nextret ret;
+ dst = (char *)dst + valbytes;
+
+ if (UPB_LIKELY(!decode_isdone(d, ptr))) {
+ ret.tag = fastdecode_loadtag(*ptr);
+ if (fastdecode_tagmatch(ret.tag, data, tagbytes)) {
+ ret.next = FD_NEXT_SAMEFIELD;
+ } else {
+ fastdecode_commitarr(dst, farr, valbytes);
+ ret.next = FD_NEXT_OTHERFIELD;
+ }
+ } else {
+ fastdecode_commitarr(dst, farr, valbytes);
+ ret.next = FD_NEXT_ATLIMIT;
+ }
+
+ ret.dst = dst;
+ return ret;
+}
+
+UPB_FORCEINLINE
+static void *fastdecode_fieldmem(upb_msg *msg, uint64_t data) {
+ size_t ofs = data >> 48;
+ return (char *)msg + ofs;
+}
+
+UPB_FORCEINLINE
+static void *fastdecode_getfield(upb_decstate *d, const char *ptr, upb_msg *msg,
+ uint64_t *data, uint64_t *hasbits,
+ fastdecode_arr *farr, int valbytes,
+ upb_card card) {
+ switch (card) {
+ case CARD_s: {
+ uint8_t hasbit_index = *data >> 24;
+ // Set hasbit and return pointer to scalar field.
+ *hasbits |= 1ull << hasbit_index;
+ return fastdecode_fieldmem(msg, *data);
+ }
+ case CARD_o: {
+ uint16_t case_ofs = *data >> 32;
+ uint32_t *oneof_case = UPB_PTR_AT(msg, case_ofs, uint32_t);
+ uint8_t field_number = *data >> 24;
+ *oneof_case = field_number;
+ return fastdecode_fieldmem(msg, *data);
+ }
+ case CARD_r: {
+ // Get pointer to upb_array and allocate/expand if necessary.
+ uint8_t elem_size_lg2 = __builtin_ctz(valbytes);
+ upb_array **arr_p = fastdecode_fieldmem(msg, *data);
+ char *begin;
+ *(uint32_t*)msg |= *hasbits;
+ *hasbits = 0;
+ if (UPB_LIKELY(!*arr_p)) {
+ farr->arr = _upb_array_new(&d->arena, 8, elem_size_lg2);
+ *arr_p = farr->arr;
+ } else {
+ farr->arr = *arr_p;
+ }
+ begin = _upb_array_ptr(farr->arr);
+ farr->end = begin + (farr->arr->size * valbytes);
+ *data = fastdecode_loadtag(ptr);
+ return begin + (farr->arr->len * valbytes);
+ }
+ default:
+ UPB_UNREACHABLE();
+ }
+}
+
+UPB_FORCEINLINE
+static bool fastdecode_flippacked(uint64_t *data, int tagbytes) {
+ *data ^= (0x2 ^ 0x0); // Patch data to match packed wiretype.
+ return fastdecode_checktag(*data, tagbytes);
+}
+
+/* varint fields **************************************************************/
+
+UPB_FORCEINLINE
+static uint64_t fastdecode_munge(uint64_t val, int valbytes, bool zigzag) {
+ if (valbytes == 1) {
+ return val != 0;
+ } else if (zigzag) {
+ if (valbytes == 4) {
+ uint32_t n = val;
+ return (n >> 1) ^ -(int32_t)(n & 1);
+ } else if (valbytes == 8) {
+ return (val >> 1) ^ -(int64_t)(val & 1);
+ }
+ UPB_UNREACHABLE();
+ }
+ return val;
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_varint64(const char *ptr, uint64_t *val) {
+ ptr++;
+ *val = (uint8_t)ptr[-1];
+ if (UPB_UNLIKELY(*val & 0x80)) {
+ int i;
+ for (i = 0; i < 8; i++) {
+ ptr++;
+ uint64_t byte = (uint8_t)ptr[-1];
+ *val += (byte - 1) << (7 + 7 * i);
+ if (UPB_LIKELY((byte & 0x80) == 0)) goto done;
+ }
+ ptr++;
+ uint64_t byte = (uint8_t)ptr[-1];
+ if (byte > 1) {
+ return NULL;
+ }
+ *val += (byte - 1) << 63;
+ }
+done:
+ UPB_ASSUME(ptr != NULL);
+ return ptr;
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_unpackedvarint(UPB_PARSE_PARAMS, int tagbytes,
+ int valbytes, upb_card card,
+ bool zigzag,
+ _upb_field_parser *packed) {
+ uint64_t val;
+ void *dst;
+ fastdecode_arr farr;
+
+ if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) {
+ if (card == CARD_r && fastdecode_flippacked(&data, tagbytes)) {
+ return packed(UPB_PARSE_ARGS);
+ }
+ RETURN_GENERIC("varint field tag mismatch\n");
+ }
+
+ dst =
+ fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, valbytes, card);
+ if (card == CARD_r) {
+ if (UPB_UNLIKELY(!dst)) {
+ RETURN_GENERIC("need array resize\n");
+ }
+ }
+
+again:
+ if (card == CARD_r) {
+ dst = fastdecode_resizearr(d, dst, &farr, valbytes);
+ }
+
+ ptr += tagbytes;
+ ptr = fastdecode_varint64(ptr, &val);
+ if (ptr == NULL) return fastdecode_err(d);
+ val = fastdecode_munge(val, valbytes, zigzag);
+ memcpy(dst, &val, valbytes);
+
+ if (card == CARD_r) {
+ fastdecode_nextret ret =
+ fastdecode_nextrepeated(d, dst, &ptr, &farr, data, tagbytes, valbytes);
+ switch (ret.next) {
+ case FD_NEXT_SAMEFIELD:
+ dst = ret.dst;
+ goto again;
+ case FD_NEXT_OTHERFIELD:
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, ret.tag);
+ case FD_NEXT_ATLIMIT:
+ return ptr;
+ }
+ }
+
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+}
+
+typedef struct {
+ uint8_t valbytes;
+ bool zigzag;
+ void *dst;
+ fastdecode_arr farr;
+} fastdecode_varintdata;
+
+UPB_FORCEINLINE
+static const char *fastdecode_topackedvarint(upb_decstate *d, const char *ptr,
+ void *ctx) {
+ fastdecode_varintdata *data = ctx;
+ void *dst = data->dst;
+ uint64_t val;
+
+ while (!decode_isdone(d, &ptr)) {
+ dst = fastdecode_resizearr(d, dst, &data->farr, data->valbytes);
+ ptr = fastdecode_varint64(ptr, &val);
+ if (ptr == NULL) return NULL;
+ val = fastdecode_munge(val, data->valbytes, data->zigzag);
+ memcpy(dst, &val, data->valbytes);
+ dst = (char *)dst + data->valbytes;
+ }
+
+ fastdecode_commitarr(dst, &data->farr, data->valbytes);
+ return ptr;
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_packedvarint(UPB_PARSE_PARAMS, int tagbytes,
+ int valbytes, bool zigzag,
+ _upb_field_parser *unpacked) {
+ fastdecode_varintdata ctx = {valbytes, zigzag};
+
+ if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) {
+ if (fastdecode_flippacked(&data, tagbytes)) {
+ return unpacked(UPB_PARSE_ARGS);
+ } else {
+ RETURN_GENERIC("varint field tag mismatch\n");
+ }
+ }
+
+ ctx.dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &ctx.farr,
+ valbytes, CARD_r);
+ if (UPB_UNLIKELY(!ctx.dst)) {
+ RETURN_GENERIC("need array resize\n");
+ }
+
+ ptr += tagbytes;
+ ptr = fastdecode_delimited(d, ptr, &fastdecode_topackedvarint, &ctx);
+
+ if (UPB_UNLIKELY(ptr == NULL)) {
+ return fastdecode_err(d);
+ }
+
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_varint(UPB_PARSE_PARAMS, int tagbytes,
+ int valbytes, upb_card card, bool zigzag,
+ _upb_field_parser *unpacked,
+ _upb_field_parser *packed) {
+ if (card == CARD_p) {
+ return fastdecode_packedvarint(UPB_PARSE_ARGS, tagbytes, valbytes, zigzag,
+ unpacked);
+ } else {
+ return fastdecode_unpackedvarint(UPB_PARSE_ARGS, tagbytes, valbytes, card,
+ zigzag, packed);
+ }
+}
+
+#define z_ZZ true
+#define b_ZZ false
+#define v_ZZ false
+
+/* Generate all combinations:
+ * {s,o,r,p} x {b1,v4,z4,v8,z8} x {1bt,2bt} */
+
+#define F(card, type, valbytes, tagbytes) \
+ UPB_NOINLINE \
+ const char *upb_p##card##type##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS) { \
+ return fastdecode_varint(UPB_PARSE_ARGS, tagbytes, valbytes, CARD_##card, \
+ type##_ZZ, \
+ &upb_pr##type##valbytes##_##tagbytes##bt, \
+ &upb_pp##type##valbytes##_##tagbytes##bt); \
+ }
+
+#define TYPES(card, tagbytes) \
+ F(card, b, 1, tagbytes) \
+ F(card, v, 4, tagbytes) \
+ F(card, v, 8, tagbytes) \
+ F(card, z, 4, tagbytes) \
+ F(card, z, 8, tagbytes)
+
+#define TAGBYTES(card) \
+ TYPES(card, 1) \
+ TYPES(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+TAGBYTES(p)
+
+#undef z_ZZ
+#undef b_ZZ
+#undef v_ZZ
+#undef o_ONEOF
+#undef s_ONEOF
+#undef r_ONEOF
+#undef F
+#undef TYPES
+#undef TAGBYTES
+
+
+/* fixed fields ***************************************************************/
+
+UPB_FORCEINLINE
+static const char *fastdecode_unpackedfixed(UPB_PARSE_PARAMS, int tagbytes,
+ int valbytes, upb_card card,
+ _upb_field_parser *packed) {
+ void *dst;
+ fastdecode_arr farr;
+
+ if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) {
+ if (card == CARD_r && fastdecode_flippacked(&data, tagbytes)) {
+ return packed(UPB_PARSE_ARGS);
+ }
+ RETURN_GENERIC("fixed field tag mismatch\n");
+ }
+
+ dst =
+ fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr, valbytes, card);
+ if (card == CARD_r) {
+ if (UPB_UNLIKELY(!dst)) {
+ RETURN_GENERIC("couldn't allocate array in arena\n");
+ }
+ }
+
+
+again:
+ if (card == CARD_r) {
+ dst = fastdecode_resizearr(d, dst, &farr, valbytes);
+ }
+
+ ptr += tagbytes;
+ memcpy(dst, ptr, valbytes);
+ ptr += valbytes;
+
+ if (card == CARD_r) {
+ fastdecode_nextret ret =
+ fastdecode_nextrepeated(d, dst, &ptr, &farr, data, tagbytes, valbytes);
+ switch (ret.next) {
+ case FD_NEXT_SAMEFIELD:
+ dst = ret.dst;
+ goto again;
+ case FD_NEXT_OTHERFIELD:
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, ret.tag);
+ case FD_NEXT_ATLIMIT:
+ return ptr;
+ }
+ }
+
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_packedfixed(UPB_PARSE_PARAMS, int tagbytes,
+ int valbytes,
+ _upb_field_parser *unpacked) {
+ if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) {
+ if (fastdecode_flippacked(&data, tagbytes)) {
+ return unpacked(UPB_PARSE_ARGS);
+ } else {
+ RETURN_GENERIC("varint field tag mismatch\n");
+ }
+ }
+
+ ptr += tagbytes;
+ int size = (uint8_t)ptr[0];
+ ptr++;
+ if (size & 0x80) {
+ ptr = fastdecode_longsize(ptr, &size);
+ }
+
+ if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->limit_ptr)) ||
+ (size % valbytes) != 0) {
+ return fastdecode_err(d);
+ }
+
+ upb_array **arr_p = fastdecode_fieldmem(msg, data);
+ upb_array *arr = *arr_p;
+ uint8_t elem_size_lg2 = __builtin_ctz(valbytes);
+ int elems = size / valbytes;
+
+ if (UPB_LIKELY(!arr)) {
+ *arr_p = arr = _upb_array_new(&d->arena, elems, elem_size_lg2);
+ if (!arr) {
+ return fastdecode_err(d);
+ }
+ } else {
+ _upb_array_resize(arr, elems, &d->arena);
+ }
+
+ char *dst = _upb_array_ptr(arr);
+ memcpy(dst, ptr, size);
+ arr->len = elems;
+
+ return fastdecode_dispatch(d, ptr + size, msg, table, hasbits);
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_fixed(UPB_PARSE_PARAMS, int tagbytes,
+ int valbytes, upb_card card,
+ _upb_field_parser *unpacked,
+ _upb_field_parser *packed) {
+ if (card == CARD_p) {
+ return fastdecode_packedfixed(UPB_PARSE_ARGS, tagbytes, valbytes, unpacked);
+ } else {
+ return fastdecode_unpackedfixed(UPB_PARSE_ARGS, tagbytes, valbytes, card,
+ packed);
+ }
+}
+
+/* Generate all combinations:
+ * {s,o,r,p} x {f4,f8} x {1bt,2bt} */
+
+#define F(card, valbytes, tagbytes) \
+ UPB_NOINLINE \
+ const char *upb_p##card##f##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS) { \
+ return fastdecode_fixed(UPB_PARSE_ARGS, tagbytes, valbytes, CARD_##card, \
+ &upb_ppf##valbytes##_##tagbytes##bt, \
+ &upb_prf##valbytes##_##tagbytes##bt); \
+ }
+
+#define TYPES(card, tagbytes) \
+ F(card, 4, tagbytes) \
+ F(card, 8, tagbytes)
+
+#define TAGBYTES(card) \
+ TYPES(card, 1) \
+ TYPES(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+TAGBYTES(p)
+
+#undef F
+#undef TYPES
+#undef TAGBYTES
+
+/* string fields **************************************************************/
+
+typedef const char *fastdecode_copystr_func(struct upb_decstate *d,
+ const char *ptr, upb_msg *msg,
+ const upb_msglayout *table,
+ uint64_t hasbits, upb_strview *dst);
+
+UPB_NOINLINE
+static const char *fastdecode_verifyutf8(upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table,
+ uint64_t hasbits, upb_strview *dst) {
+ if (!decode_verifyutf8_inl(dst->data, dst->size)) {
+ return fastdecode_err(d);
+ }
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_longstring(struct upb_decstate *d,
+ const char *ptr, upb_msg *msg,
+ intptr_t table, uint64_t hasbits,
+ upb_strview *dst,
+ bool validate_utf8) {
+ int size = (uint8_t)ptr[0]; // Could plumb through hasbits.
+ ptr++;
+ if (size & 0x80) {
+ ptr = fastdecode_longsize(ptr, &size);
+ }
+
+ if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->limit_ptr))) {
+ dst->size = 0;
+ return fastdecode_err(d);
+ }
+
+ if (d->alias) {
+ dst->data = ptr;
+ dst->size = size;
+ } else {
+ char *data = upb_arena_malloc(&d->arena, size);
+ if (!data) {
+ return fastdecode_err(d);
+ }
+ memcpy(data, ptr, size);
+ dst->data = data;
+ dst->size = size;
+ }
+
+ if (validate_utf8) {
+ return fastdecode_verifyutf8(d, ptr + size, msg, table, hasbits, dst);
+ } else {
+ return fastdecode_dispatch(d, ptr + size, msg, table, hasbits);
+ }
+}
+
+UPB_NOINLINE
+static const char *fastdecode_longstring_utf8(struct upb_decstate *d,
+ const char *ptr, upb_msg *msg,
+ intptr_t table, uint64_t hasbits,
+ upb_strview *dst) {
+ return fastdecode_longstring(d, ptr, msg, table, hasbits, dst, true);
+}
+
+UPB_NOINLINE
+static const char *fastdecode_longstring_noutf8(struct upb_decstate *d,
+ const char *ptr, upb_msg *msg,
+ intptr_t table,
+ uint64_t hasbits,
+ upb_strview *dst) {
+ return fastdecode_longstring(d, ptr, msg, table, hasbits, dst, false);
+}
+
+UPB_FORCEINLINE
+static void fastdecode_docopy(upb_decstate *d, const char *ptr, uint32_t size,
+ int copy, char *data, upb_strview *dst) {
+ d->arena.head.ptr += copy;
+ dst->data = data;
+ UPB_UNPOISON_MEMORY_REGION(data, copy);
+ memcpy(data, ptr, copy);
+ UPB_POISON_MEMORY_REGION(data + size, copy - size);
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_copystring(UPB_PARSE_PARAMS, int tagbytes,
+ upb_card card, bool validate_utf8) {
+ upb_strview *dst;
+ fastdecode_arr farr;
+ int64_t size;
+ size_t arena_has;
+ size_t common_has;
+ char *buf;
+
+ UPB_ASSERT(!d->alias);
+ UPB_ASSERT(fastdecode_checktag(data, tagbytes));
+
+ dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr,
+ sizeof(upb_strview), card);
+
+again:
+ if (card == CARD_r) {
+ dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_strview));
+ }
+
+ size = (uint8_t)ptr[tagbytes];
+ ptr += tagbytes + 1;
+ dst->size = size;
+
+ buf = d->arena.head.ptr;
+ arena_has = _upb_arenahas(&d->arena);
+ common_has = UPB_MIN(arena_has, (d->end - ptr) + 16);
+
+ if (UPB_LIKELY(size <= 15 - tagbytes)) {
+ if (arena_has < 16) goto longstr;
+ d->arena.head.ptr += 16;
+ memcpy(buf, ptr - tagbytes - 1, 16);
+ dst->data = buf + tagbytes + 1;
+ } else if (UPB_LIKELY(size <= 32)) {
+ if (UPB_UNLIKELY(common_has < 32)) goto longstr;
+ fastdecode_docopy(d, ptr, size, 32, buf, dst);
+ } else if (UPB_LIKELY(size <= 64)) {
+ if (UPB_UNLIKELY(common_has < 64)) goto longstr;
+ fastdecode_docopy(d, ptr, size, 64, buf, dst);
+ } else if (UPB_LIKELY(size < 128)) {
+ if (UPB_UNLIKELY(common_has < 128)) goto longstr;
+ fastdecode_docopy(d, ptr, size, 128, buf, dst);
+ } else {
+ goto longstr;
+ }
+
+ ptr += size;
+
+ if (card == CARD_r) {
+ if (validate_utf8 && !decode_verifyutf8_inl(dst->data, dst->size)) {
+ return fastdecode_err(d);
+ }
+ fastdecode_nextret ret = fastdecode_nextrepeated(
+ d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_strview));
+ switch (ret.next) {
+ case FD_NEXT_SAMEFIELD:
+ dst = ret.dst;
+ goto again;
+ case FD_NEXT_OTHERFIELD:
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, ret.tag);
+ case FD_NEXT_ATLIMIT:
+ return ptr;
+ }
+ }
+
+ if (card != CARD_r && validate_utf8) {
+ return fastdecode_verifyutf8(d, ptr, msg, table, hasbits, dst);
+ }
+
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+
+longstr:
+ ptr--;
+ if (validate_utf8) {
+ return fastdecode_longstring_utf8(d, ptr, msg, table, hasbits, dst);
+ } else {
+ return fastdecode_longstring_noutf8(d, ptr, msg, table, hasbits, dst);
+ }
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_string(UPB_PARSE_PARAMS, int tagbytes,
+ upb_card card, _upb_field_parser *copyfunc,
+ bool validate_utf8) {
+ upb_strview *dst;
+ fastdecode_arr farr;
+ int64_t size;
+
+ if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) {
+ RETURN_GENERIC("string field tag mismatch\n");
+ }
+
+ if (UPB_UNLIKELY(!d->alias)) {
+ return copyfunc(UPB_PARSE_ARGS);
+ }
+
+ dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr,
+ sizeof(upb_strview), card);
+
+again:
+ if (card == CARD_r) {
+ dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_strview));
+ }
+
+ size = (int8_t)ptr[tagbytes];
+ ptr += tagbytes + 1;
+ dst->data = ptr;
+ dst->size = size;
+
+ if (UPB_UNLIKELY(fastdecode_boundscheck(ptr, size, d->end))) {
+ ptr--;
+ if (validate_utf8) {
+ return fastdecode_longstring_utf8(d, ptr, msg, table, hasbits, dst);
+ } else {
+ return fastdecode_longstring_noutf8(d, ptr, msg, table, hasbits, dst);
+ }
+ }
+
+ ptr += size;
+
+ if (card == CARD_r) {
+ if (validate_utf8 && !decode_verifyutf8_inl(dst->data, dst->size)) {
+ return fastdecode_err(d);
+ }
+ fastdecode_nextret ret = fastdecode_nextrepeated(
+ d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_strview));
+ switch (ret.next) {
+ case FD_NEXT_SAMEFIELD:
+ dst = ret.dst;
+ if (UPB_UNLIKELY(!d->alias)) {
+ // Buffer flipped and we can't alias any more. Bounce to copyfunc(),
+ // but via dispatch since we need to reload table data also.
+ fastdecode_commitarr(dst, &farr, sizeof(upb_strview));
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, ret.tag);
+ }
+ goto again;
+ case FD_NEXT_OTHERFIELD:
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, ret.tag);
+ case FD_NEXT_ATLIMIT:
+ return ptr;
+ }
+ }
+
+ if (card != CARD_r && validate_utf8) {
+ return fastdecode_verifyutf8(d, ptr, msg, table, hasbits, dst);
+ }
+
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+}
+
+/* Generate all combinations:
+ * {p,c} x {s,o,r} x {s, b} x {1bt,2bt} */
+
+#define s_VALIDATE true
+#define b_VALIDATE false
+
+#define F(card, tagbytes, type) \
+ UPB_NOINLINE \
+ const char *upb_c##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS) { \
+ return fastdecode_copystring(UPB_PARSE_ARGS, tagbytes, CARD_##card, \
+ type##_VALIDATE); \
+ } \
+ const char *upb_p##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS) { \
+ return fastdecode_string(UPB_PARSE_ARGS, tagbytes, CARD_##card, \
+ &upb_c##card##type##_##tagbytes##bt, \
+ type##_VALIDATE); \
+ }
+
+#define UTF8(card, tagbytes) \
+ F(card, tagbytes, s) \
+ F(card, tagbytes, b)
+
+#define TAGBYTES(card) \
+ UTF8(card, 1) \
+ UTF8(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+
+#undef s_VALIDATE
+#undef b_VALIDATE
+#undef F
+#undef TAGBYTES
+
+/* message fields *************************************************************/
+
+UPB_INLINE
+upb_msg *decode_newmsg_ceil(upb_decstate *d, const upb_msglayout *l,
+ int msg_ceil_bytes) {
+ size_t size = l->size + sizeof(upb_msg_internal);
+ char *msg_data;
+ if (UPB_LIKELY(msg_ceil_bytes > 0 &&
+ _upb_arenahas(&d->arena) >= msg_ceil_bytes)) {
+ UPB_ASSERT(size <= (size_t)msg_ceil_bytes);
+ msg_data = d->arena.head.ptr;
+ d->arena.head.ptr += size;
+ UPB_UNPOISON_MEMORY_REGION(msg_data, msg_ceil_bytes);
+ memset(msg_data, 0, msg_ceil_bytes);
+ UPB_POISON_MEMORY_REGION(msg_data + size, msg_ceil_bytes - size);
+ } else {
+ msg_data = (char*)upb_arena_malloc(&d->arena, size);
+ memset(msg_data, 0, size);
+ }
+ return msg_data + sizeof(upb_msg_internal);
+}
+
+typedef struct {
+ intptr_t table;
+ upb_msg *msg;
+} fastdecode_submsgdata;
+
+UPB_FORCEINLINE
+static const char *fastdecode_tosubmsg(upb_decstate *d, const char *ptr,
+ void *ctx) {
+ fastdecode_submsgdata *submsg = ctx;
+ ptr = fastdecode_dispatch(d, ptr, submsg->msg, submsg->table, 0);
+ UPB_ASSUME(ptr != NULL);
+ return ptr;
+}
+
+UPB_FORCEINLINE
+static const char *fastdecode_submsg(UPB_PARSE_PARAMS, int tagbytes,
+ int msg_ceil_bytes, upb_card card) {
+
+ if (UPB_UNLIKELY(!fastdecode_checktag(data, tagbytes))) {
+ RETURN_GENERIC("submessage field tag mismatch\n");
+ }
+
+ if (--d->depth == 0) return fastdecode_err(d);
+
+ upb_msg **dst;
+ uint32_t submsg_idx = (data >> 16) & 0xff;
+ const upb_msglayout *tablep = decode_totablep(table);
+ const upb_msglayout *subtablep = tablep->submsgs[submsg_idx];
+ fastdecode_submsgdata submsg = {decode_totable(subtablep)};
+ fastdecode_arr farr;
+
+ if (subtablep->table_mask == (uint8_t)-1) {
+ RETURN_GENERIC("submessage doesn't have fast tables.");
+ }
+
+ dst = fastdecode_getfield(d, ptr, msg, &data, &hasbits, &farr,
+ sizeof(upb_msg *), card);
+
+ if (card == CARD_s) {
+ *(uint32_t*)msg |= hasbits;
+ hasbits = 0;
+ }
+
+again:
+ if (card == CARD_r) {
+ dst = fastdecode_resizearr(d, dst, &farr, sizeof(upb_msg*));
+ }
+
+ submsg.msg = *dst;
+
+ if (card == CARD_r || UPB_LIKELY(!submsg.msg)) {
+ *dst = submsg.msg = decode_newmsg_ceil(d, subtablep, msg_ceil_bytes);
+ }
+
+ ptr += tagbytes;
+ ptr = fastdecode_delimited(d, ptr, fastdecode_tosubmsg, &submsg);
+
+ if (UPB_UNLIKELY(ptr == NULL || d->end_group != DECODE_NOGROUP)) {
+ return fastdecode_err(d);
+ }
+
+ if (card == CARD_r) {
+ fastdecode_nextret ret = fastdecode_nextrepeated(
+ d, dst, &ptr, &farr, data, tagbytes, sizeof(upb_msg *));
+ switch (ret.next) {
+ case FD_NEXT_SAMEFIELD:
+ dst = ret.dst;
+ goto again;
+ case FD_NEXT_OTHERFIELD:
+ d->depth++;
+ return fastdecode_tagdispatch(d, ptr, msg, table, hasbits, ret.tag);
+ case FD_NEXT_ATLIMIT:
+ d->depth++;
+ return ptr;
+ }
+ }
+
+ d->depth++;
+ return fastdecode_dispatch(d, ptr, msg, table, hasbits);
+}
+
+#define F(card, tagbytes, size_ceil, ceil_arg) \
+ const char *upb_p##card##m_##tagbytes##bt_max##size_ceil##b( \
+ UPB_PARSE_PARAMS) { \
+ return fastdecode_submsg(UPB_PARSE_ARGS, tagbytes, ceil_arg, CARD_##card); \
+ }
+
+#define SIZES(card, tagbytes) \
+ F(card, tagbytes, 64, 64) \
+ F(card, tagbytes, 128, 128) \
+ F(card, tagbytes, 192, 192) \
+ F(card, tagbytes, 256, 256) \
+ F(card, tagbytes, max, -1)
+
+#define TAGBYTES(card) \
+ SIZES(card, 1) \
+ SIZES(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+
+#undef TAGBYTES
+#undef SIZES
+#undef F
+
+#endif /* UPB_FASTTABLE */
diff --git a/contrib/libs/grpc/third_party/upb/upb/decode_fast.h b/contrib/libs/grpc/third_party/upb/upb/decode_fast.h
new file mode 100644
index 00000000000..6d56d124770
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/decode_fast.h
@@ -0,0 +1,126 @@
+// These are the specialized field parser functions for the fast parser.
+// Generated tables will refer to these by name.
+//
+// The function names are encoded with names like:
+//
+// // 123 4
+// upb_pss_1bt(); // Parse singular string, 1 byte tag.
+//
+// In position 1:
+// - 'p' for parse, most function use this
+// - 'c' for copy, for when we are copying strings instead of aliasing
+//
+// In position 2 (cardinality):
+// - 's' for singular, with or without hasbit
+// - 'o' for oneof
+// - 'r' for non-packed repeated
+// - 'p' for packed repeated
+//
+// In position 3 (type):
+// - 'b1' for bool
+// - 'v4' for 4-byte varint
+// - 'v8' for 8-byte varint
+// - 'z4' for zig-zag-encoded 4-byte varint
+// - 'z8' for zig-zag-encoded 8-byte varint
+// - 'f4' for 4-byte fixed
+// - 'f8' for 8-byte fixed
+// - 'm' for sub-message
+// - 's' for string (validate UTF-8)
+// - 'b' for bytes
+//
+// In position 4 (tag length):
+// - '1' for one-byte tags (field numbers 1-15)
+// - '2' for two-byte tags (field numbers 16-2048)
+
+#ifndef UPB_DECODE_FAST_H_
+#define UPB_DECODE_FAST_H_
+
+#include "upb/msg.h"
+
+struct upb_decstate;
+
+// The fallback, generic parsing function that can handle any field type.
+// This just uses the regular (non-fast) parser to parse a single field.
+const char *fastdecode_generic(struct upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table, uint64_t hasbits,
+ uint64_t data);
+
+#define UPB_PARSE_PARAMS \
+ struct upb_decstate *d, const char *ptr, upb_msg *msg, intptr_t table, \
+ uint64_t hasbits, uint64_t data
+
+/* primitive fields ***********************************************************/
+
+#define F(card, type, valbytes, tagbytes) \
+ const char *upb_p##card##type##valbytes##_##tagbytes##bt(UPB_PARSE_PARAMS);
+
+#define TYPES(card, tagbytes) \
+ F(card, b, 1, tagbytes) \
+ F(card, v, 4, tagbytes) \
+ F(card, v, 8, tagbytes) \
+ F(card, z, 4, tagbytes) \
+ F(card, z, 8, tagbytes) \
+ F(card, f, 4, tagbytes) \
+ F(card, f, 8, tagbytes)
+
+#define TAGBYTES(card) \
+ TYPES(card, 1) \
+ TYPES(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+TAGBYTES(p)
+
+#undef F
+#undef TYPES
+#undef TAGBYTES
+
+/* string fields **************************************************************/
+
+#define F(card, tagbytes, type) \
+ const char *upb_p##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS); \
+ const char *upb_c##card##type##_##tagbytes##bt(UPB_PARSE_PARAMS);
+
+#define UTF8(card, tagbytes) \
+ F(card, tagbytes, s) \
+ F(card, tagbytes, b)
+
+#define TAGBYTES(card) \
+ UTF8(card, 1) \
+ UTF8(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+
+#undef F
+#undef TAGBYTES
+
+/* sub-message fields *********************************************************/
+
+#define F(card, tagbytes, size_ceil, ceil_arg) \
+ const char *upb_p##card##m_##tagbytes##bt_max##size_ceil##b(UPB_PARSE_PARAMS);
+
+#define SIZES(card, tagbytes) \
+ F(card, tagbytes, 64, 64) \
+ F(card, tagbytes, 128, 128) \
+ F(card, tagbytes, 192, 192) \
+ F(card, tagbytes, 256, 256) \
+ F(card, tagbytes, max, -1)
+
+#define TAGBYTES(card) \
+ SIZES(card, 1) \
+ SIZES(card, 2)
+
+TAGBYTES(s)
+TAGBYTES(o)
+TAGBYTES(r)
+
+#undef TAGBYTES
+#undef SIZES
+#undef F
+
+#undef UPB_PARSE_PARAMS
+
+#endif /* UPB_DECODE_FAST_H_ */
diff --git a/contrib/libs/grpc/third_party/upb/upb/def.c b/contrib/libs/grpc/third_party/upb/upb/def.c
new file mode 100644
index 00000000000..4ba553a69cb
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/def.c
@@ -0,0 +1,2178 @@
+
+#include "upb/def.h"
+
+#include <ctype.h>
+#include <errno.h>
+#include <setjmp.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "google/protobuf/descriptor.upb.h"
+#include "upb/port_def.inc"
+
+typedef struct {
+ size_t len;
+ char str[1]; /* Null-terminated string data follows. */
+} str_t;
+
+struct upb_fielddef {
+ const upb_filedef *file;
+ const upb_msgdef *msgdef;
+ const char *full_name;
+ const char *json_name;
+ union {
+ int64_t sint;
+ uint64_t uint;
+ double dbl;
+ float flt;
+ bool boolean;
+ str_t *str;
+ } defaultval;
+ const upb_oneofdef *oneof;
+ union {
+ const upb_msgdef *msgdef;
+ const upb_enumdef *enumdef;
+ const google_protobuf_FieldDescriptorProto *unresolved;
+ } sub;
+ uint32_t number_;
+ uint16_t index_;
+ uint16_t layout_index;
+ uint32_t selector_base; /* Used to index into a upb::Handlers table. */
+ bool is_extension_;
+ bool lazy_;
+ bool packed_;
+ bool proto3_optional_;
+ upb_descriptortype_t type_;
+ upb_label_t label_;
+};
+
+struct upb_msgdef {
+ const upb_msglayout *layout;
+ const upb_filedef *file;
+ const char *full_name;
+ uint32_t selector_count;
+ uint32_t submsg_field_count;
+
+ /* Tables for looking up fields by number and name. */
+ upb_inttable itof;
+ upb_strtable ntof;
+
+ const upb_fielddef *fields;
+ const upb_oneofdef *oneofs;
+ int field_count;
+ int oneof_count;
+ int real_oneof_count;
+
+ /* Is this a map-entry message? */
+ bool map_entry;
+ upb_wellknowntype_t well_known_type;
+
+ /* TODO(haberman): proper extension ranges (there can be multiple). */
+};
+
+struct upb_enumdef {
+ const upb_filedef *file;
+ const char *full_name;
+ upb_strtable ntoi;
+ upb_inttable iton;
+ int32_t defaultval;
+};
+
+struct upb_oneofdef {
+ const upb_msgdef *parent;
+ const char *full_name;
+ int field_count;
+ bool synthetic;
+ const upb_fielddef **fields;
+ upb_strtable ntof;
+ upb_inttable itof;
+};
+
+struct upb_filedef {
+ const char *name;
+ const char *package;
+ const char *phpprefix;
+ const char *phpnamespace;
+
+ const upb_filedef **deps;
+ const upb_msgdef *msgs;
+ const upb_enumdef *enums;
+ const upb_fielddef *exts;
+ const upb_symtab *symtab;
+
+ int dep_count;
+ int msg_count;
+ int enum_count;
+ int ext_count;
+ upb_syntax_t syntax;
+};
+
+struct upb_symtab {
+ upb_arena *arena;
+ upb_strtable syms; /* full_name -> packed def ptr */
+ upb_strtable files; /* file_name -> upb_filedef* */
+ size_t bytes_loaded;
+};
+
+/* Inside a symtab we store tagged pointers to specific def types. */
+typedef enum {
+ UPB_DEFTYPE_FIELD = 0,
+
+ /* Only inside symtab table. */
+ UPB_DEFTYPE_MSG = 1,
+ UPB_DEFTYPE_ENUM = 2,
+
+ /* Only inside message table. */
+ UPB_DEFTYPE_ONEOF = 1,
+ UPB_DEFTYPE_FIELD_JSONNAME = 2
+} upb_deftype_t;
+
+static const void *unpack_def(upb_value v, upb_deftype_t type) {
+ uintptr_t num = (uintptr_t)upb_value_getconstptr(v);
+ return (num & 3) == type ? (const void*)(num & ~3) : NULL;
+}
+
+static upb_value pack_def(const void *ptr, upb_deftype_t type) {
+ uintptr_t num = (uintptr_t)ptr | type;
+ return upb_value_constptr((const void*)num);
+}
+
+/* isalpha() etc. from <ctype.h> are locale-dependent, which we don't want. */
+static bool upb_isbetween(char c, char low, char high) {
+ return c >= low && c <= high;
+}
+
+static bool upb_isletter(char c) {
+ return upb_isbetween(c, 'A', 'Z') || upb_isbetween(c, 'a', 'z') || c == '_';
+}
+
+static bool upb_isalphanum(char c) {
+ return upb_isletter(c) || upb_isbetween(c, '0', '9');
+}
+
+static const char *shortdefname(const char *fullname) {
+ const char *p;
+
+ if (fullname == NULL) {
+ return NULL;
+ } else if ((p = strrchr(fullname, '.')) == NULL) {
+ /* No '.' in the name, return the full string. */
+ return fullname;
+ } else {
+ /* Return one past the last '.'. */
+ return p + 1;
+ }
+}
+
+/* All submessage fields are lower than all other fields.
+ * Secondly, fields are increasing in order. */
+uint32_t field_rank(const upb_fielddef *f) {
+ uint32_t ret = upb_fielddef_number(f);
+ const uint32_t high_bit = 1 << 30;
+ UPB_ASSERT(ret < high_bit);
+ if (!upb_fielddef_issubmsg(f))
+ ret |= high_bit;
+ return ret;
+}
+
+int cmp_fields(const void *p1, const void *p2) {
+ const upb_fielddef *f1 = *(upb_fielddef*const*)p1;
+ const upb_fielddef *f2 = *(upb_fielddef*const*)p2;
+ return field_rank(f1) - field_rank(f2);
+}
+
+/* A few implementation details of handlers. We put these here to avoid
+ * a def -> handlers dependency. */
+
+#define UPB_STATIC_SELECTOR_COUNT 3 /* Warning: also in upb/handlers.h. */
+
+static uint32_t upb_handlers_selectorbaseoffset(const upb_fielddef *f) {
+ return upb_fielddef_isseq(f) ? 2 : 0;
+}
+
+static uint32_t upb_handlers_selectorcount(const upb_fielddef *f) {
+ uint32_t ret = 1;
+ if (upb_fielddef_isseq(f)) ret += 2; /* STARTSEQ/ENDSEQ */
+ if (upb_fielddef_isstring(f)) ret += 2; /* [STRING]/STARTSTR/ENDSTR */
+ if (upb_fielddef_issubmsg(f)) {
+ /* ENDSUBMSG (STARTSUBMSG is at table beginning) */
+ ret += 0;
+ if (upb_fielddef_lazy(f)) {
+ /* STARTSTR/ENDSTR/STRING (for lazy) */
+ ret += 3;
+ }
+ }
+ return ret;
+}
+
+static void upb_status_setoom(upb_status *status) {
+ upb_status_seterrmsg(status, "out of memory");
+}
+
+static void assign_msg_wellknowntype(upb_msgdef *m) {
+ const char *name = upb_msgdef_fullname(m);
+ if (name == NULL) {
+ m->well_known_type = UPB_WELLKNOWN_UNSPECIFIED;
+ return;
+ }
+ if (!strcmp(name, "google.protobuf.Any")) {
+ m->well_known_type = UPB_WELLKNOWN_ANY;
+ } else if (!strcmp(name, "google.protobuf.FieldMask")) {
+ m->well_known_type = UPB_WELLKNOWN_FIELDMASK;
+ } else if (!strcmp(name, "google.protobuf.Duration")) {
+ m->well_known_type = UPB_WELLKNOWN_DURATION;
+ } else if (!strcmp(name, "google.protobuf.Timestamp")) {
+ m->well_known_type = UPB_WELLKNOWN_TIMESTAMP;
+ } else if (!strcmp(name, "google.protobuf.DoubleValue")) {
+ m->well_known_type = UPB_WELLKNOWN_DOUBLEVALUE;
+ } else if (!strcmp(name, "google.protobuf.FloatValue")) {
+ m->well_known_type = UPB_WELLKNOWN_FLOATVALUE;
+ } else if (!strcmp(name, "google.protobuf.Int64Value")) {
+ m->well_known_type = UPB_WELLKNOWN_INT64VALUE;
+ } else if (!strcmp(name, "google.protobuf.UInt64Value")) {
+ m->well_known_type = UPB_WELLKNOWN_UINT64VALUE;
+ } else if (!strcmp(name, "google.protobuf.Int32Value")) {
+ m->well_known_type = UPB_WELLKNOWN_INT32VALUE;
+ } else if (!strcmp(name, "google.protobuf.UInt32Value")) {
+ m->well_known_type = UPB_WELLKNOWN_UINT32VALUE;
+ } else if (!strcmp(name, "google.protobuf.BoolValue")) {
+ m->well_known_type = UPB_WELLKNOWN_BOOLVALUE;
+ } else if (!strcmp(name, "google.protobuf.StringValue")) {
+ m->well_known_type = UPB_WELLKNOWN_STRINGVALUE;
+ } else if (!strcmp(name, "google.protobuf.BytesValue")) {
+ m->well_known_type = UPB_WELLKNOWN_BYTESVALUE;
+ } else if (!strcmp(name, "google.protobuf.Value")) {
+ m->well_known_type = UPB_WELLKNOWN_VALUE;
+ } else if (!strcmp(name, "google.protobuf.ListValue")) {
+ m->well_known_type = UPB_WELLKNOWN_LISTVALUE;
+ } else if (!strcmp(name, "google.protobuf.Struct")) {
+ m->well_known_type = UPB_WELLKNOWN_STRUCT;
+ } else {
+ m->well_known_type = UPB_WELLKNOWN_UNSPECIFIED;
+ }
+}
+
+
+/* upb_enumdef ****************************************************************/
+
+const char *upb_enumdef_fullname(const upb_enumdef *e) {
+ return e->full_name;
+}
+
+const char *upb_enumdef_name(const upb_enumdef *e) {
+ return shortdefname(e->full_name);
+}
+
+const upb_filedef *upb_enumdef_file(const upb_enumdef *e) {
+ return e->file;
+}
+
+int32_t upb_enumdef_default(const upb_enumdef *e) {
+ UPB_ASSERT(upb_enumdef_iton(e, e->defaultval));
+ return e->defaultval;
+}
+
+int upb_enumdef_numvals(const upb_enumdef *e) {
+ return (int)upb_strtable_count(&e->ntoi);
+}
+
+void upb_enum_begin(upb_enum_iter *i, const upb_enumdef *e) {
+ /* We iterate over the ntoi table, to account for duplicate numbers. */
+ upb_strtable_begin(i, &e->ntoi);
+}
+
+void upb_enum_next(upb_enum_iter *iter) { upb_strtable_next(iter); }
+bool upb_enum_done(upb_enum_iter *iter) { return upb_strtable_done(iter); }
+
+bool upb_enumdef_ntoi(const upb_enumdef *def, const char *name,
+ size_t len, int32_t *num) {
+ upb_value v;
+ if (!upb_strtable_lookup2(&def->ntoi, name, len, &v)) {
+ return false;
+ }
+ if (num) *num = upb_value_getint32(v);
+ return true;
+}
+
+const char *upb_enumdef_iton(const upb_enumdef *def, int32_t num) {
+ upb_value v;
+ return upb_inttable_lookup32(&def->iton, num, &v) ?
+ upb_value_getcstr(v) : NULL;
+}
+
+const char *upb_enum_iter_name(upb_enum_iter *iter) {
+ return upb_strtable_iter_key(iter).data;
+}
+
+int32_t upb_enum_iter_number(upb_enum_iter *iter) {
+ return upb_value_getint32(upb_strtable_iter_value(iter));
+}
+
+
+/* upb_fielddef ***************************************************************/
+
+const char *upb_fielddef_fullname(const upb_fielddef *f) {
+ return f->full_name;
+}
+
+upb_fieldtype_t upb_fielddef_type(const upb_fielddef *f) {
+ switch (f->type_) {
+ case UPB_DESCRIPTOR_TYPE_DOUBLE:
+ return UPB_TYPE_DOUBLE;
+ case UPB_DESCRIPTOR_TYPE_FLOAT:
+ return UPB_TYPE_FLOAT;
+ case UPB_DESCRIPTOR_TYPE_INT64:
+ case UPB_DESCRIPTOR_TYPE_SINT64:
+ case UPB_DESCRIPTOR_TYPE_SFIXED64:
+ return UPB_TYPE_INT64;
+ case UPB_DESCRIPTOR_TYPE_INT32:
+ case UPB_DESCRIPTOR_TYPE_SFIXED32:
+ case UPB_DESCRIPTOR_TYPE_SINT32:
+ return UPB_TYPE_INT32;
+ case UPB_DESCRIPTOR_TYPE_UINT64:
+ case UPB_DESCRIPTOR_TYPE_FIXED64:
+ return UPB_TYPE_UINT64;
+ case UPB_DESCRIPTOR_TYPE_UINT32:
+ case UPB_DESCRIPTOR_TYPE_FIXED32:
+ return UPB_TYPE_UINT32;
+ case UPB_DESCRIPTOR_TYPE_ENUM:
+ return UPB_TYPE_ENUM;
+ case UPB_DESCRIPTOR_TYPE_BOOL:
+ return UPB_TYPE_BOOL;
+ case UPB_DESCRIPTOR_TYPE_STRING:
+ return UPB_TYPE_STRING;
+ case UPB_DESCRIPTOR_TYPE_BYTES:
+ return UPB_TYPE_BYTES;
+ case UPB_DESCRIPTOR_TYPE_GROUP:
+ case UPB_DESCRIPTOR_TYPE_MESSAGE:
+ return UPB_TYPE_MESSAGE;
+ }
+ UPB_UNREACHABLE();
+}
+
+upb_descriptortype_t upb_fielddef_descriptortype(const upb_fielddef *f) {
+ return f->type_;
+}
+
+uint32_t upb_fielddef_index(const upb_fielddef *f) {
+ return f->index_;
+}
+
+upb_label_t upb_fielddef_label(const upb_fielddef *f) {
+ return f->label_;
+}
+
+uint32_t upb_fielddef_number(const upb_fielddef *f) {
+ return f->number_;
+}
+
+bool upb_fielddef_isextension(const upb_fielddef *f) {
+ return f->is_extension_;
+}
+
+bool upb_fielddef_lazy(const upb_fielddef *f) {
+ return f->lazy_;
+}
+
+bool upb_fielddef_packed(const upb_fielddef *f) {
+ return f->packed_;
+}
+
+const char *upb_fielddef_name(const upb_fielddef *f) {
+ return shortdefname(f->full_name);
+}
+
+const char *upb_fielddef_jsonname(const upb_fielddef *f) {
+ return f->json_name;
+}
+
+uint32_t upb_fielddef_selectorbase(const upb_fielddef *f) {
+ return f->selector_base;
+}
+
+const upb_filedef *upb_fielddef_file(const upb_fielddef *f) {
+ return f->file;
+}
+
+const upb_msgdef *upb_fielddef_containingtype(const upb_fielddef *f) {
+ return f->msgdef;
+}
+
+const upb_oneofdef *upb_fielddef_containingoneof(const upb_fielddef *f) {
+ return f->oneof;
+}
+
+const upb_oneofdef *upb_fielddef_realcontainingoneof(const upb_fielddef *f) {
+ if (!f->oneof || upb_oneofdef_issynthetic(f->oneof)) return NULL;
+ return f->oneof;
+}
+
+static void chkdefaulttype(const upb_fielddef *f, int ctype) {
+ UPB_UNUSED(f);
+ UPB_UNUSED(ctype);
+}
+
+int64_t upb_fielddef_defaultint64(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_INT64);
+ return f->defaultval.sint;
+}
+
+int32_t upb_fielddef_defaultint32(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_INT32);
+ return (int32_t)f->defaultval.sint;
+}
+
+uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_UINT64);
+ return f->defaultval.uint;
+}
+
+uint32_t upb_fielddef_defaultuint32(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_UINT32);
+ return (uint32_t)f->defaultval.uint;
+}
+
+bool upb_fielddef_defaultbool(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_BOOL);
+ return f->defaultval.boolean;
+}
+
+float upb_fielddef_defaultfloat(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_FLOAT);
+ return f->defaultval.flt;
+}
+
+double upb_fielddef_defaultdouble(const upb_fielddef *f) {
+ chkdefaulttype(f, UPB_TYPE_DOUBLE);
+ return f->defaultval.dbl;
+}
+
+const char *upb_fielddef_defaultstr(const upb_fielddef *f, size_t *len) {
+ str_t *str = f->defaultval.str;
+ UPB_ASSERT(upb_fielddef_type(f) == UPB_TYPE_STRING ||
+ upb_fielddef_type(f) == UPB_TYPE_BYTES ||
+ upb_fielddef_type(f) == UPB_TYPE_ENUM);
+ if (str) {
+ if (len) *len = str->len;
+ return str->str;
+ } else {
+ if (len) *len = 0;
+ return NULL;
+ }
+}
+
+const upb_msgdef *upb_fielddef_msgsubdef(const upb_fielddef *f) {
+ return upb_fielddef_type(f) == UPB_TYPE_MESSAGE ? f->sub.msgdef : NULL;
+}
+
+const upb_enumdef *upb_fielddef_enumsubdef(const upb_fielddef *f) {
+ return upb_fielddef_type(f) == UPB_TYPE_ENUM ? f->sub.enumdef : NULL;
+}
+
+const upb_msglayout_field *upb_fielddef_layout(const upb_fielddef *f) {
+ return &f->msgdef->layout->fields[f->layout_index];
+}
+
+bool upb_fielddef_issubmsg(const upb_fielddef *f) {
+ return upb_fielddef_type(f) == UPB_TYPE_MESSAGE;
+}
+
+bool upb_fielddef_isstring(const upb_fielddef *f) {
+ return upb_fielddef_type(f) == UPB_TYPE_STRING ||
+ upb_fielddef_type(f) == UPB_TYPE_BYTES;
+}
+
+bool upb_fielddef_isseq(const upb_fielddef *f) {
+ return upb_fielddef_label(f) == UPB_LABEL_REPEATED;
+}
+
+bool upb_fielddef_isprimitive(const upb_fielddef *f) {
+ return !upb_fielddef_isstring(f) && !upb_fielddef_issubmsg(f);
+}
+
+bool upb_fielddef_ismap(const upb_fielddef *f) {
+ return upb_fielddef_isseq(f) && upb_fielddef_issubmsg(f) &&
+ upb_msgdef_mapentry(upb_fielddef_msgsubdef(f));
+}
+
+bool upb_fielddef_hassubdef(const upb_fielddef *f) {
+ return upb_fielddef_issubmsg(f) || upb_fielddef_type(f) == UPB_TYPE_ENUM;
+}
+
+bool upb_fielddef_haspresence(const upb_fielddef *f) {
+ if (upb_fielddef_isseq(f)) return false;
+ return upb_fielddef_issubmsg(f) || upb_fielddef_containingoneof(f) ||
+ f->file->syntax == UPB_SYNTAX_PROTO2;
+}
+
+static bool between(int32_t x, int32_t low, int32_t high) {
+ return x >= low && x <= high;
+}
+
+bool upb_fielddef_checklabel(int32_t label) { return between(label, 1, 3); }
+bool upb_fielddef_checktype(int32_t type) { return between(type, 1, 11); }
+bool upb_fielddef_checkintfmt(int32_t fmt) { return between(fmt, 1, 3); }
+
+bool upb_fielddef_checkdescriptortype(int32_t type) {
+ return between(type, 1, 18);
+}
+
+/* upb_msgdef *****************************************************************/
+
+const char *upb_msgdef_fullname(const upb_msgdef *m) {
+ return m->full_name;
+}
+
+const upb_filedef *upb_msgdef_file(const upb_msgdef *m) {
+ return m->file;
+}
+
+const char *upb_msgdef_name(const upb_msgdef *m) {
+ return shortdefname(m->full_name);
+}
+
+upb_syntax_t upb_msgdef_syntax(const upb_msgdef *m) {
+ return m->file->syntax;
+}
+
+size_t upb_msgdef_selectorcount(const upb_msgdef *m) {
+ return m->selector_count;
+}
+
+uint32_t upb_msgdef_submsgfieldcount(const upb_msgdef *m) {
+ return m->submsg_field_count;
+}
+
+const upb_fielddef *upb_msgdef_itof(const upb_msgdef *m, uint32_t i) {
+ upb_value val;
+ return upb_inttable_lookup32(&m->itof, i, &val) ?
+ upb_value_getconstptr(val) : NULL;
+}
+
+const upb_fielddef *upb_msgdef_ntof(const upb_msgdef *m, const char *name,
+ size_t len) {
+ upb_value val;
+
+ if (!upb_strtable_lookup2(&m->ntof, name, len, &val)) {
+ return NULL;
+ }
+
+ return unpack_def(val, UPB_DEFTYPE_FIELD);
+}
+
+const upb_oneofdef *upb_msgdef_ntoo(const upb_msgdef *m, const char *name,
+ size_t len) {
+ upb_value val;
+
+ if (!upb_strtable_lookup2(&m->ntof, name, len, &val)) {
+ return NULL;
+ }
+
+ return unpack_def(val, UPB_DEFTYPE_ONEOF);
+}
+
+bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len,
+ const upb_fielddef **f, const upb_oneofdef **o) {
+ upb_value val;
+
+ if (!upb_strtable_lookup2(&m->ntof, name, len, &val)) {
+ return false;
+ }
+
+ *o = unpack_def(val, UPB_DEFTYPE_ONEOF);
+ *f = unpack_def(val, UPB_DEFTYPE_FIELD);
+ return *o || *f; /* False if this was a JSON name. */
+}
+
+const upb_fielddef *upb_msgdef_lookupjsonname(const upb_msgdef *m,
+ const char *name, size_t len) {
+ upb_value val;
+ const upb_fielddef* f;
+
+ if (!upb_strtable_lookup2(&m->ntof, name, len, &val)) {
+ return NULL;
+ }
+
+ f = unpack_def(val, UPB_DEFTYPE_FIELD);
+ if (!f) f = unpack_def(val, UPB_DEFTYPE_FIELD_JSONNAME);
+
+ return f;
+}
+
+int upb_msgdef_numfields(const upb_msgdef *m) {
+ return m->field_count;
+}
+
+int upb_msgdef_numoneofs(const upb_msgdef *m) {
+ return m->oneof_count;
+}
+
+int upb_msgdef_numrealoneofs(const upb_msgdef *m) {
+ return m->real_oneof_count;
+}
+
+int upb_msgdef_fieldcount(const upb_msgdef *m) {
+ return m->field_count;
+}
+
+int upb_msgdef_oneofcount(const upb_msgdef *m) {
+ return m->oneof_count;
+}
+
+int upb_msgdef_realoneofcount(const upb_msgdef *m) {
+ return m->real_oneof_count;
+}
+
+const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m) {
+ return m->layout;
+}
+
+const upb_fielddef *upb_msgdef_field(const upb_msgdef *m, int i) {
+ UPB_ASSERT(i >= 0 && i < m->field_count);
+ return &m->fields[i];
+}
+
+const upb_oneofdef *upb_msgdef_oneof(const upb_msgdef *m, int i) {
+ UPB_ASSERT(i >= 0 && i < m->oneof_count);
+ return &m->oneofs[i];
+}
+
+bool upb_msgdef_mapentry(const upb_msgdef *m) {
+ return m->map_entry;
+}
+
+upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m) {
+ return m->well_known_type;
+}
+
+bool upb_msgdef_isnumberwrapper(const upb_msgdef *m) {
+ upb_wellknowntype_t type = upb_msgdef_wellknowntype(m);
+ return type >= UPB_WELLKNOWN_DOUBLEVALUE &&
+ type <= UPB_WELLKNOWN_UINT32VALUE;
+}
+
+bool upb_msgdef_iswrapper(const upb_msgdef *m) {
+ upb_wellknowntype_t type = upb_msgdef_wellknowntype(m);
+ return type >= UPB_WELLKNOWN_DOUBLEVALUE &&
+ type <= UPB_WELLKNOWN_BOOLVALUE;
+}
+
+void upb_msg_field_begin(upb_msg_field_iter *iter, const upb_msgdef *m) {
+ upb_inttable_begin(iter, &m->itof);
+}
+
+void upb_msg_field_next(upb_msg_field_iter *iter) { upb_inttable_next(iter); }
+
+bool upb_msg_field_done(const upb_msg_field_iter *iter) {
+ return upb_inttable_done(iter);
+}
+
+upb_fielddef *upb_msg_iter_field(const upb_msg_field_iter *iter) {
+ return (upb_fielddef *)upb_value_getconstptr(upb_inttable_iter_value(iter));
+}
+
+void upb_msg_field_iter_setdone(upb_msg_field_iter *iter) {
+ upb_inttable_iter_setdone(iter);
+}
+
+bool upb_msg_field_iter_isequal(const upb_msg_field_iter * iter1,
+ const upb_msg_field_iter * iter2) {
+ return upb_inttable_iter_isequal(iter1, iter2);
+}
+
+void upb_msg_oneof_begin(upb_msg_oneof_iter *iter, const upb_msgdef *m) {
+ upb_strtable_begin(iter, &m->ntof);
+ /* We need to skip past any initial fields. */
+ while (!upb_strtable_done(iter) &&
+ !unpack_def(upb_strtable_iter_value(iter), UPB_DEFTYPE_ONEOF)) {
+ upb_strtable_next(iter);
+ }
+}
+
+void upb_msg_oneof_next(upb_msg_oneof_iter *iter) {
+ /* We need to skip past fields to return only oneofs. */
+ do {
+ upb_strtable_next(iter);
+ } while (!upb_strtable_done(iter) &&
+ !unpack_def(upb_strtable_iter_value(iter), UPB_DEFTYPE_ONEOF));
+}
+
+bool upb_msg_oneof_done(const upb_msg_oneof_iter *iter) {
+ return upb_strtable_done(iter);
+}
+
+const upb_oneofdef *upb_msg_iter_oneof(const upb_msg_oneof_iter *iter) {
+ return unpack_def(upb_strtable_iter_value(iter), UPB_DEFTYPE_ONEOF);
+}
+
+void upb_msg_oneof_iter_setdone(upb_msg_oneof_iter *iter) {
+ upb_strtable_iter_setdone(iter);
+}
+
+bool upb_msg_oneof_iter_isequal(const upb_msg_oneof_iter *iter1,
+ const upb_msg_oneof_iter *iter2) {
+ return upb_strtable_iter_isequal(iter1, iter2);
+}
+
+/* upb_oneofdef ***************************************************************/
+
+const char *upb_oneofdef_name(const upb_oneofdef *o) {
+ return shortdefname(o->full_name);
+}
+
+const upb_msgdef *upb_oneofdef_containingtype(const upb_oneofdef *o) {
+ return o->parent;
+}
+
+int upb_oneofdef_fieldcount(const upb_oneofdef *o) {
+ return o->field_count;
+}
+
+const upb_fielddef *upb_oneofdef_field(const upb_oneofdef *o, int i) {
+ UPB_ASSERT(i < o->field_count);
+ return o->fields[i];
+}
+
+int upb_oneofdef_numfields(const upb_oneofdef *o) {
+ return o->field_count;
+}
+
+uint32_t upb_oneofdef_index(const upb_oneofdef *o) {
+ return o - o->parent->oneofs;
+}
+
+bool upb_oneofdef_issynthetic(const upb_oneofdef *o) {
+ return o->synthetic;
+}
+
+const upb_fielddef *upb_oneofdef_ntof(const upb_oneofdef *o,
+ const char *name, size_t length) {
+ upb_value val;
+ return upb_strtable_lookup2(&o->ntof, name, length, &val) ?
+ upb_value_getptr(val) : NULL;
+}
+
+const upb_fielddef *upb_oneofdef_itof(const upb_oneofdef *o, uint32_t num) {
+ upb_value val;
+ return upb_inttable_lookup32(&o->itof, num, &val) ?
+ upb_value_getptr(val) : NULL;
+}
+
+void upb_oneof_begin(upb_oneof_iter *iter, const upb_oneofdef *o) {
+ upb_inttable_begin(iter, &o->itof);
+}
+
+void upb_oneof_next(upb_oneof_iter *iter) {
+ upb_inttable_next(iter);
+}
+
+bool upb_oneof_done(upb_oneof_iter *iter) {
+ return upb_inttable_done(iter);
+}
+
+upb_fielddef *upb_oneof_iter_field(const upb_oneof_iter *iter) {
+ return (upb_fielddef *)upb_value_getconstptr(upb_inttable_iter_value(iter));
+}
+
+void upb_oneof_iter_setdone(upb_oneof_iter *iter) {
+ upb_inttable_iter_setdone(iter);
+}
+
+/* upb_filedef ****************************************************************/
+
+const char *upb_filedef_name(const upb_filedef *f) {
+ return f->name;
+}
+
+const char *upb_filedef_package(const upb_filedef *f) {
+ return f->package;
+}
+
+const char *upb_filedef_phpprefix(const upb_filedef *f) {
+ return f->phpprefix;
+}
+
+const char *upb_filedef_phpnamespace(const upb_filedef *f) {
+ return f->phpnamespace;
+}
+
+upb_syntax_t upb_filedef_syntax(const upb_filedef *f) {
+ return f->syntax;
+}
+
+int upb_filedef_msgcount(const upb_filedef *f) {
+ return f->msg_count;
+}
+
+int upb_filedef_depcount(const upb_filedef *f) {
+ return f->dep_count;
+}
+
+int upb_filedef_enumcount(const upb_filedef *f) {
+ return f->enum_count;
+}
+
+const upb_filedef *upb_filedef_dep(const upb_filedef *f, int i) {
+ return i < 0 || i >= f->dep_count ? NULL : f->deps[i];
+}
+
+const upb_msgdef *upb_filedef_msg(const upb_filedef *f, int i) {
+ return i < 0 || i >= f->msg_count ? NULL : &f->msgs[i];
+}
+
+const upb_enumdef *upb_filedef_enum(const upb_filedef *f, int i) {
+ return i < 0 || i >= f->enum_count ? NULL : &f->enums[i];
+}
+
+const upb_symtab *upb_filedef_symtab(const upb_filedef *f) {
+ return f->symtab;
+}
+
+void upb_symtab_free(upb_symtab *s) {
+ upb_arena_free(s->arena);
+ upb_gfree(s);
+}
+
+upb_symtab *upb_symtab_new(void) {
+ upb_symtab *s = upb_gmalloc(sizeof(*s));
+ upb_alloc *alloc;
+
+ if (!s) {
+ return NULL;
+ }
+
+ s->arena = upb_arena_new();
+ s->bytes_loaded = 0;
+ alloc = upb_arena_alloc(s->arena);
+
+ if (!upb_strtable_init2(&s->syms, UPB_CTYPE_CONSTPTR, 32, alloc) ||
+ !upb_strtable_init2(&s->files, UPB_CTYPE_CONSTPTR, 4, alloc)) {
+ upb_arena_free(s->arena);
+ upb_gfree(s);
+ s = NULL;
+ }
+ return s;
+}
+
+const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym) {
+ upb_value v;
+ return upb_strtable_lookup(&s->syms, sym, &v) ?
+ unpack_def(v, UPB_DEFTYPE_MSG) : NULL;
+}
+
+const upb_msgdef *upb_symtab_lookupmsg2(const upb_symtab *s, const char *sym,
+ size_t len) {
+ upb_value v;
+ return upb_strtable_lookup2(&s->syms, sym, len, &v) ?
+ unpack_def(v, UPB_DEFTYPE_MSG) : NULL;
+}
+
+const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym) {
+ upb_value v;
+ return upb_strtable_lookup(&s->syms, sym, &v) ?
+ unpack_def(v, UPB_DEFTYPE_ENUM) : NULL;
+}
+
+const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name) {
+ upb_value v;
+ return upb_strtable_lookup(&s->files, name, &v) ? upb_value_getconstptr(v)
+ : NULL;
+}
+
+const upb_filedef *upb_symtab_lookupfile2(
+ const upb_symtab *s, const char *name, size_t len) {
+ upb_value v;
+ return upb_strtable_lookup2(&s->files, name, len, &v) ?
+ upb_value_getconstptr(v) : NULL;
+}
+
+int upb_symtab_filecount(const upb_symtab *s) {
+ return (int)upb_strtable_count(&s->files);
+}
+
+/* Code to build defs from descriptor protos. *********************************/
+
+/* There is a question of how much validation to do here. It will be difficult
+ * to perfectly match the amount of validation performed by proto2. But since
+ * this code is used to directly build defs from Ruby (for example) we do need
+ * to validate important constraints like uniqueness of names and numbers. */
+
+#define CHK_OOM(x) if (!(x)) { symtab_oomerr(ctx); }
+
+typedef struct {
+ upb_symtab *symtab;
+ upb_filedef *file; /* File we are building. */
+ upb_arena *file_arena; /* Allocate defs here. */
+ upb_alloc *alloc; /* Alloc of file_arena, for tables. */
+ const upb_msglayout **layouts; /* NULL if we should build layouts. */
+ upb_status *status; /* Record errors here. */
+ jmp_buf err; /* longjmp() on error. */
+} symtab_addctx;
+
+UPB_NORETURN UPB_NOINLINE
+static void symtab_errf(symtab_addctx *ctx, const char *fmt, ...) {
+ va_list argp;
+ va_start(argp, fmt);
+ upb_status_vseterrf(ctx->status, fmt, argp);
+ va_end(argp);
+ UPB_LONGJMP(ctx->err, 1);
+}
+
+UPB_NORETURN UPB_NOINLINE
+static void symtab_oomerr(symtab_addctx *ctx) {
+ upb_status_setoom(ctx->status);
+ UPB_LONGJMP(ctx->err, 1);
+}
+
+void *symtab_alloc(symtab_addctx *ctx, size_t bytes) {
+ void *ret = upb_arena_malloc(ctx->file_arena, bytes);
+ if (!ret) symtab_oomerr(ctx);
+ return ret;
+}
+
+static void check_ident(symtab_addctx *ctx, upb_strview name, bool full) {
+ const char *str = name.data;
+ size_t len = name.size;
+ bool start = true;
+ size_t i;
+ for (i = 0; i < len; i++) {
+ char c = str[i];
+ if (c == '.') {
+ if (start || !full) {
+ symtab_errf(ctx, "invalid name: unexpected '.' (%.*s)", (int)len, str);
+ }
+ start = true;
+ } else if (start) {
+ if (!upb_isletter(c)) {
+ symtab_errf(
+ ctx,
+ "invalid name: path components must start with a letter (%.*s)",
+ (int)len, str);
+ }
+ start = false;
+ } else {
+ if (!upb_isalphanum(c)) {
+ symtab_errf(ctx, "invalid name: non-alphanumeric character (%.*s)",
+ (int)len, str);
+ }
+ }
+ }
+ if (start) {
+ symtab_errf(ctx, "invalid name: empty part (%.*s)", (int)len, str);
+ }
+}
+
+static size_t div_round_up(size_t n, size_t d) {
+ return (n + d - 1) / d;
+}
+
+static size_t upb_msgval_sizeof(upb_fieldtype_t type) {
+ switch (type) {
+ case UPB_TYPE_DOUBLE:
+ case UPB_TYPE_INT64:
+ case UPB_TYPE_UINT64:
+ return 8;
+ case UPB_TYPE_ENUM:
+ case UPB_TYPE_INT32:
+ case UPB_TYPE_UINT32:
+ case UPB_TYPE_FLOAT:
+ return 4;
+ case UPB_TYPE_BOOL:
+ return 1;
+ case UPB_TYPE_MESSAGE:
+ return sizeof(void*);
+ case UPB_TYPE_BYTES:
+ case UPB_TYPE_STRING:
+ return sizeof(upb_strview);
+ }
+ UPB_UNREACHABLE();
+}
+
+static uint8_t upb_msg_fielddefsize(const upb_fielddef *f) {
+ if (upb_msgdef_mapentry(upb_fielddef_containingtype(f))) {
+ upb_map_entry ent;
+ UPB_ASSERT(sizeof(ent.k) == sizeof(ent.v));
+ return sizeof(ent.k);
+ } else if (upb_fielddef_isseq(f)) {
+ return sizeof(void*);
+ } else {
+ return upb_msgval_sizeof(upb_fielddef_type(f));
+ }
+}
+
+static uint32_t upb_msglayout_place(upb_msglayout *l, size_t size) {
+ uint32_t ret;
+
+ l->size = UPB_ALIGN_UP(l->size, size);
+ ret = l->size;
+ l->size += size;
+ return ret;
+}
+
+static int field_number_cmp(const void *p1, const void *p2) {
+ const upb_msglayout_field *f1 = p1;
+ const upb_msglayout_field *f2 = p2;
+ return f1->number - f2->number;
+}
+
+static void assign_layout_indices(const upb_msgdef *m, upb_msglayout_field *fields) {
+ int i;
+ int n = upb_msgdef_numfields(m);
+ for (i = 0; i < n; i++) {
+ upb_fielddef *f = (upb_fielddef*)upb_msgdef_itof(m, fields[i].number);
+ UPB_ASSERT(f);
+ f->layout_index = i;
+ }
+}
+
+/* This function is the dynamic equivalent of message_layout.{cc,h} in upbc.
+ * It computes a dynamic layout for all of the fields in |m|. */
+static void make_layout(symtab_addctx *ctx, const upb_msgdef *m) {
+ upb_msglayout *l = (upb_msglayout*)m->layout;
+ upb_msg_field_iter it;
+ upb_msg_oneof_iter oit;
+ size_t hasbit;
+ size_t submsg_count = m->submsg_field_count;
+ const upb_msglayout **submsgs;
+ upb_msglayout_field *fields;
+
+ memset(l, 0, sizeof(*l) + sizeof(_upb_fasttable_entry));
+
+ fields = symtab_alloc(ctx, upb_msgdef_numfields(m) * sizeof(*fields));
+ submsgs = symtab_alloc(ctx, submsg_count * sizeof(*submsgs));
+
+ l->field_count = upb_msgdef_numfields(m);
+ l->fields = fields;
+ l->submsgs = submsgs;
+ l->table_mask = 0;
+
+ /* TODO(haberman): initialize fast tables so that reflection-based parsing
+ * can get the same speeds as linked-in types. */
+ l->fasttable[0].field_parser = &fastdecode_generic;
+ l->fasttable[0].field_data = 0;
+
+ if (upb_msgdef_mapentry(m)) {
+ /* TODO(haberman): refactor this method so this special case is more
+ * elegant. */
+ const upb_fielddef *key = upb_msgdef_itof(m, 1);
+ const upb_fielddef *val = upb_msgdef_itof(m, 2);
+ fields[0].number = 1;
+ fields[1].number = 2;
+ fields[0].label = UPB_LABEL_OPTIONAL;
+ fields[1].label = UPB_LABEL_OPTIONAL;
+ fields[0].presence = 0;
+ fields[1].presence = 0;
+ fields[0].descriptortype = upb_fielddef_descriptortype(key);
+ fields[1].descriptortype = upb_fielddef_descriptortype(val);
+ fields[0].offset = 0;
+ fields[1].offset = sizeof(upb_strview);
+ fields[1].submsg_index = 0;
+
+ if (upb_fielddef_type(val) == UPB_TYPE_MESSAGE) {
+ submsgs[0] = upb_fielddef_msgsubdef(val)->layout;
+ }
+
+ l->field_count = 2;
+ l->size = 2 * sizeof(upb_strview);
+ l->size = UPB_ALIGN_UP(l->size, 8);
+ return;
+ }
+
+ /* Allocate data offsets in three stages:
+ *
+ * 1. hasbits.
+ * 2. regular fields.
+ * 3. oneof fields.
+ *
+ * OPT: There is a lot of room for optimization here to minimize the size.
+ */
+
+ /* Allocate hasbits and set basic field attributes. */
+ submsg_count = 0;
+ for (upb_msg_field_begin(&it, m), hasbit = 0;
+ !upb_msg_field_done(&it);
+ upb_msg_field_next(&it)) {
+ upb_fielddef* f = upb_msg_iter_field(&it);
+ upb_msglayout_field *field = &fields[upb_fielddef_index(f)];
+
+ field->number = upb_fielddef_number(f);
+ field->descriptortype = upb_fielddef_descriptortype(f);
+ field->label = upb_fielddef_label(f);
+
+ if (field->descriptortype == UPB_DTYPE_STRING &&
+ f->file->syntax == UPB_SYNTAX_PROTO2) {
+ /* See TableDescriptorType() in upbc/generator.cc for details and
+ * rationale. */
+ field->descriptortype = UPB_DTYPE_BYTES;
+ }
+
+ if (upb_fielddef_ismap(f)) {
+ field->label = _UPB_LABEL_MAP;
+ } else if (upb_fielddef_packed(f)) {
+ field->label = _UPB_LABEL_PACKED;
+ }
+
+ if (upb_fielddef_issubmsg(f)) {
+ const upb_msgdef *subm = upb_fielddef_msgsubdef(f);
+ field->submsg_index = submsg_count++;
+ submsgs[field->submsg_index] = subm->layout;
+ }
+
+ if (upb_fielddef_haspresence(f) && !upb_fielddef_realcontainingoneof(f)) {
+ /* We don't use hasbit 0, so that 0 can indicate "no presence" in the
+ * table. This wastes one hasbit, but we don't worry about it for now. */
+ field->presence = ++hasbit;
+ } else {
+ field->presence = 0;
+ }
+ }
+
+ /* Account for space used by hasbits. */
+ l->size = div_round_up(hasbit, 8);
+
+ /* Allocate non-oneof fields. */
+ for (upb_msg_field_begin(&it, m); !upb_msg_field_done(&it);
+ upb_msg_field_next(&it)) {
+ const upb_fielddef* f = upb_msg_iter_field(&it);
+ size_t field_size = upb_msg_fielddefsize(f);
+ size_t index = upb_fielddef_index(f);
+
+ if (upb_fielddef_realcontainingoneof(f)) {
+ /* Oneofs are handled separately below. */
+ continue;
+ }
+
+ fields[index].offset = upb_msglayout_place(l, field_size);
+ }
+
+ /* Allocate oneof fields. Each oneof field consists of a uint32 for the case
+ * and space for the actual data. */
+ for (upb_msg_oneof_begin(&oit, m); !upb_msg_oneof_done(&oit);
+ upb_msg_oneof_next(&oit)) {
+ const upb_oneofdef* o = upb_msg_iter_oneof(&oit);
+ upb_oneof_iter fit;
+
+ size_t case_size = sizeof(uint32_t); /* Could potentially optimize this. */
+ size_t field_size = 0;
+ uint32_t case_offset;
+ uint32_t data_offset;
+
+ if (upb_oneofdef_issynthetic(o)) continue;
+
+ /* Calculate field size: the max of all field sizes. */
+ for (upb_oneof_begin(&fit, o);
+ !upb_oneof_done(&fit);
+ upb_oneof_next(&fit)) {
+ const upb_fielddef* f = upb_oneof_iter_field(&fit);
+ field_size = UPB_MAX(field_size, upb_msg_fielddefsize(f));
+ }
+
+ /* Align and allocate case offset. */
+ case_offset = upb_msglayout_place(l, case_size);
+ data_offset = upb_msglayout_place(l, field_size);
+
+ for (upb_oneof_begin(&fit, o);
+ !upb_oneof_done(&fit);
+ upb_oneof_next(&fit)) {
+ const upb_fielddef* f = upb_oneof_iter_field(&fit);
+ fields[upb_fielddef_index(f)].offset = data_offset;
+ fields[upb_fielddef_index(f)].presence = ~case_offset;
+ }
+ }
+
+ /* Size of the entire structure should be a multiple of its greatest
+ * alignment. TODO: track overall alignment for real? */
+ l->size = UPB_ALIGN_UP(l->size, 8);
+
+ /* Sort fields by number. */
+ qsort(fields, upb_msgdef_numfields(m), sizeof(*fields), field_number_cmp);
+ assign_layout_indices(m, fields);
+}
+
+static void assign_msg_indices(symtab_addctx *ctx, upb_msgdef *m) {
+ /* Sort fields. upb internally relies on UPB_TYPE_MESSAGE fields having the
+ * lowest indexes, but we do not publicly guarantee this. */
+ upb_msg_field_iter j;
+ int i;
+ uint32_t selector;
+ int n = upb_msgdef_numfields(m);
+ upb_fielddef **fields;
+
+ if (n == 0) {
+ m->selector_count = UPB_STATIC_SELECTOR_COUNT;
+ m->submsg_field_count = 0;
+ return;
+ }
+
+ fields = upb_gmalloc(n * sizeof(*fields));
+
+ m->submsg_field_count = 0;
+ for(i = 0, upb_msg_field_begin(&j, m);
+ !upb_msg_field_done(&j);
+ upb_msg_field_next(&j), i++) {
+ upb_fielddef *f = upb_msg_iter_field(&j);
+ UPB_ASSERT(f->msgdef == m);
+ if (upb_fielddef_issubmsg(f)) {
+ m->submsg_field_count++;
+ }
+ fields[i] = f;
+ }
+
+ qsort(fields, n, sizeof(*fields), cmp_fields);
+
+ selector = UPB_STATIC_SELECTOR_COUNT + m->submsg_field_count;
+ for (i = 0; i < n; i++) {
+ upb_fielddef *f = fields[i];
+ f->index_ = i;
+ f->selector_base = selector + upb_handlers_selectorbaseoffset(f);
+ selector += upb_handlers_selectorcount(f);
+ }
+ m->selector_count = selector;
+
+ upb_gfree(fields);
+}
+
+static char *strviewdup(symtab_addctx *ctx, upb_strview view) {
+ return upb_strdup2(view.data, view.size, ctx->alloc);
+}
+
+static bool streql2(const char *a, size_t n, const char *b) {
+ return n == strlen(b) && memcmp(a, b, n) == 0;
+}
+
+static bool streql_view(upb_strview view, const char *b) {
+ return streql2(view.data, view.size, b);
+}
+
+static const char *makefullname(symtab_addctx *ctx, const char *prefix,
+ upb_strview name) {
+ if (prefix) {
+ /* ret = prefix + '.' + name; */
+ size_t n = strlen(prefix);
+ char *ret = symtab_alloc(ctx, n + name.size + 2);
+ strcpy(ret, prefix);
+ ret[n] = '.';
+ memcpy(&ret[n + 1], name.data, name.size);
+ ret[n + 1 + name.size] = '\0';
+ return ret;
+ } else {
+ return strviewdup(ctx, name);
+ }
+}
+
+static void finalize_oneofs(symtab_addctx *ctx, upb_msgdef *m) {
+ int i;
+ int synthetic_count = 0;
+ upb_oneofdef *mutable_oneofs = (upb_oneofdef*)m->oneofs;
+
+ for (i = 0; i < m->oneof_count; i++) {
+ upb_oneofdef *o = &mutable_oneofs[i];
+
+ if (o->synthetic && o->field_count != 1) {
+ symtab_errf(ctx, "Synthetic oneofs must have one field, not %d: %s",
+ o->field_count, upb_oneofdef_name(o));
+ }
+
+ if (o->synthetic) {
+ synthetic_count++;
+ } else if (synthetic_count != 0) {
+ symtab_errf(ctx, "Synthetic oneofs must be after all other oneofs: %s",
+ upb_oneofdef_name(o));
+ }
+
+ o->fields = symtab_alloc(ctx, sizeof(upb_fielddef *) * o->field_count);
+ o->field_count = 0;
+ }
+
+ for (i = 0; i < m->field_count; i++) {
+ const upb_fielddef *f = &m->fields[i];
+ upb_oneofdef *o = (upb_oneofdef*)f->oneof;
+ if (o) {
+ o->fields[o->field_count++] = f;
+ }
+ }
+
+ m->real_oneof_count = m->oneof_count - synthetic_count;
+}
+
+size_t getjsonname(const char *name, char *buf, size_t len) {
+ size_t src, dst = 0;
+ bool ucase_next = false;
+
+#define WRITE(byte) \
+ ++dst; \
+ if (dst < len) buf[dst - 1] = byte; \
+ else if (dst == len) buf[dst - 1] = '\0'
+
+ if (!name) {
+ WRITE('\0');
+ return 0;
+ }
+
+ /* Implement the transformation as described in the spec:
+ * 1. upper case all letters after an underscore.
+ * 2. remove all underscores.
+ */
+ for (src = 0; name[src]; src++) {
+ if (name[src] == '_') {
+ ucase_next = true;
+ continue;
+ }
+
+ if (ucase_next) {
+ WRITE(toupper(name[src]));
+ ucase_next = false;
+ } else {
+ WRITE(name[src]);
+ }
+ }
+
+ WRITE('\0');
+ return dst;
+
+#undef WRITE
+}
+
+static char* makejsonname(symtab_addctx *ctx, const char* name) {
+ size_t size = getjsonname(name, NULL, 0);
+ char* json_name = symtab_alloc(ctx, size);
+ getjsonname(name, json_name, size);
+ return json_name;
+}
+
+static void symtab_add(symtab_addctx *ctx, const char *name, upb_value v) {
+ if (upb_strtable_lookup(&ctx->symtab->syms, name, NULL)) {
+ symtab_errf(ctx, "duplicate symbol '%s'", name);
+ }
+ upb_alloc *alloc = upb_arena_alloc(ctx->symtab->arena);
+ size_t len = strlen(name);
+ CHK_OOM(upb_strtable_insert3(&ctx->symtab->syms, name, len, v, alloc));
+}
+
+/* Given a symbol and the base symbol inside which it is defined, find the
+ * symbol's definition in t. */
+static const void *symtab_resolve(symtab_addctx *ctx, const upb_fielddef *f,
+ const char *base, upb_strview sym,
+ upb_deftype_t type) {
+ const upb_strtable *t = &ctx->symtab->syms;
+ if(sym.size == 0) goto notfound;
+ if(sym.data[0] == '.') {
+ /* Symbols starting with '.' are absolute, so we do a single lookup.
+ * Slice to omit the leading '.' */
+ upb_value v;
+ if (!upb_strtable_lookup2(t, sym.data + 1, sym.size - 1, &v)) {
+ goto notfound;
+ }
+
+ const void *ret = unpack_def(v, type);
+ if (!ret) {
+ symtab_errf(ctx, "type mismatch when resolving field %s, name %s",
+ f->full_name, sym.data);
+ }
+ return ret;
+ } else {
+ /* Remove components from base until we find an entry or run out.
+ * TODO: This branch is totally broken, but currently not used. */
+ (void)base;
+ UPB_ASSERT(false);
+ goto notfound;
+ }
+
+notfound:
+ symtab_errf(ctx, "couldn't resolve name '%s'", sym.data);
+}
+
+static void create_oneofdef(
+ symtab_addctx *ctx, upb_msgdef *m,
+ const google_protobuf_OneofDescriptorProto *oneof_proto) {
+ upb_oneofdef *o;
+ upb_strview name = google_protobuf_OneofDescriptorProto_name(oneof_proto);
+ upb_value v;
+
+ o = (upb_oneofdef*)&m->oneofs[m->oneof_count++];
+ o->parent = m;
+ o->full_name = makefullname(ctx, m->full_name, name);
+ o->field_count = 0;
+ o->synthetic = false;
+
+ v = pack_def(o, UPB_DEFTYPE_ONEOF);
+ symtab_add(ctx, o->full_name, v);
+ CHK_OOM(upb_strtable_insert3(&m->ntof, name.data, name.size, v, ctx->alloc));
+
+ CHK_OOM(upb_inttable_init2(&o->itof, UPB_CTYPE_CONSTPTR, ctx->alloc));
+ CHK_OOM(upb_strtable_init2(&o->ntof, UPB_CTYPE_CONSTPTR, 4, ctx->alloc));
+}
+
+static str_t *newstr(symtab_addctx *ctx, const char *data, size_t len) {
+ str_t *ret = symtab_alloc(ctx, sizeof(*ret) + len);
+ if (!ret) return NULL;
+ ret->len = len;
+ if (len) memcpy(ret->str, data, len);
+ ret->str[len] = '\0';
+ return ret;
+}
+
+static void parse_default(symtab_addctx *ctx, const char *str, size_t len,
+ upb_fielddef *f) {
+ char *end;
+ char nullz[64];
+ errno = 0;
+
+ switch (upb_fielddef_type(f)) {
+ case UPB_TYPE_INT32:
+ case UPB_TYPE_INT64:
+ case UPB_TYPE_UINT32:
+ case UPB_TYPE_UINT64:
+ case UPB_TYPE_DOUBLE:
+ case UPB_TYPE_FLOAT:
+ /* Standard C number parsing functions expect null-terminated strings. */
+ if (len >= sizeof(nullz) - 1) {
+ symtab_errf(ctx, "Default too long: %.*s", (int)len, str);
+ }
+ memcpy(nullz, str, len);
+ nullz[len] = '\0';
+ str = nullz;
+ break;
+ default:
+ break;
+ }
+
+ switch (upb_fielddef_type(f)) {
+ case UPB_TYPE_INT32: {
+ long val = strtol(str, &end, 0);
+ if (val > INT32_MAX || val < INT32_MIN || errno == ERANGE || *end) {
+ goto invalid;
+ }
+ f->defaultval.sint = val;
+ break;
+ }
+ case UPB_TYPE_ENUM: {
+ const upb_enumdef *e = f->sub.enumdef;
+ int32_t val;
+ if (!upb_enumdef_ntoi(e, str, len, &val)) {
+ goto invalid;
+ }
+ f->defaultval.sint = val;
+ break;
+ }
+ case UPB_TYPE_INT64: {
+ /* XXX: Need to write our own strtoll, since it's not available in c89. */
+ int64_t val = strtol(str, &end, 0);
+ if (val > INT64_MAX || val < INT64_MIN || errno == ERANGE || *end) {
+ goto invalid;
+ }
+ f->defaultval.sint = val;
+ break;
+ }
+ case UPB_TYPE_UINT32: {
+ unsigned long val = strtoul(str, &end, 0);
+ if (val > UINT32_MAX || errno == ERANGE || *end) {
+ goto invalid;
+ }
+ f->defaultval.uint = val;
+ break;
+ }
+ case UPB_TYPE_UINT64: {
+ /* XXX: Need to write our own strtoull, since it's not available in c89. */
+ uint64_t val = strtoul(str, &end, 0);
+ if (val > UINT64_MAX || errno == ERANGE || *end) {
+ goto invalid;
+ }
+ f->defaultval.uint = val;
+ break;
+ }
+ case UPB_TYPE_DOUBLE: {
+ double val = strtod(str, &end);
+ if (errno == ERANGE || *end) {
+ goto invalid;
+ }
+ f->defaultval.dbl = val;
+ break;
+ }
+ case UPB_TYPE_FLOAT: {
+ /* XXX: Need to write our own strtof, since it's not available in c89. */
+ float val = strtod(str, &end);
+ if (errno == ERANGE || *end) {
+ goto invalid;
+ }
+ f->defaultval.flt = val;
+ break;
+ }
+ case UPB_TYPE_BOOL: {
+ if (streql2(str, len, "false")) {
+ f->defaultval.boolean = false;
+ } else if (streql2(str, len, "true")) {
+ f->defaultval.boolean = true;
+ } else {
+ }
+ break;
+ }
+ case UPB_TYPE_STRING:
+ f->defaultval.str = newstr(ctx, str, len);
+ break;
+ case UPB_TYPE_BYTES:
+ /* XXX: need to interpret the C-escaped value. */
+ f->defaultval.str = newstr(ctx, str, len);
+ break;
+ case UPB_TYPE_MESSAGE:
+ /* Should not have a default value. */
+ symtab_errf(ctx, "Message should not have a default (%s)",
+ upb_fielddef_fullname(f));
+ }
+
+ return;
+
+invalid:
+ symtab_errf(ctx, "Invalid default '%.*s' for field %f", (int)len, str,
+ upb_fielddef_fullname(f));
+}
+
+static void set_default_default(symtab_addctx *ctx, upb_fielddef *f) {
+ switch (upb_fielddef_type(f)) {
+ case UPB_TYPE_INT32:
+ case UPB_TYPE_INT64:
+ case UPB_TYPE_ENUM:
+ f->defaultval.sint = 0;
+ break;
+ case UPB_TYPE_UINT64:
+ case UPB_TYPE_UINT32:
+ f->defaultval.uint = 0;
+ break;
+ case UPB_TYPE_DOUBLE:
+ case UPB_TYPE_FLOAT:
+ f->defaultval.dbl = 0;
+ break;
+ case UPB_TYPE_STRING:
+ case UPB_TYPE_BYTES:
+ f->defaultval.str = newstr(ctx, NULL, 0);
+ break;
+ case UPB_TYPE_BOOL:
+ f->defaultval.boolean = false;
+ break;
+ case UPB_TYPE_MESSAGE:
+ break;
+ }
+}
+
+static void create_fielddef(
+ symtab_addctx *ctx, const char *prefix, upb_msgdef *m,
+ const google_protobuf_FieldDescriptorProto *field_proto) {
+ upb_alloc *alloc = ctx->alloc;
+ upb_fielddef *f;
+ const google_protobuf_FieldOptions *options;
+ upb_strview name;
+ const char *full_name;
+ const char *json_name;
+ const char *shortname;
+ uint32_t field_number;
+
+ if (!google_protobuf_FieldDescriptorProto_has_name(field_proto)) {
+ symtab_errf(ctx, "field has no name (%s)", upb_msgdef_fullname(m));
+ }
+
+ name = google_protobuf_FieldDescriptorProto_name(field_proto);
+ check_ident(ctx, name, false);
+ full_name = makefullname(ctx, prefix, name);
+ shortname = shortdefname(full_name);
+
+ if (google_protobuf_FieldDescriptorProto_has_json_name(field_proto)) {
+ json_name = strviewdup(
+ ctx, google_protobuf_FieldDescriptorProto_json_name(field_proto));
+ } else {
+ json_name = makejsonname(ctx, shortname);
+ }
+
+ field_number = google_protobuf_FieldDescriptorProto_number(field_proto);
+
+ if (field_number == 0 || field_number > UPB_MAX_FIELDNUMBER) {
+ symtab_errf(ctx, "invalid field number (%u)", field_number);
+ }
+
+ if (m) {
+ /* direct message field. */
+ upb_value v, field_v, json_v;
+ size_t json_size;
+
+ f = (upb_fielddef*)&m->fields[m->field_count++];
+ f->msgdef = m;
+ f->is_extension_ = false;
+
+ if (upb_strtable_lookup(&m->ntof, shortname, NULL)) {
+ symtab_errf(ctx, "duplicate field name (%s)", shortname);
+ }
+
+ if (upb_strtable_lookup(&m->ntof, json_name, NULL)) {
+ symtab_errf(ctx, "duplicate json_name (%s)", json_name);
+ }
+
+ if (upb_inttable_lookup(&m->itof, field_number, NULL)) {
+ symtab_errf(ctx, "duplicate field number (%u)", field_number);
+ }
+
+ field_v = pack_def(f, UPB_DEFTYPE_FIELD);
+ json_v = pack_def(f, UPB_DEFTYPE_FIELD_JSONNAME);
+ v = upb_value_constptr(f);
+ json_size = strlen(json_name);
+
+ CHK_OOM(
+ upb_strtable_insert3(&m->ntof, name.data, name.size, field_v, alloc));
+ CHK_OOM(upb_inttable_insert2(&m->itof, field_number, v, alloc));
+
+ if (strcmp(shortname, json_name) != 0) {
+ upb_strtable_insert3(&m->ntof, json_name, json_size, json_v, alloc);
+ }
+
+ if (ctx->layouts) {
+ const upb_msglayout_field *fields = m->layout->fields;
+ int count = m->layout->field_count;
+ bool found = false;
+ int i;
+ for (i = 0; i < count; i++) {
+ if (fields[i].number == field_number) {
+ f->layout_index = i;
+ found = true;
+ break;
+ }
+ }
+ UPB_ASSERT(found);
+ }
+ } else {
+ /* extension field. */
+ f = (upb_fielddef*)&ctx->file->exts[ctx->file->ext_count++];
+ f->is_extension_ = true;
+ symtab_add(ctx, full_name, pack_def(f, UPB_DEFTYPE_FIELD));
+ }
+
+ f->full_name = full_name;
+ f->json_name = json_name;
+ f->file = ctx->file;
+ f->type_ = (int)google_protobuf_FieldDescriptorProto_type(field_proto);
+ f->label_ = (int)google_protobuf_FieldDescriptorProto_label(field_proto);
+ f->number_ = field_number;
+ f->oneof = NULL;
+ f->proto3_optional_ =
+ google_protobuf_FieldDescriptorProto_proto3_optional(field_proto);
+
+ /* We can't resolve the subdef or (in the case of extensions) the containing
+ * message yet, because it may not have been defined yet. We stash a pointer
+ * to the field_proto until later when we can properly resolve it. */
+ f->sub.unresolved = field_proto;
+
+ if (f->label_ == UPB_LABEL_REQUIRED && f->file->syntax == UPB_SYNTAX_PROTO3) {
+ symtab_errf(ctx, "proto3 fields cannot be required (%s)", f->full_name);
+ }
+
+ if (google_protobuf_FieldDescriptorProto_has_oneof_index(field_proto)) {
+ int oneof_index =
+ google_protobuf_FieldDescriptorProto_oneof_index(field_proto);
+ upb_oneofdef *oneof;
+ upb_value v = upb_value_constptr(f);
+
+ if (upb_fielddef_label(f) != UPB_LABEL_OPTIONAL) {
+ symtab_errf(ctx, "fields in oneof must have OPTIONAL label (%s)",
+ f->full_name);
+ }
+
+ if (!m) {
+ symtab_errf(ctx, "oneof_index provided for extension field (%s)",
+ f->full_name);
+ }
+
+ if (oneof_index >= m->oneof_count) {
+ symtab_errf(ctx, "oneof_index out of range (%s)", f->full_name);
+ }
+
+ oneof = (upb_oneofdef*)&m->oneofs[oneof_index];
+ f->oneof = oneof;
+
+ oneof->field_count++;
+ if (f->proto3_optional_) {
+ oneof->synthetic = true;
+ }
+ CHK_OOM(upb_inttable_insert2(&oneof->itof, f->number_, v, alloc));
+ CHK_OOM(upb_strtable_insert3(&oneof->ntof, name.data, name.size, v, alloc));
+ } else {
+ f->oneof = NULL;
+ if (f->proto3_optional_) {
+ symtab_errf(ctx, "field with proto3_optional was not in a oneof (%s)",
+ f->full_name);
+ }
+ }
+
+ options = google_protobuf_FieldDescriptorProto_has_options(field_proto) ?
+ google_protobuf_FieldDescriptorProto_options(field_proto) : NULL;
+
+ if (options && google_protobuf_FieldOptions_has_packed(options)) {
+ f->packed_ = google_protobuf_FieldOptions_packed(options);
+ } else {
+ /* Repeated fields default to packed for proto3 only. */
+ f->packed_ = upb_fielddef_isprimitive(f) &&
+ f->label_ == UPB_LABEL_REPEATED && f->file->syntax == UPB_SYNTAX_PROTO3;
+ }
+
+ if (options) {
+ f->lazy_ = google_protobuf_FieldOptions_lazy(options);
+ } else {
+ f->lazy_ = false;
+ }
+}
+
+static void create_enumdef(
+ symtab_addctx *ctx, const char *prefix,
+ const google_protobuf_EnumDescriptorProto *enum_proto) {
+ upb_enumdef *e;
+ const google_protobuf_EnumValueDescriptorProto *const *values;
+ upb_strview name;
+ size_t i, n;
+
+ name = google_protobuf_EnumDescriptorProto_name(enum_proto);
+ check_ident(ctx, name, false);
+
+ e = (upb_enumdef*)&ctx->file->enums[ctx->file->enum_count++];
+ e->full_name = makefullname(ctx, prefix, name);
+ symtab_add(ctx, e->full_name, pack_def(e, UPB_DEFTYPE_ENUM));
+
+ values = google_protobuf_EnumDescriptorProto_value(enum_proto, &n);
+ CHK_OOM(upb_strtable_init2(&e->ntoi, UPB_CTYPE_INT32, n, ctx->alloc));
+ CHK_OOM(upb_inttable_init2(&e->iton, UPB_CTYPE_CSTR, ctx->alloc));
+
+ e->file = ctx->file;
+ e->defaultval = 0;
+
+ if (n == 0) {
+ symtab_errf(ctx, "enums must contain at least one value (%s)",
+ e->full_name);
+ }
+
+ for (i = 0; i < n; i++) {
+ const google_protobuf_EnumValueDescriptorProto *value = values[i];
+ upb_strview name = google_protobuf_EnumValueDescriptorProto_name(value);
+ char *name2 = strviewdup(ctx, name);
+ int32_t num = google_protobuf_EnumValueDescriptorProto_number(value);
+ upb_value v = upb_value_int32(num);
+
+ if (i == 0 && e->file->syntax == UPB_SYNTAX_PROTO3 && num != 0) {
+ symtab_errf(ctx, "for proto3, the first enum value must be zero (%s)",
+ e->full_name);
+ }
+
+ if (upb_strtable_lookup(&e->ntoi, name2, NULL)) {
+ symtab_errf(ctx, "duplicate enum label '%s'", name2);
+ }
+
+ CHK_OOM(name2)
+ CHK_OOM(
+ upb_strtable_insert3(&e->ntoi, name2, strlen(name2), v, ctx->alloc));
+
+ if (!upb_inttable_lookup(&e->iton, num, NULL)) {
+ upb_value v = upb_value_cstr(name2);
+ CHK_OOM(upb_inttable_insert2(&e->iton, num, v, ctx->alloc));
+ }
+ }
+
+ upb_inttable_compact2(&e->iton, ctx->alloc);
+}
+
+static void create_msgdef(symtab_addctx *ctx, const char *prefix,
+ const google_protobuf_DescriptorProto *msg_proto) {
+ upb_msgdef *m;
+ const google_protobuf_MessageOptions *options;
+ const google_protobuf_OneofDescriptorProto *const *oneofs;
+ const google_protobuf_FieldDescriptorProto *const *fields;
+ const google_protobuf_EnumDescriptorProto *const *enums;
+ const google_protobuf_DescriptorProto *const *msgs;
+ size_t i, n_oneof, n_field, n;
+ upb_strview name;
+
+ name = google_protobuf_DescriptorProto_name(msg_proto);
+ check_ident(ctx, name, false);
+
+ m = (upb_msgdef*)&ctx->file->msgs[ctx->file->msg_count++];
+ m->full_name = makefullname(ctx, prefix, name);
+ symtab_add(ctx, m->full_name, pack_def(m, UPB_DEFTYPE_MSG));
+
+ oneofs = google_protobuf_DescriptorProto_oneof_decl(msg_proto, &n_oneof);
+ fields = google_protobuf_DescriptorProto_field(msg_proto, &n_field);
+
+ CHK_OOM(upb_inttable_init2(&m->itof, UPB_CTYPE_CONSTPTR, ctx->alloc));
+ CHK_OOM(upb_strtable_init2(&m->ntof, UPB_CTYPE_CONSTPTR, n_oneof + n_field,
+ ctx->alloc));
+
+ m->file = ctx->file;
+ m->map_entry = false;
+
+ options = google_protobuf_DescriptorProto_options(msg_proto);
+
+ if (options) {
+ m->map_entry = google_protobuf_MessageOptions_map_entry(options);
+ }
+
+ if (ctx->layouts) {
+ m->layout = *ctx->layouts;
+ ctx->layouts++;
+ } else {
+ /* Allocate now (to allow cross-linking), populate later. */
+ m->layout = symtab_alloc(
+ ctx, sizeof(*m->layout) + sizeof(_upb_fasttable_entry));
+ }
+
+ m->oneof_count = 0;
+ m->oneofs = symtab_alloc(ctx, sizeof(*m->oneofs) * n_oneof);
+ for (i = 0; i < n_oneof; i++) {
+ create_oneofdef(ctx, m, oneofs[i]);
+ }
+
+ m->field_count = 0;
+ m->fields = symtab_alloc(ctx, sizeof(*m->fields) * n_field);
+ for (i = 0; i < n_field; i++) {
+ create_fielddef(ctx, m->full_name, m, fields[i]);
+ }
+
+ assign_msg_indices(ctx, m);
+ finalize_oneofs(ctx, m);
+ assign_msg_wellknowntype(m);
+ upb_inttable_compact2(&m->itof, ctx->alloc);
+
+ /* This message is built. Now build nested messages and enums. */
+
+ enums = google_protobuf_DescriptorProto_enum_type(msg_proto, &n);
+ for (i = 0; i < n; i++) {
+ create_enumdef(ctx, m->full_name, enums[i]);
+ }
+
+ msgs = google_protobuf_DescriptorProto_nested_type(msg_proto, &n);
+ for (i = 0; i < n; i++) {
+ create_msgdef(ctx, m->full_name, msgs[i]);
+ }
+}
+
+static void count_types_in_msg(const google_protobuf_DescriptorProto *msg_proto,
+ upb_filedef *file) {
+ const google_protobuf_DescriptorProto *const *msgs;
+ size_t i, n;
+
+ file->msg_count++;
+
+ msgs = google_protobuf_DescriptorProto_nested_type(msg_proto, &n);
+ for (i = 0; i < n; i++) {
+ count_types_in_msg(msgs[i], file);
+ }
+
+ google_protobuf_DescriptorProto_enum_type(msg_proto, &n);
+ file->enum_count += n;
+
+ google_protobuf_DescriptorProto_extension(msg_proto, &n);
+ file->ext_count += n;
+}
+
+static void count_types_in_file(
+ const google_protobuf_FileDescriptorProto *file_proto,
+ upb_filedef *file) {
+ const google_protobuf_DescriptorProto *const *msgs;
+ size_t i, n;
+
+ msgs = google_protobuf_FileDescriptorProto_message_type(file_proto, &n);
+ for (i = 0; i < n; i++) {
+ count_types_in_msg(msgs[i], file);
+ }
+
+ google_protobuf_FileDescriptorProto_enum_type(file_proto, &n);
+ file->enum_count += n;
+
+ google_protobuf_FileDescriptorProto_extension(file_proto, &n);
+ file->ext_count += n;
+}
+
+static void resolve_fielddef(symtab_addctx *ctx, const char *prefix,
+ upb_fielddef *f) {
+ upb_strview name;
+ const google_protobuf_FieldDescriptorProto *field_proto = f->sub.unresolved;
+
+ if (f->is_extension_) {
+ if (!google_protobuf_FieldDescriptorProto_has_extendee(field_proto)) {
+ symtab_errf(ctx, "extension for field '%s' had no extendee",
+ f->full_name);
+ }
+
+ name = google_protobuf_FieldDescriptorProto_extendee(field_proto);
+ f->msgdef = symtab_resolve(ctx, f, prefix, name, UPB_DEFTYPE_MSG);
+ }
+
+ if ((upb_fielddef_issubmsg(f) || f->type_ == UPB_DESCRIPTOR_TYPE_ENUM) &&
+ !google_protobuf_FieldDescriptorProto_has_type_name(field_proto)) {
+ symtab_errf(ctx, "field '%s' is missing type name", f->full_name);
+ }
+
+ name = google_protobuf_FieldDescriptorProto_type_name(field_proto);
+
+ if (upb_fielddef_issubmsg(f)) {
+ f->sub.msgdef = symtab_resolve(ctx, f, prefix, name, UPB_DEFTYPE_MSG);
+ } else if (f->type_ == UPB_DESCRIPTOR_TYPE_ENUM) {
+ f->sub.enumdef = symtab_resolve(ctx, f, prefix, name, UPB_DEFTYPE_ENUM);
+ }
+
+ /* Have to delay resolving of the default value until now because of the enum
+ * case, since enum defaults are specified with a label. */
+ if (google_protobuf_FieldDescriptorProto_has_default_value(field_proto)) {
+ upb_strview defaultval =
+ google_protobuf_FieldDescriptorProto_default_value(field_proto);
+
+ if (f->file->syntax == UPB_SYNTAX_PROTO3) {
+ symtab_errf(ctx, "proto3 fields cannot have explicit defaults (%s)",
+ f->full_name);
+ }
+
+ if (upb_fielddef_issubmsg(f)) {
+ symtab_errf(ctx, "message fields cannot have explicit defaults (%s)",
+ f->full_name);
+ }
+
+ parse_default(ctx, defaultval.data, defaultval.size, f);
+ } else {
+ set_default_default(ctx, f);
+ }
+}
+
+static void build_filedef(
+ symtab_addctx *ctx, upb_filedef *file,
+ const google_protobuf_FileDescriptorProto *file_proto) {
+ const google_protobuf_FileOptions *file_options_proto;
+ const google_protobuf_DescriptorProto *const *msgs;
+ const google_protobuf_EnumDescriptorProto *const *enums;
+ const google_protobuf_FieldDescriptorProto *const *exts;
+ const upb_strview* strs;
+ size_t i, n;
+
+ count_types_in_file(file_proto, file);
+
+ file->msgs = symtab_alloc(ctx, sizeof(*file->msgs) * file->msg_count);
+ file->enums = symtab_alloc(ctx, sizeof(*file->enums) * file->enum_count);
+ file->exts = symtab_alloc(ctx, sizeof(*file->exts) * file->ext_count);
+
+ /* We increment these as defs are added. */
+ file->msg_count = 0;
+ file->enum_count = 0;
+ file->ext_count = 0;
+
+ if (!google_protobuf_FileDescriptorProto_has_name(file_proto)) {
+ symtab_errf(ctx, "File has no name");
+ }
+
+ file->name =
+ strviewdup(ctx, google_protobuf_FileDescriptorProto_name(file_proto));
+ file->phpprefix = NULL;
+ file->phpnamespace = NULL;
+
+ if (google_protobuf_FileDescriptorProto_has_package(file_proto)) {
+ upb_strview package =
+ google_protobuf_FileDescriptorProto_package(file_proto);
+ check_ident(ctx, package, true);
+ file->package = strviewdup(ctx, package);
+ } else {
+ file->package = NULL;
+ }
+
+ if (google_protobuf_FileDescriptorProto_has_syntax(file_proto)) {
+ upb_strview syntax =
+ google_protobuf_FileDescriptorProto_syntax(file_proto);
+
+ if (streql_view(syntax, "proto2")) {
+ file->syntax = UPB_SYNTAX_PROTO2;
+ } else if (streql_view(syntax, "proto3")) {
+ file->syntax = UPB_SYNTAX_PROTO3;
+ } else {
+ symtab_errf(ctx, "Invalid syntax '" UPB_STRVIEW_FORMAT "'",
+ UPB_STRVIEW_ARGS(syntax));
+ }
+ } else {
+ file->syntax = UPB_SYNTAX_PROTO2;
+ }
+
+ /* Read options. */
+ file_options_proto = google_protobuf_FileDescriptorProto_options(file_proto);
+ if (file_options_proto) {
+ if (google_protobuf_FileOptions_has_php_class_prefix(file_options_proto)) {
+ file->phpprefix = strviewdup(
+ ctx,
+ google_protobuf_FileOptions_php_class_prefix(file_options_proto));
+ }
+ if (google_protobuf_FileOptions_has_php_namespace(file_options_proto)) {
+ file->phpnamespace = strviewdup(
+ ctx, google_protobuf_FileOptions_php_namespace(file_options_proto));
+ }
+ }
+
+ /* Verify dependencies. */
+ strs = google_protobuf_FileDescriptorProto_dependency(file_proto, &n);
+ file->deps = symtab_alloc(ctx, sizeof(*file->deps) * n);
+
+ for (i = 0; i < n; i++) {
+ upb_strview dep_name = strs[i];
+ upb_value v;
+ if (!upb_strtable_lookup2(&ctx->symtab->files, dep_name.data,
+ dep_name.size, &v)) {
+ symtab_errf(ctx,
+ "Depends on file '" UPB_STRVIEW_FORMAT
+ "', but it has not been loaded",
+ UPB_STRVIEW_ARGS(dep_name));
+ }
+ file->deps[i] = upb_value_getconstptr(v);
+ }
+
+ /* Create messages. */
+ msgs = google_protobuf_FileDescriptorProto_message_type(file_proto, &n);
+ for (i = 0; i < n; i++) {
+ create_msgdef(ctx, file->package, msgs[i]);
+ }
+
+ /* Create enums. */
+ enums = google_protobuf_FileDescriptorProto_enum_type(file_proto, &n);
+ for (i = 0; i < n; i++) {
+ create_enumdef(ctx, file->package, enums[i]);
+ }
+
+ /* Create extensions. */
+ exts = google_protobuf_FileDescriptorProto_extension(file_proto, &n);
+ file->exts = symtab_alloc(ctx, sizeof(*file->exts) * n);
+ for (i = 0; i < n; i++) {
+ create_fielddef(ctx, file->package, NULL, exts[i]);
+ }
+
+ /* Now that all names are in the table, build layouts and resolve refs. */
+ for (i = 0; i < (size_t)file->ext_count; i++) {
+ resolve_fielddef(ctx, file->package, (upb_fielddef*)&file->exts[i]);
+ }
+
+ for (i = 0; i < (size_t)file->msg_count; i++) {
+ const upb_msgdef *m = &file->msgs[i];
+ int j;
+ for (j = 0; j < m->field_count; j++) {
+ resolve_fielddef(ctx, m->full_name, (upb_fielddef*)&m->fields[j]);
+ }
+ }
+
+ if (!ctx->layouts) {
+ for (i = 0; i < (size_t)file->msg_count; i++) {
+ const upb_msgdef *m = &file->msgs[i];
+ make_layout(ctx, m);
+ }
+ }
+}
+
+static void remove_filedef(upb_symtab *s, upb_filedef *file) {
+ upb_alloc *alloc = upb_arena_alloc(s->arena);
+ int i;
+ for (i = 0; i < file->msg_count; i++) {
+ const char *name = file->msgs[i].full_name;
+ upb_strtable_remove3(&s->syms, name, strlen(name), NULL, alloc);
+ }
+ for (i = 0; i < file->enum_count; i++) {
+ const char *name = file->enums[i].full_name;
+ upb_strtable_remove3(&s->syms, name, strlen(name), NULL, alloc);
+ }
+ for (i = 0; i < file->ext_count; i++) {
+ const char *name = file->exts[i].full_name;
+ upb_strtable_remove3(&s->syms, name, strlen(name), NULL, alloc);
+ }
+}
+
+static const upb_filedef *_upb_symtab_addfile(
+ upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto,
+ const upb_msglayout **layouts, upb_status *status) {
+ upb_arena *file_arena = upb_arena_new();
+ upb_filedef *file;
+ symtab_addctx ctx;
+
+ if (!file_arena) return NULL;
+
+ file = upb_arena_malloc(file_arena, sizeof(*file));
+ if (!file) goto done;
+
+ ctx.file = file;
+ ctx.symtab = s;
+ ctx.file_arena = file_arena;
+ ctx.alloc = upb_arena_alloc(file_arena);
+ ctx.layouts = layouts;
+ ctx.status = status;
+
+ file->msg_count = 0;
+ file->enum_count = 0;
+ file->ext_count = 0;
+ file->symtab = s;
+
+ if (UPB_UNLIKELY(UPB_SETJMP(ctx.err))) {
+ UPB_ASSERT(!upb_ok(status));
+ remove_filedef(s, file);
+ file = NULL;
+ } else {
+ build_filedef(&ctx, file, file_proto);
+ upb_strtable_insert3(&s->files, file->name, strlen(file->name),
+ upb_value_constptr(file), ctx.alloc);
+ UPB_ASSERT(upb_ok(status));
+ upb_arena_fuse(s->arena, file_arena);
+ }
+
+done:
+ upb_arena_free(file_arena);
+ return file;
+}
+
+const upb_filedef *upb_symtab_addfile(
+ upb_symtab *s, const google_protobuf_FileDescriptorProto *file_proto,
+ upb_status *status) {
+ return _upb_symtab_addfile(s, file_proto, NULL, status);
+}
+
+/* Include here since we want most of this file to be stdio-free. */
+#include <stdio.h>
+
+bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init) {
+ /* Since this function should never fail (it would indicate a bug in upb) we
+ * print errors to stderr instead of returning error status to the user. */
+ upb_def_init **deps = init->deps;
+ google_protobuf_FileDescriptorProto *file;
+ upb_arena *arena;
+ upb_status status;
+
+ upb_status_clear(&status);
+
+ if (upb_strtable_lookup(&s->files, init->filename, NULL)) {
+ return true;
+ }
+
+ arena = upb_arena_new();
+
+ for (; *deps; deps++) {
+ if (!_upb_symtab_loaddefinit(s, *deps)) goto err;
+ }
+
+ file = google_protobuf_FileDescriptorProto_parse_ex(
+ init->descriptor.data, init->descriptor.size, arena, UPB_DECODE_ALIAS);
+ s->bytes_loaded += init->descriptor.size;
+
+ if (!file) {
+ upb_status_seterrf(
+ &status,
+ "Failed to parse compiled-in descriptor for file '%s'. This should "
+ "never happen.",
+ init->filename);
+ goto err;
+ }
+
+ if (!_upb_symtab_addfile(s, file, init->layouts, &status)) goto err;
+
+ upb_arena_free(arena);
+ return true;
+
+err:
+ fprintf(stderr, "Error loading compiled-in descriptor: %s\n",
+ upb_status_errmsg(&status));
+ upb_arena_free(arena);
+ return false;
+}
+
+size_t _upb_symtab_bytesloaded(const upb_symtab *s) {
+ return s->bytes_loaded;
+}
+
+#undef CHK_OOM
diff --git a/contrib/libs/grpc/third_party/upb/upb/def.h b/contrib/libs/grpc/third_party/upb/upb/def.h
new file mode 100644
index 00000000000..7206ec0d3ef
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/def.h
@@ -0,0 +1,315 @@
+/*
+** Defs are upb's internal representation of the constructs that can appear
+** in a .proto file:
+**
+** - upb_msgdef: describes a "message" construct.
+** - upb_fielddef: describes a message field.
+** - upb_filedef: describes a .proto file and its defs.
+** - upb_enumdef: describes an enum.
+** - upb_oneofdef: describes a oneof.
+**
+** TODO: definitions of services.
+*/
+
+#ifndef UPB_DEF_H_
+#define UPB_DEF_H_
+
+#include "upb/upb.h"
+#include "upb/table.int.h"
+#include "google/protobuf/descriptor.upb.h"
+
+#include "upb/port_def.inc"
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+struct upb_enumdef;
+typedef struct upb_enumdef upb_enumdef;
+struct upb_fielddef;
+typedef struct upb_fielddef upb_fielddef;
+struct upb_filedef;
+typedef struct upb_filedef upb_filedef;
+struct upb_msgdef;
+typedef struct upb_msgdef upb_msgdef;
+struct upb_oneofdef;
+typedef struct upb_oneofdef upb_oneofdef;
+struct upb_symtab;
+typedef struct upb_symtab upb_symtab;
+
+typedef enum {
+ UPB_SYNTAX_PROTO2 = 2,
+ UPB_SYNTAX_PROTO3 = 3
+} upb_syntax_t;
+
+/* All the different kind of well known type messages. For simplicity of check,
+ * number wrappers and string wrappers are grouped together. Make sure the
+ * order and merber of these groups are not changed.
+ */
+typedef enum {
+ UPB_WELLKNOWN_UNSPECIFIED,
+ UPB_WELLKNOWN_ANY,
+ UPB_WELLKNOWN_FIELDMASK,
+ UPB_WELLKNOWN_DURATION,
+ UPB_WELLKNOWN_TIMESTAMP,
+ /* number wrappers */
+ UPB_WELLKNOWN_DOUBLEVALUE,
+ UPB_WELLKNOWN_FLOATVALUE,
+ UPB_WELLKNOWN_INT64VALUE,
+ UPB_WELLKNOWN_UINT64VALUE,
+ UPB_WELLKNOWN_INT32VALUE,
+ UPB_WELLKNOWN_UINT32VALUE,
+ /* string wrappers */
+ UPB_WELLKNOWN_STRINGVALUE,
+ UPB_WELLKNOWN_BYTESVALUE,
+ UPB_WELLKNOWN_BOOLVALUE,
+ UPB_WELLKNOWN_VALUE,
+ UPB_WELLKNOWN_LISTVALUE,
+ UPB_WELLKNOWN_STRUCT
+} upb_wellknowntype_t;
+
+/* upb_fielddef ***************************************************************/
+
+/* Maximum field number allowed for FieldDefs. This is an inherent limit of the
+ * protobuf wire format. */
+#define UPB_MAX_FIELDNUMBER ((1 << 29) - 1)
+
+const char *upb_fielddef_fullname(const upb_fielddef *f);
+upb_fieldtype_t upb_fielddef_type(const upb_fielddef *f);
+upb_descriptortype_t upb_fielddef_descriptortype(const upb_fielddef *f);
+upb_label_t upb_fielddef_label(const upb_fielddef *f);
+uint32_t upb_fielddef_number(const upb_fielddef *f);
+const char *upb_fielddef_name(const upb_fielddef *f);
+const char *upb_fielddef_jsonname(const upb_fielddef *f);
+bool upb_fielddef_isextension(const upb_fielddef *f);
+bool upb_fielddef_lazy(const upb_fielddef *f);
+bool upb_fielddef_packed(const upb_fielddef *f);
+const upb_filedef *upb_fielddef_file(const upb_fielddef *f);
+const upb_msgdef *upb_fielddef_containingtype(const upb_fielddef *f);
+const upb_oneofdef *upb_fielddef_containingoneof(const upb_fielddef *f);
+const upb_oneofdef *upb_fielddef_realcontainingoneof(const upb_fielddef *f);
+uint32_t upb_fielddef_index(const upb_fielddef *f);
+bool upb_fielddef_issubmsg(const upb_fielddef *f);
+bool upb_fielddef_isstring(const upb_fielddef *f);
+bool upb_fielddef_isseq(const upb_fielddef *f);
+bool upb_fielddef_isprimitive(const upb_fielddef *f);
+bool upb_fielddef_ismap(const upb_fielddef *f);
+int64_t upb_fielddef_defaultint64(const upb_fielddef *f);
+int32_t upb_fielddef_defaultint32(const upb_fielddef *f);
+uint64_t upb_fielddef_defaultuint64(const upb_fielddef *f);
+uint32_t upb_fielddef_defaultuint32(const upb_fielddef *f);
+bool upb_fielddef_defaultbool(const upb_fielddef *f);
+float upb_fielddef_defaultfloat(const upb_fielddef *f);
+double upb_fielddef_defaultdouble(const upb_fielddef *f);
+const char *upb_fielddef_defaultstr(const upb_fielddef *f, size_t *len);
+bool upb_fielddef_hassubdef(const upb_fielddef *f);
+bool upb_fielddef_haspresence(const upb_fielddef *f);
+const upb_msgdef *upb_fielddef_msgsubdef(const upb_fielddef *f);
+const upb_enumdef *upb_fielddef_enumsubdef(const upb_fielddef *f);
+const upb_msglayout_field *upb_fielddef_layout(const upb_fielddef *f);
+
+/* Internal only. */
+uint32_t upb_fielddef_selectorbase(const upb_fielddef *f);
+
+/* upb_oneofdef ***************************************************************/
+
+typedef upb_inttable_iter upb_oneof_iter;
+
+const char *upb_oneofdef_name(const upb_oneofdef *o);
+const upb_msgdef *upb_oneofdef_containingtype(const upb_oneofdef *o);
+uint32_t upb_oneofdef_index(const upb_oneofdef *o);
+bool upb_oneofdef_issynthetic(const upb_oneofdef *o);
+int upb_oneofdef_fieldcount(const upb_oneofdef *o);
+const upb_fielddef *upb_oneofdef_field(const upb_oneofdef *o, int i);
+
+/* Oneof lookups:
+ * - ntof: look up a field by name.
+ * - ntofz: look up a field by name (as a null-terminated string).
+ * - itof: look up a field by number. */
+const upb_fielddef *upb_oneofdef_ntof(const upb_oneofdef *o,
+ const char *name, size_t length);
+UPB_INLINE const upb_fielddef *upb_oneofdef_ntofz(const upb_oneofdef *o,
+ const char *name) {
+ return upb_oneofdef_ntof(o, name, strlen(name));
+}
+const upb_fielddef *upb_oneofdef_itof(const upb_oneofdef *o, uint32_t num);
+
+/* DEPRECATED, slated for removal. */
+int upb_oneofdef_numfields(const upb_oneofdef *o);
+void upb_oneof_begin(upb_oneof_iter *iter, const upb_oneofdef *o);
+void upb_oneof_next(upb_oneof_iter *iter);
+bool upb_oneof_done(upb_oneof_iter *iter);
+upb_fielddef *upb_oneof_iter_field(const upb_oneof_iter *iter);
+void upb_oneof_iter_setdone(upb_oneof_iter *iter);
+bool upb_oneof_iter_isequal(const upb_oneof_iter *iter1,
+ const upb_oneof_iter *iter2);
+/* END DEPRECATED */
+
+/* upb_msgdef *****************************************************************/
+
+typedef upb_inttable_iter upb_msg_field_iter;
+typedef upb_strtable_iter upb_msg_oneof_iter;
+
+/* Well-known field tag numbers for map-entry messages. */
+#define UPB_MAPENTRY_KEY 1
+#define UPB_MAPENTRY_VALUE 2
+
+/* Well-known field tag numbers for Any messages. */
+#define UPB_ANY_TYPE 1
+#define UPB_ANY_VALUE 2
+
+/* Well-known field tag numbers for timestamp messages. */
+#define UPB_DURATION_SECONDS 1
+#define UPB_DURATION_NANOS 2
+
+/* Well-known field tag numbers for duration messages. */
+#define UPB_TIMESTAMP_SECONDS 1
+#define UPB_TIMESTAMP_NANOS 2
+
+const char *upb_msgdef_fullname(const upb_msgdef *m);
+const upb_filedef *upb_msgdef_file(const upb_msgdef *m);
+const char *upb_msgdef_name(const upb_msgdef *m);
+upb_syntax_t upb_msgdef_syntax(const upb_msgdef *m);
+bool upb_msgdef_mapentry(const upb_msgdef *m);
+upb_wellknowntype_t upb_msgdef_wellknowntype(const upb_msgdef *m);
+bool upb_msgdef_iswrapper(const upb_msgdef *m);
+bool upb_msgdef_isnumberwrapper(const upb_msgdef *m);
+int upb_msgdef_fieldcount(const upb_msgdef *m);
+int upb_msgdef_oneofcount(const upb_msgdef *m);
+const upb_fielddef *upb_msgdef_field(const upb_msgdef *m, int i);
+const upb_oneofdef *upb_msgdef_oneof(const upb_msgdef *m, int i);
+const upb_fielddef *upb_msgdef_itof(const upb_msgdef *m, uint32_t i);
+const upb_fielddef *upb_msgdef_ntof(const upb_msgdef *m, const char *name,
+ size_t len);
+const upb_oneofdef *upb_msgdef_ntoo(const upb_msgdef *m, const char *name,
+ size_t len);
+const upb_msglayout *upb_msgdef_layout(const upb_msgdef *m);
+
+UPB_INLINE const upb_oneofdef *upb_msgdef_ntooz(const upb_msgdef *m,
+ const char *name) {
+ return upb_msgdef_ntoo(m, name, strlen(name));
+}
+
+UPB_INLINE const upb_fielddef *upb_msgdef_ntofz(const upb_msgdef *m,
+ const char *name) {
+ return upb_msgdef_ntof(m, name, strlen(name));
+}
+
+/* Internal-only. */
+size_t upb_msgdef_selectorcount(const upb_msgdef *m);
+uint32_t upb_msgdef_submsgfieldcount(const upb_msgdef *m);
+
+/* Lookup of either field or oneof by name. Returns whether either was found.
+ * If the return is true, then the found def will be set, and the non-found
+ * one set to NULL. */
+bool upb_msgdef_lookupname(const upb_msgdef *m, const char *name, size_t len,
+ const upb_fielddef **f, const upb_oneofdef **o);
+
+UPB_INLINE bool upb_msgdef_lookupnamez(const upb_msgdef *m, const char *name,
+ const upb_fielddef **f,
+ const upb_oneofdef **o) {
+ return upb_msgdef_lookupname(m, name, strlen(name), f, o);
+}
+
+/* Returns a field by either JSON name or regular proto name. */
+const upb_fielddef *upb_msgdef_lookupjsonname(const upb_msgdef *m,
+ const char *name, size_t len);
+
+/* DEPRECATED, slated for removal */
+int upb_msgdef_numfields(const upb_msgdef *m);
+int upb_msgdef_numoneofs(const upb_msgdef *m);
+int upb_msgdef_numrealoneofs(const upb_msgdef *m);
+void upb_msg_field_begin(upb_msg_field_iter *iter, const upb_msgdef *m);
+void upb_msg_field_next(upb_msg_field_iter *iter);
+bool upb_msg_field_done(const upb_msg_field_iter *iter);
+upb_fielddef *upb_msg_iter_field(const upb_msg_field_iter *iter);
+void upb_msg_field_iter_setdone(upb_msg_field_iter *iter);
+bool upb_msg_field_iter_isequal(const upb_msg_field_iter * iter1,
+ const upb_msg_field_iter * iter2);
+void upb_msg_oneof_begin(upb_msg_oneof_iter * iter, const upb_msgdef *m);
+void upb_msg_oneof_next(upb_msg_oneof_iter * iter);
+bool upb_msg_oneof_done(const upb_msg_oneof_iter *iter);
+const upb_oneofdef *upb_msg_iter_oneof(const upb_msg_oneof_iter *iter);
+void upb_msg_oneof_iter_setdone(upb_msg_oneof_iter * iter);
+bool upb_msg_oneof_iter_isequal(const upb_msg_oneof_iter *iter1,
+ const upb_msg_oneof_iter *iter2);
+/* END DEPRECATED */
+
+/* upb_enumdef ****************************************************************/
+
+typedef upb_strtable_iter upb_enum_iter;
+
+const char *upb_enumdef_fullname(const upb_enumdef *e);
+const char *upb_enumdef_name(const upb_enumdef *e);
+const upb_filedef *upb_enumdef_file(const upb_enumdef *e);
+int32_t upb_enumdef_default(const upb_enumdef *e);
+int upb_enumdef_numvals(const upb_enumdef *e);
+
+/* Enum lookups:
+ * - ntoi: look up a name with specified length.
+ * - ntoiz: look up a name provided as a null-terminated string.
+ * - iton: look up an integer, returning the name as a null-terminated
+ * string. */
+bool upb_enumdef_ntoi(const upb_enumdef *e, const char *name, size_t len,
+ int32_t *num);
+UPB_INLINE bool upb_enumdef_ntoiz(const upb_enumdef *e,
+ const char *name, int32_t *num) {
+ return upb_enumdef_ntoi(e, name, strlen(name), num);
+}
+const char *upb_enumdef_iton(const upb_enumdef *e, int32_t num);
+
+void upb_enum_begin(upb_enum_iter *iter, const upb_enumdef *e);
+void upb_enum_next(upb_enum_iter *iter);
+bool upb_enum_done(upb_enum_iter *iter);
+const char *upb_enum_iter_name(upb_enum_iter *iter);
+int32_t upb_enum_iter_number(upb_enum_iter *iter);
+
+/* upb_filedef ****************************************************************/
+
+const char *upb_filedef_name(const upb_filedef *f);
+const char *upb_filedef_package(const upb_filedef *f);
+const char *upb_filedef_phpprefix(const upb_filedef *f);
+const char *upb_filedef_phpnamespace(const upb_filedef *f);
+upb_syntax_t upb_filedef_syntax(const upb_filedef *f);
+int upb_filedef_depcount(const upb_filedef *f);
+int upb_filedef_msgcount(const upb_filedef *f);
+int upb_filedef_enumcount(const upb_filedef *f);
+const upb_filedef *upb_filedef_dep(const upb_filedef *f, int i);
+const upb_msgdef *upb_filedef_msg(const upb_filedef *f, int i);
+const upb_enumdef *upb_filedef_enum(const upb_filedef *f, int i);
+const upb_symtab *upb_filedef_symtab(const upb_filedef *f);
+
+/* upb_symtab *****************************************************************/
+
+upb_symtab *upb_symtab_new(void);
+void upb_symtab_free(upb_symtab* s);
+const upb_msgdef *upb_symtab_lookupmsg(const upb_symtab *s, const char *sym);
+const upb_msgdef *upb_symtab_lookupmsg2(
+ const upb_symtab *s, const char *sym, size_t len);
+const upb_enumdef *upb_symtab_lookupenum(const upb_symtab *s, const char *sym);
+const upb_filedef *upb_symtab_lookupfile(const upb_symtab *s, const char *name);
+const upb_filedef *upb_symtab_lookupfile2(
+ const upb_symtab *s, const char *name, size_t len);
+int upb_symtab_filecount(const upb_symtab *s);
+const upb_filedef *upb_symtab_addfile(
+ upb_symtab *s, const google_protobuf_FileDescriptorProto *file,
+ upb_status *status);
+size_t _upb_symtab_bytesloaded(const upb_symtab *s);
+
+/* For generated code only: loads a generated descriptor. */
+typedef struct upb_def_init {
+ struct upb_def_init **deps; /* Dependencies of this file. */
+ const upb_msglayout **layouts; /* Pre-order layouts of all messages. */
+ const char *filename;
+ upb_strview descriptor; /* Serialized descriptor. */
+} upb_def_init;
+
+bool _upb_symtab_loaddefinit(upb_symtab *s, const upb_def_init *init);
+
+#include "upb/port_undef.inc"
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif /* __cplusplus */
+
+#endif /* UPB_DEF_H_ */
diff --git a/contrib/libs/grpc/third_party/upb/upb/def.hpp b/contrib/libs/grpc/third_party/upb/upb/def.hpp
new file mode 100644
index 00000000000..7e304aae7c6
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/def.hpp
@@ -0,0 +1,439 @@
+
+#ifndef UPB_DEF_HPP_
+#define UPB_DEF_HPP_
+
+#include <cstring>
+#include <memory>
+#include <util/generic/string.h>
+#include <vector>
+
+#include "upb/def.h"
+#include "upb/upb.hpp"
+
+namespace upb {
+
+class EnumDefPtr;
+class MessageDefPtr;
+class OneofDefPtr;
+
+// A upb::FieldDefPtr describes a single field in a message. It is most often
+// found as a part of a upb_msgdef, but can also stand alone to represent
+// an extension.
+class FieldDefPtr {
+ public:
+ FieldDefPtr() : ptr_(nullptr) {}
+ explicit FieldDefPtr(const upb_fielddef* ptr) : ptr_(ptr) {}
+
+ const upb_fielddef* ptr() const { return ptr_; }
+ explicit operator bool() const { return ptr_ != nullptr; }
+
+ typedef upb_fieldtype_t Type;
+ typedef upb_label_t Label;
+ typedef upb_descriptortype_t DescriptorType;
+
+ const char* full_name() const { return upb_fielddef_fullname(ptr_); }
+
+ Type type() const { return upb_fielddef_type(ptr_); }
+ Label label() const { return upb_fielddef_label(ptr_); }
+ const char* name() const { return upb_fielddef_name(ptr_); }
+ const char* json_name() const { return upb_fielddef_jsonname(ptr_); }
+ uint32_t number() const { return upb_fielddef_number(ptr_); }
+ bool is_extension() const { return upb_fielddef_isextension(ptr_); }
+
+ // For UPB_TYPE_MESSAGE fields only where is_tag_delimited() == false,
+ // indicates whether this field should have lazy parsing handlers that yield
+ // the unparsed string for the submessage.
+ //
+ // TODO(haberman): I think we want to move this into a FieldOptions container
+ // when we add support for custom options (the FieldOptions struct will
+ // contain both regular FieldOptions like "lazy" *and* custom options).
+ bool lazy() const { return upb_fielddef_lazy(ptr_); }
+
+ // For non-string, non-submessage fields, this indicates whether binary
+ // protobufs are encoded in packed or non-packed format.
+ //
+ // TODO(haberman): see note above about putting options like this into a
+ // FieldOptions container.
+ bool packed() const { return upb_fielddef_packed(ptr_); }
+
+ // An integer that can be used as an index into an array of fields for
+ // whatever message this field belongs to. Guaranteed to be less than
+ // f->containing_type()->field_count(). May only be accessed once the def has
+ // been finalized.
+ uint32_t index() const { return upb_fielddef_index(ptr_); }
+
+ // The MessageDef to which this field belongs.
+ //
+ // If this field has been added to a MessageDef, that message can be retrieved
+ // directly (this is always the case for frozen FieldDefs).
+ //
+ // If the field has not yet been added to a MessageDef, you can set the name
+ // of the containing type symbolically instead. This is mostly useful for
+ // extensions, where the extension is declared separately from the message.
+ MessageDefPtr containing_type() const;
+
+ // The OneofDef to which this field belongs, or NULL if this field is not part
+ // of a oneof.
+ OneofDefPtr containing_oneof() const;
+
+ // The field's type according to the enum in descriptor.proto. This is not
+ // the same as UPB_TYPE_*, because it distinguishes between (for example)
+ // INT32 and SINT32, whereas our "type" enum does not. This return of
+ // descriptor_type() is a function of type(), integer_format(), and
+ // is_tag_delimited().
+ DescriptorType descriptor_type() const {
+ return upb_fielddef_descriptortype(ptr_);
+ }
+
+ // Convenient field type tests.
+ bool IsSubMessage() const { return upb_fielddef_issubmsg(ptr_); }
+ bool IsString() const { return upb_fielddef_isstring(ptr_); }
+ bool IsSequence() const { return upb_fielddef_isseq(ptr_); }
+ bool IsPrimitive() const { return upb_fielddef_isprimitive(ptr_); }
+ bool IsMap() const { return upb_fielddef_ismap(ptr_); }
+
+ // Returns the non-string default value for this fielddef, which may either
+ // be something the client set explicitly or the "default default" (0 for
+ // numbers, empty for strings). The field's type indicates the type of the
+ // returned value, except for enum fields that are still mutable.
+ //
+ // Requires that the given function matches the field's current type.
+ int64_t default_int64() const { return upb_fielddef_defaultint64(ptr_); }
+ int32_t default_int32() const { return upb_fielddef_defaultint32(ptr_); }
+ uint64_t default_uint64() const { return upb_fielddef_defaultuint64(ptr_); }
+ uint32_t default_uint32() const { return upb_fielddef_defaultuint32(ptr_); }
+ bool default_bool() const { return upb_fielddef_defaultbool(ptr_); }
+ float default_float() const { return upb_fielddef_defaultfloat(ptr_); }
+ double default_double() const { return upb_fielddef_defaultdouble(ptr_); }
+
+ // The resulting string is always NULL-terminated. If non-NULL, the length
+ // will be stored in *len.
+ const char* default_string(size_t* len) const {
+ return upb_fielddef_defaultstr(ptr_, len);
+ }
+
+ // Returns the enum or submessage def for this field, if any. The field's
+ // type must match (ie. you may only call enum_subdef() for fields where
+ // type() == UPB_TYPE_ENUM).
+ EnumDefPtr enum_subdef() const;
+ MessageDefPtr message_subdef() const;
+
+ private:
+ const upb_fielddef* ptr_;
+};
+
+// Class that represents a oneof.
+class OneofDefPtr {
+ public:
+ OneofDefPtr() : ptr_(nullptr) {}
+ explicit OneofDefPtr(const upb_oneofdef* ptr) : ptr_(ptr) {}
+
+ const upb_oneofdef* ptr() const { return ptr_; }
+ explicit operator bool() const { return ptr_ != nullptr; }
+
+ // Returns the MessageDef that contains this OneofDef.
+ MessageDefPtr containing_type() const;
+
+ // Returns the name of this oneof.
+ const char* name() const { return upb_oneofdef_name(ptr_); }
+
+ // Returns the number of fields in the oneof.
+ int field_count() const { return upb_oneofdef_numfields(ptr_); }
+ FieldDefPtr field(int i) const { return FieldDefPtr(upb_oneofdef_field(ptr_, i)); }
+
+ // Looks up by name.
+ FieldDefPtr FindFieldByName(const char* name, size_t len) const {
+ return FieldDefPtr(upb_oneofdef_ntof(ptr_, name, len));
+ }
+ FieldDefPtr FindFieldByName(const char* name) const {
+ return FieldDefPtr(upb_oneofdef_ntofz(ptr_, name));
+ }
+
+ template <class T>
+ FieldDefPtr FindFieldByName(const T& str) const {
+ return FindFieldByName(str.c_str(), str.size());
+ }
+
+ // Looks up by tag number.
+ FieldDefPtr FindFieldByNumber(uint32_t num) const {
+ return FieldDefPtr(upb_oneofdef_itof(ptr_, num));
+ }
+
+ private:
+ const upb_oneofdef* ptr_;
+};
+
+// Structure that describes a single .proto message type.
+class MessageDefPtr {
+ public:
+ MessageDefPtr() : ptr_(nullptr) {}
+ explicit MessageDefPtr(const upb_msgdef* ptr) : ptr_(ptr) {}
+
+ const upb_msgdef* ptr() const { return ptr_; }
+ explicit operator bool() const { return ptr_ != nullptr; }
+
+ const char* full_name() const { return upb_msgdef_fullname(ptr_); }
+ const char* name() const { return upb_msgdef_name(ptr_); }
+
+ // The number of fields that belong to the MessageDef.
+ int field_count() const { return upb_msgdef_numfields(ptr_); }
+ FieldDefPtr field(int i) const { return FieldDefPtr(upb_msgdef_field(ptr_, i)); }
+
+ // The number of oneofs that belong to the MessageDef.
+ int oneof_count() const { return upb_msgdef_numoneofs(ptr_); }
+ OneofDefPtr oneof(int i) const { return OneofDefPtr(upb_msgdef_oneof(ptr_, i)); }
+
+ upb_syntax_t syntax() const { return upb_msgdef_syntax(ptr_); }
+
+ // These return null pointers if the field is not found.
+ FieldDefPtr FindFieldByNumber(uint32_t number) const {
+ return FieldDefPtr(upb_msgdef_itof(ptr_, number));
+ }
+ FieldDefPtr FindFieldByName(const char* name, size_t len) const {
+ return FieldDefPtr(upb_msgdef_ntof(ptr_, name, len));
+ }
+ FieldDefPtr FindFieldByName(const char* name) const {
+ return FieldDefPtr(upb_msgdef_ntofz(ptr_, name));
+ }
+
+ template <class T>
+ FieldDefPtr FindFieldByName(const T& str) const {
+ return FindFieldByName(str.c_str(), str.size());
+ }
+
+ OneofDefPtr FindOneofByName(const char* name, size_t len) const {
+ return OneofDefPtr(upb_msgdef_ntoo(ptr_, name, len));
+ }
+
+ OneofDefPtr FindOneofByName(const char* name) const {
+ return OneofDefPtr(upb_msgdef_ntooz(ptr_, name));
+ }
+
+ template <class T>
+ OneofDefPtr FindOneofByName(const T& str) const {
+ return FindOneofByName(str.c_str(), str.size());
+ }
+
+ // Is this message a map entry?
+ bool mapentry() const { return upb_msgdef_mapentry(ptr_); }
+
+ // Return the type of well known type message. UPB_WELLKNOWN_UNSPECIFIED for
+ // non-well-known message.
+ upb_wellknowntype_t wellknowntype() const {
+ return upb_msgdef_wellknowntype(ptr_);
+ }
+
+ // Whether is a number wrapper.
+ bool isnumberwrapper() const { return upb_msgdef_isnumberwrapper(ptr_); }
+
+ private:
+ class FieldIter {
+ public:
+ explicit FieldIter(const upb_msgdef *m, int i) : m_(m), i_(i) {}
+ void operator++() { i_++; }
+
+ FieldDefPtr operator*() { return FieldDefPtr(upb_msgdef_field(m_, i_)); }
+ bool operator!=(const FieldIter& other) { return i_ != other.i_; }
+ bool operator==(const FieldIter& other) { return i_ == other.i_; }
+
+ private:
+ const upb_msgdef *m_;
+ int i_;
+ };
+
+ class FieldAccessor {
+ public:
+ explicit FieldAccessor(const upb_msgdef* md) : md_(md) {}
+ FieldIter begin() { return FieldIter(md_, 0); }
+ FieldIter end() { return FieldIter(md_, upb_msgdef_fieldcount(md_)); }
+
+ private:
+ const upb_msgdef* md_;
+ };
+
+ class OneofIter {
+ public:
+ explicit OneofIter(const upb_msgdef *m, int i) : m_(m), i_(i) {}
+ void operator++() { i_++; }
+
+ OneofDefPtr operator*() { return OneofDefPtr(upb_msgdef_oneof(m_, i_)); }
+ bool operator!=(const OneofIter& other) { return i_ != other.i_; }
+ bool operator==(const OneofIter& other) { return i_ == other.i_; }
+
+ private:
+ const upb_msgdef *m_;
+ int i_;
+ };
+
+ class OneofAccessor {
+ public:
+ explicit OneofAccessor(const upb_msgdef* md) : md_(md) {}
+ OneofIter begin() { return OneofIter(md_, 0); }
+ OneofIter end() { return OneofIter(md_, upb_msgdef_oneofcount(md_)); }
+
+ private:
+ const upb_msgdef* md_;
+ };
+
+ public:
+ FieldAccessor fields() const { return FieldAccessor(ptr()); }
+ OneofAccessor oneofs() const { return OneofAccessor(ptr()); }
+
+ private:
+ const upb_msgdef* ptr_;
+};
+
+class EnumDefPtr {
+ public:
+ EnumDefPtr() : ptr_(nullptr) {}
+ explicit EnumDefPtr(const upb_enumdef* ptr) : ptr_(ptr) {}
+
+ const upb_enumdef* ptr() const { return ptr_; }
+ explicit operator bool() const { return ptr_ != nullptr; }
+
+ const char* full_name() const { return upb_enumdef_fullname(ptr_); }
+ const char* name() const { return upb_enumdef_name(ptr_); }
+
+ // The value that is used as the default when no field default is specified.
+ // If not set explicitly, the first value that was added will be used.
+ // The default value must be a member of the enum.
+ // Requires that value_count() > 0.
+ int32_t default_value() const { return upb_enumdef_default(ptr_); }
+
+ // Returns the number of values currently defined in the enum. Note that
+ // multiple names can refer to the same number, so this may be greater than
+ // the total number of unique numbers.
+ int value_count() const { return upb_enumdef_numvals(ptr_); }
+
+ // Lookups from name to integer, returning true if found.
+ bool FindValueByName(const char* name, int32_t* num) const {
+ return upb_enumdef_ntoiz(ptr_, name, num);
+ }
+
+ // Finds the name corresponding to the given number, or NULL if none was
+ // found. If more than one name corresponds to this number, returns the
+ // first one that was added.
+ const char* FindValueByNumber(int32_t num) const {
+ return upb_enumdef_iton(ptr_, num);
+ }
+
+ // Iteration over name/value pairs. The order is undefined.
+ // Adding an enum val invalidates any iterators.
+ //
+ // TODO: make compatible with range-for, with elements as pairs?
+ class Iterator {
+ public:
+ explicit Iterator(EnumDefPtr e) { upb_enum_begin(&iter_, e.ptr()); }
+
+ int32_t number() { return upb_enum_iter_number(&iter_); }
+ const char* name() { return upb_enum_iter_name(&iter_); }
+ bool Done() { return upb_enum_done(&iter_); }
+ void Next() { return upb_enum_next(&iter_); }
+
+ private:
+ upb_enum_iter iter_;
+ };
+
+ private:
+ const upb_enumdef* ptr_;
+};
+
+// Class that represents a .proto file with some things defined in it.
+//
+// Many users won't care about FileDefs, but they are necessary if you want to
+// read the values of file-level options.
+class FileDefPtr {
+ public:
+ explicit FileDefPtr(const upb_filedef* ptr) : ptr_(ptr) {}
+
+ const upb_filedef* ptr() const { return ptr_; }
+ explicit operator bool() const { return ptr_ != nullptr; }
+
+ // Get/set name of the file (eg. "foo/bar.proto").
+ const char* name() const { return upb_filedef_name(ptr_); }
+
+ // Package name for definitions inside the file (eg. "foo.bar").
+ const char* package() const { return upb_filedef_package(ptr_); }
+
+ // Sets the php class prefix which is prepended to all php generated classes
+ // from this .proto. Default is empty.
+ const char* phpprefix() const { return upb_filedef_phpprefix(ptr_); }
+
+ // Use this option to change the namespace of php generated classes. Default
+ // is empty. When this option is empty, the package name will be used for
+ // determining the namespace.
+ const char* phpnamespace() const { return upb_filedef_phpnamespace(ptr_); }
+
+ // Syntax for the file. Defaults to proto2.
+ upb_syntax_t syntax() const { return upb_filedef_syntax(ptr_); }
+
+ // Get the list of dependencies from the file. These are returned in the
+ // order that they were added to the FileDefPtr.
+ int dependency_count() const { return upb_filedef_depcount(ptr_); }
+ const FileDefPtr dependency(int index) const {
+ return FileDefPtr(upb_filedef_dep(ptr_, index));
+ }
+
+ private:
+ const upb_filedef* ptr_;
+};
+
+// Non-const methods in upb::SymbolTable are NOT thread-safe.
+class SymbolTable {
+ public:
+ SymbolTable() : ptr_(upb_symtab_new(), upb_symtab_free) {}
+ explicit SymbolTable(upb_symtab* s) : ptr_(s, upb_symtab_free) {}
+
+ const upb_symtab* ptr() const { return ptr_.get(); }
+ upb_symtab* ptr() { return ptr_.get(); }
+
+ // Finds an entry in the symbol table with this exact name. If not found,
+ // returns NULL.
+ MessageDefPtr LookupMessage(const char* sym) const {
+ return MessageDefPtr(upb_symtab_lookupmsg(ptr_.get(), sym));
+ }
+
+ EnumDefPtr LookupEnum(const char* sym) const {
+ return EnumDefPtr(upb_symtab_lookupenum(ptr_.get(), sym));
+ }
+
+ FileDefPtr LookupFile(const char* name) const {
+ return FileDefPtr(upb_symtab_lookupfile(ptr_.get(), name));
+ }
+
+ // TODO: iteration?
+
+ // Adds the given serialized FileDescriptorProto to the pool.
+ FileDefPtr AddFile(const google_protobuf_FileDescriptorProto* file_proto,
+ Status* status) {
+ return FileDefPtr(
+ upb_symtab_addfile(ptr_.get(), file_proto, status->ptr()));
+ }
+
+ private:
+ std::unique_ptr<upb_symtab, decltype(&upb_symtab_free)> ptr_;
+};
+
+inline MessageDefPtr FieldDefPtr::message_subdef() const {
+ return MessageDefPtr(upb_fielddef_msgsubdef(ptr_));
+}
+
+inline MessageDefPtr FieldDefPtr::containing_type() const {
+ return MessageDefPtr(upb_fielddef_containingtype(ptr_));
+}
+
+inline MessageDefPtr OneofDefPtr::containing_type() const {
+ return MessageDefPtr(upb_oneofdef_containingtype(ptr_));
+}
+
+inline OneofDefPtr FieldDefPtr::containing_oneof() const {
+ return OneofDefPtr(upb_fielddef_containingoneof(ptr_));
+}
+
+inline EnumDefPtr FieldDefPtr::enum_subdef() const {
+ return EnumDefPtr(upb_fielddef_enumsubdef(ptr_));
+}
+
+} // namespace upb
+
+#endif // UPB_DEF_HPP_
diff --git a/contrib/libs/grpc/third_party/upb/upb/encode.c b/contrib/libs/grpc/third_party/upb/upb/encode.c
index a6ce62bfa53..f73ff09f8e7 100644
--- a/contrib/libs/grpc/third_party/upb/upb/encode.c
+++ b/contrib/libs/grpc/third_party/upb/upb/encode.c
@@ -2,35 +2,39 @@
#include "upb/encode.h"
+#include <setjmp.h>
#include <string.h>
#include "upb/msg.h"
#include "upb/upb.h"
+/* Must be last. */
#include "upb/port_def.inc"
#define UPB_PB_VARINT_MAX_LEN 10
-#define CHK(x) do { if (!(x)) { return false; } } while(0)
-static size_t upb_encode_varint(uint64_t val, char *buf) {
- size_t i;
- if (val < 128) { buf[0] = val; return 1; }
- i = 0;
- while (val) {
+UPB_NOINLINE
+static size_t encode_varint64(uint64_t val, char *buf) {
+ size_t i = 0;
+ do {
uint8_t byte = val & 0x7fU;
val >>= 7;
if (val) byte |= 0x80U;
buf[i++] = byte;
- }
+ } while (val);
return i;
}
-static uint32_t upb_zzencode_32(int32_t n) { return ((uint32_t)n << 1) ^ (n >> 31); }
-static uint64_t upb_zzencode_64(int64_t n) { return ((uint64_t)n << 1) ^ (n >> 63); }
+static uint32_t encode_zz32(int32_t n) { return ((uint32_t)n << 1) ^ (n >> 31); }
+static uint64_t encode_zz64(int64_t n) { return ((uint64_t)n << 1) ^ (n >> 63); }
typedef struct {
+ jmp_buf err;
upb_alloc *alloc;
char *buf, *ptr, *limit;
+ int options;
+ int depth;
+ _upb_mapsorter sorter;
} upb_encstate;
static size_t upb_roundup_pow2(size_t bytes) {
@@ -41,11 +45,17 @@ static size_t upb_roundup_pow2(size_t bytes) {
return ret;
}
-static bool upb_encode_growbuffer(upb_encstate *e, size_t bytes) {
+UPB_NORETURN static void encode_err(upb_encstate *e) {
+ UPB_LONGJMP(e->err, 1);
+}
+
+UPB_NOINLINE
+static void encode_growbuffer(upb_encstate *e, size_t bytes) {
size_t old_size = e->limit - e->buf;
size_t new_size = upb_roundup_pow2(bytes + (e->limit - e->ptr));
char *new_buf = upb_realloc(e->alloc, e->buf, old_size, new_size);
- CHK(new_buf);
+
+ if (!new_buf) encode_err(e);
/* We want previous data at the end, realloc() put it at the beginning. */
if (old_size > 0) {
@@ -55,99 +65,116 @@ static bool upb_encode_growbuffer(upb_encstate *e, size_t bytes) {
e->ptr = new_buf + new_size - (e->limit - e->ptr);
e->limit = new_buf + new_size;
e->buf = new_buf;
- return true;
+
+ e->ptr -= bytes;
}
/* Call to ensure that at least "bytes" bytes are available for writing at
* e->ptr. Returns false if the bytes could not be allocated. */
-static bool upb_encode_reserve(upb_encstate *e, size_t bytes) {
- CHK(UPB_LIKELY((size_t)(e->ptr - e->buf) >= bytes) ||
- upb_encode_growbuffer(e, bytes));
+UPB_FORCEINLINE
+static void encode_reserve(upb_encstate *e, size_t bytes) {
+ if ((size_t)(e->ptr - e->buf) < bytes) {
+ encode_growbuffer(e, bytes);
+ return;
+ }
e->ptr -= bytes;
- return true;
}
/* Writes the given bytes to the buffer, handling reserve/advance. */
-static bool upb_put_bytes(upb_encstate *e, const void *data, size_t len) {
- if (len == 0) return true;
- CHK(upb_encode_reserve(e, len));
+static void encode_bytes(upb_encstate *e, const void *data, size_t len) {
+ if (len == 0) return; /* memcpy() with zero size is UB */
+ encode_reserve(e, len);
memcpy(e->ptr, data, len);
- return true;
}
-static bool upb_put_fixed64(upb_encstate *e, uint64_t val) {
+static void encode_fixed64(upb_encstate *e, uint64_t val) {
val = _upb_be_swap64(val);
- return upb_put_bytes(e, &val, sizeof(uint64_t));
+ encode_bytes(e, &val, sizeof(uint64_t));
}
-static bool upb_put_fixed32(upb_encstate *e, uint32_t val) {
+static void encode_fixed32(upb_encstate *e, uint32_t val) {
val = _upb_be_swap32(val);
- return upb_put_bytes(e, &val, sizeof(uint32_t));
+ encode_bytes(e, &val, sizeof(uint32_t));
}
-static bool upb_put_varint(upb_encstate *e, uint64_t val) {
+UPB_NOINLINE
+static void encode_longvarint(upb_encstate *e, uint64_t val) {
size_t len;
char *start;
- CHK(upb_encode_reserve(e, UPB_PB_VARINT_MAX_LEN));
- len = upb_encode_varint(val, e->ptr);
+
+ encode_reserve(e, UPB_PB_VARINT_MAX_LEN);
+ len = encode_varint64(val, e->ptr);
start = e->ptr + UPB_PB_VARINT_MAX_LEN - len;
memmove(start, e->ptr, len);
e->ptr = start;
- return true;
}
-static bool upb_put_double(upb_encstate *e, double d) {
+UPB_FORCEINLINE
+static void encode_varint(upb_encstate *e, uint64_t val) {
+ if (val < 128 && e->ptr != e->buf) {
+ --e->ptr;
+ *e->ptr = val;
+ } else {
+ encode_longvarint(e, val);
+ }
+}
+
+static void encode_double(upb_encstate *e, double d) {
uint64_t u64;
UPB_ASSERT(sizeof(double) == sizeof(uint64_t));
memcpy(&u64, &d, sizeof(uint64_t));
- return upb_put_fixed64(e, u64);
+ encode_fixed64(e, u64);
}
-static bool upb_put_float(upb_encstate *e, float d) {
+static void encode_float(upb_encstate *e, float d) {
uint32_t u32;
UPB_ASSERT(sizeof(float) == sizeof(uint32_t));
memcpy(&u32, &d, sizeof(uint32_t));
- return upb_put_fixed32(e, u32);
+ encode_fixed32(e, u32);
}
-static bool upb_put_tag(upb_encstate *e, int field_number, int wire_type) {
- return upb_put_varint(e, (field_number << 3) | wire_type);
+static void encode_tag(upb_encstate *e, uint32_t field_number,
+ uint8_t wire_type) {
+ encode_varint(e, (field_number << 3) | wire_type);
}
-static bool upb_put_fixedarray(upb_encstate *e, const upb_array *arr,
+static void encode_fixedarray(upb_encstate *e, const upb_array *arr,
size_t elem_size, uint32_t tag) {
size_t bytes = arr->len * elem_size;
const char* data = _upb_array_constptr(arr);
const char* ptr = data + bytes - elem_size;
if (tag) {
while (true) {
- CHK(upb_put_bytes(e, ptr, elem_size) && upb_put_varint(e, tag));
+ encode_bytes(e, ptr, elem_size);
+ encode_varint(e, tag);
if (ptr == data) break;
ptr -= elem_size;
}
- return true;
} else {
- return upb_put_bytes(e, data, bytes) && upb_put_varint(e, bytes);
+ encode_bytes(e, data, bytes);
}
}
-bool upb_encode_message(upb_encstate *e, const char *msg,
- const upb_msglayout *m, size_t *size);
+static void encode_message(upb_encstate *e, const char *msg,
+ const upb_msglayout *m, size_t *size);
-static bool upb_encode_scalarfield(upb_encstate *e, const void *_field_mem,
- const upb_msglayout *m,
- const upb_msglayout_field *f,
- bool skip_zero_value) {
+static void encode_scalar(upb_encstate *e, const void *_field_mem,
+ const upb_msglayout *m, const upb_msglayout_field *f,
+ bool skip_zero_value) {
const char *field_mem = _field_mem;
-#define CASE(ctype, type, wire_type, encodeval) do { \
- ctype val = *(ctype*)field_mem; \
- if (skip_zero_value && val == 0) { \
- return true; \
- } \
- return upb_put_ ## type(e, encodeval) && \
- upb_put_tag(e, f->number, wire_type); \
-} while(0)
+ int wire_type;
+
+#define CASE(ctype, type, wtype, encodeval) \
+ { \
+ ctype val = *(ctype *)field_mem; \
+ if (skip_zero_value && val == 0) { \
+ return; \
+ } \
+ encode_##type(e, encodeval); \
+ wire_type = wtype; \
+ break; \
+ }
switch (f->descriptortype) {
case UPB_DESCRIPTOR_TYPE_DOUBLE:
@@ -171,90 +198,95 @@ static bool upb_encode_scalarfield(upb_encstate *e, const void *_field_mem,
case UPB_DESCRIPTOR_TYPE_BOOL:
CASE(bool, varint, UPB_WIRE_TYPE_VARINT, val);
case UPB_DESCRIPTOR_TYPE_SINT32:
- CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, upb_zzencode_32(val));
+ CASE(int32_t, varint, UPB_WIRE_TYPE_VARINT, encode_zz32(val));
case UPB_DESCRIPTOR_TYPE_SINT64:
- CASE(int64_t, varint, UPB_WIRE_TYPE_VARINT, upb_zzencode_64(val));
+ CASE(int64_t, varint, UPB_WIRE_TYPE_VARINT, encode_zz64(val));
case UPB_DESCRIPTOR_TYPE_STRING:
case UPB_DESCRIPTOR_TYPE_BYTES: {
upb_strview view = *(upb_strview*)field_mem;
if (skip_zero_value && view.size == 0) {
- return true;
+ return;
}
- return upb_put_bytes(e, view.data, view.size) &&
- upb_put_varint(e, view.size) &&
- upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED);
+ encode_bytes(e, view.data, view.size);
+ encode_varint(e, view.size);
+ wire_type = UPB_WIRE_TYPE_DELIMITED;
+ break;
}
case UPB_DESCRIPTOR_TYPE_GROUP: {
size_t size;
void *submsg = *(void **)field_mem;
const upb_msglayout *subm = m->submsgs[f->submsg_index];
if (submsg == NULL) {
- return true;
+ return;
}
- return upb_put_tag(e, f->number, UPB_WIRE_TYPE_END_GROUP) &&
- upb_encode_message(e, submsg, subm, &size) &&
- upb_put_tag(e, f->number, UPB_WIRE_TYPE_START_GROUP);
+ if (--e->depth == 0) encode_err(e);
+ encode_tag(e, f->number, UPB_WIRE_TYPE_END_GROUP);
+ encode_message(e, submsg, subm, &size);
+ wire_type = UPB_WIRE_TYPE_START_GROUP;
+ e->depth++;
+ break;
}
case UPB_DESCRIPTOR_TYPE_MESSAGE: {
size_t size;
void *submsg = *(void **)field_mem;
const upb_msglayout *subm = m->submsgs[f->submsg_index];
if (submsg == NULL) {
- return true;
+ return;
}
- return upb_encode_message(e, submsg, subm, &size) &&
- upb_put_varint(e, size) &&
- upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED);
+ if (--e->depth == 0) encode_err(e);
+ encode_message(e, submsg, subm, &size);
+ encode_varint(e, size);
+ wire_type = UPB_WIRE_TYPE_DELIMITED;
+ e->depth++;
+ break;
}
+ default:
+ UPB_UNREACHABLE();
}
#undef CASE
- UPB_UNREACHABLE();
+
+ encode_tag(e, f->number, wire_type);
}
-static bool upb_encode_array(upb_encstate *e, const char *field_mem,
- const upb_msglayout *m,
- const upb_msglayout_field *f) {
+static void encode_array(upb_encstate *e, const char *field_mem,
+ const upb_msglayout *m, const upb_msglayout_field *f) {
const upb_array *arr = *(const upb_array**)field_mem;
bool packed = f->label == _UPB_LABEL_PACKED;
+ size_t pre_len = e->limit - e->ptr;
if (arr == NULL || arr->len == 0) {
- return true;
+ return;
}
#define VARINT_CASE(ctype, encode) \
{ \
const ctype *start = _upb_array_constptr(arr); \
const ctype *ptr = start + arr->len; \
- size_t pre_len = e->limit - e->ptr; \
uint32_t tag = packed ? 0 : (f->number << 3) | UPB_WIRE_TYPE_VARINT; \
do { \
ptr--; \
- CHK(upb_put_varint(e, encode)); \
- if (tag) CHK(upb_put_varint(e, tag)); \
+ encode_varint(e, encode); \
+ if (tag) encode_varint(e, tag); \
} while (ptr != start); \
- if (!tag) CHK(upb_put_varint(e, e->limit - e->ptr - pre_len)); \
} \
- break; \
- do { \
- ; \
- } while (0)
+ break;
#define TAG(wire_type) (packed ? 0 : (f->number << 3 | wire_type))
switch (f->descriptortype) {
case UPB_DESCRIPTOR_TYPE_DOUBLE:
- CHK(upb_put_fixedarray(e, arr, sizeof(double), TAG(UPB_WIRE_TYPE_64BIT)));
+ encode_fixedarray(e, arr, sizeof(double), TAG(UPB_WIRE_TYPE_64BIT));
break;
case UPB_DESCRIPTOR_TYPE_FLOAT:
- CHK(upb_put_fixedarray(e, arr, sizeof(float), TAG(UPB_WIRE_TYPE_32BIT)));
+ encode_fixedarray(e, arr, sizeof(float), TAG(UPB_WIRE_TYPE_32BIT));
break;
case UPB_DESCRIPTOR_TYPE_SFIXED64:
case UPB_DESCRIPTOR_TYPE_FIXED64:
- CHK(upb_put_fixedarray(e, arr, sizeof(uint64_t), TAG(UPB_WIRE_TYPE_64BIT)));
+ encode_fixedarray(e, arr, sizeof(uint64_t), TAG(UPB_WIRE_TYPE_64BIT));
break;
case UPB_DESCRIPTOR_TYPE_FIXED32:
case UPB_DESCRIPTOR_TYPE_SFIXED32:
- CHK(upb_put_fixedarray(e, arr, sizeof(uint32_t), TAG(UPB_WIRE_TYPE_32BIT)));
+ encode_fixedarray(e, arr, sizeof(uint32_t), TAG(UPB_WIRE_TYPE_32BIT));
break;
case UPB_DESCRIPTOR_TYPE_INT64:
case UPB_DESCRIPTOR_TYPE_UINT64:
@@ -267,154 +299,180 @@ static bool upb_encode_array(upb_encstate *e, const char *field_mem,
case UPB_DESCRIPTOR_TYPE_BOOL:
VARINT_CASE(bool, *ptr);
case UPB_DESCRIPTOR_TYPE_SINT32:
- VARINT_CASE(int32_t, upb_zzencode_32(*ptr));
+ VARINT_CASE(int32_t, encode_zz32(*ptr));
case UPB_DESCRIPTOR_TYPE_SINT64:
- VARINT_CASE(int64_t, upb_zzencode_64(*ptr));
+ VARINT_CASE(int64_t, encode_zz64(*ptr));
case UPB_DESCRIPTOR_TYPE_STRING:
case UPB_DESCRIPTOR_TYPE_BYTES: {
const upb_strview *start = _upb_array_constptr(arr);
const upb_strview *ptr = start + arr->len;
do {
ptr--;
- CHK(upb_put_bytes(e, ptr->data, ptr->size) &&
- upb_put_varint(e, ptr->size) &&
- upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED));
+ encode_bytes(e, ptr->data, ptr->size);
+ encode_varint(e, ptr->size);
+ encode_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED);
} while (ptr != start);
- return true;
+ return;
}
case UPB_DESCRIPTOR_TYPE_GROUP: {
const void *const*start = _upb_array_constptr(arr);
const void *const*ptr = start + arr->len;
const upb_msglayout *subm = m->submsgs[f->submsg_index];
+ if (--e->depth == 0) encode_err(e);
do {
size_t size;
ptr--;
- CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_END_GROUP) &&
- upb_encode_message(e, *ptr, subm, &size) &&
- upb_put_tag(e, f->number, UPB_WIRE_TYPE_START_GROUP));
+ encode_tag(e, f->number, UPB_WIRE_TYPE_END_GROUP);
+ encode_message(e, *ptr, subm, &size);
+ encode_tag(e, f->number, UPB_WIRE_TYPE_START_GROUP);
} while (ptr != start);
- return true;
+ e->depth++;
+ return;
}
case UPB_DESCRIPTOR_TYPE_MESSAGE: {
const void *const*start = _upb_array_constptr(arr);
const void *const*ptr = start + arr->len;
const upb_msglayout *subm = m->submsgs[f->submsg_index];
+ if (--e->depth == 0) encode_err(e);
do {
size_t size;
ptr--;
- CHK(upb_encode_message(e, *ptr, subm, &size) &&
- upb_put_varint(e, size) &&
- upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED));
+ encode_message(e, *ptr, subm, &size);
+ encode_varint(e, size);
+ encode_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED);
} while (ptr != start);
- return true;
+ e->depth++;
+ return;
}
}
#undef VARINT_CASE
if (packed) {
- CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED));
+ encode_varint(e, e->limit - e->ptr - pre_len);
+ encode_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED);
}
- return true;
}
-static bool upb_encode_map(upb_encstate *e, const char *field_mem,
- const upb_msglayout *m,
- const upb_msglayout_field *f) {
+static void encode_mapentry(upb_encstate *e, uint32_t number,
+ const upb_msglayout *layout,
+ const upb_map_entry *ent) {
+ const upb_msglayout_field *key_field = &layout->fields[0];
+ const upb_msglayout_field *val_field = &layout->fields[1];
+ size_t pre_len = e->limit - e->ptr;
+ size_t size;
+ encode_scalar(e, &ent->v, layout, val_field, false);
+ encode_scalar(e, &ent->k, layout, key_field, false);
+ size = (e->limit - e->ptr) - pre_len;
+ encode_varint(e, size);
+ encode_tag(e, number, UPB_WIRE_TYPE_DELIMITED);
+}
+
+static void encode_map(upb_encstate *e, const char *field_mem,
+ const upb_msglayout *m, const upb_msglayout_field *f) {
const upb_map *map = *(const upb_map**)field_mem;
- const upb_msglayout *entry = m->submsgs[f->submsg_index];
- const upb_msglayout_field *key_field = &entry->fields[0];
- const upb_msglayout_field *val_field = &entry->fields[1];
- upb_strtable_iter i;
- if (map == NULL) {
- return true;
- }
+ const upb_msglayout *layout = m->submsgs[f->submsg_index];
+ UPB_ASSERT(layout->field_count == 2);
+
+ if (map == NULL) return;
- upb_strtable_begin(&i, &map->table);
- for(; !upb_strtable_done(&i); upb_strtable_next(&i)) {
- size_t pre_len = e->limit - e->ptr;
- size_t size;
- upb_strview key = upb_strtable_iter_key(&i);
- const upb_value val = upb_strtable_iter_value(&i);
+ if (e->options & UPB_ENCODE_DETERMINISTIC) {
+ _upb_sortedmap sorted;
+ _upb_mapsorter_pushmap(&e->sorter, layout->fields[0].descriptortype, map,
+ &sorted);
upb_map_entry ent;
- _upb_map_fromkey(key, &ent.k, map->key_size);
- _upb_map_fromvalue(val, &ent.v, map->val_size);
- CHK(upb_encode_scalarfield(e, &ent.v, entry, val_field, false));
- CHK(upb_encode_scalarfield(e, &ent.k, entry, key_field, false));
- size = (e->limit - e->ptr) - pre_len;
- CHK(upb_put_varint(e, size));
- CHK(upb_put_tag(e, f->number, UPB_WIRE_TYPE_DELIMITED));
+ while (_upb_sortedmap_next(&e->sorter, map, &sorted, &ent)) {
+ encode_mapentry(e, f->number, layout, &ent);
+ }
+ _upb_mapsorter_popmap(&e->sorter, &sorted);
+ } else {
+ upb_strtable_iter i;
+ upb_strtable_begin(&i, &map->table);
+ for(; !upb_strtable_done(&i); upb_strtable_next(&i)) {
+ upb_strview key = upb_strtable_iter_key(&i);
+ const upb_value val = upb_strtable_iter_value(&i);
+ upb_map_entry ent;
+ _upb_map_fromkey(key, &ent.k, map->key_size);
+ _upb_map_fromvalue(val, &ent.v, map->val_size);
+ encode_mapentry(e, f->number, layout, &ent);
+ }
}
-
- return true;
}
+static void encode_scalarfield(upb_encstate *e, const char *msg,
+ const upb_msglayout *m,
+ const upb_msglayout_field *f) {
+ bool skip_empty = false;
+ if (f->presence == 0) {
+ /* Proto3 presence. */
+ skip_empty = true;
+ } else if (f->presence > 0) {
+ /* Proto2 presence: hasbit. */
+ if (!_upb_hasbit_field(msg, f)) return;
+ } else {
+ /* Field is in a oneof. */
+ if (_upb_getoneofcase_field(msg, f) != f->number) return;
+ }
+ encode_scalar(e, msg + f->offset, m, f, skip_empty);
+}
-bool upb_encode_message(upb_encstate *e, const char *msg,
- const upb_msglayout *m, size_t *size) {
- int i;
+static void encode_message(upb_encstate *e, const char *msg,
+ const upb_msglayout *m, size_t *size) {
size_t pre_len = e->limit - e->ptr;
- const char *unknown;
- size_t unknown_size;
+ const upb_msglayout_field *f = &m->fields[m->field_count];
+ const upb_msglayout_field *first = &m->fields[0];
- unknown = upb_msg_getunknown(msg, &unknown_size);
+ if ((e->options & UPB_ENCODE_SKIPUNKNOWN) == 0) {
+ size_t unknown_size;
+ const char *unknown = upb_msg_getunknown(msg, &unknown_size);
- if (unknown) {
- upb_put_bytes(e, unknown, unknown_size);
+ if (unknown) {
+ encode_bytes(e, unknown, unknown_size);
+ }
}
- for (i = m->field_count - 1; i >= 0; i--) {
- const upb_msglayout_field *f = &m->fields[i];
-
+ while (f != first) {
+ f--;
if (_upb_isrepeated(f)) {
- CHK(upb_encode_array(e, msg + f->offset, m, f));
+ encode_array(e, msg + f->offset, m, f);
} else if (f->label == _UPB_LABEL_MAP) {
- CHK(upb_encode_map(e, msg + f->offset, m, f));
+ encode_map(e, msg + f->offset, m, f);
} else {
- bool skip_empty = false;
- if (f->presence == 0) {
- /* Proto3 presence. */
- skip_empty = true;
- } else if (f->presence > 0) {
- /* Proto2 presence: hasbit. */
- if (!_upb_hasbit_field(msg, f)) {
- continue;
- }
- } else {
- /* Field is in a oneof. */
- if (_upb_getoneofcase_field(msg, f) != f->number) {
- continue;
- }
- }
- CHK(upb_encode_scalarfield(e, msg + f->offset, m, f, skip_empty));
+ encode_scalarfield(e, msg, m, f);
}
}
*size = (e->limit - e->ptr) - pre_len;
- return true;
}
-char *upb_encode(const void *msg, const upb_msglayout *m, upb_arena *arena,
- size_t *size) {
+char *upb_encode_ex(const void *msg, const upb_msglayout *m, int options,
+ upb_arena *arena, size_t *size) {
upb_encstate e;
+ unsigned depth = (unsigned)options >> 16;
+
e.alloc = upb_arena_alloc(arena);
e.buf = NULL;
e.limit = NULL;
e.ptr = NULL;
+ e.depth = depth ? depth : 64;
+ e.options = options;
+ _upb_mapsorter_init(&e.sorter);
+ char *ret = NULL;
- if (!upb_encode_message(&e, msg, m, size)) {
+ if (UPB_SETJMP(e.err)) {
*size = 0;
- return NULL;
- }
-
- *size = e.limit - e.ptr;
-
- if (*size == 0) {
- static char ch;
- return &ch;
+ ret = NULL;
} else {
- UPB_ASSERT(e.ptr);
- return e.ptr;
+ encode_message(&e, msg, m, size);
+ *size = e.limit - e.ptr;
+ if (*size == 0) {
+ static char ch;
+ ret = &ch;
+ } else {
+ UPB_ASSERT(e.ptr);
+ ret = e.ptr;
+ }
}
-}
-#undef CHK
+ _upb_mapsorter_destroy(&e.sorter);
+ return ret;
+}
diff --git a/contrib/libs/grpc/third_party/upb/upb/encode.h b/contrib/libs/grpc/third_party/upb/upb/encode.h
index 68427770585..d3c1dc96063 100644
--- a/contrib/libs/grpc/third_party/upb/upb/encode.h
+++ b/contrib/libs/grpc/third_party/upb/upb/encode.h
@@ -7,12 +7,37 @@
#include "upb/msg.h"
+/* Must be last. */
+#include "upb/port_def.inc"
+
#ifdef __cplusplus
extern "C" {
#endif
-char *upb_encode(const void *msg, const upb_msglayout *l, upb_arena *arena,
- size_t *size);
+enum {
+ /* If set, the results of serializing will be deterministic across all
+ * instances of this binary. There are no guarantees across different
+ * binary builds.
+ *
+ * If your proto contains maps, the encoder will need to malloc()/free()
+ * memory during encode. */
+ UPB_ENCODE_DETERMINISTIC = 1,
+
+ /* When set, unknown fields are not printed. */
+ UPB_ENCODE_SKIPUNKNOWN = 2,
+};
+
+#define UPB_ENCODE_MAXDEPTH(depth) ((depth) << 16)
+
+char *upb_encode_ex(const void *msg, const upb_msglayout *l, int options,
+ upb_arena *arena, size_t *size);
+
+UPB_INLINE char *upb_encode(const void *msg, const upb_msglayout *l,
+ upb_arena *arena, size_t *size) {
+ return upb_encode_ex(msg, l, 0, arena, size);
+}
+
+#include "upb/port_undef.inc"
#ifdef __cplusplus
} /* extern "C" */
diff --git a/contrib/libs/grpc/third_party/upb/upb/msg.c b/contrib/libs/grpc/third_party/upb/upb/msg.c
index 25747c84817..876a06d6fa5 100644
--- a/contrib/libs/grpc/third_party/upb/upb/msg.c
+++ b/contrib/libs/grpc/third_party/upb/upb/msg.c
@@ -7,106 +7,67 @@
/** upb_msg *******************************************************************/
-static const char _upb_fieldtype_to_sizelg2[12] = {
- 0,
- 0, /* UPB_TYPE_BOOL */
- 2, /* UPB_TYPE_FLOAT */
- 2, /* UPB_TYPE_INT32 */
- 2, /* UPB_TYPE_UINT32 */
- 2, /* UPB_TYPE_ENUM */
- UPB_SIZE(2, 3), /* UPB_TYPE_MESSAGE */
- 3, /* UPB_TYPE_DOUBLE */
- 3, /* UPB_TYPE_INT64 */
- 3, /* UPB_TYPE_UINT64 */
- UPB_SIZE(3, 4), /* UPB_TYPE_STRING */
- UPB_SIZE(3, 4), /* UPB_TYPE_BYTES */
-};
-
-static uintptr_t tag_arrptr(void* ptr, int elem_size_lg2) {
- UPB_ASSERT(elem_size_lg2 <= 4);
- return (uintptr_t)ptr | elem_size_lg2;
-}
-
-static int upb_msg_internalsize(const upb_msglayout *l) {
- return sizeof(upb_msg_internal) - l->extendable * sizeof(void *);
-}
-
-static size_t upb_msg_sizeof(const upb_msglayout *l) {
- return l->size + upb_msg_internalsize(l);
-}
+static const size_t overhead = sizeof(upb_msg_internal);
static const upb_msg_internal *upb_msg_getinternal_const(const upb_msg *msg) {
ptrdiff_t size = sizeof(upb_msg_internal);
- return UPB_PTR_AT(msg, -size, upb_msg_internal);
+ return (upb_msg_internal*)((char*)msg - size);
}
-static upb_msg_internal *upb_msg_getinternal(upb_msg *msg) {
- return (upb_msg_internal*)upb_msg_getinternal_const(msg);
+upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a) {
+ return _upb_msg_new_inl(l, a);
}
void _upb_msg_clear(upb_msg *msg, const upb_msglayout *l) {
- ptrdiff_t internal = upb_msg_internalsize(l);
- void *mem = UPB_PTR_AT(msg, -internal, char);
- memset(mem, 0, l->size + internal);
-}
-
-upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a) {
- void *mem = upb_arena_malloc(a, upb_msg_sizeof(l));
- upb_msg *msg;
-
- if (!mem) {
- return NULL;
- }
-
- msg = UPB_PTR_AT(mem, upb_msg_internalsize(l), upb_msg);
- _upb_msg_clear(msg, l);
- return msg;
+ void *mem = UPB_PTR_AT(msg, -sizeof(upb_msg_internal), char);
+ memset(mem, 0, upb_msg_sizeof(l));
}
bool _upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
upb_arena *arena) {
+
upb_msg_internal *in = upb_msg_getinternal(msg);
- if (len > in->unknown_size - in->unknown_len) {
- upb_alloc *alloc = upb_arena_alloc(arena);
- size_t need = in->unknown_size + len;
- size_t newsize = UPB_MAX(in->unknown_size * 2, need);
- void *mem = upb_realloc(alloc, in->unknown, in->unknown_size, newsize);
- if (!mem) return false;
- in->unknown = mem;
- in->unknown_size = newsize;
+ if (!in->unknown) {
+ size_t size = 128;
+ while (size < len) size *= 2;
+ in->unknown = upb_arena_malloc(arena, size + overhead);
+ if (!in->unknown) return false;
+ in->unknown->size = size;
+ in->unknown->len = 0;
+ } else if (in->unknown->size - in->unknown->len < len) {
+ size_t need = in->unknown->len + len;
+ size_t size = in->unknown->size;
+ while (size < need) size *= 2;
+ in->unknown = upb_arena_realloc(
+ arena, in->unknown, in->unknown->size + overhead, size + overhead);
+ if (!in->unknown) return false;
+ in->unknown->size = size;
}
- memcpy(in->unknown + in->unknown_len, data, len);
- in->unknown_len += len;
+ memcpy(UPB_PTR_AT(in->unknown + 1, in->unknown->len, char), data, len);
+ in->unknown->len += len;
return true;
}
void _upb_msg_discardunknown_shallow(upb_msg *msg) {
upb_msg_internal *in = upb_msg_getinternal(msg);
- in->unknown_len = 0;
+ if (in->unknown) {
+ in->unknown->len = 0;
+ }
}
const char *upb_msg_getunknown(const upb_msg *msg, size_t *len) {
const upb_msg_internal *in = upb_msg_getinternal_const(msg);
- *len = in->unknown_len;
- return in->unknown;
-}
-
-/** upb_array *****************************************************************/
-
-upb_array *_upb_array_new(upb_arena *a, upb_fieldtype_t type) {
- upb_array *arr = upb_arena_malloc(a, sizeof(upb_array));
-
- if (!arr) {
+ if (in->unknown) {
+ *len = in->unknown->len;
+ return (char*)(in->unknown + 1);
+ } else {
+ *len = 0;
return NULL;
}
-
- arr->data = tag_arrptr(NULL, _upb_fieldtype_to_sizelg2[type]);
- arr->len = 0;
- arr->size = 0;
-
- return arr;
}
+/** upb_array *****************************************************************/
+
bool _upb_array_realloc(upb_array *arr, size_t min_size, upb_arena *arena) {
size_t new_size = UPB_MAX(arr->size, 4);
int elem_size_lg2 = arr->data & 7;
@@ -124,16 +85,16 @@ bool _upb_array_realloc(upb_array *arr, size_t min_size, upb_arena *arena) {
return false;
}
- arr->data = tag_arrptr(ptr, elem_size_lg2);
+ arr->data = _upb_tag_arrptr(ptr, elem_size_lg2);
arr->size = new_size;
return true;
}
-static upb_array *getorcreate_array(upb_array **arr_ptr, upb_fieldtype_t type,
+static upb_array *getorcreate_array(upb_array **arr_ptr, int elem_size_lg2,
upb_arena *arena) {
upb_array *arr = *arr_ptr;
if (!arr) {
- arr = _upb_array_new(arena, type);
+ arr = _upb_array_new(arena, 4, elem_size_lg2);
if (!arr) return NULL;
*arr_ptr = arr;
}
@@ -141,22 +102,25 @@ static upb_array *getorcreate_array(upb_array **arr_ptr, upb_fieldtype_t type,
}
void *_upb_array_resize_fallback(upb_array **arr_ptr, size_t size,
- upb_fieldtype_t type, upb_arena *arena) {
- upb_array *arr = getorcreate_array(arr_ptr, type, arena);
- return arr && _upb_array_resize(arr, size, arena) ? _upb_array_ptr(arr) : NULL;
+ int elem_size_lg2, upb_arena *arena) {
+ upb_array *arr = getorcreate_array(arr_ptr, elem_size_lg2, arena);
+ return arr && _upb_array_resize(arr, size, arena) ? _upb_array_ptr(arr)
+ : NULL;
}
bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value,
- upb_fieldtype_t type, upb_arena *arena) {
- upb_array *arr = getorcreate_array(arr_ptr, type, arena);
- size_t elem = arr->len;
- int lg2 = _upb_fieldtype_to_sizelg2[type];
- char *data;
+ int elem_size_lg2, upb_arena *arena) {
+ upb_array *arr = getorcreate_array(arr_ptr, elem_size_lg2, arena);
+ if (!arr) return false;
+
+ size_t elems = arr->len;
- if (!arr || !_upb_array_resize(arr, elem + 1, arena)) return false;
+ if (!_upb_array_resize(arr, elems + 1, arena)) {
+ return false;
+ }
- data = _upb_array_ptr(arr);
- memcpy(data + (elem << lg2), value, 1 << lg2);
+ char *data = _upb_array_ptr(arr);
+ memcpy(data + (elems << elem_size_lg2), value, 1 << elem_size_lg2);
return true;
}
@@ -169,9 +133,124 @@ upb_map *_upb_map_new(upb_arena *a, size_t key_size, size_t value_size) {
return NULL;
}
- upb_strtable_init2(&map->table, UPB_CTYPE_INT32, upb_arena_alloc(a));
+ upb_strtable_init2(&map->table, UPB_CTYPE_INT32, 4, upb_arena_alloc(a));
map->key_size = key_size;
map->val_size = value_size;
return map;
}
+
+static void _upb_mapsorter_getkeys(const void *_a, const void *_b, void *a_key,
+ void *b_key, size_t size) {
+ const upb_tabent *const*a = _a;
+ const upb_tabent *const*b = _b;
+ upb_strview a_tabkey = upb_tabstrview((*a)->key);
+ upb_strview b_tabkey = upb_tabstrview((*b)->key);
+ _upb_map_fromkey(a_tabkey, a_key, size);
+ _upb_map_fromkey(b_tabkey, b_key, size);
+}
+
+static int _upb_mapsorter_cmpi64(const void *_a, const void *_b) {
+ int64_t a, b;
+ _upb_mapsorter_getkeys(_a, _b, &a, &b, 8);
+ return a - b;
+}
+
+static int _upb_mapsorter_cmpu64(const void *_a, const void *_b) {
+ uint64_t a, b;
+ _upb_mapsorter_getkeys(_a, _b, &a, &b, 8);
+ return a - b;
+}
+
+static int _upb_mapsorter_cmpi32(const void *_a, const void *_b) {
+ int32_t a, b;
+ _upb_mapsorter_getkeys(_a, _b, &a, &b, 4);
+ return a - b;
+}
+
+static int _upb_mapsorter_cmpu32(const void *_a, const void *_b) {
+ uint32_t a, b;
+ _upb_mapsorter_getkeys(_a, _b, &a, &b, 4);
+ return a - b;
+}
+
+static int _upb_mapsorter_cmpbool(const void *_a, const void *_b) {
+ bool a, b;
+ _upb_mapsorter_getkeys(_a, _b, &a, &b, 1);
+ return a - b;
+}
+
+static int _upb_mapsorter_cmpstr(const void *_a, const void *_b) {
+ upb_strview a, b;
+ _upb_mapsorter_getkeys(_a, _b, &a, &b, UPB_MAPTYPE_STRING);
+ size_t common_size = UPB_MIN(a.size, b.size);
+ int cmp = memcmp(a.data, b.data, common_size);
+ if (cmp) return cmp;
+ return a.size - b.size;
+}
+
+bool _upb_mapsorter_pushmap(_upb_mapsorter *s, upb_descriptortype_t key_type,
+ const upb_map *map, _upb_sortedmap *sorted) {
+ int map_size = _upb_map_size(map);
+ sorted->start = s->size;
+ sorted->pos = sorted->start;
+ sorted->end = sorted->start + map_size;
+
+ /* Grow s->entries if necessary. */
+ if (sorted->end > s->cap) {
+ s->cap = _upb_lg2ceilsize(sorted->end);
+ s->entries = realloc(s->entries, s->cap * sizeof(*s->entries));
+ if (!s->entries) return false;
+ }
+
+ s->size = sorted->end;
+
+ /* Copy non-empty entries from the table to s->entries. */
+ upb_tabent const**dst = &s->entries[sorted->start];
+ const upb_tabent *src = map->table.t.entries;
+ const upb_tabent *end = src + upb_table_size(&map->table.t);
+ for (; src < end; src++) {
+ if (!upb_tabent_isempty(src)) {
+ *dst = src;
+ dst++;
+ }
+ }
+ UPB_ASSERT(dst == &s->entries[sorted->end]);
+
+ /* Sort entries according to the key type. */
+
+ int (*compar)(const void *, const void *);
+
+ switch (key_type) {
+ case UPB_DESCRIPTOR_TYPE_INT64:
+ case UPB_DESCRIPTOR_TYPE_SFIXED64:
+ case UPB_DESCRIPTOR_TYPE_SINT64:
+ compar = _upb_mapsorter_cmpi64;
+ break;
+ case UPB_DESCRIPTOR_TYPE_UINT64:
+ case UPB_DESCRIPTOR_TYPE_FIXED64:
+ compar = _upb_mapsorter_cmpu64;
+ break;
+ case UPB_DESCRIPTOR_TYPE_INT32:
+ case UPB_DESCRIPTOR_TYPE_SINT32:
+ case UPB_DESCRIPTOR_TYPE_SFIXED32:
+ case UPB_DESCRIPTOR_TYPE_ENUM:
+ compar = _upb_mapsorter_cmpi32;
+ break;
+ case UPB_DESCRIPTOR_TYPE_UINT32:
+ case UPB_DESCRIPTOR_TYPE_FIXED32:
+ compar = _upb_mapsorter_cmpu32;
+ break;
+ case UPB_DESCRIPTOR_TYPE_BOOL:
+ compar = _upb_mapsorter_cmpbool;
+ break;
+ case UPB_DESCRIPTOR_TYPE_STRING:
+ compar = _upb_mapsorter_cmpstr;
+ break;
+ default:
+ UPB_UNREACHABLE();
+ }
+
+ qsort(&s->entries[sorted->start], map_size, sizeof(*s->entries), compar);
+ return true;
+}
diff --git a/contrib/libs/grpc/third_party/upb/upb/msg.h b/contrib/libs/grpc/third_party/upb/upb/msg.h
index 695c278b211..9b4557ac183 100644
--- a/contrib/libs/grpc/third_party/upb/upb/msg.h
+++ b/contrib/libs/grpc/third_party/upb/upb/msg.h
@@ -9,11 +9,13 @@
#define UPB_MSG_H_
#include <stdint.h>
+#include <stdlib.h>
#include <string.h>
#include "upb/table.int.h"
#include "upb/upb.h"
+/* Must be last. */
#include "upb/port_def.inc"
#ifdef __cplusplus
@@ -46,6 +48,18 @@ typedef struct {
uint8_t label; /* google.protobuf.Label or _UPB_LABEL_* above. */
} upb_msglayout_field;
+struct upb_decstate;
+struct upb_msglayout;
+
+typedef const char *_upb_field_parser(struct upb_decstate *d, const char *ptr,
+ upb_msg *msg, intptr_t table,
+ uint64_t hasbits, uint64_t data);
+
+typedef struct {
+ uint64_t field_data;
+ _upb_field_parser *field_parser;
+} _upb_fasttable_entry;
+
typedef struct upb_msglayout {
const struct upb_msglayout *const* submsgs;
const upb_msglayout_field *fields;
@@ -54,6 +68,10 @@ typedef struct upb_msglayout {
uint16_t size;
uint16_t field_count;
bool extendable;
+ uint8_t table_mask;
+ /* To constant-initialize the tables of variable length, we need a flexible
+ * array member, and we need to compile in C99 mode. */
+ _upb_fasttable_entry fasttable[];
} upb_msglayout;
/** upb_msg *******************************************************************/
@@ -62,25 +80,42 @@ typedef struct upb_msglayout {
* compatibility. We put these before the user's data. The user's upb_msg*
* points after the upb_msg_internal. */
-/* Used when a message is not extendable. */
typedef struct {
- char *unknown;
- size_t unknown_len;
- size_t unknown_size;
-} upb_msg_internal;
+ uint32_t len;
+ uint32_t size;
+ /* Data follows. */
+} upb_msg_unknowndata;
-/* Used when a message is extendable. */
+/* Used when a message is not extendable. */
typedef struct {
- upb_inttable *extdict;
- upb_msg_internal base;
-} upb_msg_internal_withext;
+ upb_msg_unknowndata *unknown;
+} upb_msg_internal;
/* Maps upb_fieldtype_t -> memory size. */
extern char _upb_fieldtype_to_size[12];
+UPB_INLINE size_t upb_msg_sizeof(const upb_msglayout *l) {
+ return l->size + sizeof(upb_msg_internal);
+}
+
+UPB_INLINE upb_msg *_upb_msg_new_inl(const upb_msglayout *l, upb_arena *a) {
+ size_t size = upb_msg_sizeof(l);
+ void *mem = upb_arena_malloc(a, size);
+ upb_msg *msg;
+ if (UPB_UNLIKELY(!mem)) return NULL;
+ msg = UPB_PTR_AT(mem, sizeof(upb_msg_internal), upb_msg);
+ memset(mem, 0, size);
+ return msg;
+}
+
/* Creates a new messages with the given layout on the given arena. */
upb_msg *_upb_msg_new(const upb_msglayout *l, upb_arena *a);
+UPB_INLINE upb_msg_internal *upb_msg_getinternal(upb_msg *msg) {
+ ptrdiff_t size = sizeof(upb_msg_internal);
+ return (upb_msg_internal*)((char*)msg - size);
+}
+
/* Clears the given message. */
void _upb_msg_clear(upb_msg *msg, const upb_msglayout *l);
@@ -173,27 +208,49 @@ typedef struct {
uintptr_t data; /* Tagged ptr: low 3 bits of ptr are lg2(elem size). */
size_t len; /* Measured in elements. */
size_t size; /* Measured in elements. */
+ uint64_t junk;
} upb_array;
UPB_INLINE const void *_upb_array_constptr(const upb_array *arr) {
+ UPB_ASSERT((arr->data & 7) <= 4);
return (void*)(arr->data & ~(uintptr_t)7);
}
+UPB_INLINE uintptr_t _upb_array_tagptr(void* ptr, int elem_size_lg2) {
+ UPB_ASSERT(elem_size_lg2 <= 4);
+ return (uintptr_t)ptr | elem_size_lg2;
+}
+
UPB_INLINE void *_upb_array_ptr(upb_array *arr) {
return (void*)_upb_array_constptr(arr);
}
-/* Creates a new array on the given arena. */
-upb_array *_upb_array_new(upb_arena *a, upb_fieldtype_t type);
+UPB_INLINE uintptr_t _upb_tag_arrptr(void* ptr, int elem_size_lg2) {
+ UPB_ASSERT(elem_size_lg2 <= 4);
+ UPB_ASSERT(((uintptr_t)ptr & 7) == 0);
+ return (uintptr_t)ptr | (unsigned)elem_size_lg2;
+}
+
+UPB_INLINE upb_array *_upb_array_new(upb_arena *a, size_t init_size,
+ int elem_size_lg2) {
+ const size_t arr_size = UPB_ALIGN_UP(sizeof(upb_array), 8);
+ const size_t bytes = sizeof(upb_array) + (init_size << elem_size_lg2);
+ upb_array *arr = (upb_array*)upb_arena_malloc(a, bytes);
+ if (!arr) return NULL;
+ arr->data = _upb_tag_arrptr(UPB_PTR_AT(arr, arr_size, void), elem_size_lg2);
+ arr->len = 0;
+ arr->size = init_size;
+ return arr;
+}
/* Resizes the capacity of the array to be at least min_size. */
bool _upb_array_realloc(upb_array *arr, size_t min_size, upb_arena *arena);
/* Fallback functions for when the accessors require a resize. */
void *_upb_array_resize_fallback(upb_array **arr_ptr, size_t size,
- upb_fieldtype_t type, upb_arena *arena);
+ int elem_size_lg2, upb_arena *arena);
bool _upb_array_append_fallback(upb_array **arr_ptr, const void *value,
- upb_fieldtype_t type, upb_arena *arena);
+ int elem_size_lg2, upb_arena *arena);
UPB_INLINE bool _upb_array_reserve(upb_array *arr, size_t size,
upb_arena *arena) {
@@ -232,29 +289,28 @@ UPB_INLINE void *_upb_array_mutable_accessor(void *msg, size_t ofs,
}
}
-UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size,
- upb_fieldtype_t type,
- upb_arena *arena) {
- upb_array **arr_ptr = PTR_AT(msg, ofs, upb_array*);
+UPB_INLINE void *_upb_array_resize_accessor2(void *msg, size_t ofs, size_t size,
+ int elem_size_lg2,
+ upb_arena *arena) {
+ upb_array **arr_ptr = PTR_AT(msg, ofs, upb_array *);
upb_array *arr = *arr_ptr;
if (!arr || arr->size < size) {
- return _upb_array_resize_fallback(arr_ptr, size, type, arena);
+ return _upb_array_resize_fallback(arr_ptr, size, elem_size_lg2, arena);
}
arr->len = size;
return _upb_array_ptr(arr);
}
-
-UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs,
- size_t elem_size,
- upb_fieldtype_t type,
- const void *value,
- upb_arena *arena) {
- upb_array **arr_ptr = PTR_AT(msg, ofs, upb_array*);
+UPB_INLINE bool _upb_array_append_accessor2(void *msg, size_t ofs,
+ int elem_size_lg2,
+ const void *value,
+ upb_arena *arena) {
+ upb_array **arr_ptr = PTR_AT(msg, ofs, upb_array *);
+ size_t elem_size = 1 << elem_size_lg2;
upb_array *arr = *arr_ptr;
- void* ptr;
+ void *ptr;
if (!arr || arr->len == arr->size) {
- return _upb_array_append_fallback(arr_ptr, value, type, arena);
+ return _upb_array_append_fallback(arr_ptr, value, elem_size_lg2, arena);
}
ptr = _upb_array_ptr(arr);
memcpy(PTR_AT(ptr, arr->len * elem_size, char), value, elem_size);
@@ -262,6 +318,42 @@ UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs,
return true;
}
+/* Used by old generated code, remove once all code has been regenerated. */
+UPB_INLINE int _upb_sizelg2(upb_fieldtype_t type) {
+ switch (type) {
+ case UPB_TYPE_BOOL:
+ return 0;
+ case UPB_TYPE_FLOAT:
+ case UPB_TYPE_INT32:
+ case UPB_TYPE_UINT32:
+ case UPB_TYPE_ENUM:
+ return 2;
+ case UPB_TYPE_MESSAGE:
+ return UPB_SIZE(2, 3);
+ case UPB_TYPE_DOUBLE:
+ case UPB_TYPE_INT64:
+ case UPB_TYPE_UINT64:
+ return 3;
+ case UPB_TYPE_STRING:
+ case UPB_TYPE_BYTES:
+ return UPB_SIZE(3, 4);
+ }
+ UPB_UNREACHABLE();
+}
+UPB_INLINE void *_upb_array_resize_accessor(void *msg, size_t ofs, size_t size,
+ upb_fieldtype_t type,
+ upb_arena *arena) {
+ return _upb_array_resize_accessor2(msg, ofs, size, _upb_sizelg2(type), arena);
+}
+UPB_INLINE bool _upb_array_append_accessor(void *msg, size_t ofs,
+ size_t elem_size, upb_fieldtype_t type,
+ const void *value,
+ upb_arena *arena) {
+ (void)elem_size;
+ return _upb_array_append_accessor2(msg, ofs, _upb_sizelg2(type), value,
+ arena);
+}
+
/** upb_map *******************************************************************/
/* Right now we use strmaps for everything. We'll likely want to use
@@ -318,17 +410,17 @@ UPB_INLINE void _upb_map_fromkey(upb_strview key, void* out, size_t size) {
}
}
-UPB_INLINE upb_value _upb_map_tovalue(const void *val, size_t size,
- upb_arena *a) {
- upb_value ret = {0};
+UPB_INLINE bool _upb_map_tovalue(const void *val, size_t size, upb_value *msgval,
+ upb_arena *a) {
if (size == UPB_MAPTYPE_STRING) {
upb_strview *strp = (upb_strview*)upb_arena_malloc(a, sizeof(*strp));
+ if (!strp) return false;
*strp = *(upb_strview*)val;
- ret = upb_value_ptr(strp);
+ *msgval = upb_value_ptr(strp);
} else {
- memcpy(&ret, val, size);
+ memcpy(msgval, val, size);
}
- return ret;
+ return true;
}
UPB_INLINE void _upb_map_fromvalue(upb_value val, void* out, size_t size) {
@@ -370,7 +462,8 @@ UPB_INLINE void* _upb_map_next(const upb_map *map, size_t *iter) {
UPB_INLINE bool _upb_map_set(upb_map *map, const void *key, size_t key_size,
void *val, size_t val_size, upb_arena *arena) {
upb_strview strkey = _upb_map_tokey(key, key_size);
- upb_value tabval = _upb_map_tovalue(val, val_size, arena);
+ upb_value tabval = {0};
+ if (!_upb_map_tovalue(val, val_size, &tabval, arena)) return false;
upb_alloc *a = upb_arena_alloc(arena);
/* TODO(haberman): add overwrite operation to minimize number of lookups. */
@@ -462,6 +555,53 @@ UPB_INLINE void _upb_msg_map_set_value(void* msg, const void* val, size_t size)
}
}
+/** _upb_mapsorter *************************************************************/
+
+/* _upb_mapsorter sorts maps and provides ordered iteration over the entries.
+ * Since maps can be recursive (map values can be messages which contain other maps).
+ * _upb_mapsorter can contain a stack of maps. */
+
+typedef struct {
+ upb_tabent const**entries;
+ int size;
+ int cap;
+} _upb_mapsorter;
+
+typedef struct {
+ int start;
+ int pos;
+ int end;
+} _upb_sortedmap;
+
+UPB_INLINE void _upb_mapsorter_init(_upb_mapsorter *s) {
+ s->entries = NULL;
+ s->size = 0;
+ s->cap = 0;
+}
+
+UPB_INLINE void _upb_mapsorter_destroy(_upb_mapsorter *s) {
+ if (s->entries) free(s->entries);
+}
+
+bool _upb_mapsorter_pushmap(_upb_mapsorter *s, upb_descriptortype_t key_type,
+ const upb_map *map, _upb_sortedmap *sorted);
+
+UPB_INLINE void _upb_mapsorter_popmap(_upb_mapsorter *s, _upb_sortedmap *sorted) {
+ s->size = sorted->start;
+}
+
+UPB_INLINE bool _upb_sortedmap_next(_upb_mapsorter *s, const upb_map *map,
+ _upb_sortedmap *sorted,
+ upb_map_entry *ent) {
+ if (sorted->pos == sorted->end) return false;
+ const upb_tabent *tabent = s->entries[sorted->pos++];
+ upb_strview key = upb_tabstrview(tabent->key);
+ _upb_map_fromkey(key, &ent->k, map->key_size);
+ upb_value val = {tabent->val.val};
+ _upb_map_fromvalue(val, &ent->v, map->val_size);
+ return true;
+}
+
#undef PTR_AT
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/third_party/upb/upb/port.c b/contrib/libs/grpc/third_party/upb/upb/port.c
deleted file mode 100644
index 9ecf135167a..00000000000
--- a/contrib/libs/grpc/third_party/upb/upb/port.c
+++ /dev/null
@@ -1,26 +0,0 @@
-
-#include "upb/port_def.inc"
-
-#ifdef UPB_MSVC_VSNPRINTF
-/* Visual C++ earlier than 2015 doesn't have standard C99 snprintf and
- * vsnprintf. To support them, missing functions are manually implemented
- * using the existing secure functions. */
-int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg) {
- if (!s) {
- return _vscprintf(format, arg);
- }
- int ret = _vsnprintf_s(s, n, _TRUNCATE, format, arg);
- if (ret < 0) {
- ret = _vscprintf(format, arg);
- }
- return ret;
-}
-
-int msvc_snprintf(char* s, size_t n, const char* format, ...) {
- va_list arg;
- va_start(arg, format);
- int ret = msvc_vsnprintf(s, n, format, arg);
- va_end(arg);
- return ret;
-}
-#endif
diff --git a/contrib/libs/grpc/third_party/upb/upb/port_def.inc b/contrib/libs/grpc/third_party/upb/upb/port_def.inc
index 2c144dc066a..2cd1bb6985d 100644
--- a/contrib/libs/grpc/third_party/upb/upb/port_def.inc
+++ b/contrib/libs/grpc/third_party/upb/upb/port_def.inc
@@ -20,6 +20,13 @@
*
* This file is private and must not be included by users!
*/
+
+#if !((defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
+ (defined(__cplusplus) && __cplusplus >= 201103L) || \
+ (defined(_MSC_VER) && _MSC_VER >= 1900))
+#error upb requires C99 or C++11 or MSVC >= 2015.
+#endif
+
#include <stdint.h>
#include <stddef.h>
@@ -68,66 +75,21 @@
#define UPB_UNLIKELY(x) (x)
#endif
-/* Define UPB_BIG_ENDIAN manually if you're on big endian and your compiler
- * doesn't provide these preprocessor symbols. */
-#if defined(__BYTE_ORDER__) && (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
-#define UPB_BIG_ENDIAN
-#endif
-
/* Macros for function attributes on compilers that support them. */
#ifdef __GNUC__
#define UPB_FORCEINLINE __inline__ __attribute__((always_inline))
#define UPB_NOINLINE __attribute__((noinline))
#define UPB_NORETURN __attribute__((__noreturn__))
+#elif defined(_MSC_VER)
+#define UPB_NOINLINE
+#define UPB_FORCEINLINE
+#define UPB_NORETURN __declspec(noreturn)
#else /* !defined(__GNUC__) */
#define UPB_FORCEINLINE
#define UPB_NOINLINE
#define UPB_NORETURN
#endif
-#if __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
-/* C99/C++11 versions. */
-#include <stdio.h>
-#define _upb_snprintf snprintf
-#define _upb_vsnprintf vsnprintf
-#define _upb_va_copy(a, b) va_copy(a, b)
-#elif defined(_MSC_VER)
-/* Microsoft C/C++ versions. */
-#include <stdarg.h>
-#include <stdio.h>
-#if _MSC_VER < 1900
-int msvc_snprintf(char* s, size_t n, const char* format, ...);
-int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg);
-#define UPB_MSVC_VSNPRINTF
-#define _upb_snprintf msvc_snprintf
-#define _upb_vsnprintf msvc_vsnprintf
-#else
-#define _upb_snprintf snprintf
-#define _upb_vsnprintf vsnprintf
-#endif
-#define _upb_va_copy(a, b) va_copy(a, b)
-#elif defined __GNUC__
-/* A few hacky workarounds for functions not in C89.
- * For internal use only!
- * TODO(haberman): fix these by including our own implementations, or finding
- * another workaround.
- */
-#define _upb_snprintf __builtin_snprintf
-#define _upb_vsnprintf __builtin_vsnprintf
-#define _upb_va_copy(a, b) __va_copy(a, b)
-#else
-#error Need implementations of [v]snprintf and va_copy
-#endif
-
-#ifdef __cplusplus
-#if __cplusplus >= 201103L || defined(__GXX_EXPERIMENTAL_CXX0X__) || \
- (defined(_MSC_VER) && _MSC_VER >= 1900)
-/* C++11 is present */
-#else
-#error upb requires C++11 for C++ support
-#endif
-#endif
-
#define UPB_MAX(x, y) ((x) > (y) ? (x) : (y))
#define UPB_MIN(x, y) ((x) < (y) ? (x) : (y))
@@ -155,25 +117,76 @@ int msvc_vsnprintf(char* s, size_t n, const char* format, va_list arg);
#define UPB_ASSERT(expr) assert(expr)
#endif
-/* UPB_ASSERT_DEBUGVAR(): assert that uses functions or variables that only
- * exist in debug mode. This turns into regular assert. */
-#define UPB_ASSERT_DEBUGVAR(expr) assert(expr)
-
#if defined(__GNUC__) || defined(__clang__)
#define UPB_UNREACHABLE() do { assert(0); __builtin_unreachable(); } while(0)
#else
#define UPB_UNREACHABLE() do { assert(0); } while(0)
#endif
-/* UPB_INFINITY representing floating-point positive infinity. */
-#include <math.h>
-#ifdef INFINITY
-#define UPB_INFINITY INFINITY
+/* UPB_SETJMP() / UPB_LONGJMP(): avoid setting/restoring signal mask. */
+#ifdef __APPLE__
+#define UPB_SETJMP(buf) _setjmp(buf)
+#define UPB_LONGJMP(buf, val) _longjmp(buf, val)
+#else
+#define UPB_SETJMP(buf) setjmp(buf)
+#define UPB_LONGJMP(buf, val) longjmp(buf, val)
+#endif
+
+/* Configure whether fasttable is switched on or not. *************************/
+
+#if defined(__x86_64__) && defined(__GNUC__)
+#define UPB_FASTTABLE_SUPPORTED 1
+#else
+#define UPB_FASTTABLE_SUPPORTED 0
+#endif
+
+/* define UPB_ENABLE_FASTTABLE to force fast table support.
+ * This is useful when we want to ensure we are really getting fasttable,
+ * for example for testing or benchmarking. */
+#if defined(UPB_ENABLE_FASTTABLE)
+#if !UPB_FASTTABLE_SUPPORTED
+#error fasttable is x86-64 + Clang/GCC only
+#endif
+#define UPB_FASTTABLE 1
+/* Define UPB_TRY_ENABLE_FASTTABLE to use fasttable if possible.
+ * This is useful for releasing code that might be used on multiple platforms,
+ * for example the PHP or Ruby C extensions. */
+#elif defined(UPB_TRY_ENABLE_FASTTABLE)
+#define UPB_FASTTABLE UPB_FASTTABLE_SUPPORTED
#else
-#define UPB_INFINITY (1.0 / 0.0)
+#define UPB_FASTTABLE 0
#endif
-#ifdef NAN
-#define UPB_NAN NAN
+
+/* UPB_FASTTABLE_INIT() allows protos compiled for fasttable to gracefully
+ * degrade to non-fasttable if we are using UPB_TRY_ENABLE_FASTTABLE. */
+#if !UPB_FASTTABLE && defined(UPB_TRY_ENABLE_FASTTABLE)
+#define UPB_FASTTABLE_INIT(...)
#else
-#define UPB_NAN (0.0 / 0.0)
+#define UPB_FASTTABLE_INIT(...) __VA_ARGS__
#endif
+
+#undef UPB_FASTTABLE_SUPPORTED
+
+/* ASAN poisoning (for arena) *************************************************/
+
+#if defined(__SANITIZE_ADDRESS__)
+#define UPB_ASAN 1
+#ifdef __cplusplus
+extern "C" {
+#endif
+void __asan_poison_memory_region(void const volatile *addr, size_t size);
+void __asan_unpoison_memory_region(void const volatile *addr, size_t size);
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+#define UPB_POISON_MEMORY_REGION(addr, size) \
+ __asan_poison_memory_region((addr), (size))
+#define UPB_UNPOISON_MEMORY_REGION(addr, size) \
+ __asan_unpoison_memory_region((addr), (size))
+#else
+#define UPB_ASAN 0
+#define UPB_POISON_MEMORY_REGION(addr, size) \
+ ((void)(addr), (void)(size))
+#define UPB_UNPOISON_MEMORY_REGION(addr, size) \
+ ((void)(addr), (void)(size))
+#endif
diff --git a/contrib/libs/grpc/third_party/upb/upb/port_undef.inc b/contrib/libs/grpc/third_party/upb/upb/port_undef.inc
index c2b5f4a322b..b7be52cc985 100644
--- a/contrib/libs/grpc/third_party/upb/upb/port_undef.inc
+++ b/contrib/libs/grpc/third_party/upb/upb/port_undef.inc
@@ -18,11 +18,7 @@
#undef UPB_UNUSED
#undef UPB_ASSUME
#undef UPB_ASSERT
-#undef UPB_ASSERT_DEBUGVAR
#undef UPB_UNREACHABLE
-#undef UPB_INFINITY
-#undef UPB_NAN
-#undef UPB_MSVC_VSNPRINTF
-#undef _upb_snprintf
-#undef _upb_vsnprintf
-#undef _upb_va_copy
+#undef UPB_POISON_MEMORY_REGION
+#undef UPB_UNPOISON_MEMORY_REGION
+#undef UPB_ASAN
diff --git a/contrib/libs/grpc/third_party/upb/upb/reflection.c b/contrib/libs/grpc/third_party/upb/upb/reflection.c
new file mode 100644
index 00000000000..a233d964e92
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/reflection.c
@@ -0,0 +1,408 @@
+
+#include "upb/reflection.h"
+
+#include <string.h>
+#include "upb/table.int.h"
+#include "upb/msg.h"
+
+#include "upb/port_def.inc"
+
+static size_t get_field_size(const upb_msglayout_field *f) {
+ static unsigned char sizes[] = {
+ 0,/* 0 */
+ 8, /* UPB_DESCRIPTOR_TYPE_DOUBLE */
+ 4, /* UPB_DESCRIPTOR_TYPE_FLOAT */
+ 8, /* UPB_DESCRIPTOR_TYPE_INT64 */
+ 8, /* UPB_DESCRIPTOR_TYPE_UINT64 */
+ 4, /* UPB_DESCRIPTOR_TYPE_INT32 */
+ 8, /* UPB_DESCRIPTOR_TYPE_FIXED64 */
+ 4, /* UPB_DESCRIPTOR_TYPE_FIXED32 */
+ 1, /* UPB_DESCRIPTOR_TYPE_BOOL */
+ sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_STRING */
+ sizeof(void*), /* UPB_DESCRIPTOR_TYPE_GROUP */
+ sizeof(void*), /* UPB_DESCRIPTOR_TYPE_MESSAGE */
+ sizeof(upb_strview), /* UPB_DESCRIPTOR_TYPE_BYTES */
+ 4, /* UPB_DESCRIPTOR_TYPE_UINT32 */
+ 4, /* UPB_DESCRIPTOR_TYPE_ENUM */
+ 4, /* UPB_DESCRIPTOR_TYPE_SFIXED32 */
+ 8, /* UPB_DESCRIPTOR_TYPE_SFIXED64 */
+ 4, /* UPB_DESCRIPTOR_TYPE_SINT32 */
+ 8, /* UPB_DESCRIPTOR_TYPE_SINT64 */
+ };
+ return _upb_repeated_or_map(f) ? sizeof(void *) : sizes[f->descriptortype];
+}
+
+/* Strings/bytes are special-cased in maps. */
+static char _upb_fieldtype_to_mapsize[12] = {
+ 0,
+ 1, /* UPB_TYPE_BOOL */
+ 4, /* UPB_TYPE_FLOAT */
+ 4, /* UPB_TYPE_INT32 */
+ 4, /* UPB_TYPE_UINT32 */
+ 4, /* UPB_TYPE_ENUM */
+ sizeof(void*), /* UPB_TYPE_MESSAGE */
+ 8, /* UPB_TYPE_DOUBLE */
+ 8, /* UPB_TYPE_INT64 */
+ 8, /* UPB_TYPE_UINT64 */
+ 0, /* UPB_TYPE_STRING */
+ 0, /* UPB_TYPE_BYTES */
+};
+
+static const char _upb_fieldtype_to_sizelg2[12] = {
+ 0,
+ 0, /* UPB_TYPE_BOOL */
+ 2, /* UPB_TYPE_FLOAT */
+ 2, /* UPB_TYPE_INT32 */
+ 2, /* UPB_TYPE_UINT32 */
+ 2, /* UPB_TYPE_ENUM */
+ UPB_SIZE(2, 3), /* UPB_TYPE_MESSAGE */
+ 3, /* UPB_TYPE_DOUBLE */
+ 3, /* UPB_TYPE_INT64 */
+ 3, /* UPB_TYPE_UINT64 */
+ UPB_SIZE(3, 4), /* UPB_TYPE_STRING */
+ UPB_SIZE(3, 4), /* UPB_TYPE_BYTES */
+};
+
+/** upb_msg *******************************************************************/
+
+upb_msg *upb_msg_new(const upb_msgdef *m, upb_arena *a) {
+ return _upb_msg_new(upb_msgdef_layout(m), a);
+}
+
+static bool in_oneof(const upb_msglayout_field *field) {
+ return field->presence < 0;
+}
+
+static upb_msgval _upb_msg_getraw(const upb_msg *msg, const upb_fielddef *f) {
+ const upb_msglayout_field *field = upb_fielddef_layout(f);
+ const char *mem = UPB_PTR_AT(msg, field->offset, char);
+ upb_msgval val = {0};
+ memcpy(&val, mem, get_field_size(field));
+ return val;
+}
+
+bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f) {
+ const upb_msglayout_field *field = upb_fielddef_layout(f);
+ if (in_oneof(field)) {
+ return _upb_getoneofcase_field(msg, field) == field->number;
+ } else if (field->presence > 0) {
+ return _upb_hasbit_field(msg, field);
+ } else {
+ UPB_ASSERT(field->descriptortype == UPB_DESCRIPTOR_TYPE_MESSAGE ||
+ field->descriptortype == UPB_DESCRIPTOR_TYPE_GROUP);
+ return _upb_msg_getraw(msg, f).msg_val != NULL;
+ }
+}
+
+const upb_fielddef *upb_msg_whichoneof(const upb_msg *msg,
+ const upb_oneofdef *o) {
+ const upb_fielddef *f = upb_oneofdef_field(o, 0);
+ if (upb_oneofdef_issynthetic(o)) {
+ UPB_ASSERT(upb_oneofdef_fieldcount(o) == 1);
+ return upb_msg_has(msg, f) ? f : NULL;
+ } else {
+ const upb_msglayout_field *field = upb_fielddef_layout(f);
+ uint32_t oneof_case = _upb_getoneofcase_field(msg, field);
+ f = oneof_case ? upb_oneofdef_itof(o, oneof_case) : NULL;
+ UPB_ASSERT((f != NULL) == (oneof_case != 0));
+ return f;
+ }
+}
+
+upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f) {
+ if (!upb_fielddef_haspresence(f) || upb_msg_has(msg, f)) {
+ return _upb_msg_getraw(msg, f);
+ } else {
+ /* TODO(haberman): change upb_fielddef to not require this switch(). */
+ upb_msgval val = {0};
+ switch (upb_fielddef_type(f)) {
+ case UPB_TYPE_INT32:
+ case UPB_TYPE_ENUM:
+ val.int32_val = upb_fielddef_defaultint32(f);
+ break;
+ case UPB_TYPE_INT64:
+ val.int64_val = upb_fielddef_defaultint64(f);
+ break;
+ case UPB_TYPE_UINT32:
+ val.uint32_val = upb_fielddef_defaultuint32(f);
+ break;
+ case UPB_TYPE_UINT64:
+ val.uint64_val = upb_fielddef_defaultuint64(f);
+ break;
+ case UPB_TYPE_FLOAT:
+ val.float_val = upb_fielddef_defaultfloat(f);
+ break;
+ case UPB_TYPE_DOUBLE:
+ val.double_val = upb_fielddef_defaultdouble(f);
+ break;
+ case UPB_TYPE_BOOL:
+ val.bool_val = upb_fielddef_defaultbool(f);
+ break;
+ case UPB_TYPE_STRING:
+ case UPB_TYPE_BYTES:
+ val.str_val.data = upb_fielddef_defaultstr(f, &val.str_val.size);
+ break;
+ case UPB_TYPE_MESSAGE:
+ val.msg_val = NULL;
+ break;
+ }
+ return val;
+ }
+}
+
+upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f,
+ upb_arena *a) {
+ const upb_msglayout_field *field = upb_fielddef_layout(f);
+ upb_mutmsgval ret;
+ char *mem = UPB_PTR_AT(msg, field->offset, char);
+ bool wrong_oneof =
+ in_oneof(field) && _upb_getoneofcase_field(msg, field) != field->number;
+
+ memcpy(&ret, mem, sizeof(void*));
+
+ if (a && (!ret.msg || wrong_oneof)) {
+ if (upb_fielddef_ismap(f)) {
+ const upb_msgdef *entry = upb_fielddef_msgsubdef(f);
+ const upb_fielddef *key = upb_msgdef_itof(entry, UPB_MAPENTRY_KEY);
+ const upb_fielddef *value = upb_msgdef_itof(entry, UPB_MAPENTRY_VALUE);
+ ret.map = upb_map_new(a, upb_fielddef_type(key), upb_fielddef_type(value));
+ } else if (upb_fielddef_isseq(f)) {
+ ret.array = upb_array_new(a, upb_fielddef_type(f));
+ } else {
+ UPB_ASSERT(upb_fielddef_issubmsg(f));
+ ret.msg = upb_msg_new(upb_fielddef_msgsubdef(f), a);
+ }
+
+ memcpy(mem, &ret, sizeof(void*));
+
+ if (wrong_oneof) {
+ *_upb_oneofcase_field(msg, field) = field->number;
+ } else if (field->presence > 0) {
+ _upb_sethas_field(msg, field);
+ }
+ }
+ return ret;
+}
+
+void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val,
+ upb_arena *a) {
+ const upb_msglayout_field *field = upb_fielddef_layout(f);
+ char *mem = UPB_PTR_AT(msg, field->offset, char);
+ UPB_UNUSED(a); /* We reserve the right to make set insert into a map. */
+ memcpy(mem, &val, get_field_size(field));
+ if (field->presence > 0) {
+ _upb_sethas_field(msg, field);
+ } else if (in_oneof(field)) {
+ *_upb_oneofcase_field(msg, field) = field->number;
+ }
+}
+
+void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f) {
+ const upb_msglayout_field *field = upb_fielddef_layout(f);
+ char *mem = UPB_PTR_AT(msg, field->offset, char);
+
+ if (field->presence > 0) {
+ _upb_clearhas_field(msg, field);
+ } else if (in_oneof(field)) {
+ uint32_t *oneof_case = _upb_oneofcase_field(msg, field);
+ if (*oneof_case != field->number) return;
+ *oneof_case = 0;
+ }
+
+ memset(mem, 0, get_field_size(field));
+}
+
+void upb_msg_clear(upb_msg *msg, const upb_msgdef *m) {
+ _upb_msg_clear(msg, upb_msgdef_layout(m));
+}
+
+bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m,
+ const upb_symtab *ext_pool, const upb_fielddef **out_f,
+ upb_msgval *out_val, size_t *iter) {
+ int i = *iter;
+ int n = upb_msgdef_fieldcount(m);
+ const upb_msgval zero = {0};
+ UPB_UNUSED(ext_pool);
+ while (++i < n) {
+ const upb_fielddef *f = upb_msgdef_field(m, i);
+ upb_msgval val = _upb_msg_getraw(msg, f);
+
+ /* Skip field if unset or empty. */
+ if (upb_fielddef_haspresence(f)) {
+ if (!upb_msg_has(msg, f)) continue;
+ } else {
+ upb_msgval test = val;
+ if (upb_fielddef_isstring(f) && !upb_fielddef_isseq(f)) {
+ /* Clear string pointer, only size matters (ptr could be non-NULL). */
+ test.str_val.data = NULL;
+ }
+ /* Continue if NULL or 0. */
+ if (memcmp(&test, &zero, sizeof(test)) == 0) continue;
+
+ /* Continue on empty array or map. */
+ if (upb_fielddef_ismap(f)) {
+ if (upb_map_size(test.map_val) == 0) continue;
+ } else if (upb_fielddef_isseq(f)) {
+ if (upb_array_size(test.array_val) == 0) continue;
+ }
+ }
+
+ *out_val = val;
+ *out_f = f;
+ *iter = i;
+ return true;
+ }
+ *iter = i;
+ return false;
+}
+
+bool _upb_msg_discardunknown(upb_msg *msg, const upb_msgdef *m, int depth) {
+ size_t iter = UPB_MSG_BEGIN;
+ const upb_fielddef *f;
+ upb_msgval val;
+ bool ret = true;
+
+ if (--depth == 0) return false;
+
+ _upb_msg_discardunknown_shallow(msg);
+
+ while (upb_msg_next(msg, m, NULL /*ext_pool*/, &f, &val, &iter)) {
+ const upb_msgdef *subm = upb_fielddef_msgsubdef(f);
+ if (!subm) continue;
+ if (upb_fielddef_ismap(f)) {
+ const upb_fielddef *val_f = upb_msgdef_itof(subm, 2);
+ const upb_msgdef *val_m = upb_fielddef_msgsubdef(val_f);
+ upb_map *map = (upb_map*)val.map_val;
+ size_t iter = UPB_MAP_BEGIN;
+
+ if (!val_m) continue;
+
+ while (upb_mapiter_next(map, &iter)) {
+ upb_msgval map_val = upb_mapiter_value(map, iter);
+ if (!_upb_msg_discardunknown((upb_msg*)map_val.msg_val, val_m, depth)) {
+ ret = false;
+ }
+ }
+ } else if (upb_fielddef_isseq(f)) {
+ const upb_array *arr = val.array_val;
+ size_t i, n = upb_array_size(arr);
+ for (i = 0; i < n; i++) {
+ upb_msgval elem = upb_array_get(arr, i);
+ if (!_upb_msg_discardunknown((upb_msg*)elem.msg_val, subm, depth)) {
+ ret = false;
+ }
+ }
+ } else {
+ if (!_upb_msg_discardunknown((upb_msg*)val.msg_val, subm, depth)) {
+ ret = false;
+ }
+ }
+ }
+
+ return ret;
+}
+
+bool upb_msg_discardunknown(upb_msg *msg, const upb_msgdef *m, int maxdepth) {
+ return _upb_msg_discardunknown(msg, m, maxdepth);
+}
+
+/** upb_array *****************************************************************/
+
+upb_array *upb_array_new(upb_arena *a, upb_fieldtype_t type) {
+ return _upb_array_new(a, 4, _upb_fieldtype_to_sizelg2[type]);
+}
+
+size_t upb_array_size(const upb_array *arr) {
+ return arr->len;
+}
+
+upb_msgval upb_array_get(const upb_array *arr, size_t i) {
+ upb_msgval ret;
+ const char* data = _upb_array_constptr(arr);
+ int lg2 = arr->data & 7;
+ UPB_ASSERT(i < arr->len);
+ memcpy(&ret, data + (i << lg2), 1 << lg2);
+ return ret;
+}
+
+void upb_array_set(upb_array *arr, size_t i, upb_msgval val) {
+ char* data = _upb_array_ptr(arr);
+ int lg2 = arr->data & 7;
+ UPB_ASSERT(i < arr->len);
+ memcpy(data + (i << lg2), &val, 1 << lg2);
+}
+
+bool upb_array_append(upb_array *arr, upb_msgval val, upb_arena *arena) {
+ if (!_upb_array_realloc(arr, arr->len + 1, arena)) {
+ return false;
+ }
+ arr->len++;
+ upb_array_set(arr, arr->len - 1, val);
+ return true;
+}
+
+bool upb_array_resize(upb_array *arr, size_t size, upb_arena *arena) {
+ return _upb_array_resize(arr, size, arena);
+}
+
+/** upb_map *******************************************************************/
+
+upb_map *upb_map_new(upb_arena *a, upb_fieldtype_t key_type,
+ upb_fieldtype_t value_type) {
+ return _upb_map_new(a, _upb_fieldtype_to_mapsize[key_type],
+ _upb_fieldtype_to_mapsize[value_type]);
+}
+
+size_t upb_map_size(const upb_map *map) {
+ return _upb_map_size(map);
+}
+
+bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val) {
+ return _upb_map_get(map, &key, map->key_size, val, map->val_size);
+}
+
+void upb_map_clear(upb_map *map) {
+ _upb_map_clear(map);
+}
+
+bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val,
+ upb_arena *arena) {
+ return _upb_map_set(map, &key, map->key_size, &val, map->val_size, arena);
+}
+
+bool upb_map_delete(upb_map *map, upb_msgval key) {
+ return _upb_map_delete(map, &key, map->key_size);
+}
+
+bool upb_mapiter_next(const upb_map *map, size_t *iter) {
+ return _upb_map_next(map, iter);
+}
+
+bool upb_mapiter_done(const upb_map *map, size_t iter) {
+ upb_strtable_iter i;
+ UPB_ASSERT(iter != UPB_MAP_BEGIN);
+ i.t = &map->table;
+ i.index = iter;
+ return upb_strtable_done(&i);
+}
+
+/* Returns the key and value for this entry of the map. */
+upb_msgval upb_mapiter_key(const upb_map *map, size_t iter) {
+ upb_strtable_iter i;
+ upb_msgval ret;
+ i.t = &map->table;
+ i.index = iter;
+ _upb_map_fromkey(upb_strtable_iter_key(&i), &ret, map->key_size);
+ return ret;
+}
+
+upb_msgval upb_mapiter_value(const upb_map *map, size_t iter) {
+ upb_strtable_iter i;
+ upb_msgval ret;
+ i.t = &map->table;
+ i.index = iter;
+ _upb_map_fromvalue(upb_strtable_iter_value(&i), &ret, map->val_size);
+ return ret;
+}
+
+/* void upb_mapiter_setvalue(upb_map *map, size_t iter, upb_msgval value); */
diff --git a/contrib/libs/grpc/third_party/upb/upb/reflection.h b/contrib/libs/grpc/third_party/upb/upb/reflection.h
new file mode 100644
index 00000000000..0133630c58d
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/reflection.h
@@ -0,0 +1,168 @@
+
+#ifndef UPB_REFLECTION_H_
+#define UPB_REFLECTION_H_
+
+#include "upb/def.h"
+#include "upb/msg.h"
+#include "upb/upb.h"
+
+#include "upb/port_def.inc"
+
+typedef union {
+ bool bool_val;
+ float float_val;
+ double double_val;
+ int32_t int32_val;
+ int64_t int64_val;
+ uint32_t uint32_val;
+ uint64_t uint64_val;
+ const upb_map* map_val;
+ const upb_msg* msg_val;
+ const upb_array* array_val;
+ upb_strview str_val;
+} upb_msgval;
+
+typedef union {
+ upb_map* map;
+ upb_msg* msg;
+ upb_array* array;
+} upb_mutmsgval;
+
+/** upb_msg *******************************************************************/
+
+/* Creates a new message of the given type in the given arena. */
+upb_msg *upb_msg_new(const upb_msgdef *m, upb_arena *a);
+
+/* Returns the value associated with this field. */
+upb_msgval upb_msg_get(const upb_msg *msg, const upb_fielddef *f);
+
+/* Returns a mutable pointer to a map, array, or submessage value. If the given
+ * arena is non-NULL this will construct a new object if it was not previously
+ * present. May not be called for primitive fields. */
+upb_mutmsgval upb_msg_mutable(upb_msg *msg, const upb_fielddef *f, upb_arena *a);
+
+/* May only be called for fields where upb_fielddef_haspresence(f) == true. */
+bool upb_msg_has(const upb_msg *msg, const upb_fielddef *f);
+
+/* Returns the field that is set in the oneof, or NULL if none are set. */
+const upb_fielddef *upb_msg_whichoneof(const upb_msg *msg,
+ const upb_oneofdef *o);
+
+/* Sets the given field to the given value. For a msg/array/map/string, the
+ * value must be in the same arena. */
+void upb_msg_set(upb_msg *msg, const upb_fielddef *f, upb_msgval val,
+ upb_arena *a);
+
+/* Clears any field presence and sets the value back to its default. */
+void upb_msg_clearfield(upb_msg *msg, const upb_fielddef *f);
+
+/* Clear all data and unknown fields. */
+void upb_msg_clear(upb_msg *msg, const upb_msgdef *m);
+
+/* Iterate over present fields.
+ *
+ * size_t iter = UPB_MSG_BEGIN;
+ * const upb_fielddef *f;
+ * upb_msgval val;
+ * while (upb_msg_next(msg, m, ext_pool, &f, &val, &iter)) {
+ * process_field(f, val);
+ * }
+ *
+ * If ext_pool is NULL, no extensions will be returned. If the given symtab
+ * returns extensions that don't match what is in this message, those extensions
+ * will be skipped.
+ */
+
+#define UPB_MSG_BEGIN -1
+bool upb_msg_next(const upb_msg *msg, const upb_msgdef *m,
+ const upb_symtab *ext_pool, const upb_fielddef **f,
+ upb_msgval *val, size_t *iter);
+
+/* Adds unknown data (serialized protobuf data) to the given message. The data
+ * is copied into the message instance. */
+void upb_msg_addunknown(upb_msg *msg, const char *data, size_t len,
+ upb_arena *arena);
+
+/* Clears all unknown field data from this message and all submessages. */
+bool upb_msg_discardunknown(upb_msg *msg, const upb_msgdef *m, int maxdepth);
+
+/* Returns a reference to the message's unknown data. */
+const char *upb_msg_getunknown(const upb_msg *msg, size_t *len);
+
+/** upb_array *****************************************************************/
+
+/* Creates a new array on the given arena that holds elements of this type. */
+upb_array *upb_array_new(upb_arena *a, upb_fieldtype_t type);
+
+/* Returns the size of the array. */
+size_t upb_array_size(const upb_array *arr);
+
+/* Returns the given element, which must be within the array's current size. */
+upb_msgval upb_array_get(const upb_array *arr, size_t i);
+
+/* Sets the given element, which must be within the array's current size. */
+void upb_array_set(upb_array *arr, size_t i, upb_msgval val);
+
+/* Appends an element to the array. Returns false on allocation failure. */
+bool upb_array_append(upb_array *array, upb_msgval val, upb_arena *arena);
+
+/* Changes the size of a vector. New elements are initialized to empty/0.
+ * Returns false on allocation failure. */
+bool upb_array_resize(upb_array *array, size_t size, upb_arena *arena);
+
+/** upb_map *******************************************************************/
+
+/* Creates a new map on the given arena with the given key/value size. */
+upb_map *upb_map_new(upb_arena *a, upb_fieldtype_t key_type,
+ upb_fieldtype_t value_type);
+
+/* Returns the number of entries in the map. */
+size_t upb_map_size(const upb_map *map);
+
+/* Stores a value for the given key into |*val| (or the zero value if the key is
+ * not present). Returns whether the key was present. The |val| pointer may be
+ * NULL, in which case the function tests whether the given key is present. */
+bool upb_map_get(const upb_map *map, upb_msgval key, upb_msgval *val);
+
+/* Removes all entries in the map. */
+void upb_map_clear(upb_map *map);
+
+/* Sets the given key to the given value. Returns true if this was a new key in
+ * the map, or false if an existing key was replaced. */
+bool upb_map_set(upb_map *map, upb_msgval key, upb_msgval val,
+ upb_arena *arena);
+
+/* Deletes this key from the table. Returns true if the key was present. */
+bool upb_map_delete(upb_map *map, upb_msgval key);
+
+/* Map iteration:
+ *
+ * size_t iter = UPB_MAP_BEGIN;
+ * while (upb_mapiter_next(map, &iter)) {
+ * upb_msgval key = upb_mapiter_key(map, iter);
+ * upb_msgval val = upb_mapiter_value(map, iter);
+ *
+ * // If mutating is desired.
+ * upb_mapiter_setvalue(map, iter, value2);
+ * }
+ */
+
+/* Advances to the next entry. Returns false if no more entries are present. */
+bool upb_mapiter_next(const upb_map *map, size_t *iter);
+
+/* Returns true if the iterator still points to a valid entry, or false if the
+ * iterator is past the last element. It is an error to call this function with
+ * UPB_MAP_BEGIN (you must call next() at least once first). */
+bool upb_mapiter_done(const upb_map *map, size_t iter);
+
+/* Returns the key and value for this entry of the map. */
+upb_msgval upb_mapiter_key(const upb_map *map, size_t iter);
+upb_msgval upb_mapiter_value(const upb_map *map, size_t iter);
+
+/* Sets the value for this entry. The iterator must not be done, and the
+ * iterator must not have been initialized const. */
+void upb_mapiter_setvalue(upb_map *map, size_t iter, upb_msgval value);
+
+#include "upb/port_undef.inc"
+
+#endif /* UPB_REFLECTION_H_ */
diff --git a/contrib/libs/grpc/third_party/upb/upb/table.c b/contrib/libs/grpc/third_party/upb/upb/table.c
index 34a20530d8b..88370476599 100644
--- a/contrib/libs/grpc/third_party/upb/upb/table.c
+++ b/contrib/libs/grpc/third_party/upb/upb/table.c
@@ -4,10 +4,12 @@
** Implementation is heavily inspired by Lua's ltable.c.
*/
-#include "upb/table.int.h"
-
#include <string.h>
+#include "third_party/wyhash/wyhash.h"
+#include "upb/table.int.h"
+
+/* Must be last. */
#include "upb/port_def.inc"
#define UPB_MAXARRSIZE 16 /* 64k. */
@@ -87,11 +89,7 @@ static upb_tabent *mutable_entries(upb_table *t) {
}
static bool isfull(upb_table *t) {
- if (upb_table_size(t) == 0) {
- return true;
- } else {
- return ((double)(t->count + 1) / upb_table_size(t)) > MAX_LOAD;
- }
+ return t->count == t->max_count;
}
static bool init(upb_table *t, uint8_t size_lg2, upb_alloc *a) {
@@ -100,6 +98,7 @@ static bool init(upb_table *t, uint8_t size_lg2, upb_alloc *a) {
t->count = 0;
t->size_lg2 = size_lg2;
t->mask = upb_table_size(t) ? upb_table_size(t) - 1 : 0;
+ t->max_count = upb_table_size(t) * MAX_LOAD;
bytes = upb_table_size(t) * sizeof(upb_tabent);
if (bytes > 0) {
t->entries = upb_malloc(a, bytes);
@@ -115,9 +114,17 @@ static void uninit(upb_table *t, upb_alloc *a) {
upb_free(a, mutable_entries(t));
}
-static upb_tabent *emptyent(upb_table *t) {
- upb_tabent *e = mutable_entries(t) + upb_table_size(t);
- while (1) { if (upb_tabent_isempty(--e)) return e; UPB_ASSERT(e > t->entries); }
+static upb_tabent *emptyent(upb_table *t, upb_tabent *e) {
+ upb_tabent *begin = mutable_entries(t);
+ upb_tabent *end = begin + upb_table_size(t);
+ for (e = e + 1; e < end; e++) {
+ if (upb_tabent_isempty(e)) return e;
+ }
+ for (e = begin; e < end; e++) {
+ if (upb_tabent_isempty(e)) return e;
+ }
+ UPB_ASSERT(false);
+ return NULL;
}
static upb_tabent *getentry_mutable(upb_table *t, uint32_t hash) {
@@ -173,11 +180,11 @@ static void insert(upb_table *t, lookupkey_t key, upb_tabkey tabkey,
our_e->next = NULL;
} else {
/* Collision. */
- upb_tabent *new_e = emptyent(t);
+ upb_tabent *new_e = emptyent(t, mainpos_e);
/* Head of collider's chain. */
upb_tabent *chain = getentry_mutable(t, hashfunc(mainpos_e->key));
if (chain == mainpos_e) {
- /* Existing ent is in its main posisiton (it has the same hash as us, and
+ /* Existing ent is in its main position (it has the same hash as us, and
* is the head of our chain). Insert to new ent and append to this chain. */
new_e->next = mainpos_e->next;
mainpos_e->next = new_e;
@@ -268,10 +275,14 @@ static upb_tabkey strcopy(lookupkey_t k2, upb_alloc *a) {
return (uintptr_t)str;
}
+static uint32_t table_hash(const char *p, size_t n) {
+ return wyhash(p, n, 0, _wyp);
+}
+
static uint32_t strhash(upb_tabkey key) {
uint32_t len;
char *str = upb_tabstr(key, &len);
- return upb_murmur_hash2(str, len, 0);
+ return table_hash(str, len);
}
static bool streql(upb_tabkey k1, lookupkey_t k2) {
@@ -280,9 +291,14 @@ static bool streql(upb_tabkey k1, lookupkey_t k2) {
return len == k2.str.len && (len == 0 || memcmp(str, k2.str.str, len) == 0);
}
-bool upb_strtable_init2(upb_strtable *t, upb_ctype_t ctype, upb_alloc *a) {
+bool upb_strtable_init2(upb_strtable *t, upb_ctype_t ctype,
+ size_t expected_size, upb_alloc *a) {
UPB_UNUSED(ctype); /* TODO(haberman): rm */
- return init(&t->t, 2, a);
+ // Multiply by approximate reciprocal of MAX_LOAD (0.85), with pow2 denominator.
+ size_t need_entries = (expected_size + 1) * 1204 / 1024;
+ UPB_ASSERT(need_entries >= expected_size * 0.85);
+ int size_lg2 = _upb_lg2ceil(need_entries);
+ return init(&t->t, size_lg2, a);
}
void upb_strtable_clear(upb_strtable *t) {
@@ -333,20 +349,20 @@ bool upb_strtable_insert3(upb_strtable *t, const char *k, size_t len,
tabkey = strcopy(key, a);
if (tabkey == 0) return false;
- hash = upb_murmur_hash2(key.str.str, key.str.len, 0);
+ hash = table_hash(key.str.str, key.str.len);
insert(&t->t, key, tabkey, v, hash, &strhash, &streql);
return true;
}
bool upb_strtable_lookup2(const upb_strtable *t, const char *key, size_t len,
upb_value *v) {
- uint32_t hash = upb_murmur_hash2(key, len, 0);
+ uint32_t hash = table_hash(key, len);
return lookup(&t->t, strkey2(key, len), v, hash, &streql);
}
bool upb_strtable_remove3(upb_strtable *t, const char *key, size_t len,
upb_value *val, upb_alloc *alloc) {
- uint32_t hash = upb_murmur_hash2(key, len, 0);
+ uint32_t hash = table_hash(key, len);
upb_tabkey tabkey;
if (rm(&t->t, strkey2(key, len), val, &tabkey, hash, &streql)) {
if (alloc) {
@@ -699,182 +715,3 @@ bool upb_inttable_iter_isequal(const upb_inttable_iter *i1,
return i1->t == i2->t && i1->index == i2->index &&
i1->array_part == i2->array_part;
}
-
-#if defined(UPB_UNALIGNED_READS_OK) || defined(__s390x__)
-/* -----------------------------------------------------------------------------
- * MurmurHash2, by Austin Appleby (released as public domain).
- * Reformatted and C99-ified by Joshua Haberman.
- * Note - This code makes a few assumptions about how your machine behaves -
- * 1. We can read a 4-byte value from any address without crashing
- * 2. sizeof(int) == 4 (in upb this limitation is removed by using uint32_t
- * And it has a few limitations -
- * 1. It will not work incrementally.
- * 2. It will not produce the same results on little-endian and big-endian
- * machines. */
-uint32_t upb_murmur_hash2(const void *key, size_t len, uint32_t seed) {
- /* 'm' and 'r' are mixing constants generated offline.
- * They're not really 'magic', they just happen to work well. */
- const uint32_t m = 0x5bd1e995;
- const int32_t r = 24;
-
- /* Initialize the hash to a 'random' value */
- uint32_t h = seed ^ len;
-
- /* Mix 4 bytes at a time into the hash */
- const uint8_t * data = (const uint8_t *)key;
- while(len >= 4) {
- uint32_t k;
- memcpy(&k, data, sizeof(k));
-
- k *= m;
- k ^= k >> r;
- k *= m;
-
- h *= m;
- h ^= k;
-
- data += 4;
- len -= 4;
- }
-
- /* Handle the last few bytes of the input array */
- switch(len) {
- case 3: h ^= data[2] << 16;
- case 2: h ^= data[1] << 8;
- case 1: h ^= data[0]; h *= m;
- };
-
- /* Do a few final mixes of the hash to ensure the last few
- * bytes are well-incorporated. */
- h ^= h >> 13;
- h *= m;
- h ^= h >> 15;
-
- return h;
-}
-
-#else /* !UPB_UNALIGNED_READS_OK */
-
-/* -----------------------------------------------------------------------------
- * MurmurHashAligned2, by Austin Appleby
- * Same algorithm as MurmurHash2, but only does aligned reads - should be safer
- * on certain platforms.
- * Performance will be lower than MurmurHash2 */
-
-#define MIX(h,k,m) { k *= m; k ^= k >> r; k *= m; h *= m; h ^= k; }
-
-uint32_t upb_murmur_hash2(const void * key, size_t len, uint32_t seed) {
- const uint32_t m = 0x5bd1e995;
- const int32_t r = 24;
- const uint8_t * data = (const uint8_t *)key;
- uint32_t h = (uint32_t)(seed ^ len);
- uint8_t align = (uintptr_t)data & 3;
-
- if(align && (len >= 4)) {
- /* Pre-load the temp registers */
- uint32_t t = 0, d = 0;
- int32_t sl;
- int32_t sr;
-
- switch(align) {
- case 1: t |= data[2] << 16; /* fallthrough */
- case 2: t |= data[1] << 8; /* fallthrough */
- case 3: t |= data[0];
- }
-
- t <<= (8 * align);
-
- data += 4-align;
- len -= 4-align;
-
- sl = 8 * (4-align);
- sr = 8 * align;
-
- /* Mix */
-
- while(len >= 4) {
- uint32_t k;
-
- d = *(uint32_t *)data;
- t = (t >> sr) | (d << sl);
-
- k = t;
-
- MIX(h,k,m);
-
- t = d;
-
- data += 4;
- len -= 4;
- }
-
- /* Handle leftover data in temp registers */
-
- d = 0;
-
- if(len >= align) {
- uint32_t k;
-
- switch(align) {
- case 3: d |= data[2] << 16; /* fallthrough */
- case 2: d |= data[1] << 8; /* fallthrough */
- case 1: d |= data[0]; /* fallthrough */
- }
-
- k = (t >> sr) | (d << sl);
- MIX(h,k,m);
-
- data += align;
- len -= align;
-
- /* ----------
- * Handle tail bytes */
-
- switch(len) {
- case 3: h ^= data[2] << 16; /* fallthrough */
- case 2: h ^= data[1] << 8; /* fallthrough */
- case 1: h ^= data[0]; h *= m; /* fallthrough */
- };
- } else {
- switch(len) {
- case 3: d |= data[2] << 16; /* fallthrough */
- case 2: d |= data[1] << 8; /* fallthrough */
- case 1: d |= data[0]; /* fallthrough */
- case 0: h ^= (t >> sr) | (d << sl); h *= m;
- }
- }
-
- h ^= h >> 13;
- h *= m;
- h ^= h >> 15;
-
- return h;
- } else {
- while(len >= 4) {
- uint32_t k = *(uint32_t *)data;
-
- MIX(h,k,m);
-
- data += 4;
- len -= 4;
- }
-
- /* ----------
- * Handle tail bytes */
-
- switch(len) {
- case 3: h ^= data[2] << 16; /* fallthrough */
- case 2: h ^= data[1] << 8; /* fallthrough */
- case 1: h ^= data[0]; h *= m;
- };
-
- h ^= h >> 13;
- h *= m;
- h ^= h >> 15;
-
- return h;
- }
-}
-#undef MIX
-
-#endif /* UPB_UNALIGNED_READS_OK */
diff --git a/contrib/libs/grpc/third_party/upb/upb/table.int.h b/contrib/libs/grpc/third_party/upb/upb/table.int.h
index 600637eef2e..49caac463ee 100644
--- a/contrib/libs/grpc/third_party/upb/upb/table.int.h
+++ b/contrib/libs/grpc/third_party/upb/upb/table.int.h
@@ -13,7 +13,7 @@
** store pointers or integers of at least 32 bits (upb isn't really useful on
** systems where sizeof(void*) < 4).
**
-** The table must be homogenous (all values of the same type). In debug
+** The table must be homogeneous (all values of the same type). In debug
** mode, we check this on insert and lookup.
*/
@@ -147,10 +147,17 @@ UPB_INLINE char *upb_tabstr(upb_tabkey key, uint32_t *len) {
return mem + sizeof(*len);
}
+UPB_INLINE upb_strview upb_tabstrview(upb_tabkey key) {
+ upb_strview ret;
+ uint32_t len;
+ ret.data = upb_tabstr(key, &len);
+ ret.size = len;
+ return ret;
+}
/* upb_tabval *****************************************************************/
-typedef struct {
+typedef struct upb_tabval {
uint64_t val;
} upb_tabval;
@@ -171,7 +178,8 @@ typedef struct _upb_tabent {
typedef struct {
size_t count; /* Number of entries in the hash part. */
- size_t mask; /* Mask to turn hash value -> bucket. */
+ uint32_t mask; /* Mask to turn hash value -> bucket. */
+ uint32_t max_count; /* Max count before we hit our load limit. */
uint8_t size_lg2; /* Size of the hashtable part is 2^size_lg2 entries. */
/* Hash table entries.
@@ -230,7 +238,8 @@ UPB_INLINE bool upb_arrhas(upb_tabval key) {
/* Initialize and uninitialize a table, respectively. If memory allocation
* failed, false is returned that the table is uninitialized. */
bool upb_inttable_init2(upb_inttable *table, upb_ctype_t ctype, upb_alloc *a);
-bool upb_strtable_init2(upb_strtable *table, upb_ctype_t ctype, upb_alloc *a);
+bool upb_strtable_init2(upb_strtable *table, upb_ctype_t ctype,
+ size_t expected_size, upb_alloc *a);
void upb_inttable_uninit2(upb_inttable *table, upb_alloc *a);
void upb_strtable_uninit2(upb_strtable *table, upb_alloc *a);
@@ -239,7 +248,7 @@ UPB_INLINE bool upb_inttable_init(upb_inttable *table, upb_ctype_t ctype) {
}
UPB_INLINE bool upb_strtable_init(upb_strtable *table, upb_ctype_t ctype) {
- return upb_strtable_init2(table, ctype, &upb_alloc_global);
+ return upb_strtable_init2(table, ctype, 4, &upb_alloc_global);
}
UPB_INLINE void upb_inttable_uninit(upb_inttable *table) {
diff --git a/contrib/libs/grpc/third_party/upb/upb/text_encode.c b/contrib/libs/grpc/third_party/upb/upb/text_encode.c
new file mode 100644
index 00000000000..028cc29e090
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/text_encode.c
@@ -0,0 +1,421 @@
+
+#include "upb/text_encode.h"
+
+#include <ctype.h>
+#include <float.h>
+#include <inttypes.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "upb/reflection.h"
+#include "upb/port_def.inc"
+
+typedef struct {
+ char *buf, *ptr, *end;
+ size_t overflow;
+ int indent_depth;
+ int options;
+ const upb_symtab *ext_pool;
+ _upb_mapsorter sorter;
+} txtenc;
+
+static void txtenc_msg(txtenc *e, const upb_msg *msg, const upb_msgdef *m);
+
+static void txtenc_putbytes(txtenc *e, const void *data, size_t len) {
+ size_t have = e->end - e->ptr;
+ if (UPB_LIKELY(have >= len)) {
+ memcpy(e->ptr, data, len);
+ e->ptr += len;
+ } else {
+ if (have) memcpy(e->ptr, data, have);
+ e->ptr += have;
+ e->overflow += (len - have);
+ }
+}
+
+static void txtenc_putstr(txtenc *e, const char *str) {
+ txtenc_putbytes(e, str, strlen(str));
+}
+
+static void txtenc_printf(txtenc *e, const char *fmt, ...) {
+ size_t n;
+ size_t have = e->end - e->ptr;
+ va_list args;
+
+ va_start(args, fmt);
+ n = vsnprintf(e->ptr, have, fmt, args);
+ va_end(args);
+
+ if (UPB_LIKELY(have > n)) {
+ e->ptr += n;
+ } else {
+ e->ptr += have;
+ e->overflow += (n - have);
+ }
+}
+
+static void txtenc_indent(txtenc *e) {
+ if ((e->options & UPB_TXTENC_SINGLELINE) == 0) {
+ int i = e->indent_depth;
+ while (i-- > 0) {
+ txtenc_putstr(e, " ");
+ }
+ }
+}
+
+static void txtenc_endfield(txtenc *e) {
+ if (e->options & UPB_TXTENC_SINGLELINE) {
+ txtenc_putstr(e, " ");
+ } else {
+ txtenc_putstr(e, "\n");
+ }
+}
+
+static void txtenc_enum(int32_t val, const upb_fielddef *f, txtenc *e) {
+ const upb_enumdef *e_def = upb_fielddef_enumsubdef(f);
+ const char *name = upb_enumdef_iton(e_def, val);
+
+ if (name) {
+ txtenc_printf(e, "%s", name);
+ } else {
+ txtenc_printf(e, "%" PRId32, val);
+ }
+}
+
+static void txtenc_string(txtenc *e, upb_strview str, bool bytes) {
+ const char *ptr = str.data;
+ const char *end = ptr + str.size;
+ txtenc_putstr(e, "\"");
+
+ while (ptr < end) {
+ switch (*ptr) {
+ case '\n':
+ txtenc_putstr(e, "\\n");
+ break;
+ case '\r':
+ txtenc_putstr(e, "\\r");
+ break;
+ case '\t':
+ txtenc_putstr(e, "\\t");
+ break;
+ case '\"':
+ txtenc_putstr(e, "\\\"");
+ break;
+ case '\'':
+ txtenc_putstr(e, "\\'");
+ break;
+ case '\\':
+ txtenc_putstr(e, "\\\\");
+ break;
+ default:
+ if ((bytes || (uint8_t)*ptr < 0x80) && !isprint(*ptr)) {
+ txtenc_printf(e, "\\%03o", (int)(uint8_t)*ptr);
+ } else {
+ txtenc_putbytes(e, ptr, 1);
+ }
+ break;
+ }
+ ptr++;
+ }
+
+ txtenc_putstr(e, "\"");
+}
+
+static void txtenc_field(txtenc *e, upb_msgval val, const upb_fielddef *f) {
+ txtenc_indent(e);
+ txtenc_printf(e, "%s: ", upb_fielddef_name(f));
+
+ switch (upb_fielddef_type(f)) {
+ case UPB_TYPE_BOOL:
+ txtenc_putstr(e, val.bool_val ? "true" : "false");
+ break;
+ case UPB_TYPE_FLOAT:
+ txtenc_printf(e, "%f", val.float_val);
+ break;
+ case UPB_TYPE_DOUBLE:
+ txtenc_printf(e, "%f", val.double_val);
+ break;
+ case UPB_TYPE_INT32:
+ txtenc_printf(e, "%" PRId32, val.int32_val);
+ break;
+ case UPB_TYPE_UINT32:
+ txtenc_printf(e, "%" PRIu32, val.uint32_val);
+ break;
+ case UPB_TYPE_INT64:
+ txtenc_printf(e, "%" PRId64, val.int64_val);
+ break;
+ case UPB_TYPE_UINT64:
+ txtenc_printf(e, "%" PRIu64, val.uint64_val);
+ break;
+ case UPB_TYPE_STRING:
+ txtenc_string(e, val.str_val, false);
+ break;
+ case UPB_TYPE_BYTES:
+ txtenc_string(e, val.str_val, true);
+ break;
+ case UPB_TYPE_ENUM:
+ txtenc_enum(val.int32_val, f, e);
+ break;
+ case UPB_TYPE_MESSAGE:
+ txtenc_putstr(e, "{");
+ txtenc_endfield(e);
+ e->indent_depth++;
+ txtenc_msg(e, val.msg_val, upb_fielddef_msgsubdef(f));
+ e->indent_depth--;
+ txtenc_indent(e);
+ txtenc_putstr(e, "}");
+ break;
+ }
+
+ txtenc_endfield(e);
+}
+
+/*
+ * Arrays print as simple repeated elements, eg.
+ *
+ * foo_field: 1
+ * foo_field: 2
+ * foo_field: 3
+ */
+static void txtenc_array(txtenc *e, const upb_array *arr,
+ const upb_fielddef *f) {
+ size_t i;
+ size_t size = upb_array_size(arr);
+
+ for (i = 0; i < size; i++) {
+ txtenc_field(e, upb_array_get(arr, i), f);
+ }
+}
+
+static void txtenc_mapentry(txtenc *e, upb_msgval key, upb_msgval val,
+ const upb_fielddef *f) {
+ const upb_msgdef *entry = upb_fielddef_msgsubdef(f);
+ const upb_fielddef *key_f = upb_msgdef_field(entry, 0);
+ const upb_fielddef *val_f = upb_msgdef_field(entry, 1);
+ txtenc_indent(e);
+ txtenc_printf(e, "%s: {", upb_fielddef_name(f));
+ txtenc_endfield(e);
+ e->indent_depth++;
+
+ txtenc_field(e, key, key_f);
+ txtenc_field(e, val, val_f);
+
+ e->indent_depth--;
+ txtenc_indent(e);
+ txtenc_putstr(e, "}");
+ txtenc_endfield(e);
+}
+
+/*
+ * Maps print as messages of key/value, etc.
+ *
+ * foo_map: {
+ * key: "abc"
+ * value: 123
+ * }
+ * foo_map: {
+ * key: "def"
+ * value: 456
+ * }
+ */
+static void txtenc_map(txtenc *e, const upb_map *map, const upb_fielddef *f) {
+ if (e->options & UPB_TXTENC_NOSORT) {
+ size_t iter = UPB_MAP_BEGIN;
+ while (upb_mapiter_next(map, &iter)) {
+ upb_msgval key = upb_mapiter_key(map, iter);
+ upb_msgval val = upb_mapiter_value(map, iter);
+ txtenc_mapentry(e, key, val, f);
+ }
+ } else {
+ const upb_msgdef *entry = upb_fielddef_msgsubdef(f);
+ const upb_fielddef *key_f = upb_msgdef_field(entry, 0);
+ _upb_sortedmap sorted;
+ upb_map_entry ent;
+
+ _upb_mapsorter_pushmap(&e->sorter, upb_fielddef_descriptortype(key_f), map,
+ &sorted);
+ while (_upb_sortedmap_next(&e->sorter, map, &sorted, &ent)) {
+ upb_msgval key, val;
+ memcpy(&key, &ent.k, sizeof(key));
+ memcpy(&val, &ent.v, sizeof(val));
+ txtenc_mapentry(e, key, val, f);
+ }
+ _upb_mapsorter_popmap(&e->sorter, &sorted);
+ }
+}
+
+#define CHK(x) do { if (!(x)) { return false; } } while(0)
+
+static const char *txtenc_parsevarint(const char *ptr, const char *limit,
+ uint64_t *val) {
+ uint8_t byte;
+ int bitpos = 0;
+ *val = 0;
+
+ do {
+ CHK(bitpos < 70 && ptr < limit);
+ byte = *ptr;
+ *val |= (uint64_t)(byte & 0x7F) << bitpos;
+ ptr++;
+ bitpos += 7;
+ } while (byte & 0x80);
+
+ return ptr;
+}
+
+/*
+ * Unknown fields are printed by number.
+ *
+ * 1001: 123
+ * 1002: "hello"
+ * 1006: 0xdeadbeef
+ * 1003: {
+ * 1: 111
+ * }
+ */
+static const char *txtenc_unknown(txtenc *e, const char *ptr, const char *end,
+ int groupnum) {
+ while (ptr < end) {
+ uint64_t tag_64;
+ uint32_t tag;
+ CHK(ptr = txtenc_parsevarint(ptr, end, &tag_64));
+ CHK(tag_64 < UINT32_MAX);
+ tag = (uint32_t)tag_64;
+
+ if ((tag & 7) == UPB_WIRE_TYPE_END_GROUP) {
+ CHK((tag >> 3) == (uint32_t)groupnum);
+ return ptr;
+ }
+
+ txtenc_indent(e);
+ txtenc_printf(e, "%d: ", (int)(tag >> 3));
+
+ switch (tag & 7) {
+ case UPB_WIRE_TYPE_VARINT: {
+ uint64_t val;
+ CHK(ptr = txtenc_parsevarint(ptr, end, &val));
+ txtenc_printf(e, "%" PRIu64, val);
+ break;
+ }
+ case UPB_WIRE_TYPE_32BIT: {
+ uint32_t val;
+ CHK(end - ptr >= 4);
+ memcpy(&val, ptr, 4);
+ ptr += 4;
+ txtenc_printf(e, "0x%08" PRIu32, val);
+ break;
+ }
+ case UPB_WIRE_TYPE_64BIT: {
+ uint64_t val;
+ CHK(end - ptr >= 8);
+ memcpy(&val, ptr, 8);
+ ptr += 8;
+ txtenc_printf(e, "0x%016" PRIu64, val);
+ break;
+ }
+ case UPB_WIRE_TYPE_DELIMITED: {
+ uint64_t len;
+ size_t avail = end - ptr;
+ char *start = e->ptr;
+ size_t start_overflow = e->overflow;
+ CHK(ptr = txtenc_parsevarint(ptr, end, &len));
+ CHK(avail >= len);
+
+ /* Speculatively try to parse as message. */
+ txtenc_putstr(e, "{");
+ txtenc_endfield(e);
+ e->indent_depth++;
+ if (txtenc_unknown(e, ptr, end, -1)) {
+ e->indent_depth--;
+ txtenc_indent(e);
+ txtenc_putstr(e, "}");
+ } else {
+ /* Didn't work out, print as raw bytes. */
+ upb_strview str;
+ e->indent_depth--;
+ e->ptr = start;
+ e->overflow = start_overflow;
+ str.data = ptr;
+ str.size = len;
+ txtenc_string(e, str, true);
+ }
+ ptr += len;
+ break;
+ }
+ case UPB_WIRE_TYPE_START_GROUP:
+ txtenc_putstr(e, "{");
+ txtenc_endfield(e);
+ e->indent_depth++;
+ CHK(ptr = txtenc_unknown(e, ptr, end, tag >> 3));
+ e->indent_depth--;
+ txtenc_indent(e);
+ txtenc_putstr(e, "}");
+ break;
+ }
+ txtenc_endfield(e);
+ }
+
+ return groupnum == -1 ? ptr : NULL;
+}
+
+#undef CHK
+
+static void txtenc_msg(txtenc *e, const upb_msg *msg,
+ const upb_msgdef *m) {
+ size_t iter = UPB_MSG_BEGIN;
+ const upb_fielddef *f;
+ upb_msgval val;
+
+ while (upb_msg_next(msg, m, e->ext_pool, &f, &val, &iter)) {
+ if (upb_fielddef_ismap(f)) {
+ txtenc_map(e, val.map_val, f);
+ } else if (upb_fielddef_isseq(f)) {
+ txtenc_array(e, val.array_val, f);
+ } else {
+ txtenc_field(e, val, f);
+ }
+ }
+
+ if ((e->options & UPB_TXTENC_SKIPUNKNOWN) == 0) {
+ size_t len;
+ const char *ptr = upb_msg_getunknown(msg, &len);
+ char *start = e->ptr;
+ if (ptr) {
+ if (!txtenc_unknown(e, ptr, ptr + len, -1)) {
+ /* Unknown failed to parse, back up and don't print it at all. */
+ e->ptr = start;
+ }
+ }
+ }
+}
+
+size_t txtenc_nullz(txtenc *e, size_t size) {
+ size_t ret = e->ptr - e->buf + e->overflow;
+
+ if (size > 0) {
+ if (e->ptr == e->end) e->ptr--;
+ *e->ptr = '\0';
+ }
+
+ return ret;
+}
+
+size_t upb_text_encode(const upb_msg *msg, const upb_msgdef *m,
+ const upb_symtab *ext_pool, int options, char *buf,
+ size_t size) {
+ txtenc e;
+
+ e.buf = buf;
+ e.ptr = buf;
+ e.end = buf + size;
+ e.overflow = 0;
+ e.indent_depth = 0;
+ e.options = options;
+ e.ext_pool = ext_pool;
+ _upb_mapsorter_init(&e.sorter);
+
+ txtenc_msg(&e, msg, m);
+ _upb_mapsorter_destroy(&e.sorter);
+ return txtenc_nullz(&e, size);
+}
diff --git a/contrib/libs/grpc/third_party/upb/upb/text_encode.h b/contrib/libs/grpc/third_party/upb/upb/text_encode.h
new file mode 100644
index 00000000000..4ad3d1c4d74
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/text_encode.h
@@ -0,0 +1,38 @@
+
+#ifndef UPB_TEXTENCODE_H_
+#define UPB_TEXTENCODE_H_
+
+#include "upb/def.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+enum {
+ /* When set, prints everything on a single line. */
+ UPB_TXTENC_SINGLELINE = 1,
+
+ /* When set, unknown fields are not printed. */
+ UPB_TXTENC_SKIPUNKNOWN = 2,
+
+ /* When set, maps are *not* sorted (this avoids allocating tmp mem). */
+ UPB_TXTENC_NOSORT = 4
+};
+
+/* Encodes the given |msg| to text format. The message's reflection is given in
+ * |m|. The symtab in |symtab| is used to find extensions (if NULL, extensions
+ * will not be printed).
+ *
+ * Output is placed in the given buffer, and always NULL-terminated. The output
+ * size (excluding NULL) is returned. This means that a return value >= |size|
+ * implies that the output was truncated. (These are the same semantics as
+ * snprintf()). */
+size_t upb_text_encode(const upb_msg *msg, const upb_msgdef *m,
+ const upb_symtab *ext_pool, int options, char *buf,
+ size_t size);
+
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
+#endif /* UPB_TEXTENCODE_H_ */
diff --git a/contrib/libs/grpc/third_party/upb/upb/upb.c b/contrib/libs/grpc/third_party/upb/upb/upb.c
index 3089c059e1e..a12656973d6 100644
--- a/contrib/libs/grpc/third_party/upb/upb/upb.c
+++ b/contrib/libs/grpc/third_party/upb/upb/upb.c
@@ -1,5 +1,5 @@
-#include "upb/upb.h"
+#include "upb/upb.int.h"
#include <errno.h>
#include <stdarg.h>
@@ -40,7 +40,7 @@ void upb_status_seterrf(upb_status *status, const char *fmt, ...) {
void upb_status_vseterrf(upb_status *status, const char *fmt, va_list args) {
if (!status) return;
status->ok = false;
- _upb_vsnprintf(status->msg, sizeof(status->msg), fmt, args);
+ vsnprintf(status->msg, sizeof(status->msg), fmt, args);
status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0';
}
@@ -49,7 +49,7 @@ void upb_status_vappenderrf(upb_status *status, const char *fmt, va_list args) {
if (!status) return;
status->ok = false;
len = strlen(status->msg);
- _upb_vsnprintf(status->msg + len, sizeof(status->msg) - len, fmt, args);
+ vsnprintf(status->msg + len, sizeof(status->msg) - len, fmt, args);
status->msg[UPB_STATUS_MAX_MESSAGE - 1] = '\0';
}
@@ -73,37 +73,18 @@ upb_alloc upb_alloc_global = {&upb_global_allocfunc};
/* Be conservative and choose 16 in case anyone is using SSE. */
-typedef struct mem_block {
+struct mem_block {
struct mem_block *next;
uint32_t size;
uint32_t cleanups;
/* Data follows. */
-} mem_block;
+};
typedef struct cleanup_ent {
upb_cleanup_func *cleanup;
void *ud;
} cleanup_ent;
-struct upb_arena {
- _upb_arena_head head;
- uint32_t *cleanups;
-
- /* Allocator to allocate arena blocks. We are responsible for freeing these
- * when we are destroyed. */
- upb_alloc *block_alloc;
- uint32_t last_size;
-
- /* When multiple arenas are fused together, each arena points to a parent
- * arena (root points to itself). The root tracks how many live arenas
- * reference it. */
- uint32_t refcount; /* Only used when a->parent == a */
- struct upb_arena *parent;
-
- /* Linked list of blocks to free/cleanup. */
- mem_block *freelist, *freelist_tail;
-};
-
static const size_t memblock_reserve = UPB_ALIGN_UP(sizeof(mem_block), 16);
static upb_arena *arena_findroot(upb_arena *a) {
@@ -117,9 +98,9 @@ static upb_arena *arena_findroot(upb_arena *a) {
return a;
}
-static void upb_arena_addblock(upb_arena *a, void *ptr, size_t size) {
+static void upb_arena_addblock(upb_arena *a, upb_arena *root, void *ptr,
+ size_t size) {
mem_block *block = ptr;
- upb_arena *root = arena_findroot(a);
/* The block is for arena |a|, but should appear in the freelist of |root|. */
block->next = root->freelist;
@@ -133,26 +114,22 @@ static void upb_arena_addblock(upb_arena *a, void *ptr, size_t size) {
a->head.end = UPB_PTR_AT(block, size, char);
a->cleanups = &block->cleanups;
- /* TODO(haberman): ASAN poison. */
+ UPB_POISON_MEMORY_REGION(a->head.ptr, a->head.end - a->head.ptr);
}
static bool upb_arena_allocblock(upb_arena *a, size_t size) {
+ upb_arena *root = arena_findroot(a);
size_t block_size = UPB_MAX(size, a->last_size * 2) + memblock_reserve;
- mem_block *block = upb_malloc(a->block_alloc, block_size);
+ mem_block *block = upb_malloc(root->block_alloc, block_size);
if (!block) return false;
- upb_arena_addblock(a, block, block_size);
+ upb_arena_addblock(a, root, block, block_size);
return true;
}
-static bool arena_has(upb_arena *a, size_t size) {
- _upb_arena_head *h = (_upb_arena_head*)a;
- return (size_t)(h->end - h->ptr) >= size;
-}
-
void *_upb_arena_slowmalloc(upb_arena *a, size_t size) {
if (!upb_arena_allocblock(a, size)) return NULL; /* Out of memory. */
- UPB_ASSERT(arena_has(a, size));
+ UPB_ASSERT(_upb_arenahas(a) >= size);
return upb_arena_malloc(a, size);
}
@@ -184,7 +161,7 @@ upb_arena *arena_initslow(void *mem, size_t n, upb_alloc *alloc) {
a->freelist = NULL;
a->freelist_tail = NULL;
- upb_arena_addblock(a, mem, n);
+ upb_arena_addblock(a, a, mem, n);
return a;
}
@@ -201,15 +178,14 @@ upb_arena *upb_arena_init(void *mem, size_t n, upb_alloc *alloc) {
}
a = UPB_PTR_AT(mem, n - sizeof(*a), upb_arena);
- n -= sizeof(*a);
a->head.alloc.func = &upb_arena_doalloc;
a->block_alloc = alloc;
a->parent = a;
a->refcount = 1;
- a->last_size = 128;
+ a->last_size = UPB_MAX(128, n);
a->head.ptr = mem;
- a->head.end = UPB_PTR_AT(mem, n, char);
+ a->head.end = UPB_PTR_AT(mem, n - sizeof(*a), char);
a->freelist = NULL;
a->cleanups = NULL;
@@ -247,14 +223,15 @@ void upb_arena_free(upb_arena *a) {
bool upb_arena_addcleanup(upb_arena *a, void *ud, upb_cleanup_func *func) {
cleanup_ent *ent;
- if (!a->cleanups || !arena_has(a, sizeof(cleanup_ent))) {
+ if (!a->cleanups || _upb_arenahas(a) < sizeof(cleanup_ent)) {
if (!upb_arena_allocblock(a, 128)) return false; /* Out of memory. */
- UPB_ASSERT(arena_has(a, sizeof(cleanup_ent)));
+ UPB_ASSERT(_upb_arenahas(a) >= sizeof(cleanup_ent));
}
a->head.end -= sizeof(cleanup_ent);
ent = (cleanup_ent*)a->head.end;
(*a->cleanups)++;
+ UPB_UNPOISON_MEMORY_REGION(ent, sizeof(cleanup_ent));
ent->cleanup = func;
ent->ud = ud;
diff --git a/contrib/libs/grpc/third_party/upb/upb/upb.h b/contrib/libs/grpc/third_party/upb/upb/upb.h
index e1d9d8cfd35..11c0e4dc99a 100644
--- a/contrib/libs/grpc/third_party/upb/upb/upb.h
+++ b/contrib/libs/grpc/third_party/upb/upb/upb.h
@@ -161,17 +161,35 @@ void *_upb_arena_slowmalloc(upb_arena *a, size_t size);
UPB_INLINE upb_alloc *upb_arena_alloc(upb_arena *a) { return (upb_alloc*)a; }
+UPB_INLINE size_t _upb_arenahas(upb_arena *a) {
+ _upb_arena_head *h = (_upb_arena_head*)a;
+ return (size_t)(h->end - h->ptr);
+}
+
UPB_INLINE void *upb_arena_malloc(upb_arena *a, size_t size) {
_upb_arena_head *h = (_upb_arena_head*)a;
void* ret;
size = UPB_ALIGN_MALLOC(size);
- if (UPB_UNLIKELY((size_t)(h->end - h->ptr) < size)) {
+ if (UPB_UNLIKELY(_upb_arenahas(a) < size)) {
return _upb_arena_slowmalloc(a, size);
}
ret = h->ptr;
h->ptr += size;
+ UPB_UNPOISON_MEMORY_REGION(ret, size);
+
+#if UPB_ASAN
+ {
+ size_t guard_size = 32;
+ if (_upb_arenahas(a) >= guard_size) {
+ h->ptr += guard_size;
+ } else {
+ h->ptr = h->end;
+ }
+ }
+#endif
+
return ret;
}
@@ -283,7 +301,7 @@ UPB_INLINE uint32_t _upb_be_swap32(uint32_t val) {
return val;
} else {
return ((val & 0xff) << 24) | ((val & 0xff00) << 8) |
- ((val & 0xff0000ULL) >> 8) | ((val & 0xff000000ULL) >> 24);
+ ((val & 0xff0000) >> 8) | ((val & 0xff000000) >> 24);
}
}
@@ -291,14 +309,25 @@ UPB_INLINE uint64_t _upb_be_swap64(uint64_t val) {
if (_upb_isle()) {
return val;
} else {
- return ((val & 0xff) << 56) | ((val & 0xff00) << 40) |
- ((val & 0xff0000) << 24) | ((val & 0xff000000) << 8) |
- ((val & 0xff00000000ULL) >> 8) | ((val & 0xff0000000000ULL) >> 24) |
- ((val & 0xff000000000000ULL) >> 40) |
- ((val & 0xff00000000000000ULL) >> 56);
+ return ((uint64_t)_upb_be_swap32(val) << 32) | _upb_be_swap32(val >> 32);
}
}
+UPB_INLINE int _upb_lg2ceil(int x) {
+ if (x <= 1) return 0;
+#ifdef __GNUC__
+ return 32 - __builtin_clz(x - 1);
+#else
+ int lg2 = 0;
+ while (1 << lg2 < x) lg2++;
+ return lg2;
+#endif
+}
+
+UPB_INLINE int _upb_lg2ceilsize(int x) {
+ return 1 << _upb_lg2ceil(x);
+}
+
#include "upb/port_undef.inc"
#ifdef __cplusplus
diff --git a/contrib/libs/grpc/third_party/upb/upb/upb.hpp b/contrib/libs/grpc/third_party/upb/upb/upb.hpp
index a3ec5faff8f..b7b99761fb2 100644
--- a/contrib/libs/grpc/third_party/upb/upb/upb.hpp
+++ b/contrib/libs/grpc/third_party/upb/upb/upb.hpp
@@ -41,6 +41,9 @@ class Arena {
public:
// A simple arena with no initial memory block and the default allocator.
Arena() : ptr_(upb_arena_new(), upb_arena_free) {}
+ Arena(char *initial_block, size_t size)
+ : ptr_(upb_arena_init(initial_block, size, &upb_alloc_global),
+ upb_arena_free) {}
upb_arena* ptr() { return ptr_.get(); }
@@ -71,15 +74,12 @@ class Arena {
template <int N>
class InlinedArena : public Arena {
public:
- InlinedArena() : ptr_(upb_arena_new(&initial_block_, N, &upb_alloc_global)) {}
-
- upb_arena* ptr() { return ptr_.get(); }
+ InlinedArena() : Arena(initial_block_, N) {}
private:
InlinedArena(const InlinedArena*) = delete;
InlinedArena& operator=(const InlinedArena*) = delete;
- std::unique_ptr<upb_arena, decltype(&upb_arena_free)> ptr_;
char initial_block_[N];
};
diff --git a/contrib/libs/grpc/third_party/upb/upb/upb.int.h b/contrib/libs/grpc/third_party/upb/upb/upb.int.h
new file mode 100644
index 00000000000..b857560e4e8
--- /dev/null
+++ b/contrib/libs/grpc/third_party/upb/upb/upb.int.h
@@ -0,0 +1,29 @@
+
+#ifndef UPB_INT_H_
+#define UPB_INT_H_
+
+#include "upb/upb.h"
+
+struct mem_block;
+typedef struct mem_block mem_block;
+
+struct upb_arena {
+ _upb_arena_head head;
+ uint32_t *cleanups;
+
+ /* Allocator to allocate arena blocks. We are responsible for freeing these
+ * when we are destroyed. */
+ upb_alloc *block_alloc;
+ uint32_t last_size;
+
+ /* When multiple arenas are fused together, each arena points to a parent
+ * arena (root points to itself). The root tracks how many live arenas
+ * reference it. */
+ uint32_t refcount; /* Only used when a->parent == a */
+ struct upb_arena *parent;
+
+ /* Linked list of blocks to free/cleanup. */
+ mem_block *freelist, *freelist_tail;
+};
+
+#endif /* UPB_INT_H_ */
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor/CMakeLists.txt b/contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor/CMakeLists.txt
new file mode 100644
index 00000000000..617dff0799e
--- /dev/null
+++ b/contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor/CMakeLists.txt
@@ -0,0 +1,51 @@
+
+# This file was gererated by the build system used internally in the Yandex monorepo.
+# Only simple modifications are allowed (adding source-files to targets, adding simple properties
+# like target_include_directories). These modifications will be ported to original
+# ya.make files by maintainers. Any complex modifications which can't be ported back to the
+# original buildsystem will not be accepted.
+
+
+
+add_library(yabsl-status-statusor)
+target_include_directories(yabsl-status-statusor PUBLIC
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp-tstring
+)
+target_include_directories(yabsl-status-statusor PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp-tstring
+)
+target_link_libraries(yabsl-status-statusor PUBLIC
+ contrib-libs-cxxsupp
+ yutil
+ yabseil-cpp-tstring-y_absl-base
+ ybase-internal-low_level_alloc
+ ybase-internal-raw_logging
+ ybase-internal-spinlock_wait
+ ybase-internal-throw_delegate
+ yabsl-base-log_severity
+ yabseil-cpp-tstring-y_absl-debugging
+ yabsl-debugging-stacktrace
+ yabsl-debugging-symbolize
+ yabseil-cpp-tstring-y_absl-demangle
+ yabseil-cpp-tstring-y_absl-numeric
+ yprofiling-internal-exponential_biased
+ yabseil-cpp-tstring-y_absl-status
+ yabseil-cpp-tstring-y_absl-strings
+ yabsl-strings-cord
+ ystrings-internal-absl_cord_internal
+ ystrings-internal-absl_strings_internal
+ ystrings-internal-cordz_functions
+ ystrings-internal-cordz_handle
+ ystrings-internal-cordz_info
+ ystrings-internal-str_format
+ yabseil-cpp-tstring-y_absl-synchronization
+ yabsl-synchronization-internal
+ yabseil-cpp-tstring-y_absl-time
+ yabsl-time-civil_time
+ yabsl-time-time_zone
+ yabsl-types-bad_optional_access
+ yabsl-types-bad_variant_access
+)
+target_sources(yabsl-status-statusor PRIVATE
+ ${CMAKE_SOURCE_DIR}/contrib/restricted/abseil-cpp-tstring/y_absl/status/statusor.cc
+)