lb_policy_registry.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2015 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_LB_POLICY_REGISTRY_H
20 #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H
21 
23 
24 #include <memory>
25 
31 #include "src/core/lib/json/json.h"
32 
33 namespace grpc_core {
34 
36  public:
40  class Builder {
41  public:
43  static void InitRegistry();
44  static void ShutdownRegistry();
45 
49  std::unique_ptr<LoadBalancingPolicyFactory> factory);
50  };
51 
54  const char* name, LoadBalancingPolicy::Args args);
55 
59  static bool LoadBalancingPolicyExists(const char* name,
60  bool* requires_config);
61 
65  const Json& json, grpc_error_handle* error);
66 };
67 
68 } // namespace grpc_core
69 
70 #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_REGISTRY_H */
grpc_core::LoadBalancingPolicyRegistry::Builder::RegisterLoadBalancingPolicyFactory
static void RegisterLoadBalancingPolicyFactory(std::unique_ptr< LoadBalancingPolicyFactory > factory)
Definition: lb_policy_registry.cc:87
orphanable.h
grpc_core
Definition: call_metric_recorder.h:31
error
grpc_error_handle error
Definition: retry_filter.cc:499
lb_policy.h
lb_policy_factory.h
setup.name
name
Definition: setup.py:542
grpc_core::LoadBalancingPolicyRegistry::Builder
Definition: lb_policy_registry.h:40
asyncio_get_stats.args
args
Definition: asyncio_get_stats.py:40
grpc_core::RefCountedPtr
Definition: ref_counted_ptr.h:35
Json
JSON (JavaScript Object Notation).
Definition: third_party/bloaty/third_party/protobuf/conformance/third_party/jsoncpp/json.h:227
error.h
json.h
grpc_core::LoadBalancingPolicy::Args
Args used to instantiate an LB policy.
Definition: lb_policy.h:343
grpc_core::LoadBalancingPolicyRegistry::CreateLoadBalancingPolicy
static OrphanablePtr< LoadBalancingPolicy > CreateLoadBalancingPolicy(const char *name, LoadBalancingPolicy::Args args)
Creates an LB policy of the type specified by name.
Definition: lb_policy_registry.cc:98
grpc_core::LoadBalancingPolicyRegistry::ParseLoadBalancingConfig
static RefCountedPtr< LoadBalancingPolicy::Config > ParseLoadBalancingConfig(const Json &json, grpc_error_handle *error)
Definition: lb_policy_registry.cc:169
grpc_core::LoadBalancingPolicyRegistry
Definition: lb_policy_registry.h:35
grpc_core::OrphanablePtr
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:64
grpc_core::LoadBalancingPolicyRegistry::Builder::InitRegistry
static void InitRegistry()
Global initialization and shutdown hooks.
Definition: lb_policy_registry.cc:78
ref_counted_ptr.h
grpc_core::LoadBalancingPolicyRegistry::LoadBalancingPolicyExists
static bool LoadBalancingPolicyExists(const char *name, bool *requires_config)
Definition: lb_policy_registry.cc:109
grpc_error
Definition: error_internal.h:42
grpc_core::LoadBalancingPolicyRegistry::Builder::ShutdownRegistry
static void ShutdownRegistry()
Definition: lb_policy_registry.cc:82
port_platform.h


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