handshaker_registry.h
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 
19 #ifndef GRPC_CORE_LIB_TRANSPORT_HANDSHAKER_REGISTRY_H
20 #define GRPC_CORE_LIB_TRANSPORT_HANDSHAKER_REGISTRY_H
21 
23 
24 #include <memory>
25 #include <vector>
26 
28 
31 
32 namespace grpc_core {
33 
34 typedef enum {
37  NUM_HANDSHAKER_TYPES, // Must be last.
39 
41  public:
42  class Builder {
43  public:
47  void RegisterHandshakerFactory(bool at_start,
48  HandshakerType handshaker_type,
49  std::unique_ptr<HandshakerFactory> factory);
50 
52 
53  private:
54  std::vector<std::unique_ptr<HandshakerFactory>>
56  };
57 
58  void AddHandshakers(HandshakerType handshaker_type,
59  const grpc_channel_args* args,
60  grpc_pollset_set* interested_parties,
61  HandshakeManager* handshake_mgr) const;
62 
63  private:
64  HandshakerRegistry() = default;
65 
66  std::vector<std::unique_ptr<HandshakerFactory>>
68 };
69 
70 } // namespace grpc_core
71 
72 #endif /* GRPC_CORE_LIB_TRANSPORT_HANDSHAKER_REGISTRY_H */
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::HandshakerRegistry
HandshakerRegistry()=default
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_types.h
grpc_core::HANDSHAKER_SERVER
@ HANDSHAKER_SERVER
Definition: handshaker_registry.h:36
grpc_core::HandshakerRegistry
Definition: handshaker_registry.h:40
grpc_core::HANDSHAKER_CLIENT
@ HANDSHAKER_CLIENT
Definition: handshaker_registry.h:35
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
grpc_core::HandshakerType
HandshakerType
Definition: handshaker_registry.h:34
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
handshaker_factory.h
grpc_core::HandshakeManager
Definition: handshaker.h:98
iomgr_fwd.h
grpc_core::HandshakerRegistry::Builder
Definition: handshaker_registry.h:42
grpc_core::HandshakerRegistry::factories_
std::vector< std::unique_ptr< HandshakerFactory > > factories_[NUM_HANDSHAKER_TYPES]
Definition: handshaker_registry.h:67
port_platform.h


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