GRPC Core  9.0.0
Data Structures | Static Public Member Functions
grpc_core::ResolverRegistry Class Reference

#include <resolver_registry.h>

Data Structures

class  Builder
 Methods used to create and populate the ResolverRegistry. More...
 

Static Public Member Functions

static bool IsValidTarget (const char *target)
 Checks whether the user input target is valid to create a resolver. More...
 
static OrphanablePtr< ResolverCreateResolver (const char *target, const grpc_channel_args *args, grpc_pollset_set *pollset_set, Combiner *combiner, std::unique_ptr< Resolver::ResultHandler > result_handler)
 Creates a resolver given target. More...
 
static grpc_core::UniquePtr< char > GetDefaultAuthority (const char *target)
 Returns the default authority to pass from a client for target. More...
 
static grpc_core::UniquePtr< char > AddDefaultPrefixIfNeeded (const char *target)
 Returns target with the default prefix prepended, if needed. More...
 
static ResolverFactoryLookupResolverFactory (const char *scheme)
 Returns the resolver factory for scheme. More...
 

Member Function Documentation

◆ AddDefaultPrefixIfNeeded()

grpc_core::UniquePtr< char > grpc_core::ResolverRegistry::AddDefaultPrefixIfNeeded ( const char *  target)
static

Returns target with the default prefix prepended, if needed.

◆ CreateResolver()

OrphanablePtr< Resolver > grpc_core::ResolverRegistry::CreateResolver ( const char *  target,
const grpc_channel_args args,
grpc_pollset_set pollset_set,
Combiner combiner,
std::unique_ptr< Resolver::ResultHandler result_handler 
)
static

Creates a resolver given target.

First tries to parse target as a URI. If this succeeds, tries to locate a registered resolver factory based on the URI scheme. If parsing fails or there is no factory for the URI's scheme, prepends default_prefix to target and tries again. If a resolver factory is found, uses it to instantiate a resolver and returns it; otherwise, returns nullptr. args, pollset_set, and combiner are passed to the factory's CreateResolver() method. args are the channel args to be included in resolver results. pollset_set is used to drive I/O in the name resolution process. combiner is the combiner under which all resolver calls will be run. result_handler is used to return results from the resolver.

◆ GetDefaultAuthority()

grpc_core::UniquePtr< char > grpc_core::ResolverRegistry::GetDefaultAuthority ( const char *  target)
static

Returns the default authority to pass from a client for target.

◆ IsValidTarget()

bool grpc_core::ResolverRegistry::IsValidTarget ( const char *  target)
static

Checks whether the user input target is valid to create a resolver.

◆ LookupResolverFactory()

ResolverFactory * grpc_core::ResolverRegistry::LookupResolverFactory ( const char *  scheme)
static

Returns the resolver factory for scheme.

Caller does NOT own the return value.


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