GRPC C++  1.39.1
ring_hash.h
Go to the documentation of this file.
1 //
2 // Copyright 2018 gRPC authors.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 //
16 
17 #ifndef GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H
18 #define GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H
19 
21 
22 #include <stdlib.h>
23 
25 #include "src/core/lib/json/json.h"
26 
27 namespace grpc_core {
28 extern const char* kRequestRingHashAttribute;
29 
30 // Helper Parsing method to parse ring hash policy configs; for example, ring
31 // hash size validity.
32 void ParseRingHashLbConfig(const Json& json, size_t* min_ring_size,
33  size_t* max_ring_size,
34  std::vector<grpc_error_handle>* error_list);
35 } // namespace grpc_core
36 
37 #endif // GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_RING_HASH_RING_HASH_H
Round Robin Policy.
Definition: backend_metric.cc:26
const char * kRequestRingHashAttribute
Definition: ring_hash.cc:44
void ParseRingHashLbConfig(const Json &json, size_t *min_ring_size, size_t *max_ring_size, std::vector< grpc_error_handle > *error_list)
Definition: ring_hash.cc:48