diff options
author | Craig Tiller <ctiller@google.com> | 2015-09-24 11:33:04 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-09-24 11:33:04 -0700 |
commit | f8b14ca5f24448767c8627bb11508ba91ce608a0 (patch) | |
tree | 9c674d6529e8da204ca26021ca50d005211bc27f /src/core/surface/init.c | |
parent | b9d3596cb1cf9406ea6b1c67eda04a497857f6b4 (diff) | |
parent | 9e71674ab942c748f24e945327424163c15b5e66 (diff) |
Merge github.com:grpc/grpc into come-out-of-the-shadow
Diffstat (limited to 'src/core/surface/init.c')
-rw-r--r-- | src/core/surface/init.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/surface/init.c b/src/core/surface/init.c index 0d48cd42d7..93c27c77bf 100644 --- a/src/core/surface/init.c +++ b/src/core/surface/init.c @@ -40,6 +40,9 @@ #include <grpc/support/alloc.h> #include <grpc/support/time.h> #include "src/core/channel/channel_stack.h" +#include "src/core/client_config/lb_policy_registry.h" +#include "src/core/client_config/lb_policies/pick_first.h" +#include "src/core/client_config/lb_policies/round_robin.h" #include "src/core/client_config/resolver_registry.h" #include "src/core/client_config/resolvers/dns_resolver.h" #include "src/core/client_config/resolvers/sockaddr_resolver.h" @@ -85,6 +88,9 @@ void grpc_init(void) { gpr_mu_lock(&g_init_mu); if (++g_initializations == 1) { gpr_time_init(); + grpc_lb_policy_registry_init(grpc_pick_first_lb_factory_create()); + grpc_register_lb_policy(grpc_pick_first_lb_factory_create()); + grpc_register_lb_policy(grpc_round_robin_lb_factory_create()); grpc_resolver_registry_init("dns:///"); grpc_register_resolver_type(grpc_dns_resolver_factory_create()); grpc_register_resolver_type(grpc_ipv4_resolver_factory_create()); |