Go to the documentation of this file.
27 #include "absl/memory/memory.h"
28 #include "absl/strings/str_cat.h"
61 std::vector<grpc_error_handle> error_list;
69 if (!error_list.empty()) {
83 std::vector<grpc_error_handle> error_list;
86 absl::make_unique<ServiceConfigParser::ParsedConfigVector>();
90 args, json, &parser_error);
92 error_list.push_back(parser_error);
97 bool found_name =
false;
102 "field:name error:not of type Array"));
106 for (
const Json&
name : name_array) {
116 "field:name error:multiple default method configs"));
124 if (
value !=
nullptr) {
126 "field:name error:multiple method configs with same name"));
145 std::vector<grpc_error_handle> error_list;
150 "field:methodConfig error:not of type Array"));
155 "field:methodConfig error:not of type Object"));
160 error_list.push_back(
error);
171 "field:name error:type is not object");
181 "field:name error: field:service error:not of type string");
184 if (!
it->second.string_value().empty()) {
185 service_name = &
it->second.string_value();
195 "field:name error: field:method error:not of type string");
198 if (!
it->second.string_value().empty()) {
204 if (service_name ==
nullptr) {
207 "field:name error:method name populated without service name");
227 char*
sep = strrchr(path_str.get(),
'/');
228 if (
sep ==
nullptr)
return nullptr;
std::vector< Json > Array
const ServiceConfigParser::ParsedConfigVector * GetMethodParsedConfigVector(const grpc_slice &path) const override
std::string StrCat(const AlphaNum &a, const AlphaNum &b)
#define GPR_DEBUG_ASSERT(x)
GPRAPI grpc_slice grpc_slice_from_copied_string(const char *source)
const ServiceConfigParser & service_config_parser() const
grpc_error_handle ParsePerMethodParams(const grpc_channel_args *args)
const Object & object_value() const
std::vector< std::unique_ptr< ParsedConfig > > ParsedConfigVector
#define GRPC_ERROR_CREATE_FROM_VECTOR(desc, error_list)
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
static const CoreConfiguration & Get()
const ServiceConfigParser::ParsedConfigVector * default_method_config_vector_
JSON (JavaScript Object Notation).
absl::string_view json_string() const override
GPRAPI grpc_slice grpc_slice_from_static_string(const char *source)
std::vector< std::unique_ptr< ServiceConfigParser::ParsedConfig > > parsed_global_configs_
std::unique_ptr< T, DefaultDeleteChar > UniquePtr
static RefCountedPtr< ServiceConfig > Create(const grpc_channel_args *args, absl::string_view json_string, grpc_error_handle *error)
#define GRPC_ERROR_CREATE_FROM_STATIC_STRING(desc)
static Json Parse(absl::string_view json_str, grpc_error_handle *error)
GPRAPI char * grpc_slice_to_c_string(grpc_slice s)
std::vector< std::unique_ptr< ServiceConfigParser::ParsedConfigVector > > parsed_method_config_vectors_storage_
std::unordered_map< grpc_slice, const ServiceConfigParser::ParsedConfigVector *, SliceHash > parsed_method_configs_map_
~ServiceConfigImpl() override
RefCountedPtr< ServiceConfig > method_config
ParsedConfigVector ParseGlobalParameters(const grpc_channel_args *args, const Json &json, grpc_error_handle *error) const
static std::string ParseJsonMethodName(const Json &json, grpc_error_handle *error)
absl::string_view method_name
ServiceConfigImpl(const grpc_channel_args *args, std::string json_string, Json json, grpc_error_handle *error)
grpc_error_handle ParseJsonMethodConfig(const grpc_channel_args *args, const Json &json)
ParsedConfigVector ParsePerMethodParameters(const grpc_channel_args *args, const Json &json, grpc_error_handle *error) const
void grpc_slice_unref_internal(const grpc_slice &slice)
#define GRPC_ERROR_IS_NONE(err)
grpc
Author(s):
autogenerated on Thu Mar 13 2025 03:01:17