1 /*
2 *
3 * Copyright 2016 gRPC authors.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 */
18
19 #include <grpc/support/port_platform.h>
20
21 #include <grpc/grpc.h>
22
23 void grpc_http_filters_init(void);
24 void grpc_http_filters_shutdown(void);
25 void grpc_chttp2_plugin_init(void);
26 void grpc_chttp2_plugin_shutdown(void);
27 void grpc_deadline_filter_init(void);
28 void grpc_deadline_filter_shutdown(void);
29 void grpc_client_channel_init(void);
30 void grpc_client_channel_shutdown(void);
31 void grpc_inproc_plugin_init(void);
32 void grpc_inproc_plugin_shutdown(void);
33 void grpc_resolver_fake_init(void);
34 void grpc_resolver_fake_shutdown(void);
35 void grpc_lb_policy_grpclb_init(void);
36 void grpc_lb_policy_grpclb_shutdown(void);
37 void grpc_lb_policy_priority_init(void);
38 void grpc_lb_policy_priority_shutdown(void);
39 void grpc_lb_policy_weighted_target_init(void);
40 void grpc_lb_policy_weighted_target_shutdown(void);
41 void grpc_lb_policy_pick_first_init(void);
42 void grpc_lb_policy_pick_first_shutdown(void);
43 void grpc_lb_policy_round_robin_init(void);
44 void grpc_lb_policy_round_robin_shutdown(void);
45 void grpc_resolver_dns_ares_init(void);
46 void grpc_resolver_dns_ares_shutdown(void);
47 void grpc_resolver_dns_native_init(void);
48 void grpc_resolver_dns_native_shutdown(void);
49 void grpc_resolver_sockaddr_init(void);
50 void grpc_resolver_sockaddr_shutdown(void);
51 void grpc_client_idle_filter_init(void);
52 void grpc_client_idle_filter_shutdown(void);
53 void grpc_max_age_filter_init(void);
54 void grpc_max_age_filter_shutdown(void);
55 void grpc_message_size_filter_init(void);
56 void grpc_message_size_filter_shutdown(void);
57 void grpc_service_config_channel_arg_filter_init(void);
58 void grpc_service_config_channel_arg_filter_shutdown(void);
59 void grpc_client_authority_filter_init(void);
60 void grpc_client_authority_filter_shutdown(void);
61 void grpc_workaround_cronet_compression_filter_init(void);
62 void grpc_workaround_cronet_compression_filter_shutdown(void);
63
64 #ifndef GRPC_NO_XDS
65 namespace grpc_core {
66 void XdsClientGlobalInit();
67 void XdsClientGlobalShutdown();
68 } // namespace grpc_core
69 void grpc_certificate_provider_registry_init(void);
70 void grpc_certificate_provider_registry_shutdown(void);
71 namespace grpc_core {
72 void FileWatcherCertificateProviderInit();
73 void FileWatcherCertificateProviderShutdown();
74 } // namespace grpc_core
75 void grpc_lb_policy_cds_init(void);
76 void grpc_lb_policy_cds_shutdown(void);
77 void grpc_lb_policy_xds_cluster_impl_init(void);
78 void grpc_lb_policy_xds_cluster_impl_shutdown(void);
79 void grpc_lb_policy_xds_cluster_resolver_init(void);
80 void grpc_lb_policy_xds_cluster_resolver_shutdown(void);
81 void grpc_lb_policy_xds_cluster_manager_init(void);
82 void grpc_lb_policy_xds_cluster_manager_shutdown(void);
83 void grpc_resolver_xds_init(void);
84 void grpc_resolver_xds_shutdown(void);
85 namespace grpc_core {
86 void GoogleCloud2ProdResolverInit();
87 void GoogleCloud2ProdResolverShutdown();
88 }
89 #endif
90
grpc_register_built_in_plugins(void)91 void grpc_register_built_in_plugins(void) {
92 grpc_register_plugin(grpc_http_filters_init,
93 grpc_http_filters_shutdown);
94 grpc_register_plugin(grpc_chttp2_plugin_init,
95 grpc_chttp2_plugin_shutdown);
96 grpc_register_plugin(grpc_deadline_filter_init,
97 grpc_deadline_filter_shutdown);
98 grpc_register_plugin(grpc_client_channel_init,
99 grpc_client_channel_shutdown);
100 grpc_register_plugin(grpc_inproc_plugin_init,
101 grpc_inproc_plugin_shutdown);
102 grpc_register_plugin(grpc_resolver_fake_init,
103 grpc_resolver_fake_shutdown);
104 grpc_register_plugin(grpc_lb_policy_grpclb_init,
105 grpc_lb_policy_grpclb_shutdown);
106 grpc_register_plugin(grpc_lb_policy_priority_init,
107 grpc_lb_policy_priority_shutdown);
108 grpc_register_plugin(grpc_lb_policy_weighted_target_init,
109 grpc_lb_policy_weighted_target_shutdown);
110 grpc_register_plugin(grpc_lb_policy_pick_first_init,
111 grpc_lb_policy_pick_first_shutdown);
112 grpc_register_plugin(grpc_lb_policy_round_robin_init,
113 grpc_lb_policy_round_robin_shutdown);
114 grpc_register_plugin(grpc_resolver_dns_ares_init,
115 grpc_resolver_dns_ares_shutdown);
116 grpc_register_plugin(grpc_resolver_dns_native_init,
117 grpc_resolver_dns_native_shutdown);
118 grpc_register_plugin(grpc_resolver_sockaddr_init,
119 grpc_resolver_sockaddr_shutdown);
120 grpc_register_plugin(grpc_client_idle_filter_init,
121 grpc_client_idle_filter_shutdown);
122 grpc_register_plugin(grpc_max_age_filter_init,
123 grpc_max_age_filter_shutdown);
124 grpc_register_plugin(grpc_message_size_filter_init,
125 grpc_message_size_filter_shutdown);
126 grpc_register_plugin(grpc_service_config_channel_arg_filter_init,
127 grpc_service_config_channel_arg_filter_shutdown);
128 grpc_register_plugin(grpc_client_authority_filter_init,
129 grpc_client_authority_filter_shutdown);
130 grpc_register_plugin(grpc_workaround_cronet_compression_filter_init,
131 grpc_workaround_cronet_compression_filter_shutdown);
132 #ifndef GRPC_NO_XDS
133 grpc_register_plugin(grpc_core::XdsClientGlobalInit,
134 grpc_core::XdsClientGlobalShutdown);
135 grpc_register_plugin(grpc_certificate_provider_registry_init,
136 grpc_certificate_provider_registry_shutdown);
137 grpc_register_plugin(grpc_core::FileWatcherCertificateProviderInit,
138 grpc_core::FileWatcherCertificateProviderShutdown);
139 grpc_register_plugin(grpc_lb_policy_cds_init,
140 grpc_lb_policy_cds_shutdown);
141 grpc_register_plugin(grpc_lb_policy_xds_cluster_impl_init,
142 grpc_lb_policy_xds_cluster_impl_shutdown);
143 grpc_register_plugin(grpc_lb_policy_xds_cluster_resolver_init,
144 grpc_lb_policy_xds_cluster_resolver_shutdown);
145 grpc_register_plugin(grpc_lb_policy_xds_cluster_manager_init,
146 grpc_lb_policy_xds_cluster_manager_shutdown);
147 grpc_register_plugin(grpc_resolver_xds_init,
148 grpc_resolver_xds_shutdown);
149 grpc_register_plugin(grpc_core::GoogleCloud2ProdResolverInit,
150 grpc_core::GoogleCloud2ProdResolverShutdown);
151 #endif
152 }
153