aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-23 12:30:00 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-23 12:30:00 -0700
commitd58b5b88479cd3b24c171104eb5494e0d0702e42 (patch)
tree18220332801882ee69307cb2fc4477b31708f6a4 /src
parent9e8f9115c4e416a5ce3735e0b6cc47fce04973ef (diff)
Move parent subchannel construction args...
... into grpc_channel itself, to hide this complicated construction detail.
Diffstat (limited to 'src')
-rw-r--r--src/core/client_config/subchannel.h2
-rw-r--r--src/core/client_config/subchannel_factory.h9
-rw-r--r--src/core/surface/channel.h5
3 files changed, 8 insertions, 8 deletions
diff --git a/src/core/client_config/subchannel.h b/src/core/client_config/subchannel.h
index 56109a2570..8befc28d51 100644
--- a/src/core/client_config/subchannel.h
+++ b/src/core/client_config/subchannel.h
@@ -60,11 +60,13 @@ void grpc_subchannel_unref(grpc_subchannel *channel);
/** poll the current connectivity state of a channel */
grpc_connectivity_state grpc_subchannel_check_connectivity(
grpc_subchannel *channel);
+
/** call notify when the connectivity state of a channel changes from *state.
Updates *state with the new state of the channel */
void grpc_subchannel_notify_on_state_change(grpc_subchannel *channel,
grpc_connectivity_state *state,
grpc_iomgr_closure *notify);
+
/** continue processing of transport operation \a op */
void grpc_subchannel_continue_op(grpc_subchannel *channel,
grpc_transport_op *op);
diff --git a/src/core/client_config/subchannel_factory.h b/src/core/client_config/subchannel_factory.h
index aae47cc384..854d2e2945 100644
--- a/src/core/client_config/subchannel_factory.h
+++ b/src/core/client_config/subchannel_factory.h
@@ -44,12 +44,6 @@ struct grpc_subchannel_factory {
};
struct grpc_subchannel_args {
- /* TODO(ctiller): consider making (parent, metadata_context) more opaque
- - these details are not needed at this level of API */
- /** Parent channel element - passed from the master channel */
- grpc_channel_element *parent;
- /** Metadata context for this channel - passed from the master channel */
- grpc_mdctx *metadata_context;
/** Channel filters for this channel - wrapped factories will likely
want to mutate this */
const grpc_channel_filter **filters;
@@ -70,10 +64,9 @@ struct grpc_subchannel_factory_vtable {
void grpc_subchannel_factory_ref(grpc_subchannel_factory *factory);
void grpc_subchannel_factory_unref(grpc_subchannel_factory *factory);
+
/** Create a new grpc_subchannel */
void grpc_subchannel_factory_create_subchannel(grpc_subchannel_factory *factory,
grpc_subchannel_args *args);
-grpc_subchannel_factory *grpc_default_subchannel_factory();
-
#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */
diff --git a/src/core/surface/channel.h b/src/core/surface/channel.h
index 3c04676b43..534eea33dc 100644
--- a/src/core/surface/channel.h
+++ b/src/core/surface/channel.h
@@ -43,6 +43,11 @@ grpc_channel *grpc_channel_create_from_filters(
/** Get a (borrowed) pointer to this channels underlying channel stack */
grpc_channel_stack *grpc_channel_get_channel_stack(grpc_channel *channel);
+/** Get a (borrowed) pointer to this channels subchannel factory (if it exists)
+ */
+grpc_subchannel_factory *grpc_channel_get_subchannel_factory(
+ grpc_channel *channel);
+
/** Get a (borrowed) pointer to the channel wide metadata context */
grpc_mdctx *grpc_channel_get_metadata_context(grpc_channel *channel);