aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/ext/filters/client_channel/subchannel.cc
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-06-29 14:48:05 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-07-11 15:17:35 -0700
commit018498a06be9188bda95b5753e2aa93db2b5a28f (patch)
tree5468fbd971f3a223b112c97026fc6ea6bed21a15 /src/core/ext/filters/client_channel/subchannel.cc
parent4ba4d18960ccc762d5228a314c574050afadddac (diff)
Implements subchannel refs for pick_first
Diffstat (limited to 'src/core/ext/filters/client_channel/subchannel.cc')
-rw-r--r--src/core/ext/filters/client_channel/subchannel.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/core/ext/filters/client_channel/subchannel.cc b/src/core/ext/filters/client_channel/subchannel.cc
index 8ab3fe40f5..6c4f1869ea 100644
--- a/src/core/ext/filters/client_channel/subchannel.cc
+++ b/src/core/ext/filters/client_channel/subchannel.cc
@@ -134,6 +134,11 @@ struct grpc_subchannel {
bool backoff_begun;
/** our alarm */
grpc_timer alarm;
+
+ /* the global uuid for this subchannel */
+ // TODO(ncteisen): move this into SubchannelNode while implementing
+ // GetSubchannel.
+ intptr_t subchannel_uuid;
};
struct grpc_subchannel_call {
@@ -374,9 +379,16 @@ grpc_subchannel* grpc_subchannel_create(grpc_connector* connector,
c->backoff.Init(backoff_options);
gpr_mu_init(&c->mu);
+ // This is just a placeholder for now
+ c->subchannel_uuid = 42;
+
return grpc_subchannel_index_register(key, c);
}
+intptr_t grpc_subchannel_get_uuid(grpc_subchannel* s) {
+ return s->subchannel_uuid;
+}
+
static void continue_connect_locked(grpc_subchannel* c) {
grpc_connect_in_args args;
args.interested_parties = c->pollset_set;