diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/grpc++/ext/reflection.pb.h | 132 | ||||
-rw-r--r-- | include/grpc++/impl/codegen/client_context.h | 20 | ||||
-rw-r--r-- | include/grpc/impl/codegen/grpc_types.h | 17 |
3 files changed, 122 insertions, 47 deletions
diff --git a/include/grpc++/ext/reflection.pb.h b/include/grpc++/ext/reflection.pb.h index caa1592424..6e645af10e 100644 --- a/include/grpc++/ext/reflection.pb.h +++ b/include/grpc++/ext/reflection.pb.h @@ -42,12 +42,12 @@ #include <google/protobuf/stubs/common.h> -#if GOOGLE_PROTOBUF_VERSION < 3000000 +#if GOOGLE_PROTOBUF_VERSION < 3001000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -69,6 +69,7 @@ namespace v1alpha { // Internal implementation detail -- do not call these. void protobuf_AddDesc_reflection_2eproto(); +void protobuf_InitDefaults_reflection_2eproto(); void protobuf_AssignDesc_reflection_2eproto(); void protobuf_ShutdownFile_reflection_2eproto(); @@ -107,6 +108,8 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i MESSAGE_REQUEST_NOT_SET = 0, }; + static const ServerReflectionRequest* internal_default_instance(); + void Swap(ServerReflectionRequest* other); // implements Message ---------------------------------------------- @@ -121,7 +124,7 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -137,6 +140,7 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ServerReflectionRequest* other); + void UnsafeMergeFrom(const ServerReflectionRequest& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -242,7 +246,6 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i inline void clear_has_message_request(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr host_; union MessageRequestUnion { MessageRequestUnion() {} @@ -255,13 +258,15 @@ class ServerReflectionRequest : public ::google::protobuf::Message /* @@protoc_i mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ServerReflectionRequest* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionRequest> ServerReflectionRequest_default_instance_; + // ------------------------------------------------------------------- class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionRequest) */ { @@ -279,6 +284,8 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio static const ::google::protobuf::Descriptor* descriptor(); static const ExtensionRequest& default_instance(); + static const ExtensionRequest* internal_default_instance(); + void Swap(ExtensionRequest* other); // implements Message ---------------------------------------------- @@ -293,7 +300,7 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -309,6 +316,7 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ExtensionRequest* other); + void UnsafeMergeFrom(const ExtensionRequest& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -345,17 +353,18 @@ class ExtensionRequest : public ::google::protobuf::Message /* @@protoc_insertio private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr containing_type_; ::google::protobuf::int32 extension_number_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ExtensionRequest* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionRequest> ExtensionRequest_default_instance_; + // ------------------------------------------------------------------- class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServerReflectionResponse) */ { @@ -381,6 +390,8 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_ MESSAGE_RESPONSE_NOT_SET = 0, }; + static const ServerReflectionResponse* internal_default_instance(); + void Swap(ServerReflectionResponse* other); // implements Message ---------------------------------------------- @@ -395,7 +406,7 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_ void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -411,6 +422,7 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_ void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ServerReflectionResponse* other); + void UnsafeMergeFrom(const ServerReflectionResponse& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -495,7 +507,6 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_ inline void clear_has_message_response(); ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr valid_host_; ::grpc::reflection::v1alpha::ServerReflectionRequest* original_request_; union MessageResponseUnion { @@ -508,13 +519,15 @@ class ServerReflectionResponse : public ::google::protobuf::Message /* @@protoc_ mutable int _cached_size_; ::google::protobuf::uint32 _oneof_case_[1]; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ServerReflectionResponse* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ServerReflectionResponse> ServerReflectionResponse_default_instance_; + // ------------------------------------------------------------------- class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.FileDescriptorResponse) */ { @@ -532,6 +545,8 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in static const ::google::protobuf::Descriptor* descriptor(); static const FileDescriptorResponse& default_instance(); + static const FileDescriptorResponse* internal_default_instance(); + void Swap(FileDescriptorResponse* other); // implements Message ---------------------------------------------- @@ -546,7 +561,7 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -562,6 +577,7 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(FileDescriptorResponse* other); + void UnsafeMergeFrom(const FileDescriptorResponse& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -597,16 +613,17 @@ class FileDescriptorResponse : public ::google::protobuf::Message /* @@protoc_in private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::RepeatedPtrField< ::std::string> file_descriptor_proto_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static FileDescriptorResponse* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<FileDescriptorResponse> FileDescriptorResponse_default_instance_; + // ------------------------------------------------------------------- class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ExtensionNumberResponse) */ { @@ -624,6 +641,8 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i static const ::google::protobuf::Descriptor* descriptor(); static const ExtensionNumberResponse& default_instance(); + static const ExtensionNumberResponse* internal_default_instance(); + void Swap(ExtensionNumberResponse* other); // implements Message ---------------------------------------------- @@ -638,7 +657,7 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -654,6 +673,7 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ExtensionNumberResponse* other); + void UnsafeMergeFrom(const ExtensionNumberResponse& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -696,18 +716,19 @@ class ExtensionNumberResponse : public ::google::protobuf::Message /* @@protoc_i private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr base_type_name_; ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_; mutable int _extension_number_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr base_type_name_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ExtensionNumberResponse* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ExtensionNumberResponse> ExtensionNumberResponse_default_instance_; + // ------------------------------------------------------------------- class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ListServiceResponse) */ { @@ -725,6 +746,8 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser static const ::google::protobuf::Descriptor* descriptor(); static const ListServiceResponse& default_instance(); + static const ListServiceResponse* internal_default_instance(); + void Swap(ListServiceResponse* other); // implements Message ---------------------------------------------- @@ -739,7 +762,7 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -755,6 +778,7 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ListServiceResponse* other); + void UnsafeMergeFrom(const ListServiceResponse& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -786,16 +810,17 @@ class ListServiceResponse : public ::google::protobuf::Message /* @@protoc_inser private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::RepeatedPtrField< ::grpc::reflection::v1alpha::ServiceResponse > service_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ListServiceResponse* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ListServiceResponse> ListServiceResponse_default_instance_; + // ------------------------------------------------------------------- class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ServiceResponse) */ { @@ -813,6 +838,8 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion static const ::google::protobuf::Descriptor* descriptor(); static const ServiceResponse& default_instance(); + static const ServiceResponse* internal_default_instance(); + void Swap(ServiceResponse* other); // implements Message ---------------------------------------------- @@ -827,7 +854,7 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -843,6 +870,7 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ServiceResponse* other); + void UnsafeMergeFrom(const ServiceResponse& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -873,16 +901,17 @@ class ServiceResponse : public ::google::protobuf::Message /* @@protoc_insertion private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr name_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ServiceResponse* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ServiceResponse> ServiceResponse_default_instance_; + // ------------------------------------------------------------------- class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:grpc.reflection.v1alpha.ErrorResponse) */ { @@ -900,6 +929,8 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p static const ::google::protobuf::Descriptor* descriptor(); static const ErrorResponse& default_instance(); + static const ErrorResponse* internal_default_instance(); + void Swap(ErrorResponse* other); // implements Message ---------------------------------------------- @@ -914,7 +945,7 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p void Clear(); bool IsInitialized() const; - int ByteSize() const; + size_t ByteSizeLong() const; bool MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( @@ -930,6 +961,7 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ErrorResponse* other); + void UnsafeMergeFrom(const ErrorResponse& from); private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); @@ -966,17 +998,18 @@ class ErrorResponse : public ::google::protobuf::Message /* @@protoc_insertion_p private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr error_message_; ::google::protobuf::int32 error_code_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_InitDefaults_reflection_2eproto_impl(); + friend void protobuf_AddDesc_reflection_2eproto_impl(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ErrorResponse* default_instance_; }; +extern ::google::protobuf::internal::ExplicitlyConstructed<ErrorResponse> ErrorResponse_default_instance_; + // =================================================================== @@ -1410,6 +1443,9 @@ inline void ServerReflectionRequest::clear_has_message_request() { inline ServerReflectionRequest::MessageRequestCase ServerReflectionRequest::message_request_case() const { return ServerReflectionRequest::MessageRequestCase(_oneof_case_[0]); } +inline const ServerReflectionRequest* ServerReflectionRequest::internal_default_instance() { + return &ServerReflectionRequest_default_instance_.get(); +} // ------------------------------------------------------------------- // ExtensionRequest @@ -1472,6 +1508,9 @@ inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 val // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) } +inline const ExtensionRequest* ExtensionRequest::internal_default_instance() { + return &ExtensionRequest_default_instance_.get(); +} // ------------------------------------------------------------------- // ServerReflectionResponse @@ -1522,7 +1561,7 @@ inline void ServerReflectionResponse::set_allocated_valid_host(::std::string* va // optional .grpc.reflection.v1alpha.ServerReflectionRequest original_request = 2; inline bool ServerReflectionResponse::has_original_request() const { - return !_is_default_instance_ && original_request_ != NULL; + return this != internal_default_instance() && original_request_ != NULL; } inline void ServerReflectionResponse::clear_original_request() { if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; @@ -1530,7 +1569,8 @@ inline void ServerReflectionResponse::clear_original_request() { } inline const ::grpc::reflection::v1alpha::ServerReflectionRequest& ServerReflectionResponse::original_request() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ServerReflectionResponse.original_request) - return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; + return original_request_ != NULL ? *original_request_ + : *::grpc::reflection::v1alpha::ServerReflectionRequest::internal_default_instance(); } inline ::grpc::reflection::v1alpha::ServerReflectionRequest* ServerReflectionResponse::mutable_original_request() { @@ -1759,6 +1799,9 @@ inline void ServerReflectionResponse::clear_has_message_response() { inline ServerReflectionResponse::MessageResponseCase ServerReflectionResponse::message_response_case() const { return ServerReflectionResponse::MessageResponseCase(_oneof_case_[0]); } +inline const ServerReflectionResponse* ServerReflectionResponse::internal_default_instance() { + return &ServerReflectionResponse_default_instance_.get(); +} // ------------------------------------------------------------------- // FileDescriptorResponse @@ -1818,6 +1861,9 @@ FileDescriptorResponse::mutable_file_descriptor_proto() { return &file_descriptor_proto_; } +inline const FileDescriptorResponse* FileDescriptorResponse::internal_default_instance() { + return &FileDescriptorResponse_default_instance_.get(); +} // ------------------------------------------------------------------- // ExtensionNumberResponse @@ -1896,6 +1942,9 @@ ExtensionNumberResponse::mutable_extension_number() { return &extension_number_; } +inline const ExtensionNumberResponse* ExtensionNumberResponse::internal_default_instance() { + return &ExtensionNumberResponse_default_instance_.get(); +} // ------------------------------------------------------------------- // ListServiceResponse @@ -1930,6 +1979,9 @@ ListServiceResponse::service() const { return service_; } +inline const ListServiceResponse* ListServiceResponse::internal_default_instance() { + return &ListServiceResponse_default_instance_.get(); +} // ------------------------------------------------------------------- // ServiceResponse @@ -1978,6 +2030,9 @@ inline void ServiceResponse::set_allocated_name(::std::string* name) { // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ServiceResponse.name) } +inline const ServiceResponse* ServiceResponse::internal_default_instance() { + return &ServiceResponse_default_instance_.get(); +} // ------------------------------------------------------------------- // ErrorResponse @@ -2040,6 +2095,9 @@ inline void ErrorResponse::set_allocated_error_message(::std::string* error_mess // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) } +inline const ErrorResponse* ErrorResponse::internal_default_instance() { + return &ErrorResponse_default_instance_.get(); +} #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index 387d807c4b..a330ed06bb 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -226,8 +226,14 @@ 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; + wait_for_ready_explicitly_set_ = true; + } + + /// DEPRECATED: Use set_wait_for_ready() instead. + void set_fail_fast(bool fail_fast) { set_wait_for_ready(!fail_fast); } #ifndef GRPC_CXX0X_NO_CHRONO /// Return the deadline for the client call. @@ -347,14 +353,18 @@ class ClientContext { uint32_t initial_metadata_flags() const { return (idempotent_ ? GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST : 0) | - (fail_fast_ ? 0 : GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY) | - (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0); + (wait_for_ready_ ? GRPC_INITIAL_METADATA_WAIT_FOR_READY : 0) | + (cacheable_ ? GRPC_INITIAL_METADATA_CACHEABLE_REQUEST : 0) | + (wait_for_ready_explicitly_set_ + ? GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET + : 0); } grpc::string authority() { return authority_; } bool initial_metadata_received_; - bool fail_fast_; + bool wait_for_ready_; + bool wait_for_ready_explicitly_set_; bool idempotent_; bool cacheable_; std::shared_ptr<Channel> channel_; diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 07e7cff201..ebeef038d1 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -257,15 +257,22 @@ typedef enum grpc_call_error { /** Signal that the call is idempotent */ #define GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST (0x00000010u) /** Signal that the call should not return UNAVAILABLE before it has started */ -#define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY (0x00000020u) +#define GRPC_INITIAL_METADATA_WAIT_FOR_READY (0x00000020u) +/** DEPRECATED: for backward compatibility */ +#define GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY \ + GRPC_INITIAL_METADATA_WAIT_FOR_READY /** Signal that the call is cacheable. GRPC is free to use GET verb */ #define GRPC_INITIAL_METADATA_CACHEABLE_REQUEST (0x00000040u) +/** Signal that GRPC_INITIAL_METADATA_WAIT_FOR_READY was explicitly set + by the calling application. */ +#define GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET (0x00000080u) /** Mask of all valid flags */ -#define GRPC_INITIAL_METADATA_USED_MASK \ - (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \ - GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY | \ - GRPC_INITIAL_METADATA_CACHEABLE_REQUEST) +#define GRPC_INITIAL_METADATA_USED_MASK \ + (GRPC_INITIAL_METADATA_IDEMPOTENT_REQUEST | \ + GRPC_INITIAL_METADATA_WAIT_FOR_READY | \ + GRPC_INITIAL_METADATA_CACHEABLE_REQUEST | \ + GRPC_INITIAL_METADATA_WAIT_FOR_READY_EXPLICITLY_SET) /** A single metadata element */ typedef struct grpc_metadata { |