GRPC Core  9.0.0
lb_policy_factory.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_FACTORY_H
20 #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H
21 
23 
26 
27 namespace grpc_core {
28 
30  public:
33  LoadBalancingPolicy::Args) const = 0;
34 
37  virtual const char* name() const = 0;
38 
40  const grpc_json* json, grpc_error** error) const = 0;
41 
43 };
44 
45 } // namespace grpc_core
46 
47 #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_FACTORY_H */
Definition: error_internal.h:39
std::unique_ptr< T, Deleter > OrphanablePtr
Definition: orphanable.h:68
virtual OrphanablePtr< LoadBalancingPolicy > CreateLoadBalancingPolicy(LoadBalancingPolicy::Args) const =0
Returns a new LB policy instance.
Round Robin Policy.
Definition: backend_metric.cc:24
virtual RefCountedPtr< LoadBalancingPolicy::Config > ParseLoadBalancingConfig(const grpc_json *json, grpc_error **error) const =0
Definition: ref_counted_ptr.h:35
Definition: lb_policy_factory.h:29
virtual ~LoadBalancingPolicyFactory()
Definition: lb_policy_factory.h:42
Definition: json.h:32
Args used to instantiate an LB policy.
Definition: lb_policy.h:311
virtual const char * name() const =0
Returns the LB policy name that this factory provides.