GRPC C++  1.39.1
Data Structures | Public Types | Static Public Member Functions | Static Public Attributes
grpc_core::ServiceConfigParser Class Reference

#include <service_config_parser.h>

Data Structures

class  ParsedConfig
 This is the base class that all service config parsers MUST use to store parsed service config data. More...
 
class  Parser
 This is the base class that all service config parsers should derive from. More...
 

Public Types

typedef absl::InlinedVector< std::unique_ptr< ParsedConfig >, kNumPreallocatedParsersParsedConfigVector
 

Static Public Member Functions

static void Init ()
 
static void Shutdown ()
 
static size_t RegisterParser (std::unique_ptr< Parser > parser)
 Globally register a service config parser. More...
 
static ParsedConfigVector ParseGlobalParameters (const grpc_channel_args *args, const Json &json, grpc_error_handle *error)
 
static ParsedConfigVector ParsePerMethodParameters (const grpc_channel_args *args, const Json &json, grpc_error_handle *error)
 

Static Public Attributes

static constexpr int kNumPreallocatedParsers = 4
 

Member Typedef Documentation

◆ ParsedConfigVector

Member Function Documentation

◆ Init()

void grpc_core::ServiceConfigParser::Init ( )
static

◆ ParseGlobalParameters()

ServiceConfigParser::ParsedConfigVector grpc_core::ServiceConfigParser::ParseGlobalParameters ( const grpc_channel_args args,
const Json json,
grpc_error_handle error 
)
static

◆ ParsePerMethodParameters()

ServiceConfigParser::ParsedConfigVector grpc_core::ServiceConfigParser::ParsePerMethodParameters ( const grpc_channel_args args,
const Json json,
grpc_error_handle error 
)
static

◆ RegisterParser()

size_t grpc_core::ServiceConfigParser::RegisterParser ( std::unique_ptr< Parser parser)
static

Globally register a service config parser.

On successful registration, it returns the index at which the parser was registered. On failure, -1 is returned. Each new service config update will go through all the registered parser. Each parser is responsible for reading the service config json and returning a parsed config. This parsed config can later be retrieved using the same index that was returned at registration time.

◆ Shutdown()

void grpc_core::ServiceConfigParser::Shutdown ( )
static

Field Documentation

◆ kNumPreallocatedParsers

constexpr int grpc_core::ServiceConfigParser::kNumPreallocatedParsers = 4
staticconstexpr

The documentation for this class was generated from the following files: