GRPC C++  1.26.0
Data Structures | Namespaces | Macros | Typedefs | Functions
global_config_env.h File Reference
#include <grpc/support/port_platform.h>
#include "src/core/lib/gprpp/global_config_generic.h"
#include "src/core/lib/gprpp/memory.h"

Go to the source code of this file.

Data Structures

class  grpc_core::GlobalConfigEnv
 
class  grpc_core::GlobalConfigEnvBool
 
class  grpc_core::GlobalConfigEnvInt32
 
class  grpc_core::GlobalConfigEnvString
 

Namespaces

 grpc_core
 Internal thread interface.
 

Macros

#define GPR_GLOBAL_CONFIG_DEFINE_BOOL(name, default_value, help)
 
#define GPR_GLOBAL_CONFIG_DEFINE_INT32(name, default_value, help)
 
#define GPR_GLOBAL_CONFIG_DEFINE_STRING(name, default_value, help)
 

Typedefs

typedef void(* grpc_core::GlobalConfigEnvErrorFunctionType) (const char *error_message)
 

Functions

void grpc_core::SetGlobalConfigEnvErrorFunction (GlobalConfigEnvErrorFunctionType func)
 

Macro Definition Documentation

◆ GPR_GLOBAL_CONFIG_DEFINE_BOOL

#define GPR_GLOBAL_CONFIG_DEFINE_BOOL (   name,
  default_value,
  help 
)
Value:
static char g_env_str_##name[] = #name; \
static ::grpc_core::GlobalConfigEnvBool g_env_##name(g_env_str_##name, \
default_value); \
bool gpr_global_config_get_##name() { return g_env_##name.Get(); } \
void gpr_global_config_set_##name(bool value) { g_env_##name.Set(value); }

◆ GPR_GLOBAL_CONFIG_DEFINE_INT32

#define GPR_GLOBAL_CONFIG_DEFINE_INT32 (   name,
  default_value,
  help 
)
Value:
static char g_env_str_##name[] = #name; \
static ::grpc_core::GlobalConfigEnvInt32 g_env_##name(g_env_str_##name, \
default_value); \
int32_t gpr_global_config_get_##name() { return g_env_##name.Get(); } \
void gpr_global_config_set_##name(int32_t value) { g_env_##name.Set(value); }

◆ GPR_GLOBAL_CONFIG_DEFINE_STRING

#define GPR_GLOBAL_CONFIG_DEFINE_STRING (   name,
  default_value,
  help 
)
Value:
static char g_env_str_##name[] = #name; \
static ::grpc_core::GlobalConfigEnvString g_env_##name(g_env_str_##name, \
default_value); \
::grpc_core::UniquePtr<char> gpr_global_config_get_##name() { \
return g_env_##name.Get(); \
} \
void gpr_global_config_set_##name(const char* value) { \
g_env_##name.Set(value); \
}
std::unique_ptr< T, DefaultDeleteChar > UniquePtr
Definition: memory.h:45