diff options
author | 2016-09-13 14:57:50 -0700 | |
---|---|---|
committer | 2016-09-13 14:57:50 -0700 | |
commit | f5afcd9f65900b8aa6003d6c7b7c43e44b34a623 (patch) | |
tree | f705e883071e1a6b0020a2180c4fd67f4deffe02 /include/grpc++ | |
parent | ebfcd97940e6688a37c36cdeac87da3196ce1a9b (diff) | |
parent | 6e51f992c6bfdfba61d984ab173305da455bd2e7 (diff) |
Merge remote-tracking branch 'upstream/master' into max_send_size_filter
Diffstat (limited to 'include/grpc++')
-rw-r--r-- | include/grpc++/impl/codegen/client_context.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index d77ca4c396..9fecb5043e 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -225,6 +225,9 @@ class ClientContext { /// EXPERIMENTAL: Set this request to be idempotent void set_idempotent(bool idempotent) { idempotent_ = idempotent; } + /// 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; } @@ -346,7 +349,8 @@ class ClientContext { uint32_t initial_metadata_flags() const { return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) | - (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY); + (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) | + (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0); } grpc::string authority() { return authority_; } @@ -354,6 +358,7 @@ class ClientContext { bool initial_metadata_received_; bool fail_fast_; bool idempotent_; + bool cacheable_; std::shared_ptr<Channel> channel_; grpc::mutex mu_; grpc_call* call_; |