|
GRPC Core
18.0.0
|
#include <grpc/support/port_platform.h>#include "src/core/lib/surface/channel.h"#include <grpc/support/log.h>#include "src/core/ext/filters/client_channel/client_channel.h"#include "src/core/lib/iomgr/timer.h"#include "src/core/lib/surface/api_trace.h"#include "src/core/lib/surface/completion_queue.h"Namespaces | |
| grpc_core | |
| Round Robin Policy. | |
Functions | |
| grpc_connectivity_state | grpc_channel_check_connectivity_state (grpc_channel *channel, int try_to_connect) |
| Check the connectivity state of a channel. More... | |
| int | grpc_channel_num_external_connectivity_watchers (grpc_channel *channel) |
| Number of active "external connectivity state watchers" attached to a channel. More... | |
| int | grpc_channel_support_connectivity_watcher (grpc_channel *channel) |
| Check whether a grpc channel supports connectivity watcher. 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... | |
| grpc_connectivity_state grpc_channel_check_connectivity_state | ( | grpc_channel * | channel, |
| int | try_to_connect | ||
| ) |
Check the connectivity state of a channel.
| int grpc_channel_num_external_connectivity_watchers | ( | grpc_channel * | channel | ) |
Number of active "external connectivity state watchers" attached to a channel.
Useful for testing.
| int grpc_channel_support_connectivity_watcher | ( | grpc_channel * | channel | ) |
Check whether a grpc channel supports connectivity watcher.
| 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.