diff options
Diffstat (limited to 'src/core/ext/client_config/lb_policy_factory.h')
-rw-r--r-- | src/core/ext/client_config/lb_policy_factory.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/core/ext/client_config/lb_policy_factory.h b/src/core/ext/client_config/lb_policy_factory.h index da1de3579a..7191ca7d89 100644 --- a/src/core/ext/client_config/lb_policy_factory.h +++ b/src/core/ext/client_config/lb_policy_factory.h @@ -47,8 +47,19 @@ struct grpc_lb_policy_factory { const grpc_lb_policy_factory_vtable *vtable; }; +/** A resolved address alongside any LB related information associated with it. + * \a user_data, if not NULL, contains opaque data meant to be consumed by the + * gRPC LB policy. Note that no all LB policies support \a user_data as input. + * Those who don't will simply ignore it and will correspondingly return NULL in + * their namesake pick() output argument. */ +typedef struct grpc_lb_address { + grpc_resolved_address *resolved_address; + void *user_data; +} grpc_lb_address; + typedef struct grpc_lb_policy_args { - grpc_resolved_addresses *addresses; + grpc_lb_address *addresses; + size_t num_addresses; grpc_client_channel_factory *client_channel_factory; } grpc_lb_policy_args; |