#include <grpc/support/port_platform.h>#include "src/core/lib/surface/channel.h"#include <inttypes.h>#include <string.h>#include <algorithm>#include <atomic>#include <functional>#include <memory>#include "absl/status/status.h"#include <grpc/compression.h>#include <grpc/grpc.h>#include <grpc/impl/codegen/gpr_types.h>#include <grpc/support/alloc.h>#include <grpc/support/log.h>#include "src/core/lib/channel/channel_args.h"#include "src/core/lib/channel/channel_stack.h"#include "src/core/lib/channel/channel_stack_builder_impl.h"#include "src/core/lib/channel/channel_trace.h"#include "src/core/lib/channel/channelz.h"#include "src/core/lib/config/core_configuration.h"#include "src/core/lib/debug/stats.h"#include "src/core/lib/debug/trace.h"#include "src/core/lib/gpr/useful.h"#include "src/core/lib/gprpp/manual_constructor.h"#include "src/core/lib/gprpp/ref_counted_ptr.h"#include "src/core/lib/iomgr/error.h"#include "src/core/lib/iomgr/exec_ctx.h"#include "src/core/lib/resource_quota/memory_quota.h"#include "src/core/lib/resource_quota/resource_quota.h"#include "src/core/lib/slice/slice_refcount.h"#include "src/core/lib/surface/api_trace.h"#include "src/core/lib/surface/call.h"#include "src/core/lib/surface/channel_init.h"#include "src/core/lib/surface/channel_stack_type.h"#include "src/core/lib/transport/transport.h"
Go to the source code of this file.
Namespaces | |
| grpc_core | |
| 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 | ||
| ) |
Create a call given a grpc_channel, in order to call 'method'. All completions are sent to 'completion_queue'. 'method' and 'host' need only live through the invocation of this function. If parent_call is non-NULL, it must be a server-side call. It will be used to propagate properties from the server call to this new client call, depending on the value of propagation_mask (see propagation_bits.h for possible values).
Definition at line 311 of file channel.cc.
|
static |
Definition at line 285 of file channel.cc.
| grpc_call* grpc_channel_create_pollset_set_call | ( | grpc_channel * | channel, |
| grpc_call * | parent_call, | ||
| uint32_t | propagation_mask, | ||
| grpc_pollset_set * | pollset_set, | ||
| const grpc_slice & | method, | ||
| const grpc_slice * | host, | ||
| grpc_core::Timestamp | deadline, | ||
| void * | reserved | ||
| ) |
Create a call given a grpc_channel, in order to call method. Progress is tied to activity on pollset_set. The returned call object is meant to be used with grpc_call_start_batch_and_execute, which relies on callbacks to signal completions. method and host need only live through the invocation of this function. If parent_call is non-NULL, it must be a server-side call. It will be used to propagate properties from the server call to this new client call, depending on the value of propagation_mask (see propagation_bits.h for possible values)
Definition at line 331 of file channel.cc.
| 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 | ||
| ) |
Create a call given a handle returned from grpc_channel_register_call.
Definition at line 394 of file channel.cc.
| void grpc_channel_destroy | ( | grpc_channel * | channel | ) |
Close and destroy a grpc channel
Definition at line 437 of file channel.cc.
| void grpc_channel_destroy_internal | ( | grpc_channel * | channel | ) |
The same as grpc_channel_destroy, but doesn't create an ExecCtx, and so is safe to use from within core.
Definition at line 425 of file channel.cc.
| void grpc_channel_get_info | ( | grpc_channel * | channel, |
| const grpc_channel_info * | channel_info | ||
| ) |
Request info about the channel. channel_info indicates what information is being requested and how that information will be returned. channel_info is owned by the caller.
Definition at line 264 of file channel.cc.
| char* grpc_channel_get_target | ( | grpc_channel * | channel | ) |
Return a newly allocated string representing the target a channel was created for.
Definition at line 256 of file channel.cc.
| void* grpc_channel_register_call | ( | grpc_channel * | channel, |
| const char * | method, | ||
| const char * | host, | ||
| void * | reserved | ||
| ) |
Pre-register a method/host pair on a channel. method and host are not owned and must remain alive while the channel is alive.
Definition at line 365 of file channel.cc.
| void grpc_channel_reset_connect_backoff | ( | grpc_channel * | channel | ) |
EXPERIMENTAL. Resets the channel's connect backoff. TODO(roth): When we see whether this proves useful, either promote to non-experimental or remove it.
Definition at line 273 of file channel.cc.