|
GRPC C++
1.0.0
|
#include <client_context.h>
Data Structures | |
| class | GlobalCallbacks |
| Global Callbacks. More... | |
Public Member Functions | |
| ClientContext () | |
| ~ClientContext () | |
| void | AddMetadata (const grpc::string &meta_key, const grpc::string &meta_value) |
| Add the (meta_key, meta_value) pair to the metadata associated with a client call. More... | |
| const std::multimap< grpc::string_ref, grpc::string_ref > & | GetServerInitialMetadata () const |
| Return a collection of initial metadata key-value pairs. More... | |
| const std::multimap< grpc::string_ref, grpc::string_ref > & | GetServerTrailingMetadata () const |
| Return a collection of trailing metadata key-value pairs. More... | |
| template<typename T > | |
| void | set_deadline (const T &deadline) |
| Set the deadline for the client call. More... | |
| void | set_idempotent (bool idempotent) |
| EXPERIMENTAL: Set this request to be idempotent. More... | |
| void | set_fail_fast (bool fail_fast) |
| EXPERIMENTAL: Trigger fail-fast or not on this request. More... | |
| std::chrono::system_clock::time_point | deadline () const |
| Return the deadline for the client call. More... | |
| gpr_timespec | raw_deadline () const |
| Return a gpr_timespec representation of the client call's deadline. More... | |
| void | set_authority (const grpc::string &authority) |
| Set the per call authority header (see https://tools.ietf.org/html/rfc7540#section-8.1.2.3). More... | |
| std::shared_ptr< const AuthContext > | auth_context () const |
| Return the authentication context for this client call. More... | |
| void | set_credentials (const std::shared_ptr< CallCredentials > &creds) |
| Set credentials for the client call. More... | |
| grpc_compression_algorithm | compression_algorithm () const |
| Return the compression algorithm to be used by the client call. More... | |
| void | set_compression_algorithm (grpc_compression_algorithm algorithm) |
| Set algorithm to be the compression algorithm used for the client call. More... | |
| grpc::string | peer () const |
| Return the peer uri in a string. More... | |
| void | set_census_context (struct census_context *ccp) |
| Get and set census context. More... | |
| struct census_context * | census_context () const |
| void | TryCancel () |
| Send a best-effort out-of-band cancel. More... | |
Static Public Member Functions | |
| static std::unique_ptr< ClientContext > | FromServerContext (const ServerContext &server_context, PropagationOptions options=PropagationOptions()) |
| Create a new ClientContext as a child of an incoming server call, according to options (. More... | |
| static void | SetGlobalCallbacks (GlobalCallbacks *callbacks) |
Friends | |
| class | ::grpc::testing::InteropClientContextInspector |
| class | CallOpClientRecvStatus |
| class | CallOpRecvInitialMetadata |
| class | Channel |
| template<class R > | |
| class | ::grpc::ClientReader |
| template<class W > | |
| class | ::grpc::ClientWriter |
| template<class W , class R > | |
| class | ::grpc::ClientReaderWriter |
| template<class R > | |
| class | ::grpc::ClientAsyncReader |
| template<class W > | |
| class | ::grpc::ClientAsyncWriter |
| template<class W , class R > | |
| class | ::grpc::ClientAsyncReaderWriter |
| template<class R > | |
| class | ::grpc::ClientAsyncResponseReader |
| template<class InputMessage , class OutputMessage > | |
| Status | BlockingUnaryCall (ChannelInterface *channel, const RpcMethod &method, ClientContext *context, const InputMessage &request, OutputMessage *result) |
| grpc::ClientContext::ClientContext | ( | ) |
| grpc::ClientContext::~ClientContext | ( | ) |
| void grpc::ClientContext::AddMetadata | ( | const grpc::string & | meta_key, |
| const grpc::string & | meta_value | ||
| ) |
Add the (meta_key, meta_value) pair to the metadata associated with a client call.
These are made available at the server side by the grpc::ServerContext::client_metadata() method.
| meta_key | The metadata key. If meta_value is binary data, it must end in "-bin". |
| meta_value | The metadata value. If its value is binary, it must be base64-encoding (see https://tools.ietf.org/html/rfc4648#section-4) and meta_key must end in "-bin". |
|
inline |
Return the authentication context for this client call.
|
inline |
|
inline |
Return the compression algorithm to be used by the client call.
|
inline |
Return the deadline for the client call.
|
static |
Create a new ClientContext as a child of an incoming server call, according to options (.
| server_context | The source server context to use as the basis for constructing the client context. |
| options | The options controlling what to copy from the server_context. |
|
inline |
Return a collection of initial metadata key-value pairs.
Note that keys may happen more than once (ie, a std::multimap is returned).
|
inline |
Return a collection of trailing metadata key-value pairs.
Note that keys may happen more than once (ie, a std::multimap is returned).
| grpc::string grpc::ClientContext::peer | ( | ) | const |
Return the peer uri in a string.
|
inline |
Return a gpr_timespec representation of the client call's deadline.
|
inline |
Set the per call authority header (see https://tools.ietf.org/html/rfc7540#section-8.1.2.3).
|
inline |
Get and set census context.
| void grpc::ClientContext::set_compression_algorithm | ( | grpc_compression_algorithm | algorithm | ) |
Set algorithm to be the compression algorithm used for the client call.
| algorith | The compression algorithm used for the client call. |
|
inline |
Set credentials for the client call.
A credentials object encapsulates all the state needed by a client to authenticate with a server and make various assertions, e.g., about the client’s identity, role, or whether it is authorized to make a particular call.
|
inline |
Set the deadline for the client call.
| deadline | the deadline for the client call. Units are determined by the type used. |
|
inline |
EXPERIMENTAL: Trigger fail-fast or not on this request.
|
inline |
EXPERIMENTAL: Set this request to be idempotent.
|
static |
| void grpc::ClientContext::TryCancel | ( | ) |
Send a best-effort out-of-band cancel.
The call could be in any stage. e.g. if it is already finished, it may still return success.
There is no guarantee the call will be cancelled.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
1.8.11