Go to the documentation of this file.
19 #ifndef GRPCPP_SUPPORT_CHANNEL_ARGUMENTS_H
20 #define GRPCPP_SUPPORT_CHANNEL_ARGUMENTS_H
31 class ChannelCredentials;
33 class ChannelArgumentsTest;
97 void SetInt(
const std::string& key,
int value);
102 void SetPointer(
const std::string& key,
void* value);
111 void SetString(
const std::string& key,
const std::string& value);
118 out.
args = args_.empty() ? nullptr :
const_cast<grpc_arg*
>(&args_[0]);
127 struct PointerVtableMembers {
128 static void* Copy(
void* in) {
return in; }
129 static void Destroy(
void* ) {}
130 static int Compare(
void* a,
void* b) {
131 if (a < b)
return -1;
138 std::string GetSslTargetNameOverride()
const;
140 std::vector<grpc_arg> args_;
141 std::list<std::string> strings_;
146 #endif // GRPCPP_SUPPORT_CHANNEL_ARGUMENTS_H
A single argument...
Definition: grpc_types.h:102
struct grpc_socket_mutator grpc_socket_mutator
The Socket Mutator interface allows changes on socket options.
Definition: grpc_types.h:72
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm.h:33
friend class grpc::testing::ChannelArgumentsTest
Definition: channel_arguments.h:124
grpc_compression_algorithm
The various compression algorithms supported by gRPC (not sorted by compression level)
Definition: compression_types.h:60
void SetLoadBalancingPolicyName(const std::string &lb_policy_name)
Set LB policy name.
void SetInt(const std::string &key, int value)
Set an integer argument value under key.
Definition: grpc_types.h:84
An array of arguments that can be passed around.
Definition: grpc_types.h:131
Options for channel creation.
Definition: channel_arguments.h:39
void Swap(ChannelArguments &other)
void SetUserAgentPrefix(const std::string &user_agent_prefix)
Set the string to prepend to the user agent.
void SetString(const std::string &key, const std::string &value)
Set a textual argument value under key.
void SetMaxSendMessageSize(int size)
void SetMaxReceiveMessageSize(int size)
Set the max receive and send message sizes.
size_t num_args
Definition: grpc_types.h:132
ResourceQuota represents a bound on memory and thread usage by the gRPC library.
Definition: resource_quota.h:34
void SetGrpclbFallbackTimeout(int fallback_timeout)
Set the grpclb fallback timeout (in ms) for the channel.
grpc_channel_args c_channel_args() const
Return (by value) a C grpc_channel_args structure which points to arguments owned by this ChannelArgu...
Definition: channel_arguments.h:115
void SetChannelArgs(grpc_channel_args *channel_args) const
Dump arguments in this instance to channel_args.
void SetServiceConfigJSON(const std::string &service_config_json)
Set service config in JSON form.
void SetSocketMutator(grpc_socket_mutator *mutator)
Set a mutator for the underlying socket.
A channel credentials object encapsulates all the state needed by a client to authenticate with a ser...
Definition: credentials.h:70
void SetPointerWithVtable(const std::string &key, void *value, const grpc_arg_pointer_vtable *vtable)
Set a pointer argument value under key, transferring ownership of value to the ChannelArguments objec...
void SetResourceQuota(const grpc::ResourceQuota &resource_quota)
Set the buffer pool to be attached to the constructed channel.
ChannelArguments & operator=(ChannelArguments other)
Definition: channel_arguments.h:45
void SetCompressionAlgorithm(grpc_compression_algorithm algorithm)
Set the compression algorithm for the channel.
void SetPointer(const std::string &key, void *value)
Set a pointer argument value under key.
grpc_arg * args
Definition: grpc_types.h:133
void SetSslTargetNameOverride(const std::string &name)
Set target name override for SSL host name checking.