Merge branch 'nukage' of github.com:ctiller/grpc into nukage

pull/36793/head
Craig Tiller 6 months ago
commit 5bf4c34c12
  1. 64
      CMakeLists.txt
  2. 1
      Package.swift
  3. 67
      build_autogenerated.yaml
  4. 2
      gRPC-C++.podspec
  5. 2
      gRPC-Core.podspec
  6. 1
      grpc.gemspec
  7. 1
      package.xml
  8. 76
      src/core/lib/channel/context.h
  9. 90
      src/core/lib/channel/promise_based_filter.h
  10. 1
      tools/doxygen/Doxyfile.c++.internal
  11. 1
      tools/doxygen/Doxyfile.core.internal
  12. 24
      tools/run_tests/generated/tests.json

64
CMakeLists.txt generated

@ -1093,7 +1093,6 @@ if(gRPC_BUILD_TESTS)
endif()
add_dependencies(buildtests_cxx file_watcher_certificate_provider_factory_test)
add_dependencies(buildtests_cxx filter_causes_close_test)
add_dependencies(buildtests_cxx filter_context_test)
add_dependencies(buildtests_cxx filter_init_fails_test)
add_dependencies(buildtests_cxx filter_test_test)
add_dependencies(buildtests_cxx filtered_metadata_test)
@ -14034,69 +14033,6 @@ target_link_libraries(filter_causes_close_test
)
endif()
if(gRPC_BUILD_TESTS)
add_executable(filter_context_test
src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
src/core/ext/transport/chaotic_good/client_transport.cc
src/core/ext/transport/chaotic_good/frame.cc
src/core/ext/transport/chaotic_good/frame_header.cc
src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
src/core/ext/transport/chaotic_good/server_transport.cc
src/core/ext/transport/chaotic_good/settings_metadata.cc
src/core/lib/transport/promise_endpoint.cc
test/core/end2end/cq_verifier.cc
test/core/end2end/end2end_test_main.cc
test/core/end2end/end2end_test_suites.cc
test/core/end2end/end2end_tests.cc
test/core/end2end/fixtures/http_proxy_fixture.cc
test/core/end2end/fixtures/local_util.cc
test/core/end2end/fixtures/proxy.cc
test/core/end2end/tests/filter_context.cc
test/core/event_engine/event_engine_test_utils.cc
test/core/test_util/fake_stats_plugin.cc
test/core/test_util/test_lb_policies.cc
)
if(WIN32 AND MSVC)
if(BUILD_SHARED_LIBS)
target_compile_definitions(filter_context_test
PRIVATE
"GPR_DLL_IMPORTS"
"GRPC_DLL_IMPORTS"
)
endif()
endif()
target_compile_features(filter_context_test PUBLIC cxx_std_14)
target_include_directories(filter_context_test
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/include
${_gRPC_ADDRESS_SORTING_INCLUDE_DIR}
${_gRPC_RE2_INCLUDE_DIR}
${_gRPC_SSL_INCLUDE_DIR}
${_gRPC_UPB_GENERATED_DIR}
${_gRPC_UPB_GRPC_GENERATED_DIR}
${_gRPC_UPB_INCLUDE_DIR}
${_gRPC_XXHASH_INCLUDE_DIR}
${_gRPC_ZLIB_INCLUDE_DIR}
third_party/googletest/googletest/include
third_party/googletest/googletest
third_party/googletest/googlemock/include
third_party/googletest/googlemock
${_gRPC_PROTO_GENS_DIR}
)
target_link_libraries(filter_context_test
${_gRPC_ALLTARGETS_LIBRARIES}
gtest
grpc_authorization_provider
grpc_unsecure
grpc_test_util
)
endif()
if(gRPC_BUILD_TESTS)

1
Package.swift generated

@ -1109,7 +1109,6 @@ let package = Package(
"src/core/lib/channel/channel_stack_trace.h",
"src/core/lib/channel/connected_channel.cc",
"src/core/lib/channel/connected_channel.h",
"src/core/lib/channel/context.h",
"src/core/lib/channel/promise_based_filter.cc",
"src/core/lib/channel/promise_based_filter.h",
"src/core/lib/channel/status_util.cc",

@ -804,7 +804,6 @@ libs:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
@ -2347,7 +2346,6 @@ libs:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
@ -4440,7 +4438,6 @@ libs:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h
@ -9706,69 +9703,6 @@ targets:
- grpc_authorization_provider
- grpc_unsecure
- grpc_test_util
- name: filter_context_test
gtest: true
build: test
language: c++
headers:
- src/core/ext/transport/chaotic_good/chaotic_good_transport.h
- src/core/ext/transport/chaotic_good/client/chaotic_good_connector.h
- src/core/ext/transport/chaotic_good/client_transport.h
- src/core/ext/transport/chaotic_good/frame.h
- src/core/ext/transport/chaotic_good/frame_header.h
- src/core/ext/transport/chaotic_good/server/chaotic_good_server.h
- src/core/ext/transport/chaotic_good/server_transport.h
- src/core/ext/transport/chaotic_good/settings_metadata.h
- src/core/lib/promise/event_engine_wakeup_scheduler.h
- src/core/lib/promise/inter_activity_latch.h
- src/core/lib/promise/inter_activity_pipe.h
- src/core/lib/promise/mpsc.h
- src/core/lib/promise/switch.h
- src/core/lib/promise/wait_for_callback.h
- src/core/lib/promise/wait_set.h
- src/core/lib/transport/promise_endpoint.h
- test/core/end2end/cq_verifier.h
- test/core/end2end/end2end_tests.h
- test/core/end2end/fixtures/h2_oauth2_common.h
- test/core/end2end/fixtures/h2_ssl_cred_reload_fixture.h
- test/core/end2end/fixtures/h2_ssl_tls_common.h
- test/core/end2end/fixtures/h2_tls_common.h
- test/core/end2end/fixtures/http_proxy_fixture.h
- test/core/end2end/fixtures/inproc_fixture.h
- test/core/end2end/fixtures/local_util.h
- test/core/end2end/fixtures/proxy.h
- test/core/end2end/fixtures/secure_fixture.h
- test/core/end2end/fixtures/sockpair_fixture.h
- test/core/end2end/tests/cancel_test_helpers.h
- test/core/event_engine/event_engine_test_utils.h
- test/core/test_util/fake_stats_plugin.h
- test/core/test_util/test_lb_policies.h
src:
- src/core/ext/transport/chaotic_good/chaotic_good_transport.cc
- src/core/ext/transport/chaotic_good/client/chaotic_good_connector.cc
- src/core/ext/transport/chaotic_good/client_transport.cc
- src/core/ext/transport/chaotic_good/frame.cc
- src/core/ext/transport/chaotic_good/frame_header.cc
- src/core/ext/transport/chaotic_good/server/chaotic_good_server.cc
- src/core/ext/transport/chaotic_good/server_transport.cc
- src/core/ext/transport/chaotic_good/settings_metadata.cc
- src/core/lib/transport/promise_endpoint.cc
- test/core/end2end/cq_verifier.cc
- test/core/end2end/end2end_test_main.cc
- test/core/end2end/end2end_test_suites.cc
- test/core/end2end/end2end_tests.cc
- test/core/end2end/fixtures/http_proxy_fixture.cc
- test/core/end2end/fixtures/local_util.cc
- test/core/end2end/fixtures/proxy.cc
- test/core/end2end/tests/filter_context.cc
- test/core/event_engine/event_engine_test_utils.cc
- test/core/test_util/fake_stats_plugin.cc
- test/core/test_util/test_lb_policies.cc
deps:
- gtest
- grpc_authorization_provider
- grpc_unsecure
- grpc_test_util
- name: filter_init_fails_test
gtest: true
build: test
@ -11751,7 +11685,6 @@ targets:
- src/core/lib/channel/channel_stack_builder_impl.h
- src/core/lib/channel/channel_stack_trace.h
- src/core/lib/channel/connected_channel.h
- src/core/lib/channel/context.h
- src/core/lib/channel/promise_based_filter.h
- src/core/lib/channel/status_util.h
- src/core/lib/compression/compression_internal.h

2
gRPC-C++.podspec generated

@ -883,7 +883,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.h',
'src/core/lib/compression/compression_internal.h',
@ -2157,7 +2156,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.h',
'src/core/lib/compression/compression_internal.h',

2
gRPC-Core.podspec generated

@ -1228,7 +1228,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.cc',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.cc',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.cc',
@ -2939,7 +2938,6 @@ Pod::Spec.new do |s|
'src/core/lib/channel/channel_stack_builder_impl.h',
'src/core/lib/channel/channel_stack_trace.h',
'src/core/lib/channel/connected_channel.h',
'src/core/lib/channel/context.h',
'src/core/lib/channel/promise_based_filter.h',
'src/core/lib/channel/status_util.h',
'src/core/lib/compression/compression_internal.h',

1
grpc.gemspec generated

@ -1115,7 +1115,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/lib/channel/channel_stack_trace.h )
s.files += %w( src/core/lib/channel/connected_channel.cc )
s.files += %w( src/core/lib/channel/connected_channel.h )
s.files += %w( src/core/lib/channel/context.h )
s.files += %w( src/core/lib/channel/promise_based_filter.cc )
s.files += %w( src/core/lib/channel/promise_based_filter.h )
s.files += %w( src/core/lib/channel/status_util.cc )

