handshaker_registry.cc
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2016 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
20 
22 
23 #include <stddef.h>
24 
25 #include <utility>
26 
27 namespace grpc_core {
28 
30  bool at_start, HandshakerType handshaker_type,
31  std::unique_ptr<HandshakerFactory> factory) {
32  auto& vec = factories_[handshaker_type];
33  auto where = at_start ? vec.begin() : vec.end();
34  vec.insert(where, std::move(factory));
35 }
36 
39  for (size_t i = 0; i < NUM_HANDSHAKER_TYPES; i++) {
40  out.factories_[i] = std::move(factories_[i]);
41  }
42  return out;
43 }
44 
46  const grpc_channel_args* args,
47  grpc_pollset_set* interested_parties,
48  HandshakeManager* handshake_mgr) const {
49  for (const auto& factory : factories_[handshaker_type]) {
50  factory->AddHandshakers(args, interested_parties, handshake_mgr);
51  }
52 }
53 
54 } // namespace grpc_core
gen_build_yaml.out
dictionary out
Definition: src/benchmark/gen_build_yaml.py:24
grpc_core
Definition: call_metric_recorder.h:31
grpc_core::NUM_HANDSHAKER_TYPES
@ NUM_HANDSHAKER_TYPES
Definition: handshaker_registry.h:37
grpc_pollset_set
struct grpc_pollset_set grpc_pollset_set
Definition: iomgr_fwd.h:23
grpc_core::HandshakerRegistry::Builder::Build
HandshakerRegistry Build()
Definition: handshaker_registry.cc:37
grpc_channel_args
Definition: grpc_types.h:132
grpc_core::HandshakerRegistry::Builder::RegisterHandshakerFactory
void RegisterHandshakerFactory(bool at_start, HandshakerType handshaker_type, std::unique_ptr< HandshakerFactory > factory)
Definition: handshaker_registry.cc:29
grpc_core::HandshakerRegistry
Definition: handshaker_registry.h:40
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::HandshakerType
HandshakerType
Definition: handshaker_registry.h:34
handshaker_registry.h
grpc_core::HandshakerRegistry::Builder::factories_
std::vector< std::unique_ptr< HandshakerFactory > > factories_[NUM_HANDSHAKER_TYPES]
Definition: handshaker_registry.h:55
grpc_core::HandshakerRegistry::AddHandshakers
void AddHandshakers(HandshakerType handshaker_type, const grpc_channel_args *args, grpc_pollset_set *interested_parties, HandshakeManager *handshake_mgr) const
Definition: handshaker_registry.cc:45
grpc_core::HandshakeManager
Definition: handshaker.h:98
grpc_core::HandshakerRegistry::factories_
std::vector< std::unique_ptr< HandshakerFactory > > factories_[NUM_HANDSHAKER_TYPES]
Definition: handshaker_registry.h:67
i
uint64_t i
Definition: abseil-cpp/absl/container/btree_benchmark.cc:230
port_platform.h


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:00