GRPC Core  9.0.0
proxy_mapper_registry.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2017 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_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H
20 #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H
21 
23 
25 
26 namespace grpc_core {
27 
29  public:
30  static void Init();
31  static void Shutdown();
32 
36  static void Register(bool at_start,
37  std::unique_ptr<ProxyMapperInterface> mapper);
38 
39  static bool MapName(const char* server_uri, const grpc_channel_args* args,
40  char** name_to_resolve, grpc_channel_args** new_args);
41 
42  static bool MapAddress(const grpc_resolved_address& address,
43  const grpc_channel_args* args,
44  grpc_resolved_address** new_address,
45  grpc_channel_args** new_args);
46 };
47 
48 } // namespace grpc_core
49 
50 #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_PROXY_MAPPER_REGISTRY_H */
Definition: proxy_mapper_registry.h:28
static void Register(bool at_start, std::unique_ptr< ProxyMapperInterface > mapper)
Registers a new proxy mapper.
Definition: proxy_mapper_registry.cc:52
static void Init()
Definition: proxy_mapper_registry.cc:35
static bool MapName(const char *server_uri, const grpc_channel_args *args, char **name_to_resolve, grpc_channel_args **new_args)
Definition: proxy_mapper_registry.cc:63
static bool MapAddress(const grpc_resolved_address &address, const grpc_channel_args *args, grpc_resolved_address **new_address, grpc_channel_args **new_args)
Definition: proxy_mapper_registry.cc:76
static void Shutdown()
Definition: proxy_mapper_registry.cc:41
Round Robin Policy.
Definition: backend_metric.cc:24
An array of arguments that can be passed around.
Definition: grpc_types.h:132
Definition: resolve_address.h:44