diff options
Diffstat (limited to 'src/core/ext/filters/client_channel/lb_policy.h')
-rw-r--r-- | src/core/ext/filters/client_channel/lb_policy.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/ext/filters/client_channel/lb_policy.h b/src/core/ext/filters/client_channel/lb_policy.h index 72d027995a..d3159eebf3 100644 --- a/src/core/ext/filters/client_channel/lb_policy.h +++ b/src/core/ext/filters/client_channel/lb_policy.h @@ -38,6 +38,8 @@ struct grpc_lb_policy { grpc_pollset_set* interested_parties; /* combiner under which lb_policy actions take place */ grpc_combiner* combiner; + /* callback to force a re-resolution */ + grpc_closure* request_reresolution; }; /** Extra arguments for an LB pick */ @@ -96,6 +98,11 @@ struct grpc_lb_policy_vtable { void (*update_locked)(grpc_exec_ctx* exec_ctx, grpc_lb_policy* policy, const grpc_lb_policy_args* args); + + /** \see grpc_lb_policy_set_reresolve_closure */ + void (*set_reresolve_closure_locked)(grpc_exec_ctx* exec_ctx, + grpc_lb_policy* policy, + grpc_closure* request_reresolution); }; #ifndef NDEBUG @@ -202,4 +209,16 @@ void grpc_lb_policy_update_locked(grpc_exec_ctx* exec_ctx, grpc_lb_policy* policy, const grpc_lb_policy_args* lb_policy_args); +/** Set the re-resolution closure to \a request_reresolution. */ +void grpc_lb_policy_set_reresolve_closure_locked( + grpc_exec_ctx* exec_ctx, grpc_lb_policy* policy, + grpc_closure* request_reresolution); + +/** Try to request a re-resolution. It's NOT a public API; it's only for use by + the LB policy implementations. */ +void grpc_lb_policy_try_reresolve(grpc_exec_ctx* exec_ctx, + grpc_lb_policy* policy, + grpc_core::TraceFlag* grpc_lb_trace, + grpc_error* error); + #endif /* GRPC_CORE_EXT_FILTERS_CLIENT_CHANNEL_LB_POLICY_H */ |