diff options
Diffstat (limited to 'src/core/ext/filters/client_channel/resolver_result_parsing.h')
-rw-r--r-- | src/core/ext/filters/client_channel/resolver_result_parsing.h | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/src/core/ext/filters/client_channel/resolver_result_parsing.h b/src/core/ext/filters/client_channel/resolver_result_parsing.h index f1fb7406bc..98a9d26c46 100644 --- a/src/core/ext/filters/client_channel/resolver_result_parsing.h +++ b/src/core/ext/filters/client_channel/resolver_result_parsing.h @@ -36,8 +36,7 @@ namespace internal { class ClientChannelMethodParams; // A table mapping from a method name to its method parameters. -typedef grpc_core::SliceHashTable< - grpc_core::RefCountedPtr<ClientChannelMethodParams>> +typedef SliceHashTable<RefCountedPtr<ClientChannelMethodParams>> ClientChannelMethodParamsTable; // A container of processed fields from the resolver result. Simplifies the @@ -47,33 +46,30 @@ class ProcessedResolverResult { // Processes the resolver result and populates the relative members // for later consumption. Tries to parse retry parameters only if parse_retry // is true. - ProcessedResolverResult(const grpc_channel_args* resolver_result, + ProcessedResolverResult(const grpc_channel_args& resolver_result, bool parse_retry); // Getters. Any managed object's ownership is transferred. - grpc_core::UniquePtr<char> service_config_json() { + UniquePtr<char> service_config_json() { return std::move(service_config_json_); } - grpc_core::RefCountedPtr<ServerRetryThrottleData> retry_throttle_data() { + RefCountedPtr<ServerRetryThrottleData> retry_throttle_data() { return std::move(retry_throttle_data_); } - grpc_core::RefCountedPtr<ClientChannelMethodParamsTable> - method_params_table() { + RefCountedPtr<ClientChannelMethodParamsTable> method_params_table() { return std::move(method_params_table_); } - grpc_core::UniquePtr<char> lb_policy_name() { - return std::move(lb_policy_name_); - } + UniquePtr<char> lb_policy_name() { return std::move(lb_policy_name_); } grpc_json* lb_policy_config() { return lb_policy_config_; } private: // Finds the service config; extracts LB config and (maybe) retry throttle // params from it. - void ProcessServiceConfig(const grpc_channel_args* resolver_result, + void ProcessServiceConfig(const grpc_channel_args& resolver_result, bool parse_retry); // Finds the LB policy name (when no LB config was found). - void ProcessLbPolicyName(const grpc_channel_args* resolver_result); + void ProcessLbPolicyName(const grpc_channel_args& resolver_result); // Parses the service config. Intended to be used by // ServiceConfig::ParseGlobalParams. @@ -85,16 +81,16 @@ class ProcessedResolverResult { void ParseRetryThrottleParamsFromServiceConfig(const grpc_json* field); // Service config. - grpc_core::UniquePtr<char> service_config_json_; - grpc_core::UniquePtr<grpc_core::ServiceConfig> service_config_; + UniquePtr<char> service_config_json_; + UniquePtr<grpc_core::ServiceConfig> service_config_; // LB policy. grpc_json* lb_policy_config_ = nullptr; - grpc_core::UniquePtr<char> lb_policy_name_; + UniquePtr<char> lb_policy_name_; // Retry throttle data. char* server_name_ = nullptr; - grpc_core::RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_; + RefCountedPtr<ServerRetryThrottleData> retry_throttle_data_; // Method params table. - grpc_core::RefCountedPtr<ClientChannelMethodParamsTable> method_params_table_; + RefCountedPtr<ClientChannelMethodParamsTable> method_params_table_; }; // The parameters of a method. |