grpc 1.26.0 → 1.28.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 +1699 -1482
- data/etc/roots.pem +44 -0
- data/include/grpc/grpc_security.h +37 -15
- data/include/grpc/grpc_security_constants.h +27 -0
- data/include/grpc/impl/codegen/grpc_types.h +19 -0
- data/include/grpc/impl/codegen/port_platform.h +8 -1
- data/include/grpc/impl/codegen/sync.h +5 -3
- data/include/grpc/impl/codegen/sync_abseil.h +36 -0
- data/include/grpc/module.modulemap +3 -0
- data/{src/core/lib/json/json_common.h → include/grpc/support/sync_abseil.h} +7 -15
- data/src/core/ext/filters/client_channel/client_channel.cc +74 -32
- data/src/core/ext/filters/client_channel/client_channel_channelz.cc +31 -47
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +1 -3
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +1 -1
- data/src/core/ext/filters/client_channel/http_proxy.cc +8 -5
- data/src/core/ext/filters/client_channel/lb_policy.cc +4 -3
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +291 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h +83 -0
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +224 -367
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.cc +88 -121
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h +28 -57
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +18 -21
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +9 -13
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +85 -83
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +623 -767
- data/src/core/ext/filters/client_channel/lb_policy_factory.h +3 -3
- data/src/core/ext/filters/client_channel/lb_policy_registry.cc +43 -75
- data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +57 -70
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +3 -3
- data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +2 -2
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +3 -3
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +31 -7
- data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +228 -286
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +2 -2
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +37 -176
- data/src/core/ext/filters/client_channel/resolving_lb_policy.h +7 -11
- data/src/core/ext/filters/client_channel/service_config.cc +91 -160
- data/src/core/ext/filters/client_channel/service_config.h +14 -21
- data/src/core/ext/filters/client_channel/xds/xds_api.cc +1426 -229
- data/src/core/ext/filters/client_channel/xds/xds_api.h +214 -115
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +236 -339
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +32 -45
- data/src/core/ext/filters/client_channel/xds/xds_channel.h +3 -1
- data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +14 -9
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +986 -252
- data/src/core/ext/filters/client_channel/xds/xds_client.h +84 -36
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +53 -131
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +119 -152
- data/src/core/ext/filters/message_size/message_size_filter.cc +32 -35
- data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +3 -6
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +6 -8
- data/src/core/ext/transport/chttp2/transport/writing.cc +1 -1
- data/src/core/ext/transport/inproc/inproc_transport.cc +22 -42
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +30 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +54 -0
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +46 -21
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +116 -29
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +4 -362
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +14 -1337
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +390 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +1411 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +29 -8
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +60 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +5 -3
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +6 -2
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +48 -5
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +154 -4
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +19 -15
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +46 -32
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +26 -4
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +70 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +42 -25
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +83 -25
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +43 -7
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +115 -0
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +7 -68
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +14 -201
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +240 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +1 -71
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +3 -228
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +1 -0
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +30 -0
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +104 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +383 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +144 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +527 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +42 -0
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +112 -0
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c +29 -0
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +62 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +199 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +17 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +33 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +793 -0
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +2936 -0
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +58 -0
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +134 -0
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c +27 -0
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +53 -0
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +227 -0
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +725 -0
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +296 -0
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +1072 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +32 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +108 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +52 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +133 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +87 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.c +11 -0
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +27 -0
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +62 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +249 -0
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +30 -27
- data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +64 -52
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.c +13 -5
- data/src/core/ext/upb-generated/src/proto/grpc/lb/v1/load_balancer.upb.h +34 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +48 -0
- data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +104 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +17 -0
- data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +30 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +38 -34
- data/src/core/ext/upb-generated/validate/validate.upb.h +129 -99
- data/src/core/lib/channel/channel_trace.cc +32 -41
- data/src/core/lib/channel/channel_trace.h +3 -3
- data/src/core/lib/channel/channelz.cc +158 -248
- data/src/core/lib/channel/channelz.h +17 -10
- data/src/core/lib/channel/channelz_registry.cc +47 -74
- data/src/core/lib/channel/channelz_registry.h +4 -4
- data/src/core/lib/gpr/sync_abseil.cc +114 -0
- data/src/core/lib/gpr/sync_posix.cc +8 -5
- data/src/core/lib/gpr/sync_windows.cc +4 -2
- data/src/core/lib/gpr/time_precise.cc +1 -1
- data/src/core/lib/gprpp/host_port.cc +1 -1
- data/src/core/lib/gprpp/inlined_vector.h +1 -210
- data/src/core/lib/gprpp/memory.h +2 -6
- data/src/core/lib/gprpp/optional.h +6 -21
- data/src/core/lib/gprpp/string_view.h +5 -110
- data/src/core/lib/gprpp/sync.h +9 -0
- data/src/core/lib/iomgr/buffer_list.cc +36 -35
- data/src/core/lib/iomgr/error.h +4 -4
- data/src/core/lib/iomgr/ev_epollex_linux.cc +12 -4
- data/src/core/lib/iomgr/executor.cc +1 -1
- data/src/core/lib/iomgr/fork_posix.cc +4 -0
- data/src/core/lib/iomgr/load_file.cc +1 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.cc +87 -0
- data/src/core/lib/iomgr/poller/eventmanager_libuv.h +88 -0
- data/src/core/lib/iomgr/socket_utils_common_posix.cc +14 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +12 -0
- data/src/core/lib/iomgr/tcp_client_posix.cc +17 -17
- data/src/core/lib/iomgr/tcp_client_posix.h +6 -6
- data/src/core/lib/iomgr/tcp_custom.h +3 -0
- data/src/core/lib/iomgr/tcp_posix.cc +608 -56
- data/src/core/lib/iomgr/tcp_server_custom.cc +15 -2
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +8 -0
- data/src/core/lib/iomgr/work_serializer.cc +155 -0
- data/src/core/lib/iomgr/work_serializer.h +65 -0
- data/src/core/lib/json/json.h +208 -68
- data/src/core/lib/json/json_reader.cc +511 -319
- data/src/core/lib/json/json_writer.cc +201 -110
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
- data/src/core/lib/security/credentials/composite/composite_credentials.cc +7 -0
- data/src/core/lib/security/credentials/composite/composite_credentials.h +5 -1
- data/src/core/lib/security/credentials/credentials.h +10 -1
- data/src/core/lib/security/credentials/fake/fake_credentials.h +2 -1
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +10 -8
- data/src/core/lib/security/credentials/jwt/json_token.cc +26 -56
- data/src/core/lib/security/credentials/jwt/json_token.h +2 -1
- data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +8 -18
- data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +149 -159
- data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -3
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +38 -35
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -1
- data/src/core/lib/security/credentials/plugin/plugin_credentials.cc +6 -4
- data/src/core/lib/security/credentials/plugin/plugin_credentials.h +2 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.cc +20 -0
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +9 -0
- data/src/core/lib/security/credentials/tls/{spiffe_credentials.cc → tls_credentials.cc} +23 -24
- data/src/core/lib/security/credentials/tls/{spiffe_credentials.h → tls_credentials.h} +9 -9
- data/src/core/lib/security/security_connector/alts/alts_security_connector.cc +13 -0
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +22 -2
- data/src/core/lib/security/security_connector/load_system_roots_fallback.cc +2 -2
- data/src/core/lib/security/security_connector/load_system_roots_linux.cc +2 -2
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +31 -6
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +3 -15
- data/src/core/lib/security/security_connector/ssl_utils.cc +48 -4
- data/src/core/lib/security/security_connector/ssl_utils.h +12 -1
- data/src/core/lib/security/security_connector/tls/{spiffe_security_connector.cc → tls_security_connector.cc} +106 -70
- data/src/core/lib/security/security_connector/tls/{spiffe_security_connector.h → tls_security_connector.h} +22 -19
- data/src/core/lib/security/transport/client_auth_filter.cc +33 -0
- data/src/core/lib/security/transport/security_handshaker.cc +2 -2
- data/src/core/lib/security/util/json_util.cc +22 -15
- data/src/core/lib/security/util/json_util.h +2 -2
- data/src/core/lib/surface/completion_queue.cc +22 -1
- data/src/core/lib/surface/version.cc +1 -1
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +12 -2
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +1 -1
- data/src/core/tsi/alts/zero_copy_frame_protector/alts_zero_copy_grpc_protector.cc +3 -3
- data/src/core/tsi/fake_transport_security.cc +7 -3
- data/src/core/tsi/fake_transport_security.h +2 -0
- data/src/core/tsi/grpc_shadow_boringssl.h +1333 -1319
- data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
- data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
- data/src/core/tsi/ssl_transport_security.cc +145 -8
- data/src/core/tsi/ssl_transport_security.h +15 -1
- data/src/core/tsi/transport_security.cc +13 -0
- data/src/core/tsi/transport_security_grpc.cc +2 -2
- data/src/core/tsi/transport_security_grpc.h +2 -2
- data/src/core/tsi/transport_security_interface.h +12 -0
- data/src/ruby/bin/math_pb.rb +5 -5
- data/src/ruby/ext/grpc/rb_call_credentials.c +4 -1
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +4 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/pb/grpc/health/v1/health_pb.rb +3 -3
- data/src/ruby/pb/src/proto/grpc/testing/empty_pb.rb +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +23 -13
- data/third_party/abseil-cpp/absl/algorithm/algorithm.h +159 -0
- data/third_party/abseil-cpp/absl/base/attributes.h +621 -0
- data/third_party/abseil-cpp/absl/base/call_once.h +226 -0
- data/third_party/abseil-cpp/absl/base/casts.h +184 -0
- data/third_party/abseil-cpp/absl/base/config.h +671 -0
- data/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.cc +129 -0
- data/third_party/abseil-cpp/absl/base/dynamic_annotations.h +389 -0
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/third_party/abseil-cpp/absl/base/internal/bits.h +218 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +107 -0
- data/third_party/abseil-cpp/absl/base/internal/cycleclock.h +94 -0
- data/third_party/abseil-cpp/absl/base/internal/endian.h +266 -0
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/third_party/abseil-cpp/absl/base/internal/identity.h +37 -0
- data/third_party/abseil-cpp/absl/base/internal/inline_variable.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/invoke.h +187 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +107 -0
- data/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +240 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +183 -0
- data/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +233 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +243 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +66 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +93 -0
- data/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +37 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +416 -0
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.h +66 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_annotations.h +271 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +152 -0
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +259 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.cc +108 -0
- data/third_party/abseil-cpp/absl/base/internal/throw_delegate.h +75 -0
- data/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +66 -0
- data/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +158 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +140 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +124 -0
- data/third_party/abseil-cpp/absl/base/log_severity.cc +27 -0
- data/third_party/abseil-cpp/absl/base/log_severity.h +121 -0
- data/third_party/abseil-cpp/absl/base/macros.h +220 -0
- data/third_party/abseil-cpp/absl/base/optimization.h +181 -0
- data/third_party/abseil-cpp/absl/base/options.h +211 -0
- data/third_party/abseil-cpp/absl/base/policy_checks.h +111 -0
- data/third_party/abseil-cpp/absl/base/port.h +26 -0
- data/third_party/abseil-cpp/absl/base/thread_annotations.h +280 -0
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +848 -0
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +265 -0
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +892 -0
- data/third_party/abseil-cpp/absl/memory/memory.h +695 -0
- data/third_party/abseil-cpp/absl/meta/type_traits.h +759 -0
- data/third_party/abseil-cpp/absl/numeric/int128.cc +404 -0
- data/third_party/abseil-cpp/absl/numeric/int128.h +1091 -0
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +302 -0
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +308 -0
- data/third_party/abseil-cpp/absl/strings/ascii.cc +200 -0
- data/third_party/abseil-cpp/absl/strings/ascii.h +242 -0
- data/third_party/abseil-cpp/absl/strings/charconv.cc +984 -0
- data/third_party/abseil-cpp/absl/strings/charconv.h +119 -0
- data/third_party/abseil-cpp/absl/strings/escaping.cc +949 -0
- data/third_party/abseil-cpp/absl/strings/escaping.h +164 -0
- data/third_party/abseil-cpp/absl/strings/internal/char_map.h +156 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +359 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +423 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +180 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +58 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.cc +112 -0
- data/third_party/abseil-cpp/absl/strings/internal/memutil.h +148 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +36 -0
- data/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +89 -0
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +73 -0
- data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +388 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +432 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +245 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +209 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +326 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +51 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +415 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +493 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +23 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +104 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +334 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +333 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +314 -0
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +455 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.cc +53 -0
- data/third_party/abseil-cpp/absl/strings/internal/utf8.h +50 -0
- data/third_party/abseil-cpp/absl/strings/match.cc +40 -0
- data/third_party/abseil-cpp/absl/strings/match.h +90 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +965 -0
- data/third_party/abseil-cpp/absl/strings/numbers.h +266 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +246 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.h +408 -0
- data/third_party/abseil-cpp/absl/strings/str_format.h +537 -0
- data/third_party/abseil-cpp/absl/strings/str_join.h +293 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.cc +82 -0
- data/third_party/abseil-cpp/absl/strings/str_replace.h +219 -0
- data/third_party/abseil-cpp/absl/strings/str_split.cc +139 -0
- data/third_party/abseil-cpp/absl/strings/str_split.h +513 -0
- data/third_party/abseil-cpp/absl/strings/string_view.cc +235 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +622 -0
- data/third_party/abseil-cpp/absl/strings/strip.h +91 -0
- data/third_party/abseil-cpp/absl/strings/substitute.cc +171 -0
- data/third_party/abseil-cpp/absl/strings/substitute.h +693 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.cc +48 -0
- data/third_party/abseil-cpp/absl/types/bad_optional_access.h +78 -0
- data/third_party/abseil-cpp/absl/types/internal/optional.h +396 -0
- data/third_party/abseil-cpp/absl/types/internal/span.h +128 -0
- data/third_party/abseil-cpp/absl/types/optional.h +776 -0
- data/third_party/abseil-cpp/absl/types/span.h +713 -0
- data/third_party/abseil-cpp/absl/utility/utility.h +350 -0
- data/{src/boringssl → third_party/boringssl-with-bazel}/err_data.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bitstr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bool.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_d2i_fp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_dup.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_enum.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_gentm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_i2d_fp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_int.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_mbstr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_object.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_octet.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_print.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_strnid.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_time.c +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_type.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utctm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utf8.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_lib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_locl.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_par.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn_pack.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_enum.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_int.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_string.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_dec.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_enc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_fre.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_new.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_typ.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_utl.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/time_support.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/base64/base64.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio_mem.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/connect.c +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/fd.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/file.c +5 -6
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/hexdump.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/pair.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/printf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket_helper.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/bn_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/convert.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/buf/buf.c +10 -69
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/asn1_compat.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/ber.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbb.c +41 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbs.c +60 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/unicode.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/chacha.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/cipher_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/derive_key.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesccm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesctrhmac.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesgcmsiv.c +8 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_chacha20poly1305.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_null.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc2.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc4.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_tls.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/tls_cbc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cmac/cmac.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf_def.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-fuchsia.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-linux.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-intel.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-ppc64le.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/crypto.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/curve25519/spake25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/check.c +3 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/params.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/digest_extra/digest_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_derive.c +2 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdh_extra/ecdh_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdsa_extra/ecdsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/engine/engine.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/err.c +6 -6
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/digestsign.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_ctx.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_dsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa.c +14 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519_asn1.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/pbkdf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/print.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/scrypt.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/sign.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ex_data.c +0 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/internal.h +5 -7
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/key_wrap.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/mode_wrappers.c +0 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bcm.c +2 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/add.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/asm/x86_64-gcc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bn.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bytes.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/cmp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/ctx.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/exponentiation.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/generic.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/jacobi.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery_inv.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/mul.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/prime.c +11 -12
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/random.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/shift.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/sqrt.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/aead.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/cipher.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_aes.c +3 -5
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_des.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/delocate.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/des.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digest.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digests.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/md32_common.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_key.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_montgomery.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/felem.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/oct.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p224-64.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64-table.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/scalar.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple_mul.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/util.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/wnaf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdh/ecdh.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdsa/ecdsa.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/fips_shared_support.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/hmac/hmac.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/is_fips.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md4/md4.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/md5.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cbc.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cfb.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ctr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/gcm.c +45 -193
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/internal.h +8 -18
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ofb.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/polyval.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/ctrdrbg.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/rand.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/urandom.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/blinding.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/padding.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa.c +7 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa_impl.c +60 -51
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/self_check/self_check.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1-altivec.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha256.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha512.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/kdf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hkdf/hkdf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/hrss.c +210 -311
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/internal.h +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/internal.h +21 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/lhash/lhash.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/mem.c +70 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj.c +16 -21
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_dat.h +27 -6
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_xref.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_all.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_info.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_lib.c +7 -7
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_oth.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pk8.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pkey.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_xaux.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7_x509.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/p5_pbev2.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305.c +2 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_arm.c +21 -20
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_vec.c +34 -17
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/pool.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/deterministic.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/forkunsafe.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/fuchsia.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/rand_extra.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/windows.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rc4/rc4.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_c11.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_lock.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_asn1.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_print.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/siphash/siphash.c +3 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/stack/stack.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_none.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_pthread.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_win.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_digest.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_sign.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_strex.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_verify.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/algorithm.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/asn1_gen.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_dir.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_file.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/charmap.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/i2d_pr.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/rsa_pss.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_crl.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_req.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509a.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/vpm_int.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_att.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_cmp.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_d2.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_def.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_ext.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_lu.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_obj.c +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_r2x.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_req.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_set.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_trs.c +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_txt.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_v3.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vfy.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vpm.c +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509cset.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509name.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509rset.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509spki.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_algor.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_all.c +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_attrib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_crl.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_exten.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_info.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_name.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pkey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pubkey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_req.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_sig.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_spki.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_val.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509a.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/ext_dat.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_cache.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_data.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_int.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_lib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_map.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_node.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_tree.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akeya.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_alt.c +3 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bcons.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bitst.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_conf.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_cpols.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_crld.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_enum.c +2 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_extku.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_genn.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ia5.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_info.c +4 -5
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_int.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_lib.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ncons.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ocsp.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pci.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcia.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcons.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pku.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pmaps.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_prn.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_purp.c +2 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_skey.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_sxnet.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_utl.c +11 -12
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aead.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aes.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/arm_arch.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1_mac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1t.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base64.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bio.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/blowfish.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bn.h +32 -20
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buf.h +9 -9
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buffer.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bytestring.h +34 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cast.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/chacha.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cipher.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cmac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/conf.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cpu.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/crypto.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/curve25519.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/des.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dh.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/digest.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dsa.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dtls1.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/e_os2.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec.h +11 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec_key.h +4 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdh.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdsa.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/engine.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/err.h +11 -9
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/evp.h +20 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ex_data.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hkdf.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hmac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hrss.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/is_boringssl.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/lhash.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md4.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md5.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/mem.h +17 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/nid.h +9 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj_mac.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/objects.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslconf.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslv.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ossl_typ.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pem.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs12.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs7.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs8.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/poly1305.h +5 -7
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pool.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rand.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rc4.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ripemd.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rsa.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/safestack.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/sha.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/siphash.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/span.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/srtp.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl.h +10 -20
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl3.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/stack.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/thread.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/tls1.h +0 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/type_check.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509_vfy.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509v3.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/bio_ssl.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_both.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_lib.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_pkt.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_srtp.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_method.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_record.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handoff.cc +126 -29
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake.cc +5 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_client.cc +24 -13
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_server.cc +1 -5
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/internal.h +32 -26
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_both.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_lib.cc +2 -3
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_pkt.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_aead_ctx.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_asn1.cc +1 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_buffer.cc +34 -15
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cert.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cipher.cc +0 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_file.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_key_share.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_lib.cc +13 -14
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_privkey.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_session.cc +2 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_stat.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_transcript.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_versions.cc +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_x509.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_enc.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_lib.cc +11 -171
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_both.cc +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_client.cc +3 -4
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_enc.cc +5 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_server.cc +78 -101
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_method.cc +1 -1
- data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_record.cc +7 -2
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_32.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_64.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_tables.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/internal.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256.c +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_32.h +0 -0
- data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_64.h +0 -0
- data/third_party/upb/upb/decode.c +4 -0
- data/third_party/upb/upb/port.c +0 -1
- data/third_party/upb/upb/port_def.inc +1 -3
- data/third_party/upb/upb/table.c +2 -1
- metadata +680 -505
- data/src/core/lib/iomgr/logical_thread.cc +0 -103
- data/src/core/lib/iomgr/logical_thread.h +0 -52
- data/src/core/lib/json/json.cc +0 -94
- data/src/core/lib/json/json_reader.h +0 -146
- data/src/core/lib/json/json_string.cc +0 -367
- data/src/core/lib/json/json_writer.h +0 -84
- data/third_party/boringssl/crypto/fipsmodule/aes/aes.c +0 -860
@@ -0,0 +1,83 @@
|
|
1
|
+
//
|
2
|
+
// Copyright 2018 gRPC authors.
|
3
|
+
//
|
4
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
// you may not use this file except in compliance with the License.
|
6
|
+
// You may obtain a copy of the License at
|
7
|
+
//
|
8
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
//
|
10
|
+
// Unless required by applicable law or agreed to in writing, software
|
11
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
// See the License for the specific language governing permissions and
|
14
|
+
// limitations under the License.
|
15
|
+
//
|
16
|
+
|
17
|
+
#ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H
|
18
|
+
#define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H
|
19
|
+
|
20
|
+
#include <grpc/support/port_platform.h>
|
21
|
+
|
22
|
+
#include "src/core/ext/filters/client_channel/lb_policy.h"
|
23
|
+
#include "src/core/lib/debug/trace.h"
|
24
|
+
#include "src/core/lib/gprpp/orphanable.h"
|
25
|
+
|
26
|
+
namespace grpc_core {
|
27
|
+
|
28
|
+
// A class that makes it easy to gracefully switch child policies.
|
29
|
+
//
|
30
|
+
// Callers should instantiate this instead of using
|
31
|
+
// LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(). Once
|
32
|
+
// instantiated, this object will automatically take care of
|
33
|
+
// constructing the child policy as needed upon receiving an update.
|
34
|
+
class ChildPolicyHandler : public LoadBalancingPolicy {
|
35
|
+
public:
|
36
|
+
ChildPolicyHandler(Args args, TraceFlag* tracer)
|
37
|
+
: LoadBalancingPolicy(std::move(args)), tracer_(tracer) {}
|
38
|
+
|
39
|
+
virtual const char* name() const override { return "child_policy_handler"; }
|
40
|
+
|
41
|
+
void UpdateLocked(UpdateArgs args) override;
|
42
|
+
void ExitIdleLocked() override;
|
43
|
+
void ResetBackoffLocked() override;
|
44
|
+
|
45
|
+
// Returns true if transitioning from the old config to the new config
|
46
|
+
// requires instantiating a new policy object.
|
47
|
+
virtual bool ConfigChangeRequiresNewPolicyInstance(
|
48
|
+
LoadBalancingPolicy::Config* old_config,
|
49
|
+
LoadBalancingPolicy::Config* new_config) const;
|
50
|
+
|
51
|
+
// Instantiates a new policy of the specified name.
|
52
|
+
// May be overridden by subclasses to avoid recursion when an LB
|
53
|
+
// policy factory returns a ChildPolicyHandler.
|
54
|
+
virtual OrphanablePtr<LoadBalancingPolicy> CreateLoadBalancingPolicy(
|
55
|
+
const char* name, LoadBalancingPolicy::Args args) const;
|
56
|
+
|
57
|
+
private:
|
58
|
+
class Helper;
|
59
|
+
|
60
|
+
void ShutdownLocked() override;
|
61
|
+
|
62
|
+
OrphanablePtr<LoadBalancingPolicy> CreateChildPolicy(
|
63
|
+
const char* child_policy_name, const grpc_channel_args& args);
|
64
|
+
|
65
|
+
// Passed in from caller at construction time.
|
66
|
+
TraceFlag* tracer_;
|
67
|
+
|
68
|
+
bool shutting_down_ = false;
|
69
|
+
|
70
|
+
// The most recent config passed to UpdateLocked().
|
71
|
+
// If pending_child_policy_ is non-null, this is the config passed to
|
72
|
+
// pending_child_policy_; otherwise, it's the config passed to child_policy_.
|
73
|
+
RefCountedPtr<LoadBalancingPolicy::Config> current_config_;
|
74
|
+
|
75
|
+
// Child LB policy.
|
76
|
+
OrphanablePtr<LoadBalancingPolicy> child_policy_;
|
77
|
+
OrphanablePtr<LoadBalancingPolicy> pending_child_policy_;
|
78
|
+
};
|
79
|
+
|
80
|
+
} // namespace grpc_core
|
81
|
+
|
82
|
+
#endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_CHILD_POLICY_HANDLER_H \
|
83
|
+
*/
|
@@ -71,6 +71,7 @@
|
|
71
71
|
#include <grpc/support/time.h>
|
72
72
|
|
73
73
|
#include "src/core/ext/filters/client_channel/client_channel.h"
|
74
|
+
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
74
75
|
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/client_load_reporting_filter.h"
|
75
76
|
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.h"
|
76
77
|
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel.h"
|
@@ -121,10 +122,9 @@ namespace {
|
|
121
122
|
|
122
123
|
constexpr char kGrpclb[] = "grpclb";
|
123
124
|
|
124
|
-
class
|
125
|
+
class GrpcLbConfig : public LoadBalancingPolicy::Config {
|
125
126
|
public:
|
126
|
-
explicit
|
127
|
-
RefCountedPtr<LoadBalancingPolicy::Config> child_policy)
|
127
|
+
explicit GrpcLbConfig(RefCountedPtr<LoadBalancingPolicy::Config> child_policy)
|
128
128
|
: child_policy_(std::move(child_policy)) {}
|
129
129
|
const char* name() const override { return kGrpclb; }
|
130
130
|
|
@@ -172,8 +172,6 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
172
172
|
void ScheduleNextClientLoadReportLocked();
|
173
173
|
void SendClientLoadReportLocked();
|
174
174
|
|
175
|
-
static bool LoadReportCountersAreZero(grpc_grpclb_request* request);
|
176
|
-
|
177
175
|
static void MaybeSendClientLoadReport(void* arg, grpc_error* error);
|
178
176
|
static void ClientLoadReportDone(void* arg, grpc_error* error);
|
179
177
|
static void OnInitialRequestSent(void* arg, grpc_error* error);
|
@@ -227,14 +225,12 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
227
225
|
class Serverlist : public RefCounted<Serverlist> {
|
228
226
|
public:
|
229
227
|
// Takes ownership of serverlist.
|
230
|
-
explicit Serverlist(
|
231
|
-
: serverlist_(serverlist) {}
|
232
|
-
|
233
|
-
~Serverlist() { grpc_grpclb_destroy_serverlist(serverlist_); }
|
228
|
+
explicit Serverlist(std::vector<GrpcLbServer> serverlist)
|
229
|
+
: serverlist_(std::move(serverlist)) {}
|
234
230
|
|
235
231
|
bool operator==(const Serverlist& other) const;
|
236
232
|
|
237
|
-
const
|
233
|
+
const std::vector<GrpcLbServer>& serverlist() const { return serverlist_; }
|
238
234
|
|
239
235
|
// Returns a text representation suitable for logging.
|
240
236
|
grpc_core::UniquePtr<char> AsText() const;
|
@@ -257,7 +253,7 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
257
253
|
const char* ShouldDrop();
|
258
254
|
|
259
255
|
private:
|
260
|
-
|
256
|
+
std::vector<GrpcLbServer> serverlist_;
|
261
257
|
|
262
258
|
// Guarded by the channel's data plane combiner, NOT the control
|
263
259
|
// plane combiner. It should not be accessed by anything but the
|
@@ -301,14 +297,8 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
301
297
|
void RequestReresolution() override;
|
302
298
|
void AddTraceEvent(TraceSeverity severity, StringView message) override;
|
303
299
|
|
304
|
-
void set_child(LoadBalancingPolicy* child) { child_ = child; }
|
305
|
-
|
306
300
|
private:
|
307
|
-
bool CalledByPendingChild() const;
|
308
|
-
bool CalledByCurrentChild() const;
|
309
|
-
|
310
301
|
RefCountedPtr<GrpcLb> parent_;
|
311
|
-
LoadBalancingPolicy* child_ = nullptr;
|
312
302
|
};
|
313
303
|
|
314
304
|
~GrpcLb();
|
@@ -339,7 +329,7 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
339
329
|
grpc_channel_args* CreateChildPolicyArgsLocked(
|
340
330
|
bool is_backend_from_grpclb_load_balancer);
|
341
331
|
OrphanablePtr<LoadBalancingPolicy> CreateChildPolicyLocked(
|
342
|
-
const
|
332
|
+
const grpc_channel_args* args);
|
343
333
|
void CreateOrUpdateChildPolicyLocked();
|
344
334
|
|
345
335
|
// Who the client is trying to communicate with.
|
@@ -390,9 +380,6 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
390
380
|
|
391
381
|
// The child policy to use for the backends.
|
392
382
|
OrphanablePtr<LoadBalancingPolicy> child_policy_;
|
393
|
-
// When switching child policies, the new policy will be stored here
|
394
|
-
// until it reports READY, at which point it will be moved to child_policy_.
|
395
|
-
OrphanablePtr<LoadBalancingPolicy> pending_child_policy_;
|
396
383
|
// The child policy config.
|
397
384
|
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_config_;
|
398
385
|
// Child policy in state READY.
|
@@ -404,28 +391,26 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
404
391
|
//
|
405
392
|
|
406
393
|
bool GrpcLb::Serverlist::operator==(const Serverlist& other) const {
|
407
|
-
return
|
394
|
+
return serverlist_ == other.serverlist_;
|
408
395
|
}
|
409
396
|
|
410
|
-
void ParseServer(const
|
411
|
-
grpc_resolved_address* addr) {
|
397
|
+
void ParseServer(const GrpcLbServer& server, grpc_resolved_address* addr) {
|
412
398
|
memset(addr, 0, sizeof(*addr));
|
413
|
-
if (server
|
414
|
-
const uint16_t netorder_port = grpc_htons((uint16_t)server
|
399
|
+
if (server.drop) return;
|
400
|
+
const uint16_t netorder_port = grpc_htons((uint16_t)server.port);
|
415
401
|
/* the addresses are given in binary format (a in(6)_addr struct) in
|
416
402
|
* server->ip_address.bytes. */
|
417
|
-
|
418
|
-
if (ip.size == 4) {
|
403
|
+
if (server.ip_size == 4) {
|
419
404
|
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in));
|
420
405
|
grpc_sockaddr_in* addr4 = reinterpret_cast<grpc_sockaddr_in*>(&addr->addr);
|
421
406
|
addr4->sin_family = GRPC_AF_INET;
|
422
|
-
memcpy(&addr4->sin_addr,
|
407
|
+
memcpy(&addr4->sin_addr, server.ip_addr, server.ip_size);
|
423
408
|
addr4->sin_port = netorder_port;
|
424
|
-
} else if (
|
409
|
+
} else if (server.ip_size == 16) {
|
425
410
|
addr->len = static_cast<socklen_t>(sizeof(grpc_sockaddr_in6));
|
426
411
|
grpc_sockaddr_in6* addr6 = (grpc_sockaddr_in6*)&addr->addr;
|
427
412
|
addr6->sin6_family = GRPC_AF_INET6;
|
428
|
-
memcpy(&addr6->sin6_addr,
|
413
|
+
memcpy(&addr6->sin6_addr, server.ip_addr, server.ip_size);
|
429
414
|
addr6->sin6_port = netorder_port;
|
430
415
|
}
|
431
416
|
}
|
@@ -433,10 +418,10 @@ void ParseServer(const grpc_grpclb_server* server,
|
|
433
418
|
grpc_core::UniquePtr<char> GrpcLb::Serverlist::AsText() const {
|
434
419
|
gpr_strvec entries;
|
435
420
|
gpr_strvec_init(&entries);
|
436
|
-
for (size_t i = 0; i < serverlist_
|
437
|
-
const
|
421
|
+
for (size_t i = 0; i < serverlist_.size(); ++i) {
|
422
|
+
const GrpcLbServer& server = serverlist_[i];
|
438
423
|
char* ipport;
|
439
|
-
if (server
|
424
|
+
if (server.drop) {
|
440
425
|
ipport = gpr_strdup("(drop)");
|
441
426
|
} else {
|
442
427
|
grpc_resolved_address addr;
|
@@ -445,7 +430,7 @@ grpc_core::UniquePtr<char> GrpcLb::Serverlist::AsText() const {
|
|
445
430
|
}
|
446
431
|
char* entry;
|
447
432
|
gpr_asprintf(&entry, " %" PRIuPTR ": %s token=%s\n", i, ipport,
|
448
|
-
server
|
433
|
+
server.load_balance_token);
|
449
434
|
gpr_free(ipport);
|
450
435
|
gpr_strvec_add(&entries, entry);
|
451
436
|
}
|
@@ -492,23 +477,22 @@ const grpc_arg_pointer_vtable lb_token_arg_vtable = {
|
|
492
477
|
const grpc_arg_pointer_vtable client_stats_arg_vtable = {
|
493
478
|
client_stats_copy, client_stats_destroy, equal_cmp};
|
494
479
|
|
495
|
-
bool IsServerValid(const
|
496
|
-
if (server
|
497
|
-
|
498
|
-
if (GPR_UNLIKELY(server->port >> 16 != 0)) {
|
480
|
+
bool IsServerValid(const GrpcLbServer& server, size_t idx, bool log) {
|
481
|
+
if (server.drop) return false;
|
482
|
+
if (GPR_UNLIKELY(server.port >> 16 != 0)) {
|
499
483
|
if (log) {
|
500
484
|
gpr_log(GPR_ERROR,
|
501
485
|
"Invalid port '%d' at index %lu of serverlist. Ignoring.",
|
502
|
-
server
|
486
|
+
server.port, (unsigned long)idx);
|
503
487
|
}
|
504
488
|
return false;
|
505
489
|
}
|
506
|
-
if (GPR_UNLIKELY(
|
490
|
+
if (GPR_UNLIKELY(server.ip_size != 4 && server.ip_size != 16)) {
|
507
491
|
if (log) {
|
508
492
|
gpr_log(GPR_ERROR,
|
509
493
|
"Expected IP to be 4 or 16 bytes, got %d at index %lu of "
|
510
494
|
"serverlist. Ignoring",
|
511
|
-
|
495
|
+
server.ip_size, (unsigned long)idx);
|
512
496
|
}
|
513
497
|
return false;
|
514
498
|
}
|
@@ -519,20 +503,20 @@ bool IsServerValid(const grpc_grpclb_server* server, size_t idx, bool log) {
|
|
519
503
|
ServerAddressList GrpcLb::Serverlist::GetServerAddressList(
|
520
504
|
GrpcLbClientStats* client_stats) const {
|
521
505
|
ServerAddressList addresses;
|
522
|
-
for (size_t i = 0; i < serverlist_
|
523
|
-
const
|
524
|
-
if (!IsServerValid(
|
506
|
+
for (size_t i = 0; i < serverlist_.size(); ++i) {
|
507
|
+
const GrpcLbServer& server = serverlist_[i];
|
508
|
+
if (!IsServerValid(server, i, false)) continue;
|
525
509
|
// Address processing.
|
526
510
|
grpc_resolved_address addr;
|
527
511
|
ParseServer(server, &addr);
|
528
512
|
// LB token processing.
|
529
|
-
char lb_token[GPR_ARRAY_SIZE(server
|
530
|
-
if (server
|
513
|
+
char lb_token[GPR_ARRAY_SIZE(server.load_balance_token) + 1];
|
514
|
+
if (server.load_balance_token[0] != 0) {
|
531
515
|
const size_t lb_token_max_length =
|
532
|
-
GPR_ARRAY_SIZE(server
|
516
|
+
GPR_ARRAY_SIZE(server.load_balance_token);
|
533
517
|
const size_t lb_token_length =
|
534
|
-
strnlen(server
|
535
|
-
memcpy(lb_token, server
|
518
|
+
strnlen(server.load_balance_token, lb_token_max_length);
|
519
|
+
memcpy(lb_token, server.load_balance_token, lb_token_length);
|
536
520
|
lb_token[lb_token_length] = '\0';
|
537
521
|
} else {
|
538
522
|
char* uri = grpc_sockaddr_to_uri(&addr);
|
@@ -561,18 +545,18 @@ ServerAddressList GrpcLb::Serverlist::GetServerAddressList(
|
|
561
545
|
}
|
562
546
|
|
563
547
|
bool GrpcLb::Serverlist::ContainsAllDropEntries() const {
|
564
|
-
if (serverlist_
|
565
|
-
for (
|
566
|
-
if (!
|
548
|
+
if (serverlist_.empty()) return false;
|
549
|
+
for (const GrpcLbServer& server : serverlist_) {
|
550
|
+
if (!server.drop) return false;
|
567
551
|
}
|
568
552
|
return true;
|
569
553
|
}
|
570
554
|
|
571
555
|
const char* GrpcLb::Serverlist::ShouldDrop() {
|
572
|
-
if (serverlist_
|
573
|
-
|
574
|
-
drop_index_ = (drop_index_ + 1) % serverlist_
|
575
|
-
return server
|
556
|
+
if (serverlist_.empty()) return nullptr;
|
557
|
+
GrpcLbServer& server = serverlist_[drop_index_];
|
558
|
+
drop_index_ = (drop_index_ + 1) % serverlist_.size();
|
559
|
+
return server.drop ? server.load_balance_token : nullptr;
|
576
560
|
}
|
577
561
|
|
578
562
|
//
|
@@ -637,46 +621,15 @@ GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
|
|
637
621
|
// GrpcLb::Helper
|
638
622
|
//
|
639
623
|
|
640
|
-
bool GrpcLb::Helper::CalledByPendingChild() const {
|
641
|
-
GPR_ASSERT(child_ != nullptr);
|
642
|
-
return child_ == parent_->pending_child_policy_.get();
|
643
|
-
}
|
644
|
-
|
645
|
-
bool GrpcLb::Helper::CalledByCurrentChild() const {
|
646
|
-
GPR_ASSERT(child_ != nullptr);
|
647
|
-
return child_ == parent_->child_policy_.get();
|
648
|
-
}
|
649
|
-
|
650
624
|
RefCountedPtr<SubchannelInterface> GrpcLb::Helper::CreateSubchannel(
|
651
625
|
const grpc_channel_args& args) {
|
652
|
-
if (parent_->shutting_down_
|
653
|
-
(!CalledByPendingChild() && !CalledByCurrentChild())) {
|
654
|
-
return nullptr;
|
655
|
-
}
|
626
|
+
if (parent_->shutting_down_) return nullptr;
|
656
627
|
return parent_->channel_control_helper()->CreateSubchannel(args);
|
657
628
|
}
|
658
629
|
|
659
630
|
void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
660
631
|
std::unique_ptr<SubchannelPicker> picker) {
|
661
632
|
if (parent_->shutting_down_) return;
|
662
|
-
// If this request is from the pending child policy, ignore it until
|
663
|
-
// it reports READY, at which point we swap it into place.
|
664
|
-
if (CalledByPendingChild()) {
|
665
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
666
|
-
gpr_log(GPR_INFO,
|
667
|
-
"[grpclb %p helper %p] pending child policy %p reports state=%s",
|
668
|
-
parent_.get(), this, parent_->pending_child_policy_.get(),
|
669
|
-
ConnectivityStateName(state));
|
670
|
-
}
|
671
|
-
if (state != GRPC_CHANNEL_READY) return;
|
672
|
-
grpc_pollset_set_del_pollset_set(
|
673
|
-
parent_->child_policy_->interested_parties(),
|
674
|
-
parent_->interested_parties());
|
675
|
-
parent_->child_policy_ = std::move(parent_->pending_child_policy_);
|
676
|
-
} else if (!CalledByCurrentChild()) {
|
677
|
-
// This request is from an outdated child, so ignore it.
|
678
|
-
return;
|
679
|
-
}
|
680
633
|
// Record whether child policy reports READY.
|
681
634
|
parent_->child_policy_ready_ = state == GRPC_CHANNEL_READY;
|
682
635
|
// Enter fallback mode if needed.
|
@@ -722,22 +675,13 @@ void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
|
722
675
|
client_stats = parent_->lb_calld_->client_stats()->Ref();
|
723
676
|
}
|
724
677
|
parent_->channel_control_helper()->UpdateState(
|
725
|
-
state,
|
678
|
+
state,
|
679
|
+
absl::make_unique<Picker>(parent_.get(), parent_->serverlist_,
|
726
680
|
std::move(picker), std::move(client_stats)));
|
727
681
|
}
|
728
682
|
|
729
683
|
void GrpcLb::Helper::RequestReresolution() {
|
730
684
|
if (parent_->shutting_down_) return;
|
731
|
-
const LoadBalancingPolicy* latest_child_policy =
|
732
|
-
parent_->pending_child_policy_ != nullptr
|
733
|
-
? parent_->pending_child_policy_.get()
|
734
|
-
: parent_->child_policy_.get();
|
735
|
-
if (child_ != latest_child_policy) return;
|
736
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
737
|
-
gpr_log(GPR_INFO,
|
738
|
-
"[grpclb %p] Re-resolution requested from %schild policy (%p).",
|
739
|
-
parent_.get(), CalledByPendingChild() ? "pending " : "", child_);
|
740
|
-
}
|
741
685
|
// If we are talking to a balancer, we expect to get updated addresses
|
742
686
|
// from the balancer, so we can ignore the re-resolution request from
|
743
687
|
// the child policy. Otherwise, pass the re-resolution request up to the
|
@@ -749,10 +693,7 @@ void GrpcLb::Helper::RequestReresolution() {
|
|
749
693
|
}
|
750
694
|
|
751
695
|
void GrpcLb::Helper::AddTraceEvent(TraceSeverity severity, StringView message) {
|
752
|
-
if (parent_->shutting_down_
|
753
|
-
(!CalledByPendingChild() && !CalledByCurrentChild())) {
|
754
|
-
return;
|
755
|
-
}
|
696
|
+
if (parent_->shutting_down_) return;
|
756
697
|
parent_->channel_control_helper()->AddTraceEvent(severity, message);
|
757
698
|
}
|
758
699
|
|
@@ -782,10 +723,8 @@ GrpcLb::BalancerCallState::BalancerCallState(
|
|
782
723
|
nullptr, deadline, nullptr);
|
783
724
|
// Init the LB call request payload.
|
784
725
|
upb::Arena arena;
|
785
|
-
grpc_grpclb_request* request =
|
786
|
-
grpc_grpclb_request_create(grpclb_policy()->server_name_, arena.ptr());
|
787
726
|
grpc_slice request_payload_slice =
|
788
|
-
|
727
|
+
GrpcLbRequestCreate(grpclb_policy()->server_name_, arena.ptr());
|
789
728
|
send_message_payload_ =
|
790
729
|
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
|
791
730
|
grpc_slice_unref_internal(request_payload_slice);
|
@@ -936,33 +875,24 @@ void GrpcLb::BalancerCallState::MaybeSendClientLoadReportLocked(
|
|
936
875
|
}
|
937
876
|
}
|
938
877
|
|
939
|
-
bool GrpcLb::BalancerCallState::LoadReportCountersAreZero(
|
940
|
-
grpc_grpclb_request* request) {
|
941
|
-
const grpc_lb_v1_ClientStats* cstats =
|
942
|
-
grpc_lb_v1_LoadBalanceRequest_client_stats(request);
|
943
|
-
if (cstats == nullptr) {
|
944
|
-
return true;
|
945
|
-
}
|
946
|
-
size_t drop_count;
|
947
|
-
grpc_lb_v1_ClientStats_calls_finished_with_drop(cstats, &drop_count);
|
948
|
-
return grpc_lb_v1_ClientStats_num_calls_started(cstats) == 0 &&
|
949
|
-
grpc_lb_v1_ClientStats_num_calls_finished(cstats) == 0 &&
|
950
|
-
grpc_lb_v1_ClientStats_num_calls_finished_with_client_failed_to_send(
|
951
|
-
cstats) == 0 &&
|
952
|
-
grpc_lb_v1_ClientStats_num_calls_finished_known_received(cstats) ==
|
953
|
-
0 &&
|
954
|
-
drop_count == 0;
|
955
|
-
}
|
956
|
-
|
957
878
|
void GrpcLb::BalancerCallState::SendClientLoadReportLocked() {
|
958
879
|
// Construct message payload.
|
959
880
|
GPR_ASSERT(send_message_payload_ == nullptr);
|
960
|
-
|
961
|
-
|
962
|
-
|
881
|
+
// Get snapshot of stats.
|
882
|
+
int64_t num_calls_started;
|
883
|
+
int64_t num_calls_finished;
|
884
|
+
int64_t num_calls_finished_with_client_failed_to_send;
|
885
|
+
int64_t num_calls_finished_known_received;
|
886
|
+
std::unique_ptr<GrpcLbClientStats::DroppedCallCounts> drop_token_counts;
|
887
|
+
client_stats_->Get(&num_calls_started, &num_calls_finished,
|
888
|
+
&num_calls_finished_with_client_failed_to_send,
|
889
|
+
&num_calls_finished_known_received, &drop_token_counts);
|
963
890
|
// Skip client load report if the counters were all zero in the last
|
964
891
|
// report and they are still zero in this one.
|
965
|
-
if (
|
892
|
+
if (num_calls_started == 0 && num_calls_finished == 0 &&
|
893
|
+
num_calls_finished_with_client_failed_to_send == 0 &&
|
894
|
+
num_calls_finished_known_received == 0 &&
|
895
|
+
(drop_token_counts == nullptr || drop_token_counts->size() == 0)) {
|
966
896
|
if (last_client_load_report_counters_were_zero_) {
|
967
897
|
ScheduleNextClientLoadReportLocked();
|
968
898
|
return;
|
@@ -971,8 +901,12 @@ void GrpcLb::BalancerCallState::SendClientLoadReportLocked() {
|
|
971
901
|
} else {
|
972
902
|
last_client_load_report_counters_were_zero_ = false;
|
973
903
|
}
|
974
|
-
|
975
|
-
|
904
|
+
// Populate load report.
|
905
|
+
upb::Arena arena;
|
906
|
+
grpc_slice request_payload_slice = GrpcLbLoadReportRequestCreate(
|
907
|
+
num_calls_started, num_calls_finished,
|
908
|
+
num_calls_finished_with_client_failed_to_send,
|
909
|
+
num_calls_finished_known_received, drop_token_counts.get(), arena.ptr());
|
976
910
|
send_message_payload_ =
|
977
911
|
grpc_raw_byte_buffer_create(&request_payload_slice, 1);
|
978
912
|
grpc_slice_unref_internal(request_payload_slice);
|
@@ -1064,107 +998,10 @@ void GrpcLb::BalancerCallState::OnBalancerMessageReceivedLocked(
|
|
1064
998
|
grpc_byte_buffer_reader_destroy(&bbr);
|
1065
999
|
grpc_byte_buffer_destroy(lb_calld->recv_message_payload_);
|
1066
1000
|
lb_calld->recv_message_payload_ = nullptr;
|
1067
|
-
|
1068
|
-
grpc_grpclb_serverlist* serverlist;
|
1001
|
+
GrpcLbResponse response;
|
1069
1002
|
upb::Arena arena;
|
1070
|
-
if (!
|
1071
|
-
(
|
1072
|
-
response_slice, arena.ptr())) != nullptr) {
|
1073
|
-
// Have NOT seen initial response, look for initial response.
|
1074
|
-
const google_protobuf_Duration* client_stats_report_interval =
|
1075
|
-
grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval(
|
1076
|
-
initial_response);
|
1077
|
-
if (client_stats_report_interval != nullptr) {
|
1078
|
-
lb_calld->client_stats_report_interval_ =
|
1079
|
-
GPR_MAX(GPR_MS_PER_SEC,
|
1080
|
-
grpc_grpclb_duration_to_millis(client_stats_report_interval));
|
1081
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1082
|
-
gpr_log(GPR_INFO,
|
1083
|
-
"[grpclb %p] lb_calld=%p: Received initial LB response "
|
1084
|
-
"message; client load reporting interval = %" PRId64
|
1085
|
-
" milliseconds",
|
1086
|
-
grpclb_policy, lb_calld,
|
1087
|
-
lb_calld->client_stats_report_interval_);
|
1088
|
-
}
|
1089
|
-
} else if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1090
|
-
gpr_log(GPR_INFO,
|
1091
|
-
"[grpclb %p] lb_calld=%p: Received initial LB response message; "
|
1092
|
-
"client load reporting NOT enabled",
|
1093
|
-
grpclb_policy, lb_calld);
|
1094
|
-
}
|
1095
|
-
lb_calld->seen_initial_response_ = true;
|
1096
|
-
} else if ((serverlist = grpc_grpclb_response_parse_serverlist(
|
1097
|
-
response_slice)) != nullptr) {
|
1098
|
-
// Have seen initial response, look for serverlist.
|
1099
|
-
GPR_ASSERT(lb_calld->lb_call_ != nullptr);
|
1100
|
-
auto serverlist_wrapper = MakeRefCounted<Serverlist>(serverlist);
|
1101
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1102
|
-
grpc_core::UniquePtr<char> serverlist_text = serverlist_wrapper->AsText();
|
1103
|
-
gpr_log(GPR_INFO,
|
1104
|
-
"[grpclb %p] lb_calld=%p: Serverlist with %" PRIuPTR
|
1105
|
-
" servers received:\n%s",
|
1106
|
-
grpclb_policy, lb_calld, serverlist->num_servers,
|
1107
|
-
serverlist_text.get());
|
1108
|
-
}
|
1109
|
-
lb_calld->seen_serverlist_ = true;
|
1110
|
-
// Start sending client load report only after we start using the
|
1111
|
-
// serverlist returned from the current LB call.
|
1112
|
-
if (lb_calld->client_stats_report_interval_ > 0 &&
|
1113
|
-
lb_calld->client_stats_ == nullptr) {
|
1114
|
-
lb_calld->client_stats_ = MakeRefCounted<GrpcLbClientStats>();
|
1115
|
-
// Ref held by callback.
|
1116
|
-
lb_calld->Ref(DEBUG_LOCATION, "client_load_report").release();
|
1117
|
-
lb_calld->ScheduleNextClientLoadReportLocked();
|
1118
|
-
}
|
1119
|
-
// Check if the serverlist differs from the previous one.
|
1120
|
-
if (grpclb_policy->serverlist_ != nullptr &&
|
1121
|
-
*grpclb_policy->serverlist_ == *serverlist_wrapper) {
|
1122
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1123
|
-
gpr_log(GPR_INFO,
|
1124
|
-
"[grpclb %p] lb_calld=%p: Incoming server list identical to "
|
1125
|
-
"current, ignoring.",
|
1126
|
-
grpclb_policy, lb_calld);
|
1127
|
-
}
|
1128
|
-
} else { // New serverlist.
|
1129
|
-
// Dispose of the fallback.
|
1130
|
-
// TODO(roth): Ideally, we should stay in fallback mode until we
|
1131
|
-
// know that we can reach at least one of the backends in the new
|
1132
|
-
// serverlist. Unfortunately, we can't do that, since we need to
|
1133
|
-
// send the new addresses to the child policy in order to determine
|
1134
|
-
// if they are reachable, and if we don't exit fallback mode now,
|
1135
|
-
// CreateOrUpdateChildPolicyLocked() will use the fallback
|
1136
|
-
// addresses instead of the addresses from the new serverlist.
|
1137
|
-
// However, if we can't reach any of the servers in the new
|
1138
|
-
// serverlist, then the child policy will never switch away from
|
1139
|
-
// the fallback addresses, but the grpclb policy will still think
|
1140
|
-
// that we're not in fallback mode, which means that we won't send
|
1141
|
-
// updates to the child policy when the fallback addresses are
|
1142
|
-
// updated by the resolver. This is sub-optimal, but the only way
|
1143
|
-
// to fix it is to maintain a completely separate child policy for
|
1144
|
-
// fallback mode, and that's more work than we want to put into
|
1145
|
-
// the grpclb implementation at this point, since we're deprecating
|
1146
|
-
// it in favor of the xds policy. We will implement this the
|
1147
|
-
// right way in the xds policy instead.
|
1148
|
-
if (grpclb_policy->fallback_mode_) {
|
1149
|
-
gpr_log(GPR_INFO,
|
1150
|
-
"[grpclb %p] Received response from balancer; exiting "
|
1151
|
-
"fallback mode",
|
1152
|
-
grpclb_policy);
|
1153
|
-
grpclb_policy->fallback_mode_ = false;
|
1154
|
-
}
|
1155
|
-
if (grpclb_policy->fallback_at_startup_checks_pending_) {
|
1156
|
-
grpclb_policy->fallback_at_startup_checks_pending_ = false;
|
1157
|
-
grpc_timer_cancel(&grpclb_policy->lb_fallback_timer_);
|
1158
|
-
grpclb_policy->CancelBalancerChannelConnectivityWatchLocked();
|
1159
|
-
}
|
1160
|
-
// Update the serverlist in the GrpcLb instance. This serverlist
|
1161
|
-
// instance will be destroyed either upon the next update or when the
|
1162
|
-
// GrpcLb instance is destroyed.
|
1163
|
-
grpclb_policy->serverlist_ = std::move(serverlist_wrapper);
|
1164
|
-
grpclb_policy->CreateOrUpdateChildPolicyLocked();
|
1165
|
-
}
|
1166
|
-
} else {
|
1167
|
-
// No valid initial response or serverlist found.
|
1003
|
+
if (!GrpcLbResponseParse(response_slice, arena.ptr(), &response) ||
|
1004
|
+
(response.type == response.INITIAL && lb_calld->seen_initial_response_)) {
|
1168
1005
|
char* response_slice_str =
|
1169
1006
|
grpc_dump_slice(response_slice, GPR_DUMP_ASCII | GPR_DUMP_HEX);
|
1170
1007
|
gpr_log(GPR_ERROR,
|
@@ -1172,6 +1009,122 @@ void GrpcLb::BalancerCallState::OnBalancerMessageReceivedLocked(
|
|
1172
1009
|
"Ignoring.",
|
1173
1010
|
grpclb_policy, lb_calld, response_slice_str);
|
1174
1011
|
gpr_free(response_slice_str);
|
1012
|
+
} else {
|
1013
|
+
switch (response.type) {
|
1014
|
+
case response.INITIAL: {
|
1015
|
+
if (response.client_stats_report_interval != 0) {
|
1016
|
+
lb_calld->client_stats_report_interval_ =
|
1017
|
+
GPR_MAX(GPR_MS_PER_SEC, response.client_stats_report_interval);
|
1018
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1019
|
+
gpr_log(GPR_INFO,
|
1020
|
+
"[grpclb %p] lb_calld=%p: Received initial LB response "
|
1021
|
+
"message; client load reporting interval = %" PRId64
|
1022
|
+
" milliseconds",
|
1023
|
+
grpclb_policy, lb_calld,
|
1024
|
+
lb_calld->client_stats_report_interval_);
|
1025
|
+
}
|
1026
|
+
} else if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1027
|
+
gpr_log(GPR_INFO,
|
1028
|
+
"[grpclb %p] lb_calld=%p: Received initial LB response "
|
1029
|
+
"message; client load reporting NOT enabled",
|
1030
|
+
grpclb_policy, lb_calld);
|
1031
|
+
}
|
1032
|
+
lb_calld->seen_initial_response_ = true;
|
1033
|
+
break;
|
1034
|
+
}
|
1035
|
+
case response.SERVERLIST: {
|
1036
|
+
GPR_ASSERT(lb_calld->lb_call_ != nullptr);
|
1037
|
+
auto serverlist_wrapper =
|
1038
|
+
MakeRefCounted<Serverlist>(std::move(response.serverlist));
|
1039
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1040
|
+
grpc_core::UniquePtr<char> serverlist_text =
|
1041
|
+
serverlist_wrapper->AsText();
|
1042
|
+
gpr_log(GPR_INFO,
|
1043
|
+
"[grpclb %p] lb_calld=%p: Serverlist with %" PRIuPTR
|
1044
|
+
" servers received:\n%s",
|
1045
|
+
grpclb_policy, lb_calld,
|
1046
|
+
serverlist_wrapper->serverlist().size(),
|
1047
|
+
serverlist_text.get());
|
1048
|
+
}
|
1049
|
+
lb_calld->seen_serverlist_ = true;
|
1050
|
+
// Start sending client load report only after we start using the
|
1051
|
+
// serverlist returned from the current LB call.
|
1052
|
+
if (lb_calld->client_stats_report_interval_ > 0 &&
|
1053
|
+
lb_calld->client_stats_ == nullptr) {
|
1054
|
+
lb_calld->client_stats_ = MakeRefCounted<GrpcLbClientStats>();
|
1055
|
+
// Ref held by callback.
|
1056
|
+
lb_calld->Ref(DEBUG_LOCATION, "client_load_report").release();
|
1057
|
+
lb_calld->ScheduleNextClientLoadReportLocked();
|
1058
|
+
}
|
1059
|
+
// Check if the serverlist differs from the previous one.
|
1060
|
+
if (grpclb_policy->serverlist_ != nullptr &&
|
1061
|
+
*grpclb_policy->serverlist_ == *serverlist_wrapper) {
|
1062
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1063
|
+
gpr_log(GPR_INFO,
|
1064
|
+
"[grpclb %p] lb_calld=%p: Incoming server list identical "
|
1065
|
+
"to current, ignoring.",
|
1066
|
+
grpclb_policy, lb_calld);
|
1067
|
+
}
|
1068
|
+
} else { // New serverlist.
|
1069
|
+
// Dispose of the fallback.
|
1070
|
+
// TODO(roth): Ideally, we should stay in fallback mode until we
|
1071
|
+
// know that we can reach at least one of the backends in the new
|
1072
|
+
// serverlist. Unfortunately, we can't do that, since we need to
|
1073
|
+
// send the new addresses to the child policy in order to determine
|
1074
|
+
// if they are reachable, and if we don't exit fallback mode now,
|
1075
|
+
// CreateOrUpdateChildPolicyLocked() will use the fallback
|
1076
|
+
// addresses instead of the addresses from the new serverlist.
|
1077
|
+
// However, if we can't reach any of the servers in the new
|
1078
|
+
// serverlist, then the child policy will never switch away from
|
1079
|
+
// the fallback addresses, but the grpclb policy will still think
|
1080
|
+
// that we're not in fallback mode, which means that we won't send
|
1081
|
+
// updates to the child policy when the fallback addresses are
|
1082
|
+
// updated by the resolver. This is sub-optimal, but the only way
|
1083
|
+
// to fix it is to maintain a completely separate child policy for
|
1084
|
+
// fallback mode, and that's more work than we want to put into
|
1085
|
+
// the grpclb implementation at this point, since we're deprecating
|
1086
|
+
// it in favor of the xds policy. We will implement this the
|
1087
|
+
// right way in the xds policy instead.
|
1088
|
+
if (grpclb_policy->fallback_mode_) {
|
1089
|
+
gpr_log(GPR_INFO,
|
1090
|
+
"[grpclb %p] Received response from balancer; exiting "
|
1091
|
+
"fallback mode",
|
1092
|
+
grpclb_policy);
|
1093
|
+
grpclb_policy->fallback_mode_ = false;
|
1094
|
+
}
|
1095
|
+
if (grpclb_policy->fallback_at_startup_checks_pending_) {
|
1096
|
+
grpclb_policy->fallback_at_startup_checks_pending_ = false;
|
1097
|
+
grpc_timer_cancel(&grpclb_policy->lb_fallback_timer_);
|
1098
|
+
grpclb_policy->CancelBalancerChannelConnectivityWatchLocked();
|
1099
|
+
}
|
1100
|
+
// Update the serverlist in the GrpcLb instance. This serverlist
|
1101
|
+
// instance will be destroyed either upon the next update or when the
|
1102
|
+
// GrpcLb instance is destroyed.
|
1103
|
+
grpclb_policy->serverlist_ = std::move(serverlist_wrapper);
|
1104
|
+
grpclb_policy->CreateOrUpdateChildPolicyLocked();
|
1105
|
+
}
|
1106
|
+
break;
|
1107
|
+
}
|
1108
|
+
case response.FALLBACK: {
|
1109
|
+
if (!grpclb_policy->fallback_mode_) {
|
1110
|
+
gpr_log(GPR_INFO,
|
1111
|
+
"[grpclb %p] Entering fallback mode as requested by balancer",
|
1112
|
+
grpclb_policy);
|
1113
|
+
if (grpclb_policy->fallback_at_startup_checks_pending_) {
|
1114
|
+
grpclb_policy->fallback_at_startup_checks_pending_ = false;
|
1115
|
+
grpc_timer_cancel(&grpclb_policy->lb_fallback_timer_);
|
1116
|
+
grpclb_policy->CancelBalancerChannelConnectivityWatchLocked();
|
1117
|
+
}
|
1118
|
+
grpclb_policy->fallback_mode_ = true;
|
1119
|
+
grpclb_policy->CreateOrUpdateChildPolicyLocked();
|
1120
|
+
// Reset serverlist, so that if the balancer exits fallback
|
1121
|
+
// mode by sending the same serverlist we were previously
|
1122
|
+
// using, we don't incorrectly ignore it as a duplicate.
|
1123
|
+
grpclb_policy->serverlist_.reset();
|
1124
|
+
}
|
1125
|
+
break;
|
1126
|
+
}
|
1127
|
+
}
|
1175
1128
|
}
|
1176
1129
|
grpc_slice_unref_internal(response_slice);
|
1177
1130
|
if (!grpclb_policy->shutting_down_) {
|
@@ -1406,13 +1359,8 @@ void GrpcLb::ShutdownLocked() {
|
|
1406
1359
|
if (child_policy_ != nullptr) {
|
1407
1360
|
grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
|
1408
1361
|
interested_parties());
|
1362
|
+
child_policy_.reset();
|
1409
1363
|
}
|
1410
|
-
if (pending_child_policy_ != nullptr) {
|
1411
|
-
grpc_pollset_set_del_pollset_set(
|
1412
|
-
pending_child_policy_->interested_parties(), interested_parties());
|
1413
|
-
}
|
1414
|
-
child_policy_.reset();
|
1415
|
-
pending_child_policy_.reset();
|
1416
1364
|
// We destroy the LB channel here instead of in our destructor because
|
1417
1365
|
// destroying the channel triggers a last callback to
|
1418
1366
|
// OnBalancerChannelConnectivityChangedLocked(), and we need to be
|
@@ -1434,15 +1382,11 @@ void GrpcLb::ResetBackoffLocked() {
|
|
1434
1382
|
if (child_policy_ != nullptr) {
|
1435
1383
|
child_policy_->ResetBackoffLocked();
|
1436
1384
|
}
|
1437
|
-
if (pending_child_policy_ != nullptr) {
|
1438
|
-
pending_child_policy_->ResetBackoffLocked();
|
1439
|
-
}
|
1440
1385
|
}
|
1441
1386
|
|
1442
1387
|
void GrpcLb::UpdateLocked(UpdateArgs args) {
|
1443
1388
|
const bool is_initial_update = lb_channel_ == nullptr;
|
1444
|
-
auto* grpclb_config =
|
1445
|
-
static_cast<const ParsedGrpcLbConfig*>(args.config.get());
|
1389
|
+
auto* grpclb_config = static_cast<const GrpcLbConfig*>(args.config.get());
|
1446
1390
|
if (grpclb_config != nullptr) {
|
1447
1391
|
child_policy_config_ = grpclb_config->child_policy();
|
1448
1392
|
} else {
|
@@ -1723,25 +1667,17 @@ grpc_channel_args* GrpcLb::CreateChildPolicyArgsLocked(
|
|
1723
1667
|
}
|
1724
1668
|
|
1725
1669
|
OrphanablePtr<LoadBalancingPolicy> GrpcLb::CreateChildPolicyLocked(
|
1726
|
-
const
|
1727
|
-
Helper* helper = new Helper(Ref());
|
1670
|
+
const grpc_channel_args* args) {
|
1728
1671
|
LoadBalancingPolicy::Args lb_policy_args;
|
1729
1672
|
lb_policy_args.combiner = combiner();
|
1730
1673
|
lb_policy_args.args = args;
|
1731
|
-
lb_policy_args.channel_control_helper =
|
1732
|
-
std::unique_ptr<ChannelControlHelper>(helper);
|
1674
|
+
lb_policy_args.channel_control_helper = absl::make_unique<Helper>(Ref());
|
1733
1675
|
OrphanablePtr<LoadBalancingPolicy> lb_policy =
|
1734
|
-
|
1735
|
-
|
1736
|
-
if (GPR_UNLIKELY(lb_policy == nullptr)) {
|
1737
|
-
gpr_log(GPR_ERROR, "[grpclb %p] Failure creating child policy %s", this,
|
1738
|
-
name);
|
1739
|
-
return nullptr;
|
1740
|
-
}
|
1741
|
-
helper->set_child(lb_policy.get());
|
1676
|
+
MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
|
1677
|
+
&grpc_lb_glb_trace);
|
1742
1678
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1743
|
-
gpr_log(GPR_INFO, "[grpclb %p] Created new child policy
|
1744
|
-
|
1679
|
+
gpr_log(GPR_INFO, "[grpclb %p] Created new child policy handler (%p)", this,
|
1680
|
+
lb_policy.get());
|
1745
1681
|
}
|
1746
1682
|
// Add the gRPC LB's interested_parties pollset_set to that of the newly
|
1747
1683
|
// created child policy. This will make the child policy progress upon
|
@@ -1772,97 +1708,16 @@ void GrpcLb::CreateOrUpdateChildPolicyLocked() {
|
|
1772
1708
|
CreateChildPolicyArgsLocked(is_backend_from_grpclb_load_balancer);
|
1773
1709
|
GPR_ASSERT(update_args.args != nullptr);
|
1774
1710
|
update_args.config = child_policy_config_;
|
1775
|
-
//
|
1776
|
-
|
1777
|
-
|
1778
|
-
// policy transitions into state READY, we swap it into child_policy_,
|
1779
|
-
// replacing the original child policy. So pending_child_policy_ is
|
1780
|
-
// non-null only between when we apply an update that changes the child
|
1781
|
-
// policy name and when the new child reports state READY.
|
1782
|
-
//
|
1783
|
-
// Updates can arrive at any point during this transition. We always
|
1784
|
-
// apply updates relative to the most recently created child policy,
|
1785
|
-
// even if the most recent one is still in pending_child_policy_. This
|
1786
|
-
// is true both when applying the updates to an existing child policy
|
1787
|
-
// and when determining whether we need to create a new policy.
|
1788
|
-
//
|
1789
|
-
// As a result of this, there are several cases to consider here:
|
1790
|
-
//
|
1791
|
-
// 1. We have no existing child policy (i.e., we have started up but
|
1792
|
-
// have not yet received a serverlist from the balancer or gone
|
1793
|
-
// into fallback mode; in this case, both child_policy_ and
|
1794
|
-
// pending_child_policy_ are null). In this case, we create a
|
1795
|
-
// new child policy and store it in child_policy_.
|
1796
|
-
//
|
1797
|
-
// 2. We have an existing child policy and have no pending child policy
|
1798
|
-
// from a previous update (i.e., either there has not been a
|
1799
|
-
// previous update that changed the policy name, or we have already
|
1800
|
-
// finished swapping in the new policy; in this case, child_policy_
|
1801
|
-
// is non-null but pending_child_policy_ is null). In this case:
|
1802
|
-
// a. If child_policy_->name() equals child_policy_name, then we
|
1803
|
-
// update the existing child policy.
|
1804
|
-
// b. If child_policy_->name() does not equal child_policy_name,
|
1805
|
-
// we create a new policy. The policy will be stored in
|
1806
|
-
// pending_child_policy_ and will later be swapped into
|
1807
|
-
// child_policy_ by the helper when the new child transitions
|
1808
|
-
// into state READY.
|
1809
|
-
//
|
1810
|
-
// 3. We have an existing child policy and have a pending child policy
|
1811
|
-
// from a previous update (i.e., a previous update set
|
1812
|
-
// pending_child_policy_ as per case 2b above and that policy has
|
1813
|
-
// not yet transitioned into state READY and been swapped into
|
1814
|
-
// child_policy_; in this case, both child_policy_ and
|
1815
|
-
// pending_child_policy_ are non-null). In this case:
|
1816
|
-
// a. If pending_child_policy_->name() equals child_policy_name,
|
1817
|
-
// then we update the existing pending child policy.
|
1818
|
-
// b. If pending_child_policy->name() does not equal
|
1819
|
-
// child_policy_name, then we create a new policy. The new
|
1820
|
-
// policy is stored in pending_child_policy_ (replacing the one
|
1821
|
-
// that was there before, which will be immediately shut down)
|
1822
|
-
// and will later be swapped into child_policy_ by the helper
|
1823
|
-
// when the new child transitions into state READY.
|
1824
|
-
const char* child_policy_name = child_policy_config_ == nullptr
|
1825
|
-
? "round_robin"
|
1826
|
-
: child_policy_config_->name();
|
1827
|
-
const bool create_policy =
|
1828
|
-
// case 1
|
1829
|
-
child_policy_ == nullptr ||
|
1830
|
-
// case 2b
|
1831
|
-
(pending_child_policy_ == nullptr &&
|
1832
|
-
strcmp(child_policy_->name(), child_policy_name) != 0) ||
|
1833
|
-
// case 3b
|
1834
|
-
(pending_child_policy_ != nullptr &&
|
1835
|
-
strcmp(pending_child_policy_->name(), child_policy_name) != 0);
|
1836
|
-
LoadBalancingPolicy* policy_to_update = nullptr;
|
1837
|
-
if (create_policy) {
|
1838
|
-
// Cases 1, 2b, and 3b: create a new child policy.
|
1839
|
-
// If child_policy_ is null, we set it (case 1), else we set
|
1840
|
-
// pending_child_policy_ (cases 2b and 3b).
|
1841
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1842
|
-
gpr_log(GPR_INFO, "[grpclb %p] Creating new %schild policy %s", this,
|
1843
|
-
child_policy_ == nullptr ? "" : "pending ", child_policy_name);
|
1844
|
-
}
|
1845
|
-
// Swap the policy into place.
|
1846
|
-
auto& lb_policy =
|
1847
|
-
child_policy_ == nullptr ? child_policy_ : pending_child_policy_;
|
1848
|
-
lb_policy = CreateChildPolicyLocked(child_policy_name, update_args.args);
|
1849
|
-
policy_to_update = lb_policy.get();
|
1850
|
-
} else {
|
1851
|
-
// Cases 2a and 3a: update an existing policy.
|
1852
|
-
// If we have a pending child policy, send the update to the pending
|
1853
|
-
// policy (case 3a), else send it to the current policy (case 2a).
|
1854
|
-
policy_to_update = pending_child_policy_ != nullptr
|
1855
|
-
? pending_child_policy_.get()
|
1856
|
-
: child_policy_.get();
|
1711
|
+
// Create child policy if needed.
|
1712
|
+
if (child_policy_ == nullptr) {
|
1713
|
+
child_policy_ = CreateChildPolicyLocked(update_args.args);
|
1857
1714
|
}
|
1858
|
-
GPR_ASSERT(policy_to_update != nullptr);
|
1859
1715
|
// Update the policy.
|
1860
1716
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1861
|
-
gpr_log(GPR_INFO, "[grpclb %p] Updating
|
1862
|
-
|
1863
|
-
policy_to_update);
|
1717
|
+
gpr_log(GPR_INFO, "[grpclb %p] Updating child policy handler %p", this,
|
1718
|
+
child_policy_.get());
|
1864
1719
|
}
|
1865
|
-
|
1720
|
+
child_policy_->UpdateLocked(std::move(update_args));
|
1866
1721
|
}
|
1867
1722
|
|
1868
1723
|
//
|
@@ -1879,33 +1734,35 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory {
|
|
1879
1734
|
const char* name() const override { return kGrpclb; }
|
1880
1735
|
|
1881
1736
|
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
|
1882
|
-
const
|
1737
|
+
const Json& json, grpc_error** error) const override {
|
1883
1738
|
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
|
1884
|
-
if (json ==
|
1885
|
-
return
|
1886
|
-
new ParsedGrpcLbConfig(nullptr));
|
1739
|
+
if (json.type() == Json::Type::JSON_NULL) {
|
1740
|
+
return MakeRefCounted<GrpcLbConfig>(nullptr);
|
1887
1741
|
}
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1742
|
+
std::vector<grpc_error*> error_list;
|
1743
|
+
Json child_policy_config_json_tmp;
|
1744
|
+
const Json* child_policy_config_json;
|
1745
|
+
auto it = json.object_value().find("childPolicy");
|
1746
|
+
if (it == json.object_value().end()) {
|
1747
|
+
child_policy_config_json_tmp = Json::Array{Json::Object{
|
1748
|
+
{"round_robin", Json::Object()},
|
1749
|
+
}};
|
1750
|
+
child_policy_config_json = &child_policy_config_json_tmp;
|
1751
|
+
} else {
|
1752
|
+
child_policy_config_json = &it->second;
|
1753
|
+
}
|
1754
|
+
grpc_error* parse_error = GRPC_ERROR_NONE;
|
1755
|
+
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_config =
|
1756
|
+
LoadBalancingPolicyRegistry::ParseLoadBalancingConfig(
|
1757
|
+
*child_policy_config_json, &parse_error);
|
1758
|
+
if (parse_error != GRPC_ERROR_NONE) {
|
1759
|
+
std::vector<grpc_error*> child_errors;
|
1760
|
+
child_errors.push_back(parse_error);
|
1761
|
+
error_list.push_back(
|
1762
|
+
GRPC_ERROR_CREATE_FROM_VECTOR("field:childPolicy", &child_errors));
|
1905
1763
|
}
|
1906
1764
|
if (error_list.empty()) {
|
1907
|
-
return
|
1908
|
-
new ParsedGrpcLbConfig(std::move(child_policy)));
|
1765
|
+
return MakeRefCounted<GrpcLbConfig>(std::move(child_policy_config));
|
1909
1766
|
} else {
|
1910
1767
|
*error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list);
|
1911
1768
|
return nullptr;
|
@@ -1948,7 +1805,7 @@ bool maybe_add_client_load_reporting_filter(grpc_channel_stack_builder* builder,
|
|
1948
1805
|
void grpc_lb_policy_grpclb_init() {
|
1949
1806
|
grpc_core::LoadBalancingPolicyRegistry::Builder::
|
1950
1807
|
RegisterLoadBalancingPolicyFactory(
|
1951
|
-
|
1808
|
+
absl::make_unique<grpc_core::GrpcLbFactory>());
|
1952
1809
|
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
|
1953
1810
|
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
|
1954
1811
|
maybe_add_client_load_reporting_filter,
|