aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-06-23 10:56:11 -0700
committerGravatar Craig Tiller <ctiller@google.com>2015-06-23 10:56:11 -0700
commit9e8f9115c4e416a5ce3735e0b6cc47fce04973ef (patch)
tree3a781254638e69e95df637ed67e412af1a1413d3
parent9d0e047a5caba99194e6ed377ac0234f3907d6a3 (diff)
Rename configured_subchannel --> subchannel
Per @a11r's request
-rw-r--r--src/core/client_config/README.md23
-rw-r--r--src/core/client_config/subchannel.h (renamed from src/core/client_config/configured_subchannel.h)26
-rw-r--r--src/core/client_config/subchannel_factory.h (renamed from src/core/client_config/configured_subchannel_factory.h)45
3 files changed, 43 insertions, 51 deletions
diff --git a/src/core/client_config/README.md b/src/core/client_config/README.md
index 316f9b1cc9..7cb19cd130 100644
--- a/src/core/client_config/README.md
+++ b/src/core/client_config/README.md
@@ -25,21 +25,20 @@ Load balancing configuration is provided by a grpc_lb_policy object, stored as
part of grpc_client_config.
A load balancing policies primary job is to pick a target server given only the
-initial metadata for a request. It does this by providing a
-grpc_configured_channel object to the owning channel.
+initial metadata for a request. It does this by providing a grpc_subchannel
+object to the owning channel.
-Configured Sub-Channels
------------------------
+Sub-Channels
+------------
-A configured sub-channel provides a connection to a server for a client
-channel. It has a connectivity state like a regular channel, and so can be
-connected or disconnected. This connectivity state can be used to inform load
-balancing decisions (for example, by avoiding disconnected backends).
+A sub-channel provides a connection to a server for a client channel. It has a
+connectivity state like a regular channel, and so can be connected or
+disconnected. This connectivity state can be used to inform load balancing
+decisions (for example, by avoiding disconnected backends).
Configured sub-channels are fully setup to participate in the grpc data plane.
Their behavior is specified by a set of grpc channel filters defined at their
-construction. To customize this behavior, resolvers build
-grpc_configured_subchannel_factory objects, which use the decorator pattern
-to customize construction arguments for concrete grpc_configured_subchannel
-instances.
+construction. To customize this behavior, resolvers build grpc_subchannel_factory
+objects, which use the decorator pattern to customize construction arguments for
+concrete grpc_subchannel instances.
diff --git a/src/core/client_config/configured_subchannel.h b/src/core/client_config/subchannel.h
index e2e7cf8a1a..56109a2570 100644
--- a/src/core/client_config/configured_subchannel.h
+++ b/src/core/client_config/subchannel.h
@@ -31,12 +31,12 @@
*
*/
-#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONFIGURED_SUBCHANNEL_H
-#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONFIGURED_SUBCHANNEL_H
+#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H
+#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H
/** A (sub-)channel that knows how to connect to exactly one target
address. Provides a target for load balancing. */
-typedef struct grpc_configured_subchannel grpc_configured_subchannel;
+typedef struct grpc_subchannel grpc_subchannel;
/** Connectivity state of a channel.
TODO(ctiller): move to grpc.h when we implement the public
@@ -54,19 +54,19 @@ typedef enum {
GRPC_CHANNEL_FATAL_FAILURE
} grpc_connectivity_state;
-void grpc_configured_subchannel_ref(grpc_configured_subchannel *channel);
-void grpc_configured_subchannel_unref(grpc_configured_subchannel *channel);
+void grpc_subchannel_ref(grpc_subchannel *channel);
+void grpc_subchannel_unref(grpc_subchannel *channel);
/** poll the current connectivity state of a channel */
-grpc_connectivity_state grpc_configured_subchannel_check_connectivity(
- grpc_configured_subchannel *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_configured_subchannel_notify_on_state_change(
- grpc_configured_subchannel *channel, grpc_connectivity_state *state,
- grpc_iomgr_closure *notify);
+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_configured_subchannel_continue_op(grpc_configured_subchannel *channel,
- grpc_transport_op *op);
+void grpc_subchannel_continue_op(grpc_subchannel *channel,
+ grpc_transport_op *op);
-#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONFIGURED_SUBCHANNEL_H */
+#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_H */
diff --git a/src/core/client_config/configured_subchannel_factory.h b/src/core/client_config/subchannel_factory.h
index 6bfc8e4436..aae47cc384 100644
--- a/src/core/client_config/configured_subchannel_factory.h
+++ b/src/core/client_config/subchannel_factory.h
@@ -31,21 +31,19 @@
*
*/
-#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONFIGURED_SUBCHANNEL_FACTORY_H
-#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONFIGURED_SUBCHANNEL_FACTORY_H
+#ifndef GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H
+#define GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H
-typedef struct grpc_configured_subchannel_factory
- grpc_configured_subchannel_factory;
-typedef struct grpc_configured_subchannel_factory_vtable
- grpc_configured_subchannel_factory_vtable;
+typedef struct grpc_subchannel_factory grpc_subchannel_factory;
+typedef struct grpc_subchannel_factory_vtable grpc_subchannel_factory_vtable;
/** Constructor for new configured channels.
Creating decorators around this type is encouraged to adapt behavior. */
-struct grpc_configured_subchannel_factory {
- const grpc_configured_subchannel_factory_vtable *vtable;
+struct grpc_subchannel_factory {
+ const grpc_subchannel_factory_vtable *vtable;
};
-struct grpc_configured_subchannel_args {
+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 */
@@ -63,24 +61,19 @@ struct grpc_configured_subchannel_args {
struct sockaddr *addr;
};
-struct grpc_configured_subchannel_factory_vtable {
- void (*ref)(grpc_configured_subchannel_factory *factory);
- void (*unref)(grpc_configured_subchannel_factory *factory);
- grpc_configured_subchannel *(*create_subchannel)(
- grpc_configured_subchannel_factory *factory,
- grpc_configured_subchannel_args *args);
+struct grpc_subchannel_factory_vtable {
+ void (*ref)(grpc_subchannel_factory *factory);
+ void (*unref)(grpc_subchannel_factory *factory);
+ grpc_subchannel *(*create_subchannel)(grpc_subchannel_factory *factory,
+ grpc_subchannel_args *args);
};
-void grpc_configured_subchannel_factory_ref(
- grpc_configured_subchannel_factory *factory);
-void grpc_configured_subchannel_factory_unref(
- grpc_configured_subchannel_factory *factory);
-/** Create a new grpc_configured_subchannel */
-void grpc_configured_subchannel_factory_create_subchannel(
- grpc_configured_subchannel_factory *factory,
- grpc_configured_subchannel_args *args);
+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_configured_subchannel_factory *
-grpc_default_configured_subchannel_factory();
+grpc_subchannel_factory *grpc_default_subchannel_factory();
-#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_CONFIGURED_SUBCHANNEL_FACTORY_H */
+#endif /* GRPC_INTERNAL_CORE_CLIENT_CONFIG_SUBCHANNEL_FACTORY_H */