grpc 1.27.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 +713 -629
- data/include/grpc/impl/codegen/grpc_types.h +5 -0
- data/include/grpc/impl/codegen/port_platform.h +7 -0
- 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/include/grpc/support/sync_abseil.h +26 -0
- 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 +4 -1
- 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 +48 -196
- 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 +83 -80
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +605 -768
- 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 +1221 -268
- data/src/core/ext/filters/client_channel/xds/xds_api.h +211 -152
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +212 -352
- data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +23 -40
- 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 +12 -9
- data/src/core/ext/filters/client_channel/xds/xds_client.cc +742 -289
- data/src/core/ext/filters/client_channel/xds/xds_client.h +74 -38
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +53 -128
- data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +105 -132
- 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 +4 -6
- 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/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 +12 -15
- 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/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 +0 -41
- data/src/core/lib/gprpp/string_view.h +5 -114
- 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/load_file.cc +1 -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_posix.cc +2 -1
- 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 +209 -79
- data/src/core/lib/json/json_reader.cc +469 -455
- data/src/core/lib/json/json_writer.cc +173 -169
- data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -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 +37 -34
- data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -1
- data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +2 -1
- data/src/core/lib/security/security_connector/local/local_security_connector.cc +5 -7
- data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +3 -15
- data/src/core/lib/security/security_connector/ssl_utils.cc +3 -1
- data/src/core/lib/security/security_connector/ssl_utils.h +0 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +24 -1
- data/src/core/lib/security/security_connector/tls/tls_security_connector.h +5 -1
- 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/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 +1 -1
- 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 +2 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/abseil-cpp/absl/base/attributes.h +1 -1
- data/third_party/abseil-cpp/absl/base/config.h +10 -4
- data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +30 -9
- data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +7 -5
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +2 -1
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +2 -2
- data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +2 -3
- data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +3 -3
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +37 -0
- data/third_party/abseil-cpp/absl/base/options.h +2 -10
- data/third_party/abseil-cpp/absl/strings/charconv.cc +0 -1
- 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/str_format.h +537 -0
- data/third_party/abseil-cpp/absl/strings/string_view.h +19 -11
- 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
- metadata +567 -494
- 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/third_party/boringssl/crypto/fipsmodule/aes/aes.c +0 -860
@@ -47,7 +47,7 @@ class SubchannelNode : public BaseNode {
|
|
47
47
|
// subchannel unrefs the transport.
|
48
48
|
void SetChildSocket(RefCountedPtr<SocketNode> socket);
|
49
49
|
|
50
|
-
|
50
|
+
Json RenderJson() override;
|
51
51
|
|
52
52
|
// proxy methods to composed classes.
|
53
53
|
void AddTraceEvent(ChannelTrace::Severity severity, const grpc_slice& data) {
|
@@ -64,8 +64,6 @@ class SubchannelNode : public BaseNode {
|
|
64
64
|
void RecordCallSucceeded() { call_counter_.RecordCallSucceeded(); }
|
65
65
|
|
66
66
|
private:
|
67
|
-
void PopulateConnectivityState(grpc_json* json);
|
68
|
-
|
69
67
|
Atomic<grpc_connectivity_state> connectivity_state_{GRPC_CHANNEL_IDLE};
|
70
68
|
Mutex socket_mu_;
|
71
69
|
RefCountedPtr<SocketNode> child_socket_;
|
@@ -385,5 +385,5 @@ void grpc_http_connect_register_handshaker_factory() {
|
|
385
385
|
using namespace grpc_core;
|
386
386
|
HandshakerRegistry::RegisterHandshakerFactory(
|
387
387
|
true /* at_start */, HANDSHAKER_CLIENT,
|
388
|
-
|
388
|
+
absl::make_unique<HttpConnectHandshakerFactory>());
|
389
389
|
}
|
@@ -47,6 +47,7 @@ namespace {
|
|
47
47
|
*/
|
48
48
|
char* GetHttpProxyServer(char** user_cred) {
|
49
49
|
GPR_ASSERT(user_cred != nullptr);
|
50
|
+
grpc_uri* uri = nullptr;
|
50
51
|
char* proxy_name = nullptr;
|
51
52
|
char** authority_strs = nullptr;
|
52
53
|
size_t authority_nstrs;
|
@@ -58,7 +59,9 @@ char* GetHttpProxyServer(char** user_cred) {
|
|
58
59
|
if (uri_str == nullptr) uri_str = gpr_getenv("https_proxy");
|
59
60
|
if (uri_str == nullptr) uri_str = gpr_getenv("http_proxy");
|
60
61
|
if (uri_str == nullptr) return nullptr;
|
61
|
-
|
62
|
+
// an emtpy value means "don't use proxy"
|
63
|
+
if (uri_str[0] == '\0') goto done;
|
64
|
+
uri = grpc_uri_parse(uri_str, false /* suppress_errors */);
|
62
65
|
if (uri == nullptr || uri->authority == nullptr) {
|
63
66
|
gpr_log(GPR_ERROR, "cannot parse value of 'http_proxy' env var");
|
64
67
|
goto done;
|
@@ -0,0 +1,291 @@
|
|
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
|
+
#include <grpc/support/port_platform.h>
|
18
|
+
|
19
|
+
#include <cstring>
|
20
|
+
|
21
|
+
#include "src/core/ext/filters/client_channel/lb_policy/child_policy_handler.h"
|
22
|
+
|
23
|
+
#include "absl/strings/str_cat.h"
|
24
|
+
|
25
|
+
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
26
|
+
|
27
|
+
namespace grpc_core {
|
28
|
+
|
29
|
+
//
|
30
|
+
// ChildPolicyHandler::Helper
|
31
|
+
//
|
32
|
+
|
33
|
+
class ChildPolicyHandler::Helper
|
34
|
+
: public LoadBalancingPolicy::ChannelControlHelper {
|
35
|
+
public:
|
36
|
+
explicit Helper(RefCountedPtr<ChildPolicyHandler> parent)
|
37
|
+
: parent_(std::move(parent)) {}
|
38
|
+
|
39
|
+
~Helper() { parent_.reset(DEBUG_LOCATION, "Helper"); }
|
40
|
+
|
41
|
+
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
42
|
+
const grpc_channel_args& args) override {
|
43
|
+
if (parent_->shutting_down_) return nullptr;
|
44
|
+
if (!CalledByCurrentChild() && !CalledByPendingChild()) return nullptr;
|
45
|
+
return parent_->channel_control_helper()->CreateSubchannel(args);
|
46
|
+
}
|
47
|
+
|
48
|
+
void UpdateState(grpc_connectivity_state state,
|
49
|
+
std::unique_ptr<SubchannelPicker> picker) override {
|
50
|
+
if (parent_->shutting_down_) return;
|
51
|
+
// If this request is from the pending child policy, ignore it until
|
52
|
+
// it reports READY, at which point we swap it into place.
|
53
|
+
if (CalledByPendingChild()) {
|
54
|
+
if (GRPC_TRACE_FLAG_ENABLED(*(parent_->tracer_))) {
|
55
|
+
gpr_log(GPR_INFO,
|
56
|
+
"[child_policy_handler %p] helper %p: pending child policy %p "
|
57
|
+
"reports state=%s",
|
58
|
+
parent_.get(), this, child_, ConnectivityStateName(state));
|
59
|
+
}
|
60
|
+
if (state != GRPC_CHANNEL_READY) return;
|
61
|
+
grpc_pollset_set_del_pollset_set(
|
62
|
+
parent_->child_policy_->interested_parties(),
|
63
|
+
parent_->interested_parties());
|
64
|
+
parent_->child_policy_ = std::move(parent_->pending_child_policy_);
|
65
|
+
} else if (!CalledByCurrentChild()) {
|
66
|
+
// This request is from an outdated child, so ignore it.
|
67
|
+
return;
|
68
|
+
}
|
69
|
+
parent_->channel_control_helper()->UpdateState(state, std::move(picker));
|
70
|
+
}
|
71
|
+
|
72
|
+
void RequestReresolution() override {
|
73
|
+
if (parent_->shutting_down_) return;
|
74
|
+
// Only forward re-resolution requests from the most recent child,
|
75
|
+
// since that's the one that will be receiving any update we receive
|
76
|
+
// from the resolver.
|
77
|
+
const LoadBalancingPolicy* latest_child_policy =
|
78
|
+
parent_->pending_child_policy_ != nullptr
|
79
|
+
? parent_->pending_child_policy_.get()
|
80
|
+
: parent_->child_policy_.get();
|
81
|
+
if (child_ != latest_child_policy) return;
|
82
|
+
if (GRPC_TRACE_FLAG_ENABLED(*(parent_->tracer_))) {
|
83
|
+
gpr_log(GPR_INFO, "[child_policy_handler %p] started name re-resolving",
|
84
|
+
parent_.get());
|
85
|
+
}
|
86
|
+
parent_->channel_control_helper()->RequestReresolution();
|
87
|
+
}
|
88
|
+
|
89
|
+
void AddTraceEvent(TraceSeverity severity, StringView message) override {
|
90
|
+
if (parent_->shutting_down_) return;
|
91
|
+
if (!CalledByPendingChild() && !CalledByCurrentChild()) return;
|
92
|
+
parent_->channel_control_helper()->AddTraceEvent(severity, message);
|
93
|
+
}
|
94
|
+
|
95
|
+
void set_child(LoadBalancingPolicy* child) { child_ = child; }
|
96
|
+
|
97
|
+
private:
|
98
|
+
bool CalledByPendingChild() const {
|
99
|
+
GPR_ASSERT(child_ != nullptr);
|
100
|
+
return child_ == parent_->pending_child_policy_.get();
|
101
|
+
}
|
102
|
+
|
103
|
+
bool CalledByCurrentChild() const {
|
104
|
+
GPR_ASSERT(child_ != nullptr);
|
105
|
+
return child_ == parent_->child_policy_.get();
|
106
|
+
};
|
107
|
+
|
108
|
+
RefCountedPtr<ChildPolicyHandler> parent_;
|
109
|
+
LoadBalancingPolicy* child_ = nullptr;
|
110
|
+
};
|
111
|
+
|
112
|
+
//
|
113
|
+
// ChildPolicyHandler
|
114
|
+
//
|
115
|
+
|
116
|
+
void ChildPolicyHandler::ShutdownLocked() {
|
117
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
|
118
|
+
gpr_log(GPR_INFO, "[child_policy_handler %p] shutting down", this);
|
119
|
+
}
|
120
|
+
shutting_down_ = true;
|
121
|
+
if (child_policy_ != nullptr) {
|
122
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
|
123
|
+
gpr_log(GPR_INFO, "[child_policy_handler %p] shutting down lb_policy %p",
|
124
|
+
this, child_policy_.get());
|
125
|
+
}
|
126
|
+
grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
|
127
|
+
interested_parties());
|
128
|
+
child_policy_.reset();
|
129
|
+
}
|
130
|
+
if (pending_child_policy_ != nullptr) {
|
131
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
|
132
|
+
gpr_log(GPR_INFO,
|
133
|
+
"[child_policy_handler %p] shutting down pending lb_policy %p",
|
134
|
+
this, pending_child_policy_.get());
|
135
|
+
}
|
136
|
+
grpc_pollset_set_del_pollset_set(
|
137
|
+
pending_child_policy_->interested_parties(), interested_parties());
|
138
|
+
pending_child_policy_.reset();
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
void ChildPolicyHandler::UpdateLocked(UpdateArgs args) {
|
143
|
+
// If the child policy name changes, we need to create a new child
|
144
|
+
// policy. When this happens, we leave child_policy_ as-is and store
|
145
|
+
// the new child policy in pending_child_policy_. Once the new child
|
146
|
+
// policy transitions into state READY, we swap it into child_policy_,
|
147
|
+
// replacing the original child policy. So pending_child_policy_ is
|
148
|
+
// non-null only between when we apply an update that changes the child
|
149
|
+
// policy name and when the new child reports state READY.
|
150
|
+
//
|
151
|
+
// Updates can arrive at any point during this transition. We always
|
152
|
+
// apply updates relative to the most recently created child policy,
|
153
|
+
// even if the most recent one is still in pending_child_policy_. This
|
154
|
+
// is true both when applying the updates to an existing child policy
|
155
|
+
// and when determining whether we need to create a new policy.
|
156
|
+
//
|
157
|
+
// As a result of this, there are several cases to consider here:
|
158
|
+
//
|
159
|
+
// 1. We have no existing child policy (i.e., this is the first update
|
160
|
+
// we receive after being created; in this case, both child_policy_
|
161
|
+
// and pending_child_policy_ are null). In this case, we create a
|
162
|
+
// new child policy and store it in child_policy_.
|
163
|
+
//
|
164
|
+
// 2. We have an existing child policy and have no pending child policy
|
165
|
+
// from a previous update (i.e., either there has not been a
|
166
|
+
// previous update that changed the policy name, or we have already
|
167
|
+
// finished swapping in the new policy; in this case, child_policy_
|
168
|
+
// is non-null but pending_child_policy_ is null). In this case:
|
169
|
+
// a. If going from the current config to the new config does not
|
170
|
+
// require a new policy, then we update the existing child policy.
|
171
|
+
// b. If going from the current config to the new config does require a
|
172
|
+
// new policy, we create a new policy. The policy will be stored in
|
173
|
+
// pending_child_policy_ and will later be swapped into
|
174
|
+
// child_policy_ by the helper when the new child transitions
|
175
|
+
// into state READY.
|
176
|
+
//
|
177
|
+
// 3. We have an existing child policy and have a pending child policy
|
178
|
+
// from a previous update (i.e., a previous update set
|
179
|
+
// pending_child_policy_ as per case 2b above and that policy has
|
180
|
+
// not yet transitioned into state READY and been swapped into
|
181
|
+
// child_policy_; in this case, both child_policy_ and
|
182
|
+
// pending_child_policy_ are non-null). In this case:
|
183
|
+
// a. If going from the current config to the new config does not
|
184
|
+
// require a new policy, then we update the existing pending
|
185
|
+
// child policy.
|
186
|
+
// b. If going from the current config to the new config does require a
|
187
|
+
// new child policy, then we create a new policy. The new
|
188
|
+
// policy is stored in pending_child_policy_ (replacing the one
|
189
|
+
// that was there before, which will be immediately shut down)
|
190
|
+
// and will later be swapped into child_policy_ by the helper
|
191
|
+
// when the new child transitions into state READY.
|
192
|
+
const bool create_policy =
|
193
|
+
// case 1
|
194
|
+
child_policy_ == nullptr ||
|
195
|
+
// cases 2b and 3b
|
196
|
+
ConfigChangeRequiresNewPolicyInstance(current_config_.get(),
|
197
|
+
args.config.get());
|
198
|
+
current_config_ = args.config;
|
199
|
+
LoadBalancingPolicy* policy_to_update = nullptr;
|
200
|
+
if (create_policy) {
|
201
|
+
// Cases 1, 2b, and 3b: create a new child policy.
|
202
|
+
// If child_policy_ is null, we set it (case 1), else we set
|
203
|
+
// pending_child_policy_ (cases 2b and 3b).
|
204
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
|
205
|
+
gpr_log(GPR_INFO,
|
206
|
+
"[child_policy_handler %p] creating new %schild policy %s", this,
|
207
|
+
child_policy_ == nullptr ? "" : "pending ", args.config->name());
|
208
|
+
}
|
209
|
+
auto& lb_policy =
|
210
|
+
child_policy_ == nullptr ? child_policy_ : pending_child_policy_;
|
211
|
+
lb_policy = CreateChildPolicy(args.config->name(), *args.args);
|
212
|
+
policy_to_update = lb_policy.get();
|
213
|
+
} else {
|
214
|
+
// Cases 2a and 3a: update an existing policy.
|
215
|
+
// If we have a pending child policy, send the update to the pending
|
216
|
+
// policy (case 3a), else send it to the current policy (case 2a).
|
217
|
+
policy_to_update = pending_child_policy_ != nullptr
|
218
|
+
? pending_child_policy_.get()
|
219
|
+
: child_policy_.get();
|
220
|
+
}
|
221
|
+
GPR_ASSERT(policy_to_update != nullptr);
|
222
|
+
// Update the policy.
|
223
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
|
224
|
+
gpr_log(GPR_INFO, "[child_policy_handler %p] updating %schild policy %p",
|
225
|
+
this,
|
226
|
+
policy_to_update == pending_child_policy_.get() ? "pending " : "",
|
227
|
+
policy_to_update);
|
228
|
+
}
|
229
|
+
policy_to_update->UpdateLocked(std::move(args));
|
230
|
+
}
|
231
|
+
|
232
|
+
void ChildPolicyHandler::ExitIdleLocked() {
|
233
|
+
if (child_policy_ != nullptr) {
|
234
|
+
child_policy_->ExitIdleLocked();
|
235
|
+
if (pending_child_policy_ != nullptr) {
|
236
|
+
pending_child_policy_->ExitIdleLocked();
|
237
|
+
}
|
238
|
+
}
|
239
|
+
}
|
240
|
+
|
241
|
+
void ChildPolicyHandler::ResetBackoffLocked() {
|
242
|
+
if (child_policy_ != nullptr) {
|
243
|
+
child_policy_->ResetBackoffLocked();
|
244
|
+
if (pending_child_policy_ != nullptr) {
|
245
|
+
pending_child_policy_->ResetBackoffLocked();
|
246
|
+
}
|
247
|
+
}
|
248
|
+
}
|
249
|
+
|
250
|
+
OrphanablePtr<LoadBalancingPolicy> ChildPolicyHandler::CreateChildPolicy(
|
251
|
+
const char* child_policy_name, const grpc_channel_args& args) {
|
252
|
+
Helper* helper = new Helper(Ref(DEBUG_LOCATION, "Helper"));
|
253
|
+
LoadBalancingPolicy::Args lb_policy_args;
|
254
|
+
lb_policy_args.combiner = combiner();
|
255
|
+
lb_policy_args.channel_control_helper =
|
256
|
+
std::unique_ptr<ChannelControlHelper>(helper);
|
257
|
+
lb_policy_args.args = &args;
|
258
|
+
OrphanablePtr<LoadBalancingPolicy> lb_policy =
|
259
|
+
CreateLoadBalancingPolicy(child_policy_name, std::move(lb_policy_args));
|
260
|
+
if (GPR_UNLIKELY(lb_policy == nullptr)) {
|
261
|
+
gpr_log(GPR_ERROR, "could not create LB policy \"%s\"", child_policy_name);
|
262
|
+
return nullptr;
|
263
|
+
}
|
264
|
+
helper->set_child(lb_policy.get());
|
265
|
+
if (GRPC_TRACE_FLAG_ENABLED(*tracer_)) {
|
266
|
+
gpr_log(GPR_INFO,
|
267
|
+
"[child_policy_handler %p] created new LB policy \"%s\" (%p)", this,
|
268
|
+
child_policy_name, lb_policy.get());
|
269
|
+
}
|
270
|
+
channel_control_helper()->AddTraceEvent(
|
271
|
+
ChannelControlHelper::TRACE_INFO,
|
272
|
+
absl::StrCat("Created new LB policy \"", child_policy_name, "\""));
|
273
|
+
grpc_pollset_set_add_pollset_set(lb_policy->interested_parties(),
|
274
|
+
interested_parties());
|
275
|
+
return lb_policy;
|
276
|
+
}
|
277
|
+
|
278
|
+
bool ChildPolicyHandler::ConfigChangeRequiresNewPolicyInstance(
|
279
|
+
LoadBalancingPolicy::Config* old_config,
|
280
|
+
LoadBalancingPolicy::Config* new_config) const {
|
281
|
+
return strcmp(old_config->name(), new_config->name()) != 0;
|
282
|
+
}
|
283
|
+
|
284
|
+
OrphanablePtr<LoadBalancingPolicy>
|
285
|
+
ChildPolicyHandler::CreateLoadBalancingPolicy(
|
286
|
+
const char* name, LoadBalancingPolicy::Args args) const {
|
287
|
+
return LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy(
|
288
|
+
name, std::move(args));
|
289
|
+
}
|
290
|
+
|
291
|
+
} // namespace grpc_core
|
@@ -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
|
|
@@ -297,14 +297,8 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
297
297
|
void RequestReresolution() override;
|
298
298
|
void AddTraceEvent(TraceSeverity severity, StringView message) override;
|
299
299
|
|
300
|
-
void set_child(LoadBalancingPolicy* child) { child_ = child; }
|
301
|
-
|
302
300
|
private:
|
303
|
-
bool CalledByPendingChild() const;
|
304
|
-
bool CalledByCurrentChild() const;
|
305
|
-
|
306
301
|
RefCountedPtr<GrpcLb> parent_;
|
307
|
-
LoadBalancingPolicy* child_ = nullptr;
|
308
302
|
};
|
309
303
|
|
310
304
|
~GrpcLb();
|
@@ -335,7 +329,7 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
335
329
|
grpc_channel_args* CreateChildPolicyArgsLocked(
|
336
330
|
bool is_backend_from_grpclb_load_balancer);
|
337
331
|
OrphanablePtr<LoadBalancingPolicy> CreateChildPolicyLocked(
|
338
|
-
const
|
332
|
+
const grpc_channel_args* args);
|
339
333
|
void CreateOrUpdateChildPolicyLocked();
|
340
334
|
|
341
335
|
// Who the client is trying to communicate with.
|
@@ -386,9 +380,6 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
386
380
|
|
387
381
|
// The child policy to use for the backends.
|
388
382
|
OrphanablePtr<LoadBalancingPolicy> child_policy_;
|
389
|
-
// When switching child policies, the new policy will be stored here
|
390
|
-
// until it reports READY, at which point it will be moved to child_policy_.
|
391
|
-
OrphanablePtr<LoadBalancingPolicy> pending_child_policy_;
|
392
383
|
// The child policy config.
|
393
384
|
RefCountedPtr<LoadBalancingPolicy::Config> child_policy_config_;
|
394
385
|
// Child policy in state READY.
|
@@ -630,46 +621,15 @@ GrpcLb::PickResult GrpcLb::Picker::Pick(PickArgs args) {
|
|
630
621
|
// GrpcLb::Helper
|
631
622
|
//
|
632
623
|
|
633
|
-
bool GrpcLb::Helper::CalledByPendingChild() const {
|
634
|
-
GPR_ASSERT(child_ != nullptr);
|
635
|
-
return child_ == parent_->pending_child_policy_.get();
|
636
|
-
}
|
637
|
-
|
638
|
-
bool GrpcLb::Helper::CalledByCurrentChild() const {
|
639
|
-
GPR_ASSERT(child_ != nullptr);
|
640
|
-
return child_ == parent_->child_policy_.get();
|
641
|
-
}
|
642
|
-
|
643
624
|
RefCountedPtr<SubchannelInterface> GrpcLb::Helper::CreateSubchannel(
|
644
625
|
const grpc_channel_args& args) {
|
645
|
-
if (parent_->shutting_down_
|
646
|
-
(!CalledByPendingChild() && !CalledByCurrentChild())) {
|
647
|
-
return nullptr;
|
648
|
-
}
|
626
|
+
if (parent_->shutting_down_) return nullptr;
|
649
627
|
return parent_->channel_control_helper()->CreateSubchannel(args);
|
650
628
|
}
|
651
629
|
|
652
630
|
void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
653
631
|
std::unique_ptr<SubchannelPicker> picker) {
|
654
632
|
if (parent_->shutting_down_) return;
|
655
|
-
// If this request is from the pending child policy, ignore it until
|
656
|
-
// it reports READY, at which point we swap it into place.
|
657
|
-
if (CalledByPendingChild()) {
|
658
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
659
|
-
gpr_log(GPR_INFO,
|
660
|
-
"[grpclb %p helper %p] pending child policy %p reports state=%s",
|
661
|
-
parent_.get(), this, parent_->pending_child_policy_.get(),
|
662
|
-
ConnectivityStateName(state));
|
663
|
-
}
|
664
|
-
if (state != GRPC_CHANNEL_READY) return;
|
665
|
-
grpc_pollset_set_del_pollset_set(
|
666
|
-
parent_->child_policy_->interested_parties(),
|
667
|
-
parent_->interested_parties());
|
668
|
-
parent_->child_policy_ = std::move(parent_->pending_child_policy_);
|
669
|
-
} else if (!CalledByCurrentChild()) {
|
670
|
-
// This request is from an outdated child, so ignore it.
|
671
|
-
return;
|
672
|
-
}
|
673
633
|
// Record whether child policy reports READY.
|
674
634
|
parent_->child_policy_ready_ = state == GRPC_CHANNEL_READY;
|
675
635
|
// Enter fallback mode if needed.
|
@@ -715,22 +675,13 @@ void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
|
715
675
|
client_stats = parent_->lb_calld_->client_stats()->Ref();
|
716
676
|
}
|
717
677
|
parent_->channel_control_helper()->UpdateState(
|
718
|
-
state,
|
678
|
+
state,
|
679
|
+
absl::make_unique<Picker>(parent_.get(), parent_->serverlist_,
|
719
680
|
std::move(picker), std::move(client_stats)));
|
720
681
|
}
|
721
682
|
|
722
683
|
void GrpcLb::Helper::RequestReresolution() {
|
723
684
|
if (parent_->shutting_down_) return;
|
724
|
-
const LoadBalancingPolicy* latest_child_policy =
|
725
|
-
parent_->pending_child_policy_ != nullptr
|
726
|
-
? parent_->pending_child_policy_.get()
|
727
|
-
: parent_->child_policy_.get();
|
728
|
-
if (child_ != latest_child_policy) return;
|
729
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
730
|
-
gpr_log(GPR_INFO,
|
731
|
-
"[grpclb %p] Re-resolution requested from %schild policy (%p).",
|
732
|
-
parent_.get(), CalledByPendingChild() ? "pending " : "", child_);
|
733
|
-
}
|
734
685
|
// If we are talking to a balancer, we expect to get updated addresses
|
735
686
|
// from the balancer, so we can ignore the re-resolution request from
|
736
687
|
// the child policy. Otherwise, pass the re-resolution request up to the
|
@@ -742,10 +693,7 @@ void GrpcLb::Helper::RequestReresolution() {
|
|
742
693
|
}
|
743
694
|
|
744
695
|
void GrpcLb::Helper::AddTraceEvent(TraceSeverity severity, StringView message) {
|
745
|
-
if (parent_->shutting_down_
|
746
|
-
(!CalledByPendingChild() && !CalledByCurrentChild())) {
|
747
|
-
return;
|
748
|
-
}
|
696
|
+
if (parent_->shutting_down_) return;
|
749
697
|
parent_->channel_control_helper()->AddTraceEvent(severity, message);
|
750
698
|
}
|
751
699
|
|
@@ -1411,13 +1359,8 @@ void GrpcLb::ShutdownLocked() {
|
|
1411
1359
|
if (child_policy_ != nullptr) {
|
1412
1360
|
grpc_pollset_set_del_pollset_set(child_policy_->interested_parties(),
|
1413
1361
|
interested_parties());
|
1362
|
+
child_policy_.reset();
|
1414
1363
|
}
|
1415
|
-
if (pending_child_policy_ != nullptr) {
|
1416
|
-
grpc_pollset_set_del_pollset_set(
|
1417
|
-
pending_child_policy_->interested_parties(), interested_parties());
|
1418
|
-
}
|
1419
|
-
child_policy_.reset();
|
1420
|
-
pending_child_policy_.reset();
|
1421
1364
|
// We destroy the LB channel here instead of in our destructor because
|
1422
1365
|
// destroying the channel triggers a last callback to
|
1423
1366
|
// OnBalancerChannelConnectivityChangedLocked(), and we need to be
|
@@ -1439,15 +1382,11 @@ void GrpcLb::ResetBackoffLocked() {
|
|
1439
1382
|
if (child_policy_ != nullptr) {
|
1440
1383
|
child_policy_->ResetBackoffLocked();
|
1441
1384
|
}
|
1442
|
-
if (pending_child_policy_ != nullptr) {
|
1443
|
-
pending_child_policy_->ResetBackoffLocked();
|
1444
|
-
}
|
1445
1385
|
}
|
1446
1386
|
|
1447
1387
|
void GrpcLb::UpdateLocked(UpdateArgs args) {
|
1448
1388
|
const bool is_initial_update = lb_channel_ == nullptr;
|
1449
|
-
auto* grpclb_config =
|
1450
|
-
static_cast<const ParsedGrpcLbConfig*>(args.config.get());
|
1389
|
+
auto* grpclb_config = static_cast<const GrpcLbConfig*>(args.config.get());
|
1451
1390
|
if (grpclb_config != nullptr) {
|
1452
1391
|
child_policy_config_ = grpclb_config->child_policy();
|
1453
1392
|
} else {
|
@@ -1728,25 +1667,17 @@ grpc_channel_args* GrpcLb::CreateChildPolicyArgsLocked(
|
|
1728
1667
|
}
|
1729
1668
|
|
1730
1669
|
OrphanablePtr<LoadBalancingPolicy> GrpcLb::CreateChildPolicyLocked(
|
1731
|
-
const
|
1732
|
-
Helper* helper = new Helper(Ref());
|
1670
|
+
const grpc_channel_args* args) {
|
1733
1671
|
LoadBalancingPolicy::Args lb_policy_args;
|
1734
1672
|
lb_policy_args.combiner = combiner();
|
1735
1673
|
lb_policy_args.args = args;
|
1736
|
-
lb_policy_args.channel_control_helper =
|
1737
|
-
std::unique_ptr<ChannelControlHelper>(helper);
|
1674
|
+
lb_policy_args.channel_control_helper = absl::make_unique<Helper>(Ref());
|
1738
1675
|
OrphanablePtr<LoadBalancingPolicy> lb_policy =
|
1739
|
-
|
1740
|
-
|
1741
|
-
if (GPR_UNLIKELY(lb_policy == nullptr)) {
|
1742
|
-
gpr_log(GPR_ERROR, "[grpclb %p] Failure creating child policy %s", this,
|
1743
|
-
name);
|
1744
|
-
return nullptr;
|
1745
|
-
}
|
1746
|
-
helper->set_child(lb_policy.get());
|
1676
|
+
MakeOrphanable<ChildPolicyHandler>(std::move(lb_policy_args),
|
1677
|
+
&grpc_lb_glb_trace);
|
1747
1678
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1748
|
-
gpr_log(GPR_INFO, "[grpclb %p] Created new child policy
|
1749
|
-
|
1679
|
+
gpr_log(GPR_INFO, "[grpclb %p] Created new child policy handler (%p)", this,
|
1680
|
+
lb_policy.get());
|
1750
1681
|
}
|
1751
1682
|
// Add the gRPC LB's interested_parties pollset_set to that of the newly
|
1752
1683
|
// created child policy. This will make the child policy progress upon
|
@@ -1777,97 +1708,16 @@ void GrpcLb::CreateOrUpdateChildPolicyLocked() {
|
|
1777
1708
|
CreateChildPolicyArgsLocked(is_backend_from_grpclb_load_balancer);
|
1778
1709
|
GPR_ASSERT(update_args.args != nullptr);
|
1779
1710
|
update_args.config = child_policy_config_;
|
1780
|
-
//
|
1781
|
-
|
1782
|
-
|
1783
|
-
// policy transitions into state READY, we swap it into child_policy_,
|
1784
|
-
// replacing the original child policy. So pending_child_policy_ is
|
1785
|
-
// non-null only between when we apply an update that changes the child
|
1786
|
-
// policy name and when the new child reports state READY.
|
1787
|
-
//
|
1788
|
-
// Updates can arrive at any point during this transition. We always
|
1789
|
-
// apply updates relative to the most recently created child policy,
|
1790
|
-
// even if the most recent one is still in pending_child_policy_. This
|
1791
|
-
// is true both when applying the updates to an existing child policy
|
1792
|
-
// and when determining whether we need to create a new policy.
|
1793
|
-
//
|
1794
|
-
// As a result of this, there are several cases to consider here:
|
1795
|
-
//
|
1796
|
-
// 1. We have no existing child policy (i.e., we have started up but
|
1797
|
-
// have not yet received a serverlist from the balancer or gone
|
1798
|
-
// into fallback mode; in this case, both child_policy_ and
|
1799
|
-
// pending_child_policy_ are null). In this case, we create a
|
1800
|
-
// new child policy and store it in child_policy_.
|
1801
|
-
//
|
1802
|
-
// 2. We have an existing child policy and have no pending child policy
|
1803
|
-
// from a previous update (i.e., either there has not been a
|
1804
|
-
// previous update that changed the policy name, or we have already
|
1805
|
-
// finished swapping in the new policy; in this case, child_policy_
|
1806
|
-
// is non-null but pending_child_policy_ is null). In this case:
|
1807
|
-
// a. If child_policy_->name() equals child_policy_name, then we
|
1808
|
-
// update the existing child policy.
|
1809
|
-
// b. If child_policy_->name() does not equal child_policy_name,
|
1810
|
-
// we create a new policy. The policy will be stored in
|
1811
|
-
// pending_child_policy_ and will later be swapped into
|
1812
|
-
// child_policy_ by the helper when the new child transitions
|
1813
|
-
// into state READY.
|
1814
|
-
//
|
1815
|
-
// 3. We have an existing child policy and have a pending child policy
|
1816
|
-
// from a previous update (i.e., a previous update set
|
1817
|
-
// pending_child_policy_ as per case 2b above and that policy has
|
1818
|
-
// not yet transitioned into state READY and been swapped into
|
1819
|
-
// child_policy_; in this case, both child_policy_ and
|
1820
|
-
// pending_child_policy_ are non-null). In this case:
|
1821
|
-
// a. If pending_child_policy_->name() equals child_policy_name,
|
1822
|
-
// then we update the existing pending child policy.
|
1823
|
-
// b. If pending_child_policy->name() does not equal
|
1824
|
-
// child_policy_name, then we create a new policy. The new
|
1825
|
-
// policy is stored in pending_child_policy_ (replacing the one
|
1826
|
-
// that was there before, which will be immediately shut down)
|
1827
|
-
// and will later be swapped into child_policy_ by the helper
|
1828
|
-
// when the new child transitions into state READY.
|
1829
|
-
const char* child_policy_name = child_policy_config_ == nullptr
|
1830
|
-
? "round_robin"
|
1831
|
-
: child_policy_config_->name();
|
1832
|
-
const bool create_policy =
|
1833
|
-
// case 1
|
1834
|
-
child_policy_ == nullptr ||
|
1835
|
-
// case 2b
|
1836
|
-
(pending_child_policy_ == nullptr &&
|
1837
|
-
strcmp(child_policy_->name(), child_policy_name) != 0) ||
|
1838
|
-
// case 3b
|
1839
|
-
(pending_child_policy_ != nullptr &&
|
1840
|
-
strcmp(pending_child_policy_->name(), child_policy_name) != 0);
|
1841
|
-
LoadBalancingPolicy* policy_to_update = nullptr;
|
1842
|
-
if (create_policy) {
|
1843
|
-
// Cases 1, 2b, and 3b: create a new child policy.
|
1844
|
-
// If child_policy_ is null, we set it (case 1), else we set
|
1845
|
-
// pending_child_policy_ (cases 2b and 3b).
|
1846
|
-
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1847
|
-
gpr_log(GPR_INFO, "[grpclb %p] Creating new %schild policy %s", this,
|
1848
|
-
child_policy_ == nullptr ? "" : "pending ", child_policy_name);
|
1849
|
-
}
|
1850
|
-
// Swap the policy into place.
|
1851
|
-
auto& lb_policy =
|
1852
|
-
child_policy_ == nullptr ? child_policy_ : pending_child_policy_;
|
1853
|
-
lb_policy = CreateChildPolicyLocked(child_policy_name, update_args.args);
|
1854
|
-
policy_to_update = lb_policy.get();
|
1855
|
-
} else {
|
1856
|
-
// Cases 2a and 3a: update an existing policy.
|
1857
|
-
// If we have a pending child policy, send the update to the pending
|
1858
|
-
// policy (case 3a), else send it to the current policy (case 2a).
|
1859
|
-
policy_to_update = pending_child_policy_ != nullptr
|
1860
|
-
? pending_child_policy_.get()
|
1861
|
-
: child_policy_.get();
|
1711
|
+
// Create child policy if needed.
|
1712
|
+
if (child_policy_ == nullptr) {
|
1713
|
+
child_policy_ = CreateChildPolicyLocked(update_args.args);
|
1862
1714
|
}
|
1863
|
-
GPR_ASSERT(policy_to_update != nullptr);
|
1864
1715
|
// Update the policy.
|
1865
1716
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
1866
|
-
gpr_log(GPR_INFO, "[grpclb %p] Updating
|
1867
|
-
|
1868
|
-
policy_to_update);
|
1717
|
+
gpr_log(GPR_INFO, "[grpclb %p] Updating child policy handler %p", this,
|
1718
|
+
child_policy_.get());
|
1869
1719
|
}
|
1870
|
-
|
1720
|
+
child_policy_->UpdateLocked(std::move(update_args));
|
1871
1721
|
}
|
1872
1722
|
|
1873
1723
|
//
|
@@ -1884,33 +1734,35 @@ class GrpcLbFactory : public LoadBalancingPolicyFactory {
|
|
1884
1734
|
const char* name() const override { return kGrpclb; }
|
1885
1735
|
|
1886
1736
|
RefCountedPtr<LoadBalancingPolicy::Config> ParseLoadBalancingConfig(
|
1887
|
-
const
|
1737
|
+
const Json& json, grpc_error** error) const override {
|
1888
1738
|
GPR_DEBUG_ASSERT(error != nullptr && *error == GRPC_ERROR_NONE);
|
1889
|
-
if (json ==
|
1890
|
-
return
|
1891
|
-
new ParsedGrpcLbConfig(nullptr));
|
1739
|
+
if (json.type() == Json::Type::JSON_NULL) {
|
1740
|
+
return MakeRefCounted<GrpcLbConfig>(nullptr);
|
1892
1741
|
}
|
1893
|
-
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
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));
|
1910
1763
|
}
|
1911
1764
|
if (error_list.empty()) {
|
1912
|
-
return
|
1913
|
-
new ParsedGrpcLbConfig(std::move(child_policy)));
|
1765
|
+
return MakeRefCounted<GrpcLbConfig>(std::move(child_policy_config));
|
1914
1766
|
} else {
|
1915
1767
|
*error = GRPC_ERROR_CREATE_FROM_VECTOR("GrpcLb Parser", &error_list);
|
1916
1768
|
return nullptr;
|
@@ -1953,7 +1805,7 @@ bool maybe_add_client_load_reporting_filter(grpc_channel_stack_builder* builder,
|
|
1953
1805
|
void grpc_lb_policy_grpclb_init() {
|
1954
1806
|
grpc_core::LoadBalancingPolicyRegistry::Builder::
|
1955
1807
|
RegisterLoadBalancingPolicyFactory(
|
1956
|
-
|
1808
|
+
absl::make_unique<grpc_core::GrpcLbFactory>());
|
1957
1809
|
grpc_channel_init_register_stage(GRPC_CLIENT_SUBCHANNEL,
|
1958
1810
|
GRPC_CHANNEL_INIT_BUILTIN_PRIORITY,
|
1959
1811
|
maybe_add_client_load_reporting_filter,
|