mirror of https://github.com/grpc/grpc-ios.git
Compare commits
7 Commits
Author | SHA1 | Date |
---|---|---|
|
0fecc7921e | |
|
30278049ef | |
|
e2dad3f3f0 | |
|
7c6bcba525 | |
|
a159eced52 | |
|
d2158a5d79 | |
|
984fa3547d |
|
@ -46,9 +46,6 @@ let package = Package(
|
|||
"third_party/xxhash/LICENSE",
|
||||
"third_party/zlib/LICENSE",
|
||||
"tests",
|
||||
"include/grpc/grpc_cronet.h",
|
||||
"src/core/ext/transport/cronet/",
|
||||
"third_party/objective_c/Cronet/bidirectional_stream_c.h",
|
||||
],
|
||||
|
||||
sources: [
|
||||
|
@ -85,8 +82,6 @@ let package = Package(
|
|||
path: basePath,
|
||||
exclude: [
|
||||
"tests",
|
||||
"include/grpcpp/security/cronet_credentials.h",
|
||||
"src/cpp/client/cronet_credentials.cc",
|
||||
],
|
||||
sources: [
|
||||
"src/cpp/",
|
||||
|
@ -111,5 +106,5 @@ let package = Package(
|
|||
),
|
||||
],
|
||||
cLanguageStandard: .gnu11,
|
||||
cxxLanguageStandard: .cxx14
|
||||
cxxLanguageStandard: .cxx17
|
||||
)
|
||||
|
|
119
gRPC-C++.podspec
119
gRPC-C++.podspec
|
@ -22,7 +22,7 @@
|
|||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-C++'
|
||||
# TODO (mxyan): use version that match gRPC version when pod is stabilized
|
||||
version = '1.72.0-dev'
|
||||
version = '1.72.1'
|
||||
s.version = version
|
||||
s.summary = 'gRPC C++ library'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
@ -34,8 +34,8 @@ Pod::Spec.new do |s|
|
|||
:tag => "v#{version}",
|
||||
}
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -271,8 +271,26 @@ Pod::Spec.new do |s|
|
|||
ss.dependency 'abseil/types/span', abseil_version
|
||||
ss.dependency 'abseil/utility/utility', abseil_version
|
||||
|
||||
ss.source_files = 'src/core/call/request_buffer.h',
|
||||
ss.source_files = 'src/core/call/call_arena_allocator.h',
|
||||
'src/core/call/call_destination.h',
|
||||
'src/core/call/call_filters.h',
|
||||
'src/core/call/call_finalization.h',
|
||||
'src/core/call/call_spine.h',
|
||||
'src/core/call/call_state.h',
|
||||
'src/core/call/client_call.h',
|
||||
'src/core/call/custom_metadata.h',
|
||||
'src/core/call/interception_chain.h',
|
||||
'src/core/call/message.h',
|
||||
'src/core/call/metadata.h',
|
||||
'src/core/call/metadata_batch.h',
|
||||
'src/core/call/metadata_compression_traits.h',
|
||||
'src/core/call/metadata_info.h',
|
||||
'src/core/call/parsed_metadata.h',
|
||||
'src/core/call/request_buffer.h',
|
||||
'src/core/call/security_context.h',
|
||||
'src/core/call/server_call.h',
|
||||
'src/core/call/simple_slice_based_metadata.h',
|
||||
'src/core/call/status_util.h',
|
||||
'src/core/channelz/channel_trace.h',
|
||||
'src/core/channelz/channelz.h',
|
||||
'src/core/channelz/channelz_registry.h',
|
||||
|
@ -393,6 +411,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
|
||||
'src/core/ext/transport/chttp2/transport/hpack_parser_table.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_settings.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_status.h',
|
||||
'src/core/ext/transport/chttp2/transport/huffsyms.h',
|
||||
'src/core/ext/transport/chttp2/transport/internal.h',
|
||||
'src/core/ext/transport/chttp2/transport/legacy_frame.h',
|
||||
|
@ -909,7 +928,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/handshaker/tcp_connect/tcp_connect_handshaker.h',
|
||||
'src/core/lib/address_utils/parse_address.h',
|
||||
'src/core/lib/address_utils/sockaddr_utils.h',
|
||||
'src/core/lib/channel/call_finalization.h',
|
||||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_args_preconditioning.h',
|
||||
'src/core/lib/channel/channel_fwd.h',
|
||||
|
@ -918,7 +936,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_stack_builder_impl.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/promise_based_filter.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
'src/core/lib/debug/trace.h',
|
||||
|
@ -936,7 +953,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/event_engine/event_engine_context.h',
|
||||
'src/core/lib/event_engine/extensions/can_track_errors.h',
|
||||
'src/core/lib/event_engine/extensions/chaotic_good_extension.h',
|
||||
'src/core/lib/event_engine/extensions/iomgr_compatible.h',
|
||||
'src/core/lib/event_engine/extensions/supports_fd.h',
|
||||
'src/core/lib/event_engine/extensions/supports_win_sockets.h',
|
||||
'src/core/lib/event_engine/extensions/tcp_trace.h',
|
||||
'src/core/lib/event_engine/forkable.h',
|
||||
'src/core/lib/event_engine/grpc_polled_fd.h',
|
||||
|
@ -1112,7 +1131,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/channel_create.h',
|
||||
'src/core/lib/surface/channel_init.h',
|
||||
'src/core/lib/surface/channel_stack_type.h',
|
||||
'src/core/lib/surface/client_call.h',
|
||||
'src/core/lib/surface/completion_queue.h',
|
||||
'src/core/lib/surface/completion_queue_factory.h',
|
||||
'src/core/lib/surface/connection_context.h',
|
||||
|
@ -1122,27 +1140,11 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/init_internally.h',
|
||||
'src/core/lib/surface/lame_client.h',
|
||||
'src/core/lib/surface/legacy_channel.h',
|
||||
'src/core/lib/surface/server_call.h',
|
||||
'src/core/lib/surface/validate_metadata.h',
|
||||
'src/core/lib/transport/bdp_estimator.h',
|
||||
'src/core/lib/transport/call_arena_allocator.h',
|
||||
'src/core/lib/transport/call_destination.h',
|
||||
'src/core/lib/transport/call_filters.h',
|
||||
'src/core/lib/transport/call_final_info.h',
|
||||
'src/core/lib/transport/call_spine.h',
|
||||
'src/core/lib/transport/call_state.h',
|
||||
'src/core/lib/transport/connectivity_state.h',
|
||||
'src/core/lib/transport/custom_metadata.h',
|
||||
'src/core/lib/transport/error_utils.h',
|
||||
'src/core/lib/transport/http2_errors.h',
|
||||
'src/core/lib/transport/interception_chain.h',
|
||||
'src/core/lib/transport/message.h',
|
||||
'src/core/lib/transport/metadata.h',
|
||||
'src/core/lib/transport/metadata_batch.h',
|
||||
'src/core/lib/transport/metadata_compression_traits.h',
|
||||
'src/core/lib/transport/metadata_info.h',
|
||||
'src/core/lib/transport/parsed_metadata.h',
|
||||
'src/core/lib/transport/simple_slice_based_metadata.h',
|
||||
'src/core/lib/transport/status_conversion.h',
|
||||
'src/core/lib/transport/timeout_encoding.h',
|
||||
'src/core/lib/transport/transport.h',
|
||||
|
@ -1243,6 +1245,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/util/avl.h',
|
||||
'src/core/util/backoff.h',
|
||||
'src/core/util/bitset.h',
|
||||
'src/core/util/check_class_size.h',
|
||||
'src/core/util/chunked_vector.h',
|
||||
'src/core/util/construct_destruct.h',
|
||||
'src/core/util/cpp_impl_of.h',
|
||||
|
@ -1473,8 +1476,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/message/copy.h',
|
||||
'third_party/upb/upb/message/internal/accessors.h',
|
||||
'third_party/upb/upb/message/internal/array.h',
|
||||
'third_party/upb/upb/message/internal/compare_unknown.h',
|
||||
'third_party/upb/upb/message/internal/extension.h',
|
||||
'third_party/upb/upb/message/internal/iterator.h',
|
||||
'third_party/upb/upb/message/internal/map.h',
|
||||
'third_party/upb/upb/message/internal/map_entry.h',
|
||||
'third_party/upb/upb/message/internal/map_sorter.h',
|
||||
|
@ -1562,6 +1565,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/wire/reader.h',
|
||||
'third_party/upb/upb/wire/types.h',
|
||||
'third_party/utf8_range/utf8_range.h',
|
||||
'third_party/utf8_range/utf8_range_neon.inc',
|
||||
'third_party/utf8_range/utf8_range_sse.inc',
|
||||
'third_party/xxhash/xxhash.h',
|
||||
'third_party/zlib/crc32.h',
|
||||
'third_party/zlib/deflate.h',
|
||||
|
@ -1575,8 +1580,26 @@ Pod::Spec.new do |s|
|
|||
'third_party/zlib/zlib.h',
|
||||
'third_party/zlib/zutil.h'
|
||||
|
||||
ss.private_header_files = 'src/core/call/request_buffer.h',
|
||||
ss.private_header_files = 'src/core/call/call_arena_allocator.h',
|
||||
'src/core/call/call_destination.h',
|
||||
'src/core/call/call_filters.h',
|
||||
'src/core/call/call_finalization.h',
|
||||
'src/core/call/call_spine.h',
|
||||
'src/core/call/call_state.h',
|
||||
'src/core/call/client_call.h',
|
||||
'src/core/call/custom_metadata.h',
|
||||
'src/core/call/interception_chain.h',
|
||||
'src/core/call/message.h',
|
||||
'src/core/call/metadata.h',
|
||||
'src/core/call/metadata_batch.h',
|
||||
'src/core/call/metadata_compression_traits.h',
|
||||
'src/core/call/metadata_info.h',
|
||||
'src/core/call/parsed_metadata.h',
|
||||
'src/core/call/request_buffer.h',
|
||||
'src/core/call/security_context.h',
|
||||
'src/core/call/server_call.h',
|
||||
'src/core/call/simple_slice_based_metadata.h',
|
||||
'src/core/call/status_util.h',
|
||||
'src/core/channelz/channel_trace.h',
|
||||
'src/core/channelz/channelz.h',
|
||||
'src/core/channelz/channelz_registry.h',
|
||||
|
@ -1697,6 +1720,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
|
||||
'src/core/ext/transport/chttp2/transport/hpack_parser_table.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_settings.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_status.h',
|
||||
'src/core/ext/transport/chttp2/transport/huffsyms.h',
|
||||
'src/core/ext/transport/chttp2/transport/internal.h',
|
||||
'src/core/ext/transport/chttp2/transport/legacy_frame.h',
|
||||
|
@ -2213,7 +2237,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/handshaker/tcp_connect/tcp_connect_handshaker.h',
|
||||
'src/core/lib/address_utils/parse_address.h',
|
||||
'src/core/lib/address_utils/sockaddr_utils.h',
|
||||
'src/core/lib/channel/call_finalization.h',
|
||||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_args_preconditioning.h',
|
||||
'src/core/lib/channel/channel_fwd.h',
|
||||
|
@ -2222,7 +2245,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_stack_builder_impl.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/promise_based_filter.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
'src/core/lib/debug/trace.h',
|
||||
|
@ -2240,7 +2262,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/event_engine/event_engine_context.h',
|
||||
'src/core/lib/event_engine/extensions/can_track_errors.h',
|
||||
'src/core/lib/event_engine/extensions/chaotic_good_extension.h',
|
||||
'src/core/lib/event_engine/extensions/iomgr_compatible.h',
|
||||
'src/core/lib/event_engine/extensions/supports_fd.h',
|
||||
'src/core/lib/event_engine/extensions/supports_win_sockets.h',
|
||||
'src/core/lib/event_engine/extensions/tcp_trace.h',
|
||||
'src/core/lib/event_engine/forkable.h',
|
||||
'src/core/lib/event_engine/grpc_polled_fd.h',
|
||||
|
@ -2416,7 +2440,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/channel_create.h',
|
||||
'src/core/lib/surface/channel_init.h',
|
||||
'src/core/lib/surface/channel_stack_type.h',
|
||||
'src/core/lib/surface/client_call.h',
|
||||
'src/core/lib/surface/completion_queue.h',
|
||||
'src/core/lib/surface/completion_queue_factory.h',
|
||||
'src/core/lib/surface/connection_context.h',
|
||||
|
@ -2426,27 +2449,11 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/init_internally.h',
|
||||
'src/core/lib/surface/lame_client.h',
|
||||
'src/core/lib/surface/legacy_channel.h',
|
||||
'src/core/lib/surface/server_call.h',
|
||||
'src/core/lib/surface/validate_metadata.h',
|
||||
'src/core/lib/transport/bdp_estimator.h',
|
||||
'src/core/lib/transport/call_arena_allocator.h',
|
||||
'src/core/lib/transport/call_destination.h',
|
||||
'src/core/lib/transport/call_filters.h',
|
||||
'src/core/lib/transport/call_final_info.h',
|
||||
'src/core/lib/transport/call_spine.h',
|
||||
'src/core/lib/transport/call_state.h',
|
||||
'src/core/lib/transport/connectivity_state.h',
|
||||
'src/core/lib/transport/custom_metadata.h',
|
||||
'src/core/lib/transport/error_utils.h',
|
||||
'src/core/lib/transport/http2_errors.h',
|
||||
'src/core/lib/transport/interception_chain.h',
|
||||
'src/core/lib/transport/message.h',
|
||||
'src/core/lib/transport/metadata.h',
|
||||
'src/core/lib/transport/metadata_batch.h',
|
||||
'src/core/lib/transport/metadata_compression_traits.h',
|
||||
'src/core/lib/transport/metadata_info.h',
|
||||
'src/core/lib/transport/parsed_metadata.h',
|
||||
'src/core/lib/transport/simple_slice_based_metadata.h',
|
||||
'src/core/lib/transport/status_conversion.h',
|
||||
'src/core/lib/transport/timeout_encoding.h',
|
||||
'src/core/lib/transport/transport.h',
|
||||
|
@ -2547,6 +2554,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/util/avl.h',
|
||||
'src/core/util/backoff.h',
|
||||
'src/core/util/bitset.h',
|
||||
'src/core/util/check_class_size.h',
|
||||
'src/core/util/chunked_vector.h',
|
||||
'src/core/util/construct_destruct.h',
|
||||
'src/core/util/cpp_impl_of.h',
|
||||
|
@ -2727,8 +2735,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/message/copy.h',
|
||||
'third_party/upb/upb/message/internal/accessors.h',
|
||||
'third_party/upb/upb/message/internal/array.h',
|
||||
'third_party/upb/upb/message/internal/compare_unknown.h',
|
||||
'third_party/upb/upb/message/internal/extension.h',
|
||||
'third_party/upb/upb/message/internal/iterator.h',
|
||||
'third_party/upb/upb/message/internal/map.h',
|
||||
'third_party/upb/upb/message/internal/map_entry.h',
|
||||
'third_party/upb/upb/message/internal/map_sorter.h',
|
||||
|
@ -2816,6 +2824,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/wire/reader.h',
|
||||
'third_party/upb/upb/wire/types.h',
|
||||
'third_party/utf8_range/utf8_range.h',
|
||||
'third_party/utf8_range/utf8_range_neon.inc',
|
||||
'third_party/utf8_range/utf8_range_sse.inc',
|
||||
'third_party/xxhash/xxhash.h',
|
||||
'third_party/zlib/crc32.h',
|
||||
'third_party/zlib/deflate.h',
|
||||
|
@ -2840,25 +2850,6 @@ Pod::Spec.new do |s|
|
|||
'include/grpcpp/impl/codegen/proto_utils.h'
|
||||
end
|
||||
|
||||
s.subspec 'Cronet-Interface' do |ss|
|
||||
ss.header_mappings_dir = 'include/grpcpp'
|
||||
ss.public_header_files = "include/grpcpp/security/cronet_credentials.h",
|
||||
"include/grpcpp/security/cronet_credentials_impl.h"
|
||||
ss.source_files = "include/grpcpp/security/cronet_credentials.h",
|
||||
"include/grpcpp/security/cronet_credentials_impl.h"
|
||||
end
|
||||
|
||||
s.subspec 'Cronet-Implementation' do |ss|
|
||||
ss.header_mappings_dir = '.'
|
||||
ss.dependency "#{s.name}/Cronet-Interface", version
|
||||
ss.dependency "#{s.name}/Implementation", version
|
||||
ss.dependency "#{s.name}/Privacy", version
|
||||
|
||||
ss.dependency 'gRPC-Core/Cronet-Implementation', version
|
||||
|
||||
ss.source_files = "src/cpp/client/cronet_credentials.cc"
|
||||
end
|
||||
|
||||
# patch include of openssl to openssl_grpc
|
||||
s.prepare_command = <<-END_OF_COMMAND
|
||||
set -e
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-Core'
|
||||
version = '1.72.0-dev'
|
||||
version = '1.72.1'
|
||||
s.version = version
|
||||
s.summary = 'Core cross-platform gRPC library, written in C'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
@ -38,8 +38,8 @@ Pod::Spec.new do |s|
|
|||
# which was released in Cocoapods v1.2.0.
|
||||
s.cocoapods_version = '>= 1.2.0'
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -200,7 +200,7 @@ Pod::Spec.new do |s|
|
|||
ss.libraries = 'z'
|
||||
ss.dependency "#{s.name}/Interface", version
|
||||
ss.dependency "#{s.name}/Privacy", version
|
||||
ss.dependency 'BoringSSL-GRPC', '0.0.39'
|
||||
ss.dependency 'BoringSSL-GRPC', '0.0.40'
|
||||
ss.dependency 'abseil/algorithm/container', abseil_version
|
||||
ss.dependency 'abseil/base/base', abseil_version
|
||||
ss.dependency 'abseil/base/config', abseil_version
|
||||
|
@ -238,10 +238,41 @@ Pod::Spec.new do |s|
|
|||
ss.dependency 'abseil/utility/utility', abseil_version
|
||||
ss.compiler_flags = '-DBORINGSSL_PREFIX=GRPC -Wno-unreachable-code -Wno-shorten-64-to-32'
|
||||
|
||||
ss.source_files = 'src/core/call/request_buffer.cc',
|
||||
ss.source_files = 'src/core/call/call_arena_allocator.cc',
|
||||
'src/core/call/call_arena_allocator.h',
|
||||
'src/core/call/call_destination.h',
|
||||
'src/core/call/call_filters.cc',
|
||||
'src/core/call/call_filters.h',
|
||||
'src/core/call/call_finalization.h',
|
||||
'src/core/call/call_spine.cc',
|
||||
'src/core/call/call_spine.h',
|
||||
'src/core/call/call_state.cc',
|
||||
'src/core/call/call_state.h',
|
||||
'src/core/call/client_call.cc',
|
||||
'src/core/call/client_call.h',
|
||||
'src/core/call/custom_metadata.h',
|
||||
'src/core/call/interception_chain.cc',
|
||||
'src/core/call/interception_chain.h',
|
||||
'src/core/call/message.cc',
|
||||
'src/core/call/message.h',
|
||||
'src/core/call/metadata.cc',
|
||||
'src/core/call/metadata.h',
|
||||
'src/core/call/metadata_batch.cc',
|
||||
'src/core/call/metadata_batch.h',
|
||||
'src/core/call/metadata_compression_traits.h',
|
||||
'src/core/call/metadata_info.cc',
|
||||
'src/core/call/metadata_info.h',
|
||||
'src/core/call/parsed_metadata.cc',
|
||||
'src/core/call/parsed_metadata.h',
|
||||
'src/core/call/request_buffer.cc',
|
||||
'src/core/call/request_buffer.h',
|
||||
'src/core/call/security_context.cc',
|
||||
'src/core/call/security_context.h',
|
||||
'src/core/call/server_call.cc',
|
||||
'src/core/call/server_call.h',
|
||||
'src/core/call/simple_slice_based_metadata.h',
|
||||
'src/core/call/status_util.cc',
|
||||
'src/core/call/status_util.h',
|
||||
'src/core/channelz/channel_trace.cc',
|
||||
'src/core/channelz/channel_trace.h',
|
||||
'src/core/channelz/channelz.cc',
|
||||
|
@ -484,6 +515,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/transport/chttp2/transport/hpack_parser_table.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_settings.cc',
|
||||
'src/core/ext/transport/chttp2/transport/http2_settings.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_status.h',
|
||||
'src/core/ext/transport/chttp2/transport/huffsyms.cc',
|
||||
'src/core/ext/transport/chttp2/transport/huffsyms.h',
|
||||
'src/core/ext/transport/chttp2/transport/internal.h',
|
||||
|
@ -1347,7 +1379,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/address_utils/parse_address.h',
|
||||
'src/core/lib/address_utils/sockaddr_utils.cc',
|
||||
'src/core/lib/address_utils/sockaddr_utils.h',
|
||||
'src/core/lib/channel/call_finalization.h',
|
||||
'src/core/lib/channel/channel_args.cc',
|
||||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_args_preconditioning.cc',
|
||||
|
@ -1363,8 +1394,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/promise_based_filter.cc',
|
||||
'src/core/lib/channel/promise_based_filter.h',
|
||||
'src/core/lib/channel/status_util.cc',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/compression.cc',
|
||||
'src/core/lib/compression/compression_internal.cc',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
|
@ -1395,7 +1424,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/event_engine/event_engine_context.h',
|
||||
'src/core/lib/event_engine/extensions/can_track_errors.h',
|
||||
'src/core/lib/event_engine/extensions/chaotic_good_extension.h',
|
||||
'src/core/lib/event_engine/extensions/iomgr_compatible.h',
|
||||
'src/core/lib/event_engine/extensions/supports_fd.h',
|
||||
'src/core/lib/event_engine/extensions/supports_win_sockets.h',
|
||||
'src/core/lib/event_engine/extensions/tcp_trace.h',
|
||||
'src/core/lib/event_engine/forkable.cc',
|
||||
'src/core/lib/event_engine/forkable.h',
|
||||
|
@ -1428,6 +1459,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/event_engine/posix_engine/posix_engine_listener.h',
|
||||
'src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc',
|
||||
'src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h',
|
||||
'src/core/lib/event_engine/posix_engine/set_socket_dualstack.cc',
|
||||
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc',
|
||||
'src/core/lib/event_engine/posix_engine/tcp_socket_utils.h',
|
||||
'src/core/lib/event_engine/posix_engine/timer.cc',
|
||||
|
@ -1715,8 +1747,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/channel_init.h',
|
||||
'src/core/lib/surface/channel_stack_type.cc',
|
||||
'src/core/lib/surface/channel_stack_type.h',
|
||||
'src/core/lib/surface/client_call.cc',
|
||||
'src/core/lib/surface/client_call.h',
|
||||
'src/core/lib/surface/completion_queue.cc',
|
||||
'src/core/lib/surface/completion_queue.h',
|
||||
'src/core/lib/surface/completion_queue_factory.cc',
|
||||
|
@ -1736,44 +1766,17 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/legacy_channel.cc',
|
||||
'src/core/lib/surface/legacy_channel.h',
|
||||
'src/core/lib/surface/metadata_array.cc',
|
||||
'src/core/lib/surface/server_call.cc',
|
||||
'src/core/lib/surface/server_call.h',
|
||||
'src/core/lib/surface/validate_metadata.cc',
|
||||
'src/core/lib/surface/validate_metadata.h',
|
||||
'src/core/lib/surface/version.cc',
|
||||
'src/core/lib/transport/bdp_estimator.cc',
|
||||
'src/core/lib/transport/bdp_estimator.h',
|
||||
'src/core/lib/transport/call_arena_allocator.cc',
|
||||
'src/core/lib/transport/call_arena_allocator.h',
|
||||
'src/core/lib/transport/call_destination.h',
|
||||
'src/core/lib/transport/call_filters.cc',
|
||||
'src/core/lib/transport/call_filters.h',
|
||||
'src/core/lib/transport/call_final_info.cc',
|
||||
'src/core/lib/transport/call_final_info.h',
|
||||
'src/core/lib/transport/call_spine.cc',
|
||||
'src/core/lib/transport/call_spine.h',
|
||||
'src/core/lib/transport/call_state.cc',
|
||||
'src/core/lib/transport/call_state.h',
|
||||
'src/core/lib/transport/connectivity_state.cc',
|
||||
'src/core/lib/transport/connectivity_state.h',
|
||||
'src/core/lib/transport/custom_metadata.h',
|
||||
'src/core/lib/transport/error_utils.cc',
|
||||
'src/core/lib/transport/error_utils.h',
|
||||
'src/core/lib/transport/http2_errors.h',
|
||||
'src/core/lib/transport/interception_chain.cc',
|
||||
'src/core/lib/transport/interception_chain.h',
|
||||
'src/core/lib/transport/message.cc',
|
||||
'src/core/lib/transport/message.h',
|
||||
'src/core/lib/transport/metadata.cc',
|
||||
'src/core/lib/transport/metadata.h',
|
||||
'src/core/lib/transport/metadata_batch.cc',
|
||||
'src/core/lib/transport/metadata_batch.h',
|
||||
'src/core/lib/transport/metadata_compression_traits.h',
|
||||
'src/core/lib/transport/metadata_info.cc',
|
||||
'src/core/lib/transport/metadata_info.h',
|
||||
'src/core/lib/transport/parsed_metadata.cc',
|
||||
'src/core/lib/transport/parsed_metadata.h',
|
||||
'src/core/lib/transport/simple_slice_based_metadata.h',
|
||||
'src/core/lib/transport/status_conversion.cc',
|
||||
'src/core/lib/transport/status_conversion.h',
|
||||
'src/core/lib/transport/timeout_encoding.cc',
|
||||
|
@ -1972,6 +1975,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/util/backoff.cc',
|
||||
'src/core/util/backoff.h',
|
||||
'src/core/util/bitset.h',
|
||||
'src/core/util/check_class_size.h',
|
||||
'src/core/util/chunked_vector.h',
|
||||
'src/core/util/construct_destruct.h',
|
||||
'src/core/util/cpp_impl_of.h',
|
||||
|
@ -2280,10 +2284,10 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/message/copy.h',
|
||||
'third_party/upb/upb/message/internal/accessors.h',
|
||||
'third_party/upb/upb/message/internal/array.h',
|
||||
'third_party/upb/upb/message/internal/compare_unknown.c',
|
||||
'third_party/upb/upb/message/internal/compare_unknown.h',
|
||||
'third_party/upb/upb/message/internal/extension.c',
|
||||
'third_party/upb/upb/message/internal/extension.h',
|
||||
'third_party/upb/upb/message/internal/iterator.c',
|
||||
'third_party/upb/upb/message/internal/iterator.h',
|
||||
'third_party/upb/upb/message/internal/map.h',
|
||||
'third_party/upb/upb/message/internal/map_entry.h',
|
||||
'third_party/upb/upb/message/internal/map_sorter.h',
|
||||
|
@ -2409,6 +2413,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/wire/types.h',
|
||||
'third_party/utf8_range/utf8_range.c',
|
||||
'third_party/utf8_range/utf8_range.h',
|
||||
'third_party/utf8_range/utf8_range_neon.inc',
|
||||
'third_party/utf8_range/utf8_range_sse.inc',
|
||||
'third_party/xxhash/xxhash.h',
|
||||
'third_party/zlib/adler32.c',
|
||||
'third_party/zlib/compress.c',
|
||||
|
@ -2432,8 +2438,26 @@ Pod::Spec.new do |s|
|
|||
'third_party/zlib/zlib.h',
|
||||
'third_party/zlib/zutil.c',
|
||||
'third_party/zlib/zutil.h'
|
||||
ss.private_header_files = 'src/core/call/request_buffer.h',
|
||||
ss.private_header_files = 'src/core/call/call_arena_allocator.h',
|
||||
'src/core/call/call_destination.h',
|
||||
'src/core/call/call_filters.h',
|
||||
'src/core/call/call_finalization.h',
|
||||
'src/core/call/call_spine.h',
|
||||
'src/core/call/call_state.h',
|
||||
'src/core/call/client_call.h',
|
||||
'src/core/call/custom_metadata.h',
|
||||
'src/core/call/interception_chain.h',
|
||||
'src/core/call/message.h',
|
||||
'src/core/call/metadata.h',
|
||||
'src/core/call/metadata_batch.h',
|
||||
'src/core/call/metadata_compression_traits.h',
|
||||
'src/core/call/metadata_info.h',
|
||||
'src/core/call/parsed_metadata.h',
|
||||
'src/core/call/request_buffer.h',
|
||||
'src/core/call/security_context.h',
|
||||
'src/core/call/server_call.h',
|
||||
'src/core/call/simple_slice_based_metadata.h',
|
||||
'src/core/call/status_util.h',
|
||||
'src/core/channelz/channel_trace.h',
|
||||
'src/core/channelz/channelz.h',
|
||||
'src/core/channelz/channelz_registry.h',
|
||||
|
@ -2554,6 +2578,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/ext/transport/chttp2/transport/hpack_parser.h',
|
||||
'src/core/ext/transport/chttp2/transport/hpack_parser_table.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_settings.h',
|
||||
'src/core/ext/transport/chttp2/transport/http2_status.h',
|
||||
'src/core/ext/transport/chttp2/transport/huffsyms.h',
|
||||
'src/core/ext/transport/chttp2/transport/internal.h',
|
||||
'src/core/ext/transport/chttp2/transport/legacy_frame.h',
|
||||
|
@ -3070,7 +3095,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/handshaker/tcp_connect/tcp_connect_handshaker.h',
|
||||
'src/core/lib/address_utils/parse_address.h',
|
||||
'src/core/lib/address_utils/sockaddr_utils.h',
|
||||
'src/core/lib/channel/call_finalization.h',
|
||||
'src/core/lib/channel/channel_args.h',
|
||||
'src/core/lib/channel/channel_args_preconditioning.h',
|
||||
'src/core/lib/channel/channel_fwd.h',
|
||||
|
@ -3079,7 +3103,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/channel/channel_stack_builder_impl.h',
|
||||
'src/core/lib/channel/connected_channel.h',
|
||||
'src/core/lib/channel/promise_based_filter.h',
|
||||
'src/core/lib/channel/status_util.h',
|
||||
'src/core/lib/compression/compression_internal.h',
|
||||
'src/core/lib/compression/message_compress.h',
|
||||
'src/core/lib/debug/trace.h',
|
||||
|
@ -3097,7 +3120,9 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/event_engine/event_engine_context.h',
|
||||
'src/core/lib/event_engine/extensions/can_track_errors.h',
|
||||
'src/core/lib/event_engine/extensions/chaotic_good_extension.h',
|
||||
'src/core/lib/event_engine/extensions/iomgr_compatible.h',
|
||||
'src/core/lib/event_engine/extensions/supports_fd.h',
|
||||
'src/core/lib/event_engine/extensions/supports_win_sockets.h',
|
||||
'src/core/lib/event_engine/extensions/tcp_trace.h',
|
||||
'src/core/lib/event_engine/forkable.h',
|
||||
'src/core/lib/event_engine/grpc_polled_fd.h',
|
||||
|
@ -3273,7 +3298,6 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/channel_create.h',
|
||||
'src/core/lib/surface/channel_init.h',
|
||||
'src/core/lib/surface/channel_stack_type.h',
|
||||
'src/core/lib/surface/client_call.h',
|
||||
'src/core/lib/surface/completion_queue.h',
|
||||
'src/core/lib/surface/completion_queue_factory.h',
|
||||
'src/core/lib/surface/connection_context.h',
|
||||
|
@ -3283,27 +3307,11 @@ Pod::Spec.new do |s|
|
|||
'src/core/lib/surface/init_internally.h',
|
||||
'src/core/lib/surface/lame_client.h',
|
||||
'src/core/lib/surface/legacy_channel.h',
|
||||
'src/core/lib/surface/server_call.h',
|
||||
'src/core/lib/surface/validate_metadata.h',
|
||||
'src/core/lib/transport/bdp_estimator.h',
|
||||
'src/core/lib/transport/call_arena_allocator.h',
|
||||
'src/core/lib/transport/call_destination.h',
|
||||
'src/core/lib/transport/call_filters.h',
|
||||
'src/core/lib/transport/call_final_info.h',
|
||||
'src/core/lib/transport/call_spine.h',
|
||||
'src/core/lib/transport/call_state.h',
|
||||
'src/core/lib/transport/connectivity_state.h',
|
||||
'src/core/lib/transport/custom_metadata.h',
|
||||
'src/core/lib/transport/error_utils.h',
|
||||
'src/core/lib/transport/http2_errors.h',
|
||||
'src/core/lib/transport/interception_chain.h',
|
||||
'src/core/lib/transport/message.h',
|
||||
'src/core/lib/transport/metadata.h',
|
||||
'src/core/lib/transport/metadata_batch.h',
|
||||
'src/core/lib/transport/metadata_compression_traits.h',
|
||||
'src/core/lib/transport/metadata_info.h',
|
||||
'src/core/lib/transport/parsed_metadata.h',
|
||||
'src/core/lib/transport/simple_slice_based_metadata.h',
|
||||
'src/core/lib/transport/status_conversion.h',
|
||||
'src/core/lib/transport/timeout_encoding.h',
|
||||
'src/core/lib/transport/transport.h',
|
||||
|
@ -3404,6 +3412,7 @@ Pod::Spec.new do |s|
|
|||
'src/core/util/avl.h',
|
||||
'src/core/util/backoff.h',
|
||||
'src/core/util/bitset.h',
|
||||
'src/core/util/check_class_size.h',
|
||||
'src/core/util/chunked_vector.h',
|
||||
'src/core/util/construct_destruct.h',
|
||||
'src/core/util/cpp_impl_of.h',
|
||||
|
@ -3572,8 +3581,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/message/copy.h',
|
||||
'third_party/upb/upb/message/internal/accessors.h',
|
||||
'third_party/upb/upb/message/internal/array.h',
|
||||
'third_party/upb/upb/message/internal/compare_unknown.h',
|
||||
'third_party/upb/upb/message/internal/extension.h',
|
||||
'third_party/upb/upb/message/internal/iterator.h',
|
||||
'third_party/upb/upb/message/internal/map.h',
|
||||
'third_party/upb/upb/message/internal/map_entry.h',
|
||||
'third_party/upb/upb/message/internal/map_sorter.h',
|
||||
|
@ -3661,6 +3670,8 @@ Pod::Spec.new do |s|
|
|||
'third_party/upb/upb/wire/reader.h',
|
||||
'third_party/upb/upb/wire/types.h',
|
||||
'third_party/utf8_range/utf8_range.h',
|
||||
'third_party/utf8_range/utf8_range_neon.inc',
|
||||
'third_party/utf8_range/utf8_range_sse.inc',
|
||||
'third_party/xxhash/xxhash.h',
|
||||
'third_party/zlib/crc32.h',
|
||||
'third_party/zlib/deflate.h',
|
||||
|
@ -3680,28 +3691,6 @@ Pod::Spec.new do |s|
|
|||
ss.dependency "#{s.name}/Implementation", version
|
||||
end
|
||||
|
||||
s.subspec 'Cronet-Interface' do |ss|
|
||||
ss.header_mappings_dir = 'include/grpc'
|
||||
ss.source_files = 'include/grpc/grpc_cronet.h'
|
||||
end
|
||||
|
||||
s.subspec 'Cronet-Implementation' do |ss|
|
||||
ss.header_mappings_dir = '.'
|
||||
|
||||
ss.dependency "#{s.name}/Interface", version
|
||||
ss.dependency "#{s.name}/Implementation", version
|
||||
ss.dependency "#{s.name}/Privacy", version
|
||||
ss.dependency "#{s.name}/Cronet-Interface", version
|
||||
|
||||
ss.source_files = 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
|
||||
'src/core/ext/transport/cronet/client/secure/cronet_channel_create.h',
|
||||
'src/core/ext/transport/cronet/transport/cronet_status.cc',
|
||||
'src/core/ext/transport/cronet/transport/cronet_status.h',
|
||||
'src/core/ext/transport/cronet/transport/cronet_transport.cc',
|
||||
'src/core/ext/transport/cronet/transport/cronet_transport.h',
|
||||
'third_party/objective_c/Cronet/bidirectional_stream_c.h'
|
||||
end
|
||||
|
||||
# patch include of openssl to openssl_grpc
|
||||
s.prepare_command = <<-END_OF_COMMAND
|
||||
set -e
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-ProtoRPC'
|
||||
version = '1.72.0-dev'
|
||||
version = '1.72.1'
|
||||
s.version = version
|
||||
s.summary = 'RPC library for Protocol Buffers, based on gRPC'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
@ -33,8 +33,8 @@ Pod::Spec.new do |s|
|
|||
:tag => "v#{version}",
|
||||
}
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -55,7 +55,7 @@ Pod::Spec.new do |s|
|
|||
ss.header_mappings_dir = "src/objective-c/ProtoRPC"
|
||||
ss.dependency "#{s.name}/Legacy-Header", version
|
||||
ss.dependency 'gRPC/Interface', version
|
||||
ss.dependency 'Protobuf', '~> 3.0'
|
||||
ss.dependency 'Protobuf', '~> 4.0'
|
||||
|
||||
ss.source_files = "src/objective-c/ProtoRPC/ProtoMethod.{h,m}",
|
||||
"src/objective-c/ProtoRPC/ProtoRPC.{h,m}",
|
||||
|
@ -68,7 +68,7 @@ Pod::Spec.new do |s|
|
|||
ss.dependency "#{s.name}/Legacy-Header", version
|
||||
ss.dependency 'gRPC/GRPCCore', version
|
||||
ss.dependency 'gRPC-RxLibrary', version
|
||||
ss.dependency 'Protobuf', '~> 3.0'
|
||||
ss.dependency 'Protobuf', '~> 4.0'
|
||||
|
||||
ss.source_files = "src/objective-c/ProtoRPC/ProtoRPCLegacy.m",
|
||||
"src/objective-c/ProtoRPC/ProtoServiceLegacy.m"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC-RxLibrary'
|
||||
version = '1.72.0-dev'
|
||||
version = '1.72.1'
|
||||
s.version = version
|
||||
s.summary = 'Reactive Extensions library for iOS/OSX.'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
@ -33,8 +33,8 @@ Pod::Spec.new do |s|
|
|||
:tag => "v#{version}",
|
||||
}
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
|
45
gRPC.podspec
45
gRPC.podspec
|
@ -20,7 +20,7 @@
|
|||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = 'gRPC'
|
||||
version = '1.72.0-dev'
|
||||
version = '1.72.1'
|
||||
s.version = version
|
||||
s.summary = 'gRPC client library for iOS/OSX'
|
||||
s.homepage = 'https://grpc.io'
|
||||
|
@ -45,8 +45,8 @@ Pod::Spec.new do |s|
|
|||
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17',
|
||||
}
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -64,7 +64,6 @@ Pod::Spec.new do |s|
|
|||
|
||||
ss.public_header_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+Cronet.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+Tests.h",
|
||||
"src/objective-c/GRPCClient/GRPCCallLegacy.h",
|
||||
|
@ -72,7 +71,6 @@ Pod::Spec.new do |s|
|
|||
|
||||
ss.source_files = "src/objective-c/GRPCClient/GRPCCall+ChannelArg.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+Cronet.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+OAuth2.h",
|
||||
"src/objective-c/GRPCClient/GRPCCall+Tests.h",
|
||||
"src/objective-c/GRPCClient/GRPCCallLegacy.h",
|
||||
|
@ -80,8 +78,8 @@ Pod::Spec.new do |s|
|
|||
"src/objective-c/GRPCClient/GRPCTypes.mm"
|
||||
ss.dependency "gRPC-RxLibrary/Interface", version
|
||||
ss.dependency "#{s.name}/Privacy", version
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -116,8 +114,8 @@ Pod::Spec.new do |s|
|
|||
|
||||
ss.dependency "#{s.name}/Interface-Legacy", version
|
||||
ss.dependency "#{s.name}/Privacy", version
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -127,7 +125,6 @@ Pod::Spec.new do |s|
|
|||
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
|
||||
|
||||
ss.public_header_files = 'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+Tests.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+ChannelArg.h'
|
||||
|
@ -137,8 +134,6 @@ Pod::Spec.new do |s|
|
|||
'src/objective-c/GRPCClient/GRPCCall+ChannelArg.mm',
|
||||
'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.mm',
|
||||
'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+Cronet.mm',
|
||||
'src/objective-c/GRPCClient/GRPCCall+OAuth2.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+OAuth2.mm',
|
||||
'src/objective-c/GRPCClient/GRPCCall+Tests.h',
|
||||
|
@ -154,33 +149,19 @@ Pod::Spec.new do |s|
|
|||
ss.dependency 'gRPC-Core', version
|
||||
ss.dependency 'gRPC-RxLibrary', version
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
end
|
||||
|
||||
s.subspec 'GRPCCoreCronet' do |ss|
|
||||
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
|
||||
|
||||
ss.source_files = 'src/objective-c/GRPCClient/GRPCCall+Cronet.h',
|
||||
'src/objective-c/GRPCClient/GRPCCall+Cronet.mm',
|
||||
'src/objective-c/GRPCClient/private/GRPCCore/GRPCCoreCronet/*.{h,mm}'
|
||||
ss.dependency "#{s.name}/GRPCCore", version
|
||||
ss.dependency "#{s.name}/Privacy", version
|
||||
ss.dependency 'gRPC-Core/Cronet-Implementation', version
|
||||
ss.dependency 'CronetFramework'
|
||||
|
||||
ss.ios.deployment_target = '11.0'
|
||||
end
|
||||
|
||||
# CFStream is now default. Leaving this subspec only for compatibility purpose.
|
||||
s.subspec 'CFStream' do |ss|
|
||||
ss.dependency "#{s.name}/GRPCCore", version
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
@ -192,8 +173,8 @@ Pod::Spec.new do |s|
|
|||
ss.source_files = 'src/objective-c/GRPCClient/internal_testing/*.{h,mm}'
|
||||
ss.header_mappings_dir = 'src/objective-c/GRPCClient'
|
||||
|
||||
s.ios.deployment_target = '11.0'
|
||||
s.osx.deployment_target = '10.14'
|
||||
s.ios.deployment_target = '15.0'
|
||||
s.osx.deployment_target = '11.0'
|
||||
s.tvos.deployment_target = '13.0'
|
||||
s.watchos.deployment_target = '6.0'
|
||||
s.visionos.deployment_target = '1.0'
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright 2016 gRPC authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef GRPC_GRPC_CRONET_H
|
||||
#define GRPC_GRPC_CRONET_H
|
||||
|
||||
#include <grpc/grpc.h>
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GRPCAPI grpc_channel* grpc_cronet_secure_channel_create(
|
||||
void* engine, const char* target, const grpc_channel_args* args,
|
||||
void* reserved);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* GRPC_GRPC_CRONET_H */
|
|
@ -31,13 +31,15 @@
|
|||
#define GRPC_ARG_SERVER_CALL_METRIC_RECORDING \
|
||||
"grpc.server_call_metric_recording"
|
||||
/** Request that optional features default to off (regardless of what they
|
||||
usually default to) - to enable tight control over what gets enabled */
|
||||
usually default to) - to enable tight control over what gets enabled
|
||||
Boolean valued. Defaults to false. */
|
||||
#define GRPC_ARG_MINIMAL_STACK "grpc.minimal_stack"
|
||||
/** Maximum number of concurrent incoming streams to allow on a http2
|
||||
connection. Int valued. */
|
||||
connection. Int valued. Deafult to -1(indicating no explicit limit).*/
|
||||
#define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams"
|
||||
/** Maximum message length that the channel can receive. Int valued, bytes.
|
||||
-1 means unlimited. */
|
||||
-1 means unlimited. Defaults to 4MB(4*1024*1024 bytes). -1 means unlimited.
|
||||
*/
|
||||
#define GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH "grpc.max_receive_message_length"
|
||||
/** \deprecated For backward compatibility.
|
||||
* Use GRPC_ARG_MAX_RECEIVE_MESSAGE_LENGTH instead. */
|
||||
|
@ -47,27 +49,29 @@
|
|||
#define GRPC_ARG_MAX_SEND_MESSAGE_LENGTH "grpc.max_send_message_length"
|
||||
/** Maximum time that a channel may have no outstanding rpcs, after which the
|
||||
* server will close the connection. Int valued, milliseconds. INT_MAX means
|
||||
* unlimited. */
|
||||
* unlimited. Defaults to INT_MAX. */
|
||||
#define GRPC_ARG_MAX_CONNECTION_IDLE_MS "grpc.max_connection_idle_ms"
|
||||
/** Maximum time that a channel may exist. Int valued, milliseconds.
|
||||
* INT_MAX means unlimited. */
|
||||
* INT_MAX means unlimited. Defaults to INT_MAX. */
|
||||
#define GRPC_ARG_MAX_CONNECTION_AGE_MS "grpc.max_connection_age_ms"
|
||||
/** Grace period after the channel reaches its max age. Int valued,
|
||||
milliseconds. INT_MAX means unlimited. */
|
||||
milliseconds. INT_MAX means unlimited. Defaults to INT_MAX. */
|
||||
#define GRPC_ARG_MAX_CONNECTION_AGE_GRACE_MS "grpc.max_connection_age_grace_ms"
|
||||
/** Timeout after the last RPC finishes on the client channel at which the
|
||||
* channel goes back into IDLE state. Int valued, milliseconds. INT_MAX means
|
||||
* unlimited. The default value is 30 minutes and the min value is 1 second. */
|
||||
#define GRPC_ARG_CLIENT_IDLE_TIMEOUT_MS "grpc.client_idle_timeout_ms"
|
||||
/** Enable/disable support for per-message compression. Defaults to 1, unless
|
||||
GRPC_ARG_MINIMAL_STACK is enabled, in which case it defaults to 0. */
|
||||
/** Enable/disable support for per-message compression. Boolean valued. Defaults
|
||||
to true, unless GRPC_ARG_MINIMAL_STACK is enabled, in which case it defaults
|
||||
to false. */
|
||||
#define GRPC_ARG_ENABLE_PER_MESSAGE_COMPRESSION "grpc.per_message_compression"
|
||||
/** Experimental Arg. Enable/disable support for per-message decompression.
|
||||
Defaults to 1. If disabled, decompression will not be performed and the
|
||||
application will see the compressed message in the byte buffer. */
|
||||
#define GRPC_ARG_ENABLE_PER_MESSAGE_DECOMPRESSION \
|
||||
"grpc.per_message_decompression"
|
||||
/** Initial stream ID for http2 transports. Int valued. */
|
||||
/** Initial stream ID for http2 transports. Int valued. Defaults to -1
|
||||
indicating use of default http2 setting initial stream ID (1). */
|
||||
#define GRPC_ARG_HTTP2_INITIAL_SEQUENCE_NUMBER \
|
||||
"grpc.http2.initial_sequence_number"
|
||||
/** Amount to read ahead on individual streams. Defaults to 64kb, larger
|
||||
|
@ -75,17 +79,22 @@
|
|||
NOTE: at some point we'd like to auto-tune this, and this parameter
|
||||
will become a no-op. Int valued, bytes. */
|
||||
#define GRPC_ARG_HTTP2_STREAM_LOOKAHEAD_BYTES "grpc.http2.lookahead_bytes"
|
||||
/** How much memory to use for hpack decoding. Int valued, bytes. */
|
||||
/** How much memory to use for hpack decoding. Int valued, bytes. Defaults to -1
|
||||
indicating use of default http2 setting(4096 bytes). */
|
||||
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_DECODER \
|
||||
"grpc.http2.hpack_table_size.decoder"
|
||||
/** How much memory to use for hpack encoding. Int valued, bytes. */
|
||||
/** How much memory to use for hpack encoding. Int valued, bytes. Defaults to -1
|
||||
indicating use of default http2 setting(4096 bytes). */
|
||||
#define GRPC_ARG_HTTP2_HPACK_TABLE_SIZE_ENCODER \
|
||||
"grpc.http2.hpack_table_size.encoder"
|
||||
/** How big a frame are we willing to receive via HTTP2.
|
||||
Min 16384, max 16777215. Larger values give lower CPU usage for large
|
||||
messages, but more head of line blocking for small messages. */
|
||||
messages, but more head of line blocking for small messages. Defaults to
|
||||
-1(indicating no explicit max frame size), so it will take standard http/2
|
||||
specified max frame size to 16 KB. */
|
||||
#define GRPC_ARG_HTTP2_MAX_FRAME_SIZE "grpc.http2.max_frame_size"
|
||||
/** Should BDP probing be performed? */
|
||||
/** Should BDP probing be performed?
|
||||
Boolean valued. Defaults to true(enabled). */
|
||||
#define GRPC_ARG_HTTP2_BDP_PROBE "grpc.http2.bdp_probe"
|
||||
/** (DEPRECATED) Does not have any effect.
|
||||
Earlier, this arg configured the minimum time between successive ping frames
|
||||
|
@ -109,21 +118,24 @@
|
|||
before the request is cancelled */
|
||||
#define GRPC_ARG_SERVER_MAX_UNREQUESTED_TIME_IN_SERVER_SECONDS \
|
||||
"grpc.server_max_unrequested_time_in_server"
|
||||
/** Channel arg to override the http2 :scheme header */
|
||||
/** Channel arg to override the http2 :scheme header. String valued. */
|
||||
#define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme"
|
||||
/** How many pings can the client send before needing to send a data/header
|
||||
frame? (0 indicates that an infinite number of pings can be sent without
|
||||
sending a data frame or header frame).
|
||||
If experiment "max_pings_wo_data_throttle" is enabled, instead of pings being
|
||||
completely blocked, they are throttled. */
|
||||
completely blocked, they are throttled.
|
||||
* Integer valued. Defaults to 2. */
|
||||
#define GRPC_ARG_HTTP2_MAX_PINGS_WITHOUT_DATA \
|
||||
"grpc.http2.max_pings_without_data"
|
||||
/** How many misbehaving pings the server can bear before sending goaway and
|
||||
closing the transport? (0 indicates that the server can bear an infinite
|
||||
number of misbehaving pings) */
|
||||
number of misbehaving pings)
|
||||
* Integer valued. Defaults to 2. */
|
||||
#define GRPC_ARG_HTTP2_MAX_PING_STRIKES "grpc.http2.max_ping_strikes"
|
||||
/** How much data are we willing to queue up per stream if
|
||||
GRPC_WRITE_BUFFER_HINT is set? This is an upper bound */
|
||||
GRPC_WRITE_BUFFER_HINT is set? This is an upper bound
|
||||
* Integer valued, bytes. Defaults to 65535 bytes. */
|
||||
#define GRPC_ARG_HTTP2_WRITE_BUFFER_SIZE "grpc.http2.write_buffer_size"
|
||||
/** Should we allow receipt of true-binary data on http2 connections?
|
||||
Defaults to on (1) */
|
||||
|
@ -136,33 +148,38 @@
|
|||
#define GRPC_ARG_EXPERIMENTAL_HTTP2_PREFERRED_CRYPTO_FRAME_SIZE \
|
||||
"grpc.experimental.http2.enable_preferred_frame_size"
|
||||
/** After a duration of this time the client/server pings its peer to see if the
|
||||
transport is still alive. Int valued, milliseconds. */
|
||||
transport is still alive. Int valued, milliseconds. Defaults to 7200000 (2
|
||||
hours). */
|
||||
#define GRPC_ARG_KEEPALIVE_TIME_MS "grpc.keepalive_time_ms"
|
||||
/** After waiting for a duration of this time, if the keepalive ping sender does
|
||||
not receive the ping ack, it will close the transport. Int valued,
|
||||
milliseconds. */
|
||||
milliseconds. Defaults to 20000 (20 seonds). */
|
||||
#define GRPC_ARG_KEEPALIVE_TIMEOUT_MS "grpc.keepalive_timeout_ms"
|
||||
/** Is it permissible to send keepalive pings from the client without any
|
||||
outstanding streams. Int valued, 0(false)/1(true). */
|
||||
outstanding streams. Int valued, 0(false)/1(true). Defaults to 0. */
|
||||
#define GRPC_ARG_KEEPALIVE_PERMIT_WITHOUT_CALLS \
|
||||
"grpc.keepalive_permit_without_calls"
|
||||
/** Default authority to pass if none specified on call construction. A string.
|
||||
* */
|
||||
#define GRPC_ARG_DEFAULT_AUTHORITY "grpc.default_authority"
|
||||
/** Primary user agent: goes at the start of the user-agent metadata
|
||||
sent on each request. A string. */
|
||||
sent on each request. A string. Defaults to empty string(""). */
|
||||
#define GRPC_ARG_PRIMARY_USER_AGENT_STRING "grpc.primary_user_agent"
|
||||
/** Secondary user agent: goes at the end of the user-agent metadata
|
||||
sent on each request. A string. */
|
||||
#define GRPC_ARG_SECONDARY_USER_AGENT_STRING "grpc.secondary_user_agent"
|
||||
/** The minimum time between subsequent connection attempts, in ms */
|
||||
/** The minimum time between subsequent connection attempts, in ms. Defaults to
|
||||
* 20 seconds. */
|
||||
#define GRPC_ARG_MIN_RECONNECT_BACKOFF_MS "grpc.min_reconnect_backoff_ms"
|
||||
/** The maximum time between subsequent connection attempts, in ms */
|
||||
/** The maximum time between subsequent connection attempts, in ms. Defaults to
|
||||
* 120 seconds. */
|
||||
#define GRPC_ARG_MAX_RECONNECT_BACKOFF_MS "grpc.max_reconnect_backoff_ms"
|
||||
/** The time between the first and second connection attempts, in ms */
|
||||
/** The time between the first and second connection attempts, in ms. Defaults
|
||||
* to 1 second. */
|
||||
#define GRPC_ARG_INITIAL_RECONNECT_BACKOFF_MS \
|
||||
"grpc.initial_reconnect_backoff_ms"
|
||||
/** Minimum amount of time between DNS resolutions, in ms */
|
||||
/** Minimum amount of time between DNS resolutions, in ms. Defaults to 30
|
||||
* seconds. */
|
||||
#define GRPC_ARG_DNS_MIN_TIME_BETWEEN_RESOLUTIONS_MS \
|
||||
"grpc.dns_min_time_between_resolutions_ms"
|
||||
/** The timeout used on servers for finishing handshaking on an incoming
|
||||
|
@ -178,10 +195,10 @@
|
|||
#define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override"
|
||||
/** If non-zero, a pointer to a session cache (a pointer of type
|
||||
grpc_ssl_session_cache*). (use grpc_ssl_session_cache_arg_vtable() to fetch
|
||||
an appropriate pointer arg vtable) */
|
||||
an appropriate pointer arg vtable). */
|
||||
#define GRPC_SSL_SESSION_CACHE_ARG "grpc.ssl_session_cache"
|
||||
/** If non-zero, it will determine the maximum frame size used by TSI's frame
|
||||
* protector.
|
||||
* protector. Defaults to zero.
|
||||
*/
|
||||
#define GRPC_ARG_TSI_MAX_FRAME_SIZE "grpc.tsi.max_frame_size"
|
||||
/** Maximum metadata size (soft limit), in bytes. Note this limit applies to the
|
||||
|
@ -200,17 +217,20 @@
|
|||
#define GRPC_ARG_ALLOW_REUSEPORT "grpc.so_reuseport"
|
||||
/** If non-zero, a pointer to a buffer pool (a pointer of type
|
||||
* grpc_resource_quota*). (use grpc_resource_quota_arg_vtable() to fetch an
|
||||
* appropriate pointer arg vtable) */
|
||||
* appropriate pointer arg vtable). */
|
||||
#define GRPC_ARG_RESOURCE_QUOTA "grpc.resource_quota"
|
||||
/** If non-zero, expand wildcard addresses to a list of local addresses. */
|
||||
/** If non-zero, expand wildcard addresses to a list of local addresses. Boolean
|
||||
* valued. */
|
||||
#define GRPC_ARG_EXPAND_WILDCARD_ADDRS "grpc.expand_wildcard_addrs"
|
||||
/** Service config data in JSON form.
|
||||
This value will be ignored if the name resolver returns a service config. */
|
||||
This value will be ignored if the name resolver returns a service config. A
|
||||
string value. */
|
||||
#define GRPC_ARG_SERVICE_CONFIG "grpc.service_config"
|
||||
/** Disable looking up the service config via the name resolver. */
|
||||
/** Disable looking up the service config via the name resolver. Boolean valued.
|
||||
* Defaults to true. */
|
||||
#define GRPC_ARG_SERVICE_CONFIG_DISABLE_RESOLUTION \
|
||||
"grpc.service_config_disable_resolution"
|
||||
/** LB policy name. */
|
||||
/** LB policy name. A string value.*/
|
||||
#define GRPC_ARG_LB_POLICY_NAME "grpc.lb_policy_name"
|
||||
/** Cap for ring size in the ring_hash LB policy. The min and max ring size
|
||||
values set in the LB policy config will be capped to this value.
|
||||
|
@ -223,24 +243,23 @@
|
|||
/** The maximum amount of memory used by trace events per channel trace node.
|
||||
* Once the maximum is reached, subsequent events will evict the oldest events
|
||||
* from the buffer. The unit for this knob is bytes. Setting it to zero causes
|
||||
* channel tracing to be disabled. */
|
||||
* channel tracing to be disabled. Defaults to (1024 * 4) bytes. */
|
||||
#define GRPC_ARG_MAX_CHANNEL_TRACE_EVENT_MEMORY_PER_NODE \
|
||||
"grpc.max_channel_trace_event_memory_per_node"
|
||||
/** If non-zero, gRPC library will track stats and information at at per channel
|
||||
* level. Disabling channelz naturally disables channel tracing. The default
|
||||
* is for channelz to be enabled. */
|
||||
#define GRPC_ARG_ENABLE_CHANNELZ "grpc.enable_channelz"
|
||||
/** If non-zero, Cronet transport will coalesce packets to fewer frames
|
||||
* when possible. */
|
||||
#define GRPC_ARG_USE_CRONET_PACKET_COALESCING \
|
||||
"grpc.use_cronet_packet_coalescing"
|
||||
/** Channel arg (integer) setting how large a slice to try and read from the
|
||||
wire each time recvmsg (or equivalent) is called **/
|
||||
wire each time recvmsg (or equivalent). Range varied from 1
|
||||
to (32 * 1024 * 1024) bytes. Defaults to 8192 bytes. **/
|
||||
#define GRPC_ARG_TCP_READ_CHUNK_SIZE "grpc.experimental.tcp_read_chunk_size"
|
||||
/** Note this is not a "channel arg" key. This is the default slice size to use
|
||||
* when trying to read from the wire if the GRPC_ARG_TCP_READ_CHUNK_SIZE
|
||||
* channel arg is unspecified. */
|
||||
#define GRPC_TCP_DEFAULT_READ_SLICE_SIZE 8192
|
||||
/** Minimum read chunk size defaults to 256 bytes. Range varies from 1 to (32 *
|
||||
* 1024 * 1024) bytes. */
|
||||
#define GRPC_ARG_TCP_MIN_READ_CHUNK_SIZE \
|
||||
"grpc.experimental.tcp_min_read_chunk_size"
|
||||
#define GRPC_ARG_TCP_MAX_READ_CHUNK_SIZE \
|
||||
|
@ -259,10 +278,12 @@
|
|||
issued by the tcp_write(). By default, this is set to 4. */
|
||||
#define GRPC_ARG_TCP_TX_ZEROCOPY_MAX_SIMULT_SENDS \
|
||||
"grpc.experimental.tcp_tx_zerocopy_max_simultaneous_sends"
|
||||
/* Overrides the TCP socket receive buffer size, SO_RCVBUF. */
|
||||
/* Overrides the TCP socket receive buffer size, SO_RCVBUF.
|
||||
Default value is -1(kReadBufferSizeUnset) indicating that the system will
|
||||
decide the buffer size. Range varies from 0 to INT_MAX. */
|
||||
#define GRPC_ARG_TCP_RECEIVE_BUFFER_SIZE "grpc.tcp_receive_buffer_size"
|
||||
/* Timeout in milliseconds to use for calls to the grpclb load balancer.
|
||||
If 0 or unset, the balancer calls will have no deadline. */
|
||||
If 0 or unset, the balancer calls will have no deadline. Defaults to 0 ms. */
|
||||
#define GRPC_ARG_GRPCLB_CALL_TIMEOUT_MS "grpc.grpclb_call_timeout_ms"
|
||||
/* Specifies the xDS bootstrap config as a JSON string.
|
||||
FOR TESTING PURPOSES ONLY -- DO NOT USE IN PRODUCTION.
|
||||
|
@ -277,7 +298,7 @@
|
|||
"grpc.TEST_ONLY_DO_NOT_USE_IN_PROD.xds_bootstrap_config"
|
||||
/* Timeout in milliseconds to wait for the serverlist from the grpclb load
|
||||
balancer before using fallback backend addresses from the resolver.
|
||||
If 0, enter fallback mode immediately. Default value is 10000. */
|
||||
If 0, enter fallback mode immediately. Default value is 10000ms. */
|
||||
#define GRPC_ARG_GRPCLB_FALLBACK_TIMEOUT_MS "grpc.grpclb_fallback_timeout_ms"
|
||||
/* Experimental Arg. Channel args to be used for the control-plane channel
|
||||
* created to the grpclb load balancers. This is a pointer arg whose value is a
|
||||
|
@ -290,9 +311,6 @@
|
|||
over to the next priority. Default value is 10 seconds. */
|
||||
#define GRPC_ARG_PRIORITY_FAILOVER_TIMEOUT_MS \
|
||||
"grpc.priority_failover_timeout_ms"
|
||||
/** If non-zero, grpc server's cronet compression workaround will be enabled */
|
||||
#define GRPC_ARG_WORKAROUND_CRONET_COMPRESSION \
|
||||
"grpc.workaround.cronet_compression"
|
||||
/** String defining the optimization target for a channel.
|
||||
Can be: "latency" - attempt to minimize latency at the cost of throughput
|
||||
"blend" - try to balance latency and throughput
|
||||
|
@ -325,13 +343,15 @@
|
|||
/** Channel arg that carries the bridged objective c object for custom metrics
|
||||
* logging filter. */
|
||||
#define GRPC_ARG_MOBILE_LOG_CONTEXT "grpc.mobile_log_context"
|
||||
/** If non-zero, client authority filter is disabled for the channel */
|
||||
/** If non-zero, client authority filter is disabled for the channel.
|
||||
* Boolean valued. Defaults to false. */
|
||||
#define GRPC_ARG_DISABLE_CLIENT_AUTHORITY_FILTER \
|
||||
"grpc.disable_client_authority_filter"
|
||||
/** If set to zero, disables use of http proxies. Enabled by default. */
|
||||
#define GRPC_ARG_ENABLE_HTTP_PROXY "grpc.enable_http_proxy"
|
||||
/** Channel arg to set http proxy per channel. If set, the channel arg
|
||||
* value will be preferred over the environment variable settings. */
|
||||
* value will be preferred over the environment variable settings. String
|
||||
* value. */
|
||||
#define GRPC_ARG_HTTP_PROXY "grpc.http_proxy"
|
||||
/** Specifies an HTTP proxy to use for individual addresses.
|
||||
* The proxy must be specified as an IP address, not a DNS name.
|
||||
|
@ -347,7 +367,7 @@
|
|||
agent is surfaced by default. */
|
||||
#define GRPC_ARG_SURFACE_USER_AGENT "grpc.surface_user_agent"
|
||||
/** If set, inhibits health checking (which may be enabled via the
|
||||
* service config.) */
|
||||
* service config.). Boolean valued. Defaults to false. */
|
||||
#define GRPC_ARG_INHIBIT_HEALTH_CHECKING "grpc.inhibit_health_checking"
|
||||
/** If enabled, the channel's DNS resolver queries for SRV records.
|
||||
* This is useful only when using the "grpclb" load balancing policy,
|
||||
|
@ -356,17 +376,17 @@
|
|||
* https://github.com/grpc/proposal/blob/master/A24-lb-policy-config.md
|
||||
* https://github.com/grpc/proposal/blob/master/A26-grpclb-selection.md
|
||||
* Note that this works only with the "ares" DNS resolver; it isn't supported
|
||||
* by the "native" DNS resolver. */
|
||||
* by the "native" DNS resolver. Boolean valued. Defaults to false. */
|
||||
#define GRPC_ARG_DNS_ENABLE_SRV_QUERIES "grpc.dns_enable_srv_queries"
|
||||
/** If set, determines an upper bound on the number of milliseconds that the
|
||||
* c-ares based DNS resolver will wait on queries before cancelling them.
|
||||
* The default value is 120,000. Setting this to "0" will disable the
|
||||
* The default value is 120,000ms. Setting this to "0" will disable the
|
||||
* overall timeout entirely. Note that this doesn't include internal c-ares
|
||||
* timeouts/backoff/retry logic, and so the actual DNS resolution may time out
|
||||
* sooner than the value specified here. */
|
||||
#define GRPC_ARG_DNS_ARES_QUERY_TIMEOUT_MS "grpc.dns_ares_query_timeout"
|
||||
/** If set, uses a local subchannel pool within the channel. Otherwise, uses the
|
||||
* global subchannel pool. */
|
||||
* global subchannel pool. Boolean valued. Defaults to false. */
|
||||
#define GRPC_ARG_USE_LOCAL_SUBCHANNEL_POOL "grpc.use_local_subchannel_pool"
|
||||
/** gRPC Objective-C channel pooling domain string. */
|
||||
#define GRPC_ARG_CHANNEL_POOL_DOMAIN "grpc.channel_pooling_domain"
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
* explanation and detailed descriptions of workarounds, see
|
||||
* /doc/workarounds.md
|
||||
*/
|
||||
typedef enum {
|
||||
GRPC_WORKAROUND_ID_CRONET_COMPRESSION = 0,
|
||||
GRPC_MAX_WORKAROUND_ID
|
||||
} grpc_workaround_list;
|
||||
typedef enum { GRPC_MAX_WORKAROUND_ID } grpc_workaround_list;
|
||||
|
||||
#endif /* GRPC_SUPPORT_WORKAROUND_LIST_H */
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
#include <grpc/support/atm.h>
|
||||
#include <grpc/support/time.h>
|
||||
#include <grpcpp/impl/codegen/rpc_service_method.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/impl/codegen/sync.h>
|
||||
#include <grpcpp/impl/codegen/time.h>
|
||||
#include <grpcpp/impl/completion_queue_tag.h>
|
||||
#include <grpcpp/impl/grpc_library.h>
|
||||
#include <grpcpp/impl/sync.h>
|
||||
#include <grpcpp/support/status.h>
|
||||
|
||||
#include <list>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include <grpc/grpc_security.h>
|
||||
#include <grpc/status.h>
|
||||
#include <grpcpp/impl/codegen/status.h>
|
||||
#include <grpcpp/support/status.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
|
|
@ -1,33 +0,0 @@
|
|||
//
|
||||
//
|
||||
// Copyright 2019 gRPC authors.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//
|
||||
|
||||
#ifndef GRPCPP_SECURITY_CRONET_CREDENTIALS_H
|
||||
#define GRPCPP_SECURITY_CRONET_CREDENTIALS_H
|
||||
|
||||
#include <memory>
|
||||
|
||||
namespace grpc {
|
||||
|
||||
class ChannelCredentials;
|
||||
|
||||
/// Credentials for a channel using Cronet.
|
||||
std::shared_ptr<ChannelCredentials> CronetChannelCredentials(void* engine);
|
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCPP_SECURITY_CRONET_CREDENTIALS_H
|
|
@ -84,8 +84,10 @@ class ChannelArguments {
|
|||
void SetMaxSendMessageSize(int size);
|
||||
|
||||
/// Set LB policy name.
|
||||
/// Note that if the name resolver returns only balancer addresses, the
|
||||
/// grpclb LB policy will be used, regardless of what is specified here.
|
||||
/// Note that this API implicitly provides an empty config for the
|
||||
/// specified LB policy, so it cannot be used for any policy with
|
||||
/// required configuration parameters. For those cases, set the LB
|
||||
/// policy via the service config instead.
|
||||
void SetLoadBalancingPolicyName(const std::string& lb_policy_name);
|
||||
|
||||
/// Set service config in JSON form.
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
|
||||
#define GRPC_CPP_VERSION_MAJOR 1
|
||||
#define GRPC_CPP_VERSION_MINOR 72
|
||||
#define GRPC_CPP_VERSION_PATCH 0
|
||||
#define GRPC_CPP_VERSION_TAG "dev"
|
||||
#define GRPC_CPP_VERSION_STRING "1.72.0-dev"
|
||||
#define GRPC_CPP_VERSION_PATCH 1
|
||||
#define GRPC_CPP_VERSION_TAG ""
|
||||
#define GRPC_CPP_VERSION_STRING "1.72.1"
|
||||
|
||||
#endif // GRPCPP_VERSION_INFO_H
|
||||
|
|
|
@ -9,7 +9,7 @@ GRPC_IOS_BUILD_FLAGS="
|
|||
CODE_SIGNING_ALLOWED=NO
|
||||
ONLY_ACTIVE_ARCH=NO
|
||||
ARCHS=arm64
|
||||
IPHONEOS_DEPLOYMENT_TARGET=12.0
|
||||
IPHONEOS_DEPLOYMENT_TARGET=15.0
|
||||
"
|
||||
|
||||
# Xcodebuild destination for iOS
|
||||
|
|
|
@ -53,17 +53,6 @@ extra_files = (
|
|||
'src/objective-c/!ProtoCompiler-gRPCPlugin.podspec',
|
||||
'src/objective-c/!ProtoCompiler.podspec',
|
||||
'src/objective-c/BoringSSL-GRPC.podspec',
|
||||
# cronet files
|
||||
'include/grpc/grpc_cronet.h',
|
||||
'src/core/ext/transport/cronet/client/secure/cronet_channel_create.cc',
|
||||
'src/core/ext/transport/cronet/client/secure/cronet_channel_create.h',
|
||||
'src/core/ext/transport/cronet/transport/cronet_status.cc',
|
||||
'src/core/ext/transport/cronet/transport/cronet_status.h',
|
||||
'src/core/ext/transport/cronet/transport/cronet_transport.cc',
|
||||
'src/core/ext/transport/cronet/transport/cronet_transport.h',
|
||||
'third_party/objective_c/Cronet/bidirectional_stream_c.h',
|
||||
'include/grpcpp/security/cronet_credentials.h',
|
||||
'src/cpp/client/cronet_credentials.cc',
|
||||
# podspec files
|
||||
'gRPC-C++.podspec',
|
||||
'gRPC-Core.podspec',
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/call_arena_allocator.h"
|
||||
#include "src/core/call/call_arena_allocator.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_ARENA_ALLOCATOR_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_ARENA_ALLOCATOR_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CALL_ARENA_ALLOCATOR_H
|
||||
#define GRPC_SRC_CORE_CALL_CALL_ARENA_ALLOCATOR_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
#include <stddef.h>
|
||||
|
@ -88,4 +88,4 @@ class CallArenaAllocator final : public ArenaFactory {
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_ARENA_ALLOCATOR_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CALL_ARENA_ALLOCATOR_H
|
|
@ -12,12 +12,12 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_DESTINATION_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_DESTINATION_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CALL_DESTINATION_H
|
||||
#define GRPC_SRC_CORE_CALL_CALL_DESTINATION_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/lib/transport/call_spine.h"
|
||||
#include "src/core/call/call_spine.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
@ -73,4 +73,4 @@ auto MakeCallDestinationFromHandlerFunction(HC handle_call) {
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_DESTINATION_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CALL_DESTINATION_H
|
|
@ -12,13 +12,13 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/call_filters.h"
|
||||
#include "src/core/call/call_filters.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "absl/log/check.h"
|
||||
#include "absl/log/log.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/util/crash.h"
|
||||
|
||||
namespace grpc_core {
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CALL_FILTERS_H
|
||||
#define GRPC_SRC_CORE_CALL_CALL_FILTERS_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
|
@ -24,6 +24,9 @@
|
|||
#include <type_traits>
|
||||
|
||||
#include "absl/log/check.h"
|
||||
#include "src/core/call/call_state.h"
|
||||
#include "src/core/call/message.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/lib/promise/for_each.h"
|
||||
#include "src/core/lib/promise/if.h"
|
||||
#include "src/core/lib/promise/latch.h"
|
||||
|
@ -33,9 +36,6 @@
|
|||
#include "src/core/lib/promise/status_flag.h"
|
||||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/transport/call_final_info.h"
|
||||
#include "src/core/lib/transport/call_state.h"
|
||||
#include "src/core/lib/transport/message.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/util/dump_args.h"
|
||||
#include "src/core/util/ref_counted.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
@ -186,6 +186,12 @@ class NextMessage {
|
|||
DCHECK(has_value());
|
||||
return *message_;
|
||||
}
|
||||
const Message& value() const {
|
||||
DCHECK_NE(message_, taken());
|
||||
DCHECK(ok());
|
||||
DCHECK(has_value());
|
||||
return *message_;
|
||||
}
|
||||
MessageHandle TakeValue() {
|
||||
DCHECK_NE(message_, taken());
|
||||
DCHECK(ok());
|
||||
|
@ -200,6 +206,19 @@ class NextMessage {
|
|||
call_state_ = nullptr;
|
||||
}
|
||||
|
||||
template <typename Sink>
|
||||
friend void AbslStringify(Sink& sink, const NextMessage& msg) {
|
||||
if (!msg.ok()) {
|
||||
sink.Append("<failure>");
|
||||
return;
|
||||
}
|
||||
if (!msg.has_value()) {
|
||||
sink.Append("<end-of-stream>");
|
||||
return;
|
||||
}
|
||||
AbslStringify(sink, msg.value());
|
||||
}
|
||||
|
||||
private:
|
||||
static Message* end_of_stream() { return nullptr; }
|
||||
static Message* error() { return reinterpret_cast<Message*>(1); }
|
||||
|
@ -952,6 +971,30 @@ struct AddOpImpl<FilterType, T, R (FilterType::Call::*)(T, FilterType*), impl,
|
|||
absl::enable_if_t<std::is_same<absl::StatusOr<T>,
|
||||
PromiseResult<R>>::value>> {
|
||||
static void Add(FilterType* channel_data, size_t call_offset, Layout<T>& to) {
|
||||
#if defined(__GNUC__) && __GNUC__ == 9
|
||||
// Workaround for a bug in GNU C++ 9 compilers that fail to compile this
|
||||
// class.
|
||||
class Promise {
|
||||
public:
|
||||
Promise(T value, typename FilterType::Call* call_data,
|
||||
FilterType* channel_data)
|
||||
: impl_(std::make_unique<R>(
|
||||
(call_data->*impl)(std::move(value), channel_data))) {}
|
||||
|
||||
Poll<ResultOr<T>> PollOnce() {
|
||||
auto p = (*impl_)();
|
||||
auto* r = p.value_if_ready();
|
||||
if (r == nullptr) return Pending{};
|
||||
this->~Promise();
|
||||
if (r->ok()) return ResultOr<T>{std::move(**r), nullptr};
|
||||
return ResultOr<T>{nullptr,
|
||||
CancelledServerMetadataFromStatus(r->status())};
|
||||
}
|
||||
|
||||
private:
|
||||
std::unique_ptr<R> impl_;
|
||||
};
|
||||
#else
|
||||
class Promise {
|
||||
public:
|
||||
Promise(T value, typename FilterType::Call* call_data,
|
||||
|
@ -971,6 +1014,7 @@ struct AddOpImpl<FilterType, T, R (FilterType::Call::*)(T, FilterType*), impl,
|
|||
private:
|
||||
GPR_NO_UNIQUE_ADDRESS R impl_;
|
||||
};
|
||||
#endif
|
||||
to.Add(sizeof(Promise), alignof(Promise),
|
||||
Operator<T>{
|
||||
channel_data,
|
||||
|
@ -1920,4 +1964,4 @@ static_assert(
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_FILTERS_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CALL_FILTERS_H
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_CALL_FINALIZATION_H
|
||||
#define GRPC_SRC_CORE_LIB_CHANNEL_CALL_FINALIZATION_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CALL_FINALIZATION_H
|
||||
#define GRPC_SRC_CORE_CALL_CALL_FINALIZATION_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
|
@ -85,4 +85,4 @@ struct ContextType<CallFinalization> {};
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CALL_FINALIZATION_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CALL_FINALIZATION_H
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/call_spine.h"
|
||||
#include "src/core/call/call_spine.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
|
@ -12,12 +12,16 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CALL_SPINE_H
|
||||
#define GRPC_SRC_CORE_CALL_CALL_SPINE_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "absl/log/check.h"
|
||||
#include "src/core/call/call_arena_allocator.h"
|
||||
#include "src/core/call/call_filters.h"
|
||||
#include "src/core/call/message.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/lib/promise/detail/status.h"
|
||||
#include "src/core/lib/promise/if.h"
|
||||
#include "src/core/lib/promise/latch.h"
|
||||
|
@ -27,10 +31,6 @@
|
|||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/promise/status_flag.h"
|
||||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/transport/call_arena_allocator.h"
|
||||
#include "src/core/lib/transport/call_filters.h"
|
||||
#include "src/core/lib/transport/message.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/util/dual_ref_counted.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
@ -106,7 +106,8 @@ class CallSpine final : public Party {
|
|||
|
||||
void PushServerTrailingMetadata(ServerMetadataHandle md) {
|
||||
GRPC_TRACE_LOG(call_state, INFO)
|
||||
<< "[call_state] PushServerTrailingMetadata: " << md->DebugString();
|
||||
<< "[call_state] PushServerTrailingMetadata: " << this << " "
|
||||
<< md->DebugString();
|
||||
call_filters().PushServerTrailingMetadata(std::move(md));
|
||||
}
|
||||
|
||||
|
@ -134,10 +135,10 @@ class CallSpine final : public Party {
|
|||
DCHECK(GetContext<Activity>() == this);
|
||||
using P = promise_detail::PromiseLike<Promise>;
|
||||
using ResultType = typename P::Result;
|
||||
return Map(std::move(promise), [this](ResultType r) {
|
||||
CancelIfFailed(r);
|
||||
return r;
|
||||
});
|
||||
return Map(std::move(promise),
|
||||
[self = RefAsSubclass<CallSpine>()](ResultType r) {
|
||||
self->CancelIfFailed(r);
|
||||
});
|
||||
}
|
||||
|
||||
template <typename StatusType>
|
||||
|
@ -220,18 +221,16 @@ class CallSpine final : public Party {
|
|||
void SpawnPushServerToClientMessage(MessageHandle msg) {
|
||||
server_to_client_serializer()->Spawn(
|
||||
[msg = std::move(msg), self = RefAsSubclass<CallSpine>()]() mutable {
|
||||
return Map(self->CancelIfFails(
|
||||
self->PushServerToClientMessage(std::move(msg))),
|
||||
[](auto) { return Empty{}; });
|
||||
return self->CancelIfFails(
|
||||
self->PushServerToClientMessage(std::move(msg)));
|
||||
});
|
||||
}
|
||||
|
||||
void SpawnPushClientToServerMessage(MessageHandle msg) {
|
||||
client_to_server_serializer()->Spawn(
|
||||
[msg = std::move(msg), self = RefAsSubclass<CallSpine>()]() mutable {
|
||||
return Map(self->CancelIfFails(
|
||||
self->PushClientToServerMessage(std::move(msg))),
|
||||
[](auto) { return Empty{}; });
|
||||
return self->CancelIfFails(
|
||||
self->PushClientToServerMessage(std::move(msg)));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -322,36 +321,56 @@ class CallInitiator {
|
|||
|
||||
CallInitiator() = default;
|
||||
explicit CallInitiator(RefCountedPtr<CallSpine> spine)
|
||||
: spine_(std::move(spine)) {}
|
||||
: spine_(std::move(spine)) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
}
|
||||
|
||||
// Wrap a promise so that if it returns failure it automatically cancels
|
||||
// the rest of the call.
|
||||
// The resulting (returned) promise will resolve to Empty.
|
||||
template <typename Promise>
|
||||
auto CancelIfFails(Promise promise) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->CancelIfFails(std::move(promise));
|
||||
}
|
||||
|
||||
auto PullServerInitialMetadata() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->PullServerInitialMetadata();
|
||||
}
|
||||
|
||||
auto PushMessage(MessageHandle message) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->PushClientToServerMessage(std::move(message));
|
||||
}
|
||||
|
||||
void SpawnPushMessage(MessageHandle message) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->SpawnPushClientToServerMessage(std::move(message));
|
||||
}
|
||||
|
||||
void FinishSends() { spine_->FinishSends(); }
|
||||
void FinishSends() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->FinishSends();
|
||||
}
|
||||
|
||||
void SpawnFinishSends() { spine_->SpawnFinishSends(); }
|
||||
void SpawnFinishSends() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->SpawnFinishSends();
|
||||
}
|
||||
|
||||
auto PullMessage() { return spine_->PullServerToClientMessage(); }
|
||||
auto PullMessage() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->PullServerToClientMessage();
|
||||
}
|
||||
|
||||
auto PullServerTrailingMetadata() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->PullServerTrailingMetadata();
|
||||
}
|
||||
|
||||
void Cancel(absl::Status error) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
CHECK(!error.ok());
|
||||
auto status = ServerMetadataFromStatus(error);
|
||||
status->Set(GrpcCallWasCancelled(), true);
|
||||
|
@ -359,52 +378,72 @@ class CallInitiator {
|
|||
}
|
||||
|
||||
void SpawnCancel(absl::Status error) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
CHECK(!error.ok());
|
||||
auto status = ServerMetadataFromStatus(error);
|
||||
status->Set(GrpcCallWasCancelled(), true);
|
||||
spine_->SpawnPushServerTrailingMetadata(std::move(status));
|
||||
}
|
||||
|
||||
void Cancel() { spine_->Cancel(); }
|
||||
void Cancel() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->Cancel();
|
||||
}
|
||||
|
||||
void SpawnCancel() { spine_->SpawnCancel(); }
|
||||
void SpawnCancel() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->SpawnCancel();
|
||||
}
|
||||
|
||||
GRPC_MUST_USE_RESULT bool OnDone(absl::AnyInvocable<void(bool)> fn) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->OnDone(std::move(fn));
|
||||
}
|
||||
|
||||
template <typename Promise>
|
||||
auto UntilCallCompletes(Promise promise) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->UntilCallCompletes(std::move(promise));
|
||||
}
|
||||
|
||||
template <typename PromiseFactory>
|
||||
void SpawnGuarded(absl::string_view name, PromiseFactory promise_factory) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->SpawnGuarded(name, std::move(promise_factory));
|
||||
}
|
||||
|
||||
template <typename PromiseFactory>
|
||||
void SpawnGuardedUntilCallCompletes(absl::string_view name,
|
||||
PromiseFactory promise_factory) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->SpawnGuardedUntilCallCompletes(name, std::move(promise_factory));
|
||||
}
|
||||
|
||||
template <typename PromiseFactory>
|
||||
void SpawnInfallible(absl::string_view name, PromiseFactory promise_factory) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
spine_->SpawnInfallible(name, std::move(promise_factory));
|
||||
}
|
||||
|
||||
template <typename PromiseFactory>
|
||||
auto SpawnWaitable(absl::string_view name, PromiseFactory promise_factory) {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->SpawnWaitable(name, std::move(promise_factory));
|
||||
}
|
||||
|
||||
bool WasCancelledPushed() const {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->call_filters().WasCancelledPushed();
|
||||
}
|
||||
|
||||
Arena* arena() { return spine_->arena(); }
|
||||
Party* party() { return spine_.get(); }
|
||||
Arena* arena() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_->arena();
|
||||
}
|
||||
Party* party() {
|
||||
DCHECK_NE(spine_.get(), nullptr);
|
||||
return spine_.get();
|
||||
}
|
||||
|
||||
private:
|
||||
friend class CallHandler;
|
||||
|
@ -442,6 +481,9 @@ class CallHandler {
|
|||
return spine_->OnDone(std::move(fn));
|
||||
}
|
||||
|
||||
// Wrap a promise so that if it returns failure it automatically cancels
|
||||
// the rest of the call.
|
||||
// The resulting (returned) promise will resolve to Empty.
|
||||
template <typename Promise>
|
||||
auto CancelIfFails(Promise promise) {
|
||||
return spine_->CancelIfFails(std::move(promise));
|
||||
|
@ -599,4 +641,4 @@ void ForwardCall(
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_SPINE_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CALL_SPINE_H
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/call_state.h"
|
||||
#include "src/core/call/call_state.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CALL_STATE_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_CALL_STATE_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CALL_STATE_H
|
||||
#define GRPC_SRC_CORE_CALL_CALL_STATE_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
|
@ -1151,4 +1151,4 @@ CallState::PollServerTrailingMetadataWasPushed() {
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CALL_STATE_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CALL_STATE_H
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/surface/client_call.h"
|
||||
#include "src/core/call/client_call.h"
|
||||
|
||||
#include <grpc/byte_buffer.h>
|
||||
#include <grpc/compression.h>
|
||||
|
@ -42,6 +42,7 @@
|
|||
#include "absl/log/check.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/lib/event_engine/event_engine_context.h"
|
||||
#include "src/core/lib/promise/all_ok.h"
|
||||
#include "src/core/lib/promise/status_flag.h"
|
||||
|
@ -49,7 +50,6 @@
|
|||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/surface/completion_queue.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/telemetry/stats.h"
|
||||
#include "src/core/telemetry/stats_data.h"
|
||||
#include "src/core/util/bitset.h"
|
||||
|
@ -404,12 +404,14 @@ void ClientCall::OnReceivedStatus(ServerMetadataHandle server_trailing_metadata,
|
|||
const auto status = server_trailing_metadata->get(GrpcStatusMetadata())
|
||||
.value_or(GRPC_STATUS_UNKNOWN);
|
||||
*out_status = status;
|
||||
Slice message_slice;
|
||||
if (Slice* message =
|
||||
server_trailing_metadata->get_pointer(GrpcMessageMetadata())) {
|
||||
message_slice = message->Ref();
|
||||
if (!IsErrorFlattenEnabled() || status != GRPC_STATUS_OK) {
|
||||
Slice message_slice;
|
||||
if (Slice* message =
|
||||
server_trailing_metadata->get_pointer(GrpcMessageMetadata())) {
|
||||
message_slice = message->Ref();
|
||||
}
|
||||
*out_status_details = message_slice.TakeCSlice();
|
||||
}
|
||||
*out_status_details = message_slice.TakeCSlice();
|
||||
if (out_error_string != nullptr) {
|
||||
if (status != GRPC_STATUS_OK) {
|
||||
*out_error_string =
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_SURFACE_CLIENT_CALL_H
|
||||
#define GRPC_SRC_CORE_LIB_SURFACE_CLIENT_CALL_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CLIENT_CALL_H
|
||||
#define GRPC_SRC_CORE_CALL_CLIENT_CALL_H
|
||||
|
||||
#include <grpc/byte_buffer.h>
|
||||
#include <grpc/compression.h>
|
||||
|
@ -40,11 +40,11 @@
|
|||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/lib/promise/status_flag.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/surface/call.h"
|
||||
#include "src/core/lib/surface/call_utils.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/util/crash.h"
|
||||
#include "src/core/util/ref_counted.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
@ -189,4 +189,4 @@ grpc_call* MakeClientCall(grpc_call* parent_call, uint32_t propagation_mask,
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_SURFACE_CLIENT_CALL_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CLIENT_CALL_H
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_CUSTOM_METADATA_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_CUSTOM_METADATA_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_CUSTOM_METADATA_H
|
||||
#define GRPC_SRC_CORE_CALL_CUSTOM_METADATA_H
|
||||
|
||||
// This file defines two macros: GRPC_CUSTOM_CLIENT_METADATA and
|
||||
// GRPC_CUSTOM_SERVER_METADATA.
|
||||
|
@ -27,4 +27,4 @@
|
|||
#define GRPC_CUSTOM_CLIENT_METADATA
|
||||
#define GRPC_CUSTOM_SERVER_METADATA
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_CUSTOM_METADATA_H
|
||||
#endif // GRPC_SRC_CORE_CALL_CUSTOM_METADATA_H
|
|
@ -12,17 +12,17 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/interception_chain.h"
|
||||
#include "src/core/call/interception_chain.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
#include "src/core/call/call_destination.h"
|
||||
#include "src/core/call/call_filters.h"
|
||||
#include "src/core/call/call_spine.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/transport/call_destination.h"
|
||||
#include "src/core/lib/transport/call_filters.h"
|
||||
#include "src/core/lib/transport/call_spine.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/util/match.h"
|
||||
|
||||
namespace grpc_core {
|
|
@ -12,18 +12,18 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_INTERCEPTION_CHAIN_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_INTERCEPTION_CHAIN_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_INTERCEPTION_CHAIN_H
|
||||
#define GRPC_SRC_CORE_CALL_INTERCEPTION_CHAIN_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "src/core/lib/transport/call_destination.h"
|
||||
#include "src/core/lib/transport/call_filters.h"
|
||||
#include "src/core/lib/transport/call_spine.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/call/call_destination.h"
|
||||
#include "src/core/call/call_filters.h"
|
||||
#include "src/core/call/call_spine.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/util/ref_counted.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
@ -279,4 +279,4 @@ class InterceptionChainBuilder final {
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_INTERCEPTION_CHAIN_H
|
||||
#endif // GRPC_SRC_CORE_CALL_INTERCEPTION_CHAIN_H
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/message.h"
|
||||
#include "src/core/call/message.h"
|
||||
|
||||
#include <grpc/impl/grpc_types.h>
|
||||
#include <grpc/support/port_platform.h>
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_MESSAGE_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_MESSAGE_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_MESSAGE_H
|
||||
#define GRPC_SRC_CORE_CALL_MESSAGE_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
|
@ -47,6 +47,10 @@ class Message {
|
|||
SliceBuffer* payload() { return &payload_; }
|
||||
const SliceBuffer* payload() const { return &payload_; }
|
||||
|
||||
Arena::PoolPtr<Message> Clone() const {
|
||||
return Arena::MakePooled<Message>(payload_.Copy(), flags_);
|
||||
}
|
||||
|
||||
std::string DebugString() const;
|
||||
|
||||
template <typename Sink>
|
||||
|
@ -63,4 +67,4 @@ using MessageHandle = Arena::PoolPtr<Message>;
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_MESSAGE_H
|
||||
#endif // GRPC_SRC_CORE_CALL_MESSAGE_H
|
|
@ -12,12 +12,12 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/transport/error_utils.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
@ -12,13 +12,13 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_METADATA_H
|
||||
#define GRPC_SRC_CORE_CALL_METADATA_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
||||
|
@ -198,4 +198,4 @@ struct StatusCastImpl<
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_H
|
||||
#endif // GRPC_SRC_CORE_CALL_METADATA_H
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
#include <string.h>
|
|
@ -16,8 +16,8 @@
|
|||
//
|
||||
//
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_BATCH_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_BATCH_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_METADATA_BATCH_H
|
||||
#define GRPC_SRC_CORE_CALL_METADATA_BATCH_H
|
||||
|
||||
#include <grpc/impl/compression_types.h>
|
||||
#include <grpc/status.h>
|
||||
|
@ -36,14 +36,14 @@
|
|||
#include "absl/meta/type_traits.h"
|
||||
#include "absl/strings/numbers.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/custom_metadata.h"
|
||||
#include "src/core/call/metadata_compression_traits.h"
|
||||
#include "src/core/call/parsed_metadata.h"
|
||||
#include "src/core/call/simple_slice_based_metadata.h"
|
||||
#include "src/core/lib/compression/compression_internal.h"
|
||||
#include "src/core/lib/experiments/experiments.h"
|
||||
#include "src/core/lib/promise/poll.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/custom_metadata.h"
|
||||
#include "src/core/lib/transport/metadata_compression_traits.h"
|
||||
#include "src/core/lib/transport/parsed_metadata.h"
|
||||
#include "src/core/lib/transport/simple_slice_based_metadata.h"
|
||||
#include "src/core/util/chunked_vector.h"
|
||||
#include "src/core/util/if_list.h"
|
||||
#include "src/core/util/packed_table.h"
|
||||
|
@ -1665,4 +1665,4 @@ struct grpc_metadata_batch : public grpc_metadata_batch_base {
|
|||
using grpc_metadata_batch_base::grpc_metadata_batch_base;
|
||||
};
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_BATCH_H
|
||||
#endif // GRPC_SRC_CORE_CALL_METADATA_BATCH_H
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_COMPRESSION_TRAITS_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_COMPRESSION_TRAITS_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_METADATA_COMPRESSION_TRAITS_H
|
||||
#define GRPC_SRC_CORE_CALL_METADATA_COMPRESSION_TRAITS_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
#include <stddef.h>
|
||||
|
@ -63,4 +63,4 @@ struct HttpStatusCompressor {};
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_COMPRESSION_TRAITS_H
|
||||
#endif // GRPC_SRC_CORE_CALL_METADATA_COMPRESSION_TRAITS_H
|
|
@ -12,17 +12,28 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/metadata_info.h"
|
||||
#include "src/core/call/metadata_info.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
||||
class MetadataSizesAnnotation::MetadataSizeEncoder {
|
||||
public:
|
||||
explicit MetadataSizeEncoder(std::string& summary) : summary_(summary) {}
|
||||
explicit MetadataSizeEncoder(std::string& summary, uint64_t soft_limit,
|
||||
uint64_t hard_limit)
|
||||
: summary_(summary) {
|
||||
header_ = absl::StrCat("gRPC metadata soft_limit:", soft_limit,
|
||||
",hard_limit:", hard_limit, ",");
|
||||
absl::StrAppend(&summary_, header_);
|
||||
entry_length_ = header_.length();
|
||||
}
|
||||
|
||||
void Encode(const Slice& key, const Slice& value) {
|
||||
AddToSummary(key.as_string_view(), value.size());
|
||||
|
@ -36,18 +47,25 @@ class MetadataSizesAnnotation::MetadataSizeEncoder {
|
|||
private:
|
||||
void AddToSummary(absl::string_view key,
|
||||
size_t value_length) GPR_ATTRIBUTE_NOINLINE {
|
||||
absl::StrAppend(&summary_, key, ":",
|
||||
hpack_constants::SizeForEntry(key.size(), value_length),
|
||||
",");
|
||||
std::string metadata_str = absl::StrCat(
|
||||
key, ":", hpack_constants::SizeForEntry(key.size(), value_length), ",");
|
||||
if ((entry_length_ + metadata_str.length()) < 200) {
|
||||
// Limit each annotation to 200 bytes.
|
||||
entry_length_ += metadata_str.length();
|
||||
absl::StrAppend(&summary_, metadata_str);
|
||||
} else {
|
||||
absl::StrAppend(&summary_, ";", header_, metadata_str);
|
||||
entry_length_ = header_.length() + metadata_str.length();
|
||||
}
|
||||
}
|
||||
std::string& summary_;
|
||||
std::string header_;
|
||||
size_t entry_length_ = 0;
|
||||
};
|
||||
|
||||
std::string MetadataSizesAnnotation::ToString() const {
|
||||
std::string metadata_annotation =
|
||||
absl::StrCat("gRPC metadata soft_limit:", soft_limit_,
|
||||
",hard_limit:", hard_limit_, ",");
|
||||
MetadataSizeEncoder encoder(metadata_annotation);
|
||||
std::string metadata_annotation;
|
||||
MetadataSizeEncoder encoder(metadata_annotation, soft_limit_, hard_limit_);
|
||||
metadata_buffer_->Encode(&encoder);
|
||||
return metadata_annotation;
|
||||
}
|
|
@ -12,14 +12,14 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_INFO_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_INFO_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_METADATA_INFO_H
|
||||
#define GRPC_SRC_CORE_CALL_METADATA_INFO_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/ext/transport/chttp2/transport/hpack_constants.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/telemetry/call_tracer.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
@ -82,4 +82,4 @@ class MetadataSizesAnnotation
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_METADATA_INFO_H
|
||||
#endif // GRPC_SRC_CORE_CALL_METADATA_INFO_H
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/transport/parsed_metadata.h"
|
||||
#include "src/core/call/parsed_metadata.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_PARSED_METADATA_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_PARSED_METADATA_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_PARSED_METADATA_H
|
||||
#define GRPC_SRC_CORE_CALL_PARSED_METADATA_H
|
||||
|
||||
#include <grpc/slice.h>
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
@ -426,4 +426,4 @@ ParsedMetadata<MetadataContainer>::KeyValueVTable(absl::string_view key) {
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_PARSED_METADATA_H
|
||||
#endif // GRPC_SRC_CORE_CALL_PARSED_METADATA_H
|
|
@ -17,9 +17,9 @@
|
|||
|
||||
#include <utility>
|
||||
|
||||
#include "src/core/lib/transport/call_spine.h"
|
||||
#include "src/core/lib/transport/message.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/call/call_spine.h"
|
||||
#include "src/core/call/message.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#include "src/core/lib/surface/server_call.h"
|
||||
#include "src/core/call/server_call.h"
|
||||
|
||||
#include <grpc/byte_buffer.h>
|
||||
#include <grpc/compression.h>
|
||||
|
@ -39,6 +39,8 @@
|
|||
|
||||
#include "absl/log/check.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/promise/all_ok.h"
|
||||
#include "src/core/lib/promise/map.h"
|
||||
#include "src/core/lib/promise/poll.h"
|
||||
|
@ -47,8 +49,6 @@
|
|||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/surface/completion_queue.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/server/server_interface.h"
|
||||
#include "src/core/util/bitset.h"
|
||||
#include "src/core/util/latent_see.h"
|
|
@ -12,8 +12,8 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_SURFACE_SERVER_CALL_H
|
||||
#define GRPC_SRC_CORE_LIB_SURFACE_SERVER_CALL_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_SERVER_CALL_H
|
||||
#define GRPC_SRC_CORE_CALL_SERVER_CALL_H
|
||||
|
||||
#include <grpc/byte_buffer.h>
|
||||
#include <grpc/compression.h>
|
||||
|
@ -43,12 +43,12 @@
|
|||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/promise/poll.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/surface/call.h"
|
||||
#include "src/core/lib/surface/call_utils.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/server/server_interface.h"
|
||||
#include "src/core/telemetry/stats.h"
|
||||
#include "src/core/telemetry/stats_data.h"
|
||||
|
@ -166,4 +166,4 @@ grpc_call* MakeServerCall(CallHandler call_handler,
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_SURFACE_SERVER_CALL_H
|
||||
#endif // GRPC_SRC_CORE_CALL_SERVER_CALL_H
|
|
@ -12,14 +12,14 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_TRANSPORT_SIMPLE_SLICE_BASED_METADATA_H
|
||||
#define GRPC_SRC_CORE_LIB_TRANSPORT_SIMPLE_SLICE_BASED_METADATA_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_SIMPLE_SLICE_BASED_METADATA_H
|
||||
#define GRPC_SRC_CORE_CALL_SIMPLE_SLICE_BASED_METADATA_H
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/parsed_metadata.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/parsed_metadata.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
||||
|
@ -50,4 +50,4 @@ struct SimpleSliceBasedMetadata {
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_TRANSPORT_SIMPLE_SLICE_BASED_METADATA_H
|
||||
#endif // GRPC_SRC_CORE_CALL_SIMPLE_SLICE_BASED_METADATA_H
|
|
@ -16,7 +16,7 @@
|
|||
//
|
||||
//
|
||||
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
|
||||
#include <grpc/support/port_platform.h>
|
||||
#include <string.h>
|
|
@ -16,8 +16,8 @@
|
|||
//
|
||||
//
|
||||
|
||||
#ifndef GRPC_SRC_CORE_LIB_CHANNEL_STATUS_UTIL_H
|
||||
#define GRPC_SRC_CORE_LIB_CHANNEL_STATUS_UTIL_H
|
||||
#ifndef GRPC_SRC_CORE_CALL_STATUS_UTIL_H
|
||||
#define GRPC_SRC_CORE_CALL_STATUS_UTIL_H
|
||||
|
||||
#include <grpc/status.h>
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
@ -77,4 +77,4 @@ absl::Status MaybeRewriteIllegalStatusCode(absl::Status status,
|
|||
|
||||
} // namespace grpc_core
|
||||
|
||||
#endif // GRPC_SRC_CORE_LIB_CHANNEL_STATUS_UTIL_H
|
||||
#endif // GRPC_SRC_CORE_CALL_STATUS_UTIL_H
|
|
@ -45,6 +45,10 @@
|
|||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/call_spine.h"
|
||||
#include "src/core/call/client_call.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/client_channel/client_channel_internal.h"
|
||||
#include "src/core/client_channel/client_channel_service_config.h"
|
||||
#include "src/core/client_channel/config_selector.h"
|
||||
|
@ -59,7 +63,6 @@
|
|||
#include "src/core/ext/filters/channel_idle/legacy_channel_idle_filter.h"
|
||||
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/event_engine/channel_args_endpoint_config.h"
|
||||
#include "src/core/lib/iomgr/resolved_address.h"
|
||||
|
@ -75,11 +78,8 @@
|
|||
#include "src/core/lib/slice/slice_internal.h"
|
||||
#include "src/core/lib/surface/call.h"
|
||||
#include "src/core/lib/surface/channel.h"
|
||||
#include "src/core/lib/surface/client_call.h"
|
||||
#include "src/core/lib/surface/completion_queue.h"
|
||||
#include "src/core/lib/transport/call_spine.h"
|
||||
#include "src/core/lib/transport/connectivity_state.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/load_balancing/child_policy_handler.h"
|
||||
#include "src/core/load_balancing/lb_policy.h"
|
||||
#include "src/core/load_balancing/lb_policy_registry.h"
|
||||
|
@ -495,7 +495,7 @@ class ClientChannel::ClientChannelControlHelper
|
|||
}
|
||||
|
||||
GlobalStatsPluginRegistry::StatsPluginGroup& GetStatsPluginGroup() override {
|
||||
return client_channel_->stats_plugin_group_;
|
||||
return *client_channel_->stats_plugin_group_;
|
||||
}
|
||||
|
||||
void AddTraceEvent(TraceSeverity severity, absl::string_view message) override
|
||||
|
@ -587,6 +587,7 @@ absl::StatusOr<RefCountedPtr<Channel>> ClientChannel::Create(
|
|||
}
|
||||
|
||||
namespace {
|
||||
|
||||
std::string GetDefaultAuthorityFromChannelArgs(const ChannelArgs& channel_args,
|
||||
absl::string_view target) {
|
||||
std::optional<std::string> default_authority =
|
||||
|
@ -598,6 +599,18 @@ std::string GetDefaultAuthorityFromChannelArgs(const ChannelArgs& channel_args,
|
|||
return std::move(*default_authority);
|
||||
}
|
||||
}
|
||||
|
||||
std::shared_ptr<GlobalStatsPluginRegistry::StatsPluginGroup>
|
||||
GetStatsPluginGroupFromChannelArgs(const ChannelArgs& channel_args,
|
||||
absl::string_view target,
|
||||
absl::string_view default_authority) {
|
||||
grpc_event_engine::experimental::ChannelArgsEndpointConfig endpoint_config(
|
||||
channel_args);
|
||||
experimental::StatsPluginChannelScope scope(target, default_authority,
|
||||
endpoint_config);
|
||||
return GlobalStatsPluginRegistry::GetStatsPluginsForChannel(scope);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
ClientChannel::ClientChannel(
|
||||
|
@ -606,15 +619,17 @@ ClientChannel::ClientChannel(
|
|||
ClientChannelFactory* client_channel_factory,
|
||||
CallDestinationFactory* call_destination_factory)
|
||||
: Channel(std::move(target), channel_args),
|
||||
channel_args_(std::move(channel_args)),
|
||||
default_authority_(
|
||||
GetDefaultAuthorityFromChannelArgs(channel_args, this->target())),
|
||||
stats_plugin_group_(GetStatsPluginGroupFromChannelArgs(
|
||||
channel_args, this->target(), default_authority_)),
|
||||
channel_args_(channel_args.SetObject(stats_plugin_group_)),
|
||||
event_engine_(channel_args_.GetObjectRef<EventEngine>()),
|
||||
uri_to_resolve_(std::move(uri_to_resolve)),
|
||||
service_config_parser_index_(
|
||||
internal::ClientChannelServiceConfigParser::ParserIndex()),
|
||||
default_service_config_(std::move(default_service_config)),
|
||||
client_channel_factory_(client_channel_factory),
|
||||
default_authority_(
|
||||
GetDefaultAuthorityFromChannelArgs(channel_args_, this->target())),
|
||||
channelz_node_(channel_args_.GetObject<channelz::ChannelNode>()),
|
||||
idle_timeout_(GetClientIdleTimeout(channel_args_)),
|
||||
resolver_data_for_calls_(ResolverDataForCalls{}),
|
||||
|
@ -634,13 +649,6 @@ ClientChannel::ClientChannel(
|
|||
} else {
|
||||
keepalive_time_ = -1; // unset
|
||||
}
|
||||
// Get stats plugins for channel.
|
||||
grpc_event_engine::experimental::ChannelArgsEndpointConfig endpoint_config(
|
||||
channel_args_);
|
||||
experimental::StatsPluginChannelScope scope(
|
||||
this->target(), default_authority_, endpoint_config);
|
||||
stats_plugin_group_ =
|
||||
GlobalStatsPluginRegistry::GetStatsPluginsForChannel(scope);
|
||||
}
|
||||
|
||||
ClientChannel::~ClientChannel() {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "absl/status/status.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/client_channel/client_channel_factory.h"
|
||||
#include "src/core/client_channel/config_selector.h"
|
||||
#include "src/core/client_channel/subchannel.h"
|
||||
|
@ -29,7 +30,6 @@
|
|||
#include "src/core/filter/blackboard.h"
|
||||
#include "src/core/lib/promise/observable.h"
|
||||
#include "src/core/lib/surface/channel.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/load_balancing/lb_policy.h"
|
||||
#include "src/core/resolver/resolver.h"
|
||||
#include "src/core/service_config/service_config.h"
|
||||
|
@ -170,6 +170,9 @@ class ClientChannel : public Channel {
|
|||
ConfigSelector& config_selector,
|
||||
ClientMetadata& client_initial_metadata) const;
|
||||
|
||||
const std::string default_authority_;
|
||||
const std::shared_ptr<GlobalStatsPluginRegistry::StatsPluginGroup>
|
||||
stats_plugin_group_;
|
||||
const ChannelArgs channel_args_;
|
||||
const std::shared_ptr<grpc_event_engine::experimental::EventEngine>
|
||||
event_engine_;
|
||||
|
@ -177,9 +180,7 @@ class ClientChannel : public Channel {
|
|||
const size_t service_config_parser_index_;
|
||||
const RefCountedPtr<ServiceConfig> default_service_config_;
|
||||
ClientChannelFactory* const client_channel_factory_;
|
||||
const std::string default_authority_;
|
||||
channelz::ChannelNode* const channelz_node_;
|
||||
GlobalStatsPluginRegistry::StatsPluginGroup stats_plugin_group_;
|
||||
|
||||
//
|
||||
// Idleness state.
|
||||
|
|
|
@ -47,6 +47,8 @@
|
|||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/channelz/channel_trace.h"
|
||||
#include "src/core/client_channel/backup_poller.h"
|
||||
#include "src/core/client_channel/client_channel_internal.h"
|
||||
|
@ -65,7 +67,6 @@
|
|||
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/experiments/experiments.h"
|
||||
#include "src/core/lib/iomgr/exec_ctx.h"
|
||||
|
@ -85,7 +86,6 @@
|
|||
#include "src/core/lib/surface/call.h"
|
||||
#include "src/core/lib/transport/connectivity_state.h"
|
||||
#include "src/core/lib/transport/error_utils.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/load_balancing/backend_metric_parser.h"
|
||||
#include "src/core/load_balancing/child_policy_handler.h"
|
||||
#include "src/core/load_balancing/lb_policy_registry.h"
|
||||
|
@ -268,7 +268,6 @@ class ClientChannelFilter::FilterBasedCallData final
|
|||
static void RecvTrailingMetadataReadyForConfigSelectorCommitCallback(
|
||||
void* arg, grpc_error_handle error);
|
||||
|
||||
grpc_slice path_; // Request path.
|
||||
gpr_cycle_counter call_start_time_;
|
||||
Timestamp deadline_;
|
||||
|
||||
|
@ -398,7 +397,6 @@ class DynamicTerminationFilter::CallData final {
|
|||
auto* chand = static_cast<DynamicTerminationFilter*>(elem->channel_data);
|
||||
ClientChannelFilter* client_channel = chand->chand_;
|
||||
grpc_call_element_args args = {calld->owning_call_, nullptr,
|
||||
calld->path_,
|
||||
/*start_time=*/0, calld->deadline_,
|
||||
calld->arena_, calld->call_combiner_};
|
||||
auto* service_config_call_data = GetServiceConfigCallData(calld->arena_);
|
||||
|
@ -413,15 +411,11 @@ class DynamicTerminationFilter::CallData final {
|
|||
|
||||
private:
|
||||
explicit CallData(const grpc_call_element_args& args)
|
||||
: path_(CSliceRef(args.path)),
|
||||
deadline_(args.deadline),
|
||||
: deadline_(args.deadline),
|
||||
arena_(args.arena),
|
||||
owning_call_(args.call_stack),
|
||||
call_combiner_(args.call_combiner) {}
|
||||
|
||||
~CallData() { CSliceUnref(path_); }
|
||||
|
||||
grpc_slice path_; // Request path.
|
||||
Timestamp deadline_;
|
||||
Arena* arena_;
|
||||
grpc_call_stack* owning_call_;
|
||||
|
@ -986,7 +980,7 @@ class ClientChannelFilter::ClientChannelControlHelper final
|
|||
}
|
||||
|
||||
GlobalStatsPluginRegistry::StatsPluginGroup& GetStatsPluginGroup() override {
|
||||
return *chand_->owning_stack_->stats_plugin_group;
|
||||
return **chand_->owning_stack_->stats_plugin_group;
|
||||
}
|
||||
|
||||
void AddTraceEvent(TraceSeverity severity, absl::string_view message) override
|
||||
|
@ -1928,8 +1922,7 @@ bool ClientChannelFilter::CallData::CheckResolutionLocked(
|
|||
|
||||
ClientChannelFilter::FilterBasedCallData::FilterBasedCallData(
|
||||
grpc_call_element* elem, const grpc_call_element_args& args)
|
||||
: path_(CSliceRef(args.path)),
|
||||
call_start_time_(args.start_time),
|
||||
: call_start_time_(args.start_time),
|
||||
deadline_(args.deadline),
|
||||
arena_(args.arena),
|
||||
elem_(elem),
|
||||
|
@ -1940,7 +1933,6 @@ ClientChannelFilter::FilterBasedCallData::FilterBasedCallData(
|
|||
}
|
||||
|
||||
ClientChannelFilter::FilterBasedCallData::~FilterBasedCallData() {
|
||||
CSliceUnref(path_);
|
||||
// Make sure there are no remaining pending batches.
|
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
||||
CHECK_EQ(pending_batches_[i], nullptr);
|
||||
|
@ -2252,9 +2244,9 @@ void ClientChannelFilter::FilterBasedCallData::RetryCheckResolutionLocked() {
|
|||
}
|
||||
|
||||
void ClientChannelFilter::FilterBasedCallData::CreateDynamicCall() {
|
||||
DynamicFilters::Call::Args args = {dynamic_filters(), pollent_, path_,
|
||||
call_start_time_, deadline_, arena(),
|
||||
call_combiner()};
|
||||
DynamicFilters::Call::Args args = {dynamic_filters(), pollent_,
|
||||
call_start_time_, deadline_,
|
||||
arena(), call_combiner()};
|
||||
grpc_error_handle error;
|
||||
DynamicFilters* channel_stack = args.channel_stack.get();
|
||||
GRPC_TRACE_LOG(client_channel_call, INFO)
|
||||
|
@ -3042,10 +3034,8 @@ void ClientChannelFilter::FilterBasedLoadBalancedCall::RetryPickLocked() {
|
|||
}
|
||||
|
||||
void ClientChannelFilter::FilterBasedLoadBalancedCall::CreateSubchannelCall() {
|
||||
Slice* path = send_initial_metadata()->get_pointer(HttpPathMetadata());
|
||||
CHECK_NE(path, nullptr);
|
||||
SubchannelCall::Args call_args = {
|
||||
connected_subchannel()->Ref(), pollent_, path->Ref(), /*start_time=*/0,
|
||||
connected_subchannel()->Ref(), pollent_, /*start_time=*/0,
|
||||
arena()->GetContext<Call>()->deadline(),
|
||||
// TODO(roth): When we implement hedging support, we will probably
|
||||
// need to use a separate call arena for each subchannel call.
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include "absl/functional/any_invocable.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/channelz/channelz.h"
|
||||
#include "src/core/client_channel/client_channel_args.h"
|
||||
#include "src/core/client_channel/client_channel_factory.h"
|
||||
|
@ -53,7 +54,6 @@
|
|||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/connectivity_state.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/load_balancing/backend_metric_data.h"
|
||||
#include "src/core/load_balancing/lb_policy.h"
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "absl/log/check.h"
|
||||
#include "src/core/call/call_destination.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/transport/call_destination.h"
|
||||
#include "src/core/load_balancing/lb_policy.h"
|
||||
#include "src/core/service_config/service_config_call_data.h"
|
||||
#include "src/core/telemetry/call_tracer.h"
|
||||
|
|
|
@ -27,12 +27,12 @@
|
|||
#include "absl/log/check.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/interception_chain.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/client_channel/client_channel_internal.h"
|
||||
#include "src/core/lib/channel/channel_fwd.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/interception_chain.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/service_config/service_config.h"
|
||||
#include "src/core/util/ref_counted.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
|
|
@ -14,11 +14,11 @@
|
|||
|
||||
#include "src/core/client_channel/direct_channel.h"
|
||||
|
||||
#include "src/core/call/client_call.h"
|
||||
#include "src/core/call/interception_chain.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/lib/event_engine/event_engine_context.h"
|
||||
#include "src/core/lib/surface/channel_stack_type.h"
|
||||
#include "src/core/lib/surface/client_call.h"
|
||||
#include "src/core/lib/transport/interception_chain.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -55,7 +55,6 @@ DynamicFilters::Call::Call(Args args, grpc_error_handle* error)
|
|||
const grpc_call_element_args call_args = {
|
||||
call_stack, // call_stack
|
||||
nullptr, // server_transport_data
|
||||
args.path, // path
|
||||
args.start_time, // start_time
|
||||
args.deadline, // deadline
|
||||
args.arena, // arena
|
||||
|
|
|
@ -49,7 +49,6 @@ class DynamicFilters final : public RefCounted<DynamicFilters> {
|
|||
struct Args {
|
||||
RefCountedPtr<DynamicFilters> channel_stack;
|
||||
grpc_polling_entity* pollent;
|
||||
grpc_slice path;
|
||||
gpr_cycle_counter start_time;
|
||||
Timestamp deadline;
|
||||
Arena* arena;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/load_balancing/lb_policy.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
#include "src/core/client_channel/load_balanced_call_destination.h"
|
||||
|
||||
#include "absl/log/log.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/client_channel/client_channel.h"
|
||||
#include "src/core/client_channel/client_channel_internal.h"
|
||||
#include "src/core/client_channel/lb_metadata.h"
|
||||
#include "src/core/client_channel/subchannel.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/lib/promise/loop.h"
|
||||
#include "src/core/telemetry/call_tracer.h"
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
#define GRPC_SRC_CORE_CLIENT_CHANNEL_LOAD_BALANCED_CALL_DESTINATION_H
|
||||
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "src/core/call/call_destination.h"
|
||||
#include "src/core/client_channel/client_channel.h"
|
||||
#include "src/core/lib/promise/context.h"
|
||||
#include "src/core/lib/transport/call_destination.h"
|
||||
#include "src/core/load_balancing/lb_policy.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -24,11 +24,12 @@
|
|||
#include "absl/log/log.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/client_channel/client_channel_internal.h"
|
||||
#include "src/core/client_channel/retry_service_config.h"
|
||||
#include "src/core/client_channel/retry_throttle.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/iomgr/call_combiner.h"
|
||||
#include "src/core/lib/iomgr/closure.h"
|
||||
|
@ -39,7 +40,6 @@
|
|||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/transport/error_utils.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/util/backoff.h"
|
||||
#include "src/core/util/construct_destruct.h"
|
||||
|
@ -53,6 +53,8 @@
|
|||
|
||||
namespace grpc_core {
|
||||
|
||||
using TaskHandle = grpc_event_engine::experimental::EventEngine::TaskHandle;
|
||||
|
||||
//
|
||||
// RetryFilter::LegacyCallData::CallStackDestructionBarrier
|
||||
//
|
||||
|
@ -220,7 +222,7 @@ void RetryFilter::LegacyCallData::CallAttempt::MaybeSwitchToFastPath() {
|
|||
// If we've already switched to fast path, there's nothing to do here.
|
||||
if (calld_->committed_call_ != nullptr) return;
|
||||
// If the perAttemptRecvTimeout timer is pending, we can't switch yet.
|
||||
if (per_attempt_recv_timer_handle_.has_value()) return;
|
||||
if (per_attempt_recv_timer_handle_ != TaskHandle::kInvalid) return;
|
||||
// If there are still send ops to replay, we can't switch yet.
|
||||
if (HaveSendOpsToReplay()) return;
|
||||
// If we started an internal batch for recv_trailing_metadata but have not
|
||||
|
@ -643,31 +645,33 @@ void RetryFilter::LegacyCallData::CallAttempt::OnPerAttemptRecvTimerLocked(
|
|||
<< "chand=" << calld->chand_ << " calld=" << calld
|
||||
<< " attempt=" << call_attempt
|
||||
<< ": perAttemptRecvTimeout timer fired: error=" << StatusToString(error)
|
||||
<< ", per_attempt_recv_timer_handle_.has_value()="
|
||||
<< call_attempt->per_attempt_recv_timer_handle_.has_value();
|
||||
<< ", per_attempt_recv_timer_handle_ is valid ="
|
||||
<< (call_attempt->per_attempt_recv_timer_handle_ != TaskHandle::kInvalid);
|
||||
CallCombinerClosureList closures;
|
||||
call_attempt->per_attempt_recv_timer_handle_.reset();
|
||||
// Cancel this attempt.
|
||||
// TODO(roth): When implementing hedging, we should not cancel the
|
||||
// current attempt.
|
||||
call_attempt->MaybeAddBatchForCancelOp(
|
||||
grpc_error_set_int(
|
||||
GRPC_ERROR_CREATE("retry perAttemptRecvTimeout exceeded"),
|
||||
StatusIntProperty::kRpcStatus, GRPC_STATUS_CANCELLED),
|
||||
&closures);
|
||||
// Check whether we should retry.
|
||||
if (call_attempt->ShouldRetry(/*status=*/std::nullopt,
|
||||
/*server_pushback_ms=*/std::nullopt)) {
|
||||
// Mark current attempt as abandoned.
|
||||
call_attempt->Abandon();
|
||||
// We are retrying. Start backoff timer.
|
||||
calld->StartRetryTimer(/*server_pushback=*/std::nullopt);
|
||||
} else {
|
||||
// Not retrying, so commit the call.
|
||||
calld->RetryCommit(call_attempt);
|
||||
// If retry state is no longer needed, switch to fast path for
|
||||
// subsequent batches.
|
||||
call_attempt->MaybeSwitchToFastPath();
|
||||
if (call_attempt->per_attempt_recv_timer_handle_ != TaskHandle::kInvalid) {
|
||||
call_attempt->per_attempt_recv_timer_handle_ = TaskHandle::kInvalid;
|
||||
// Cancel this attempt.
|
||||
// TODO(roth): When implementing hedging, we should not cancel the
|
||||
// current attempt.
|
||||
call_attempt->MaybeAddBatchForCancelOp(
|
||||
grpc_error_set_int(
|
||||
GRPC_ERROR_CREATE("retry perAttemptRecvTimeout exceeded"),
|
||||
StatusIntProperty::kRpcStatus, GRPC_STATUS_CANCELLED),
|
||||
&closures);
|
||||
// Check whether we should retry.
|
||||
if (call_attempt->ShouldRetry(/*status=*/std::nullopt,
|
||||
/*server_pushback_ms=*/std::nullopt)) {
|
||||
// Mark current attempt as abandoned.
|
||||
call_attempt->Abandon();
|
||||
// We are retrying. Start backoff timer.
|
||||
calld->StartRetryTimer(/*server_pushback=*/std::nullopt);
|
||||
} else {
|
||||
// Not retrying, so commit the call.
|
||||
calld->RetryCommit(call_attempt);
|
||||
// If retry state is no longer needed, switch to fast path for
|
||||
// subsequent batches.
|
||||
call_attempt->MaybeSwitchToFastPath();
|
||||
}
|
||||
}
|
||||
closures.RunClosures(calld->call_combiner_);
|
||||
call_attempt->Unref(DEBUG_LOCATION, "OnPerAttemptRecvTimer");
|
||||
|
@ -676,16 +680,16 @@ void RetryFilter::LegacyCallData::CallAttempt::OnPerAttemptRecvTimerLocked(
|
|||
|
||||
void RetryFilter::LegacyCallData::CallAttempt::
|
||||
MaybeCancelPerAttemptRecvTimer() {
|
||||
if (per_attempt_recv_timer_handle_.has_value()) {
|
||||
if (per_attempt_recv_timer_handle_ != TaskHandle::kInvalid) {
|
||||
GRPC_TRACE_LOG(retry, INFO)
|
||||
<< "chand=" << calld_->chand_ << " calld=" << calld_
|
||||
<< " attempt=" << this << ": cancelling perAttemptRecvTimeout timer";
|
||||
if (calld_->chand_->event_engine()->Cancel(
|
||||
*per_attempt_recv_timer_handle_)) {
|
||||
per_attempt_recv_timer_handle_)) {
|
||||
Unref(DEBUG_LOCATION, "OnPerAttemptRecvTimer");
|
||||
GRPC_CALL_STACK_UNREF(calld_->owning_call_, "OnPerAttemptRecvTimer");
|
||||
}
|
||||
per_attempt_recv_timer_handle_.reset();
|
||||
per_attempt_recv_timer_handle_ = TaskHandle::kInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1481,7 +1485,6 @@ RetryFilter::LegacyCallData::LegacyCallData(RetryFilter* chand,
|
|||
.set_max_backoff(retry_policy_ == nullptr
|
||||
? Duration::Zero()
|
||||
: retry_policy_->max_backoff())),
|
||||
path_(CSliceRef(args.path)),
|
||||
deadline_(args.deadline),
|
||||
arena_(args.arena),
|
||||
owning_call_(args.call_stack),
|
||||
|
@ -1497,7 +1500,6 @@ RetryFilter::LegacyCallData::LegacyCallData(RetryFilter* chand,
|
|||
|
||||
RetryFilter::LegacyCallData::~LegacyCallData() {
|
||||
FreeAllCachedSendOpData();
|
||||
CSliceUnref(path_);
|
||||
// Make sure there are no remaining pending batches.
|
||||
for (size_t i = 0; i < GPR_ARRAY_SIZE(pending_batches_); ++i) {
|
||||
CHECK_EQ(pending_batches_[i].batch, nullptr);
|
||||
|
@ -1550,13 +1552,13 @@ void RetryFilter::LegacyCallData::StartTransportStreamOpBatch(
|
|||
return;
|
||||
}
|
||||
// Cancel retry timer if needed.
|
||||
if (retry_timer_handle_.has_value()) {
|
||||
if (retry_timer_handle_ != TaskHandle::kInvalid) {
|
||||
GRPC_TRACE_LOG(retry, INFO) << "chand=" << chand_ << " calld=" << this
|
||||
<< ": cancelling retry timer";
|
||||
if (chand_->event_engine()->Cancel(*retry_timer_handle_)) {
|
||||
if (chand_->event_engine()->Cancel(retry_timer_handle_)) {
|
||||
GRPC_CALL_STACK_UNREF(owning_call_, "OnRetryTimer");
|
||||
}
|
||||
retry_timer_handle_.reset();
|
||||
retry_timer_handle_ = TaskHandle::kInvalid;
|
||||
FreeAllCachedSendOpData();
|
||||
}
|
||||
// We have no call attempt, so there's nowhere to send the cancellation
|
||||
|
@ -1570,7 +1572,7 @@ void RetryFilter::LegacyCallData::StartTransportStreamOpBatch(
|
|||
PendingBatch* pending = PendingBatchesAdd(batch);
|
||||
// If the timer is pending, yield the call combiner and wait for it to
|
||||
// run, since we don't want to start another call attempt until it does.
|
||||
if (retry_timer_handle_.has_value()) {
|
||||
if (retry_timer_handle_ != TaskHandle::kInvalid) {
|
||||
GRPC_CALL_COMBINER_STOP(call_combiner_,
|
||||
"added pending batch while retry timer pending");
|
||||
return;
|
||||
|
@ -1627,9 +1629,9 @@ void RetryFilter::LegacyCallData::StartTransportStreamOpBatch(
|
|||
OrphanablePtr<ClientChannelFilter::FilterBasedLoadBalancedCall>
|
||||
RetryFilter::LegacyCallData::CreateLoadBalancedCall(
|
||||
absl::AnyInvocable<void()> on_commit, bool is_transparent_retry) {
|
||||
grpc_call_element_args args = {owning_call_, nullptr, path_,
|
||||
/*start_time=*/0, deadline_, arena_,
|
||||
call_combiner_};
|
||||
grpc_call_element_args args = {owning_call_, nullptr,
|
||||
/*start_time=*/0, deadline_,
|
||||
arena_, call_combiner_};
|
||||
return chand_->client_channel()->CreateLoadBalancedCall(
|
||||
args, pollent_,
|
||||
// This callback holds a ref to the CallStackDestructionBarrier
|
||||
|
@ -1912,8 +1914,8 @@ void RetryFilter::LegacyCallData::OnRetryTimer() {
|
|||
void RetryFilter::LegacyCallData::OnRetryTimerLocked(
|
||||
void* arg, grpc_error_handle /*error*/) {
|
||||
auto* calld = static_cast<RetryFilter::LegacyCallData*>(arg);
|
||||
if (calld->retry_timer_handle_.has_value()) {
|
||||
calld->retry_timer_handle_.reset();
|
||||
if (calld->retry_timer_handle_ != TaskHandle::kInvalid) {
|
||||
calld->retry_timer_handle_ = TaskHandle::kInvalid;
|
||||
calld->CreateCallAttempt(/*is_transparent_retry=*/false);
|
||||
}
|
||||
GRPC_CALL_STACK_UNREF(calld->owning_call_, "OnRetryTimer");
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
#include "absl/container/inlined_vector.h"
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/client_channel/client_channel_filter.h"
|
||||
#include "src/core/client_channel/retry_filter.h"
|
||||
#include "src/core/client_channel/retry_service_config.h"
|
||||
|
@ -39,7 +40,6 @@
|
|||
#include "src/core/lib/iomgr/polling_entity.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/util/backoff.h"
|
||||
#include "src/core/util/debug_location.h"
|
||||
|
@ -256,8 +256,9 @@ class RetryFilter::LegacyCallData final {
|
|||
bool lb_call_committed_ = false;
|
||||
|
||||
grpc_closure on_per_attempt_recv_timer_;
|
||||
std::optional<grpc_event_engine::experimental::EventEngine::TaskHandle>
|
||||
per_attempt_recv_timer_handle_;
|
||||
grpc_event_engine::experimental::EventEngine::TaskHandle
|
||||
per_attempt_recv_timer_handle_ =
|
||||
grpc_event_engine::experimental::EventEngine::TaskHandle::kInvalid;
|
||||
|
||||
// BatchData.batch.payload points to this.
|
||||
grpc_transport_stream_op_batch_payload batch_payload_;
|
||||
|
@ -373,7 +374,6 @@ class RetryFilter::LegacyCallData final {
|
|||
const internal::RetryMethodConfig* retry_policy_ = nullptr;
|
||||
BackOff retry_backoff_;
|
||||
|
||||
grpc_slice path_; // Request path.
|
||||
Timestamp deadline_;
|
||||
Arena* arena_;
|
||||
grpc_call_stack* owning_call_;
|
||||
|
@ -410,8 +410,8 @@ class RetryFilter::LegacyCallData final {
|
|||
bool retry_codepath_started_ : 1;
|
||||
bool sent_transparent_retry_not_seen_by_server_ : 1;
|
||||
int num_attempts_completed_ = 0;
|
||||
std::optional<grpc_event_engine::experimental::EventEngine::TaskHandle>
|
||||
retry_timer_handle_;
|
||||
grpc_event_engine::experimental::EventEngine::TaskHandle retry_timer_handle_ =
|
||||
grpc_event_engine::experimental::EventEngine::TaskHandle::kInvalid;
|
||||
grpc_closure retry_closure_;
|
||||
|
||||
// Cached data for retrying send ops.
|
||||
|
|
|
@ -15,12 +15,12 @@
|
|||
#ifndef GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_INTERCEPTOR_H
|
||||
#define GRPC_SRC_CORE_CLIENT_CHANNEL_RETRY_INTERCEPTOR_H
|
||||
|
||||
#include "src/core/call/interception_chain.h"
|
||||
#include "src/core/call/request_buffer.h"
|
||||
#include "src/core/client_channel/client_channel_args.h"
|
||||
#include "src/core/client_channel/retry_service_config.h"
|
||||
#include "src/core/client_channel/retry_throttle.h"
|
||||
#include "src/core/filter/filter_args.h"
|
||||
#include "src/core/lib/transport/interception_chain.h"
|
||||
#include "src/core/util/backoff.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
#include "absl/log/log.h"
|
||||
#include "absl/strings/numbers.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/util/json/json_channel_args.h"
|
||||
|
||||
// As per the retry design, we do not allow more than 5 retry attempts.
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include <optional>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/service_config/service_config_parser.h"
|
||||
#include "src/core/util/json/json.h"
|
||||
#include "src/core/util/json/json_args.h"
|
||||
|
|
|
@ -49,32 +49,12 @@ T ClampedAdd(std::atomic<T>& value, T delta, T min, T max) {
|
|||
// ServerRetryThrottleData
|
||||
//
|
||||
|
||||
ServerRetryThrottleData::ServerRetryThrottleData(
|
||||
uintptr_t max_milli_tokens, uintptr_t milli_token_ratio,
|
||||
ServerRetryThrottleData* old_throttle_data)
|
||||
ServerRetryThrottleData::ServerRetryThrottleData(uintptr_t max_milli_tokens,
|
||||
uintptr_t milli_token_ratio,
|
||||
uintptr_t milli_tokens)
|
||||
: max_milli_tokens_(max_milli_tokens),
|
||||
milli_token_ratio_(milli_token_ratio) {
|
||||
uintptr_t initial_milli_tokens = max_milli_tokens;
|
||||
// If there was a pre-existing entry for this server name, initialize
|
||||
// the token count by scaling proportionately to the old data. This
|
||||
// ensures that if we're already throttling retries on the old scale,
|
||||
// we will start out doing the same thing on the new one.
|
||||
if (old_throttle_data != nullptr) {
|
||||
double token_fraction =
|
||||
static_cast<double>(
|
||||
old_throttle_data->milli_tokens_.load(std::memory_order_relaxed)) /
|
||||
static_cast<double>(old_throttle_data->max_milli_tokens_);
|
||||
initial_milli_tokens =
|
||||
static_cast<uintptr_t>(token_fraction * max_milli_tokens);
|
||||
}
|
||||
milli_tokens_.store(initial_milli_tokens, std::memory_order_relaxed);
|
||||
// If there was a pre-existing entry, mark it as stale and give it a
|
||||
// pointer to the new entry, which is its replacement.
|
||||
if (old_throttle_data != nullptr) {
|
||||
Ref().release(); // Ref held by pre-existing entry.
|
||||
old_throttle_data->replacement_.store(this, std::memory_order_release);
|
||||
}
|
||||
}
|
||||
milli_token_ratio_(milli_token_ratio),
|
||||
milli_tokens_(milli_tokens) {}
|
||||
|
||||
ServerRetryThrottleData::~ServerRetryThrottleData() {
|
||||
ServerRetryThrottleData* replacement =
|
||||
|
@ -84,6 +64,11 @@ ServerRetryThrottleData::~ServerRetryThrottleData() {
|
|||
}
|
||||
}
|
||||
|
||||
void ServerRetryThrottleData::SetReplacement(
|
||||
RefCountedPtr<ServerRetryThrottleData> replacement) {
|
||||
replacement_.store(replacement.release(), std::memory_order_release);
|
||||
}
|
||||
|
||||
void ServerRetryThrottleData::GetReplacementThrottleDataIfNeeded(
|
||||
ServerRetryThrottleData** throttle_data) {
|
||||
while (true) {
|
||||
|
@ -133,20 +118,31 @@ RefCountedPtr<ServerRetryThrottleData> ServerRetryThrottleMap::GetDataForServer(
|
|||
const std::string& server_name, uintptr_t max_milli_tokens,
|
||||
uintptr_t milli_token_ratio) {
|
||||
MutexLock lock(&mu_);
|
||||
auto it = map_.find(server_name);
|
||||
ServerRetryThrottleData* throttle_data =
|
||||
it == map_.end() ? nullptr : it->second.get();
|
||||
auto& throttle_data = map_[server_name];
|
||||
if (throttle_data == nullptr ||
|
||||
throttle_data->max_milli_tokens() != max_milli_tokens ||
|
||||
throttle_data->milli_token_ratio() != milli_token_ratio) {
|
||||
// Entry not found, or found with old parameters. Create a new one.
|
||||
it = map_.emplace(server_name,
|
||||
MakeRefCounted<ServerRetryThrottleData>(
|
||||
max_milli_tokens, milli_token_ratio, throttle_data))
|
||||
.first;
|
||||
throttle_data = it->second.get();
|
||||
auto old_throttle_data = std::move(throttle_data);
|
||||
uintptr_t initial_milli_tokens = max_milli_tokens;
|
||||
// If there was a pre-existing entry for this server name, initialize
|
||||
// the token count by scaling proportionately to the old data. This
|
||||
// ensures that if we're already throttling retries on the old scale,
|
||||
// we will start out doing the same thing on the new one.
|
||||
if (old_throttle_data != nullptr) {
|
||||
double token_fraction =
|
||||
static_cast<double>(old_throttle_data->milli_tokens()) /
|
||||
static_cast<double>(old_throttle_data->max_milli_tokens());
|
||||
initial_milli_tokens =
|
||||
static_cast<uintptr_t>(token_fraction * max_milli_tokens);
|
||||
}
|
||||
throttle_data = MakeRefCounted<ServerRetryThrottleData>(
|
||||
max_milli_tokens, milli_token_ratio, initial_milli_tokens);
|
||||
if (old_throttle_data != nullptr) {
|
||||
old_throttle_data->SetReplacement(throttle_data);
|
||||
}
|
||||
}
|
||||
return throttle_data->Ref();
|
||||
return throttle_data;
|
||||
}
|
||||
|
||||
} // namespace internal
|
||||
|
|
|
@ -34,13 +34,14 @@
|
|||
namespace grpc_core {
|
||||
namespace internal {
|
||||
|
||||
class ServerRetryThrottleMap;
|
||||
|
||||
/// Tracks retry throttling data for an individual server name.
|
||||
class ServerRetryThrottleData final
|
||||
: public RefCounted<ServerRetryThrottleData> {
|
||||
public:
|
||||
ServerRetryThrottleData(uintptr_t max_milli_tokens,
|
||||
uintptr_t milli_token_ratio,
|
||||
ServerRetryThrottleData* old_throttle_data);
|
||||
uintptr_t milli_token_ratio, uintptr_t milli_tokens);
|
||||
~ServerRetryThrottleData() override;
|
||||
|
||||
/// Records a failure. Returns true if it's okay to send a retry.
|
||||
|
@ -51,8 +52,15 @@ class ServerRetryThrottleData final
|
|||
|
||||
uintptr_t max_milli_tokens() const { return max_milli_tokens_; }
|
||||
uintptr_t milli_token_ratio() const { return milli_token_ratio_; }
|
||||
intptr_t milli_tokens() const {
|
||||
return milli_tokens_.load(std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
private:
|
||||
friend ServerRetryThrottleMap;
|
||||
|
||||
void SetReplacement(RefCountedPtr<ServerRetryThrottleData> replacement);
|
||||
|
||||
void GetReplacementThrottleDataIfNeeded(
|
||||
ServerRetryThrottleData** throttle_data);
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "absl/strings/cord.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/interception_chain.h"
|
||||
#include "src/core/channelz/channel_trace.h"
|
||||
#include "src/core/channelz/channelz.h"
|
||||
#include "src/core/client_channel/client_channel_internal.h"
|
||||
|
@ -57,7 +58,6 @@
|
|||
#include "src/core/lib/surface/init_internally.h"
|
||||
#include "src/core/lib/transport/connectivity_state.h"
|
||||
#include "src/core/lib/transport/error_utils.h"
|
||||
#include "src/core/lib/transport/interception_chain.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/telemetry/stats.h"
|
||||
#include "src/core/telemetry/stats_data.h"
|
||||
|
@ -244,13 +244,12 @@ SubchannelCall::SubchannelCall(Args args, grpc_error_handle* error)
|
|||
deadline_(args.deadline) {
|
||||
grpc_call_stack* callstk = SUBCHANNEL_CALL_TO_CALL_STACK(this);
|
||||
const grpc_call_element_args call_args = {
|
||||
callstk, // call_stack
|
||||
nullptr, // server_transport_data
|
||||
args.path.c_slice(), // path
|
||||
args.start_time, // start_time
|
||||
args.deadline, // deadline
|
||||
args.arena, // arena
|
||||
args.call_combiner // call_combiner
|
||||
callstk, // call_stack
|
||||
nullptr, // server_transport_data
|
||||
args.start_time, // start_time
|
||||
args.deadline, // deadline
|
||||
args.arena, // arena
|
||||
args.call_combiner // call_combiner
|
||||
};
|
||||
*error = grpc_call_stack_init(connected_subchannel_->channel_stack(), 1,
|
||||
SubchannelCall::Destroy, this, &call_args);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "absl/base/thread_annotations.h"
|
||||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/client_channel/connector.h"
|
||||
#include "src/core/client_channel/subchannel_pool_interface.h"
|
||||
#include "src/core/lib/address_utils/sockaddr_utils.h"
|
||||
|
@ -44,7 +45,6 @@
|
|||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/connectivity_state.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/util/backoff.h"
|
||||
#include "src/core/util/debug_location.h"
|
||||
|
@ -95,7 +95,6 @@ class SubchannelCall final {
|
|||
struct Args {
|
||||
RefCountedPtr<ConnectedSubchannel> connected_subchannel;
|
||||
grpc_polling_entity* pollent;
|
||||
Slice path;
|
||||
gpr_cycle_counter start_time;
|
||||
Timestamp deadline;
|
||||
Arena* arena;
|
||||
|
|
|
@ -130,7 +130,7 @@ void SubchannelStreamClient::StartRetryTimerLocked() {
|
|||
const Duration timeout = retry_backoff_.NextAttemptDelay();
|
||||
if (GPR_UNLIKELY(tracer_ != nullptr)) {
|
||||
LOG(INFO) << tracer_ << " " << this
|
||||
<< ": SubchannelStreamClient health check call lost...";
|
||||
<< ": SubchannelStreamClient call lost...";
|
||||
if (timeout > Duration::Zero()) {
|
||||
LOG(INFO) << tracer_ << " " << this << ": ... will retry in "
|
||||
<< timeout.millis() << "ms.";
|
||||
|
@ -139,10 +139,10 @@ void SubchannelStreamClient::StartRetryTimerLocked() {
|
|||
}
|
||||
}
|
||||
retry_timer_handle_ = event_engine_->RunAfter(
|
||||
timeout, [self = Ref(DEBUG_LOCATION, "health_retry_timer")]() mutable {
|
||||
timeout, [self = Ref(DEBUG_LOCATION, "retry_timer")]() mutable {
|
||||
ExecCtx exec_ctx;
|
||||
self->OnRetryTimer();
|
||||
self.reset(DEBUG_LOCATION, "health_retry_timer");
|
||||
self.reset(DEBUG_LOCATION, "retry_timer");
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -152,7 +152,7 @@ void SubchannelStreamClient::OnRetryTimer() {
|
|||
call_state_ == nullptr) {
|
||||
if (GPR_UNLIKELY(tracer_ != nullptr)) {
|
||||
LOG(INFO) << tracer_ << " " << this
|
||||
<< ": SubchannelStreamClient restarting health check call";
|
||||
<< ": SubchannelStreamClient restarting call";
|
||||
}
|
||||
StartCallLocked();
|
||||
}
|
||||
|
@ -164,9 +164,9 @@ void SubchannelStreamClient::OnRetryTimer() {
|
|||
//
|
||||
|
||||
SubchannelStreamClient::CallState::CallState(
|
||||
RefCountedPtr<SubchannelStreamClient> health_check_client,
|
||||
RefCountedPtr<SubchannelStreamClient> subchannel_stream_client,
|
||||
grpc_pollset_set* interested_parties)
|
||||
: subchannel_stream_client_(std::move(health_check_client)),
|
||||
: subchannel_stream_client_(std::move(subchannel_stream_client)),
|
||||
pollent_(grpc_polling_entity_create_from_pollset_set(interested_parties)),
|
||||
arena_(subchannel_stream_client_->call_allocator_->MakeArena()) {}
|
||||
|
||||
|
@ -192,7 +192,6 @@ void SubchannelStreamClient::CallState::StartCallLocked() {
|
|||
SubchannelCall::Args args = {
|
||||
subchannel_stream_client_->connected_subchannel_,
|
||||
&pollent_,
|
||||
Slice::FromStaticString("/grpc.health.v1.Health/Watch"),
|
||||
gpr_get_cycle_counter(), // start_time
|
||||
Timestamp::InfFuture(), // deadline
|
||||
arena_.get(),
|
||||
|
@ -299,7 +298,7 @@ void SubchannelStreamClient::CallState::AfterCallStackDestruction(
|
|||
void SubchannelStreamClient::CallState::OnCancelComplete(
|
||||
void* arg, grpc_error_handle /*error*/) {
|
||||
auto* self = static_cast<SubchannelStreamClient::CallState*>(arg);
|
||||
GRPC_CALL_COMBINER_STOP(&self->call_combiner_, "health_cancel");
|
||||
GRPC_CALL_COMBINER_STOP(&self->call_combiner_, "cancel_batch");
|
||||
self->call_->Unref(DEBUG_LOCATION, "cancel");
|
||||
}
|
||||
|
||||
|
@ -322,7 +321,7 @@ void SubchannelStreamClient::CallState::Cancel() {
|
|||
GRPC_CALL_COMBINER_START(
|
||||
&call_combiner_,
|
||||
GRPC_CLOSURE_CREATE(StartCancel, this, grpc_schedule_on_exec_ctx),
|
||||
absl::OkStatus(), "health_cancel");
|
||||
absl::OkStatus(), "cancel_batch");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,18 +405,22 @@ void SubchannelStreamClient::CallState::RecvTrailingMetadataReady(
|
|||
LOG(INFO) << self->subchannel_stream_client_->tracer_ << " "
|
||||
<< self->subchannel_stream_client_.get()
|
||||
<< ": SubchannelStreamClient CallState " << self
|
||||
<< ": health watch failed with status " << status;
|
||||
<< ": call failed with status " << status;
|
||||
}
|
||||
// Clean up.
|
||||
self->recv_trailing_metadata_.Clear();
|
||||
// Report call end.
|
||||
// Note: We hold a ref to the SubchannelStreamClient here to ensure
|
||||
// that it lives long enough for us to release the mutex, since the
|
||||
// call to CallEndedLocked() may release the last ref.
|
||||
auto subchannel_stream_client = self->subchannel_stream_client_->Ref();
|
||||
MutexLock lock(&self->subchannel_stream_client_->mu_);
|
||||
if (self->subchannel_stream_client_->event_handler_ != nullptr) {
|
||||
self->subchannel_stream_client_->event_handler_
|
||||
->RecvTrailingMetadataReadyLocked(self->subchannel_stream_client_.get(),
|
||||
status);
|
||||
}
|
||||
// For status UNIMPLEMENTED, give up and assume always healthy.
|
||||
// For status UNIMPLEMENTED, give up.
|
||||
self->CallEndedLocked(/*retry=*/status != GRPC_STATUS_UNIMPLEMENTED);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "absl/base/thread_annotations.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/client_channel/subchannel.h"
|
||||
#include "src/core/lib/iomgr/call_combiner.h"
|
||||
#include "src/core/lib/iomgr/closure.h"
|
||||
|
@ -40,7 +41,6 @@
|
|||
#include "src/core/lib/resource_quota/memory_quota.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/util/backoff.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
|
@ -202,7 +202,7 @@ class SubchannelStreamClient final
|
|||
Mutex mu_;
|
||||
std::unique_ptr<CallEventHandler> event_handler_ ABSL_GUARDED_BY(mu_);
|
||||
|
||||
// The data associated with the current health check call. It holds a ref
|
||||
// The data associated with the current call. It holds a ref
|
||||
// to this SubchannelStreamClient object.
|
||||
OrphanablePtr<CallState> call_state_ ABSL_GUARDED_BY(mu_);
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#include "absl/log/log.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/credentials/transport/security_connector.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/transport/auth_context.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include "absl/log/check.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
||||
grpc_core::ArenaPromise<absl::StatusOr<grpc_core::ClientMetadataHandle>>
|
||||
|
|
|
@ -25,9 +25,9 @@
|
|||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_split.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/credentials/transport/transport_credentials.h"
|
||||
#include "src/core/lib/iomgr/error.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/lib/transport/status_conversion.h"
|
||||
#include "src/core/util/json/json.h"
|
||||
#include "src/core/util/json/json_args.h"
|
||||
|
|
|
@ -23,12 +23,12 @@
|
|||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/credentials/call/call_credentials.h"
|
||||
#include "src/core/credentials/call/token_fetcher/token_fetcher_credentials.h"
|
||||
#include "src/core/lib/iomgr/closure.h"
|
||||
#include "src/core/lib/iomgr/polling_entity.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/util/http_client/httpcli.h"
|
||||
#include "src/core/util/http_client/parser.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
#include "absl/log/check.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/iomgr/exec_ctx.h"
|
||||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
||||
grpc_core::ArenaPromise<absl::StatusOr<grpc_core::ClientMetadataHandle>>
|
||||
|
|
|
@ -34,11 +34,11 @@
|
|||
#include "absl/log/log.h"
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/credentials/call/call_creds_util.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/iomgr/exec_ctx.h"
|
||||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/json/json.h"
|
||||
#include "src/core/util/json/json_reader.h"
|
||||
#include "src/core/util/json/json_writer.h"
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
#include "absl/strings/str_format.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/credentials/call/json_util.h"
|
||||
#include "src/core/credentials/transport/transport_credentials.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
|
@ -52,7 +53,6 @@
|
|||
#include "src/core/lib/promise/poll.h"
|
||||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/transport/error_utils.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/http_client/httpcli_ssl_credentials.h"
|
||||
#include "src/core/util/json/json.h"
|
||||
#include "src/core/util/json/json_reader.h"
|
||||
|
|
|
@ -29,13 +29,13 @@
|
|||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/iomgr/error.h"
|
||||
#include "src/core/lib/iomgr/exec_ctx.h"
|
||||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/slice/slice_internal.h"
|
||||
#include "src/core/lib/surface/validate_metadata.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
|
||||
grpc_plugin_credentials::~grpc_plugin_credentials() {
|
||||
if (plugin_.state != nullptr && plugin_.destroy != nullptr) {
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
#include "absl/container/flat_hash_set.h"
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "src/core/call/metadata.h"
|
||||
#include "src/core/credentials/call/call_credentials.h"
|
||||
#include "src/core/lib/iomgr/polling_entity.h"
|
||||
#include "src/core/lib/promise/arena_promise.h"
|
||||
#include "src/core/lib/transport/metadata.h"
|
||||
#include "src/core/util/backoff.h"
|
||||
#include "src/core/util/http_client/httpcli.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
|
|
|
@ -41,7 +41,7 @@ class ChannelCredsConfig : public RefCounted<ChannelCredsConfig> {
|
|||
|
||||
virtual bool Equals(const ChannelCredsConfig& other) const = 0;
|
||||
|
||||
virtual Json ToJson() const = 0;
|
||||
virtual std::string ToString() const = 0;
|
||||
};
|
||||
|
||||
template <typename T = grpc_channel_credentials>
|
||||
|
|
|
@ -65,7 +65,7 @@ class GoogleDefaultChannelCredsFactory : public ChannelCredsFactory<> {
|
|||
public:
|
||||
absl::string_view type() const override { return Type(); }
|
||||
bool Equals(const ChannelCredsConfig&) const override { return true; }
|
||||
Json ToJson() const override { return Json::FromObject({}); }
|
||||
std::string ToString() const override { return "{}"; }
|
||||
};
|
||||
|
||||
static absl::string_view Type() { return "google_default"; }
|
||||
|
@ -116,22 +116,26 @@ class TlsChannelCredsFactory : public ChannelCredsFactory<> {
|
|||
refresh_interval_ == o.refresh_interval_;
|
||||
}
|
||||
|
||||
Json ToJson() const override {
|
||||
std::string ToString() const override {
|
||||
std::vector<std::string> parts;
|
||||
Json::Object obj;
|
||||
parts.push_back("{");
|
||||
if (!certificate_file_.empty()) {
|
||||
obj["certificate_file"] = Json::FromString(certificate_file_);
|
||||
parts.push_back(absl::StrCat("certificate_file=", certificate_file_));
|
||||
}
|
||||
if (!private_key_file_.empty()) {
|
||||
obj["private_key_file"] = Json::FromString(private_key_file_);
|
||||
parts.push_back(absl::StrCat("private_key_file=", private_key_file_));
|
||||
}
|
||||
if (!ca_certificate_file_.empty()) {
|
||||
obj["ca_certificate_file"] = Json::FromString(ca_certificate_file_);
|
||||
parts.push_back(
|
||||
absl::StrCat("ca_certificate_file=", ca_certificate_file_));
|
||||
}
|
||||
if (refresh_interval_ != kDefaultRefreshInterval) {
|
||||
obj["refresh_interval"] =
|
||||
Json::FromString(refresh_interval_.ToJsonString());
|
||||
parts.push_back(
|
||||
absl::StrCat("refresh_interval=", refresh_interval_.ToString()));
|
||||
}
|
||||
return Json::FromObject(std::move(obj));
|
||||
parts.push_back("}");
|
||||
return absl::StrJoin(parts, ",");
|
||||
}
|
||||
|
||||
const std::string& certificate_file() const { return certificate_file_; }
|
||||
|
@ -196,7 +200,7 @@ class InsecureChannelCredsFactory : public ChannelCredsFactory<> {
|
|||
public:
|
||||
absl::string_view type() const override { return Type(); }
|
||||
bool Equals(const ChannelCredsConfig&) const override { return true; }
|
||||
Json ToJson() const override { return Json::FromObject({}); }
|
||||
std::string ToString() const override { return "{}"; }
|
||||
};
|
||||
|
||||
static absl::string_view Type() { return "insecure"; }
|
||||
|
@ -221,7 +225,7 @@ class FakeChannelCredsFactory : public ChannelCredsFactory<> {
|
|||
public:
|
||||
absl::string_view type() const override { return Type(); }
|
||||
bool Equals(const ChannelCredsConfig&) const override { return true; }
|
||||
Json ToJson() const override { return Json::FromObject({}); }
|
||||
std::string ToString() const override { return "{}"; }
|
||||
};
|
||||
|
||||
static absl::string_view Type() { return "fake"; }
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
#include "absl/log/check.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_join.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/credentials/call/composite/composite_call_credentials.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
||||
grpc_core::UniqueTypeName grpc_composite_channel_credentials::Type() {
|
||||
|
|
|
@ -25,11 +25,11 @@
|
|||
#include <utility>
|
||||
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/credentials/transport/fake/fake_security_connector.h"
|
||||
#include "src/core/credentials/transport/security_connector.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
|
||||
// -- Fake transport security credentials. --
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#include "src/core/credentials/transport/transport_credentials.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/event_engine/shim.h"
|
||||
#include "src/core/lib/iomgr/closure.h"
|
||||
#include "src/core/lib/iomgr/error.h"
|
||||
#include "src/core/lib/iomgr/exec_ctx.h"
|
||||
|
@ -63,6 +64,7 @@
|
|||
#include "src/core/util/json/json.h"
|
||||
#include "src/core/util/json/json_reader.h"
|
||||
#include "src/core/util/load_file.h"
|
||||
#include "src/core/util/notification.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
#include "src/core/util/ref_counted_ptr.h"
|
||||
#include "src/core/util/status_helper.h"
|
||||
|
@ -102,6 +104,7 @@ struct metadata_server_detector {
|
|||
int is_done;
|
||||
int success;
|
||||
grpc_http_response response;
|
||||
grpc_core::Notification done;
|
||||
};
|
||||
|
||||
namespace {
|
||||
|
@ -183,6 +186,10 @@ static void on_metadata_server_detection_http_response(
|
|||
}
|
||||
}
|
||||
}
|
||||
if (grpc_event_engine::experimental::UsePollsetAlternative()) {
|
||||
detector->done.Notify();
|
||||
return;
|
||||
}
|
||||
gpr_mu_lock(g_polling_mu);
|
||||
detector->is_done = 1;
|
||||
GRPC_LOG_IF_ERROR(
|
||||
|
@ -224,20 +231,25 @@ static int is_metadata_server_reachable() {
|
|||
grpc_insecure_credentials_create()));
|
||||
http_request->Start();
|
||||
grpc_core::ExecCtx::Get()->Flush();
|
||||
// Block until we get the response. This is not ideal but this should only be
|
||||
// called once for the lifetime of the process by the default credentials.
|
||||
gpr_mu_lock(g_polling_mu);
|
||||
while (!detector.is_done) {
|
||||
grpc_pollset_worker* worker = nullptr;
|
||||
if (!GRPC_LOG_IF_ERROR(
|
||||
"pollset_work",
|
||||
grpc_pollset_work(grpc_polling_entity_pollset(&detector.pollent),
|
||||
&worker, grpc_core::Timestamp::InfFuture()))) {
|
||||
detector.is_done = 1;
|
||||
detector.success = 0;
|
||||
if (grpc_event_engine::experimental::UsePollsetAlternative()) {
|
||||
detector.done.WaitForNotification();
|
||||
} else {
|
||||
// Block until we get the response. This is not ideal but this should only
|
||||
// be called once for the lifetime of the process by the default
|
||||
// credentials.
|
||||
gpr_mu_lock(g_polling_mu);
|
||||
while (!detector.is_done) {
|
||||
grpc_pollset_worker* worker = nullptr;
|
||||
if (!GRPC_LOG_IF_ERROR(
|
||||
"pollset_work",
|
||||
grpc_pollset_work(grpc_polling_entity_pollset(&detector.pollent),
|
||||
&worker, grpc_core::Timestamp::InfFuture()))) {
|
||||
detector.is_done = 1;
|
||||
detector.success = 0;
|
||||
}
|
||||
}
|
||||
gpr_mu_unlock(g_polling_mu);
|
||||
}
|
||||
gpr_mu_unlock(g_polling_mu);
|
||||
http_request.reset();
|
||||
GRPC_CLOSURE_INIT(&destroy_closure, destroy_pollset,
|
||||
grpc_polling_entity_pollset(&detector.pollent),
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "absl/log/log.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
#include "src/core/lib/channel/promise_based_filter.h"
|
||||
|
@ -35,7 +36,6 @@
|
|||
#include "src/core/lib/promise/map.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/surface/channel_stack_type.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/load_balancing/backend_metric_data.h"
|
||||
#include "src/core/util/latent_see.h"
|
||||
#include "upb/base/string_view.h"
|
||||
|
|
|
@ -28,7 +28,9 @@
|
|||
#include "absl/meta/type_traits.h"
|
||||
#include "absl/random/random.h"
|
||||
#include "absl/status/statusor.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/ext/transport/chttp2/transport/http2_status.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/promise_based_filter.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
|
@ -44,8 +46,6 @@
|
|||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/surface/channel_stack_type.h"
|
||||
#include "src/core/lib/transport/http2_errors.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/debug_location.h"
|
||||
#include "src/core/util/no_destruct.h"
|
||||
#include "src/core/util/orphanable.h"
|
||||
|
@ -55,12 +55,14 @@
|
|||
|
||||
namespace grpc_core {
|
||||
|
||||
namespace {
|
||||
using http2::Http2ErrorCode;
|
||||
|
||||
namespace {
|
||||
constexpr Duration kDefaultIdleTimeout = Duration::Minutes(30);
|
||||
|
||||
// If these settings change, make sure that we are not sending a GOAWAY for
|
||||
// inproc transport, since a GOAWAY to inproc ends up destroying the transport.
|
||||
// inproc transport, since a GOAWAY to inproc ends up destroying the
|
||||
// transport.
|
||||
const auto kDefaultMaxConnectionAge = Duration::Infinity();
|
||||
const auto kDefaultMaxConnectionAgeGrace = Duration::Infinity();
|
||||
const auto kDefaultMaxConnectionIdle = Duration::Infinity();
|
||||
|
@ -184,7 +186,8 @@ void LegacyMaxAgeFilter::PostInit() {
|
|||
grpc_transport_op* op = grpc_make_transport_op(nullptr);
|
||||
op->goaway_error = grpc_error_set_int(
|
||||
GRPC_ERROR_CREATE("max_age"),
|
||||
StatusIntProperty::kHttp2Error, GRPC_HTTP2_NO_ERROR);
|
||||
StatusIntProperty::kHttp2Error,
|
||||
static_cast<intptr_t>(Http2ErrorCode::kNoError));
|
||||
grpc_channel_element* elem =
|
||||
grpc_channel_stack_element(channel_stack, 0);
|
||||
elem->filter->start_transport_op(elem, op);
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
#include "absl/strings/numbers.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
#include "src/core/lib/promise/context.h"
|
||||
#include "src/core/lib/promise/sleep.h"
|
||||
#include "src/core/lib/promise/try_seq.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/service_config/service_config_call_data.h"
|
||||
#include "src/core/util/time.h"
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
#include <optional>
|
||||
#include <vector>
|
||||
|
||||
#include "src/core/call/status_util.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/status_util.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
#include <grpc/support/port_platform.h>
|
||||
|
||||
#include "absl/status/statusor.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/channel_fwd.h"
|
||||
#include "src/core/lib/channel/promise_based_filter.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
|
||||
#include "absl/status/status.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/filter/auth/auth_filters.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
#include "src/core/lib/surface/channel_stack_type.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/latent_see.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "absl/status/status.h"
|
||||
#include "absl/strings/str_cat.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/ext/filters/message_size/message_size_filter.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
|
@ -45,7 +46,6 @@
|
|||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/surface/call.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/telemetry/call_tracer.h"
|
||||
#include "src/core/util/latent_see.h"
|
||||
|
|
|
@ -28,12 +28,12 @@
|
|||
|
||||
#include "absl/status/statusor.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/channel_fwd.h"
|
||||
#include "src/core/lib/channel/promise_based_filter.h"
|
||||
#include "src/core/lib/compression/compression_internal.h"
|
||||
#include "src/core/lib/promise/arena_promise.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "absl/base/attributes.h"
|
||||
#include "absl/log/log.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
#include "src/core/lib/debug/trace.h"
|
||||
|
@ -42,7 +43,6 @@
|
|||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/percent_encoding.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/util/latent_see.h"
|
||||
|
||||
namespace grpc_core {
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "absl/log/log.h"
|
||||
#include "absl/strings/str_format.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
|
@ -38,7 +39,6 @@
|
|||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/slice/slice_buffer.h"
|
||||
#include "src/core/lib/surface/channel_stack_type.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/service_config/service_config_call_data.h"
|
||||
#include "src/core/util/latent_see.h"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <utility>
|
||||
|
||||
#include "absl/status/status.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/ext/filters/rbac/rbac_service_config_parser.h"
|
||||
#include "src/core/lib/channel/channel_args.h"
|
||||
|
@ -33,7 +34,6 @@
|
|||
#include "src/core/lib/promise/promise.h"
|
||||
#include "src/core/lib/security/authorization/authorization_engine.h"
|
||||
#include "src/core/lib/security/authorization/grpc_authorization_engine.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/service_config/service_config_call_data.h"
|
||||
#include "src/core/transport/auth_context.h"
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "absl/strings/str_split.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/strings/strip.h"
|
||||
#include "src/core/call/metadata_batch.h"
|
||||
#include "src/core/config/core_configuration.h"
|
||||
#include "src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h"
|
||||
#include "src/core/lib/channel/channel_stack.h"
|
||||
|
@ -44,7 +45,6 @@
|
|||
#include "src/core/lib/promise/pipe.h"
|
||||
#include "src/core/lib/resource_quota/arena.h"
|
||||
#include "src/core/lib/slice/slice.h"
|
||||
#include "src/core/lib/transport/metadata_batch.h"
|
||||
#include "src/core/lib/transport/transport.h"
|
||||
#include "src/core/resolver/xds/xds_resolver_attributes.h"
|
||||
#include "src/core/service_config/service_config_call_data.h"
|
||||
|
|
|
@ -103,6 +103,7 @@ using grpc_event_engine::experimental::ChannelArgsEndpointConfig;
|
|||
using grpc_event_engine::experimental::EventEngine;
|
||||
using grpc_event_engine::experimental::EventEngineSupportsFdExtension;
|
||||
using grpc_event_engine::experimental::QueryExtension;
|
||||
using http2::Http2ErrorCode;
|
||||
|
||||
const char kUnixUriPrefix[] = "unix:";
|
||||
const char kUnixAbstractUriPrefix[] = "unix-abstract:";
|
||||
|
@ -631,7 +632,8 @@ void Chttp2ServerListener::ActiveConnection::SendGoAway() {
|
|||
// Set an HTTP2 error of NO_ERROR to do graceful GOAWAYs.
|
||||
op->goaway_error = grpc_error_set_int(
|
||||
GRPC_ERROR_CREATE("Server is stopping to serve requests."),
|
||||
StatusIntProperty::kHttp2Error, GRPC_HTTP2_NO_ERROR);
|
||||
StatusIntProperty::kHttp2Error,
|
||||
static_cast<intptr_t>(Http2ErrorCode::kNoError));
|
||||
transport->PerformOp(op);
|
||||
}
|
||||
}
|
||||
|
@ -1214,7 +1216,8 @@ void NewChttp2ServerListener::ActiveConnection::SendGoAwayImplLocked() {
|
|||
// Set an HTTP2 error of NO_ERROR to do graceful GOAWAYs.
|
||||
op->goaway_error = grpc_error_set_int(
|
||||
GRPC_ERROR_CREATE("Server is stopping to serve requests."),
|
||||
StatusIntProperty::kHttp2Error, GRPC_HTTP2_NO_ERROR);
|
||||
StatusIntProperty::kHttp2Error,
|
||||
static_cast<intptr_t>(Http2ErrorCode::kNoError));
|
||||
transport->PerformOp(op);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#ifndef GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H
|
||||
#define GRPC_SRC_CORE_EXT_TRANSPORT_CHTTP2_SERVER_CHTTP2_SERVER_H
|
||||
|
||||
#include <grpc/byte_buffer.h>
|
||||
#include <grpc/event_engine/event_engine.h>
|
||||
#include <grpc/passive_listener.h>
|
||||
#include <grpc/support/port_platform.h>
|
||||
|
@ -35,7 +36,10 @@ namespace grpc_core {
|
|||
|
||||
struct AcceptorDeleter {
|
||||
void operator()(grpc_tcp_server_acceptor* acceptor) const {
|
||||
gpr_free(acceptor);
|
||||
if (acceptor != nullptr) {
|
||||
grpc_byte_buffer_destroy(acceptor->pending_data);
|
||||
gpr_free(acceptor);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ void Chttp2CallTracerWrapper::RecordIncomingBytes(
|
|||
stream_->stats.incoming.header_bytes += transport_byte_size.header_bytes;
|
||||
// Update new API.
|
||||
if (!IsCallTracerInTransportEnabled()) return;
|
||||
auto* call_tracer = stream_->CallTracer();
|
||||
auto* call_tracer = stream_->call_tracer;
|
||||
if (call_tracer != nullptr) {
|
||||
call_tracer->RecordIncomingBytes(transport_byte_size);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ void Chttp2CallTracerWrapper::RecordOutgoingBytes(
|
|||
stream_->stats.outgoing.header_bytes +=
|
||||
transport_byte_size.header_bytes; // Update new API.
|
||||
if (!IsCallTracerInTransportEnabled()) return;
|
||||
auto* call_tracer = stream_->CallTracer();
|
||||
auto* call_tracer = stream_->call_tracer;
|
||||
if (call_tracer != nullptr) {
|
||||
call_tracer->RecordOutgoingBytes(transport_byte_size);
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue