From f5493986633f489405e4380a2d3f57801524c38a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Dec 2023 19:44:49 +0000 Subject: [PATCH] comment --- src/core/lib/channel/promise_based_filter.h | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/core/lib/channel/promise_based_filter.h b/src/core/lib/channel/promise_based_filter.h index b3866ec3e60..784c32cac63 100644 --- a/src/core/lib/channel/promise_based_filter.h +++ b/src/core/lib/channel/promise_based_filter.h @@ -321,11 +321,11 @@ inline auto RunCall( } template -inline auto RunCall(ServerMetadataHandle (Derived::Call::*fn)( - ClientMetadata& md, Derived* channel), - CallArgs call_args, NextPromiseFactory next_promise_factory, - FilterCallData* call_data) - -> ArenaPromise { +inline auto RunCall( + ServerMetadataHandle (Derived::Call::*fn)(ClientMetadata& md, + Derived* channel), + CallArgs call_args, NextPromiseFactory next_promise_factory, + FilterCallData* call_data) -> ArenaPromise { GPR_DEBUG_ASSERT(fn == &Derived::Call::OnClientInitialMetadata); auto return_md = call_data->call.OnClientInitialMetadata( *call_args.client_initial_metadata, call_data->channel); @@ -428,6 +428,11 @@ MakeFilterCall(Derived* derived) { // - absl::Status $INTERCEPTOR_NAME($VALUE_TYPE&): // the filter intercepts this event, and can modify the value. // it can fail, in which case the call will be aborted. +// - ServerMetadataHandle $INTERCEPTOR_NAME($VALUE_TYPE&) +// the filter intercepts this event, and can modify the value. +// the filter can return nullptr for success, or a metadata handle for +// failure (in which case the call will be aborted). +// useful for cases where the exact metadata returned needs to be customized. // - void $INTERCEPTOR_NAME($VALUE_TYPE&, Derived*): // the filter intercepts this event, and can modify the value. // it can access the channel via the second argument. @@ -436,6 +441,12 @@ MakeFilterCall(Derived* derived) { // the filter intercepts this event, and can modify the value. // it can access the channel via the second argument. // it can fail, in which case the call will be aborted. +// - ServerMetadataHandle $INTERCEPTOR_NAME($VALUE_TYPE&, Derived*) +// the filter intercepts this event, and can modify the value. +// it can access the channel via the second argument. +// the filter can return nullptr for success, or a metadata handle for +// failure (in which case the call will be aborted). +// useful for cases where the exact metadata returned needs to be customized. template class ImplementChannelFilter : public ChannelFilter { public: