Craig Tiller | 04b7ca8 | 2016-03-29 08:07:54 -0700 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * Copyright 2016, Google Inc. |
| 4 | * All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions are |
| 8 | * met: |
| 9 | * |
| 10 | * * Redistributions of source code must retain the above copyright |
| 11 | * notice, this list of conditions and the following disclaimer. |
| 12 | * * Redistributions in binary form must reproduce the above |
| 13 | * copyright notice, this list of conditions and the following disclaimer |
| 14 | * in the documentation and/or other materials provided with the |
| 15 | * distribution. |
| 16 | * * Neither the name of Google Inc. nor the names of its |
| 17 | * contributors may be used to endorse or promote products derived from |
| 18 | * this software without specific prior written permission. |
| 19 | * |
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | * |
| 32 | */ |
Craig Tiller | fb43385 | 2016-03-29 08:51:07 -0700 | [diff] [blame] | 33 | |
| 34 | #include <grpc/grpc.h> |
| 35 | |
Craig Tiller | 65938df | 2016-03-31 13:08:49 -0700 | [diff] [blame] | 36 | extern void grpc_resolver_dns_native_init(void); |
| 37 | extern void grpc_resolver_dns_native_shutdown(void); |
| 38 | extern void grpc_resolver_sockaddr_init(void); |
| 39 | extern void grpc_resolver_sockaddr_shutdown(void); |
Craig Tiller | fb43385 | 2016-03-29 08:51:07 -0700 | [diff] [blame] | 40 | extern void grpc_lb_policy_pick_first_init(void); |
| 41 | extern void grpc_lb_policy_pick_first_shutdown(void); |
| 42 | extern void grpc_lb_policy_round_robin_init(void); |
| 43 | extern void grpc_lb_policy_round_robin_shutdown(void); |
Craig Tiller | 8f8e9f9 | 2016-03-29 09:41:28 -0700 | [diff] [blame] | 44 | extern void census_grpc_plugin_init(void); |
| 45 | extern void census_grpc_plugin_shutdown(void); |
Craig Tiller | fb43385 | 2016-03-29 08:51:07 -0700 | [diff] [blame] | 46 | |
| 47 | void grpc_register_built_in_plugins(void) { |
Craig Tiller | 65938df | 2016-03-31 13:08:49 -0700 | [diff] [blame] | 48 | grpc_register_plugin(grpc_resolver_dns_native_init, |
| 49 | grpc_resolver_dns_native_shutdown); |
| 50 | grpc_register_plugin(grpc_resolver_sockaddr_init, |
| 51 | grpc_resolver_sockaddr_shutdown); |
Craig Tiller | fb43385 | 2016-03-29 08:51:07 -0700 | [diff] [blame] | 52 | grpc_register_plugin(grpc_lb_policy_pick_first_init, |
| 53 | grpc_lb_policy_pick_first_shutdown); |
| 54 | grpc_register_plugin(grpc_lb_policy_round_robin_init, |
| 55 | grpc_lb_policy_round_robin_shutdown); |
Craig Tiller | 8f8e9f9 | 2016-03-29 09:41:28 -0700 | [diff] [blame] | 56 | grpc_register_plugin(census_grpc_plugin_init, |
| 57 | census_grpc_plugin_shutdown); |
Craig Tiller | fb43385 | 2016-03-29 08:51:07 -0700 | [diff] [blame] | 58 | } |