GRPC Core
0.10.0.0
|
#include "src/core/surface/channel.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include "src/core/channel/client_channel.h"
#include "src/core/iomgr/alarm.h"
#include "src/core/surface/completion_queue.h"
Data Structures | |
struct | state_watcher |
Enumerations | |
enum | callback_phase { WAITING, CALLING_BACK, CALLING_BACK_AND_FINISHED, CALLED_BACK } |
Functions | |
grpc_connectivity_state | grpc_channel_check_connectivity_state (grpc_channel *channel, int try_to_connect) |
Check the connectivity state of a channel. More... | |
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. More... | |
enum callback_phase |
grpc_connectivity_state grpc_channel_check_connectivity_state | ( | grpc_channel * | channel, |
int | try_to_connect | ||
) |
Check the connectivity state of a 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 | ||
) |
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.