aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-09-27 13:07:00 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-09-27 13:07:00 -0700
commit94777240032e41dd0cfb56218a09912395aded05 (patch)
tree284a33b102416e07970f0a0c5240c4f97900be91 /include
parent9a574ec95289c9382fd0f130da12371e63e798a1 (diff)
Change C++ API to expose wait_for_ready instead of fail_fast.
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/impl/codegen/client_context.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h
index 387d807c4b..faabddecc3 100644
--- a/include/grpc++/impl/codegen/client_context.h
+++ b/include/grpc++/impl/codegen/client_context.h
@@ -226,8 +226,13 @@ class ClientContext {
/// EXPERIMENTAL: Set this request to be cacheable
void set_cacheable(bool cacheable) { cacheable_ = cacheable; }
- /// EXPERIMENTAL: Trigger fail-fast or not on this request
- void set_fail_fast(bool fail_fast) { fail_fast_ = fail_fast; }
+ /// EXPERIMENTAL: Trigger wait-for-ready or not on this request
+ void set_wait_for_ready(bool wait_for_ready) {
+ wait_for_ready_ = wait_for_ready;
+ }
+
+ /// DEPRECATED: Use set_wait_for_ready() instead.
+ void set_fail_fast(bool fail_fast) { wait_for_ready_ = !fail_fast; }
#ifndef GRPC_CXX0X_NO_CHRONO
/// Return the deadline for the client call.
@@ -347,14 +352,14 @@ class ClientContext {
uint32_t initial_metadata_flags() const {
return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) |
- (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) |
+ (wait_for_ready_ ? GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY : 0) |
(cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0);
}
grpc::string authority() { return authority_; }
bool initial_metadata_received_;
- bool fail_fast_;
+ bool wait_for_ready_;
bool idempotent_;
bool cacheable_;
std::shared_ptr<Channel> channel_;