1
package.xml generated

@ -1097,7 +1097,6 @@
<file baseinstalldir="/" name="src/core/lib/channel/channel_stack_trace.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/connected_channel.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/context.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/promise_based_filter.cc" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/promise_based_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/lib/channel/status_util.cc" role="src" />

@ -1,76 +0,0 @@
//
//
// Copyright 2015 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_SRC_CORE_LIB_CHANNEL_CONTEXT_H
#define GRPC_SRC_CORE_LIB_CHANNEL_CONTEXT_H
#include <grpc/support/port_platform.h>
#include "src/core/lib/promise/context.h"
/// Call object context pointers.
/// Call context is represented as an array of \a grpc_call_context_elements.
/// This enum represents the indexes into the array, where each index
/// contains a different type of value.
typedef enum {
GRPC_CONTEXT_COUNT
} grpc_context_index;
struct grpc_call_context_element {
void* value = nullptr;
void (*destroy)(void*) = nullptr;
};
namespace grpc_core {
class ServiceConfigCallData;
// Bind the legacy context array into the new style structure
// TODO(ctiller): remove as we migrate these contexts to the new system.
template <>
struct ContextType<grpc_call_context_element> {};
// Also as a transition step allow exposing a GetContext<T> that can peek into
// the legacy context array.
namespace promise_detail {
template <typename T>
struct OldStyleContext;
template <typename T>
class Context<T, absl::void_t<decltype(OldStyleContext<T>::kIndex)>> {
public:
static T* get() {
return static_cast<T*>(
GetContext<grpc_call_context_element>()[OldStyleContext<T>::kIndex]
.value);
}
static void set(T* value) {
auto& elem =
GetContext<grpc_call_context_element>()[OldStyleContext<T>::kIndex];
if (elem.destroy != nullptr) {
elem.destroy(elem.value);
elem.destroy = nullptr;
}
elem.value = value;
}
};
} // namespace promise_detail
} // namespace grpc_core
#endif // GRPC_SRC_CORE_LIB_CHANNEL_CONTEXT_H

