Macros | Functions | Variables
backup_poller.cc File Reference
#include <grpc/support/port_platform.h>
#include "src/core/ext/filters/client_channel/backup_poller.h"
#include <inttypes.h>
#include "absl/status/status.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/sync.h>
#include "src/core/lib/gprpp/global_config.h"
#include "src/core/lib/gprpp/memory.h"
#include "src/core/lib/gprpp/time.h"
#include "src/core/lib/iomgr/closure.h"
#include "src/core/lib/iomgr/error.h"
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/iomgr/iomgr.h"
#include "src/core/lib/iomgr/pollset.h"
#include "src/core/lib/iomgr/pollset_set.h"
#include "src/core/lib/iomgr/timer.h"
Include dependency graph for backup_poller.cc:

Go to the source code of this file.

Macros

#define DEFAULT_POLL_INTERVAL_MS   5000
 

Functions

static void backup_poller_shutdown_unref (backup_poller *p)
 
static void done_poller (void *arg, grpc_error_handle)
 
static void g_poller_init_locked ()
 
static void g_poller_unref ()
 
 GPR_GLOBAL_CONFIG_DEFINE_INT32 (grpc_client_channel_backup_poll_interval_ms, DEFAULT_POLL_INTERVAL_MS, "Declares the interval in ms between two backup polls on client channels. " "These polls are run in the timer thread so that gRPC can process " "connection failures while there is no active polling thread. " "They help reconnect disconnected client channels (mostly due to " "idleness), so that the next RPC on this channel won't fail. Set to 0 to " "turn off the backup polls.")
 
void grpc_client_channel_global_init_backup_polling ()
 
void grpc_client_channel_start_backup_polling (grpc_pollset_set *interested_parties)
 
void grpc_client_channel_stop_backup_polling (grpc_pollset_set *interested_parties)
 
static void run_poller (void *arg, grpc_error_handle error)
 

Variables

static gpr_once g_once = GPR_ONCE_INIT
 
static grpc_core::Duration g_poll_interval
 
static backup_poller * g_poller = nullptr
 
static gpr_mu g_poller_mu
 

Macro Definition Documentation

◆ DEFAULT_POLL_INTERVAL_MS

#define DEFAULT_POLL_INTERVAL_MS   5000

Definition at line 42 of file backup_poller.cc.

Function Documentation

◆ backup_poller_shutdown_unref()

static void backup_poller_shutdown_unref ( backup_poller *  p)
static

Definition at line 89 of file backup_poller.cc.

◆ done_poller()

static void done_poller ( void *  arg,
grpc_error_handle   
)
static

Definition at line 97 of file backup_poller.cc.

◆ g_poller_init_locked()

static void g_poller_init_locked ( )
static

Definition at line 144 of file backup_poller.cc.

◆ g_poller_unref()

static void g_poller_unref ( )
static

Definition at line 101 of file backup_poller.cc.

◆ GPR_GLOBAL_CONFIG_DEFINE_INT32()

GPR_GLOBAL_CONFIG_DEFINE_INT32 ( grpc_client_channel_backup_poll_interval_ms  ,
DEFAULT_POLL_INTERVAL_MS  ,
"Declares the interval in ms between two backup polls on client channels. " "These polls are run in the timer thread so that gRPC can process " "connection failures while there is no active polling thread. " "They help reconnect disconnected client channels   mostly due to " "idleness,
so that the next RPC on this channel won 't fail. Set to 0 to " "turn off the backup polls."   
)

◆ grpc_client_channel_global_init_backup_polling()

void grpc_client_channel_global_init_backup_polling ( )

Definition at line 75 of file backup_poller.cc.

◆ grpc_client_channel_start_backup_polling()

void grpc_client_channel_start_backup_polling ( grpc_pollset_set interested_parties)

Definition at line 162 of file backup_poller.cc.

◆ grpc_client_channel_stop_backup_polling()

void grpc_client_channel_stop_backup_polling ( grpc_pollset_set interested_parties)

Definition at line 181 of file backup_poller.cc.

◆ run_poller()

static void run_poller ( void *  arg,
grpc_error_handle  error 
)
static

Definition at line 120 of file backup_poller.cc.

Variable Documentation

◆ g_once

gpr_once g_once = GPR_ONCE_INIT
static

Definition at line 57 of file backup_poller.cc.

◆ g_poll_interval

grpc_core::Duration g_poll_interval
static
Initial value:

Definition at line 63 of file backup_poller.cc.

◆ g_poller

backup_poller* g_poller = nullptr
static

Definition at line 59 of file backup_poller.cc.

◆ g_poller_mu

gpr_mu g_poller_mu
static

Definition at line 58 of file backup_poller.cc.

DEFAULT_POLL_INTERVAL_MS
#define DEFAULT_POLL_INTERVAL_MS
Definition: backup_poller.cc:42
grpc_core::Duration::Milliseconds
static constexpr Duration Milliseconds(int64_t millis)
Definition: src/core/lib/gprpp/time.h:155


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