|
|
@ -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>(); |
|
|
|