#include <channel_arguments.h>
Classes | |
struct | PointerVtableMembers |
Default pointer argument operations. More... | |
Public Member Functions | |
grpc_channel_args | c_channel_args () const |
ChannelArguments () | |
ChannelArguments (const ChannelArguments &other) | |
ChannelArguments & | operator= (ChannelArguments other) |
void | SetChannelArgs (grpc_channel_args *channel_args) const |
void | SetCompressionAlgorithm (grpc_compression_algorithm algorithm) |
Set the compression algorithm for the channel. More... | |
void | SetGrpclbFallbackTimeout (int fallback_timeout) |
void | SetInt (const std::string &key, int value) |
Set an integer argument value under key. More... | |
void | SetLoadBalancingPolicyName (const std::string &lb_policy_name) |
void | SetMaxReceiveMessageSize (int size) |
Set the max receive and send message sizes. More... | |
void | SetMaxSendMessageSize (int size) |
void | SetPointer (const std::string &key, void *value) |
void | SetPointerWithVtable (const std::string &key, void *value, const grpc_arg_pointer_vtable *vtable) |
void | SetResourceQuota (const grpc::ResourceQuota &resource_quota) |
Set the buffer pool to be attached to the constructed channel. More... | |
void | SetServiceConfigJSON (const std::string &service_config_json) |
void | SetSocketMutator (grpc_socket_mutator *mutator) |
Set a mutator for the underlying socket. More... | |
void | SetSslTargetNameOverride (const std::string &name) |
void | SetString (const std::string &key, const std::string &value) |
Set a textual argument value under key. More... | |
void | SetUserAgentPrefix (const std::string &user_agent_prefix) |
Set the string to prepend to the user agent. More... | |
void | Swap (ChannelArguments &other) |
~ChannelArguments () | |
Private Member Functions | |
std::string | GetSslTargetNameOverride () const |
Private Attributes | |
std::vector< grpc_arg > | args_ |
std::list< std::string > | strings_ |
Friends | |
class | grpc::SecureChannelCredentials |
class | grpc::testing::ChannelArgumentsTest |
Options for channel creation. The user can use generic setters to pass key value pairs down to C channel creation code. For gRPC related options, concrete setters are provided.
Definition at line 39 of file grpcpp/support/channel_arguments.h.
grpc::ChannelArguments::ChannelArguments | ( | ) |
Definition at line 37 of file channel_arguments.cc.
grpc::ChannelArguments::~ChannelArguments | ( | ) |
Definition at line 73 of file channel_arguments.cc.
grpc::ChannelArguments::ChannelArguments | ( | const ChannelArguments & | other | ) |
Definition at line 42 of file channel_arguments.cc.
|
inline |
Return (by value) a C grpc_channel_args structure which points to arguments owned by this ChannelArguments instance
Definition at line 115 of file grpcpp/support/channel_arguments.h.
|
private |
Definition at line 33 of file secure_channel_arguments.cc.
|
inline |
Definition at line 45 of file grpcpp/support/channel_arguments.h.
void grpc::ChannelArguments::SetChannelArgs | ( | grpc_channel_args * | channel_args | ) | const |
Dump arguments in this instance to channel_args. Does not take ownership of channel_args.
Note that the underlying arguments are shared. Changes made to either channel_args or this instance would be reflected on both.
Definition at line 215 of file channel_arguments.cc.
void grpc::ChannelArguments::SetCompressionAlgorithm | ( | grpc_compression_algorithm | algorithm | ) |
Set the compression algorithm for the channel.
Definition at line 87 of file channel_arguments.cc.
void grpc::ChannelArguments::SetGrpclbFallbackTimeout | ( | int | fallback_timeout | ) |
Set the grpclb fallback timeout (in ms) for the channel. If this amount of time has passed but we have not gotten any non-empty serverlist from the balancer, we will fall back to use the backend address(es) returned by the resolver.
Definition at line 92 of file channel_arguments.cc.
Set an integer argument value under key.
Definition at line 174 of file channel_arguments.cc.
void grpc::ChannelArguments::SetLoadBalancingPolicyName | ( | const std::string & | lb_policy_name | ) |
Set LB policy name. Note that if the name resolver returns only balancer addresses, the grpclb LB policy will be used, regardless of what is specified here.
Definition at line 164 of file channel_arguments.cc.
void grpc::ChannelArguments::SetMaxReceiveMessageSize | ( | int | size | ) |
Set the max receive and send message sizes.
Definition at line 156 of file channel_arguments.cc.
void grpc::ChannelArguments::SetMaxSendMessageSize | ( | int | size | ) |
Definition at line 160 of file channel_arguments.cc.
void grpc::ChannelArguments::SetPointer | ( | const std::string & | key, |
void * | value | ||
) |
Set a pointer argument value under key. Ownership is not transferred.
Definition at line 184 of file channel_arguments.cc.
void grpc::ChannelArguments::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 object. The vtable::Delete function is responsible for value cleanup/destruction when called.
Definition at line 191 of file channel_arguments.cc.
void grpc::ChannelArguments::SetResourceQuota | ( | const grpc::ResourceQuota & | resource_quota | ) |
Set the buffer pool to be attached to the constructed channel.
Definition at line 149 of file channel_arguments.cc.
void grpc::ChannelArguments::SetServiceConfigJSON | ( | const std::string & | service_config_json | ) |
Set service config in JSON form. Primarily meant for use in unit tests.
Definition at line 169 of file channel_arguments.cc.
void grpc::ChannelArguments::SetSocketMutator | ( | grpc_socket_mutator * | mutator | ) |
Set a mutator for the underlying socket.
Definition at line 96 of file channel_arguments.cc.
void grpc::ChannelArguments::SetSslTargetNameOverride | ( | const std::string & | name | ) |
Set target name override for SSL host name checking. This option should be used with caution in production.
Definition at line 29 of file secure_channel_arguments.cc.
Set a textual argument value under key.
Definition at line 203 of file channel_arguments.cc.
void grpc::ChannelArguments::SetUserAgentPrefix | ( | const std::string & | user_agent_prefix | ) |
Set the string to prepend to the user agent.
Definition at line 124 of file channel_arguments.cc.
void grpc::ChannelArguments::Swap | ( | ChannelArguments & | other | ) |
Definition at line 82 of file channel_arguments.cc.
|
friend |
Definition at line 123 of file grpcpp/support/channel_arguments.h.
|
friend |
Definition at line 124 of file grpcpp/support/channel_arguments.h.
|
private |
Definition at line 140 of file grpcpp/support/channel_arguments.h.
|
private |
Definition at line 141 of file grpcpp/support/channel_arguments.h.