channel_args_preconditioning.cc
Go to the documentation of this file.
1 // Copyright 2021 gRPC authors.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
16 
18 
19 #include <algorithm>
20 #include <utility>
21 
22 namespace grpc_core {
23 
25  stages_.emplace_back(std::move(stage));
26 }
27 
29  ChannelArgsPreconditioning preconditioning;
30  preconditioning.stages_ = std::move(stages_);
31  return preconditioning;
32 }
33 
35  const grpc_channel_args* args) const {
37  for (auto& stage : stages_) {
38  channel_args = stage(std::move(channel_args));
39  }
40  return channel_args;
41 }
42 
43 } // namespace grpc_core
grpc_core::ChannelArgsPreconditioning::Builder::RegisterStage
void RegisterStage(Stage stage)
Definition: channel_args_preconditioning.cc:24
grpc_core::ChannelArgsBuiltinPrecondition
ChannelArgs ChannelArgsBuiltinPrecondition(const grpc_channel_args *src)
Definition: channel_args.cc:507
grpc_core::ChannelArgsPreconditioning::Stage
std::function< ChannelArgs(ChannelArgs)> Stage
Definition: channel_args_preconditioning.h:38
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::ChannelArgsPreconditioning
Definition: channel_args_preconditioning.h:33
grpc_channel_args
Definition: grpc_types.h:132
channel_args_preconditioning.h
grpc_core::ChannelArgsPreconditioning::Builder::Build
ChannelArgsPreconditioning Build()
Definition: channel_args_preconditioning.cc:28
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
absl::move
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Definition: abseil-cpp/absl/utility/utility.h:221
grpc_core::ChannelArgsPreconditioning::Builder::stages_
std::vector< Stage > stages_
Definition: channel_args_preconditioning.h:48
grpc_core::ChannelArgs
Definition: channel_args.h:111
grpc_core::ChannelArgsPreconditioning::stages_
std::vector< Stage > stages_
Definition: channel_args_preconditioning.h:57
grpc_core::ChannelArgsPreconditioning::PreconditionChannelArgs
ChannelArgs PreconditionChannelArgs(const grpc_channel_args *args) const
Definition: channel_args_preconditioning.cc:34
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:52