aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/transport/connectivity_state.h
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2015-08-09 08:52:47 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2015-08-09 09:10:56 -0700
commit10494fcb61d638682fb8e5d28356a1f5125e8d0a (patch)
treeb2ca81762344cd45d5333b732ff8b197e476f958 /src/core/transport/connectivity_state.h
parentbaa2aa644226b00ad9cb493660356f4473acd212 (diff)
parent7a75936001478a0f7ea7eaf204c1b19bd55190f9 (diff)
Merge branch 'master' into compression-accept-encoding
Diffstat (limited to 'src/core/transport/connectivity_state.h')
-rw-r--r--src/core/transport/connectivity_state.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/core/transport/connectivity_state.h b/src/core/transport/connectivity_state.h
index bbdcbcb069..a3b0b80c98 100644
--- a/src/core/transport/connectivity_state.h
+++ b/src/core/transport/connectivity_state.h
@@ -51,17 +51,24 @@ typedef struct {
grpc_connectivity_state current_state;
/** all our watchers */
grpc_connectivity_state_watcher *watchers;
+ /** a name to help debugging */
+ char *name;
} grpc_connectivity_state_tracker;
+extern int grpc_connectivity_state_trace;
+
void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker,
- grpc_connectivity_state init_state);
+ grpc_connectivity_state init_state,
+ const char *name);
void grpc_connectivity_state_destroy(grpc_connectivity_state_tracker *tracker);
void grpc_connectivity_state_set(grpc_connectivity_state_tracker *tracker,
- grpc_connectivity_state state);
+ grpc_connectivity_state state,
+ const char *reason);
void grpc_connectivity_state_set_with_scheduler(
grpc_connectivity_state_tracker *tracker, grpc_connectivity_state state,
- void (*scheduler)(void *arg, grpc_iomgr_closure *closure), void *arg);
+ void (*scheduler)(void *arg, grpc_iomgr_closure *closure), void *arg,
+ const char *reason);
grpc_connectivity_state grpc_connectivity_state_check(
grpc_connectivity_state_tracker *tracker);