@ -351,7 +351,7 @@ auto MapResult(const NoInterceptor*, Promise x, void*) {
}
template <typename Promise, typename Derived>
auto MapResult(absl::Status (Derived::Call::* fn)(ServerMetadata&), Promise x,
auto MapResult(absl::Status (Derived::Call::*fn)(ServerMetadata&), Promise x,
FilterCallData<Derived>* call_data) {
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata);
return OnCancel(Map(std::move(x),
@ -372,7 +372,7 @@ auto MapResult(absl::Status (Derived::Call::* fn)(ServerMetadata&), Promise x,
}
template <typename Promise, typename Derived>
auto MapResult(void (Derived::Call::* fn)(ServerMetadata&), Promise x,
auto MapResult(void (Derived::Call::*fn)(ServerMetadata&), Promise x,
FilterCallData<Derived>* call_data) {
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata);
return OnCancel(Map(std::move(x),
@ -389,7 +389,7 @@ auto MapResult(void (Derived::Call::* fn)(ServerMetadata&), Promise x,
}
template <typename Promise, typename Derived>
auto MapResult(void (Derived::Call::* fn)(ServerMetadata&, Derived*), Promise x,
auto MapResult(void (Derived::Call::*fn)(ServerMetadata&, Derived*), Promise x,
FilterCallData<Derived>* call_data) {
DCHECK(fn == &Derived::Call::OnServerTrailingMetadata);
return OnCancel(
@ -519,7 +519,7 @@ auto RunCall(Interceptor interceptor, CallArgs call_args,
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
void (Derived::Call::* fn)(const Message&),
void (Derived::Call::*fn)(const Message&),
FilterCallData<Derived>* call_data, const CallArgs&) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> {
@ -530,7 +530,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
ServerMetadataHandle (Derived::Call::* fn)(const Message&),
ServerMetadataHandle (Derived::Call::*fn)(const Message&),
FilterCallData<Derived>* call_data, const CallArgs&) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> {
@ -544,7 +544,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
ServerMetadataHandle (Derived::Call::* fn)(const Message&, Derived*),
ServerMetadataHandle (Derived::Call::*fn)(const Message&, Derived*),
FilterCallData<Derived>* call_data, const CallArgs&) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> {
@ -559,7 +559,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
MessageHandle (Derived::Call::* fn)(MessageHandle, Derived*),
MessageHandle (Derived::Call::*fn)(MessageHandle, Derived*),
FilterCallData<Derived>* call_data, const CallArgs&) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> {
@ -570,8 +570,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
absl::StatusOr<MessageHandle> (Derived::Call::* fn)(MessageHandle,
Derived*),
absl::StatusOr<MessageHandle> (Derived::Call::*fn)(MessageHandle, Derived*),
FilterCallData<Derived>* call_data, const CallArgs&) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call_data](MessageHandle msg) -> absl::optional<MessageHandle> {
@ -611,7 +610,7 @@ inline void InterceptClientToServerMessage(const NoInterceptor*,
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
ServerMetadataHandle (Derived::Call::* fn)(const Message&),
ServerMetadataHandle (Derived::Call::*fn)(const Message&),
typename Derived::Call* call, Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return
@ -625,7 +624,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
void (Derived::Call::* fn)(const Message&), typename Derived::Call* call,
void (Derived::Call::*fn)(const Message&), typename Derived::Call* call,
Derived*, PipeBasedCallSpine*) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call](MessageHandle msg) -> absl::optional<MessageHandle> {
@ -636,7 +635,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
ServerMetadataHandle (Derived::Call::* fn)(const Message&, Derived*),
ServerMetadataHandle (Derived::Call::*fn)(const Message&, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
@ -651,7 +650,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
MessageHandle (Derived::Call::* fn)(MessageHandle, Derived*),
MessageHandle (Derived::Call::*fn)(MessageHandle, Derived*),
typename Derived::Call* call, Derived* channel, PipeBasedCallSpine*) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
return [call, channel](MessageHandle msg) {
@ -661,8 +660,7 @@ inline auto InterceptClientToServerMessageHandler(
template <typename Derived>
inline auto InterceptClientToServerMessageHandler(
absl::StatusOr<MessageHandle> (Derived::Call::* fn)(MessageHandle,
Derived*),
absl::StatusOr<MessageHandle> (Derived::Call::*fn)(MessageHandle, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientToServerMessage);
@ -689,7 +687,7 @@ inline void InterceptClientToServerMessage(HookFunction fn,
template <typename Derived, typename HookFunction>
inline void InterceptClientToServerMessage(HookFunction fn,
void (Derived::Call::* half_close)(),
void (Derived::Call::*half_close)(),
typename Derived::Call* call,
Derived* channel,
PipeBasedCallSpine* call_spine) {
@ -711,8 +709,8 @@ inline void InterceptClientInitialMetadata(const NoInterceptor*, void*, void*,
template <typename Derived>
inline void InterceptClientInitialMetadata(
void (Derived::Call::* fn)(ClientMetadata& md),
typename Derived::Call* call, Derived*, PipeBasedCallSpine* call_spine) {
void (Derived::Call::*fn)(ClientMetadata& md), typename Derived::Call* call,
Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientInitialMetadata);
call_spine->client_initial_metadata().receiver.InterceptAndMap(
[call](ClientMetadataHandle md) {
@ -723,7 +721,7 @@ inline void InterceptClientInitialMetadata(
template <typename Derived>
inline void InterceptClientInitialMetadata(
void (Derived::Call::* fn)(ClientMetadata& md, Derived* channel),
void (Derived::Call::*fn)(ClientMetadata& md, Derived* channel),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientInitialMetadata);
@ -736,7 +734,7 @@ inline void InterceptClientInitialMetadata(
template <typename Derived>
inline void InterceptClientInitialMetadata(
ServerMetadataHandle (Derived::Call::* fn)(ClientMetadata& md),
ServerMetadataHandle (Derived::Call::*fn)(ClientMetadata& md),
typename Derived::Call* call, Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientInitialMetadata);
call_spine->client_initial_metadata().receiver.InterceptAndMap(
@ -751,8 +749,8 @@ inline void InterceptClientInitialMetadata(
template <typename Derived>
inline void InterceptClientInitialMetadata(
ServerMetadataHandle (Derived::Call::* fn)(ClientMetadata& md,
Derived* channel),
ServerMetadataHandle (Derived::Call::*fn)(ClientMetadata& md,
Derived* channel),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientInitialMetadata);
@ -768,7 +766,7 @@ inline void InterceptClientInitialMetadata(
template <typename Derived>
inline void InterceptClientInitialMetadata(
absl::Status (Derived::Call::* fn)(ClientMetadata& md),
absl::Status (Derived::Call::*fn)(ClientMetadata& md),
typename Derived::Call* call, Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientInitialMetadata);
call_spine->client_initial_metadata().receiver.InterceptAndMap(
@ -784,7 +782,7 @@ inline void InterceptClientInitialMetadata(
template <typename Derived>
inline void InterceptClientInitialMetadata(
absl::Status (Derived::Call::* fn)(ClientMetadata& md, Derived* channel),
absl::Status (Derived::Call::*fn)(ClientMetadata& md, Derived* channel),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnClientInitialMetadata);
@ -804,7 +802,7 @@ inline void InterceptClientInitialMetadata(
template <typename Promise, typename Derived>
absl::void_t<decltype(StatusCast<ServerMetadataHandle>(
std::declval<PromiseResult<Promise>>))>
InterceptClientInitialMetadata(Promise (Derived::Call::* promise_factory)(
InterceptClientInitialMetadata(Promise (Derived::Call::*promise_factory)(
ClientMetadata& md, Derived* channel),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
@ -830,7 +828,7 @@ inline void InterceptServerInitialMetadata(const NoInterceptor*, void*,
template <typename Derived>
inline void InterceptServerInitialMetadata(
void (Derived::Call::* fn)(ServerMetadata&),
void (Derived::Call::*fn)(ServerMetadata&),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
call_args.server_initial_metadata->InterceptAndMap(
@ -842,7 +840,7 @@ inline void InterceptServerInitialMetadata(
template <typename Derived>
inline void InterceptServerInitialMetadata(
absl::Status (Derived::Call::* fn)(ServerMetadata&),
absl::Status (Derived::Call::*fn)(ServerMetadata&),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
call_args.server_initial_metadata->InterceptAndMap(
@ -859,7 +857,7 @@ inline void InterceptServerInitialMetadata(
template <typename Derived>
inline void InterceptServerInitialMetadata(
void (Derived::Call::* fn)(ServerMetadata&, Derived*),
void (Derived::Call::*fn)(ServerMetadata&, Derived*),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
call_args.server_initial_metadata->InterceptAndMap(
@ -871,7 +869,7 @@ inline void InterceptServerInitialMetadata(
template <typename Derived>
inline void InterceptServerInitialMetadata(
absl::Status (Derived::Call::* fn)(ServerMetadata&, Derived*),
absl::Status (Derived::Call::*fn)(ServerMetadata&, Derived*),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
call_args.server_initial_metadata->InterceptAndMap(
@ -892,7 +890,7 @@ inline void InterceptServerInitialMetadata(const NoInterceptor*, void*, void*,
template <typename Derived>
inline void InterceptServerInitialMetadata(
void (Derived::Call::* fn)(ServerMetadata&), typename Derived::Call* call,
void (Derived::Call::*fn)(ServerMetadata&), typename Derived::Call* call,
Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
call_spine->server_initial_metadata().sender.InterceptAndMap(
@ -904,7 +902,7 @@ inline void InterceptServerInitialMetadata(
template <typename Derived>
inline void InterceptServerInitialMetadata(
absl::Status (Derived::Call::* fn)(ServerMetadata&),
absl::Status (Derived::Call::*fn)(ServerMetadata&),
typename Derived::Call* call, Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
call_spine->server_initial_metadata().sender.InterceptAndMap(
@ -920,7 +918,7 @@ inline void InterceptServerInitialMetadata(
template <typename Derived>
inline void InterceptServerInitialMetadata(
void (Derived::Call::* fn)(ServerMetadata&, Derived*),
void (Derived::Call::*fn)(ServerMetadata&, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
@ -933,7 +931,7 @@ inline void InterceptServerInitialMetadata(
template <typename Derived>
inline void InterceptServerInitialMetadata(
absl::Status (Derived::Call::* fn)(ServerMetadata&, Derived*),
absl::Status (Derived::Call::*fn)(ServerMetadata&, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerInitialMetadata);
@ -953,7 +951,7 @@ inline void InterceptServerToClientMessage(const NoInterceptor*, void*,
template <typename Derived>
inline void InterceptServerToClientMessage(
void (Derived::Call::* fn)(const Message&),
void (Derived::Call::*fn)(const Message&),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_args.server_to_client_messages->InterceptAndMap(
@ -965,7 +963,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
ServerMetadataHandle (Derived::Call::* fn)(const Message&),
ServerMetadataHandle (Derived::Call::*fn)(const Message&),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_args.server_to_client_messages->InterceptAndMap(
@ -980,7 +978,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
ServerMetadataHandle (Derived::Call::* fn)(const Message&, Derived*),
ServerMetadataHandle (Derived::Call::*fn)(const Message&, Derived*),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_args.server_to_client_messages->InterceptAndMap(
@ -996,7 +994,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
MessageHandle (Derived::Call::* fn)(MessageHandle, Derived*),
MessageHandle (Derived::Call::*fn)(MessageHandle, Derived*),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_args.server_to_client_messages->InterceptAndMap(
@ -1008,8 +1006,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
absl::StatusOr<MessageHandle> (Derived::Call::* fn)(MessageHandle,
Derived*),
absl::StatusOr<MessageHandle> (Derived::Call::*fn)(MessageHandle, Derived*),
FilterCallData<Derived>* call_data, const CallArgs& call_args) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_args.server_to_client_messages->InterceptAndMap(
@ -1028,7 +1025,7 @@ inline void InterceptServerToClientMessage(const NoInterceptor*, void*, void*,
template <typename Derived>
inline void InterceptServerToClientMessage(
void (Derived::Call::* fn)(const Message&), typename Derived::Call* call,
void (Derived::Call::*fn)(const Message&), typename Derived::Call* call,
Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_spine->server_to_client_messages().sender.InterceptAndMap(
@ -1040,7 +1037,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
ServerMetadataHandle (Derived::Call::* fn)(const Message&),
ServerMetadataHandle (Derived::Call::*fn)(const Message&),
typename Derived::Call* call, Derived*, PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
call_spine->server_to_client_messages().sender.InterceptAndMap(
@ -1054,7 +1051,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
ServerMetadataHandle (Derived::Call::* fn)(const Message&, Derived*),
ServerMetadataHandle (Derived::Call::*fn)(const Message&, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
@ -1070,7 +1067,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
MessageHandle (Derived::Call::* fn)(MessageHandle, Derived*),
MessageHandle (Derived::Call::*fn)(MessageHandle, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
@ -1082,8 +1079,7 @@ inline void InterceptServerToClientMessage(
template <typename Derived>
inline void InterceptServerToClientMessage(
absl::StatusOr<MessageHandle> (Derived::Call::* fn)(MessageHandle,
Derived*),
absl::StatusOr<MessageHandle> (Derived::Call::*fn)(MessageHandle, Derived*),
typename Derived::Call* call, Derived* channel,
PipeBasedCallSpine* call_spine) {
DCHECK(fn == &Derived::Call::OnServerToClientMessage);
@ -1127,7 +1123,7 @@ inline void InterceptServerTrailingMetadata(
inline void InterceptFinalize(const NoInterceptor*, void*, void*) {}
template <class Call>
inline void InterceptFinalize(void (Call::* fn)(const grpc_call_final_info*),
inline void InterceptFinalize(void (Call::*fn)(const grpc_call_final_info*),
void*, Call* call) {
DCHECK(fn == &Call::OnFinalize);
GetContext<CallFinalization>()->Add(
@ -1138,7 +1134,7 @@ inline void InterceptFinalize(void (Call::* fn)(const grpc_call_final_info*),
template <class Derived>
inline void InterceptFinalize(
void (Derived::Call::* fn)(const grpc_call_final_info*, Derived*),
void (Derived::Call::*fn)(const grpc_call_final_info*, Derived*),
Derived* channel, typename Derived::Call* call) {
DCHECK(fn == &Derived::Call::OnFinalize);
GetContext<CallFinalization>()->Add(

@ -2114,7 +2114,6 @@ src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_stack_trace.h \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/connected_channel.h \
src/core/lib/channel/context.h \
src/core/lib/channel/promise_based_filter.cc \
src/core/lib/channel/promise_based_filter.h \
src/core/lib/channel/status_util.cc \

@ -1886,7 +1886,6 @@ src/core/lib/channel/channel_stack_trace.cc \
src/core/lib/channel/channel_stack_trace.h \
src/core/lib/channel/connected_channel.cc \
src/core/lib/channel/connected_channel.h \
src/core/lib/channel/context.h \
src/core/lib/channel/promise_based_filter.cc \
src/core/lib/channel/promise_based_filter.h \
src/core/lib/channel/status_util.cc \

@ -3603,30 +3603,6 @@
],
"uses_polling": true
},
{
"args": [],
"benchmark": false,
"ci_platforms": [
"linux",
"mac",
"posix",
"windows"
],
"cpu_cost": 1.0,
"exclude_configs": [],
"exclude_iomgrs": [],
"flaky": false,
"gtest": true,
"language": "c++",
"name": "filter_context_test",
"platforms": [
"linux",
"mac",
"posix",
"windows"
],
"uses_polling": true
},
{
"args": [],
"benchmark": false,

Loading…
Cancel
Save