Classes | Namespaces | Typedefs | Functions
channel_args.h File Reference
#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"
Include dependency graph for channel_args.h:

Go to the source code of this file.

Classes

class  grpc_core::ChannelArgs
 
struct  grpc_core::ChannelArgTypeTraits< T, Ignored >
 
struct  grpc_core::ChannelArgTypeTraits< T, absl::enable_if_t< std::is_base_of< RefCounted< T >, T >::value||std::is_base_of< RefCounted< T, NonPolymorphicRefCount >, T >::value||std::is_base_of< DualRefCounted< T >, T >::value, void > >
 
struct  grpc_core::ChannelArgTypeTraits< T, absl::void_t< typename T::RawPointerChannelArgTag > >
 
struct  grpc_integer_options
 
class  grpc_core::ChannelArgs::Pointer
 

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
 

Functions

ChannelArgs grpc_core::ChannelArgsBuiltinPrecondition (const grpc_channel_args *src)
 
bool grpc_channel_arg_get_bool (const grpc_arg *arg, bool default_value)
 
int grpc_channel_arg_get_integer (const grpc_arg *arg, const grpc_integer_options options)
 
char * grpc_channel_arg_get_string (const grpc_arg *arg)
 
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_argsgrpc_channel_args_copy (const grpc_channel_args *src)
 
grpc_channel_argsgrpc_channel_args_copy_and_add (const grpc_channel_args *src, const grpc_arg *to_add, size_t num_to_add)
 
grpc_channel_argsgrpc_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)
 
grpc_channel_argsgrpc_channel_args_copy_and_remove (const grpc_channel_args *src, const char **to_remove, size_t num_to_remove)
 
void grpc_channel_args_destroy (const grpc_channel_args *a)
 
void grpc_channel_args_destroy (grpc_channel_args *a)
 
const grpc_arggrpc_channel_args_find (const grpc_channel_args *args, const char *name)
 
bool grpc_channel_args_find_bool (const grpc_channel_args *args, const char *name, bool default_value)
 
int grpc_channel_args_find_integer (const grpc_channel_args *args, const char *name, const grpc_integer_options options)
 
template<typename T >
Tgrpc_channel_args_find_pointer (const grpc_channel_args *args, const char *name)
 
char * grpc_channel_args_find_string (const grpc_channel_args *args, const char *name)
 
grpc_channel_args_client_channel_creation_mutator grpc_channel_args_get_client_channel_creation_mutator ()
 
grpc_channel_argsgrpc_channel_args_normalize (const grpc_channel_args *src)
 
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_argsgrpc_channel_args_union (const grpc_channel_args *a, const grpc_channel_args *b)
 
bool grpc_channel_args_want_minimal_stack (const grpc_channel_args *args)
 

Typedef Documentation

◆ grpc_channel_args_client_channel_creation_mutator

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.

◆ grpc_integer_options

Function Documentation

◆ grpc_channel_arg_get_bool()

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.

Definition at line 447 of file channel_args.cc.

◆ grpc_channel_arg_get_integer()

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.

◆ grpc_channel_arg_get_string()

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.

Definition at line 432 of file channel_args.cc.

◆ grpc_channel_arg_integer_create()

grpc_arg grpc_channel_arg_integer_create ( char *  name,
int  value 
)

Definition at line 484 of file channel_args.cc.

◆ grpc_channel_arg_pointer_create()

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_channel_arg_string_create()

grpc_arg grpc_channel_arg_string_create ( char *  name,
char *  value 
)

Definition at line 476 of file channel_args.cc.

◆ grpc_channel_args_compare()

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_copy()

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_copy_and_add()

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_copy_and_add_and_remove()

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_copy_and_remove()

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.

◆ grpc_channel_args_destroy() [1/2]

void grpc_channel_args_destroy ( const grpc_channel_args a)
inline

Definition at line 297 of file channel_args.h.

◆ grpc_channel_args_destroy() [2/2]

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.

◆ grpc_channel_args_find()

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.

◆ grpc_channel_args_find_bool()

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.

◆ grpc_channel_args_find_integer()

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.

◆ grpc_channel_args_find_pointer()

template<typename T >
T* grpc_channel_args_find_pointer ( const grpc_channel_args args,
const char *  name 
)

Definition at line 342 of file channel_args.h.

◆ grpc_channel_args_find_string()

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_get_client_channel_creation_mutator()

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_normalize()

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.

◆ grpc_channel_args_set_client_channel_creation_mutator()

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.

◆ grpc_channel_args_string()

std::string grpc_channel_args_string ( const grpc_channel_args args)

Definition at line 502 of file channel_args.cc.

◆ grpc_channel_args_union()

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.

◆ grpc_channel_args_want_minimal_stack()

bool grpc_channel_args_want_minimal_stack ( const grpc_channel_args args)

Definition at line 471 of file channel_args.cc.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:06