[call-v3] Move `ServiceConfigChannelArgFilter` to new style registration (#35500)

Closes #35500

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35500 from ctiller:tpl 3aef6fd7db
PiperOrigin-RevId: 597357575
pull/34966/head
Craig Tiller 11 months ago committed by Copybara-Service
parent 850912afaf
commit 2350de3936
  1. 8
      src/core/ext/filters/client_channel/service_config_channel_arg_filter.cc

@ -57,6 +57,8 @@ namespace {
class ServiceConfigChannelArgFilter class ServiceConfigChannelArgFilter
: public ImplementChannelFilter<ServiceConfigChannelArgFilter> { : public ImplementChannelFilter<ServiceConfigChannelArgFilter> {
public: public:
static const grpc_channel_filter kFilter;
static absl::StatusOr<ServiceConfigChannelArgFilter> Create( static absl::StatusOr<ServiceConfigChannelArgFilter> Create(
const ChannelArgs& args, ChannelFilter::Args) { const ChannelArgs& args, ChannelFilter::Args) {
return ServiceConfigChannelArgFilter(args); return ServiceConfigChannelArgFilter(args);
@ -114,7 +116,7 @@ void ServiceConfigChannelArgFilter::Call::OnClientInitialMetadata(
method_configs); method_configs);
} }
const grpc_channel_filter kServiceConfigChannelArgFilter = const grpc_channel_filter ServiceConfigChannelArgFilter::kFilter =
MakePromiseBasedFilter<ServiceConfigChannelArgFilter, MakePromiseBasedFilter<ServiceConfigChannelArgFilter,
FilterEndpoint::kClient>( FilterEndpoint::kClient>(
"service_config_channel_arg"); "service_config_channel_arg");
@ -124,8 +126,8 @@ const grpc_channel_filter kServiceConfigChannelArgFilter =
void RegisterServiceConfigChannelArgFilter( void RegisterServiceConfigChannelArgFilter(
CoreConfiguration::Builder* builder) { CoreConfiguration::Builder* builder) {
builder->channel_init() builder->channel_init()
->RegisterFilter(GRPC_CLIENT_DIRECT_CHANNEL, ->RegisterFilter<ServiceConfigChannelArgFilter>(
&kServiceConfigChannelArgFilter) GRPC_CLIENT_DIRECT_CHANNEL)
.ExcludeFromMinimalStack() .ExcludeFromMinimalStack()
.IfHasChannelArg(GRPC_ARG_SERVICE_CONFIG) .IfHasChannelArg(GRPC_ARG_SERVICE_CONFIG)
.Before<ClientMessageSizeFilter>(); .Before<ClientMessageSizeFilter>();

Loading…
Cancel
Save