|
|
|
@ -135,10 +135,8 @@ struct grpc_subchannel { |
|
|
|
|
/** our alarm */ |
|
|
|
|
grpc_timer alarm; |
|
|
|
|
|
|
|
|
|
/* the global uuid for this subchannel */ |
|
|
|
|
// TODO(ncteisen): move this into SubchannelNode while implementing
|
|
|
|
|
// GetSubchannel.
|
|
|
|
|
intptr_t subchannel_uuid; |
|
|
|
|
grpc_core::RefCountedPtr<grpc_core::channelz::SubchannelNode> |
|
|
|
|
channelz_subchannel; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
struct grpc_subchannel_call { |
|
|
|
@ -379,14 +377,21 @@ 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; |
|
|
|
|
// This is just a placeholder channelz class for for now.
|
|
|
|
|
const grpc_arg* arg = |
|
|
|
|
grpc_channel_args_find(c->args, GRPC_ARG_ENABLE_CHANNELZ); |
|
|
|
|
bool channelz_enabled = grpc_channel_arg_get_bool(arg, false); |
|
|
|
|
if (channelz_enabled) { |
|
|
|
|
c->channelz_subchannel = |
|
|
|
|
grpc_core::MakeRefCounted<grpc_core::channelz::SubchannelNode>(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return grpc_subchannel_index_register(key, c); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
intptr_t grpc_subchannel_get_uuid(grpc_subchannel* s) { |
|
|
|
|
return s->subchannel_uuid; |
|
|
|
|
grpc_core::channelz::SubchannelNode* grpc_subchannel_get_channelz_node( |
|
|
|
|
grpc_subchannel* s) { |
|
|
|
|
return s->channelz_subchannel.get(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static void continue_connect_locked(grpc_subchannel* c) { |
|
|
|
|