Go to the documentation of this file.
56 std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
58 : host_(host), c_channel_(
channel) {
66 if (callback_cq !=
nullptr) {
78 inline grpc_slice SliceFromArray(
const char* arr,
size_t len) {
84 char*** channel_info_field) {
85 char*
value =
nullptr;
86 memset(channel_info, 0,
sizeof(*channel_info));
87 *channel_info_field = &
value;
89 if (
value ==
nullptr)
return "";
99 return GetChannelInfoField(
c_channel_, &channel_info,
105 return GetChannelInfoField(
c_channel_, &channel_info,
109 namespace experimental {
131 }
else if (!
host_.empty()) {
137 if (host_str !=
nullptr) {
146 if (host_str !=
nullptr) {
189 ~TagSaver()
override {}
190 bool FinalizeResult(
void**
tag,
bool* )
override {
205 TagSaver* tag_saver =
new TagSaver(
tag);
207 cq->cq(), tag_saver);
239 auto*
callback =
static_cast<ShutdownCallback*
>(
cb);
253 if (callback_cq !=
nullptr) {
259 callback_cq =
callback_cq_.load(std::memory_order_relaxed);
260 if (callback_cq ==
nullptr) {
264 auto* shutdown_callback =
new ShutdownCallback;
270 shutdown_callback->TakeCQ(callback_cq);
275 callback_cq_.store(callback_cq, std::memory_order_release);
struct census_context * census_context() const
Returns the census context that has been set, or nullptr if not set.
GPRAPI void grpc_slice_unref(grpc_slice s)
grpc_completion_queue * cq_
std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface > > interceptor_creators_
void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed, gpr_timespec deadline, grpc::CompletionQueue *cq, void *tag) override
void PerformOpsOnCall(grpc::internal::CallOpSetInterface *ops, grpc::internal::Call *call) override
void set_call(grpc_call *call, const std::shared_ptr< grpc::Channel > &channel)
GRPCAPI void grpc_channel_get_info(grpc_channel *channel, const grpc_channel_info *channel_info)
gpr_free(creds_file_name)
void ChannelResetConnectionBackoff(Channel *channel)
return memset(p, 0, total)
GRPCAPI void grpc_channel_reset_connect_backoff(grpc_channel *channel)
GRPCAPI void grpc_census_call_set_context(grpc_call *call, struct census_context *context)
std::atomic< CompletionQueue * > callback_cq_
static grpc::internal::GrpcLibraryInitializer g_gli_initializer
GRPCAPI grpc_connectivity_state grpc_channel_check_connectivity_state(grpc_channel *channel, int try_to_connect)
grpc_slice SliceFromCopiedString(const std::string &str)
Channels represent a connection to an endpoint. Created by CreateChannel.
GRPCAPI void * grpc_channel_register_call(grpc_channel *channel, const char *method, const char *host, void *reserved)
bool grpc_iomgr_run_in_background()
CoreCodegenInterface * g_core_codegen_interface
gpr_timespec raw_deadline() const
Return a gpr_timespec representation of the client call's deadline.
Instantiating this class ensures the proper initialization of gRPC.
wrapped_grpc_channel * channel
std::string GetLoadBalancingPolicyName() const
Returns the LB policy name, or the empty string if not yet available.
@ GRPC_CQ_DEFAULT_POLLING
grpc_connectivity_state GetState(bool try_to_connect) override
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
Descriptor of an RPC method.
static void * tag(intptr_t t)
static void ReleaseCallbackAlternativeCQ(CompletionQueue *cq)
struct grpc_call grpc_call
virtual grpc_slice grpc_slice_from_copied_buffer(const void *buffer, size_t length)=0
static CompletionQueue * CallbackAlternativeCQ()
grpc_channel *const c_channel_
static void callback(void *arg, int status, int timeouts, struct hostent *host)
Straightforward wrapping of the C call object.
grpc::internal::Mutex mu_
GRPCAPI grpc_call * grpc_channel_create_registered_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved)
GRPCAPI grpc_call * grpc_channel_create_call(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, grpc_slice method, const grpc_slice *host, gpr_timespec deadline, void *reserved)
Channel(const std::string &host, grpc_channel *c_channel, std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> interceptor_creators)
char ** service_config_json
#define GRPC_CQ_CURRENT_VERSION
bool WaitForStateChangeImpl(grpc_connectivity_state last_observed, gpr_timespec deadline) override
grpc_call * propagate_from_call_
GRPCAPI void grpc_channel_destroy(grpc_channel *channel)
void * RegisterMethod(const char *method) override
struct grpc_channel grpc_channel
GRPCAPI void grpc_channel_watch_connectivity_state(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
grpc::ClientContext context
std::string GetServiceConfigJSON() const
grpc::internal::Call CreateCallInternal(const grpc::internal::RpcMethod &method, grpc::ClientContext *context, grpc::CompletionQueue *cq, size_t interceptor_pos) override
grpc::internal::Call CreateCall(const grpc::internal::RpcMethod &method, grpc::ClientContext *context, grpc::CompletionQueue *cq) override
An interface allowing implementors to process and filter event tags.
PropagationOptions propagation_options_
grpc::CompletionQueue * CallbackCQ() override
grpc::experimental::ClientRpcInfo * set_client_rpc_info(const char *method, const char *suffix_for_stats, grpc::internal::RpcMethod::RpcType type, grpc::ChannelInterface *channel, const std::vector< std::unique_ptr< grpc::experimental::ClientInterceptorFactoryInterface >> &creators, size_t interceptor_pos)
static grpc_completion_queue * cq
OPENSSL_EXPORT pem_password_cb * cb
uint32_t c_bitmask() const
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:52