#include <grpc/support/port_platform.h>
#include <stddef.h>
#include <algorithm>
#include <string>
#include <type_traits>
#include <utility>
#include "absl/meta/type_traits.h"
#include "absl/strings/string_view.h"
#include "absl/types/optional.h"
#include "absl/types/variant.h"
#include <grpc/impl/codegen/grpc_types.h>
#include "src/core/lib/avl/avl.h"
#include "src/core/lib/gpr/useful.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/surface/channel_stack_type.h"
Go to the source code of this file.
Namespaces | |
grpc_core | |
Typedefs | |
typedef grpc_core::ChannelArgs(* | grpc_channel_args_client_channel_creation_mutator) (const char *target, grpc_core::ChannelArgs old_args, grpc_channel_stack_type type) |
typedef struct grpc_integer_options | grpc_integer_options |
typedef grpc_core::ChannelArgs( * grpc_channel_args_client_channel_creation_mutator) (const char *target, grpc_core::ChannelArgs old_args, grpc_channel_stack_type type) |
Definition at line 367 of file channel_args.h.
typedef struct grpc_integer_options grpc_integer_options |
If arg is of type GRPC_ARG_INTEGER, returns true if it's non-zero. Returns default_value if arg is of other types.
Definition at line 447 of file channel_args.cc.
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.
Definition at line 405 of file channel_args.cc.
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.
Definition at line 432 of file channel_args.cc.
Definition at line 484 of file channel_args.cc.
grpc_arg grpc_channel_arg_pointer_create | ( | char * | name, |
void * | value, | ||
const grpc_arg_pointer_vtable * | vtable | ||
) |
Definition at line 492 of file channel_args.cc.
grpc_arg grpc_channel_arg_string_create | ( | char * | name, |
char * | value | ||
) |
Definition at line 476 of file channel_args.cc.
int grpc_channel_args_compare | ( | const grpc_channel_args * | a, |
const grpc_channel_args * | b | ||
) |
Definition at line 380 of file channel_args.cc.
grpc_channel_args* grpc_channel_args_copy | ( | const grpc_channel_args * | src | ) |
Copy the arguments in src into a new instance
Definition at line 285 of file channel_args.cc.
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.
Definition at line 224 of file channel_args.cc.
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.
Definition at line 246 of file channel_args.cc.
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.
Definition at line 231 of file channel_args.cc.
|
inline |
Definition at line 297 of file channel_args.h.
void grpc_channel_args_destroy | ( | grpc_channel_args * | a | ) |
Destroy arguments created by grpc_channel_args_copy
Definition at line 360 of file channel_args.cc.
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.
Definition at line 393 of file channel_args.cc.
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.
Definition at line 465 of file channel_args.cc.
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.
Definition at line 425 of file channel_args.cc.
T* grpc_channel_args_find_pointer | ( | const grpc_channel_args * | args, |
const char * | name | ||
) |
Definition at line 342 of file channel_args.h.
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.
Definition at line 441 of file channel_args.cc.
grpc_channel_args_client_channel_creation_mutator grpc_channel_args_get_client_channel_creation_mutator | ( | ) |
Definition at line 555 of file channel_args.cc.
grpc_channel_args* grpc_channel_args_normalize | ( | const grpc_channel_args * | src | ) |
Copy the arguments in src into a new instance, stably sorting keys
Definition at line 338 of file channel_args.cc.
void grpc_channel_args_set_client_channel_creation_mutator | ( | grpc_channel_args_client_channel_creation_mutator | cb | ) |
Definition at line 549 of file channel_args.cc.
std::string grpc_channel_args_string | ( | const grpc_channel_args * | args | ) |
Definition at line 502 of file channel_args.cc.
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
Definition at line 289 of file channel_args.cc.
bool grpc_channel_args_want_minimal_stack | ( | const grpc_channel_args * | args | ) |
Definition at line 471 of file channel_args.cc.