Update comments.

pull/8462/head
Mark D. Roth 8 years ago
parent 1179fbdb42
commit e917f5d96a
  1. 6
      src/core/ext/client_channel/lb_policy_factory.h
  2. 10
      src/core/ext/client_channel/resolver.h
  3. 4
      src/core/ext/client_channel/resolver_registry.h

@ -77,8 +77,7 @@ typedef struct grpc_lb_addresses {
grpc_lb_addresses *grpc_lb_addresses_create( grpc_lb_addresses *grpc_lb_addresses_create(
size_t num_addresses, const grpc_lb_user_data_vtable *user_data_vtable); size_t num_addresses, const grpc_lb_user_data_vtable *user_data_vtable);
/** Creates a copy of \a addresses. If \a user_data_copy is not NULL, /** Creates a copy of \a addresses. */
* it will be invoked to copy the \a user_data field of each address. */
grpc_lb_addresses *grpc_lb_addresses_copy(const grpc_lb_addresses *addresses); grpc_lb_addresses *grpc_lb_addresses_copy(const grpc_lb_addresses *addresses);
/** Sets the value of the address at index \a index of \a addresses. /** Sets the value of the address at index \a index of \a addresses.
@ -93,8 +92,7 @@ void grpc_lb_addresses_set_address(grpc_lb_addresses *addresses, size_t index,
int grpc_lb_addresses_cmp(const grpc_lb_addresses *addresses1, int grpc_lb_addresses_cmp(const grpc_lb_addresses *addresses1,
const grpc_lb_addresses *addresses2); const grpc_lb_addresses *addresses2);
/** Destroys \a addresses. If \a user_data_destroy is not NULL, it will /** Destroys \a addresses. */
* be invoked to destroy the \a user_data field of each address. */
void grpc_lb_addresses_destroy(grpc_lb_addresses *addresses); void grpc_lb_addresses_destroy(grpc_lb_addresses *addresses);
/** Returns a channel arg containing \a addresses. */ /** Returns a channel arg containing \a addresses. */

@ -40,7 +40,7 @@
typedef struct grpc_resolver grpc_resolver; typedef struct grpc_resolver grpc_resolver;
typedef struct grpc_resolver_vtable grpc_resolver_vtable; typedef struct grpc_resolver_vtable grpc_resolver_vtable;
/** grpc_resolver provides grpc_channel_args objects to grpc_channel objects */ /** \a grpc_resolver provides \a grpc_channel_args objects to its caller */
struct grpc_resolver { struct grpc_resolver {
const grpc_resolver_vtable *vtable; const grpc_resolver_vtable *vtable;
gpr_refcount refs; gpr_refcount refs;
@ -79,11 +79,11 @@ void grpc_resolver_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver);
void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx, void grpc_resolver_channel_saw_error(grpc_exec_ctx *exec_ctx,
grpc_resolver *resolver); grpc_resolver *resolver);
/** Get the next result from the resolver. Expected to set *result with /** Get the next result from the resolver. Expected to set \a *result with
new channel args and then schedule on_complete for execution. new channel args and then schedule \a on_complete for execution.
If resolution is fatally broken, set *result to NULL and If resolution is fatally broken, set \a *result to NULL and
schedule on_complete. */ schedule \a on_complete. */
void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, void grpc_resolver_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver,
grpc_channel_args **result, grpc_closure *on_complete); grpc_channel_args **result, grpc_closure *on_complete);

@ -57,7 +57,9 @@ void grpc_register_resolver_type(grpc_resolver_factory *factory);
was not NULL). was not NULL).
If a resolver factory was found, use it to instantiate a resolver and If a resolver factory was found, use it to instantiate a resolver and
return it. return it.
If a resolver factory was not found, return NULL. */ If a resolver factory was not found, return NULL.
\a args is a set of channel arguments to be included in the result
(typically the set of arguments passed in from the client API). */
grpc_resolver *grpc_resolver_create(const char *target, grpc_resolver *grpc_resolver_create(const char *target,
const grpc_channel_args *args); const grpc_channel_args *args);

Loading…
Cancel
Save