diff options
author | Alistair Veitch <aveitch@google.com> | 2015-08-28 11:00:02 -0700 |
---|---|---|
committer | Alistair Veitch <aveitch@google.com> | 2015-08-28 11:00:02 -0700 |
commit | ae7bbfcb92a519c5a97aae51b2e668cb2d75fe67 (patch) | |
tree | da337117b631a1eead2b984719476e42a29e7994 /src/core/client_config/resolver_registry.h | |
parent | b8552024179a2910f10d916e69495779271f9344 (diff) | |
parent | 9b1f91e7eac88ba477871a60912cc3b6ed3380ed (diff) |
merge to head
Diffstat (limited to 'src/core/client_config/resolver_registry.h')
-rw-r--r-- | src/core/client_config/resolver_registry.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/core/client_config/resolver_registry.h b/src/core/client_config/resolver_registry.h index 31aa47620a..5a7193b7ae 100644 --- a/src/core/client_config/resolver_registry.h +++ b/src/core/client_config/resolver_registry.h @@ -44,19 +44,22 @@ void grpc_resolver_registry_shutdown(void); If \a priority is greater than zero, then the resolver will be eligible to resolve names that are passed in with no scheme. Higher priority resolvers will be tried before lower priority schemes. */ -void grpc_register_resolver_type(const char *scheme, - grpc_resolver_factory *factory); +void grpc_register_resolver_type(grpc_resolver_factory *factory); -/** Create a resolver given \a name. - First tries to parse \a name as a URI. If this succeeds, tries +/** Create a resolver given \a target. + First tries to parse \a target as a URI. If this succeeds, tries to locate a registered resolver factory based on the URI scheme. If parsing or location fails, prefixes default_prefix from - grpc_resolver_registry_init to name, and tries again (if default_prefix + grpc_resolver_registry_init to target, and tries again (if default_prefix was not NULL). If a resolver factory was found, use it to instantiate a resolver and return it. If a resolver factory was not found, return NULL. */ grpc_resolver *grpc_resolver_create( - const char *name, grpc_subchannel_factory *subchannel_factory); + const char *target, grpc_subchannel_factory *subchannel_factory); + +/** Given a target, return a (freshly allocated with gpr_malloc) string + representing the default authority to pass from a client. */ +char *grpc_get_default_authority(const char *target); #endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_RESOLVER_REGISTRY_H */ |