grpc 1.30.1 → 1.40.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of grpc might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Makefile +1195 -18269
- data/etc/roots.pem +257 -573
- data/include/grpc/compression.h +1 -1
- data/include/grpc/event_engine/README.md +38 -0
- data/include/grpc/event_engine/endpoint_config.h +48 -0
- data/include/grpc/event_engine/event_engine.h +330 -0
- data/include/grpc/event_engine/port.h +41 -0
- data/include/grpc/event_engine/slice_allocator.h +66 -0
- data/include/grpc/grpc.h +38 -9
- data/include/grpc/grpc_security.h +291 -186
- data/include/grpc/grpc_security_constants.h +18 -0
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/atm_windows.h +4 -0
- data/include/grpc/impl/codegen/byte_buffer.h +1 -1
- data/include/grpc/impl/codegen/grpc_types.h +60 -31
- data/include/grpc/impl/codegen/log.h +0 -2
- data/include/grpc/impl/codegen/port_platform.h +75 -87
- data/include/grpc/impl/codegen/sync_windows.h +4 -0
- data/include/grpc/module.modulemap +14 -14
- data/include/grpc/slice_buffer.h +3 -3
- data/include/grpc/support/sync.h +3 -3
- data/include/grpc/support/time.h +7 -7
- data/src/core/ext/filters/client_channel/backend_metric.cc +14 -13
- data/src/core/ext/filters/client_channel/backup_poller.cc +6 -5
- data/src/core/ext/filters/client_channel/channel_connectivity.cc +177 -202
- data/src/core/ext/filters/client_channel/client_channel.cc +2112 -2959
- data/src/core/ext/filters/client_channel/client_channel.h +514 -62
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +1 -4
- data/src/core/ext/filters/client_channel/client_channel_factory.h +2 -1
- data/src/core/ext/filters/client_channel/client_channel_plugin.cc +4 -1
- data/src/core/ext/filters/client_channel/config_selector.cc +58 -0
- data/src/core/ext/filters/client_channel/config_selector.h +146 -0
- data/src/core/ext/filters/client_channel/connector.h +1 -1
- data/src/core/ext/filters/client_channel/dynamic_filters.cc +190 -0
- data/src/core/ext/filters/client_channel/dynamic_filters.h +99 -0
- data/src/core/ext/filters/client_channel/global_subchannel_pool.cc +26 -122
- data/src/core/ext/filters/client_channel/global_subchannel_pool.h +15 -10
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +46 -35
- data/src/core/ext/filters/client_channel/health/health_check_client.h +34 -33
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +39 -37
- data/src/core/ext/filters/client_channel/http_proxy.cc +42 -24
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.cc +48 -35
- data/src/core/ext/filters/client_channel/lb_policy/address_filtering.h +7 -5
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +10 -7
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.cc +6 -6
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +301 -267
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +0 -13
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +0 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h +1 -2
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +3 -40
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.cc +3 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_client_stats.h +2 -1
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +3 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +34 -37
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +102 -51
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.cc +757 -0
- data/src/core/ext/filters/client_channel/lb_policy/ring_hash/ring_hash.h +37 -0
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +18 -24
- data/src/core/ext/filters/client_channel/lb_policy/subchannel_list.h +15 -37
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +41 -34
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +472 -145
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.h +52 -24
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_channel_args.h +29 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_impl.cc +787 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_manager.cc +700 -0
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_cluster_resolver.cc +1372 -0
- data/src/core/ext/filters/client_channel/lb_policy.cc +11 -18
- data/src/core/ext/filters/client_channel/lb_policy.h +80 -53
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +1 -1
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +16 -10
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
- data/src/core/ext/filters/client_channel/local_subchannel_pool.cc +27 -67
- data/src/core/ext/filters/client_channel/local_subchannel_pool.h +10 -9
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +71 -78
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.h +2 -33
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_event_engine.cc +31 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +11 -9
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +14 -12
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +24 -20
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +495 -79
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.h +6 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_event_engine.cc +28 -0
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +45 -36
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +40 -45
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h +8 -6
- data/src/core/ext/filters/client_channel/resolver/google_c2p/google_c2p_resolver.cc +384 -0
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +38 -31
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +883 -71
- data/src/core/ext/filters/client_channel/{xds/xds_channel_args.h → resolver/xds/xds_resolver.h} +9 -7
- data/src/core/ext/filters/client_channel/resolver.cc +7 -5
- data/src/core/ext/filters/client_channel/resolver.h +7 -15
- data/src/core/ext/filters/client_channel/resolver_factory.h +6 -6
- data/src/core/ext/filters/client_channel/resolver_registry.cc +49 -49
- data/src/core/ext/filters/client_channel/resolver_registry.h +2 -2
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +50 -303
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +26 -54
- data/src/core/ext/filters/client_channel/retry_filter.cc +2611 -0
- data/src/core/ext/filters/client_channel/retry_filter.h +30 -0
- data/src/core/ext/filters/client_channel/retry_service_config.cc +316 -0
- data/src/core/ext/filters/client_channel/retry_service_config.h +96 -0
- data/src/core/ext/filters/client_channel/retry_throttle.cc +5 -3
- data/src/core/ext/filters/client_channel/retry_throttle.h +4 -2
- data/src/core/ext/filters/client_channel/server_address.cc +129 -7
- data/src/core/ext/filters/client_channel/server_address.h +75 -21
- data/src/core/ext/filters/client_channel/service_config.cc +27 -21
- data/src/core/ext/filters/client_channel/service_config.h +11 -7
- data/src/core/ext/filters/client_channel/service_config_call_data.h +60 -2
- data/src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc +143 -0
- data/src/core/ext/filters/client_channel/service_config_parser.cc +14 -12
- data/src/core/ext/filters/client_channel/service_config_parser.h +12 -6
- data/src/core/ext/filters/client_channel/subchannel.cc +188 -236
- data/src/core/ext/filters/client_channel/subchannel.h +88 -113
- data/src/core/ext/filters/client_channel/subchannel_interface.h +41 -5
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.cc +16 -2
- data/src/core/ext/filters/client_channel/subchannel_pool_interface.h +16 -10
- data/src/core/ext/filters/client_idle/client_idle_filter.cc +18 -17
- data/src/core/ext/filters/deadline/deadline_filter.cc +94 -86
- data/src/core/ext/filters/deadline/deadline_filter.h +7 -11
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +501 -0
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +39 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.cc +189 -0
- data/src/core/ext/filters/fault_injection/service_config_parser.h +85 -0
- data/src/core/ext/filters/http/client/http_client_filter.cc +39 -29
- data/src/core/ext/filters/http/client_authority_filter.cc +9 -9
- data/src/core/ext/filters/http/http_filters_plugin.cc +8 -4
- data/src/core/ext/filters/http/message_compress/message_compress_filter.cc +23 -22
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.cc +91 -50
- data/src/core/ext/filters/http/message_compress/message_decompress_filter.h +3 -1
- data/src/core/ext/filters/http/server/http_server_filter.cc +30 -26
- data/src/core/ext/filters/max_age/max_age_filter.cc +50 -44
- data/src/core/ext/filters/message_size/message_size_filter.cc +72 -92
- data/src/core/ext/filters/message_size/message_size_filter.h +8 -1
- data/src/core/ext/filters/workarounds/workaround_cronet_compression_filter.cc +5 -4
- data/src/core/ext/filters/workarounds/workaround_utils.cc +1 -1
- data/src/core/ext/transport/chttp2/client/authority.cc +3 -3
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +90 -34
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +22 -5
- data/src/core/ext/transport/chttp2/client/insecure/channel_create.cc +23 -10
- data/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.cc +23 -11
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +38 -50
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +803 -352
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +16 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +14 -5
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +22 -20
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +67 -24
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +8 -8
- data/src/core/ext/transport/chttp2/transport/chttp2_slice_allocator.cc +66 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_slice_allocator.h +74 -0
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +457 -447
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +12 -1
- data/src/core/ext/transport/chttp2/transport/context_list.cc +4 -5
- data/src/core/ext/transport/chttp2/transport/context_list.h +4 -4
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +36 -33
- data/src/core/ext/transport/chttp2/transport/flow_control.h +34 -26
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +26 -25
- data/src/core/ext/transport/chttp2/transport/frame_data.h +10 -10
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +21 -23
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +6 -6
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +12 -14
- data/src/core/ext/transport/chttp2/transport/frame_ping.h +7 -6
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +19 -20
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +6 -6
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +19 -19
- data/src/core/ext/transport/chttp2/transport/frame_settings.h +8 -7
- data/src/core/ext/transport/chttp2/transport/frame_window_update.cc +19 -24
- data/src/core/ext/transport/chttp2/transport/frame_window_update.h +4 -6
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +681 -765
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +195 -74
- data/src/core/ext/transport/chttp2/transport/hpack_table.cc +17 -20
- data/src/core/ext/transport/chttp2/transport/hpack_table.h +4 -4
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/incoming_metadata.h +2 -2
- data/src/core/ext/transport/chttp2/transport/internal.h +57 -30
- data/src/core/ext/transport/chttp2/transport/parsing.cc +181 -180
- data/src/core/ext/transport/chttp2/transport/varint.cc +6 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +24 -25
- data/src/core/ext/transport/inproc/inproc_transport.cc +154 -88
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.c +406 -0
- data/src/core/ext/upb-generated/envoy/admin/v3/config_dump.upb.h +1459 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +1 -1
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +10 -4
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +243 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +865 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.c +371 -0
- data/src/core/ext/upb-generated/envoy/config/bootstrap/v3/bootstrap.upb.h +1452 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +253 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +461 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1850 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +77 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.c +56 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +364 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +124 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +428 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +370 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +1126 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +103 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +388 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/extension.upb.h +149 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +241 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +839 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +170 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +767 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +239 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +982 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/resolver.upb.h +121 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/socket_option.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +95 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.c +43 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/substitution_format_string.upb.h +126 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/udp_socket_config.upb.h +90 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +243 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +305 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +367 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.c +33 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +73 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +138 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +604 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +161 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +638 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.c +48 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/quic_config.upb.h +171 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +115 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/config/metrics/v3/stats.upb.h +488 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.c +141 -0
- data/src/core/ext/upb-generated/envoy/config/overload/v3/overload.upb.h +452 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +179 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +662 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +82 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +294 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +953 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +3862 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +159 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +49 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +122 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +67 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/common/fault/v3/fault.upb.h +268 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.c +79 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/fault/v3/fault.upb.h +285 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/http/router/v3/router.upb.h +117 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +404 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1671 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +19 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +35 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +116 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +475 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +73 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +219 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +621 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/rds.upb.c → service/cluster/v3/cds.upb.c} +6 -9
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/{v2 → v3}/ads.upb.c +6 -5
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +146 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +499 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/endpoint/v3}/eds.upb.c +6 -10
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/listener/v3}/lds.upb.c +6 -10
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +54 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +151 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/srds.upb.c → service/route/v3/rds.upb.c} +6 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cds.upb.c → service/route/v3/srds.upb.c} +6 -7
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +56 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.c +121 -0
- data/src/core/ext/upb-generated/envoy/service/status/v3/csds.upb.h +438 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.c +60 -0
- data/src/core/ext/upb-generated/envoy/type/http/v3/path_transformation.upb.h +181 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +128 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.c +36 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/node.upb.h +90 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +84 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +78 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +65 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +166 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +146 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.c +46 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/struct.upb.h +124 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +207 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +301 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +283 -0
- data/src/core/ext/upb-generated/envoy/type/{http.upb.c → v3/http.upb.c} +2 -2
- data/src/core/ext/upb-generated/envoy/type/{http.upb.h → v3/http.upb.h} +9 -9
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.c +40 -0
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +99 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.c +51 -0
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +130 -0
- data/src/core/ext/upb-generated/envoy/type/{semantic_version.upb.c → v3/semantic_version.upb.c} +7 -6
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +68 -0
- data/src/core/ext/upb-generated/google/api/annotations.upb.h +1 -1
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.c +242 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/checked.upb.h +830 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +251 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +871 -0
- data/src/core/ext/upb-generated/google/api/http.upb.c +3 -3
- data/src/core/ext/upb-generated/google/api/http.upb.h +52 -32
- data/src/core/ext/upb-generated/google/protobuf/any.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/any.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +106 -106
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.h +688 -499
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/duration.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/empty.upb.h +8 -2
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.c +5 -5
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +55 -57
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.c +1 -1
- data/src/core/ext/upb-generated/google/protobuf/timestamp.upb.h +12 -6
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.c +9 -9
- data/src/core/ext/upb-generated/google/protobuf/wrappers.upb.h +82 -28
- data/src/core/ext/upb-generated/google/rpc/status.upb.c +1 -1
- data/src/core/ext/upb-generated/google/rpc/status.upb.h +17 -10
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/altscontext.upb.h +40 -45
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +43 -43
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +236 -184
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.c +5 -5
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/transport_security_common.upb.h +29 -13
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.c +2 -2
- data/src/core/ext/upb-generated/src/proto/grpc/health/v1/health.upb.h +19 -7
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +17 -17
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +122 -62
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +3 -3
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +30 -12
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.c +31 -0
- data/src/core/ext/upb-generated/udpa/annotations/security.upb.h +64 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +1 -1
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.c +2 -2
- data/src/core/ext/upb-generated/udpa/annotations/status.upb.h +12 -6
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +60 -0
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.c +9 -9
- data/src/core/ext/upb-generated/udpa/data/orca/v1/orca_load_report.upb.h +48 -68
- data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.c +33 -0
- data/src/core/ext/upb-generated/udpa/type/v1/typed_struct.upb.h +77 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +133 -117
- data/src/core/ext/upb-generated/validate/validate.upb.h +881 -645
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.c +28 -0
- data/src/core/ext/upb-generated/xds/core/v3/authority.upb.h +60 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.c +52 -0
- data/src/core/ext/upb-generated/xds/core/v3/collection_entry.upb.h +143 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.c +42 -0
- data/src/core/ext/upb-generated/xds/core/v3/context_params.upb.h +84 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource.upb.h +94 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.c +54 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_locator.upb.h +166 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.c +36 -0
- data/src/core/ext/upb-generated/xds/core/v3/resource_name.upb.h +85 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.c +354 -0
- data/src/core/ext/upbdefs-generated/envoy/admin/v3/config_dump.upbdefs.h +140 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/deprecation.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.c +41 -0
- data/src/core/ext/upbdefs-generated/envoy/annotations/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.c +252 -0
- data/src/core/ext/upbdefs-generated/envoy/config/accesslog/v3/accesslog.upbdefs.h +105 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.c +424 -0
- data/src/core/ext/upbdefs-generated/envoy/config/bootstrap/v3/bootstrap.upbdefs.h +120 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.c +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/circuit_breaker.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.c +570 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/cluster.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/filter.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.c +136 -0
- data/src/core/ext/upbdefs-generated/envoy/config/cluster/v3/outlier_detection.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.c +127 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/address.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/backoff.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.c +300 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/base.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.c +144 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/config_source.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/event_service_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/extension.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.c +263 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/grpc_service.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.c +233 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/health_check.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/http_uri.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.c +287 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/protocol.upbdefs.h +100 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/proxy_protocol.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/resolver.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/socket_option.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/substitution_format_string.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.c +52 -0
- data/src/core/ext/upbdefs-generated/envoy/config/core/v3/udp_socket_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.c +107 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.c +113 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/endpoint_components.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.c +146 -0
- data/src/core/ext/upbdefs-generated/envoy/config/endpoint/v3/load_report.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/api_listener.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.c +205 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.c +201 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/listener_components.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.c +90 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/quic_config.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/envoy/config/listener/v3/udp_listener_config.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.c +141 -0
- data/src/core/ext/upbdefs-generated/envoy/config/metrics/v3/stats.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.c +141 -0
- data/src/core/ext/upbdefs-generated/envoy/config/overload/v3/overload.upbdefs.h +70 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.c +115 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.c +964 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/route_components.upbdefs.h +295 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.c +71 -0
- data/src/core/ext/upbdefs-generated/envoy/config/route/v3/scoped_route.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/envoy/config/trace/v3/http_tracer.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.c +51 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/clusters/aggregate/v3/cluster.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.c +102 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/common/fault/v3/fault.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.c +123 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/fault/v3/fault.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.c +79 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/http/router/v3/router.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +571 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.h +125 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/cert.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +178 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.c +97 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/secret.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +246 -0
- data/src/core/ext/upbdefs-generated/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.h +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/cluster/v3/cds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.c +60 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/ads.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-generated/envoy/service/discovery/v3/discovery.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.c +73 -0
- data/src/core/ext/upbdefs-generated/envoy/service/endpoint/v3/eds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.c +72 -0
- data/src/core/ext/upbdefs-generated/envoy/service/listener/v3/lds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/load_stats/v3/lrs.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.c +80 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/rds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.c +74 -0
- data/src/core/ext/upbdefs-generated/envoy/service/route/v3/srds.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.c +163 -0
- data/src/core/ext/upbdefs-generated/envoy/service/status/v3/csds.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/http/v3/path_transformation.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.c +64 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/metadata.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/node.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/number.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.c +53 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/path.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.c +76 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/regex.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.c +69 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/string.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.c +63 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/struct.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.c +81 -0
- data/src/core/ext/upbdefs-generated/envoy/type/matcher/v3/value.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.c +92 -0
- data/src/core/ext/upbdefs-generated/envoy/type/metadata/v3/metadata.upbdefs.h +65 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.c +95 -0
- data/src/core/ext/upbdefs-generated/envoy/type/tracing/v3/custom_tag.upbdefs.h +55 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/http.upbdefs.c +34 -0
- data/src/core/ext/{upb-generated/gogoproto/gogo.upb.h → upbdefs-generated/envoy/type/v3/http.upbdefs.h} +10 -10
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.c +59 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/percent.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.c +54 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/range.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.c +47 -0
- data/src/core/ext/upbdefs-generated/envoy/type/v3/semantic_version.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/api/annotations.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.c +61 -0
- data/src/core/ext/upbdefs-generated/google/api/http.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.c +39 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/any.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.c +386 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/descriptor.upbdefs.h +165 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/duration.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.c +37 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/empty.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.c +65 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/struct.upbdefs.h +50 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.c +40 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/timestamp.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.c +66 -0
- data/src/core/ext/upbdefs-generated/google/protobuf/wrappers.upbdefs.h +75 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/google/rpc/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.c +70 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/migrate.upbdefs.h +45 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.c +56 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/security.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.c +33 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/sensitive.upbdefs.h +30 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/status.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.c +43 -0
- data/src/core/ext/upbdefs-generated/udpa/annotations/versioning.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.c +44 -0
- data/src/core/ext/upbdefs-generated/udpa/type/v1/typed_struct.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.c +332 -0
- data/src/core/ext/upbdefs-generated/validate/validate.upbdefs.h +145 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.c +42 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/authority.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.c +62 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/collection_entry.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.c +45 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/context_params.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.c +49 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource.upbdefs.h +35 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.c +67 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_locator.upbdefs.h +40 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.c +50 -0
- data/src/core/ext/upbdefs-generated/xds/core/v3/resource_name.upbdefs.h +35 -0
- data/src/core/ext/xds/certificate_provider_factory.h +61 -0
- data/src/core/ext/xds/certificate_provider_registry.cc +103 -0
- data/src/core/ext/xds/certificate_provider_registry.h +57 -0
- data/src/core/ext/xds/certificate_provider_store.cc +87 -0
- data/src/core/ext/xds/certificate_provider_store.h +112 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.cc +144 -0
- data/src/core/ext/xds/file_watcher_certificate_provider_factory.h +69 -0
- data/src/core/ext/xds/xds_api.cc +4124 -0
- data/src/core/ext/xds/xds_api.h +709 -0
- data/src/core/ext/xds/xds_bootstrap.cc +496 -0
- data/src/core/ext/xds/xds_bootstrap.h +115 -0
- data/src/core/ext/xds/xds_certificate_provider.cc +405 -0
- data/src/core/ext/xds/xds_certificate_provider.h +151 -0
- data/src/core/ext/xds/xds_channel_args.h +32 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.cc +1056 -884
- data/src/core/ext/xds/xds_client.h +375 -0
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.cc +63 -19
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.h +52 -23
- data/src/core/ext/xds/xds_http_fault_filter.cc +226 -0
- data/src/core/ext/xds/xds_http_fault_filter.h +63 -0
- data/src/core/ext/xds/xds_http_filters.cc +115 -0
- data/src/core/ext/xds/xds_http_filters.h +133 -0
- data/src/core/ext/xds/xds_server_config_fetcher.cc +546 -0
- data/src/core/{ext/filters/client_channel → lib/address_utils}/parse_address.cc +129 -45
- data/src/core/lib/address_utils/parse_address.h +77 -0
- data/src/core/lib/{iomgr → address_utils}/sockaddr_utils.cc +138 -19
- data/src/core/lib/{iomgr → address_utils}/sockaddr_utils.h +38 -7
- data/src/core/lib/channel/call_tracer.h +85 -0
- data/src/core/lib/channel/channel_args.cc +9 -8
- data/src/core/lib/channel/channel_args.h +0 -1
- data/src/core/lib/channel/channel_stack.cc +22 -9
- data/src/core/lib/channel/channel_stack.h +18 -10
- data/src/core/lib/channel/channel_stack_builder.cc +2 -2
- data/src/core/lib/channel/channel_stack_builder.h +1 -1
- data/src/core/lib/channel/channel_trace.cc +6 -8
- data/src/core/lib/channel/channel_trace.h +1 -1
- data/src/core/lib/channel/channelz.cc +148 -99
- data/src/core/lib/channel/channelz.h +47 -24
- data/src/core/lib/channel/channelz_registry.cc +29 -12
- data/src/core/lib/channel/channelz_registry.h +3 -1
- data/src/core/lib/channel/connected_channel.cc +4 -4
- data/src/core/lib/channel/context.h +3 -0
- data/src/core/lib/channel/handshaker.cc +11 -52
- data/src/core/lib/channel/handshaker.h +8 -25
- data/src/core/lib/channel/status_util.cc +12 -2
- data/src/core/lib/channel/status_util.h +9 -0
- data/src/core/lib/compression/compression.cc +8 -4
- data/src/core/lib/compression/compression_args.cc +3 -2
- data/src/core/lib/compression/compression_internal.cc +10 -5
- data/src/core/lib/compression/compression_internal.h +2 -1
- data/src/core/lib/compression/stream_compression.h +1 -1
- data/src/core/lib/compression/stream_compression_gzip.h +1 -1
- data/src/core/lib/compression/stream_compression_identity.cc +1 -3
- data/src/core/lib/compression/stream_compression_identity.h +1 -1
- data/src/core/lib/debug/stats.h +3 -3
- data/src/core/lib/debug/stats_data.cc +1 -0
- data/src/core/lib/debug/stats_data.h +13 -13
- data/src/core/lib/event_engine/endpoint_config.cc +46 -0
- data/src/core/lib/event_engine/endpoint_config_internal.h +42 -0
- data/src/core/lib/event_engine/event_engine.cc +50 -0
- data/src/core/lib/event_engine/sockaddr.cc +40 -0
- data/src/core/lib/event_engine/sockaddr.h +44 -0
- data/src/core/lib/gpr/alloc.cc +3 -2
- data/src/core/lib/gpr/cpu_iphone.cc +10 -2
- data/src/core/lib/gpr/log.cc +59 -17
- data/src/core/lib/gpr/log_linux.cc +23 -9
- data/src/core/lib/gpr/log_posix.cc +19 -7
- data/src/core/lib/gpr/log_windows.cc +18 -4
- data/src/core/lib/gpr/murmur_hash.cc +5 -3
- data/src/core/lib/gpr/spinlock.h +10 -2
- data/src/core/lib/gpr/string.cc +33 -31
- data/src/core/lib/gpr/string.h +9 -8
- data/src/core/lib/gpr/sync.cc +4 -4
- data/src/core/lib/gpr/sync_abseil.cc +3 -6
- data/src/core/lib/gpr/sync_posix.cc +2 -8
- data/src/core/lib/gpr/sync_windows.cc +2 -2
- data/src/core/lib/gpr/time.cc +12 -12
- data/src/core/lib/gpr/time_precise.cc +5 -2
- data/src/core/lib/gpr/time_precise.h +6 -2
- data/src/core/lib/gpr/tls.h +4 -0
- data/src/core/lib/gpr/tls_msvc.h +2 -0
- data/src/core/lib/gpr/tls_stdcpp.h +48 -0
- data/src/core/lib/gpr/useful.h +5 -4
- data/src/core/lib/gpr/wrap_memcpy.cc +2 -1
- data/src/core/lib/gprpp/arena.h +3 -2
- data/src/core/lib/gprpp/atomic.h +3 -3
- data/src/core/lib/gprpp/dual_ref_counted.h +331 -0
- data/src/core/lib/gprpp/examine_stack.cc +43 -0
- data/src/core/lib/gprpp/examine_stack.h +46 -0
- data/src/core/lib/gprpp/fork.cc +2 -2
- data/src/core/lib/gprpp/global_config_env.cc +8 -6
- data/src/core/lib/gprpp/manual_constructor.h +2 -2
- data/src/core/lib/gprpp/mpscq.cc +2 -2
- data/src/core/lib/gprpp/orphanable.h +7 -11
- data/src/core/lib/gprpp/ref_counted.h +105 -68
- data/src/core/lib/gprpp/ref_counted_ptr.h +168 -7
- data/src/core/lib/gprpp/stat.h +38 -0
- data/src/core/lib/gprpp/stat_posix.cc +49 -0
- data/src/core/lib/gprpp/stat_windows.cc +48 -0
- data/src/core/lib/gprpp/status_helper.cc +407 -0
- data/src/core/lib/gprpp/status_helper.h +183 -0
- data/src/core/lib/gprpp/sync.h +104 -43
- data/src/core/lib/gprpp/thd.h +3 -3
- data/src/core/lib/gprpp/thd_posix.cc +42 -37
- data/src/core/lib/gprpp/thd_windows.cc +3 -1
- data/src/core/lib/gprpp/time_util.cc +77 -0
- data/src/core/lib/gprpp/time_util.h +42 -0
- data/src/core/lib/http/httpcli.cc +25 -22
- data/src/core/lib/http/httpcli.h +2 -3
- data/src/core/lib/http/httpcli_security_connector.cc +19 -15
- data/src/core/lib/http/parser.cc +63 -43
- data/src/core/lib/http/parser.h +4 -4
- data/src/core/lib/iomgr/buffer_list.cc +8 -10
- data/src/core/lib/iomgr/buffer_list.h +5 -6
- data/src/core/lib/iomgr/call_combiner.cc +21 -15
- data/src/core/lib/iomgr/call_combiner.h +12 -14
- data/src/core/lib/iomgr/cfstream_handle.cc +6 -5
- data/src/core/lib/iomgr/cfstream_handle.h +1 -1
- data/src/core/lib/iomgr/closure.h +7 -6
- data/src/core/lib/iomgr/combiner.cc +16 -13
- data/src/core/lib/iomgr/combiner.h +2 -2
- data/src/core/lib/iomgr/endpoint.cc +6 -2
- data/src/core/lib/iomgr/endpoint.h +10 -6
- data/src/core/lib/iomgr/endpoint_cfstream.cc +46 -23
- data/src/core/lib/iomgr/endpoint_pair_event_engine.cc +33 -0
- data/src/core/lib/iomgr/endpoint_pair_posix.cc +10 -10
- data/src/core/lib/iomgr/endpoint_pair_windows.cc +1 -1
- data/src/core/lib/iomgr/error.cc +185 -73
- data/src/core/lib/iomgr/error.h +218 -107
- data/src/core/lib/iomgr/error_cfstream.cc +12 -10
- data/src/core/lib/iomgr/error_cfstream.h +2 -2
- data/src/core/lib/iomgr/error_internal.h +6 -2
- data/src/core/lib/iomgr/ev_apple.cc +16 -13
- data/src/core/lib/iomgr/ev_apple.h +1 -1
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +47 -41
- data/src/core/lib/iomgr/ev_epollex_linux.cc +92 -87
- data/src/core/lib/iomgr/ev_poll_posix.cc +41 -35
- data/src/core/lib/iomgr/ev_posix.cc +12 -11
- data/src/core/lib/iomgr/ev_posix.h +9 -9
- data/src/core/lib/iomgr/event_engine/closure.cc +54 -0
- data/src/core/lib/iomgr/event_engine/closure.h +33 -0
- data/src/core/lib/iomgr/event_engine/endpoint.cc +192 -0
- data/src/core/lib/iomgr/event_engine/endpoint.h +53 -0
- data/src/core/lib/iomgr/event_engine/iomgr.cc +105 -0
- data/src/core/lib/iomgr/event_engine/iomgr.h +24 -0
- data/src/core/lib/iomgr/event_engine/pollset.cc +87 -0
- data/src/core/lib/iomgr/event_engine/pollset.h +25 -0
- data/src/core/lib/iomgr/event_engine/promise.h +51 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.cc +41 -0
- data/src/core/lib/iomgr/event_engine/resolved_address_internal.h +35 -0
- data/src/core/lib/iomgr/event_engine/resolver.cc +110 -0
- data/src/core/lib/iomgr/event_engine/tcp.cc +263 -0
- data/src/core/lib/iomgr/event_engine/timer.cc +57 -0
- data/src/core/lib/iomgr/exec_ctx.cc +19 -7
- data/src/core/lib/iomgr/exec_ctx.h +20 -17
- data/src/core/lib/iomgr/executor/mpmcqueue.h +5 -5
- data/src/core/lib/iomgr/executor/threadpool.cc +2 -3
- data/src/core/lib/iomgr/executor/threadpool.h +6 -6
- data/src/core/lib/iomgr/executor.cc +10 -9
- data/src/core/lib/iomgr/executor.h +3 -3
- data/src/core/lib/iomgr/iomgr.cc +3 -3
- data/src/core/lib/iomgr/iomgr.h +1 -1
- data/src/core/lib/iomgr/iomgr_custom.cc +1 -1
- data/src/core/lib/iomgr/iomgr_internal.cc +2 -2
- data/src/core/lib/iomgr/iomgr_internal.h +3 -3
- data/src/core/lib/iomgr/iomgr_posix.cc +3 -2
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +42 -13
- data/src/core/lib/iomgr/iomgr_windows.cc +1 -1
- data/src/core/lib/iomgr/is_epollexclusive_available.cc +14 -0
- data/src/core/lib/iomgr/load_file.cc +4 -4
- data/src/core/lib/iomgr/load_file.h +2 -2
- data/src/core/lib/iomgr/lockfree_event.cc +20 -15
- data/src/core/lib/iomgr/lockfree_event.h +2 -2
- data/src/core/lib/iomgr/pollset.cc +5 -5
- data/src/core/lib/iomgr/pollset.h +9 -9
- data/src/core/lib/iomgr/pollset_custom.cc +7 -7
- data/src/core/lib/iomgr/pollset_custom.h +3 -1
- data/src/core/lib/iomgr/pollset_set_custom.cc +1 -1
- data/src/core/lib/iomgr/pollset_uv.cc +3 -1
- data/src/core/lib/iomgr/pollset_uv.h +5 -1
- data/src/core/lib/iomgr/pollset_windows.cc +5 -5
- data/src/core/lib/iomgr/port.h +8 -26
- data/src/core/lib/iomgr/python_util.h +5 -5
- data/src/core/lib/iomgr/resolve_address.cc +12 -8
- data/src/core/lib/iomgr/resolve_address.h +12 -6
- data/src/core/lib/iomgr/resolve_address_custom.cc +23 -27
- data/src/core/lib/iomgr/resolve_address_custom.h +3 -3
- data/src/core/lib/iomgr/resolve_address_posix.cc +4 -8
- data/src/core/lib/iomgr/resolve_address_windows.cc +12 -12
- data/src/core/lib/iomgr/resource_quota.cc +48 -42
- data/src/core/lib/iomgr/sockaddr.h +1 -0
- data/src/core/lib/iomgr/socket_factory_posix.cc +3 -2
- data/src/core/lib/iomgr/socket_mutator.cc +18 -4
- data/src/core/lib/iomgr/socket_mutator.h +26 -2
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +120 -77
- data/src/core/lib/iomgr/socket_utils_posix.h +20 -20
- data/src/core/lib/iomgr/socket_windows.cc +4 -5
- data/src/core/lib/iomgr/tcp_client.cc +3 -3
- data/src/core/lib/iomgr/tcp_client_cfstream.cc +13 -15
- data/src/core/lib/iomgr/tcp_client_custom.cc +17 -20
- data/src/core/lib/iomgr/tcp_client_posix.cc +48 -54
- data/src/core/lib/iomgr/tcp_client_posix.h +3 -4
- data/src/core/lib/iomgr/tcp_client_windows.cc +16 -14
- data/src/core/lib/iomgr/tcp_custom.cc +67 -48
- data/src/core/lib/iomgr/tcp_custom.h +14 -13
- data/src/core/lib/iomgr/tcp_posix.cc +118 -94
- data/src/core/lib/iomgr/tcp_posix.h +8 -0
- data/src/core/lib/iomgr/tcp_server.cc +9 -10
- data/src/core/lib/iomgr/tcp_server.h +19 -16
- data/src/core/lib/iomgr/tcp_server_custom.cc +57 -58
- data/src/core/lib/iomgr/tcp_server_posix.cc +62 -61
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +16 -16
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +26 -25
- data/src/core/lib/iomgr/tcp_server_utils_posix_ifaddrs.cc +12 -17
- data/src/core/lib/iomgr/tcp_server_utils_posix_noifaddrs.cc +4 -4
- data/src/core/lib/iomgr/tcp_server_windows.cc +42 -41
- data/src/core/lib/iomgr/tcp_uv.cc +27 -25
- data/src/core/lib/iomgr/tcp_windows.cc +39 -23
- data/src/core/lib/iomgr/tcp_windows.h +2 -2
- data/src/core/lib/iomgr/timer.h +6 -1
- data/src/core/lib/iomgr/timer_custom.cc +7 -6
- data/src/core/lib/iomgr/timer_custom.h +1 -1
- data/src/core/lib/iomgr/timer_generic.cc +24 -23
- data/src/core/lib/iomgr/timer_manager.cc +4 -4
- data/src/core/lib/iomgr/udp_server.cc +46 -45
- data/src/core/lib/iomgr/udp_server.h +6 -4
- data/src/core/lib/iomgr/unix_sockets_posix.cc +36 -30
- data/src/core/lib/iomgr/unix_sockets_posix.h +9 -2
- data/src/core/lib/iomgr/unix_sockets_posix_noop.cc +20 -7
- data/src/core/lib/iomgr/wakeup_fd_eventfd.cc +3 -3
- data/src/core/lib/iomgr/wakeup_fd_nospecial.cc +1 -1
- data/src/core/lib/iomgr/wakeup_fd_pipe.cc +6 -6
- data/src/core/lib/iomgr/wakeup_fd_posix.cc +3 -3
- data/src/core/lib/iomgr/wakeup_fd_posix.h +8 -6
- data/src/core/lib/iomgr/work_serializer.h +17 -1
- data/src/core/lib/json/json.h +13 -3
- data/src/core/lib/json/json_reader.cc +33 -31
- data/src/core/lib/json/json_util.cc +58 -0
- data/src/core/lib/json/json_util.h +204 -0
- data/src/core/lib/json/json_writer.cc +2 -1
- data/src/core/lib/matchers/matchers.cc +327 -0
- data/src/core/lib/matchers/matchers.h +161 -0
- data/src/core/lib/security/authorization/authorization_engine.h +44 -0
- data/src/core/lib/security/authorization/authorization_policy_provider.h +32 -0
- data/src/core/lib/security/authorization/authorization_policy_provider_vtable.cc +46 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +209 -0
- data/src/core/lib/security/authorization/evaluate_args.h +91 -0
- data/src/core/lib/security/context/security_context.cc +4 -3
- data/src/core/lib/security/context/security_context.h +3 -1
- data/src/core/lib/security/credentials/alts/alts_credentials.cc +2 -1
- data/src/core/lib/security/credentials/alts/alts_credentials.h +1 -1
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +4 -4
- data/src/core/lib/security/credentials/composite/composite_credentials.h +2 -2
- data/src/core/lib/security/credentials/credentials.cc +7 -7
- data/src/core/lib/security/credentials/credentials.h +12 -9
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.cc +417 -0
- data/src/core/lib/security/credentials/external/aws_external_account_credentials.h +82 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.cc +214 -0
- data/src/core/lib/security/credentials/external/aws_request_signer.h +72 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.cc +500 -0
- data/src/core/lib/security/credentials/external/external_account_credentials.h +121 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.cc +136 -0
- data/src/core/lib/security/credentials/external/file_external_account_credentials.h +49 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.cc +213 -0
- data/src/core/lib/security/credentials/external/url_external_account_credentials.h +60 -0
- data/src/core/lib/security/credentials/fake/fake_credentials.cc +5 -4
- data/src/core/lib/security/credentials/fake/fake_credentials.h +2 -2
- data/src/core/lib/security/credentials/google_default/credentials_generic.cc +8 -6
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +95 -65
- data/src/core/lib/security/credentials/iam/iam_credentials.cc +2 -2
- data/src/core/lib/security/credentials/iam/iam_credentials.h +2 -2
- data/src/core/lib/security/credentials/insecure/insecure_credentials.cc +64 -0
- data/src/core/lib/security/credentials/jwt/json_token.cc +5 -5
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +10 -7
- data/src/core/lib/security/credentials/jwt/jwt_credentials.h +6 -5
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +12 -9
- data/src/core/lib/security/credentials/local/local_credentials.cc +2 -1
- data/src/core/lib/security/credentials/local/local_credentials.h +1 -1
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +78 -92
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +10 -9
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +12 -12
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +2 -2
- data/src/core/lib/security/credentials/ssl/ssl_credentials.cc +27 -6
- data/src/core/lib/security/credentials/ssl/ssl_credentials.h +12 -2
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.cc +347 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_distributor.h +213 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.cc +454 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_certificate_provider.h +145 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +82 -150
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +65 -185
- data/src/core/lib/security/credentials/tls/tls_credentials.cc +18 -13
- data/src/core/lib/security/credentials/tls/tls_credentials.h +3 -3
- data/src/core/lib/security/credentials/tls/tls_utils.cc +123 -0
- data/src/core/lib/security/credentials/tls/tls_utils.h +51 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.cc +244 -0
- data/src/core/lib/security/credentials/xds/xds_credentials.h +69 -0
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +14 -4
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +33 -28
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.cc +121 -0
- data/src/core/lib/security/security_connector/insecure/insecure_security_connector.h +97 -0
- data/src/core/lib/security/security_connector/load_system_roots.h +4 -0
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +1 -1
- data/src/core/lib/security/security_connector/load_system_roots_linux.h +2 -0
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +25 -12
- data/src/core/lib/security/security_connector/security_connector.cc +6 -3
- data/src/core/lib/security/security_connector/security_connector.h +14 -7
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +38 -21
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.h +5 -0
- data/src/core/lib/security/security_connector/ssl_utils.cc +82 -33
- data/src/core/lib/security/security_connector/ssl_utils.h +29 -25
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +380 -312
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +141 -79
- data/src/core/lib/security/transport/client_auth_filter.cc +28 -19
- data/src/core/lib/security/transport/secure_endpoint.cc +13 -7
- data/src/core/lib/security/transport/security_handshaker.cc +81 -44
- data/src/core/lib/security/transport/server_auth_filter.cc +19 -12
- data/src/core/lib/security/transport/tsi_error.cc +2 -1
- data/src/core/lib/security/transport/tsi_error.h +2 -1
- data/src/core/lib/security/util/json_util.cc +14 -15
- data/src/core/lib/security/util/json_util.h +2 -1
- data/src/core/lib/slice/slice.cc +57 -7
- data/src/core/lib/slice/slice_buffer.cc +2 -1
- data/src/core/lib/slice/slice_intern.cc +11 -13
- data/src/core/lib/slice/slice_internal.h +4 -2
- data/src/core/lib/surface/call.cc +164 -136
- data/src/core/lib/surface/call.h +15 -3
- data/src/core/lib/surface/call_details.cc +8 -8
- data/src/core/lib/surface/channel.cc +55 -63
- data/src/core/lib/surface/channel.h +24 -7
- data/src/core/lib/surface/channel_init.cc +1 -1
- data/src/core/lib/surface/channel_ping.cc +1 -1
- data/src/core/lib/surface/completion_queue.cc +96 -96
- data/src/core/lib/surface/completion_queue.h +18 -17
- data/src/core/lib/surface/completion_queue_factory.cc +1 -2
- data/src/core/lib/surface/init.cc +46 -32
- data/src/core/lib/surface/init.h +10 -1
- data/src/core/lib/surface/lame_client.cc +51 -58
- data/src/core/lib/surface/lame_client.h +5 -0
- data/src/core/lib/surface/server.cc +1181 -1365
- data/src/core/lib/surface/server.h +463 -70
- data/src/core/lib/surface/validate_metadata.cc +7 -7
- data/src/core/lib/surface/validate_metadata.h +6 -2
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/authority_override.cc +40 -0
- data/src/core/lib/transport/authority_override.h +37 -0
- data/src/core/lib/transport/bdp_estimator.cc +1 -1
- data/src/core/lib/transport/bdp_estimator.h +2 -1
- data/src/core/lib/transport/byte_stream.cc +5 -5
- data/src/core/lib/transport/byte_stream.h +11 -11
- data/src/core/lib/transport/connectivity_state.cc +19 -14
- data/src/core/lib/transport/connectivity_state.h +26 -12
- data/src/core/lib/transport/error_utils.cc +33 -9
- data/src/core/lib/transport/error_utils.h +15 -3
- data/src/core/lib/transport/metadata.cc +16 -2
- data/src/core/lib/transport/metadata.h +2 -2
- data/src/core/lib/transport/metadata_batch.cc +76 -38
- data/src/core/lib/transport/metadata_batch.h +43 -21
- data/src/core/lib/transport/static_metadata.cc +296 -277
- data/src/core/lib/transport/static_metadata.h +80 -73
- data/src/core/lib/transport/status_metadata.cc +4 -3
- data/src/core/lib/transport/timeout_encoding.cc +4 -4
- data/src/core/lib/transport/transport.cc +9 -6
- data/src/core/lib/transport/transport.h +26 -11
- data/src/core/lib/transport/transport_op_string.cc +6 -6
- data/src/core/lib/uri/uri_parser.cc +135 -258
- data/src/core/lib/uri/uri_parser.h +58 -20
- data/src/core/plugin_registry/grpc_plugin_registry.cc +61 -20
- data/src/core/tsi/alts/crypt/gsec.cc +5 -4
- data/src/core/tsi/alts/crypt/gsec.h +6 -0
- data/src/core/tsi/alts/frame_protector/frame_handler.cc +8 -6
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +47 -42
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +74 -53
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +1 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker_private.h +2 -1
- data/src/core/tsi/alts/handshaker/transport_security_common_api.cc +3 -3
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_iovec_record_protocol.cc +8 -6
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +4 -4
- data/src/core/tsi/fake_transport_security.cc +17 -5
- data/src/core/tsi/local_transport_security.cc +5 -1
- data/src/core/tsi/local_transport_security.h +6 -7
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +0 -2
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.h +3 -2
- data/src/core/tsi/ssl_transport_security.cc +199 -73
- data/src/core/tsi/ssl_transport_security.h +23 -12
- data/src/core/tsi/transport_security.cc +10 -8
- data/src/core/tsi/transport_security_interface.h +6 -1
- data/src/ruby/bin/math_services_pb.rb +5 -5
- data/src/ruby/ext/grpc/extconf.rb +17 -4
- data/src/ruby/ext/grpc/rb_call.c +3 -2
- data/src/ruby/ext/grpc/rb_call.h +4 -0
- data/src/ruby/ext/grpc/rb_call_credentials.c +54 -10
- data/src/ruby/ext/grpc/rb_channel.c +10 -1
- data/src/ruby/ext/grpc/rb_channel_credentials.c +20 -1
- data/src/ruby/ext/grpc/rb_channel_credentials.h +4 -0
- data/src/ruby/ext/grpc/rb_compression_options.c +1 -1
- data/src/ruby/ext/grpc/rb_enable_cpp.cc +1 -1
- data/src/ruby/ext/grpc/rb_event_thread.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc.c +4 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +46 -18
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +87 -45
- data/src/ruby/ext/grpc/rb_server.c +13 -1
- data/src/ruby/ext/grpc/rb_server_credentials.c +19 -3
- data/src/ruby/ext/grpc/rb_server_credentials.h +4 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +215 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.h +35 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +169 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.h +35 -0
- data/src/ruby/lib/grpc/generic/client_stub.rb +5 -3
- data/src/ruby/lib/grpc/generic/interceptors.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/grpc/health/v1/health_services_pb.rb +3 -3
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +40 -0
- data/src/ruby/pb/src/proto/grpc/testing/test_services_pb.rb +50 -16
- data/src/ruby/spec/call_spec.rb +1 -1
- data/src/ruby/spec/channel_credentials_spec.rb +42 -0
- data/src/ruby/spec/channel_spec.rb +17 -6
- data/src/ruby/spec/client_auth_spec.rb +27 -1
- data/src/ruby/spec/errors_spec.rb +1 -1
- data/src/ruby/spec/generic/active_call_spec.rb +21 -10
- data/src/ruby/spec/generic/client_stub_spec.rb +4 -4
- data/src/ruby/spec/generic/rpc_server_spec.rb +1 -1
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_import2.proto +23 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/package_options_ruby_style.proto +2 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_package_service_name.proto +27 -0
- data/src/ruby/spec/pb/codegen/grpc/testing/same_ruby_package_service_name.proto +29 -0
- data/src/ruby/spec/pb/codegen/package_option_spec.rb +27 -7
- data/src/ruby/spec/server_credentials_spec.rb +25 -0
- data/src/ruby/spec/server_spec.rb +22 -0
- data/src/ruby/spec/user_agent_spec.rb +74 -0
- data/third_party/abseil-cpp/absl/algorithm/container.h +1764 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +122 -41
- data/third_party/abseil-cpp/absl/base/call_once.h +3 -10
- data/third_party/abseil-cpp/absl/base/casts.h +9 -6
- data/third_party/abseil-cpp/absl/base/config.h +97 -26
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +442 -335
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +169 -0
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/third_party/abseil-cpp/absl/base/internal/endian.h +61 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +4 -4
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +31 -4
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +35 -33
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +17 -5
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +36 -40
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +33 -30
- data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +11 -3
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +11 -11
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +5 -5
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +28 -5
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +8 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +5 -2
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +43 -42
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +111 -7
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +3 -1
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +0 -76
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +1 -3
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +3 -3
- data/third_party/abseil-cpp/absl/base/log_severity.h +4 -4
- data/third_party/abseil-cpp/absl/base/macros.h +47 -109
- data/third_party/abseil-cpp/absl/base/optimization.h +69 -6
- data/third_party/abseil-cpp/absl/base/options.h +31 -4
- data/third_party/abseil-cpp/absl/base/policy_checks.h +1 -1
- data/third_party/abseil-cpp/absl/base/port.h +0 -1
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +95 -40
- data/third_party/abseil-cpp/absl/container/fixed_array.h +532 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +606 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +38 -39
- data/third_party/abseil-cpp/absl/container/internal/common.h +206 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +34 -9
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +460 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +161 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +208 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +274 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +322 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +31 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +50 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +141 -66
- data/third_party/abseil-cpp/absl/container/internal/layout.h +743 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +197 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +61 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1903 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +139 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1949 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +199 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +80 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +108 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +253 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +93 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +147 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +173 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +36 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +101 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1560 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/bind_front.h +184 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +95 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +325 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +349 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +78 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +70 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +1045 -0
- data/third_party/abseil-cpp/absl/hash/internal/wyhash.cc +111 -0
- data/third_party/abseil-cpp/absl/hash/internal/wyhash.h +48 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +4 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +18 -10
- data/third_party/abseil-cpp/absl/numeric/bits.h +177 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +13 -27
- data/third_party/abseil-cpp/absl/numeric/int128.h +16 -15
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +358 -0
- data/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +69 -0
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +396 -0
- data/third_party/abseil-cpp/absl/status/status.cc +452 -0
- data/third_party/abseil-cpp/absl/status/status.h +878 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +38 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/status/statusor.cc +71 -0
- data/third_party/abseil-cpp/absl/status/statusor.h +760 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +7 -7
- data/third_party/abseil-cpp/absl/strings/cord.cc +1953 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1394 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +13 -13
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +8 -8
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +83 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +543 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +146 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.cc +897 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring.h +589 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_rep_ring_reader.h +114 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +236 -136
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +150 -64
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +16 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +29 -21
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +21 -14
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +31 -7
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +147 -135
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +1017 -87
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +17 -3
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +4 -12
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +22 -6
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +27 -11
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +15 -40
- data/third_party/abseil-cpp/absl/strings/internal/string_constant.h +64 -0
- data/third_party/abseil-cpp/absl/strings/match.cc +6 -3
- data/third_party/abseil-cpp/absl/strings/match.h +16 -6
- data/third_party/abseil-cpp/absl/strings/numbers.cc +132 -4
- data/third_party/abseil-cpp/absl/strings/numbers.h +10 -10
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +4 -4
- data/third_party/abseil-cpp/absl/strings/str_cat.h +1 -1
- data/third_party/abseil-cpp/absl/strings/str_format.h +289 -13
- data/third_party/abseil-cpp/absl/strings/str_join.h +1 -1
- data/third_party/abseil-cpp/absl/strings/str_split.cc +2 -2
- data/third_party/abseil-cpp/absl/strings/str_split.h +39 -4
- data/third_party/abseil-cpp/absl/strings/string_view.h +26 -19
- data/third_party/abseil-cpp/absl/strings/substitute.cc +5 -5
- data/third_party/abseil-cpp/absl/strings/substitute.h +32 -29
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/futex.h +154 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +698 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +156 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +428 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2751 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1082 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/time/civil_time.cc +9 -9
- data/third_party/abseil-cpp/absl/time/clock.cc +146 -130
- data/third_party/abseil-cpp/absl/time/clock.h +2 -2
- data/third_party/abseil-cpp/absl/time/duration.cc +93 -61
- data/third_party/abseil-cpp/absl/time/format.cc +43 -36
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +33 -27
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +4 -2
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +136 -29
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +13 -21
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +1 -1
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +136 -129
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +4 -5
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +15 -8
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +2 -2
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +2 -1
- data/third_party/abseil-cpp/absl/time/time.cc +4 -3
- data/third_party/abseil-cpp/absl/time/time.h +41 -40
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/optional.h +9 -9
- data/third_party/abseil-cpp/absl/types/span.h +49 -36
- data/third_party/abseil-cpp/absl/types/variant.h +866 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +2 -2
- data/third_party/address_sorting/include/address_sorting/address_sorting.h +2 -0
- data/third_party/boringssl-with-bazel/err_data.c +763 -721
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bitstr.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_bool.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_enum.c +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_int.c +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_object.c +15 -20
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_octet.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_time.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_type.c +23 -11
- data/third_party/boringssl-with-bazel/src/crypto/asn1/a_utctm.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_lib.c +16 -22
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn1_locl.h +35 -0
- data/third_party/boringssl-with-bazel/src/crypto/asn1/asn_pack.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_enum.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_int.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/f_string.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_dec.c +28 -79
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_enc.c +40 -86
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_fre.c +6 -17
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_new.c +10 -61
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_typ.c +0 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/tasn_utl.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/bio/bio.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/bio/socket_helper.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/blake2/blake2.c +158 -0
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/bn_asn1.c +3 -10
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/ber.c +8 -9
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/cbs.c +60 -45
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/cipher_extra.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_chacha20poly1305.c +6 -81
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/e_tls.c +1 -88
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/internal.h +101 -3
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/tls_cbc.c +120 -273
- data/third_party/boringssl-with-bazel/src/crypto/cpu-aarch64-win.c +41 -0
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm-linux.c +11 -2
- data/third_party/boringssl-with-bazel/src/crypto/cpu-arm.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{dh → dh_extra}/dh_asn1.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh → dh_extra}/params.c +179 -0
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/digest_extra.c +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa.c +9 -43
- data/third_party/boringssl-with-bazel/src/crypto/dsa/dsa_asn1.c +55 -4
- data/third_party/boringssl-with-bazel/src/crypto/{fipsmodule/is_fips.c → dsa/internal.h} +16 -11
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/ec_asn1.c +2 -17
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/hash_to_curve.c +12 -52
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +0 -22
- data/third_party/boringssl-with-bazel/src/crypto/err/err.c +87 -80
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp.c +13 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +159 -0
- data/third_party/boringssl-with-bazel/src/crypto/evp/p_dsa_asn1.c +6 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/mode_wrappers.c +17 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm.c +4 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/bn.c +13 -20
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/div.c +2 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/internal.h +21 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/prime.c +0 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/cipher.c +32 -16
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/e_aes.c +198 -37
- data/third_party/boringssl-with-bazel/src/crypto/{dh → fipsmodule/dh}/check.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/{dh → fipsmodule/dh}/dh.c +136 -213
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digest.c +9 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/digests.c +10 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/md32_common.h +87 -160
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/ec_key.c +9 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/internal.h +2 -5
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p224-64.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-x86_64.c +24 -23
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256.c +20 -16
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/simple_mul.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/util.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/ecdsa.c +104 -93
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +39 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md4/md4.c +52 -65
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/md5/md5.c +52 -66
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cbc.c +33 -22
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/cfb.c +9 -8
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ctr.c +9 -8
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm.c +17 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +1 -22
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/ofb.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/rand.c +122 -43
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/urandom.c +26 -14
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/internal.h +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa.c +56 -34
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/rsa_impl.c +116 -60
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/fips.c +79 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/self_check.c +231 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha1.c +61 -75
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha256.c +80 -103
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/sha512.c +40 -49
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +584 -0
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +65 -0
- data/third_party/boringssl-with-bazel/src/crypto/mem.c +43 -15
- data/third_party/boringssl-with-bazel/src/crypto/obj/obj.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/pkcs7_x509.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +7 -0
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/pkcs8_x509.c +131 -53
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305.c +10 -7
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_arm.c +13 -11
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/poly1305_vec.c +4 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/passive.c +34 -0
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/rand_extra.c +5 -1
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_asn1.c +1 -2
- data/third_party/boringssl-with-bazel/src/crypto/stack/stack.c +7 -13
- data/third_party/boringssl-with-bazel/src/crypto/thread_pthread.c +0 -28
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +110 -70
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/pmbtoken.c +348 -423
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/trust_token.c +217 -79
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/voprf.c +766 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/a_strex.c +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509/algorithm.c +10 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/asn1_gen.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/internal.h +120 -11
- data/third_party/boringssl-with-bazel/src/crypto/x509/rsa_pss.c +5 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_crl.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_req.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/t_x509a.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509.c +0 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_att.c +19 -25
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_cmp.c +24 -39
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_ext.c +27 -21
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_obj.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_req.c +52 -89
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_set.c +67 -12
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_trs.c +9 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_txt.c +67 -67
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_v3.c +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vfy.c +71 -59
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509_vpm.c +53 -73
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509cset.c +98 -25
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509name.c +9 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509/x509rset.c +3 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_algor.c +21 -17
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_all.c +13 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_attrib.c +21 -34
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_crl.c +43 -17
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_name.c +28 -40
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pkey.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_pubkey.c +21 -172
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_req.c +5 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +25 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_val.c +2 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509.c +68 -9
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_x509a.c +5 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/ext_dat.h +1 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/internal.h +12 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/pcy_data.c +5 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_akey.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_alt.c +25 -24
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_bitst.c +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_conf.c +32 -28
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_cpols.c +4 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_enum.c +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_genn.c +42 -22
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_ia5.c +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_info.c +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_lib.c +25 -36
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_prn.c +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_purp.c +127 -41
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_skey.c +8 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_utl.c +11 -14
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +25 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/aes.h +16 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +119 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1.h +746 -561
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +0 -167
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +58 -10
- data/third_party/boringssl-with-bazel/src/include/openssl/bio.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +62 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +23 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/cipher.h +21 -4
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +22 -32
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +25 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/des.h +6 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +62 -20
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +16 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/ec.h +20 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/ecdsa.h +33 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/err.h +3 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +104 -51
- data/third_party/boringssl-with-bazel/src/{crypto/x509/x509_r2x.c → include/openssl/evp_errors.h} +41 -58
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +325 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/obj.h +24 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +3 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/pem.h +202 -134
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +25 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +9 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +5 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +99 -63
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +2 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +467 -125
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +28 -12
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +43 -24
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +1456 -780
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +451 -435
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +595 -441
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +18 -5
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +7 -2
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +1133 -0
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +336 -25
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +97 -53
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +202 -109
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +174 -30
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +504 -162
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +9 -3
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +2 -3
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +14 -19
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +55 -15
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +7 -12
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +8 -9
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +23 -26
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +162 -60
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +2 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +26 -73
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +3 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +6 -5
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +12 -8
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +47 -28
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +1070 -566
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +66 -9
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +183 -76
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +169 -89
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +379 -140
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +4 -2
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +5 -3
- data/third_party/re2/re2/bitmap256.h +117 -0
- data/third_party/re2/re2/bitstate.cc +385 -0
- data/third_party/re2/re2/compile.cc +1279 -0
- data/third_party/re2/re2/dfa.cc +2130 -0
- data/third_party/re2/re2/filtered_re2.cc +121 -0
- data/third_party/re2/re2/filtered_re2.h +109 -0
- data/third_party/re2/re2/mimics_pcre.cc +197 -0
- data/third_party/re2/re2/nfa.cc +713 -0
- data/third_party/re2/re2/onepass.cc +623 -0
- data/third_party/re2/re2/parse.cc +2464 -0
- data/third_party/re2/re2/perl_groups.cc +119 -0
- data/third_party/re2/re2/pod_array.h +55 -0
- data/third_party/re2/re2/prefilter.cc +710 -0
- data/third_party/re2/re2/prefilter.h +108 -0
- data/third_party/re2/re2/prefilter_tree.cc +407 -0
- data/third_party/re2/re2/prefilter_tree.h +139 -0
- data/third_party/re2/re2/prog.cc +988 -0
- data/third_party/re2/re2/prog.h +436 -0
- data/third_party/re2/re2/re2.cc +1362 -0
- data/third_party/re2/re2/re2.h +1002 -0
- data/third_party/re2/re2/regexp.cc +980 -0
- data/third_party/re2/re2/regexp.h +659 -0
- data/third_party/re2/re2/set.cc +154 -0
- data/third_party/re2/re2/set.h +80 -0
- data/third_party/re2/re2/simplify.cc +657 -0
- data/third_party/re2/re2/sparse_array.h +392 -0
- data/third_party/re2/re2/sparse_set.h +264 -0
- data/third_party/re2/re2/stringpiece.cc +65 -0
- data/third_party/re2/re2/stringpiece.h +210 -0
- data/third_party/re2/re2/tostring.cc +351 -0
- data/third_party/re2/re2/unicode_casefold.cc +582 -0
- data/third_party/re2/re2/unicode_casefold.h +78 -0
- data/third_party/re2/re2/unicode_groups.cc +6269 -0
- data/third_party/re2/re2/unicode_groups.h +67 -0
- data/third_party/re2/re2/walker-inl.h +246 -0
- data/third_party/re2/util/benchmark.h +156 -0
- data/third_party/re2/util/flags.h +26 -0
- data/third_party/re2/util/logging.h +109 -0
- data/third_party/re2/util/malloc_counter.h +19 -0
- data/third_party/re2/util/mix.h +41 -0
- data/third_party/re2/util/mutex.h +148 -0
- data/third_party/re2/util/pcre.cc +1025 -0
- data/third_party/re2/util/pcre.h +681 -0
- data/third_party/re2/util/rune.cc +260 -0
- data/third_party/re2/util/strutil.cc +149 -0
- data/third_party/re2/util/strutil.h +21 -0
- data/third_party/re2/util/test.h +50 -0
- data/third_party/re2/util/utf.h +44 -0
- data/third_party/re2/util/util.h +42 -0
- data/third_party/upb/third_party/wyhash/wyhash.h +145 -0
- data/third_party/upb/upb/decode.c +604 -511
- data/third_party/upb/upb/decode.h +20 -1
- data/third_party/upb/upb/decode.int.h +163 -0
- data/third_party/upb/upb/decode_fast.c +1040 -0
- data/third_party/upb/upb/decode_fast.h +126 -0
- data/third_party/upb/upb/def.c +2178 -0
- data/third_party/upb/upb/def.h +315 -0
- data/third_party/upb/upb/def.hpp +439 -0
- data/third_party/upb/upb/encode.c +311 -211
- data/third_party/upb/upb/encode.h +27 -2
- data/third_party/upb/upb/msg.c +215 -70
- data/third_party/upb/upb/msg.h +558 -14
- data/third_party/upb/upb/port_def.inc +105 -63
- data/third_party/upb/upb/port_undef.inc +10 -7
- data/third_party/upb/upb/reflection.c +408 -0
- data/third_party/upb/upb/reflection.h +168 -0
- data/third_party/upb/upb/table.c +73 -269
- data/third_party/upb/upb/table.int.h +25 -57
- data/third_party/upb/upb/text_encode.c +421 -0
- data/third_party/upb/upb/text_encode.h +38 -0
- data/third_party/upb/upb/upb.c +138 -135
- data/third_party/upb/upb/upb.h +119 -146
- data/third_party/upb/upb/upb.hpp +88 -0
- data/third_party/upb/upb/upb.int.h +29 -0
- data/third_party/xxhash/xxhash.h +5325 -0
- metadata +698 -181
- data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +0 -938
- data/src/core/ext/filters/client_channel/lb_policy/xds/lrs.cc +0 -528
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +0 -834
- data/src/core/ext/filters/client_channel/parse_address.h +0 -53
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver.cc +0 -484
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_fallback.cc +0 -68
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +0 -348
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +0 -123
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +0 -1906
- data/src/core/ext/filters/client_channel/xds/xds_api.h +0 -280
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +0 -342
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +0 -88
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +0 -46
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +0 -106
- data/src/core/ext/filters/client_channel/xds/xds_client.h +0 -309
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -21
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +0 -114
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +0 -418
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +0 -72
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +0 -197
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +0 -105
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +0 -378
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -74
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +0 -218
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +0 -69
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +0 -55
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +0 -305
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +0 -403
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +0 -1447
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +0 -328
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.c +0 -35
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +0 -78
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +0 -313
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +0 -897
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +0 -96
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +0 -322
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +0 -72
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +0 -197
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +0 -642
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +0 -172
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +0 -673
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +0 -36
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +0 -80
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +0 -152
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +0 -518
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +0 -89
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -129
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +0 -392
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +0 -91
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +0 -266
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +0 -324
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +0 -92
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +0 -240
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +0 -145
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +0 -527
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +0 -43
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +0 -109
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +0 -399
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -33
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +0 -815
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +0 -3032
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +0 -199
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +0 -59
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +0 -134
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +0 -53
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +0 -228
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +0 -725
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +0 -316
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +0 -1132
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +0 -33
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +0 -65
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +0 -51
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +0 -125
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +0 -50
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +0 -54
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +0 -134
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +0 -144
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +0 -53
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +0 -133
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/type/percent.upb.c +0 -39
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +0 -87
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +0 -50
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +0 -112
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +0 -62
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +0 -89
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +0 -249
- data/src/core/ext/upb-generated/gogoproto/gogo.upb.c +0 -17
- data/src/core/lib/gpr/arena.h +0 -47
- data/src/core/lib/gprpp/map.h +0 -53
- data/src/core/lib/iomgr/iomgr_posix.h +0 -26
- data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +0 -87
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +0 -88
- data/src/core/lib/security/transport/target_authority_table.cc +0 -75
- data/src/core/lib/security/transport/target_authority_table.h +0 -40
- data/src/core/lib/slice/slice_hash_table.h +0 -199
- data/src/core/lib/slice/slice_weak_hash_table.h +0 -102
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +0 -129
- data/third_party/abseil-cpp/absl/base/internal/bits.h +0 -218
- data/third_party/boringssl-with-bazel/src/crypto/x509/vpm_int.h +0 -71
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_pku.c +0 -110
- data/third_party/boringssl-with-bazel/src/crypto/x509v3/v3_sxnet.c +0 -274
- data/third_party/upb/upb/generated_util.h +0 -105
- data/third_party/upb/upb/port.c +0 -26
@@ -0,0 +1,1394 @@
|
|
1
|
+
// Copyright 2020 The Abseil Authors.
|
2
|
+
//
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
// you may not use this file except in compliance with the License.
|
5
|
+
// You may obtain a copy of the License at
|
6
|
+
//
|
7
|
+
// https://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
//
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
// See the License for the specific language governing permissions and
|
13
|
+
// limitations under the License.
|
14
|
+
//
|
15
|
+
// -----------------------------------------------------------------------------
|
16
|
+
// File: cord.h
|
17
|
+
// -----------------------------------------------------------------------------
|
18
|
+
//
|
19
|
+
// This file defines the `absl::Cord` data structure and operations on that data
|
20
|
+
// structure. A Cord is a string-like sequence of characters optimized for
|
21
|
+
// specific use cases. Unlike a `std::string`, which stores an array of
|
22
|
+
// contiguous characters, Cord data is stored in a structure consisting of
|
23
|
+
// separate, reference-counted "chunks." (Currently, this implementation is a
|
24
|
+
// tree structure, though that implementation may change.)
|
25
|
+
//
|
26
|
+
// Because a Cord consists of these chunks, data can be added to or removed from
|
27
|
+
// a Cord during its lifetime. Chunks may also be shared between Cords. Unlike a
|
28
|
+
// `std::string`, a Cord can therefore accommodate data that changes over its
|
29
|
+
// lifetime, though it's not quite "mutable"; it can change only in the
|
30
|
+
// attachment, detachment, or rearrangement of chunks of its constituent data.
|
31
|
+
//
|
32
|
+
// A Cord provides some benefit over `std::string` under the following (albeit
|
33
|
+
// narrow) circumstances:
|
34
|
+
//
|
35
|
+
// * Cord data is designed to grow and shrink over a Cord's lifetime. Cord
|
36
|
+
// provides efficient insertions and deletions at the start and end of the
|
37
|
+
// character sequences, avoiding copies in those cases. Static data should
|
38
|
+
// generally be stored as strings.
|
39
|
+
// * External memory consisting of string-like data can be directly added to
|
40
|
+
// a Cord without requiring copies or allocations.
|
41
|
+
// * Cord data may be shared and copied cheaply. Cord provides a copy-on-write
|
42
|
+
// implementation and cheap sub-Cord operations. Copying a Cord is an O(1)
|
43
|
+
// operation.
|
44
|
+
//
|
45
|
+
// As a consequence to the above, Cord data is generally large. Small data
|
46
|
+
// should generally use strings, as construction of a Cord requires some
|
47
|
+
// overhead. Small Cords (<= 15 bytes) are represented inline, but most small
|
48
|
+
// Cords are expected to grow over their lifetimes.
|
49
|
+
//
|
50
|
+
// Note that because a Cord is made up of separate chunked data, random access
|
51
|
+
// to character data within a Cord is slower than within a `std::string`.
|
52
|
+
//
|
53
|
+
// Thread Safety
|
54
|
+
//
|
55
|
+
// Cord has the same thread-safety properties as many other types like
|
56
|
+
// std::string, std::vector<>, int, etc -- it is thread-compatible. In
|
57
|
+
// particular, if threads do not call non-const methods, then it is safe to call
|
58
|
+
// const methods without synchronization. Copying a Cord produces a new instance
|
59
|
+
// that can be used concurrently with the original in arbitrary ways.
|
60
|
+
|
61
|
+
#ifndef ABSL_STRINGS_CORD_H_
|
62
|
+
#define ABSL_STRINGS_CORD_H_
|
63
|
+
|
64
|
+
#include <algorithm>
|
65
|
+
#include <cstddef>
|
66
|
+
#include <cstdint>
|
67
|
+
#include <cstring>
|
68
|
+
#include <iosfwd>
|
69
|
+
#include <iterator>
|
70
|
+
#include <string>
|
71
|
+
#include <type_traits>
|
72
|
+
|
73
|
+
#include "absl/base/internal/endian.h"
|
74
|
+
#include "absl/base/internal/per_thread_tls.h"
|
75
|
+
#include "absl/base/macros.h"
|
76
|
+
#include "absl/base/port.h"
|
77
|
+
#include "absl/container/inlined_vector.h"
|
78
|
+
#include "absl/functional/function_ref.h"
|
79
|
+
#include "absl/meta/type_traits.h"
|
80
|
+
#include "absl/strings/internal/cord_internal.h"
|
81
|
+
#include "absl/strings/internal/cord_rep_ring.h"
|
82
|
+
#include "absl/strings/internal/cord_rep_ring_reader.h"
|
83
|
+
#include "absl/strings/internal/resize_uninitialized.h"
|
84
|
+
#include "absl/strings/internal/string_constant.h"
|
85
|
+
#include "absl/strings/string_view.h"
|
86
|
+
#include "absl/types/optional.h"
|
87
|
+
|
88
|
+
namespace absl {
|
89
|
+
ABSL_NAMESPACE_BEGIN
|
90
|
+
class Cord;
|
91
|
+
class CordTestPeer;
|
92
|
+
template <typename Releaser>
|
93
|
+
Cord MakeCordFromExternal(absl::string_view, Releaser&&);
|
94
|
+
void CopyCordToString(const Cord& src, std::string* dst);
|
95
|
+
|
96
|
+
// Cord
|
97
|
+
//
|
98
|
+
// A Cord is a sequence of characters, designed to be more efficient than a
|
99
|
+
// `std::string` in certain circumstances: namely, large string data that needs
|
100
|
+
// to change over its lifetime or shared, especially when such data is shared
|
101
|
+
// across API boundaries.
|
102
|
+
//
|
103
|
+
// A Cord stores its character data in a structure that allows efficient prepend
|
104
|
+
// and append operations. This makes a Cord useful for large string data sent
|
105
|
+
// over in a wire format that may need to be prepended or appended at some point
|
106
|
+
// during the data exchange (e.g. HTTP, protocol buffers). For example, a
|
107
|
+
// Cord is useful for storing an HTTP request, and prepending an HTTP header to
|
108
|
+
// such a request.
|
109
|
+
//
|
110
|
+
// Cords should not be used for storing general string data, however. They
|
111
|
+
// require overhead to construct and are slower than strings for random access.
|
112
|
+
//
|
113
|
+
// The Cord API provides the following common API operations:
|
114
|
+
//
|
115
|
+
// * Create or assign Cords out of existing string data, memory, or other Cords
|
116
|
+
// * Append and prepend data to an existing Cord
|
117
|
+
// * Create new Sub-Cords from existing Cord data
|
118
|
+
// * Swap Cord data and compare Cord equality
|
119
|
+
// * Write out Cord data by constructing a `std::string`
|
120
|
+
//
|
121
|
+
// Additionally, the API provides iterator utilities to iterate through Cord
|
122
|
+
// data via chunks or character bytes.
|
123
|
+
//
|
124
|
+
class Cord {
|
125
|
+
private:
|
126
|
+
template <typename T>
|
127
|
+
using EnableIfString =
|
128
|
+
absl::enable_if_t<std::is_same<T, std::string>::value, int>;
|
129
|
+
|
130
|
+
public:
|
131
|
+
// Cord::Cord() Constructors.
|
132
|
+
|
133
|
+
// Creates an empty Cord.
|
134
|
+
constexpr Cord() noexcept;
|
135
|
+
|
136
|
+
// Creates a Cord from an existing Cord. Cord is copyable and efficiently
|
137
|
+
// movable. The moved-from state is valid but unspecified.
|
138
|
+
Cord(const Cord& src);
|
139
|
+
Cord(Cord&& src) noexcept;
|
140
|
+
Cord& operator=(const Cord& x);
|
141
|
+
Cord& operator=(Cord&& x) noexcept;
|
142
|
+
|
143
|
+
// Creates a Cord from a `src` string. This constructor is marked explicit to
|
144
|
+
// prevent implicit Cord constructions from arguments convertible to an
|
145
|
+
// `absl::string_view`.
|
146
|
+
explicit Cord(absl::string_view src);
|
147
|
+
Cord& operator=(absl::string_view src);
|
148
|
+
|
149
|
+
// Creates a Cord from a `std::string&&` rvalue. These constructors are
|
150
|
+
// templated to avoid ambiguities for types that are convertible to both
|
151
|
+
// `absl::string_view` and `std::string`, such as `const char*`.
|
152
|
+
template <typename T, EnableIfString<T> = 0>
|
153
|
+
explicit Cord(T&& src);
|
154
|
+
template <typename T, EnableIfString<T> = 0>
|
155
|
+
Cord& operator=(T&& src);
|
156
|
+
|
157
|
+
// Cord::~Cord()
|
158
|
+
//
|
159
|
+
// Destructs the Cord.
|
160
|
+
~Cord() {
|
161
|
+
if (contents_.is_tree()) DestroyCordSlow();
|
162
|
+
}
|
163
|
+
|
164
|
+
// MakeCordFromExternal()
|
165
|
+
//
|
166
|
+
// Creates a Cord that takes ownership of external string memory. The
|
167
|
+
// contents of `data` are not copied to the Cord; instead, the external
|
168
|
+
// memory is added to the Cord and reference-counted. This data may not be
|
169
|
+
// changed for the life of the Cord, though it may be prepended or appended
|
170
|
+
// to.
|
171
|
+
//
|
172
|
+
// `MakeCordFromExternal()` takes a callable "releaser" that is invoked when
|
173
|
+
// the reference count for `data` reaches zero. As noted above, this data must
|
174
|
+
// remain live until the releaser is invoked. The callable releaser also must:
|
175
|
+
//
|
176
|
+
// * be move constructible
|
177
|
+
// * support `void operator()(absl::string_view) const` or `void operator()`
|
178
|
+
//
|
179
|
+
// Example:
|
180
|
+
//
|
181
|
+
// Cord MakeCord(BlockPool* pool) {
|
182
|
+
// Block* block = pool->NewBlock();
|
183
|
+
// FillBlock(block);
|
184
|
+
// return absl::MakeCordFromExternal(
|
185
|
+
// block->ToStringView(),
|
186
|
+
// [pool, block](absl::string_view v) {
|
187
|
+
// pool->FreeBlock(block, v);
|
188
|
+
// });
|
189
|
+
// }
|
190
|
+
//
|
191
|
+
// WARNING: Because a Cord can be reference-counted, it's likely a bug if your
|
192
|
+
// releaser doesn't do anything. For example, consider the following:
|
193
|
+
//
|
194
|
+
// void Foo(const char* buffer, int len) {
|
195
|
+
// auto c = absl::MakeCordFromExternal(absl::string_view(buffer, len),
|
196
|
+
// [](absl::string_view) {});
|
197
|
+
//
|
198
|
+
// // BUG: If Bar() copies its cord for any reason, including keeping a
|
199
|
+
// // substring of it, the lifetime of buffer might be extended beyond
|
200
|
+
// // when Foo() returns.
|
201
|
+
// Bar(c);
|
202
|
+
// }
|
203
|
+
template <typename Releaser>
|
204
|
+
friend Cord MakeCordFromExternal(absl::string_view data, Releaser&& releaser);
|
205
|
+
|
206
|
+
// Cord::Clear()
|
207
|
+
//
|
208
|
+
// Releases the Cord data. Any nodes that share data with other Cords, if
|
209
|
+
// applicable, will have their reference counts reduced by 1.
|
210
|
+
void Clear();
|
211
|
+
|
212
|
+
// Cord::Append()
|
213
|
+
//
|
214
|
+
// Appends data to the Cord, which may come from another Cord or other string
|
215
|
+
// data.
|
216
|
+
void Append(const Cord& src);
|
217
|
+
void Append(Cord&& src);
|
218
|
+
void Append(absl::string_view src);
|
219
|
+
template <typename T, EnableIfString<T> = 0>
|
220
|
+
void Append(T&& src);
|
221
|
+
|
222
|
+
// Cord::Prepend()
|
223
|
+
//
|
224
|
+
// Prepends data to the Cord, which may come from another Cord or other string
|
225
|
+
// data.
|
226
|
+
void Prepend(const Cord& src);
|
227
|
+
void Prepend(absl::string_view src);
|
228
|
+
template <typename T, EnableIfString<T> = 0>
|
229
|
+
void Prepend(T&& src);
|
230
|
+
|
231
|
+
// Cord::RemovePrefix()
|
232
|
+
//
|
233
|
+
// Removes the first `n` bytes of a Cord.
|
234
|
+
void RemovePrefix(size_t n);
|
235
|
+
void RemoveSuffix(size_t n);
|
236
|
+
|
237
|
+
// Cord::Subcord()
|
238
|
+
//
|
239
|
+
// Returns a new Cord representing the subrange [pos, pos + new_size) of
|
240
|
+
// *this. If pos >= size(), the result is empty(). If
|
241
|
+
// (pos + new_size) >= size(), the result is the subrange [pos, size()).
|
242
|
+
Cord Subcord(size_t pos, size_t new_size) const;
|
243
|
+
|
244
|
+
// Cord::swap()
|
245
|
+
//
|
246
|
+
// Swaps the contents of the Cord with `other`.
|
247
|
+
void swap(Cord& other) noexcept;
|
248
|
+
|
249
|
+
// swap()
|
250
|
+
//
|
251
|
+
// Swaps the contents of two Cords.
|
252
|
+
friend void swap(Cord& x, Cord& y) noexcept {
|
253
|
+
x.swap(y);
|
254
|
+
}
|
255
|
+
|
256
|
+
// Cord::size()
|
257
|
+
//
|
258
|
+
// Returns the size of the Cord.
|
259
|
+
size_t size() const;
|
260
|
+
|
261
|
+
// Cord::empty()
|
262
|
+
//
|
263
|
+
// Determines whether the given Cord is empty, returning `true` is so.
|
264
|
+
bool empty() const;
|
265
|
+
|
266
|
+
// Cord::EstimatedMemoryUsage()
|
267
|
+
//
|
268
|
+
// Returns the *approximate* number of bytes held in full or in part by this
|
269
|
+
// Cord (which may not remain the same between invocations). Note that Cords
|
270
|
+
// that share memory could each be "charged" independently for the same shared
|
271
|
+
// memory.
|
272
|
+
size_t EstimatedMemoryUsage() const;
|
273
|
+
|
274
|
+
// Cord::Compare()
|
275
|
+
//
|
276
|
+
// Compares 'this' Cord with rhs. This function and its relatives treat Cords
|
277
|
+
// as sequences of unsigned bytes. The comparison is a straightforward
|
278
|
+
// lexicographic comparison. `Cord::Compare()` returns values as follows:
|
279
|
+
//
|
280
|
+
// -1 'this' Cord is smaller
|
281
|
+
// 0 two Cords are equal
|
282
|
+
// 1 'this' Cord is larger
|
283
|
+
int Compare(absl::string_view rhs) const;
|
284
|
+
int Compare(const Cord& rhs) const;
|
285
|
+
|
286
|
+
// Cord::StartsWith()
|
287
|
+
//
|
288
|
+
// Determines whether the Cord starts with the passed string data `rhs`.
|
289
|
+
bool StartsWith(const Cord& rhs) const;
|
290
|
+
bool StartsWith(absl::string_view rhs) const;
|
291
|
+
|
292
|
+
// Cord::EndsWith()
|
293
|
+
//
|
294
|
+
// Determines whether the Cord ends with the passed string data `rhs`.
|
295
|
+
bool EndsWith(absl::string_view rhs) const;
|
296
|
+
bool EndsWith(const Cord& rhs) const;
|
297
|
+
|
298
|
+
// Cord::operator std::string()
|
299
|
+
//
|
300
|
+
// Converts a Cord into a `std::string()`. This operator is marked explicit to
|
301
|
+
// prevent unintended Cord usage in functions that take a string.
|
302
|
+
explicit operator std::string() const;
|
303
|
+
|
304
|
+
// CopyCordToString()
|
305
|
+
//
|
306
|
+
// Copies the contents of a `src` Cord into a `*dst` string.
|
307
|
+
//
|
308
|
+
// This function optimizes the case of reusing the destination string since it
|
309
|
+
// can reuse previously allocated capacity. However, this function does not
|
310
|
+
// guarantee that pointers previously returned by `dst->data()` remain valid
|
311
|
+
// even if `*dst` had enough capacity to hold `src`. If `*dst` is a new
|
312
|
+
// object, prefer to simply use the conversion operator to `std::string`.
|
313
|
+
friend void CopyCordToString(const Cord& src, std::string* dst);
|
314
|
+
|
315
|
+
class CharIterator;
|
316
|
+
|
317
|
+
//----------------------------------------------------------------------------
|
318
|
+
// Cord::ChunkIterator
|
319
|
+
//----------------------------------------------------------------------------
|
320
|
+
//
|
321
|
+
// A `Cord::ChunkIterator` allows iteration over the constituent chunks of its
|
322
|
+
// Cord. Such iteration allows you to perform non-const operatons on the data
|
323
|
+
// of a Cord without modifying it.
|
324
|
+
//
|
325
|
+
// Generally, you do not instantiate a `Cord::ChunkIterator` directly;
|
326
|
+
// instead, you create one implicitly through use of the `Cord::Chunks()`
|
327
|
+
// member function.
|
328
|
+
//
|
329
|
+
// The `Cord::ChunkIterator` has the following properties:
|
330
|
+
//
|
331
|
+
// * The iterator is invalidated after any non-const operation on the
|
332
|
+
// Cord object over which it iterates.
|
333
|
+
// * The `string_view` returned by dereferencing a valid, non-`end()`
|
334
|
+
// iterator is guaranteed to be non-empty.
|
335
|
+
// * Two `ChunkIterator` objects can be compared equal if and only if they
|
336
|
+
// remain valid and iterate over the same Cord.
|
337
|
+
// * The iterator in this case is a proxy iterator; the `string_view`
|
338
|
+
// returned by the iterator does not live inside the Cord, and its
|
339
|
+
// lifetime is limited to the lifetime of the iterator itself. To help
|
340
|
+
// prevent lifetime issues, `ChunkIterator::reference` is not a true
|
341
|
+
// reference type and is equivalent to `value_type`.
|
342
|
+
// * The iterator keeps state that can grow for Cords that contain many
|
343
|
+
// nodes and are imbalanced due to sharing. Prefer to pass this type by
|
344
|
+
// const reference instead of by value.
|
345
|
+
class ChunkIterator {
|
346
|
+
public:
|
347
|
+
using iterator_category = std::input_iterator_tag;
|
348
|
+
using value_type = absl::string_view;
|
349
|
+
using difference_type = ptrdiff_t;
|
350
|
+
using pointer = const value_type*;
|
351
|
+
using reference = value_type;
|
352
|
+
|
353
|
+
ChunkIterator() = default;
|
354
|
+
|
355
|
+
ChunkIterator& operator++();
|
356
|
+
ChunkIterator operator++(int);
|
357
|
+
bool operator==(const ChunkIterator& other) const;
|
358
|
+
bool operator!=(const ChunkIterator& other) const;
|
359
|
+
reference operator*() const;
|
360
|
+
pointer operator->() const;
|
361
|
+
|
362
|
+
friend class Cord;
|
363
|
+
friend class CharIterator;
|
364
|
+
|
365
|
+
private:
|
366
|
+
using CordRep = absl::cord_internal::CordRep;
|
367
|
+
using CordRepRing = absl::cord_internal::CordRepRing;
|
368
|
+
using CordRepRingReader = absl::cord_internal::CordRepRingReader;
|
369
|
+
|
370
|
+
// Stack of right children of concat nodes that we have to visit.
|
371
|
+
// Keep this at the end of the structure to avoid cache-thrashing.
|
372
|
+
// TODO(jgm): Benchmark to see if there's a more optimal value than 47 for
|
373
|
+
// the inlined vector size (47 exists for backward compatibility).
|
374
|
+
using Stack = absl::InlinedVector<absl::cord_internal::CordRep*, 47>;
|
375
|
+
|
376
|
+
// Constructs a `begin()` iterator from `tree`. `tree` must not be null.
|
377
|
+
explicit ChunkIterator(cord_internal::CordRep* tree);
|
378
|
+
|
379
|
+
// Constructs a `begin()` iterator from `cord`.
|
380
|
+
explicit ChunkIterator(const Cord* cord);
|
381
|
+
|
382
|
+
// Initializes this instance from a tree. Invoked by constructors.
|
383
|
+
void InitTree(cord_internal::CordRep* tree);
|
384
|
+
|
385
|
+
// Removes `n` bytes from `current_chunk_`. Expects `n` to be smaller than
|
386
|
+
// `current_chunk_.size()`.
|
387
|
+
void RemoveChunkPrefix(size_t n);
|
388
|
+
Cord AdvanceAndReadBytes(size_t n);
|
389
|
+
void AdvanceBytes(size_t n);
|
390
|
+
|
391
|
+
// Stack specific operator++
|
392
|
+
ChunkIterator& AdvanceStack();
|
393
|
+
|
394
|
+
// Ring buffer specific operator++
|
395
|
+
ChunkIterator& AdvanceRing();
|
396
|
+
void AdvanceBytesRing(size_t n);
|
397
|
+
|
398
|
+
// Iterates `n` bytes, where `n` is expected to be greater than or equal to
|
399
|
+
// `current_chunk_.size()`.
|
400
|
+
void AdvanceBytesSlowPath(size_t n);
|
401
|
+
|
402
|
+
// A view into bytes of the current `CordRep`. It may only be a view to a
|
403
|
+
// suffix of bytes if this is being used by `CharIterator`.
|
404
|
+
absl::string_view current_chunk_;
|
405
|
+
// The current leaf, or `nullptr` if the iterator points to short data.
|
406
|
+
// If the current chunk is a substring node, current_leaf_ points to the
|
407
|
+
// underlying flat or external node.
|
408
|
+
absl::cord_internal::CordRep* current_leaf_ = nullptr;
|
409
|
+
// The number of bytes left in the `Cord` over which we are iterating.
|
410
|
+
size_t bytes_remaining_ = 0;
|
411
|
+
|
412
|
+
// Cord reader for ring buffers. Empty if not traversing a ring buffer.
|
413
|
+
CordRepRingReader ring_reader_;
|
414
|
+
|
415
|
+
// See 'Stack' alias definition.
|
416
|
+
Stack stack_of_right_children_;
|
417
|
+
};
|
418
|
+
|
419
|
+
// Cord::ChunkIterator::chunk_begin()
|
420
|
+
//
|
421
|
+
// Returns an iterator to the first chunk of the `Cord`.
|
422
|
+
//
|
423
|
+
// Generally, prefer using `Cord::Chunks()` within a range-based for loop for
|
424
|
+
// iterating over the chunks of a Cord. This method may be useful for getting
|
425
|
+
// a `ChunkIterator` where range-based for-loops are not useful.
|
426
|
+
//
|
427
|
+
// Example:
|
428
|
+
//
|
429
|
+
// absl::Cord::ChunkIterator FindAsChunk(const absl::Cord& c,
|
430
|
+
// absl::string_view s) {
|
431
|
+
// return std::find(c.chunk_begin(), c.chunk_end(), s);
|
432
|
+
// }
|
433
|
+
ChunkIterator chunk_begin() const;
|
434
|
+
|
435
|
+
// Cord::ChunkItertator::chunk_end()
|
436
|
+
//
|
437
|
+
// Returns an iterator one increment past the last chunk of the `Cord`.
|
438
|
+
//
|
439
|
+
// Generally, prefer using `Cord::Chunks()` within a range-based for loop for
|
440
|
+
// iterating over the chunks of a Cord. This method may be useful for getting
|
441
|
+
// a `ChunkIterator` where range-based for-loops may not be available.
|
442
|
+
ChunkIterator chunk_end() const;
|
443
|
+
|
444
|
+
//----------------------------------------------------------------------------
|
445
|
+
// Cord::ChunkIterator::ChunkRange
|
446
|
+
//----------------------------------------------------------------------------
|
447
|
+
//
|
448
|
+
// `ChunkRange` is a helper class for iterating over the chunks of the `Cord`,
|
449
|
+
// producing an iterator which can be used within a range-based for loop.
|
450
|
+
// Construction of a `ChunkRange` will return an iterator pointing to the
|
451
|
+
// first chunk of the Cord. Generally, do not construct a `ChunkRange`
|
452
|
+
// directly; instead, prefer to use the `Cord::Chunks()` method.
|
453
|
+
//
|
454
|
+
// Implementation note: `ChunkRange` is simply a convenience wrapper over
|
455
|
+
// `Cord::chunk_begin()` and `Cord::chunk_end()`.
|
456
|
+
class ChunkRange {
|
457
|
+
public:
|
458
|
+
explicit ChunkRange(const Cord* cord) : cord_(cord) {}
|
459
|
+
|
460
|
+
ChunkIterator begin() const;
|
461
|
+
ChunkIterator end() const;
|
462
|
+
|
463
|
+
private:
|
464
|
+
const Cord* cord_;
|
465
|
+
};
|
466
|
+
|
467
|
+
// Cord::Chunks()
|
468
|
+
//
|
469
|
+
// Returns a `Cord::ChunkIterator::ChunkRange` for iterating over the chunks
|
470
|
+
// of a `Cord` with a range-based for-loop. For most iteration tasks on a
|
471
|
+
// Cord, use `Cord::Chunks()` to retrieve this iterator.
|
472
|
+
//
|
473
|
+
// Example:
|
474
|
+
//
|
475
|
+
// void ProcessChunks(const Cord& cord) {
|
476
|
+
// for (absl::string_view chunk : cord.Chunks()) { ... }
|
477
|
+
// }
|
478
|
+
//
|
479
|
+
// Note that the ordinary caveats of temporary lifetime extension apply:
|
480
|
+
//
|
481
|
+
// void Process() {
|
482
|
+
// for (absl::string_view chunk : CordFactory().Chunks()) {
|
483
|
+
// // The temporary Cord returned by CordFactory has been destroyed!
|
484
|
+
// }
|
485
|
+
// }
|
486
|
+
ChunkRange Chunks() const;
|
487
|
+
|
488
|
+
//----------------------------------------------------------------------------
|
489
|
+
// Cord::CharIterator
|
490
|
+
//----------------------------------------------------------------------------
|
491
|
+
//
|
492
|
+
// A `Cord::CharIterator` allows iteration over the constituent characters of
|
493
|
+
// a `Cord`.
|
494
|
+
//
|
495
|
+
// Generally, you do not instantiate a `Cord::CharIterator` directly; instead,
|
496
|
+
// you create one implicitly through use of the `Cord::Chars()` member
|
497
|
+
// function.
|
498
|
+
//
|
499
|
+
// A `Cord::CharIterator` has the following properties:
|
500
|
+
//
|
501
|
+
// * The iterator is invalidated after any non-const operation on the
|
502
|
+
// Cord object over which it iterates.
|
503
|
+
// * Two `CharIterator` objects can be compared equal if and only if they
|
504
|
+
// remain valid and iterate over the same Cord.
|
505
|
+
// * The iterator keeps state that can grow for Cords that contain many
|
506
|
+
// nodes and are imbalanced due to sharing. Prefer to pass this type by
|
507
|
+
// const reference instead of by value.
|
508
|
+
// * This type cannot act as a forward iterator because a `Cord` can reuse
|
509
|
+
// sections of memory. This fact violates the requirement for forward
|
510
|
+
// iterators to compare equal if dereferencing them returns the same
|
511
|
+
// object.
|
512
|
+
class CharIterator {
|
513
|
+
public:
|
514
|
+
using iterator_category = std::input_iterator_tag;
|
515
|
+
using value_type = char;
|
516
|
+
using difference_type = ptrdiff_t;
|
517
|
+
using pointer = const char*;
|
518
|
+
using reference = const char&;
|
519
|
+
|
520
|
+
CharIterator() = default;
|
521
|
+
|
522
|
+
CharIterator& operator++();
|
523
|
+
CharIterator operator++(int);
|
524
|
+
bool operator==(const CharIterator& other) const;
|
525
|
+
bool operator!=(const CharIterator& other) const;
|
526
|
+
reference operator*() const;
|
527
|
+
pointer operator->() const;
|
528
|
+
|
529
|
+
friend Cord;
|
530
|
+
|
531
|
+
private:
|
532
|
+
explicit CharIterator(const Cord* cord) : chunk_iterator_(cord) {}
|
533
|
+
|
534
|
+
ChunkIterator chunk_iterator_;
|
535
|
+
};
|
536
|
+
|
537
|
+
// Cord::CharIterator::AdvanceAndRead()
|
538
|
+
//
|
539
|
+
// Advances the `Cord::CharIterator` by `n_bytes` and returns the bytes
|
540
|
+
// advanced as a separate `Cord`. `n_bytes` must be less than or equal to the
|
541
|
+
// number of bytes within the Cord; otherwise, behavior is undefined. It is
|
542
|
+
// valid to pass `char_end()` and `0`.
|
543
|
+
static Cord AdvanceAndRead(CharIterator* it, size_t n_bytes);
|
544
|
+
|
545
|
+
// Cord::CharIterator::Advance()
|
546
|
+
//
|
547
|
+
// Advances the `Cord::CharIterator` by `n_bytes`. `n_bytes` must be less than
|
548
|
+
// or equal to the number of bytes remaining within the Cord; otherwise,
|
549
|
+
// behavior is undefined. It is valid to pass `char_end()` and `0`.
|
550
|
+
static void Advance(CharIterator* it, size_t n_bytes);
|
551
|
+
|
552
|
+
// Cord::CharIterator::ChunkRemaining()
|
553
|
+
//
|
554
|
+
// Returns the longest contiguous view starting at the iterator's position.
|
555
|
+
//
|
556
|
+
// `it` must be dereferenceable.
|
557
|
+
static absl::string_view ChunkRemaining(const CharIterator& it);
|
558
|
+
|
559
|
+
// Cord::CharIterator::char_begin()
|
560
|
+
//
|
561
|
+
// Returns an iterator to the first character of the `Cord`.
|
562
|
+
//
|
563
|
+
// Generally, prefer using `Cord::Chars()` within a range-based for loop for
|
564
|
+
// iterating over the chunks of a Cord. This method may be useful for getting
|
565
|
+
// a `CharIterator` where range-based for-loops may not be available.
|
566
|
+
CharIterator char_begin() const;
|
567
|
+
|
568
|
+
// Cord::CharIterator::char_end()
|
569
|
+
//
|
570
|
+
// Returns an iterator to one past the last character of the `Cord`.
|
571
|
+
//
|
572
|
+
// Generally, prefer using `Cord::Chars()` within a range-based for loop for
|
573
|
+
// iterating over the chunks of a Cord. This method may be useful for getting
|
574
|
+
// a `CharIterator` where range-based for-loops are not useful.
|
575
|
+
CharIterator char_end() const;
|
576
|
+
|
577
|
+
// Cord::CharIterator::CharRange
|
578
|
+
//
|
579
|
+
// `CharRange` is a helper class for iterating over the characters of a
|
580
|
+
// producing an iterator which can be used within a range-based for loop.
|
581
|
+
// Construction of a `CharRange` will return an iterator pointing to the first
|
582
|
+
// character of the Cord. Generally, do not construct a `CharRange` directly;
|
583
|
+
// instead, prefer to use the `Cord::Chars()` method show below.
|
584
|
+
//
|
585
|
+
// Implementation note: `CharRange` is simply a convenience wrapper over
|
586
|
+
// `Cord::char_begin()` and `Cord::char_end()`.
|
587
|
+
class CharRange {
|
588
|
+
public:
|
589
|
+
explicit CharRange(const Cord* cord) : cord_(cord) {}
|
590
|
+
|
591
|
+
CharIterator begin() const;
|
592
|
+
CharIterator end() const;
|
593
|
+
|
594
|
+
private:
|
595
|
+
const Cord* cord_;
|
596
|
+
};
|
597
|
+
|
598
|
+
// Cord::CharIterator::Chars()
|
599
|
+
//
|
600
|
+
// Returns a `Cord::CharIterator` for iterating over the characters of a
|
601
|
+
// `Cord` with a range-based for-loop. For most character-based iteration
|
602
|
+
// tasks on a Cord, use `Cord::Chars()` to retrieve this iterator.
|
603
|
+
//
|
604
|
+
// Example:
|
605
|
+
//
|
606
|
+
// void ProcessCord(const Cord& cord) {
|
607
|
+
// for (char c : cord.Chars()) { ... }
|
608
|
+
// }
|
609
|
+
//
|
610
|
+
// Note that the ordinary caveats of temporary lifetime extension apply:
|
611
|
+
//
|
612
|
+
// void Process() {
|
613
|
+
// for (char c : CordFactory().Chars()) {
|
614
|
+
// // The temporary Cord returned by CordFactory has been destroyed!
|
615
|
+
// }
|
616
|
+
// }
|
617
|
+
CharRange Chars() const;
|
618
|
+
|
619
|
+
// Cord::operator[]
|
620
|
+
//
|
621
|
+
// Gets the "i"th character of the Cord and returns it, provided that
|
622
|
+
// 0 <= i < Cord.size().
|
623
|
+
//
|
624
|
+
// NOTE: This routine is reasonably efficient. It is roughly
|
625
|
+
// logarithmic based on the number of chunks that make up the cord. Still,
|
626
|
+
// if you need to iterate over the contents of a cord, you should
|
627
|
+
// use a CharIterator/ChunkIterator rather than call operator[] or Get()
|
628
|
+
// repeatedly in a loop.
|
629
|
+
char operator[](size_t i) const;
|
630
|
+
|
631
|
+
// Cord::TryFlat()
|
632
|
+
//
|
633
|
+
// If this cord's representation is a single flat array, returns a
|
634
|
+
// string_view referencing that array. Otherwise returns nullopt.
|
635
|
+
absl::optional<absl::string_view> TryFlat() const;
|
636
|
+
|
637
|
+
// Cord::Flatten()
|
638
|
+
//
|
639
|
+
// Flattens the cord into a single array and returns a view of the data.
|
640
|
+
//
|
641
|
+
// If the cord was already flat, the contents are not modified.
|
642
|
+
absl::string_view Flatten();
|
643
|
+
|
644
|
+
// Supports absl::Cord as a sink object for absl::Format().
|
645
|
+
friend void AbslFormatFlush(absl::Cord* cord, absl::string_view part) {
|
646
|
+
cord->Append(part);
|
647
|
+
}
|
648
|
+
|
649
|
+
template <typename H>
|
650
|
+
friend H AbslHashValue(H hash_state, const absl::Cord& c) {
|
651
|
+
absl::optional<absl::string_view> maybe_flat = c.TryFlat();
|
652
|
+
if (maybe_flat.has_value()) {
|
653
|
+
return H::combine(std::move(hash_state), *maybe_flat);
|
654
|
+
}
|
655
|
+
return c.HashFragmented(std::move(hash_state));
|
656
|
+
}
|
657
|
+
|
658
|
+
// Create a Cord with the contents of StringConstant<T>::value.
|
659
|
+
// No allocations will be done and no data will be copied.
|
660
|
+
// This is an INTERNAL API and subject to change or removal. This API can only
|
661
|
+
// be used by spelling absl::strings_internal::MakeStringConstant, which is
|
662
|
+
// also an internal API.
|
663
|
+
template <typename T>
|
664
|
+
explicit constexpr Cord(strings_internal::StringConstant<T>);
|
665
|
+
|
666
|
+
private:
|
667
|
+
friend class CordTestPeer;
|
668
|
+
friend bool operator==(const Cord& lhs, const Cord& rhs);
|
669
|
+
friend bool operator==(const Cord& lhs, absl::string_view rhs);
|
670
|
+
|
671
|
+
// Calls the provided function once for each cord chunk, in order. Unlike
|
672
|
+
// Chunks(), this API will not allocate memory.
|
673
|
+
void ForEachChunk(absl::FunctionRef<void(absl::string_view)>) const;
|
674
|
+
|
675
|
+
// Allocates new contiguous storage for the contents of the cord. This is
|
676
|
+
// called by Flatten() when the cord was not already flat.
|
677
|
+
absl::string_view FlattenSlowPath();
|
678
|
+
|
679
|
+
// Actual cord contents are hidden inside the following simple
|
680
|
+
// class so that we can isolate the bulk of cord.cc from changes
|
681
|
+
// to the representation.
|
682
|
+
//
|
683
|
+
// InlineRep holds either a tree pointer, or an array of kMaxInline bytes.
|
684
|
+
class InlineRep {
|
685
|
+
public:
|
686
|
+
static constexpr unsigned char kMaxInline = cord_internal::kMaxInline;
|
687
|
+
static_assert(kMaxInline >= sizeof(absl::cord_internal::CordRep*), "");
|
688
|
+
|
689
|
+
constexpr InlineRep() : data_() {}
|
690
|
+
InlineRep(const InlineRep& src);
|
691
|
+
InlineRep(InlineRep&& src);
|
692
|
+
InlineRep& operator=(const InlineRep& src);
|
693
|
+
InlineRep& operator=(InlineRep&& src) noexcept;
|
694
|
+
|
695
|
+
explicit constexpr InlineRep(cord_internal::InlineData data);
|
696
|
+
|
697
|
+
void Swap(InlineRep* rhs);
|
698
|
+
bool empty() const;
|
699
|
+
size_t size() const;
|
700
|
+
const char* data() const; // Returns nullptr if holding pointer
|
701
|
+
void set_data(const char* data, size_t n,
|
702
|
+
bool nullify_tail); // Discards pointer, if any
|
703
|
+
char* set_data(size_t n); // Write data to the result
|
704
|
+
// Returns nullptr if holding bytes
|
705
|
+
absl::cord_internal::CordRep* tree() const;
|
706
|
+
absl::cord_internal::CordRep* as_tree() const;
|
707
|
+
// Discards old pointer, if any
|
708
|
+
void set_tree(absl::cord_internal::CordRep* rep);
|
709
|
+
// Replaces a tree with a new root. This is faster than set_tree, but it
|
710
|
+
// should only be used when it's clear that the old rep was a tree.
|
711
|
+
void replace_tree(absl::cord_internal::CordRep* rep);
|
712
|
+
// Returns non-null iff was holding a pointer
|
713
|
+
absl::cord_internal::CordRep* clear();
|
714
|
+
// Converts to pointer if necessary.
|
715
|
+
absl::cord_internal::CordRep* force_tree(size_t extra_hint);
|
716
|
+
void reduce_size(size_t n); // REQUIRES: holding data
|
717
|
+
void remove_prefix(size_t n); // REQUIRES: holding data
|
718
|
+
void AppendArray(const char* src_data, size_t src_size);
|
719
|
+
absl::string_view FindFlatStartPiece() const;
|
720
|
+
void AppendTree(absl::cord_internal::CordRep* tree);
|
721
|
+
void PrependTree(absl::cord_internal::CordRep* tree);
|
722
|
+
void GetAppendRegion(char** region, size_t* size, size_t max_length);
|
723
|
+
void GetAppendRegion(char** region, size_t* size);
|
724
|
+
bool IsSame(const InlineRep& other) const {
|
725
|
+
return memcmp(&data_, &other.data_, sizeof(data_)) == 0;
|
726
|
+
}
|
727
|
+
int BitwiseCompare(const InlineRep& other) const {
|
728
|
+
uint64_t x, y;
|
729
|
+
// Use memcpy to avoid aliasing issues.
|
730
|
+
memcpy(&x, &data_, sizeof(x));
|
731
|
+
memcpy(&y, &other.data_, sizeof(y));
|
732
|
+
if (x == y) {
|
733
|
+
memcpy(&x, reinterpret_cast<const char*>(&data_) + 8, sizeof(x));
|
734
|
+
memcpy(&y, reinterpret_cast<const char*>(&other.data_) + 8, sizeof(y));
|
735
|
+
if (x == y) return 0;
|
736
|
+
}
|
737
|
+
return absl::big_endian::FromHost64(x) < absl::big_endian::FromHost64(y)
|
738
|
+
? -1
|
739
|
+
: 1;
|
740
|
+
}
|
741
|
+
void CopyTo(std::string* dst) const {
|
742
|
+
// memcpy is much faster when operating on a known size. On most supported
|
743
|
+
// platforms, the small string optimization is large enough that resizing
|
744
|
+
// to 15 bytes does not cause a memory allocation.
|
745
|
+
absl::strings_internal::STLStringResizeUninitialized(dst,
|
746
|
+
sizeof(data_) - 1);
|
747
|
+
memcpy(&(*dst)[0], &data_, sizeof(data_) - 1);
|
748
|
+
// erase is faster than resize because the logic for memory allocation is
|
749
|
+
// not needed.
|
750
|
+
dst->erase(inline_size());
|
751
|
+
}
|
752
|
+
|
753
|
+
// Copies the inline contents into `dst`. Assumes the cord is not empty.
|
754
|
+
void CopyToArray(char* dst) const;
|
755
|
+
|
756
|
+
bool is_tree() const { return data_.is_tree(); }
|
757
|
+
|
758
|
+
// Returns true if the Cord is being profiled by cordz.
|
759
|
+
bool is_profiled() const { return data_.is_tree() && data_.is_profiled(); }
|
760
|
+
|
761
|
+
// Returns the profiled CordzInfo, or nullptr if not sampled.
|
762
|
+
absl::cord_internal::CordzInfo* cordz_info() const {
|
763
|
+
return data_.cordz_info();
|
764
|
+
}
|
765
|
+
|
766
|
+
// Sets the profiled CordzInfo. `cordz_info` must not be null.
|
767
|
+
void set_cordz_info(cord_internal::CordzInfo* cordz_info) {
|
768
|
+
assert(cordz_info != nullptr);
|
769
|
+
data_.set_cordz_info(cordz_info);
|
770
|
+
}
|
771
|
+
|
772
|
+
// Resets the current cordz_info to null / empty.
|
773
|
+
void clear_cordz_info() { data_.clear_cordz_info(); }
|
774
|
+
|
775
|
+
private:
|
776
|
+
friend class Cord;
|
777
|
+
|
778
|
+
void AssignSlow(const InlineRep& src);
|
779
|
+
// Unrefs the tree, stops profiling, and zeroes the contents
|
780
|
+
void ClearSlow();
|
781
|
+
|
782
|
+
void ResetToEmpty() { data_ = {}; }
|
783
|
+
|
784
|
+
void set_inline_size(size_t size) { data_.set_inline_size(size); }
|
785
|
+
size_t inline_size() const { return data_.inline_size(); }
|
786
|
+
|
787
|
+
cord_internal::InlineData data_;
|
788
|
+
};
|
789
|
+
InlineRep contents_;
|
790
|
+
|
791
|
+
// Helper for MemoryUsage().
|
792
|
+
static size_t MemoryUsageAux(const absl::cord_internal::CordRep* rep);
|
793
|
+
|
794
|
+
// Helper for GetFlat() and TryFlat().
|
795
|
+
static bool GetFlatAux(absl::cord_internal::CordRep* rep,
|
796
|
+
absl::string_view* fragment);
|
797
|
+
|
798
|
+
// Helper for ForEachChunk().
|
799
|
+
static void ForEachChunkAux(
|
800
|
+
absl::cord_internal::CordRep* rep,
|
801
|
+
absl::FunctionRef<void(absl::string_view)> callback);
|
802
|
+
|
803
|
+
// The destructor for non-empty Cords.
|
804
|
+
void DestroyCordSlow();
|
805
|
+
|
806
|
+
// Out-of-line implementation of slower parts of logic.
|
807
|
+
void CopyToArraySlowPath(char* dst) const;
|
808
|
+
int CompareSlowPath(absl::string_view rhs, size_t compared_size,
|
809
|
+
size_t size_to_compare) const;
|
810
|
+
int CompareSlowPath(const Cord& rhs, size_t compared_size,
|
811
|
+
size_t size_to_compare) const;
|
812
|
+
bool EqualsImpl(absl::string_view rhs, size_t size_to_compare) const;
|
813
|
+
bool EqualsImpl(const Cord& rhs, size_t size_to_compare) const;
|
814
|
+
int CompareImpl(const Cord& rhs) const;
|
815
|
+
|
816
|
+
template <typename ResultType, typename RHS>
|
817
|
+
friend ResultType GenericCompare(const Cord& lhs, const RHS& rhs,
|
818
|
+
size_t size_to_compare);
|
819
|
+
static absl::string_view GetFirstChunk(const Cord& c);
|
820
|
+
static absl::string_view GetFirstChunk(absl::string_view sv);
|
821
|
+
|
822
|
+
// Returns a new reference to contents_.tree(), or steals an existing
|
823
|
+
// reference if called on an rvalue.
|
824
|
+
absl::cord_internal::CordRep* TakeRep() const&;
|
825
|
+
absl::cord_internal::CordRep* TakeRep() &&;
|
826
|
+
|
827
|
+
// Helper for Append().
|
828
|
+
template <typename C>
|
829
|
+
void AppendImpl(C&& src);
|
830
|
+
|
831
|
+
// Helper for AbslHashValue().
|
832
|
+
template <typename H>
|
833
|
+
H HashFragmented(H hash_state) const {
|
834
|
+
typename H::AbslInternalPiecewiseCombiner combiner;
|
835
|
+
ForEachChunk([&combiner, &hash_state](absl::string_view chunk) {
|
836
|
+
hash_state = combiner.add_buffer(std::move(hash_state), chunk.data(),
|
837
|
+
chunk.size());
|
838
|
+
});
|
839
|
+
return H::combine(combiner.finalize(std::move(hash_state)), size());
|
840
|
+
}
|
841
|
+
};
|
842
|
+
|
843
|
+
ABSL_NAMESPACE_END
|
844
|
+
} // namespace absl
|
845
|
+
|
846
|
+
namespace absl {
|
847
|
+
ABSL_NAMESPACE_BEGIN
|
848
|
+
|
849
|
+
// allow a Cord to be logged
|
850
|
+
extern std::ostream& operator<<(std::ostream& out, const Cord& cord);
|
851
|
+
|
852
|
+
// ------------------------------------------------------------------
|
853
|
+
// Internal details follow. Clients should ignore.
|
854
|
+
|
855
|
+
namespace cord_internal {
|
856
|
+
|
857
|
+
// Fast implementation of memmove for up to 15 bytes. This implementation is
|
858
|
+
// safe for overlapping regions. If nullify_tail is true, the destination is
|
859
|
+
// padded with '\0' up to 16 bytes.
|
860
|
+
inline void SmallMemmove(char* dst, const char* src, size_t n,
|
861
|
+
bool nullify_tail = false) {
|
862
|
+
if (n >= 8) {
|
863
|
+
assert(n <= 16);
|
864
|
+
uint64_t buf1;
|
865
|
+
uint64_t buf2;
|
866
|
+
memcpy(&buf1, src, 8);
|
867
|
+
memcpy(&buf2, src + n - 8, 8);
|
868
|
+
if (nullify_tail) {
|
869
|
+
memset(dst + 8, 0, 8);
|
870
|
+
}
|
871
|
+
memcpy(dst, &buf1, 8);
|
872
|
+
memcpy(dst + n - 8, &buf2, 8);
|
873
|
+
} else if (n >= 4) {
|
874
|
+
uint32_t buf1;
|
875
|
+
uint32_t buf2;
|
876
|
+
memcpy(&buf1, src, 4);
|
877
|
+
memcpy(&buf2, src + n - 4, 4);
|
878
|
+
if (nullify_tail) {
|
879
|
+
memset(dst + 4, 0, 4);
|
880
|
+
memset(dst + 8, 0, 8);
|
881
|
+
}
|
882
|
+
memcpy(dst, &buf1, 4);
|
883
|
+
memcpy(dst + n - 4, &buf2, 4);
|
884
|
+
} else {
|
885
|
+
if (n != 0) {
|
886
|
+
dst[0] = src[0];
|
887
|
+
dst[n / 2] = src[n / 2];
|
888
|
+
dst[n - 1] = src[n - 1];
|
889
|
+
}
|
890
|
+
if (nullify_tail) {
|
891
|
+
memset(dst + 8, 0, 8);
|
892
|
+
memset(dst + n, 0, 8);
|
893
|
+
}
|
894
|
+
}
|
895
|
+
}
|
896
|
+
|
897
|
+
// Does non-template-specific `CordRepExternal` initialization.
|
898
|
+
// Expects `data` to be non-empty.
|
899
|
+
void InitializeCordRepExternal(absl::string_view data, CordRepExternal* rep);
|
900
|
+
|
901
|
+
// Creates a new `CordRep` that owns `data` and `releaser` and returns a pointer
|
902
|
+
// to it, or `nullptr` if `data` was empty.
|
903
|
+
template <typename Releaser>
|
904
|
+
// NOLINTNEXTLINE - suppress clang-tidy raw pointer return.
|
905
|
+
CordRep* NewExternalRep(absl::string_view data, Releaser&& releaser) {
|
906
|
+
using ReleaserType = absl::decay_t<Releaser>;
|
907
|
+
if (data.empty()) {
|
908
|
+
// Never create empty external nodes.
|
909
|
+
InvokeReleaser(Rank0{}, ReleaserType(std::forward<Releaser>(releaser)),
|
910
|
+
data);
|
911
|
+
return nullptr;
|
912
|
+
}
|
913
|
+
|
914
|
+
CordRepExternal* rep = new CordRepExternalImpl<ReleaserType>(
|
915
|
+
std::forward<Releaser>(releaser), 0);
|
916
|
+
InitializeCordRepExternal(data, rep);
|
917
|
+
return rep;
|
918
|
+
}
|
919
|
+
|
920
|
+
// Overload for function reference types that dispatches using a function
|
921
|
+
// pointer because there are no `alignof()` or `sizeof()` a function reference.
|
922
|
+
// NOLINTNEXTLINE - suppress clang-tidy raw pointer return.
|
923
|
+
inline CordRep* NewExternalRep(absl::string_view data,
|
924
|
+
void (&releaser)(absl::string_view)) {
|
925
|
+
return NewExternalRep(data, &releaser);
|
926
|
+
}
|
927
|
+
|
928
|
+
} // namespace cord_internal
|
929
|
+
|
930
|
+
template <typename Releaser>
|
931
|
+
Cord MakeCordFromExternal(absl::string_view data, Releaser&& releaser) {
|
932
|
+
Cord cord;
|
933
|
+
cord.contents_.set_tree(::absl::cord_internal::NewExternalRep(
|
934
|
+
data, std::forward<Releaser>(releaser)));
|
935
|
+
return cord;
|
936
|
+
}
|
937
|
+
|
938
|
+
constexpr Cord::InlineRep::InlineRep(cord_internal::InlineData data)
|
939
|
+
: data_(data) {}
|
940
|
+
|
941
|
+
inline Cord::InlineRep::InlineRep(const Cord::InlineRep& src)
|
942
|
+
: data_(src.data_) {
|
943
|
+
if (is_tree()) {
|
944
|
+
data_.clear_cordz_info();
|
945
|
+
absl::cord_internal::CordRep::Ref(as_tree());
|
946
|
+
}
|
947
|
+
}
|
948
|
+
|
949
|
+
inline Cord::InlineRep::InlineRep(Cord::InlineRep&& src) {
|
950
|
+
data_ = src.data_;
|
951
|
+
src.ResetToEmpty();
|
952
|
+
}
|
953
|
+
|
954
|
+
inline Cord::InlineRep& Cord::InlineRep::operator=(const Cord::InlineRep& src) {
|
955
|
+
if (this == &src) {
|
956
|
+
return *this;
|
957
|
+
}
|
958
|
+
if (!is_tree() && !src.is_tree()) {
|
959
|
+
data_ = src.data_;
|
960
|
+
return *this;
|
961
|
+
}
|
962
|
+
AssignSlow(src);
|
963
|
+
return *this;
|
964
|
+
}
|
965
|
+
|
966
|
+
inline Cord::InlineRep& Cord::InlineRep::operator=(
|
967
|
+
Cord::InlineRep&& src) noexcept {
|
968
|
+
if (is_tree()) {
|
969
|
+
ClearSlow();
|
970
|
+
}
|
971
|
+
data_ = src.data_;
|
972
|
+
src.ResetToEmpty();
|
973
|
+
return *this;
|
974
|
+
}
|
975
|
+
|
976
|
+
inline void Cord::InlineRep::Swap(Cord::InlineRep* rhs) {
|
977
|
+
if (rhs == this) {
|
978
|
+
return;
|
979
|
+
}
|
980
|
+
std::swap(data_, rhs->data_);
|
981
|
+
}
|
982
|
+
|
983
|
+
inline const char* Cord::InlineRep::data() const {
|
984
|
+
return is_tree() ? nullptr : data_.as_chars();
|
985
|
+
}
|
986
|
+
|
987
|
+
inline absl::cord_internal::CordRep* Cord::InlineRep::as_tree() const {
|
988
|
+
assert(data_.is_tree());
|
989
|
+
return data_.as_tree();
|
990
|
+
}
|
991
|
+
|
992
|
+
inline absl::cord_internal::CordRep* Cord::InlineRep::tree() const {
|
993
|
+
if (is_tree()) {
|
994
|
+
return as_tree();
|
995
|
+
} else {
|
996
|
+
return nullptr;
|
997
|
+
}
|
998
|
+
}
|
999
|
+
|
1000
|
+
inline bool Cord::InlineRep::empty() const { return data_.is_empty(); }
|
1001
|
+
|
1002
|
+
inline size_t Cord::InlineRep::size() const {
|
1003
|
+
return is_tree() ? as_tree()->length : inline_size();
|
1004
|
+
}
|
1005
|
+
|
1006
|
+
inline void Cord::InlineRep::set_tree(absl::cord_internal::CordRep* rep) {
|
1007
|
+
if (rep == nullptr) {
|
1008
|
+
ResetToEmpty();
|
1009
|
+
} else {
|
1010
|
+
if (data_.is_tree()) {
|
1011
|
+
// `data_` already holds a 'tree' value and an optional cordz_info value.
|
1012
|
+
// Replace the tree value only, leaving the cordz_info value unchanged.
|
1013
|
+
data_.set_tree(rep);
|
1014
|
+
} else {
|
1015
|
+
// `data_` contains inlined data: initialize data_ to tree value `rep`.
|
1016
|
+
data_.make_tree(rep);
|
1017
|
+
}
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
inline void Cord::InlineRep::replace_tree(absl::cord_internal::CordRep* rep) {
|
1022
|
+
ABSL_ASSERT(is_tree());
|
1023
|
+
if (ABSL_PREDICT_FALSE(rep == nullptr)) {
|
1024
|
+
set_tree(rep);
|
1025
|
+
return;
|
1026
|
+
}
|
1027
|
+
data_.set_tree(rep);
|
1028
|
+
}
|
1029
|
+
|
1030
|
+
inline absl::cord_internal::CordRep* Cord::InlineRep::clear() {
|
1031
|
+
absl::cord_internal::CordRep* result = tree();
|
1032
|
+
ResetToEmpty();
|
1033
|
+
return result;
|
1034
|
+
}
|
1035
|
+
|
1036
|
+
inline void Cord::InlineRep::CopyToArray(char* dst) const {
|
1037
|
+
assert(!is_tree());
|
1038
|
+
size_t n = inline_size();
|
1039
|
+
assert(n != 0);
|
1040
|
+
cord_internal::SmallMemmove(dst, data_.as_chars(), n);
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
constexpr inline Cord::Cord() noexcept {}
|
1044
|
+
|
1045
|
+
template <typename T>
|
1046
|
+
constexpr Cord::Cord(strings_internal::StringConstant<T>)
|
1047
|
+
: contents_(strings_internal::StringConstant<T>::value.size() <=
|
1048
|
+
cord_internal::kMaxInline
|
1049
|
+
? cord_internal::InlineData(
|
1050
|
+
strings_internal::StringConstant<T>::value)
|
1051
|
+
: cord_internal::InlineData(
|
1052
|
+
&cord_internal::ConstInitExternalStorage<
|
1053
|
+
strings_internal::StringConstant<T>>::value)) {}
|
1054
|
+
|
1055
|
+
inline Cord& Cord::operator=(const Cord& x) {
|
1056
|
+
contents_ = x.contents_;
|
1057
|
+
return *this;
|
1058
|
+
}
|
1059
|
+
|
1060
|
+
inline Cord::Cord(const Cord& src) : contents_(src.contents_) {}
|
1061
|
+
|
1062
|
+
inline Cord::Cord(Cord&& src) noexcept : contents_(std::move(src.contents_)) {}
|
1063
|
+
|
1064
|
+
inline void Cord::swap(Cord& other) noexcept {
|
1065
|
+
contents_.Swap(&other.contents_);
|
1066
|
+
}
|
1067
|
+
|
1068
|
+
inline Cord& Cord::operator=(Cord&& x) noexcept {
|
1069
|
+
contents_ = std::move(x.contents_);
|
1070
|
+
return *this;
|
1071
|
+
}
|
1072
|
+
|
1073
|
+
extern template Cord::Cord(std::string&& src);
|
1074
|
+
extern template Cord& Cord::operator=(std::string&& src);
|
1075
|
+
|
1076
|
+
inline size_t Cord::size() const {
|
1077
|
+
// Length is 1st field in str.rep_
|
1078
|
+
return contents_.size();
|
1079
|
+
}
|
1080
|
+
|
1081
|
+
inline bool Cord::empty() const { return contents_.empty(); }
|
1082
|
+
|
1083
|
+
inline size_t Cord::EstimatedMemoryUsage() const {
|
1084
|
+
size_t result = sizeof(Cord);
|
1085
|
+
if (const absl::cord_internal::CordRep* rep = contents_.tree()) {
|
1086
|
+
result += MemoryUsageAux(rep);
|
1087
|
+
}
|
1088
|
+
return result;
|
1089
|
+
}
|
1090
|
+
|
1091
|
+
inline absl::optional<absl::string_view> Cord::TryFlat() const {
|
1092
|
+
absl::cord_internal::CordRep* rep = contents_.tree();
|
1093
|
+
if (rep == nullptr) {
|
1094
|
+
return absl::string_view(contents_.data(), contents_.size());
|
1095
|
+
}
|
1096
|
+
absl::string_view fragment;
|
1097
|
+
if (GetFlatAux(rep, &fragment)) {
|
1098
|
+
return fragment;
|
1099
|
+
}
|
1100
|
+
return absl::nullopt;
|
1101
|
+
}
|
1102
|
+
|
1103
|
+
inline absl::string_view Cord::Flatten() {
|
1104
|
+
absl::cord_internal::CordRep* rep = contents_.tree();
|
1105
|
+
if (rep == nullptr) {
|
1106
|
+
return absl::string_view(contents_.data(), contents_.size());
|
1107
|
+
} else {
|
1108
|
+
absl::string_view already_flat_contents;
|
1109
|
+
if (GetFlatAux(rep, &already_flat_contents)) {
|
1110
|
+
return already_flat_contents;
|
1111
|
+
}
|
1112
|
+
}
|
1113
|
+
return FlattenSlowPath();
|
1114
|
+
}
|
1115
|
+
|
1116
|
+
inline void Cord::Append(absl::string_view src) {
|
1117
|
+
contents_.AppendArray(src.data(), src.size());
|
1118
|
+
}
|
1119
|
+
|
1120
|
+
extern template void Cord::Append(std::string&& src);
|
1121
|
+
extern template void Cord::Prepend(std::string&& src);
|
1122
|
+
|
1123
|
+
inline int Cord::Compare(const Cord& rhs) const {
|
1124
|
+
if (!contents_.is_tree() && !rhs.contents_.is_tree()) {
|
1125
|
+
return contents_.BitwiseCompare(rhs.contents_);
|
1126
|
+
}
|
1127
|
+
|
1128
|
+
return CompareImpl(rhs);
|
1129
|
+
}
|
1130
|
+
|
1131
|
+
// Does 'this' cord start/end with rhs
|
1132
|
+
inline bool Cord::StartsWith(const Cord& rhs) const {
|
1133
|
+
if (contents_.IsSame(rhs.contents_)) return true;
|
1134
|
+
size_t rhs_size = rhs.size();
|
1135
|
+
if (size() < rhs_size) return false;
|
1136
|
+
return EqualsImpl(rhs, rhs_size);
|
1137
|
+
}
|
1138
|
+
|
1139
|
+
inline bool Cord::StartsWith(absl::string_view rhs) const {
|
1140
|
+
size_t rhs_size = rhs.size();
|
1141
|
+
if (size() < rhs_size) return false;
|
1142
|
+
return EqualsImpl(rhs, rhs_size);
|
1143
|
+
}
|
1144
|
+
|
1145
|
+
inline void Cord::ChunkIterator::InitTree(cord_internal::CordRep* tree) {
|
1146
|
+
if (tree->tag == cord_internal::RING) {
|
1147
|
+
current_chunk_ = ring_reader_.Reset(tree->ring());
|
1148
|
+
return;
|
1149
|
+
}
|
1150
|
+
|
1151
|
+
stack_of_right_children_.push_back(tree);
|
1152
|
+
operator++();
|
1153
|
+
}
|
1154
|
+
|
1155
|
+
inline Cord::ChunkIterator::ChunkIterator(cord_internal::CordRep* tree)
|
1156
|
+
: bytes_remaining_(tree->length) {
|
1157
|
+
InitTree(tree);
|
1158
|
+
}
|
1159
|
+
|
1160
|
+
inline Cord::ChunkIterator::ChunkIterator(const Cord* cord)
|
1161
|
+
: bytes_remaining_(cord->size()) {
|
1162
|
+
if (cord->contents_.is_tree()) {
|
1163
|
+
InitTree(cord->contents_.as_tree());
|
1164
|
+
} else {
|
1165
|
+
current_chunk_ =
|
1166
|
+
absl::string_view(cord->contents_.data(), bytes_remaining_);
|
1167
|
+
}
|
1168
|
+
}
|
1169
|
+
|
1170
|
+
inline Cord::ChunkIterator& Cord::ChunkIterator::AdvanceRing() {
|
1171
|
+
current_chunk_ = ring_reader_.Next();
|
1172
|
+
return *this;
|
1173
|
+
}
|
1174
|
+
|
1175
|
+
inline void Cord::ChunkIterator::AdvanceBytesRing(size_t n) {
|
1176
|
+
assert(n >= current_chunk_.size());
|
1177
|
+
bytes_remaining_ -= n;
|
1178
|
+
if (bytes_remaining_) {
|
1179
|
+
if (n == current_chunk_.size()) {
|
1180
|
+
current_chunk_ = ring_reader_.Next();
|
1181
|
+
} else {
|
1182
|
+
size_t offset = ring_reader_.length() - bytes_remaining_;
|
1183
|
+
current_chunk_ = ring_reader_.Seek(offset);
|
1184
|
+
}
|
1185
|
+
} else {
|
1186
|
+
current_chunk_ = {};
|
1187
|
+
}
|
1188
|
+
}
|
1189
|
+
|
1190
|
+
inline Cord::ChunkIterator& Cord::ChunkIterator::operator++() {
|
1191
|
+
ABSL_HARDENING_ASSERT(bytes_remaining_ > 0 &&
|
1192
|
+
"Attempted to iterate past `end()`");
|
1193
|
+
assert(bytes_remaining_ >= current_chunk_.size());
|
1194
|
+
bytes_remaining_ -= current_chunk_.size();
|
1195
|
+
if (bytes_remaining_ > 0) {
|
1196
|
+
return ring_reader_ ? AdvanceRing() : AdvanceStack();
|
1197
|
+
} else {
|
1198
|
+
current_chunk_ = {};
|
1199
|
+
}
|
1200
|
+
return *this;
|
1201
|
+
}
|
1202
|
+
|
1203
|
+
inline Cord::ChunkIterator Cord::ChunkIterator::operator++(int) {
|
1204
|
+
ChunkIterator tmp(*this);
|
1205
|
+
operator++();
|
1206
|
+
return tmp;
|
1207
|
+
}
|
1208
|
+
|
1209
|
+
inline bool Cord::ChunkIterator::operator==(const ChunkIterator& other) const {
|
1210
|
+
return bytes_remaining_ == other.bytes_remaining_;
|
1211
|
+
}
|
1212
|
+
|
1213
|
+
inline bool Cord::ChunkIterator::operator!=(const ChunkIterator& other) const {
|
1214
|
+
return !(*this == other);
|
1215
|
+
}
|
1216
|
+
|
1217
|
+
inline Cord::ChunkIterator::reference Cord::ChunkIterator::operator*() const {
|
1218
|
+
ABSL_HARDENING_ASSERT(bytes_remaining_ != 0);
|
1219
|
+
return current_chunk_;
|
1220
|
+
}
|
1221
|
+
|
1222
|
+
inline Cord::ChunkIterator::pointer Cord::ChunkIterator::operator->() const {
|
1223
|
+
ABSL_HARDENING_ASSERT(bytes_remaining_ != 0);
|
1224
|
+
return ¤t_chunk_;
|
1225
|
+
}
|
1226
|
+
|
1227
|
+
inline void Cord::ChunkIterator::RemoveChunkPrefix(size_t n) {
|
1228
|
+
assert(n < current_chunk_.size());
|
1229
|
+
current_chunk_.remove_prefix(n);
|
1230
|
+
bytes_remaining_ -= n;
|
1231
|
+
}
|
1232
|
+
|
1233
|
+
inline void Cord::ChunkIterator::AdvanceBytes(size_t n) {
|
1234
|
+
assert(bytes_remaining_ >= n);
|
1235
|
+
if (ABSL_PREDICT_TRUE(n < current_chunk_.size())) {
|
1236
|
+
RemoveChunkPrefix(n);
|
1237
|
+
} else if (n != 0) {
|
1238
|
+
ring_reader_ ? AdvanceBytesRing(n) : AdvanceBytesSlowPath(n);
|
1239
|
+
}
|
1240
|
+
}
|
1241
|
+
|
1242
|
+
inline Cord::ChunkIterator Cord::chunk_begin() const {
|
1243
|
+
return ChunkIterator(this);
|
1244
|
+
}
|
1245
|
+
|
1246
|
+
inline Cord::ChunkIterator Cord::chunk_end() const { return ChunkIterator(); }
|
1247
|
+
|
1248
|
+
inline Cord::ChunkIterator Cord::ChunkRange::begin() const {
|
1249
|
+
return cord_->chunk_begin();
|
1250
|
+
}
|
1251
|
+
|
1252
|
+
inline Cord::ChunkIterator Cord::ChunkRange::end() const {
|
1253
|
+
return cord_->chunk_end();
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
inline Cord::ChunkRange Cord::Chunks() const { return ChunkRange(this); }
|
1257
|
+
|
1258
|
+
inline Cord::CharIterator& Cord::CharIterator::operator++() {
|
1259
|
+
if (ABSL_PREDICT_TRUE(chunk_iterator_->size() > 1)) {
|
1260
|
+
chunk_iterator_.RemoveChunkPrefix(1);
|
1261
|
+
} else {
|
1262
|
+
++chunk_iterator_;
|
1263
|
+
}
|
1264
|
+
return *this;
|
1265
|
+
}
|
1266
|
+
|
1267
|
+
inline Cord::CharIterator Cord::CharIterator::operator++(int) {
|
1268
|
+
CharIterator tmp(*this);
|
1269
|
+
operator++();
|
1270
|
+
return tmp;
|
1271
|
+
}
|
1272
|
+
|
1273
|
+
inline bool Cord::CharIterator::operator==(const CharIterator& other) const {
|
1274
|
+
return chunk_iterator_ == other.chunk_iterator_;
|
1275
|
+
}
|
1276
|
+
|
1277
|
+
inline bool Cord::CharIterator::operator!=(const CharIterator& other) const {
|
1278
|
+
return !(*this == other);
|
1279
|
+
}
|
1280
|
+
|
1281
|
+
inline Cord::CharIterator::reference Cord::CharIterator::operator*() const {
|
1282
|
+
return *chunk_iterator_->data();
|
1283
|
+
}
|
1284
|
+
|
1285
|
+
inline Cord::CharIterator::pointer Cord::CharIterator::operator->() const {
|
1286
|
+
return chunk_iterator_->data();
|
1287
|
+
}
|
1288
|
+
|
1289
|
+
inline Cord Cord::AdvanceAndRead(CharIterator* it, size_t n_bytes) {
|
1290
|
+
assert(it != nullptr);
|
1291
|
+
return it->chunk_iterator_.AdvanceAndReadBytes(n_bytes);
|
1292
|
+
}
|
1293
|
+
|
1294
|
+
inline void Cord::Advance(CharIterator* it, size_t n_bytes) {
|
1295
|
+
assert(it != nullptr);
|
1296
|
+
it->chunk_iterator_.AdvanceBytes(n_bytes);
|
1297
|
+
}
|
1298
|
+
|
1299
|
+
inline absl::string_view Cord::ChunkRemaining(const CharIterator& it) {
|
1300
|
+
return *it.chunk_iterator_;
|
1301
|
+
}
|
1302
|
+
|
1303
|
+
inline Cord::CharIterator Cord::char_begin() const {
|
1304
|
+
return CharIterator(this);
|
1305
|
+
}
|
1306
|
+
|
1307
|
+
inline Cord::CharIterator Cord::char_end() const { return CharIterator(); }
|
1308
|
+
|
1309
|
+
inline Cord::CharIterator Cord::CharRange::begin() const {
|
1310
|
+
return cord_->char_begin();
|
1311
|
+
}
|
1312
|
+
|
1313
|
+
inline Cord::CharIterator Cord::CharRange::end() const {
|
1314
|
+
return cord_->char_end();
|
1315
|
+
}
|
1316
|
+
|
1317
|
+
inline Cord::CharRange Cord::Chars() const { return CharRange(this); }
|
1318
|
+
|
1319
|
+
inline void Cord::ForEachChunk(
|
1320
|
+
absl::FunctionRef<void(absl::string_view)> callback) const {
|
1321
|
+
absl::cord_internal::CordRep* rep = contents_.tree();
|
1322
|
+
if (rep == nullptr) {
|
1323
|
+
callback(absl::string_view(contents_.data(), contents_.size()));
|
1324
|
+
} else {
|
1325
|
+
return ForEachChunkAux(rep, callback);
|
1326
|
+
}
|
1327
|
+
}
|
1328
|
+
|
1329
|
+
// Nonmember Cord-to-Cord relational operarators.
|
1330
|
+
inline bool operator==(const Cord& lhs, const Cord& rhs) {
|
1331
|
+
if (lhs.contents_.IsSame(rhs.contents_)) return true;
|
1332
|
+
size_t rhs_size = rhs.size();
|
1333
|
+
if (lhs.size() != rhs_size) return false;
|
1334
|
+
return lhs.EqualsImpl(rhs, rhs_size);
|
1335
|
+
}
|
1336
|
+
|
1337
|
+
inline bool operator!=(const Cord& x, const Cord& y) { return !(x == y); }
|
1338
|
+
inline bool operator<(const Cord& x, const Cord& y) {
|
1339
|
+
return x.Compare(y) < 0;
|
1340
|
+
}
|
1341
|
+
inline bool operator>(const Cord& x, const Cord& y) {
|
1342
|
+
return x.Compare(y) > 0;
|
1343
|
+
}
|
1344
|
+
inline bool operator<=(const Cord& x, const Cord& y) {
|
1345
|
+
return x.Compare(y) <= 0;
|
1346
|
+
}
|
1347
|
+
inline bool operator>=(const Cord& x, const Cord& y) {
|
1348
|
+
return x.Compare(y) >= 0;
|
1349
|
+
}
|
1350
|
+
|
1351
|
+
// Nonmember Cord-to-absl::string_view relational operators.
|
1352
|
+
//
|
1353
|
+
// Due to implicit conversions, these also enable comparisons of Cord with
|
1354
|
+
// with std::string, ::string, and const char*.
|
1355
|
+
inline bool operator==(const Cord& lhs, absl::string_view rhs) {
|
1356
|
+
size_t lhs_size = lhs.size();
|
1357
|
+
size_t rhs_size = rhs.size();
|
1358
|
+
if (lhs_size != rhs_size) return false;
|
1359
|
+
return lhs.EqualsImpl(rhs, rhs_size);
|
1360
|
+
}
|
1361
|
+
|
1362
|
+
inline bool operator==(absl::string_view x, const Cord& y) { return y == x; }
|
1363
|
+
inline bool operator!=(const Cord& x, absl::string_view y) { return !(x == y); }
|
1364
|
+
inline bool operator!=(absl::string_view x, const Cord& y) { return !(x == y); }
|
1365
|
+
inline bool operator<(const Cord& x, absl::string_view y) {
|
1366
|
+
return x.Compare(y) < 0;
|
1367
|
+
}
|
1368
|
+
inline bool operator<(absl::string_view x, const Cord& y) {
|
1369
|
+
return y.Compare(x) > 0;
|
1370
|
+
}
|
1371
|
+
inline bool operator>(const Cord& x, absl::string_view y) { return y < x; }
|
1372
|
+
inline bool operator>(absl::string_view x, const Cord& y) { return y < x; }
|
1373
|
+
inline bool operator<=(const Cord& x, absl::string_view y) { return !(y < x); }
|
1374
|
+
inline bool operator<=(absl::string_view x, const Cord& y) { return !(y < x); }
|
1375
|
+
inline bool operator>=(const Cord& x, absl::string_view y) { return !(x < y); }
|
1376
|
+
inline bool operator>=(absl::string_view x, const Cord& y) { return !(x < y); }
|
1377
|
+
|
1378
|
+
// Some internals exposed to test code.
|
1379
|
+
namespace strings_internal {
|
1380
|
+
class CordTestAccess {
|
1381
|
+
public:
|
1382
|
+
static size_t FlatOverhead();
|
1383
|
+
static size_t MaxFlatLength();
|
1384
|
+
static size_t SizeofCordRepConcat();
|
1385
|
+
static size_t SizeofCordRepExternal();
|
1386
|
+
static size_t SizeofCordRepSubstring();
|
1387
|
+
static size_t FlatTagToLength(uint8_t tag);
|
1388
|
+
static uint8_t LengthToTag(size_t s);
|
1389
|
+
};
|
1390
|
+
} // namespace strings_internal
|
1391
|
+
ABSL_NAMESPACE_END
|
1392
|
+
} // namespace absl
|
1393
|
+
|
1394
|
+
#endif // ABSL_STRINGS_CORD_H_
|