grpc 1.31.1 → 1.32.0.pre1
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 +595 -15723
- data/include/grpc/grpc_security.h +31 -14
- data/include/grpc/impl/codegen/README.md +22 -0
- data/include/grpc/impl/codegen/port_platform.h +6 -1
- data/src/core/ext/filters/client_channel/backup_poller.cc +3 -2
- data/src/core/ext/filters/client_channel/client_channel.cc +64 -20
- data/src/core/ext/filters/client_channel/client_channel.h +1 -1
- data/src/core/ext/filters/client_channel/client_channel_channelz.h +0 -3
- data/src/core/ext/filters/client_channel/health/health_check_client.cc +6 -1
- data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +2 -3
- data/src/core/ext/filters/client_channel/lb_policy.h +2 -0
- data/src/core/ext/filters/client_channel/lb_policy/child_policy_handler.cc +6 -4
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +20 -13
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.cc +0 -13
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_balancer_addresses.h +0 -3
- data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb_channel_secure.cc +1 -37
- data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +19 -13
- data/src/core/ext/filters/client_channel/lb_policy/priority/priority.cc +29 -10
- data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +5 -4
- data/src/core/ext/filters/client_channel/lb_policy/weighted_target/weighted_target.cc +20 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +18 -12
- data/src/core/ext/filters/client_channel/lb_policy/xds/eds.cc +22 -14
- data/src/core/ext/filters/client_channel/lb_policy/xds/lrs.cc +18 -9
- data/src/core/ext/filters/client_channel/lb_policy/xds/xds_routing.cc +54 -56
- 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/c_ares/grpc_ares_wrapper_libuv.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +1 -1
- data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +363 -14
- data/src/core/ext/filters/client_channel/resolver_result_parsing.h +0 -1
- data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +5 -4
- data/src/core/ext/filters/client_channel/server_address.cc +40 -7
- data/src/core/ext/filters/client_channel/server_address.h +42 -4
- data/src/core/ext/filters/client_channel/subchannel.cc +64 -23
- data/src/core/ext/filters/client_channel/subchannel.h +16 -4
- data/src/core/ext/filters/max_age/max_age_filter.cc +2 -1
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +87 -31
- data/src/core/ext/transport/chttp2/client/chttp2_connector.h +18 -1
- data/src/core/ext/transport/chttp2/client/secure/secure_channel_create.cc +10 -35
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +19 -25
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +2 -1
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2.cc +2 -2
- data/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.cc +6 -6
- data/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.cc +3 -2
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +239 -277
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +2 -2
- data/src/core/ext/transport/chttp2/transport/internal.h +5 -1
- data/src/core/ext/transport/chttp2/transport/parsing.cc +1 -28
- data/src/core/ext/transport/chttp2/transport/writing.cc +6 -5
- data/src/core/ext/transport/inproc/inproc_transport.cc +12 -12
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.c +224 -0
- data/src/core/ext/upb-generated/envoy/config/accesslog/v3/accesslog.upb.h +700 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.c +74 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/circuit_breaker.upb.h +226 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.c +380 -0
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/cluster.upb.h +1378 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cluster → config/cluster/v3}/filter.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/filter.upb.h +69 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/cluster → config/cluster/v3}/outlier_detection.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/cluster/v3/outlier_detection.upb.h +323 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/address.upb.h +334 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/backoff.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/backoff.upb.h +79 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.c +309 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/base.upb.h +869 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.c +96 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/config_source.upb.h +328 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/event_service_config.upb.h +71 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.c +195 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/grpc_service.upb.h +634 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.c +170 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/health_check.upb.h +684 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/http_uri.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/core/v3/http_uri.upb.h +80 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.c +152 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/protocol.upb.h +536 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.c +28 -0
- data/src/core/ext/upb-generated/envoy/config/core/v3/proxy_protocol.upb.h +58 -0
- data/src/core/ext/upb-generated/envoy/{api/v2/core → config/core/v3}/socket_option.upb.c +6 -6
- data/src/core/ext/upb-generated/envoy/config/core/v3/socket_option.upb.h +88 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint.upb.h +220 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.c +91 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/endpoint_components.upb.h +273 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.c +112 -0
- data/src/core/ext/upb-generated/envoy/config/endpoint/v3/load_report.upb.h +332 -0
- data/src/core/ext/upb-generated/envoy/config/listener/{v2 → v3}/api_listener.upb.c +8 -8
- data/src/core/ext/upb-generated/envoy/config/listener/v3/api_listener.upb.h +65 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.c +108 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener.upb.h +401 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.c +138 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/listener_components.upb.h +490 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.c +41 -0
- data/src/core/ext/upb-generated/envoy/config/listener/v3/udp_listener_config.upb.h +94 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.c +174 -0
- data/src/core/ext/upb-generated/envoy/config/rbac/v3/rbac.upb.h +599 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route.upb.h +204 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.c +773 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/route_components.upb.h +2855 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.c +59 -0
- data/src/core/ext/upb-generated/envoy/config/route/v3/scoped_route.upb.h +135 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.c +50 -0
- data/src/core/ext/upb-generated/envoy/config/trace/v3/http_tracer.upb.h +108 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.c +312 -0
- data/src/core/ext/upb-generated/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1125 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.c +20 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +34 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.c +111 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/common.upb.h +401 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.c +72 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +198 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.c +105 -0
- data/src/core/ext/upb-generated/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +388 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/cluster/v3}/cds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/cluster/v3/cds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/{v2 → v3}/ads.upb.c +5 -4
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/ads.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.c +129 -0
- data/src/core/ext/upb-generated/envoy/service/discovery/v3/discovery.upb.h +386 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/endpoint/v3}/eds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/endpoint/v3/eds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/listener/v3}/lds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/listener/v3/lds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.c +55 -0
- data/src/core/ext/upb-generated/envoy/service/load_stats/v3/lrs.upb.h +136 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/route/v3}/rds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/route/v3/rds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/{api/v2 → service/route/v3}/srds.upb.c +5 -6
- data/src/core/ext/upb-generated/envoy/service/route/v3/srds.upb.h +49 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.c +47 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/metadata.upb.h +114 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.c +35 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/number.upb.h +77 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.c +34 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/path.upb.h +71 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.c +64 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/regex.upb.h +145 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.c +53 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/string.upb.h +127 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.c +63 -0
- data/src/core/ext/upb-generated/envoy/type/matcher/v3/value.upb.h +188 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.c +88 -0
- data/src/core/ext/upb-generated/envoy/type/metadata/v3/metadata.upb.h +258 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.c +90 -0
- data/src/core/ext/upb-generated/envoy/type/tracing/v3/custom_tag.upb.h +250 -0
- data/src/core/ext/upb-generated/envoy/type/{http.upb.c → v3/http.upb.c} +2 -2
- data/src/core/ext/upb-generated/envoy/type/{http.upb.h → v3/http.upb.h} +8 -8
- data/src/core/ext/upb-generated/envoy/type/{percent.upb.c → v3/percent.upb.c} +9 -8
- data/src/core/ext/upb-generated/envoy/type/v3/percent.upb.h +86 -0
- data/src/core/ext/upb-generated/envoy/type/{range.upb.c → v3/range.upb.c} +12 -11
- data/src/core/ext/upb-generated/envoy/type/v3/range.upb.h +111 -0
- data/src/core/ext/upb-generated/envoy/type/{semantic_version.upb.c → v3/semantic_version.upb.c} +6 -5
- data/src/core/ext/upb-generated/envoy/type/v3/semantic_version.upb.h +61 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.c +234 -0
- data/src/core/ext/upb-generated/google/api/expr/v1alpha1/syntax.upb.h +759 -0
- data/src/core/ext/upb-generated/google/protobuf/descriptor.upb.c +36 -36
- data/src/core/ext/upb-generated/google/protobuf/struct.upb.h +1 -1
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.c +27 -0
- data/src/core/ext/upb-generated/udpa/annotations/versioning.upb.h +53 -0
- data/src/core/ext/upb-generated/validate/validate.upb.c +11 -11
- data/src/core/ext/upb-generated/validate/validate.upb.h +1 -1
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_api.cc +1045 -767
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_api.h +114 -99
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_bootstrap.cc +44 -2
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_bootstrap.h +8 -3
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel.h +4 -4
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel_args.h +3 -3
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_channel_secure.cc +2 -5
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.cc +85 -417
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client.h +12 -45
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.cc +2 -2
- data/src/core/ext/{filters/client_channel/xds → xds}/xds_client_stats.h +3 -3
- data/src/core/lib/channel/channelz.cc +14 -15
- data/src/core/lib/channel/channelz.h +1 -1
- data/src/core/lib/channel/channelz_registry.cc +3 -1
- data/src/core/lib/gpr/sync_posix.cc +2 -8
- data/src/core/lib/iomgr/endpoint.cc +5 -1
- data/src/core/lib/iomgr/endpoint.h +7 -3
- data/src/core/lib/iomgr/endpoint_cfstream.cc +32 -11
- data/src/core/lib/iomgr/ev_posix.cc +0 -2
- data/src/core/lib/iomgr/iomgr.cc +0 -10
- data/src/core/lib/iomgr/iomgr.h +0 -10
- data/src/core/{ext/filters/client_channel → lib/iomgr}/parse_address.cc +1 -1
- data/src/core/{ext/filters/client_channel → lib/iomgr}/parse_address.h +3 -3
- data/src/core/lib/iomgr/sockaddr_utils.cc +2 -1
- data/src/core/lib/iomgr/sockaddr_utils.h +2 -1
- data/src/core/lib/iomgr/tcp_custom.cc +32 -16
- data/src/core/lib/iomgr/tcp_posix.cc +31 -13
- data/src/core/lib/iomgr/tcp_windows.cc +26 -10
- data/src/core/lib/security/authorization/authorization_engine.cc +177 -0
- data/src/core/lib/security/authorization/authorization_engine.h +84 -0
- data/src/core/lib/security/authorization/evaluate_args.cc +153 -0
- data/src/core/lib/security/authorization/evaluate_args.h +59 -0
- data/src/core/lib/security/authorization/mock_cel/activation.h +57 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expr_builder_factory.h +42 -0
- data/src/core/lib/security/authorization/mock_cel/cel_expression.h +68 -0
- data/src/core/lib/security/authorization/mock_cel/cel_value.h +93 -0
- data/src/core/lib/security/authorization/mock_cel/evaluator_core.h +67 -0
- data/src/core/lib/security/authorization/mock_cel/flat_expr_builder.h +56 -0
- data/src/core/lib/security/authorization/mock_cel/statusor.h +50 -0
- data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +56 -38
- data/src/core/lib/security/security_connector/fake/fake_security_connector.cc +1 -2
- data/src/core/lib/security/transport/secure_endpoint.cc +7 -1
- data/src/core/lib/surface/call.cc +12 -12
- data/src/core/lib/surface/call.h +2 -1
- data/src/core/lib/surface/channel.cc +28 -20
- data/src/core/lib/surface/channel.h +12 -2
- data/src/core/lib/surface/completion_queue.cc +10 -272
- data/src/core/lib/surface/completion_queue.h +0 -8
- data/src/core/lib/surface/init.cc +1 -3
- data/src/core/lib/surface/server.cc +1066 -1244
- data/src/core/lib/surface/server.h +363 -87
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/authority_override.cc +38 -0
- data/src/core/lib/transport/authority_override.h +32 -0
- data/src/core/lib/transport/connectivity_state.cc +18 -13
- data/src/core/lib/transport/connectivity_state.h +18 -6
- data/src/core/lib/transport/error_utils.cc +13 -0
- data/src/core/lib/transport/error_utils.h +6 -0
- data/src/core/lib/transport/static_metadata.cc +295 -276
- data/src/core/lib/transport/static_metadata.h +80 -73
- data/src/core/lib/transport/transport.h +7 -0
- data/src/core/lib/uri/uri_parser.cc +23 -21
- data/src/core/lib/uri/uri_parser.h +3 -1
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +22 -0
- data/src/core/tsi/ssl_transport_security.cc +3 -9
- data/src/ruby/ext/grpc/rb_channel_credentials.c +9 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +2 -2
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +4 -4
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/spec/channel_credentials_spec.rb +10 -0
- data/src/ruby/spec/generic/active_call_spec.rb +19 -8
- data/third_party/abseil-cpp/absl/algorithm/container.h +1727 -0
- data/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +161 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.cc +93 -0
- data/third_party/abseil-cpp/absl/base/internal/exponential_biased.h +130 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +620 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +126 -0
- data/third_party/abseil-cpp/absl/container/fixed_array.h +515 -0
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +503 -0
- data/third_party/abseil-cpp/absl/container/internal/common.h +202 -0
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +440 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +146 -0
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +191 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +269 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +297 -0
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +30 -0
- data/third_party/abseil-cpp/absl/container/internal/have_sse.h +49 -0
- data/third_party/abseil-cpp/absl/container/internal/layout.h +741 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +48 -0
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1882 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +138 -0
- data/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +1895 -0
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.h +71 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +382 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +134 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +192 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +125 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +70 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +99 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +248 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +24 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +85 -0
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +346 -0
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +128 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +194 -0
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +140 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +231 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +25 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1480 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +81 -0
- data/third_party/abseil-cpp/absl/functional/function_ref.h +139 -0
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +106 -0
- data/third_party/abseil-cpp/absl/hash/hash.h +324 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +346 -0
- data/third_party/abseil-cpp/absl/hash/internal/city.h +96 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +55 -0
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +988 -0
- data/third_party/abseil-cpp/absl/status/status.cc +447 -0
- data/third_party/abseil-cpp/absl/status/status.h +428 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.cc +43 -0
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +51 -0
- data/third_party/abseil-cpp/absl/strings/cord.cc +2019 -0
- data/third_party/abseil-cpp/absl/strings/cord.h +1121 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +151 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +57 -0
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +99 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +140 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +60 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +697 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +141 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +155 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/mutex_nonprod.inc +261 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +115 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.cc +484 -0
- data/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +159 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +2728 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +1056 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +78 -0
- data/third_party/abseil-cpp/absl/synchronization/notification.h +123 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.cc +64 -0
- data/third_party/abseil-cpp/absl/types/bad_variant_access.h +82 -0
- data/third_party/abseil-cpp/absl/types/internal/variant.h +1646 -0
- data/third_party/abseil-cpp/absl/types/variant.h +861 -0
- data/third_party/boringssl-with-bazel/err_data.c +263 -257
- data/third_party/boringssl-with-bazel/src/crypto/evp/evp_asn1.c +16 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/hpke.c +456 -0
- data/third_party/boringssl-with-bazel/src/crypto/hpke/internal.h +192 -0
- data/third_party/boringssl-with-bazel/src/crypto/x509/x_sig.c +20 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/arm_arch.h +52 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +39 -7
- data/third_party/boringssl-with-bazel/src/include/openssl/tls1.h +2 -3
- data/third_party/boringssl-with-bazel/src/include/openssl/x509.h +11 -0
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +4 -0
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +3 -6
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +10 -0
- data/third_party/boringssl-with-bazel/src/ssl/t1_lib.cc +34 -9
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +5 -0
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +5 -3
- data/third_party/upb/upb/decode.c +64 -15
- data/third_party/upb/upb/encode.c +2 -2
- data/third_party/upb/upb/msg.h +2 -2
- data/third_party/upb/upb/port_def.inc +1 -1
- data/third_party/upb/upb/table.c +0 -11
- data/third_party/upb/upb/table.int.h +0 -9
- data/third_party/upb/upb/upb.c +16 -14
- data/third_party/upb/upb/upb.h +26 -0
- data/third_party/upb/upb/upb.hpp +2 -0
- metadata +257 -155
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +0 -21
- data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.c +0 -114
- data/src/core/ext/upb-generated/envoy/api/v2/auth/common.upb.h +0 -429
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.c +0 -72
- data/src/core/ext/upb-generated/envoy/api/v2/auth/secret.upb.h +0 -198
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.c +0 -105
- data/src/core/ext/upb-generated/envoy/api/v2/auth/tls.upb.h +0 -388
- data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +0 -403
- data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +0 -1453
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +0 -74
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +0 -226
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.h +0 -69
- data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.h +0 -323
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +0 -334
- data/src/core/ext/upb-generated/envoy/api/v2/core/backoff.upb.h +0 -79
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +0 -313
- data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +0 -891
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +0 -96
- data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +0 -328
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.c +0 -34
- data/src/core/ext/upb-generated/envoy/api/v2/core/event_service_config.upb.h +0 -71
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +0 -197
- data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +0 -649
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +0 -172
- data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +0 -693
- data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.h +0 -80
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +0 -152
- data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +0 -536
- data/src/core/ext/upb-generated/envoy/api/v2/core/socket_option.upb.h +0 -88
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +0 -129
- data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.h +0 -386
- data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +0 -92
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +0 -224
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +0 -91
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +0 -273
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +0 -112
- data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.h +0 -332
- data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +0 -109
- data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +0 -415
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +0 -145
- data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +0 -538
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +0 -43
- data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +0 -111
- data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +0 -204
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +0 -18
- data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +0 -32
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +0 -815
- data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +0 -2984
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +0 -59
- data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +0 -135
- data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +0 -52
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +0 -228
- data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +0 -732
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +0 -316
- data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +0 -1167
- data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +0 -65
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.c +0 -51
- data/src/core/ext/upb-generated/envoy/config/trace/v2/http_tracer.upb.h +0 -125
- data/src/core/ext/upb-generated/envoy/service/discovery/v2/ads.upb.h +0 -49
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.c +0 -54
- data/src/core/ext/upb-generated/envoy/service/load_stats/v2/lrs.upb.h +0 -136
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +0 -63
- data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +0 -145
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +0 -53
- data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +0 -133
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +0 -88
- data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +0 -258
- data/src/core/ext/upb-generated/envoy/type/percent.upb.h +0 -86
- data/src/core/ext/upb-generated/envoy/type/range.upb.h +0 -111
- data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +0 -61
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +0 -89
- data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +0 -250
- data/src/core/lib/security/transport/target_authority_table.cc +0 -75
- data/src/core/lib/security/transport/target_authority_table.h +0 -40
- data/src/core/lib/slice/slice_hash_table.h +0 -199
- data/src/core/lib/slice/slice_weak_hash_table.h +0 -102
@@ -119,6 +119,18 @@ GRPCAPI void grpc_ssl_session_cache_destroy(grpc_ssl_session_cache* cache);
|
|
119
119
|
GRPCAPI grpc_arg
|
120
120
|
grpc_ssl_session_cache_create_channel_arg(grpc_ssl_session_cache* cache);
|
121
121
|
|
122
|
+
/** --- grpc_call_credentials object.
|
123
|
+
|
124
|
+
A call credentials object represents a way to authenticate on a particular
|
125
|
+
call. These credentials can be composed with a channel credentials object
|
126
|
+
so that they are sent with every call on this channel. */
|
127
|
+
|
128
|
+
typedef struct grpc_call_credentials grpc_call_credentials;
|
129
|
+
|
130
|
+
/** Releases a call credentials object.
|
131
|
+
The creator of the credentials object is responsible for its release. */
|
132
|
+
GRPCAPI void grpc_call_credentials_release(grpc_call_credentials* creds);
|
133
|
+
|
122
134
|
/** --- grpc_channel_credentials object. ---
|
123
135
|
|
124
136
|
A channel credentials object represents a way to authenticate a client on a
|
@@ -133,8 +145,23 @@ GRPCAPI void grpc_channel_credentials_release(grpc_channel_credentials* creds);
|
|
133
145
|
/** Creates default credentials to connect to a google gRPC service.
|
134
146
|
WARNING: Do NOT use this credentials to connect to a non-google service as
|
135
147
|
this could result in an oauth2 token leak. The security level of the
|
136
|
-
resulting connection is GRPC_PRIVACY_AND_INTEGRITY.
|
137
|
-
|
148
|
+
resulting connection is GRPC_PRIVACY_AND_INTEGRITY.
|
149
|
+
|
150
|
+
If specified, the supplied call credentials object will be attached to the
|
151
|
+
returned channel credentials object. The call_credentials object must remain
|
152
|
+
valid throughout the lifetime of the returned grpc_channel_credentials
|
153
|
+
object. It is expected that the call credentials object was generated
|
154
|
+
according to the Application Default Credentials mechanism and asserts the
|
155
|
+
identity of the default service account of the machine. Supplying any other
|
156
|
+
sort of call credential will result in undefined behavior, up to and
|
157
|
+
including the sudden and unexpected failure of RPCs.
|
158
|
+
|
159
|
+
If nullptr is supplied, the returned channel credentials object will use a
|
160
|
+
call credentials object based on the Application Default Credentials
|
161
|
+
mechanism.
|
162
|
+
*/
|
163
|
+
GRPCAPI grpc_channel_credentials* grpc_google_default_credentials_create(
|
164
|
+
grpc_call_credentials* call_credentials);
|
138
165
|
|
139
166
|
/** Callback for getting the SSL roots override from the application.
|
140
167
|
In case of success, *pem_roots_certs must be set to a NULL terminated string
|
@@ -272,24 +299,14 @@ GRPCAPI grpc_channel_credentials* grpc_ssl_credentials_create_ex(
|
|
272
299
|
const char* pem_root_certs, grpc_ssl_pem_key_cert_pair* pem_key_cert_pair,
|
273
300
|
const grpc_ssl_verify_peer_options* verify_options, void* reserved);
|
274
301
|
|
275
|
-
/** --- grpc_call_credentials object.
|
276
|
-
|
277
|
-
A call credentials object represents a way to authenticate on a particular
|
278
|
-
call. These credentials can be composed with a channel credentials object
|
279
|
-
so that they are sent with every call on this channel. */
|
280
|
-
|
281
|
-
typedef struct grpc_call_credentials grpc_call_credentials;
|
282
|
-
|
283
|
-
/** Releases a call credentials object.
|
284
|
-
The creator of the credentials object is responsible for its release. */
|
285
|
-
GRPCAPI void grpc_call_credentials_release(grpc_call_credentials* creds);
|
286
|
-
|
287
302
|
/** Creates a composite channel credentials object. The security level of
|
288
303
|
* resulting connection is determined by channel_creds. */
|
289
304
|
GRPCAPI grpc_channel_credentials* grpc_composite_channel_credentials_create(
|
290
305
|
grpc_channel_credentials* channel_creds, grpc_call_credentials* call_creds,
|
291
306
|
void* reserved);
|
292
307
|
|
308
|
+
/** --- composite credentials. */
|
309
|
+
|
293
310
|
/** Creates a composite call credentials object. */
|
294
311
|
GRPCAPI grpc_call_credentials* grpc_composite_call_credentials_create(
|
295
312
|
grpc_call_credentials* creds1, grpc_call_credentials* creds2,
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Welcome to `include/grpc/impl/codegen`
|
2
|
+
|
3
|
+
## Why is this directory here?
|
4
|
+
|
5
|
+
This directory exists so that generated C++ code can include selected files upon
|
6
|
+
which it depends without having to depend on the entire gRPC C++ library. This
|
7
|
+
directory thus exists to support `include/grpcpp/impl/codegen`. This constraint
|
8
|
+
is particularly relevant for users of bazel, particularly if they use the
|
9
|
+
multi-lingual `proto_library` target type. Generated code that uses this target
|
10
|
+
only depends on the gRPC C++ targets associated with these header files, not the
|
11
|
+
entire gRPC C++ codebase since that would make the build time of these types of
|
12
|
+
targets excessively large (particularly when they are not even C++ specific).
|
13
|
+
|
14
|
+
## What should user code do?
|
15
|
+
|
16
|
+
User code should *not* include anything from this directory. Only generated code
|
17
|
+
and gRPC library code should include contents from this directory. C++ user code
|
18
|
+
should instead include contents from the main `grpcpp` directory or its
|
19
|
+
accessible subcomponents like `grpcpp/support`. It is possible that we may
|
20
|
+
remove this directory altogether if the motivations for its existence are no
|
21
|
+
longer strong enough (e.g., if the gRPC C++ library no longer has a need for an
|
22
|
+
`impl/codegen` directory of its own).
|
@@ -31,8 +31,13 @@
|
|
31
31
|
* Defines GPR_ABSEIL_SYNC to use synchronization features from Abseil
|
32
32
|
*/
|
33
33
|
#ifndef GPR_ABSEIL_SYNC
|
34
|
-
|
34
|
+
#if defined(__APPLE__)
|
35
|
+
// This is disabled on Apple platforms because macos/grpc_basictests_c_cpp
|
36
|
+
// fails with this. https://github.com/grpc/grpc/issues/23661
|
37
|
+
#else
|
38
|
+
#define GPR_ABSEIL_SYNC 1
|
35
39
|
#endif
|
40
|
+
#endif // GPR_ABSEIL_SYNC
|
36
41
|
|
37
42
|
/* Get windows.h included everywhere (we need it) */
|
38
43
|
#if defined(_WIN64) || defined(WIN64) || defined(_WIN32) || defined(WIN32)
|
@@ -106,6 +106,7 @@ static void g_poller_unref() {
|
|
106
106
|
grpc_schedule_on_exec_ctx));
|
107
107
|
gpr_mu_unlock(p->pollset_mu);
|
108
108
|
grpc_timer_cancel(&p->polling_timer);
|
109
|
+
backup_poller_shutdown_unref(p);
|
109
110
|
} else {
|
110
111
|
gpr_mu_unlock(&g_poller_mu);
|
111
112
|
}
|
@@ -143,8 +144,8 @@ static void g_poller_init_locked() {
|
|
143
144
|
g_poller->shutting_down = false;
|
144
145
|
grpc_pollset_init(g_poller->pollset, &g_poller->pollset_mu);
|
145
146
|
gpr_ref_init(&g_poller->refs, 0);
|
146
|
-
// one for timer cancellation, one for pollset shutdown
|
147
|
-
gpr_ref_init(&g_poller->shutdown_refs,
|
147
|
+
// one for timer cancellation, one for pollset shutdown, one for g_poller
|
148
|
+
gpr_ref_init(&g_poller->shutdown_refs, 3);
|
148
149
|
GRPC_CLOSURE_INIT(&g_poller->run_poller_closure, run_poller, g_poller,
|
149
150
|
grpc_schedule_on_exec_ctx);
|
150
151
|
grpc_timer_init(&g_poller->polling_timer,
|
@@ -28,6 +28,8 @@
|
|
28
28
|
|
29
29
|
#include <set>
|
30
30
|
|
31
|
+
#include "absl/strings/numbers.h"
|
32
|
+
#include "absl/strings/str_cat.h"
|
31
33
|
#include "absl/strings/string_view.h"
|
32
34
|
|
33
35
|
#include <grpc/support/alloc.h>
|
@@ -214,7 +216,8 @@ class ChannelData {
|
|
214
216
|
grpc_closure* on_complete,
|
215
217
|
bool cancel);
|
216
218
|
|
217
|
-
void Notify(grpc_connectivity_state state
|
219
|
+
void Notify(grpc_connectivity_state state,
|
220
|
+
const absl::Status& /* status */) override;
|
218
221
|
|
219
222
|
void Cancel();
|
220
223
|
|
@@ -260,7 +263,8 @@ class ChannelData {
|
|
260
263
|
~ChannelData();
|
261
264
|
|
262
265
|
void UpdateStateAndPickerLocked(
|
263
|
-
grpc_connectivity_state state, const
|
266
|
+
grpc_connectivity_state state, const absl::Status& status,
|
267
|
+
const char* reason,
|
264
268
|
std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker);
|
265
269
|
|
266
270
|
void UpdateServiceConfigInDataPlaneLocked(
|
@@ -328,6 +332,7 @@ class ChannelData {
|
|
328
332
|
// applied in the data plane mutex when the picker is updated.
|
329
333
|
std::map<RefCountedPtr<SubchannelWrapper>, RefCountedPtr<ConnectedSubchannel>>
|
330
334
|
pending_subchannel_updates_;
|
335
|
+
int keepalive_time_ = -1;
|
331
336
|
|
332
337
|
//
|
333
338
|
// Fields accessed from both data plane mutex and control plane
|
@@ -969,6 +974,10 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
|
|
969
974
|
|
970
975
|
void ResetBackoff() override { subchannel_->ResetBackoff(); }
|
971
976
|
|
977
|
+
void ThrottleKeepaliveTime(int new_keepalive_time) {
|
978
|
+
subchannel_->ThrottleKeepaliveTime(new_keepalive_time);
|
979
|
+
}
|
980
|
+
|
972
981
|
const grpc_channel_args* channel_args() override {
|
973
982
|
return subchannel_->channel_args();
|
974
983
|
}
|
@@ -1099,6 +1108,32 @@ class ChannelData::SubchannelWrapper : public SubchannelInterface {
|
|
1099
1108
|
watcher_.get());
|
1100
1109
|
}
|
1101
1110
|
ConnectivityStateChange state_change = PopConnectivityStateChange();
|
1111
|
+
absl::optional<absl::Cord> keepalive_throttling =
|
1112
|
+
state_change.status.GetPayload(grpc_core::kKeepaliveThrottlingKey);
|
1113
|
+
if (keepalive_throttling.has_value()) {
|
1114
|
+
int new_keepalive_time = -1;
|
1115
|
+
if (absl::SimpleAtoi(std::string(keepalive_throttling.value()),
|
1116
|
+
&new_keepalive_time)) {
|
1117
|
+
if (new_keepalive_time > parent_->chand_->keepalive_time_) {
|
1118
|
+
parent_->chand_->keepalive_time_ = new_keepalive_time;
|
1119
|
+
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1120
|
+
gpr_log(GPR_INFO, "chand=%p: throttling keepalive time to %d",
|
1121
|
+
parent_->chand_, parent_->chand_->keepalive_time_);
|
1122
|
+
}
|
1123
|
+
// Propagate the new keepalive time to all subchannels. This is so
|
1124
|
+
// that new transports created by any subchannel (and not just the
|
1125
|
+
// subchannel that received the GOAWAY), use the new keepalive time.
|
1126
|
+
for (auto* subchannel_wrapper :
|
1127
|
+
parent_->chand_->subchannel_wrappers_) {
|
1128
|
+
subchannel_wrapper->ThrottleKeepaliveTime(new_keepalive_time);
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
} else {
|
1132
|
+
gpr_log(GPR_ERROR, "chand=%p: Illegal keepalive throttling value %s",
|
1133
|
+
parent_->chand_,
|
1134
|
+
std::string(keepalive_throttling.value()).c_str());
|
1135
|
+
}
|
1136
|
+
}
|
1102
1137
|
// Ignore update if the parent WatcherWrapper has been replaced
|
1103
1138
|
// since this callback was scheduled.
|
1104
1139
|
if (watcher_ != nullptr) {
|
@@ -1212,7 +1247,7 @@ void ChannelData::ExternalConnectivityWatcher::
|
|
1212
1247
|
}
|
1213
1248
|
|
1214
1249
|
void ChannelData::ExternalConnectivityWatcher::Notify(
|
1215
|
-
grpc_connectivity_state state) {
|
1250
|
+
grpc_connectivity_state state, const absl::Status& /* status */) {
|
1216
1251
|
bool done = false;
|
1217
1252
|
if (!done_.CompareExchangeStrong(&done, true, MemoryOrder::RELAXED,
|
1218
1253
|
MemoryOrder::RELAXED)) {
|
@@ -1347,24 +1382,27 @@ class ChannelData::ClientChannelControlHelper
|
|
1347
1382
|
chand_->client_channel_factory_->CreateSubchannel(new_args);
|
1348
1383
|
grpc_channel_args_destroy(new_args);
|
1349
1384
|
if (subchannel == nullptr) return nullptr;
|
1385
|
+
subchannel->ThrottleKeepaliveTime(chand_->keepalive_time_);
|
1350
1386
|
return MakeRefCounted<SubchannelWrapper>(
|
1351
1387
|
chand_, subchannel, std::move(health_check_service_name));
|
1352
1388
|
}
|
1353
1389
|
|
1354
1390
|
void UpdateState(
|
1355
|
-
grpc_connectivity_state state,
|
1391
|
+
grpc_connectivity_state state, const absl::Status& status,
|
1356
1392
|
std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) override {
|
1357
1393
|
grpc_error* disconnect_error = chand_->disconnect_error();
|
1358
1394
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_client_channel_routing_trace)) {
|
1359
1395
|
const char* extra = disconnect_error == GRPC_ERROR_NONE
|
1360
1396
|
? ""
|
1361
1397
|
: " (ignoring -- channel shutting down)";
|
1362
|
-
gpr_log(GPR_INFO, "chand=%p: update: state=%s picker=%p%s",
|
1363
|
-
ConnectivityStateName(state),
|
1398
|
+
gpr_log(GPR_INFO, "chand=%p: update: state=%s status=(%s) picker=%p%s",
|
1399
|
+
chand_, ConnectivityStateName(state), status.ToString().c_str(),
|
1400
|
+
picker.get(), extra);
|
1364
1401
|
}
|
1365
1402
|
// Do update only if not shutting down.
|
1366
1403
|
if (disconnect_error == GRPC_ERROR_NONE) {
|
1367
|
-
chand_->UpdateStateAndPickerLocked(state, "helper",
|
1404
|
+
chand_->UpdateStateAndPickerLocked(state, status, "helper",
|
1405
|
+
std::move(picker));
|
1368
1406
|
}
|
1369
1407
|
}
|
1370
1408
|
|
@@ -1678,9 +1716,13 @@ ChannelData::ChannelData(grpc_channel_element_args* args, grpc_error** error)
|
|
1678
1716
|
channel_args_ = new_args != nullptr
|
1679
1717
|
? new_args
|
1680
1718
|
: grpc_channel_args_copy(args->channel_args);
|
1719
|
+
keepalive_time_ = grpc_channel_args_find_integer(
|
1720
|
+
channel_args_, GRPC_ARG_KEEPALIVE_TIME_MS,
|
1721
|
+
{-1 /* default value, unset */, 1, INT_MAX});
|
1681
1722
|
if (!ResolverRegistry::IsValidTarget(target_uri_.get())) {
|
1682
|
-
|
1683
|
-
|
1723
|
+
std::string error_message =
|
1724
|
+
absl::StrCat("the target uri is not valid: ", target_uri_.get());
|
1725
|
+
*error = GRPC_ERROR_CREATE_FROM_COPIED_STRING(error_message.c_str());
|
1684
1726
|
return;
|
1685
1727
|
}
|
1686
1728
|
*error = GRPC_ERROR_NONE;
|
@@ -1701,7 +1743,8 @@ ChannelData::~ChannelData() {
|
|
1701
1743
|
}
|
1702
1744
|
|
1703
1745
|
void ChannelData::UpdateStateAndPickerLocked(
|
1704
|
-
grpc_connectivity_state state, const
|
1746
|
+
grpc_connectivity_state state, const absl::Status& status,
|
1747
|
+
const char* reason,
|
1705
1748
|
std::unique_ptr<LoadBalancingPolicy::SubchannelPicker> picker) {
|
1706
1749
|
// Clean the control plane when entering IDLE.
|
1707
1750
|
if (picker_ == nullptr) {
|
@@ -1711,7 +1754,7 @@ void ChannelData::UpdateStateAndPickerLocked(
|
|
1711
1754
|
received_first_resolver_result_ = false;
|
1712
1755
|
}
|
1713
1756
|
// Update connectivity state.
|
1714
|
-
state_tracker_.SetState(state, reason);
|
1757
|
+
state_tracker_.SetState(state, status, reason);
|
1715
1758
|
if (channelz_node_ != nullptr) {
|
1716
1759
|
channelz_node_->SetConnectivityState(state);
|
1717
1760
|
channelz_node_->AddTraceEvent(
|
@@ -1938,8 +1981,8 @@ void ChannelData::StartTransportOpLocked(grpc_transport_op* op) {
|
|
1938
1981
|
static_cast<grpc_connectivity_state>(value) == GRPC_CHANNEL_IDLE) {
|
1939
1982
|
if (disconnect_error() == GRPC_ERROR_NONE) {
|
1940
1983
|
// Enter IDLE state.
|
1941
|
-
UpdateStateAndPickerLocked(GRPC_CHANNEL_IDLE,
|
1942
|
-
nullptr);
|
1984
|
+
UpdateStateAndPickerLocked(GRPC_CHANNEL_IDLE, absl::Status(),
|
1985
|
+
"channel entering IDLE", nullptr);
|
1943
1986
|
}
|
1944
1987
|
GRPC_ERROR_UNREF(op->disconnect_with_error);
|
1945
1988
|
} else {
|
@@ -1948,7 +1991,7 @@ void ChannelData::StartTransportOpLocked(grpc_transport_op* op) {
|
|
1948
1991
|
GRPC_ERROR_NONE);
|
1949
1992
|
disconnect_error_.Store(op->disconnect_with_error, MemoryOrder::RELEASE);
|
1950
1993
|
UpdateStateAndPickerLocked(
|
1951
|
-
GRPC_CHANNEL_SHUTDOWN, "shutdown from API",
|
1994
|
+
GRPC_CHANNEL_SHUTDOWN, absl::Status(), "shutdown from API",
|
1952
1995
|
absl::make_unique<LoadBalancingPolicy::TransientFailurePicker>(
|
1953
1996
|
GRPC_ERROR_REF(op->disconnect_with_error)));
|
1954
1997
|
}
|
@@ -2133,13 +2176,14 @@ void CallData::Destroy(grpc_call_element* elem,
|
|
2133
2176
|
const grpc_call_final_info* /*final_info*/,
|
2134
2177
|
grpc_closure* then_schedule_closure) {
|
2135
2178
|
CallData* calld = static_cast<CallData*>(elem->call_data);
|
2136
|
-
|
2137
|
-
calld->subchannel_call_->SetAfterCallStackDestroy(then_schedule_closure);
|
2138
|
-
then_schedule_closure = nullptr;
|
2139
|
-
}
|
2179
|
+
RefCountedPtr<SubchannelCall> subchannel_call = calld->subchannel_call_;
|
2140
2180
|
calld->~CallData();
|
2141
|
-
|
2142
|
-
|
2181
|
+
if (GPR_LIKELY(subchannel_call != nullptr)) {
|
2182
|
+
subchannel_call->SetAfterCallStackDestroy(then_schedule_closure);
|
2183
|
+
} else {
|
2184
|
+
// TODO(yashkt) : This can potentially be a Closure::Run
|
2185
|
+
ExecCtx::Run(DEBUG_LOCATION, then_schedule_closure, GRPC_ERROR_NONE);
|
2186
|
+
}
|
2143
2187
|
}
|
2144
2188
|
|
2145
2189
|
void CallData::StartTransportStreamOpBatch(
|
@@ -79,4 +79,4 @@ void grpc_client_channel_stop_connectivity_watch(
|
|
79
79
|
grpc_core::RefCountedPtr<grpc_core::SubchannelCall>
|
80
80
|
grpc_client_channel_get_subchannel_call(grpc_call_element* elem);
|
81
81
|
|
82
|
-
#endif
|
82
|
+
#endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_CLIENT_CHANNEL_H
|
@@ -91,7 +91,12 @@ void HealthCheckClient::SetHealthStatusLocked(grpc_connectivity_state state,
|
|
91
91
|
gpr_log(GPR_INFO, "HealthCheckClient %p: setting state=%s reason=%s", this,
|
92
92
|
ConnectivityStateName(state), reason);
|
93
93
|
}
|
94
|
-
if (watcher_ != nullptr)
|
94
|
+
if (watcher_ != nullptr) {
|
95
|
+
watcher_->Notify(state,
|
96
|
+
state == GRPC_CHANNEL_TRANSIENT_FAILURE
|
97
|
+
? absl::Status(absl::StatusCode::kUnavailable, reason)
|
98
|
+
: absl::Status());
|
99
|
+
}
|
95
100
|
}
|
96
101
|
|
97
102
|
void HealthCheckClient::Orphan() {
|
@@ -325,10 +325,9 @@ void HttpConnectHandshaker::DoHandshake(grpc_tcp_server_acceptor* /*acceptor*/,
|
|
325
325
|
args_ = args;
|
326
326
|
on_handshake_done_ = on_handshake_done;
|
327
327
|
// Log connection via proxy.
|
328
|
-
|
328
|
+
std::string proxy_name(grpc_endpoint_get_peer(args->endpoint));
|
329
329
|
gpr_log(GPR_INFO, "Connecting to server %s via HTTP proxy %s", server_name,
|
330
|
-
proxy_name);
|
331
|
-
gpr_free(proxy_name);
|
330
|
+
proxy_name.c_str());
|
332
331
|
// Construct HTTP CONNECT request.
|
333
332
|
grpc_httpcli_request request;
|
334
333
|
request.host = server_name;
|
@@ -24,6 +24,7 @@
|
|
24
24
|
#include <functional>
|
25
25
|
#include <iterator>
|
26
26
|
|
27
|
+
#include "absl/status/status.h"
|
27
28
|
#include "absl/strings/string_view.h"
|
28
29
|
|
29
30
|
#include "src/core/ext/filters/client_channel/server_address.h"
|
@@ -283,6 +284,7 @@ class LoadBalancingPolicy : public InternallyRefCounted<LoadBalancingPolicy> {
|
|
283
284
|
/// Sets the connectivity state and returns a new picker to be used
|
284
285
|
/// by the client channel.
|
285
286
|
virtual void UpdateState(grpc_connectivity_state state,
|
287
|
+
const absl::Status& status,
|
286
288
|
std::unique_ptr<SubchannelPicker>) = 0;
|
287
289
|
|
288
290
|
/// Requests that the resolver re-resolve.
|
@@ -45,7 +45,7 @@ class ChildPolicyHandler::Helper
|
|
45
45
|
return parent_->channel_control_helper()->CreateSubchannel(args);
|
46
46
|
}
|
47
47
|
|
48
|
-
void UpdateState(grpc_connectivity_state state,
|
48
|
+
void UpdateState(grpc_connectivity_state state, const absl::Status& status,
|
49
49
|
std::unique_ptr<SubchannelPicker> picker) override {
|
50
50
|
if (parent_->shutting_down_) return;
|
51
51
|
// If this request is from the pending child policy, ignore it until
|
@@ -55,8 +55,9 @@ class ChildPolicyHandler::Helper
|
|
55
55
|
if (GRPC_TRACE_FLAG_ENABLED(*(parent_->tracer_))) {
|
56
56
|
gpr_log(GPR_INFO,
|
57
57
|
"[child_policy_handler %p] helper %p: pending child policy %p "
|
58
|
-
"reports state=%s",
|
59
|
-
parent_.get(), this, child_, ConnectivityStateName(state)
|
58
|
+
"reports state=%s (%s)",
|
59
|
+
parent_.get(), this, child_, ConnectivityStateName(state),
|
60
|
+
status.ToString().c_str());
|
60
61
|
}
|
61
62
|
if (state == GRPC_CHANNEL_CONNECTING) return;
|
62
63
|
grpc_pollset_set_del_pollset_set(
|
@@ -67,7 +68,8 @@ class ChildPolicyHandler::Helper
|
|
67
68
|
// This request is from an outdated child, so ignore it.
|
68
69
|
return;
|
69
70
|
}
|
70
|
-
parent_->channel_control_helper()->UpdateState(state,
|
71
|
+
parent_->channel_control_helper()->UpdateState(state, status,
|
72
|
+
std::move(picker));
|
71
73
|
}
|
72
74
|
|
73
75
|
void RequestReresolution() override {
|
@@ -87,7 +87,6 @@
|
|
87
87
|
#include "src/core/ext/filters/client_channel/lb_policy/grpclb/load_balancer_api.h"
|
88
88
|
#include "src/core/ext/filters/client_channel/lb_policy_factory.h"
|
89
89
|
#include "src/core/ext/filters/client_channel/lb_policy_registry.h"
|
90
|
-
#include "src/core/ext/filters/client_channel/parse_address.h"
|
91
90
|
#include "src/core/ext/filters/client_channel/resolver/fake/fake_resolver.h"
|
92
91
|
#include "src/core/ext/filters/client_channel/server_address.h"
|
93
92
|
#include "src/core/lib/backoff/backoff.h"
|
@@ -98,10 +97,10 @@
|
|
98
97
|
#include "src/core/lib/gprpp/memory.h"
|
99
98
|
#include "src/core/lib/gprpp/orphanable.h"
|
100
99
|
#include "src/core/lib/gprpp/ref_counted_ptr.h"
|
100
|
+
#include "src/core/lib/iomgr/parse_address.h"
|
101
101
|
#include "src/core/lib/iomgr/sockaddr.h"
|
102
102
|
#include "src/core/lib/iomgr/sockaddr_utils.h"
|
103
103
|
#include "src/core/lib/iomgr/timer.h"
|
104
|
-
#include "src/core/lib/slice/slice_hash_table.h"
|
105
104
|
#include "src/core/lib/slice/slice_internal.h"
|
106
105
|
#include "src/core/lib/slice/slice_string_helpers.h"
|
107
106
|
#include "src/core/lib/surface/call.h"
|
@@ -304,7 +303,7 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
304
303
|
|
305
304
|
RefCountedPtr<SubchannelInterface> CreateSubchannel(
|
306
305
|
const grpc_channel_args& args) override;
|
307
|
-
void UpdateState(grpc_connectivity_state state,
|
306
|
+
void UpdateState(grpc_connectivity_state state, const absl::Status& status,
|
308
307
|
std::unique_ptr<SubchannelPicker> picker) override;
|
309
308
|
void RequestReresolution() override;
|
310
309
|
void AddTraceEvent(TraceSeverity severity,
|
@@ -323,15 +322,16 @@ class GrpcLb : public LoadBalancingPolicy {
|
|
323
322
|
~StateWatcher() { parent_.reset(DEBUG_LOCATION, "StateWatcher"); }
|
324
323
|
|
325
324
|
private:
|
326
|
-
void OnConnectivityStateChange(grpc_connectivity_state new_state
|
325
|
+
void OnConnectivityStateChange(grpc_connectivity_state new_state,
|
326
|
+
const absl::Status& status) override {
|
327
327
|
if (parent_->fallback_at_startup_checks_pending_ &&
|
328
328
|
new_state == GRPC_CHANNEL_TRANSIENT_FAILURE) {
|
329
329
|
// In TRANSIENT_FAILURE. Cancel the fallback timer and go into
|
330
330
|
// fallback mode immediately.
|
331
331
|
gpr_log(GPR_INFO,
|
332
|
-
"[grpclb %p] balancer channel in state
|
332
|
+
"[grpclb %p] balancer channel in state:TRANSIENT_FAILURE (%s); "
|
333
333
|
"entering fallback mode",
|
334
|
-
parent_.get());
|
334
|
+
parent_.get(), status.ToString().c_str());
|
335
335
|
parent_->fallback_at_startup_checks_pending_ = false;
|
336
336
|
grpc_timer_cancel(&parent_->lb_fallback_timer_);
|
337
337
|
parent_->fallback_mode_ = true;
|
@@ -660,6 +660,7 @@ RefCountedPtr<SubchannelInterface> GrpcLb::Helper::CreateSubchannel(
|
|
660
660
|
}
|
661
661
|
|
662
662
|
void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
663
|
+
const absl::Status& status,
|
663
664
|
std::unique_ptr<SubchannelPicker> picker) {
|
664
665
|
if (parent_->shutting_down_) return;
|
665
666
|
// Record whether child policy reports READY.
|
@@ -690,16 +691,22 @@ void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
|
690
691
|
state != GRPC_CHANNEL_READY)) {
|
691
692
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
692
693
|
gpr_log(GPR_INFO,
|
693
|
-
"[grpclb %p helper %p] state=%s passing
|
694
|
-
|
694
|
+
"[grpclb %p helper %p] state=%s (%s) passing "
|
695
|
+
"child picker %p as-is",
|
696
|
+
parent_.get(), this, ConnectivityStateName(state),
|
697
|
+
status.ToString().c_str(), picker.get());
|
695
698
|
}
|
696
|
-
parent_->channel_control_helper()->UpdateState(state,
|
699
|
+
parent_->channel_control_helper()->UpdateState(state, status,
|
700
|
+
std::move(picker));
|
697
701
|
return;
|
698
702
|
}
|
699
703
|
// Cases 2 and 3a: wrap picker from the child in our own picker.
|
700
704
|
if (GRPC_TRACE_FLAG_ENABLED(grpc_lb_glb_trace)) {
|
701
|
-
gpr_log(GPR_INFO,
|
702
|
-
|
705
|
+
gpr_log(GPR_INFO,
|
706
|
+
"[grpclb %p helper %p] state=%s (%s) wrapping child "
|
707
|
+
"picker %p",
|
708
|
+
parent_.get(), this, ConnectivityStateName(state),
|
709
|
+
status.ToString().c_str(), picker.get());
|
703
710
|
}
|
704
711
|
RefCountedPtr<GrpcLbClientStats> client_stats;
|
705
712
|
if (parent_->lb_calld_ != nullptr &&
|
@@ -707,7 +714,7 @@ void GrpcLb::Helper::UpdateState(grpc_connectivity_state state,
|
|
707
714
|
client_stats = parent_->lb_calld_->client_stats()->Ref();
|
708
715
|
}
|
709
716
|
parent_->channel_control_helper()->UpdateState(
|
710
|
-
state,
|
717
|
+
state, status,
|
711
718
|
absl::make_unique<Picker>(parent_.get(), parent_->serverlist_,
|
712
719
|
std::move(picker), std::move(client_stats)));
|
713
720
|
}
|
@@ -794,7 +801,7 @@ void GrpcLb::BalancerCallState::Orphan() {
|
|
794
801
|
// lb_on_balancer_status_received_ will complete the cancellation and clean
|
795
802
|
// up. Otherwise, we are here because grpclb_policy has to orphan a failed
|
796
803
|
// call, then the following cancellation will be a no-op.
|
797
|
-
|
804
|
+
grpc_call_cancel_internal(lb_call_);
|
798
805
|
if (client_load_report_timer_callback_pending_) {
|
799
806
|
grpc_timer_cancel(&client_load_report_timer_);
|
800
807
|
}
|