GRPC C++
1.39.1
|
#include <grpc/support/port_platform.h>
#include <limits.h>
#include <string.h>
#include <vector>
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include <grpc/grpc.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/impl/codegen/log.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/lib/channel/channel_args.h"
#include "src/core/lib/gpr/useful.h"
Functions | |
grpc_channel_args * | grpc_channel_args_copy_and_add (const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add) |
Copy the arguments in src and append to_add. More... | |
grpc_channel_args * | grpc_channel_args_copy_and_remove (const grpc_channel_args *src, const char **to_remove, size_t num_to_remove) |
Copies the arguments in src except for those whose keys are in to_remove. More... | |
grpc_channel_args * | grpc_channel_args_copy_and_add_and_remove (const grpc_channel_args *src, const char **to_remove, size_t num_to_remove, const grpc_arg *to_add, size_t num_to_add) |
Copies the arguments from src except for those whose keys are in to_remove and appends the arguments in to_add. More... | |
grpc_channel_args * | grpc_channel_args_copy (const grpc_channel_args *src) |
Copy the arguments in src into a new instance. More... | |
grpc_channel_args * | grpc_channel_args_union (const grpc_channel_args *a, const grpc_channel_args *b) |
Perform the union of a and b, prioritizing a entries. More... | |
grpc_channel_args * | grpc_channel_args_normalize (const grpc_channel_args *src) |
Copy the arguments in src into a new instance, stably sorting keys. More... | |
void | grpc_channel_args_destroy (grpc_channel_args *a) |
Destroy arguments created by grpc_channel_args_copy. More... | |
int | grpc_channel_args_compare (const grpc_channel_args *a, const grpc_channel_args *b) |
const grpc_arg * | grpc_channel_args_find (const grpc_channel_args *args, const char *name) |
Returns the value of argument name from args, or NULL if not found. More... | |
int | grpc_channel_arg_get_integer (const grpc_arg *arg, const grpc_integer_options options) |
Returns the value of arg, subject to the constraints in options. More... | |
int | grpc_channel_args_find_integer (const grpc_channel_args *args, const char *name, const grpc_integer_options options) |
Similar to the above, but needs to find the arg from args by the name first. More... | |
char * | grpc_channel_arg_get_string (const grpc_arg *arg) |
Returns the value of arg if arg is of type GRPC_ARG_STRING. More... | |
char * | grpc_channel_args_find_string (const grpc_channel_args *args, const char *name) |
Similar to the above, but needs to find the arg from args by the name first. More... | |
bool | grpc_channel_arg_get_bool (const grpc_arg *arg, bool default_value) |
If arg is of type GRPC_ARG_INTEGER, returns true if it's non-zero. More... | |
bool | grpc_channel_args_find_bool (const grpc_channel_args *args, const char *name, bool default_value) |
Similar to the above, but needs to find the arg from args by the name first. More... | |
bool | grpc_channel_args_want_minimal_stack (const grpc_channel_args *args) |
grpc_arg | grpc_channel_arg_string_create (char *name, char *value) |
grpc_arg | grpc_channel_arg_integer_create (char *name, int value) |
grpc_arg | grpc_channel_arg_pointer_create (char *name, void *value, const grpc_arg_pointer_vtable *vtable) |
std::string | grpc_channel_args_string (const grpc_channel_args *args) |
void | grpc_channel_args_set_client_channel_creation_mutator (grpc_channel_args_client_channel_creation_mutator cb) |
grpc_channel_args_client_channel_creation_mutator | grpc_channel_args_get_client_channel_creation_mutator () |
bool grpc_channel_arg_get_bool | ( | const grpc_arg * | arg, |
bool | default_value | ||
) |
If arg is of type GRPC_ARG_INTEGER, returns true if it's non-zero.
Returns default_value if arg is of other types.
int grpc_channel_arg_get_integer | ( | const grpc_arg * | arg, |
const grpc_integer_options | options | ||
) |
Returns the value of arg, subject to the constraints in options.
char* grpc_channel_arg_get_string | ( | const grpc_arg * | arg | ) |
Returns the value of arg if arg is of type GRPC_ARG_STRING.
Otherwise, emits a warning log, and returns nullptr. If arg is nullptr, returns nullptr, and does not emit a warning.
grpc_arg grpc_channel_arg_integer_create | ( | char * | name, |
int | value | ||
) |
grpc_arg grpc_channel_arg_pointer_create | ( | char * | name, |
void * | value, | ||
const grpc_arg_pointer_vtable * | vtable | ||
) |
grpc_arg grpc_channel_arg_string_create | ( | char * | name, |
char * | value | ||
) |
int grpc_channel_args_compare | ( | const grpc_channel_args * | a, |
const grpc_channel_args * | b | ||
) |
grpc_channel_args* grpc_channel_args_copy | ( | const grpc_channel_args * | src | ) |
Copy the arguments in src into a new instance.
grpc_channel_args* grpc_channel_args_copy_and_add | ( | const grpc_channel_args * | src, |
const grpc_arg * | to_add, | ||
size_t | num_to_add | ||
) |
Copy the arguments in src and append to_add.
If to_add is NULL, it is equivalent to calling grpc_channel_args_copy.
grpc_channel_args* grpc_channel_args_copy_and_add_and_remove | ( | const grpc_channel_args * | src, |
const char ** | to_remove, | ||
size_t | num_to_remove, | ||
const grpc_arg * | to_add, | ||
size_t | num_to_add | ||
) |
Copies the arguments from src except for those whose keys are in to_remove and appends the arguments in to_add.
grpc_channel_args* grpc_channel_args_copy_and_remove | ( | const grpc_channel_args * | src, |
const char ** | to_remove, | ||
size_t | num_to_remove | ||
) |
Copies the arguments in src except for those whose keys are in to_remove.
void grpc_channel_args_destroy | ( | grpc_channel_args * | a | ) |
Destroy arguments created by grpc_channel_args_copy.
const grpc_arg* grpc_channel_args_find | ( | const grpc_channel_args * | args, |
const char * | name | ||
) |
Returns the value of argument name from args, or NULL if not found.
bool grpc_channel_args_find_bool | ( | const grpc_channel_args * | args, |
const char * | name, | ||
bool | default_value | ||
) |
Similar to the above, but needs to find the arg from args by the name first.
int grpc_channel_args_find_integer | ( | const grpc_channel_args * | args, |
const char * | name, | ||
const grpc_integer_options | options | ||
) |
Similar to the above, but needs to find the arg from args by the name first.
char* grpc_channel_args_find_string | ( | const grpc_channel_args * | args, |
const char * | name | ||
) |
Similar to the above, but needs to find the arg from args by the name first.
grpc_channel_args_client_channel_creation_mutator grpc_channel_args_get_client_channel_creation_mutator | ( | ) |
grpc_channel_args* grpc_channel_args_normalize | ( | const grpc_channel_args * | src | ) |
Copy the arguments in src into a new instance, stably sorting keys.
void grpc_channel_args_set_client_channel_creation_mutator | ( | grpc_channel_args_client_channel_creation_mutator | cb | ) |
std::string grpc_channel_args_string | ( | const grpc_channel_args * | args | ) |
grpc_channel_args* grpc_channel_args_union | ( | const grpc_channel_args * | a, |
const grpc_channel_args * | b | ||
) |
Perform the union of a and b, prioritizing a entries.
bool grpc_channel_args_want_minimal_stack | ( | const grpc_channel_args * | args | ) |