Namespaces | Functions
channel_connectivity.cc File Reference
#include <grpc/support/port_platform.h>
#include <inttypes.h>
#include <grpc/grpc.h>
#include <grpc/impl/codegen/connectivity_state.h>
#include <grpc/impl/codegen/gpr_types.h>
#include <grpc/impl/codegen/grpc_types.h>
#include <grpc/support/log.h>
#include "src/core/ext/filters/client_channel/client_channel.h"
#include "src/core/lib/channel/channel_fwd.h"
#include "src/core/lib/channel/channel_stack.h"
#include "src/core/lib/debug/trace.h"
#include "src/core/lib/gprpp/dual_ref_counted.h"
#include "src/core/lib/gprpp/ref_counted_ptr.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/polling_entity.h"
#include "src/core/lib/iomgr/timer.h"
#include "src/core/lib/surface/api_trace.h"
#include "src/core/lib/surface/channel.h"
#include "src/core/lib/surface/completion_queue.h"
#include "src/core/lib/surface/lame_client.h"
Include dependency graph for channel_connectivity.cc:

Go to the source code of this file.

Namespaces

 grpc_core
 

Functions

grpc_connectivity_state grpc_channel_check_connectivity_state (grpc_channel *c_channel, int try_to_connect)
 
int grpc_channel_num_external_connectivity_watchers (grpc_channel *c_channel)
 
int grpc_channel_support_connectivity_watcher (grpc_channel *channel)
 
void grpc_channel_watch_connectivity_state (grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag)
 

Function Documentation

◆ grpc_channel_check_connectivity_state()

grpc_connectivity_state grpc_channel_check_connectivity_state ( grpc_channel channel,
int  try_to_connect 
)

Check the connectivity state of a channel.

Definition at line 56 of file channel_connectivity.cc.

◆ grpc_channel_num_external_connectivity_watchers()

int grpc_channel_num_external_connectivity_watchers ( grpc_channel channel)

Number of active "external connectivity state watchers" attached to a channel. Useful for testing.

Definition at line 79 of file channel_connectivity.cc.

◆ grpc_channel_support_connectivity_watcher()

int grpc_channel_support_connectivity_watcher ( grpc_channel channel)

Check whether a grpc channel supports connectivity watcher

Definition at line 94 of file channel_connectivity.cc.

◆ grpc_channel_watch_connectivity_state()

void grpc_channel_watch_connectivity_state ( grpc_channel channel,
grpc_connectivity_state  last_observed_state,
gpr_timespec  deadline,
grpc_completion_queue cq,
void *  tag 
)

Watch for a change in connectivity state. Once the channel connectivity state is different from last_observed_state, tag will be enqueued on cq with success=1. If deadline expires BEFORE the state is changed, tag will be enqueued on cq with success=0.

Definition at line 227 of file channel_connectivity.cc.

Variable Documentation

◆ channel_

RefCountedPtr<Channel> channel_
private

Definition at line 209 of file channel_connectivity.cc.

◆ closure_

grpc_closure closure_
private

Definition at line 164 of file channel_connectivity.cc.

◆ completion_storage_

grpc_cq_completion completion_storage_
private

Definition at line 215 of file channel_connectivity.cc.

◆ cq_

grpc_completion_queue* cq_
private

Definition at line 210 of file channel_connectivity.cc.

◆ deadline_

Timestamp deadline_
private

Definition at line 163 of file channel_connectivity.cc.

◆ on_complete_

grpc_closure on_complete_
private

Definition at line 217 of file channel_connectivity.cc.

◆ on_timeout_

grpc_closure on_timeout_
private

Definition at line 219 of file channel_connectivity.cc.

◆ state_

grpc_connectivity_state state_
private

Definition at line 213 of file channel_connectivity.cc.

◆ state_watcher_

StateWatcher* state_watcher_
private

Definition at line 162 of file channel_connectivity.cc.

◆ tag_

void* tag_
private

Definition at line 211 of file channel_connectivity.cc.

◆ timer_

grpc_timer timer_
private

Definition at line 218 of file channel_connectivity.cc.

◆ timer_fired_

bool timer_fired_ = false
private

Definition at line 221 of file channel_connectivity.cc.



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