grpc 0.13.0.pre1.1-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (95) hide show
  1. checksums.yaml +7 -0
  2. data/etc/roots.pem +5114 -0
  3. data/grpc_c.32.ruby +0 -0
  4. data/grpc_c.64.ruby +0 -0
  5. data/src/ruby/bin/apis/google/protobuf/empty.rb +44 -0
  6. data/src/ruby/bin/apis/pubsub_demo.rb +256 -0
  7. data/src/ruby/bin/apis/tech/pubsub/proto/pubsub.rb +174 -0
  8. data/src/ruby/bin/apis/tech/pubsub/proto/pubsub_services.rb +103 -0
  9. data/src/ruby/bin/grpc_ruby_interop_client +33 -0
  10. data/src/ruby/bin/grpc_ruby_interop_server +33 -0
  11. data/src/ruby/bin/interop/interop_client.rb +51 -0
  12. data/src/ruby/bin/interop/interop_server.rb +50 -0
  13. data/src/ruby/bin/math.rb +32 -0
  14. data/src/ruby/bin/math_client.rb +147 -0
  15. data/src/ruby/bin/math_server.rb +206 -0
  16. data/src/ruby/bin/math_services.rb +27 -0
  17. data/src/ruby/bin/noproto_client.rb +108 -0
  18. data/src/ruby/bin/noproto_server.rb +112 -0
  19. data/src/ruby/ext/grpc/extconf.rb +129 -0
  20. data/src/ruby/ext/grpc/rb_byte_buffer.c +70 -0
  21. data/src/ruby/ext/grpc/rb_byte_buffer.h +47 -0
  22. data/src/ruby/ext/grpc/rb_call.c +908 -0
  23. data/src/ruby/ext/grpc/rb_call.h +66 -0
  24. data/src/ruby/ext/grpc/rb_call_credentials.c +319 -0
  25. data/src/ruby/ext/grpc/rb_call_credentials.h +46 -0
  26. data/src/ruby/ext/grpc/rb_channel.c +432 -0
  27. data/src/ruby/ext/grpc/rb_channel.h +47 -0
  28. data/src/ruby/ext/grpc/rb_channel_args.c +169 -0
  29. data/src/ruby/ext/grpc/rb_channel_args.h +53 -0
  30. data/src/ruby/ext/grpc/rb_channel_credentials.c +268 -0
  31. data/src/ruby/ext/grpc/rb_channel_credentials.h +47 -0
  32. data/src/ruby/ext/grpc/rb_completion_queue.c +183 -0
  33. data/src/ruby/ext/grpc/rb_completion_queue.h +55 -0
  34. data/src/ruby/ext/grpc/rb_event_thread.c +158 -0
  35. data/src/ruby/ext/grpc/rb_event_thread.h +37 -0
  36. data/src/ruby/ext/grpc/rb_grpc.c +336 -0
  37. data/src/ruby/ext/grpc/rb_grpc.h +85 -0
  38. data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +560 -0
  39. data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +843 -0
  40. data/src/ruby/ext/grpc/rb_loader.c +72 -0
  41. data/src/ruby/ext/grpc/rb_loader.h +40 -0
  42. data/src/ruby/ext/grpc/rb_server.c +400 -0
  43. data/src/ruby/ext/grpc/rb_server.h +47 -0
  44. data/src/ruby/ext/grpc/rb_server_credentials.c +284 -0
  45. data/src/ruby/ext/grpc/rb_server_credentials.h +47 -0
  46. data/src/ruby/lib/grpc.rb +44 -0
  47. data/src/ruby/lib/grpc/2.0/grpc_c.bundle +0 -0
  48. data/src/ruby/lib/grpc/2.1/grpc_c.bundle +0 -0
  49. data/src/ruby/lib/grpc/2.2/grpc_c.bundle +0 -0
  50. data/src/ruby/lib/grpc/2.3/grpc_c.bundle +0 -0
  51. data/src/ruby/lib/grpc/core/time_consts.rb +71 -0
  52. data/src/ruby/lib/grpc/errors.rb +62 -0
  53. data/src/ruby/lib/grpc/generic/active_call.rb +488 -0
  54. data/src/ruby/lib/grpc/generic/bidi_call.rb +218 -0
  55. data/src/ruby/lib/grpc/generic/client_stub.rb +471 -0
  56. data/src/ruby/lib/grpc/generic/rpc_desc.rb +147 -0
  57. data/src/ruby/lib/grpc/generic/rpc_server.rb +504 -0
  58. data/src/ruby/lib/grpc/generic/service.rb +234 -0
  59. data/src/ruby/lib/grpc/grpc.rb +34 -0
  60. data/src/ruby/lib/grpc/logconfig.rb +59 -0
  61. data/src/ruby/lib/grpc/notifier.rb +60 -0
  62. data/src/ruby/lib/grpc/version.rb +33 -0
  63. data/src/ruby/pb/README.md +42 -0
  64. data/src/ruby/pb/generate_proto_ruby.sh +51 -0
  65. data/src/ruby/pb/grpc/health/checker.rb +75 -0
  66. data/src/ruby/pb/grpc/health/v1alpha/health.rb +29 -0
  67. data/src/ruby/pb/grpc/health/v1alpha/health_services.rb +28 -0
  68. data/src/ruby/pb/test/client.rb +469 -0
  69. data/src/ruby/pb/test/proto/empty.rb +15 -0
  70. data/src/ruby/pb/test/proto/messages.rb +80 -0
  71. data/src/ruby/pb/test/proto/test.rb +14 -0
  72. data/src/ruby/pb/test/proto/test_services.rb +64 -0
  73. data/src/ruby/pb/test/server.rb +253 -0
  74. data/src/ruby/spec/call_credentials_spec.rb +57 -0
  75. data/src/ruby/spec/call_spec.rb +163 -0
  76. data/src/ruby/spec/channel_credentials_spec.rb +97 -0
  77. data/src/ruby/spec/channel_spec.rb +177 -0
  78. data/src/ruby/spec/client_server_spec.rb +475 -0
  79. data/src/ruby/spec/completion_queue_spec.rb +42 -0
  80. data/src/ruby/spec/generic/active_call_spec.rb +373 -0
  81. data/src/ruby/spec/generic/client_stub_spec.rb +476 -0
  82. data/src/ruby/spec/generic/rpc_desc_spec.rb +331 -0
  83. data/src/ruby/spec/generic/rpc_server_pool_spec.rb +138 -0
  84. data/src/ruby/spec/generic/rpc_server_spec.rb +576 -0
  85. data/src/ruby/spec/generic/service_spec.rb +345 -0
  86. data/src/ruby/spec/pb/health/checker_spec.rb +232 -0
  87. data/src/ruby/spec/server_credentials_spec.rb +94 -0
  88. data/src/ruby/spec/server_spec.rb +209 -0
  89. data/src/ruby/spec/spec_helper.rb +69 -0
  90. data/src/ruby/spec/testdata/README +1 -0
  91. data/src/ruby/spec/testdata/ca.pem +15 -0
  92. data/src/ruby/spec/testdata/server1.key +16 -0
  93. data/src/ruby/spec/testdata/server1.pem +16 -0
  94. data/src/ruby/spec/time_consts_spec.rb +89 -0
  95. metadata +319 -0
@@ -0,0 +1,336 @@
1
+ /*
2
+ *
3
+ * Copyright 2015-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
+ */
33
+
34
+ #include <ruby/ruby.h>
35
+ #include "rb_grpc_imports.generated.h"
36
+ #include "rb_grpc.h"
37
+
38
+ #include <math.h>
39
+ #include <ruby/ruby.h>
40
+ #include <ruby/vm.h>
41
+ #include <sys/time.h>
42
+
43
+ #include <grpc/grpc.h>
44
+ #include <grpc/support/time.h>
45
+ #include "rb_call.h"
46
+ #include "rb_call_credentials.h"
47
+ #include "rb_channel.h"
48
+ #include "rb_channel_credentials.h"
49
+ #include "rb_completion_queue.h"
50
+ #include "rb_loader.h"
51
+ #include "rb_server.h"
52
+ #include "rb_server_credentials.h"
53
+
54
+ static VALUE grpc_rb_cTimeVal = Qnil;
55
+
56
+ static rb_data_type_t grpc_rb_timespec_data_type = {
57
+ "gpr_timespec",
58
+ {GRPC_RB_GC_NOT_MARKED, GRPC_RB_GC_DONT_FREE, GRPC_RB_MEMSIZE_UNAVAILABLE,
59
+ {NULL, NULL}},
60
+ NULL,
61
+ NULL,
62
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
63
+ RUBY_TYPED_FREE_IMMEDIATELY
64
+ #endif
65
+ };
66
+
67
+ /* Alloc func that blocks allocation of a given object by raising an
68
+ * exception. */
69
+ VALUE grpc_rb_cannot_alloc(VALUE cls) {
70
+ rb_raise(rb_eTypeError,
71
+ "allocation of %s only allowed from the gRPC native layer",
72
+ rb_class2name(cls));
73
+ return Qnil;
74
+ }
75
+
76
+ /* Init func that fails by raising an exception. */
77
+ VALUE grpc_rb_cannot_init(VALUE self) {
78
+ rb_raise(rb_eTypeError,
79
+ "initialization of %s only allowed from the gRPC native layer",
80
+ rb_obj_classname(self));
81
+ return Qnil;
82
+ }
83
+
84
+ /* Init/Clone func that fails by raising an exception. */
85
+ VALUE grpc_rb_cannot_init_copy(VALUE copy, VALUE self) {
86
+ (void)self;
87
+ rb_raise(rb_eTypeError,
88
+ "initialization of %s only allowed from the gRPC native layer",
89
+ rb_obj_classname(copy));
90
+ return Qnil;
91
+ }
92
+
93
+ /* id_tv_{,u}sec are accessor methods on Ruby Time instances. */
94
+ static ID id_tv_sec;
95
+ static ID id_tv_nsec;
96
+
97
+ /**
98
+ * grpc_rb_time_timeval creates a timeval from a ruby time object.
99
+ *
100
+ * This func is copied from ruby source, MRI/source/time.c, which is published
101
+ * under the same license as the ruby.h, on which the entire extensions is
102
+ * based.
103
+ */
104
+ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval) {
105
+ gpr_timespec t;
106
+ gpr_timespec *time_const;
107
+ const char *tstr = interval ? "time interval" : "time";
108
+ const char *want = " want <secs from epoch>|<Time>|<GRPC::TimeConst.*>";
109
+
110
+ t.clock_type = GPR_CLOCK_REALTIME;
111
+ switch (TYPE(time)) {
112
+ case T_DATA:
113
+ if (CLASS_OF(time) == grpc_rb_cTimeVal) {
114
+ TypedData_Get_Struct(time, gpr_timespec, &grpc_rb_timespec_data_type,
115
+ time_const);
116
+ t = *time_const;
117
+ } else if (CLASS_OF(time) == rb_cTime) {
118
+ t.tv_sec = NUM2INT(rb_funcall(time, id_tv_sec, 0));
119
+ t.tv_nsec = NUM2INT(rb_funcall(time, id_tv_nsec, 0));
120
+ } else {
121
+ rb_raise(rb_eTypeError, "bad input: (%s)->c_timeval, got <%s>,%s", tstr,
122
+ rb_obj_classname(time), want);
123
+ }
124
+ break;
125
+
126
+ case T_FIXNUM:
127
+ t.tv_sec = FIX2LONG(time);
128
+ if (interval && t.tv_sec < 0)
129
+ rb_raise(rb_eArgError, "%s must be positive", tstr);
130
+ t.tv_nsec = 0;
131
+ break;
132
+
133
+ case T_FLOAT:
134
+ if (interval && RFLOAT_VALUE(time) < 0.0)
135
+ rb_raise(rb_eArgError, "%s must be positive", tstr);
136
+ else {
137
+ double f, d;
138
+
139
+ d = modf(RFLOAT_VALUE(time), &f);
140
+ if (d < 0) {
141
+ d += 1;
142
+ f -= 1;
143
+ }
144
+ t.tv_sec = (int64_t)f;
145
+ if (f != t.tv_sec) {
146
+ rb_raise(rb_eRangeError, "%f out of Time range",
147
+ RFLOAT_VALUE(time));
148
+ }
149
+ t.tv_nsec = (int)(d * 1e9 + 0.5);
150
+ }
151
+ break;
152
+
153
+ case T_BIGNUM:
154
+ t.tv_sec = NUM2LONG(time);
155
+ if (interval && t.tv_sec < 0)
156
+ rb_raise(rb_eArgError, "%s must be positive", tstr);
157
+ t.tv_nsec = 0;
158
+ break;
159
+
160
+ default:
161
+ rb_raise(rb_eTypeError, "bad input: (%s)->c_timeval, got <%s>,%s", tstr,
162
+ rb_obj_classname(time), want);
163
+ break;
164
+ }
165
+ return t;
166
+ }
167
+
168
+ static void Init_grpc_status_codes() {
169
+ /* Constants representing the status codes or grpc_status_code in status.h */
170
+ VALUE grpc_rb_mStatusCodes =
171
+ rb_define_module_under(grpc_rb_mGrpcCore, "StatusCodes");
172
+ rb_define_const(grpc_rb_mStatusCodes, "OK", INT2NUM(GRPC_STATUS_OK));
173
+ rb_define_const(grpc_rb_mStatusCodes, "CANCELLED",
174
+ INT2NUM(GRPC_STATUS_CANCELLED));
175
+ rb_define_const(grpc_rb_mStatusCodes, "UNKNOWN",
176
+ INT2NUM(GRPC_STATUS_UNKNOWN));
177
+ rb_define_const(grpc_rb_mStatusCodes, "INVALID_ARGUMENT",
178
+ INT2NUM(GRPC_STATUS_INVALID_ARGUMENT));
179
+ rb_define_const(grpc_rb_mStatusCodes, "DEADLINE_EXCEEDED",
180
+ INT2NUM(GRPC_STATUS_DEADLINE_EXCEEDED));
181
+ rb_define_const(grpc_rb_mStatusCodes, "NOT_FOUND",
182
+ INT2NUM(GRPC_STATUS_NOT_FOUND));
183
+ rb_define_const(grpc_rb_mStatusCodes, "ALREADY_EXISTS",
184
+ INT2NUM(GRPC_STATUS_ALREADY_EXISTS));
185
+ rb_define_const(grpc_rb_mStatusCodes, "PERMISSION_DENIED",
186
+ INT2NUM(GRPC_STATUS_PERMISSION_DENIED));
187
+ rb_define_const(grpc_rb_mStatusCodes, "UNAUTHENTICATED",
188
+ INT2NUM(GRPC_STATUS_UNAUTHENTICATED));
189
+ rb_define_const(grpc_rb_mStatusCodes, "RESOURCE_EXHAUSTED",
190
+ INT2NUM(GRPC_STATUS_RESOURCE_EXHAUSTED));
191
+ rb_define_const(grpc_rb_mStatusCodes, "FAILED_PRECONDITION",
192
+ INT2NUM(GRPC_STATUS_FAILED_PRECONDITION));
193
+ rb_define_const(grpc_rb_mStatusCodes, "ABORTED",
194
+ INT2NUM(GRPC_STATUS_ABORTED));
195
+ rb_define_const(grpc_rb_mStatusCodes, "OUT_OF_RANGE",
196
+ INT2NUM(GRPC_STATUS_OUT_OF_RANGE));
197
+ rb_define_const(grpc_rb_mStatusCodes, "UNIMPLEMENTED",
198
+ INT2NUM(GRPC_STATUS_UNIMPLEMENTED));
199
+ rb_define_const(grpc_rb_mStatusCodes, "INTERNAL",
200
+ INT2NUM(GRPC_STATUS_INTERNAL));
201
+ rb_define_const(grpc_rb_mStatusCodes, "UNAVAILABLE",
202
+ INT2NUM(GRPC_STATUS_UNAVAILABLE));
203
+ rb_define_const(grpc_rb_mStatusCodes, "DATA_LOSS",
204
+ INT2NUM(GRPC_STATUS_DATA_LOSS));
205
+ }
206
+
207
+ /* id_at is the constructor method of the ruby standard Time class. */
208
+ static ID id_at;
209
+
210
+ /* id_inspect is the inspect method found on various ruby objects. */
211
+ static ID id_inspect;
212
+
213
+ /* id_to_s is the to_s method found on various ruby objects. */
214
+ static ID id_to_s;
215
+
216
+ /* Converts a wrapped time constant to a standard time. */
217
+ static VALUE grpc_rb_time_val_to_time(VALUE self) {
218
+ gpr_timespec *time_const = NULL;
219
+ gpr_timespec real_time;
220
+ TypedData_Get_Struct(self, gpr_timespec, &grpc_rb_timespec_data_type,
221
+ time_const);
222
+ real_time = gpr_convert_clock_type(*time_const, GPR_CLOCK_REALTIME);
223
+ return rb_funcall(rb_cTime, id_at, 2, INT2NUM(real_time.tv_sec),
224
+ INT2NUM(real_time.tv_nsec));
225
+ }
226
+
227
+ /* Invokes inspect on the ctime version of the time val. */
228
+ static VALUE grpc_rb_time_val_inspect(VALUE self) {
229
+ return rb_funcall(grpc_rb_time_val_to_time(self), id_inspect, 0);
230
+ }
231
+
232
+ /* Invokes to_s on the ctime version of the time val. */
233
+ static VALUE grpc_rb_time_val_to_s(VALUE self) {
234
+ return rb_funcall(grpc_rb_time_val_to_time(self), id_to_s, 0);
235
+ }
236
+
237
+ static gpr_timespec zero_realtime;
238
+ static gpr_timespec inf_future_realtime;
239
+ static gpr_timespec inf_past_realtime;
240
+
241
+ /* Adds a module with constants that map to gpr's static timeval structs. */
242
+ static void Init_grpc_time_consts() {
243
+ VALUE grpc_rb_mTimeConsts =
244
+ rb_define_module_under(grpc_rb_mGrpcCore, "TimeConsts");
245
+ grpc_rb_cTimeVal =
246
+ rb_define_class_under(grpc_rb_mGrpcCore, "TimeSpec", rb_cObject);
247
+ zero_realtime = gpr_time_0(GPR_CLOCK_REALTIME);
248
+ inf_future_realtime = gpr_inf_future(GPR_CLOCK_REALTIME);
249
+ inf_past_realtime = gpr_inf_past(GPR_CLOCK_REALTIME);
250
+ rb_define_const(
251
+ grpc_rb_mTimeConsts, "ZERO",
252
+ TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type,
253
+ (void *)&zero_realtime));
254
+ rb_define_const(
255
+ grpc_rb_mTimeConsts, "INFINITE_FUTURE",
256
+ TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type,
257
+ (void *)&inf_future_realtime));
258
+ rb_define_const(
259
+ grpc_rb_mTimeConsts, "INFINITE_PAST",
260
+ TypedData_Wrap_Struct(grpc_rb_cTimeVal, &grpc_rb_timespec_data_type,
261
+ (void *)&inf_past_realtime));
262
+ rb_define_method(grpc_rb_cTimeVal, "to_time", grpc_rb_time_val_to_time, 0);
263
+ rb_define_method(grpc_rb_cTimeVal, "inspect", grpc_rb_time_val_inspect, 0);
264
+ rb_define_method(grpc_rb_cTimeVal, "to_s", grpc_rb_time_val_to_s, 0);
265
+ id_at = rb_intern("at");
266
+ id_inspect = rb_intern("inspect");
267
+ id_to_s = rb_intern("to_s");
268
+ id_tv_sec = rb_intern("tv_sec");
269
+ id_tv_nsec = rb_intern("tv_nsec");
270
+ }
271
+
272
+ /*
273
+ TODO: find an alternative to ruby_vm_at_exit that is ok in Ruby 2.0 where
274
+ RUBY_TYPED_FREE_IMMEDIATELY is not defined.
275
+
276
+ At the moment, registering a function using ruby_vm_at_exit segfaults in Ruby
277
+ 2.0. This is not an issue with the gRPC handler. More likely, this was an
278
+ in issue with 2.0 that got resolved in 2.1 and has not been backported.
279
+ */
280
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
281
+ static void grpc_rb_shutdown(ruby_vm_t *vm) {
282
+ (void)vm;
283
+ grpc_shutdown();
284
+ }
285
+ #endif
286
+
287
+ /* Initialize the GRPC module structs */
288
+
289
+ /* grpc_rb_sNewServerRpc is the struct that holds new server rpc details. */
290
+ VALUE grpc_rb_sNewServerRpc = Qnil;
291
+ /* grpc_rb_sStatus is the struct that holds status details. */
292
+ VALUE grpc_rb_sStatus = Qnil;
293
+
294
+ /* Initialize the GRPC module. */
295
+ VALUE grpc_rb_mGRPC = Qnil;
296
+ VALUE grpc_rb_mGrpcCore = Qnil;
297
+
298
+ /* cached Symbols for members in Status struct */
299
+ VALUE sym_code = Qundef;
300
+ VALUE sym_details = Qundef;
301
+ VALUE sym_metadata = Qundef;
302
+
303
+ void Init_grpc_c() {
304
+ if (!grpc_rb_load_core()) {
305
+ rb_raise(rb_eLoadError, "Couldn't find or load gRPC's dynamic C core");
306
+ return;
307
+ }
308
+
309
+ grpc_init();
310
+
311
+ /* TODO: find alternative to ruby_vm_at_exit that is ok in Ruby 2.0 */
312
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
313
+ ruby_vm_at_exit(grpc_rb_shutdown);
314
+ #endif
315
+
316
+ grpc_rb_mGRPC = rb_define_module("GRPC");
317
+ grpc_rb_mGrpcCore = rb_define_module_under(grpc_rb_mGRPC, "Core");
318
+ grpc_rb_sNewServerRpc =
319
+ rb_struct_define("NewServerRpc", "method", "host",
320
+ "deadline", "metadata", "call", NULL);
321
+ grpc_rb_sStatus =
322
+ rb_struct_define("Status", "code", "details", "metadata", NULL);
323
+ sym_code = ID2SYM(rb_intern("code"));
324
+ sym_details = ID2SYM(rb_intern("details"));
325
+ sym_metadata = ID2SYM(rb_intern("metadata"));
326
+
327
+ Init_grpc_channel();
328
+ Init_grpc_completion_queue();
329
+ Init_grpc_call();
330
+ Init_grpc_call_credentials();
331
+ Init_grpc_channel_credentials();
332
+ Init_grpc_server();
333
+ Init_grpc_server_credentials();
334
+ Init_grpc_status_codes();
335
+ Init_grpc_time_consts();
336
+ }
@@ -0,0 +1,85 @@
1
+ /*
2
+ *
3
+ * Copyright 2015, 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
+ */
33
+
34
+ #ifndef GRPC_RB_H_
35
+ #define GRPC_RB_H_
36
+
37
+ #include <sys/time.h>
38
+ #include <ruby/ruby.h>
39
+
40
+ #include <grpc/support/time.h>
41
+
42
+ /* grpc_rb_mGrpcCore is the module containing the ruby wrapper GRPC classes. */
43
+ extern VALUE grpc_rb_mGrpcCore;
44
+
45
+ /* grpc_rb_sNewServerRpc is the struct that holds new server rpc details. */
46
+ extern VALUE grpc_rb_sNewServerRpc;
47
+
48
+ /* grpc_rb_sStruct is the struct that holds status details. */
49
+ extern VALUE grpc_rb_sStatus;
50
+
51
+ /* sym_code is the symbol for the code attribute of grpc_rb_sStatus. */
52
+ extern VALUE sym_code;
53
+
54
+ /* sym_details is the symbol for the details attribute of grpc_rb_sStatus. */
55
+ extern VALUE sym_details;
56
+
57
+ /* sym_metadata is the symbol for the metadata attribute of grpc_rb_sStatus. */
58
+ extern VALUE sym_metadata;
59
+
60
+ /* GC_NOT_MARKED is used in calls to Data_Wrap_Struct to indicate that the
61
+ wrapped struct does not need to participate in ruby gc. */
62
+ #define GRPC_RB_GC_NOT_MARKED (RUBY_DATA_FUNC)(NULL)
63
+
64
+ /* GC_DONT_FREED is used in calls to Data_Wrap_Struct to indicate that the
65
+ wrapped struct should not be freed the wrapped ruby object is released by
66
+ the garbage collector. */
67
+ #define GRPC_RB_GC_DONT_FREE (RUBY_DATA_FUNC)(NULL)
68
+
69
+ /* GRPC_RB_MEMSIZE_UNAVAILABLE is used in rb_data_type_t to indicate that the
70
+ * number of bytes used by the wrapped struct is not available. */
71
+ #define GRPC_RB_MEMSIZE_UNAVAILABLE (size_t (*)(const void*))(NULL)
72
+
73
+ /* A ruby object alloc func that fails by raising an exception. */
74
+ VALUE grpc_rb_cannot_alloc(VALUE cls);
75
+
76
+ /* A ruby object init func that fails by raising an exception. */
77
+ VALUE grpc_rb_cannot_init(VALUE self);
78
+
79
+ /* A ruby object clone init func that fails by raising an exception. */
80
+ VALUE grpc_rb_cannot_init_copy(VALUE copy, VALUE self);
81
+
82
+ /* grpc_rb_time_timeval creates a gpr_timespec from a ruby time object. */
83
+ gpr_timespec grpc_rb_time_timeval(VALUE time, int interval);
84
+
85
+ #endif /* GRPC_RB_H_ */
@@ -0,0 +1,560 @@
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
+ */
33
+
34
+ #include <grpc/support/port_platform.h>
35
+
36
+ #ifdef GPR_WIN32
37
+
38
+ #include "rb_grpc_imports.generated.h"
39
+
40
+ census_initialize_type census_initialize_import;
41
+ census_shutdown_type census_shutdown_import;
42
+ census_supported_type census_supported_import;
43
+ census_enabled_type census_enabled_import;
44
+ census_context_create_type census_context_create_import;
45
+ census_context_destroy_type census_context_destroy_import;
46
+ census_context_get_status_type census_context_get_status_import;
47
+ census_context_initialize_iterator_type census_context_initialize_iterator_import;
48
+ census_context_next_tag_type census_context_next_tag_import;
49
+ census_context_get_tag_type census_context_get_tag_import;
50
+ census_context_encode_type census_context_encode_import;
51
+ census_context_decode_type census_context_decode_import;
52
+ census_trace_mask_type census_trace_mask_import;
53
+ census_set_trace_mask_type census_set_trace_mask_import;
54
+ census_start_rpc_op_timestamp_type census_start_rpc_op_timestamp_import;
55
+ census_start_client_rpc_op_type census_start_client_rpc_op_import;
56
+ census_set_rpc_client_peer_type census_set_rpc_client_peer_import;
57
+ census_start_server_rpc_op_type census_start_server_rpc_op_import;
58
+ census_start_op_type census_start_op_import;
59
+ census_end_op_type census_end_op_import;
60
+ census_trace_print_type census_trace_print_import;
61
+ census_trace_scan_start_type census_trace_scan_start_import;
62
+ census_get_trace_record_type census_get_trace_record_import;
63
+ census_trace_scan_end_type census_trace_scan_end_import;
64
+ census_record_values_type census_record_values_import;
65
+ census_view_create_type census_view_create_import;
66
+ census_view_delete_type census_view_delete_import;
67
+ census_view_metric_type census_view_metric_import;
68
+ census_view_naggregations_type census_view_naggregations_import;
69
+ census_view_tags_type census_view_tags_import;
70
+ census_view_aggregrations_type census_view_aggregrations_import;
71
+ census_view_get_data_type census_view_get_data_import;
72
+ census_view_reset_type census_view_reset_import;
73
+ grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import;
74
+ grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import;
75
+ grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import;
76
+ grpc_compression_options_init_type grpc_compression_options_init_import;
77
+ grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import;
78
+ grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import;
79
+ grpc_compression_options_is_algorithm_enabled_type grpc_compression_options_is_algorithm_enabled_import;
80
+ grpc_metadata_array_init_type grpc_metadata_array_init_import;
81
+ grpc_metadata_array_destroy_type grpc_metadata_array_destroy_import;
82
+ grpc_call_details_init_type grpc_call_details_init_import;
83
+ grpc_call_details_destroy_type grpc_call_details_destroy_import;
84
+ grpc_register_plugin_type grpc_register_plugin_import;
85
+ grpc_init_type grpc_init_import;
86
+ grpc_shutdown_type grpc_shutdown_import;
87
+ grpc_version_string_type grpc_version_string_import;
88
+ grpc_completion_queue_create_type grpc_completion_queue_create_import;
89
+ grpc_completion_queue_next_type grpc_completion_queue_next_import;
90
+ grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import;
91
+ grpc_completion_queue_shutdown_type grpc_completion_queue_shutdown_import;
92
+ grpc_completion_queue_destroy_type grpc_completion_queue_destroy_import;
93
+ grpc_alarm_create_type grpc_alarm_create_import;
94
+ grpc_alarm_cancel_type grpc_alarm_cancel_import;
95
+ grpc_alarm_destroy_type grpc_alarm_destroy_import;
96
+ grpc_channel_check_connectivity_state_type grpc_channel_check_connectivity_state_import;
97
+ grpc_channel_watch_connectivity_state_type grpc_channel_watch_connectivity_state_import;
98
+ grpc_channel_create_call_type grpc_channel_create_call_import;
99
+ grpc_channel_ping_type grpc_channel_ping_import;
100
+ grpc_channel_register_call_type grpc_channel_register_call_import;
101
+ grpc_channel_create_registered_call_type grpc_channel_create_registered_call_import;
102
+ grpc_call_start_batch_type grpc_call_start_batch_import;
103
+ grpc_call_get_peer_type grpc_call_get_peer_import;
104
+ grpc_census_call_set_context_type grpc_census_call_set_context_import;
105
+ grpc_census_call_get_context_type grpc_census_call_get_context_import;
106
+ grpc_channel_get_target_type grpc_channel_get_target_import;
107
+ grpc_insecure_channel_create_type grpc_insecure_channel_create_import;
108
+ grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import;
109
+ grpc_channel_destroy_type grpc_channel_destroy_import;
110
+ grpc_call_cancel_type grpc_call_cancel_import;
111
+ grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import;
112
+ grpc_call_destroy_type grpc_call_destroy_import;
113
+ grpc_server_request_call_type grpc_server_request_call_import;
114
+ grpc_server_register_method_type grpc_server_register_method_import;
115
+ grpc_server_request_registered_call_type grpc_server_request_registered_call_import;
116
+ grpc_server_create_type grpc_server_create_import;
117
+ grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import;
118
+ grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import;
119
+ grpc_server_start_type grpc_server_start_import;
120
+ grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import;
121
+ grpc_server_cancel_all_calls_type grpc_server_cancel_all_calls_import;
122
+ grpc_server_destroy_type grpc_server_destroy_import;
123
+ grpc_tracer_set_enabled_type grpc_tracer_set_enabled_import;
124
+ grpc_header_key_is_legal_type grpc_header_key_is_legal_import;
125
+ grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import;
126
+ grpc_is_binary_header_type grpc_is_binary_header_import;
127
+ grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import;
128
+ grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import;
129
+ grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import;
130
+ grpc_auth_context_find_properties_by_name_type grpc_auth_context_find_properties_by_name_import;
131
+ grpc_auth_context_peer_identity_property_name_type grpc_auth_context_peer_identity_property_name_import;
132
+ grpc_auth_context_peer_is_authenticated_type grpc_auth_context_peer_is_authenticated_import;
133
+ grpc_call_auth_context_type grpc_call_auth_context_import;
134
+ grpc_auth_context_release_type grpc_auth_context_release_import;
135
+ grpc_auth_context_add_property_type grpc_auth_context_add_property_import;
136
+ grpc_auth_context_add_cstring_property_type grpc_auth_context_add_cstring_property_import;
137
+ grpc_auth_context_set_peer_identity_property_name_type grpc_auth_context_set_peer_identity_property_name_import;
138
+ grpc_channel_credentials_release_type grpc_channel_credentials_release_import;
139
+ grpc_google_default_credentials_create_type grpc_google_default_credentials_create_import;
140
+ grpc_ssl_credentials_create_type grpc_ssl_credentials_create_import;
141
+ grpc_call_credentials_release_type grpc_call_credentials_release_import;
142
+ grpc_composite_channel_credentials_create_type grpc_composite_channel_credentials_create_import;
143
+ grpc_composite_call_credentials_create_type grpc_composite_call_credentials_create_import;
144
+ grpc_google_compute_engine_credentials_create_type grpc_google_compute_engine_credentials_create_import;
145
+ grpc_max_auth_token_lifetime_type grpc_max_auth_token_lifetime_import;
146
+ grpc_service_account_jwt_access_credentials_create_type grpc_service_account_jwt_access_credentials_create_import;
147
+ grpc_google_refresh_token_credentials_create_type grpc_google_refresh_token_credentials_create_import;
148
+ grpc_access_token_credentials_create_type grpc_access_token_credentials_create_import;
149
+ grpc_google_iam_credentials_create_type grpc_google_iam_credentials_create_import;
150
+ grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import;
151
+ grpc_secure_channel_create_type grpc_secure_channel_create_import;
152
+ grpc_server_credentials_release_type grpc_server_credentials_release_import;
153
+ grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import;
154
+ grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import;
155
+ grpc_call_set_credentials_type grpc_call_set_credentials_import;
156
+ grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import;
157
+ gpr_malloc_type gpr_malloc_import;
158
+ gpr_free_type gpr_free_import;
159
+ gpr_realloc_type gpr_realloc_import;
160
+ gpr_malloc_aligned_type gpr_malloc_aligned_import;
161
+ gpr_free_aligned_type gpr_free_aligned_import;
162
+ gpr_set_allocation_functions_type gpr_set_allocation_functions_import;
163
+ gpr_get_allocation_functions_type gpr_get_allocation_functions_import;
164
+ grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import;
165
+ grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import;
166
+ grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import;
167
+ grpc_byte_buffer_length_type grpc_byte_buffer_length_import;
168
+ grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import;
169
+ grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import;
170
+ grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import;
171
+ grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import;
172
+ grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import;
173
+ grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import;
174
+ gpr_log_type gpr_log_import;
175
+ gpr_log_message_type gpr_log_message_import;
176
+ gpr_set_log_function_type gpr_set_log_function_import;
177
+ gpr_slice_ref_type gpr_slice_ref_import;
178
+ gpr_slice_unref_type gpr_slice_unref_import;
179
+ gpr_slice_new_type gpr_slice_new_import;
180
+ gpr_slice_new_with_len_type gpr_slice_new_with_len_import;
181
+ gpr_slice_malloc_type gpr_slice_malloc_import;
182
+ gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import;
183
+ gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import;
184
+ gpr_slice_from_static_string_type gpr_slice_from_static_string_import;
185
+ gpr_slice_sub_type gpr_slice_sub_import;
186
+ gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import;
187
+ gpr_slice_split_tail_type gpr_slice_split_tail_import;
188
+ gpr_slice_split_head_type gpr_slice_split_head_import;
189
+ gpr_empty_slice_type gpr_empty_slice_import;
190
+ gpr_slice_cmp_type gpr_slice_cmp_import;
191
+ gpr_slice_str_cmp_type gpr_slice_str_cmp_import;
192
+ gpr_slice_buffer_init_type gpr_slice_buffer_init_import;
193
+ gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import;
194
+ gpr_slice_buffer_add_type gpr_slice_buffer_add_import;
195
+ gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import;
196
+ gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import;
197
+ gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import;
198
+ gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import;
199
+ gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import;
200
+ gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import;
201
+ gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import;
202
+ gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import;
203
+ gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import;
204
+ gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import;
205
+ gpr_mu_init_type gpr_mu_init_import;
206
+ gpr_mu_destroy_type gpr_mu_destroy_import;
207
+ gpr_mu_lock_type gpr_mu_lock_import;
208
+ gpr_mu_unlock_type gpr_mu_unlock_import;
209
+ gpr_mu_trylock_type gpr_mu_trylock_import;
210
+ gpr_cv_init_type gpr_cv_init_import;
211
+ gpr_cv_destroy_type gpr_cv_destroy_import;
212
+ gpr_cv_wait_type gpr_cv_wait_import;
213
+ gpr_cv_signal_type gpr_cv_signal_import;
214
+ gpr_cv_broadcast_type gpr_cv_broadcast_import;
215
+ gpr_once_init_type gpr_once_init_import;
216
+ gpr_event_init_type gpr_event_init_import;
217
+ gpr_event_set_type gpr_event_set_import;
218
+ gpr_event_get_type gpr_event_get_import;
219
+ gpr_event_wait_type gpr_event_wait_import;
220
+ gpr_ref_init_type gpr_ref_init_import;
221
+ gpr_ref_type gpr_ref_import;
222
+ gpr_refn_type gpr_refn_import;
223
+ gpr_unref_type gpr_unref_import;
224
+ gpr_stats_init_type gpr_stats_init_import;
225
+ gpr_stats_inc_type gpr_stats_inc_import;
226
+ gpr_stats_read_type gpr_stats_read_import;
227
+ gpr_time_0_type gpr_time_0_import;
228
+ gpr_inf_future_type gpr_inf_future_import;
229
+ gpr_inf_past_type gpr_inf_past_import;
230
+ gpr_time_init_type gpr_time_init_import;
231
+ gpr_now_type gpr_now_import;
232
+ gpr_convert_clock_type_type gpr_convert_clock_type_import;
233
+ gpr_time_cmp_type gpr_time_cmp_import;
234
+ gpr_time_max_type gpr_time_max_import;
235
+ gpr_time_min_type gpr_time_min_import;
236
+ gpr_time_add_type gpr_time_add_import;
237
+ gpr_time_sub_type gpr_time_sub_import;
238
+ gpr_time_from_micros_type gpr_time_from_micros_import;
239
+ gpr_time_from_nanos_type gpr_time_from_nanos_import;
240
+ gpr_time_from_millis_type gpr_time_from_millis_import;
241
+ gpr_time_from_seconds_type gpr_time_from_seconds_import;
242
+ gpr_time_from_minutes_type gpr_time_from_minutes_import;
243
+ gpr_time_from_hours_type gpr_time_from_hours_import;
244
+ gpr_time_to_millis_type gpr_time_to_millis_import;
245
+ gpr_time_similar_type gpr_time_similar_import;
246
+ gpr_sleep_until_type gpr_sleep_until_import;
247
+ gpr_timespec_to_micros_type gpr_timespec_to_micros_import;
248
+ gpr_avl_create_type gpr_avl_create_import;
249
+ gpr_avl_ref_type gpr_avl_ref_import;
250
+ gpr_avl_unref_type gpr_avl_unref_import;
251
+ gpr_avl_add_type gpr_avl_add_import;
252
+ gpr_avl_remove_type gpr_avl_remove_import;
253
+ gpr_avl_get_type gpr_avl_get_import;
254
+ gpr_cmdline_create_type gpr_cmdline_create_import;
255
+ gpr_cmdline_add_int_type gpr_cmdline_add_int_import;
256
+ gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import;
257
+ gpr_cmdline_add_string_type gpr_cmdline_add_string_import;
258
+ gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import;
259
+ gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import;
260
+ gpr_cmdline_parse_type gpr_cmdline_parse_import;
261
+ gpr_cmdline_destroy_type gpr_cmdline_destroy_import;
262
+ gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import;
263
+ gpr_cpu_num_cores_type gpr_cpu_num_cores_import;
264
+ gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import;
265
+ gpr_histogram_create_type gpr_histogram_create_import;
266
+ gpr_histogram_destroy_type gpr_histogram_destroy_import;
267
+ gpr_histogram_add_type gpr_histogram_add_import;
268
+ gpr_histogram_merge_type gpr_histogram_merge_import;
269
+ gpr_histogram_percentile_type gpr_histogram_percentile_import;
270
+ gpr_histogram_mean_type gpr_histogram_mean_import;
271
+ gpr_histogram_stddev_type gpr_histogram_stddev_import;
272
+ gpr_histogram_variance_type gpr_histogram_variance_import;
273
+ gpr_histogram_maximum_type gpr_histogram_maximum_import;
274
+ gpr_histogram_minimum_type gpr_histogram_minimum_import;
275
+ gpr_histogram_count_type gpr_histogram_count_import;
276
+ gpr_histogram_sum_type gpr_histogram_sum_import;
277
+ gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import;
278
+ gpr_histogram_get_contents_type gpr_histogram_get_contents_import;
279
+ gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import;
280
+ gpr_join_host_port_type gpr_join_host_port_import;
281
+ gpr_split_host_port_type gpr_split_host_port_import;
282
+ gpr_format_message_type gpr_format_message_import;
283
+ gpr_strdup_type gpr_strdup_import;
284
+ gpr_asprintf_type gpr_asprintf_import;
285
+ gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import;
286
+ gpr_subprocess_create_type gpr_subprocess_create_import;
287
+ gpr_subprocess_destroy_type gpr_subprocess_destroy_import;
288
+ gpr_subprocess_join_type gpr_subprocess_join_import;
289
+ gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import;
290
+ gpr_thd_new_type gpr_thd_new_import;
291
+ gpr_thd_options_default_type gpr_thd_options_default_import;
292
+ gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import;
293
+ gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import;
294
+ gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import;
295
+ gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import;
296
+ gpr_thd_currentid_type gpr_thd_currentid_import;
297
+ gpr_thd_join_type gpr_thd_join_import;
298
+
299
+ void grpc_rb_load_imports(HMODULE library) {
300
+ census_initialize_import = (census_initialize_type) GetProcAddress(library, "census_initialize");
301
+ census_shutdown_import = (census_shutdown_type) GetProcAddress(library, "census_shutdown");
302
+ census_supported_import = (census_supported_type) GetProcAddress(library, "census_supported");
303
+ census_enabled_import = (census_enabled_type) GetProcAddress(library, "census_enabled");
304
+ census_context_create_import = (census_context_create_type) GetProcAddress(library, "census_context_create");
305
+ census_context_destroy_import = (census_context_destroy_type) GetProcAddress(library, "census_context_destroy");
306
+ census_context_get_status_import = (census_context_get_status_type) GetProcAddress(library, "census_context_get_status");
307
+ census_context_initialize_iterator_import = (census_context_initialize_iterator_type) GetProcAddress(library, "census_context_initialize_iterator");
308
+ census_context_next_tag_import = (census_context_next_tag_type) GetProcAddress(library, "census_context_next_tag");
309
+ census_context_get_tag_import = (census_context_get_tag_type) GetProcAddress(library, "census_context_get_tag");
310
+ census_context_encode_import = (census_context_encode_type) GetProcAddress(library, "census_context_encode");
311
+ census_context_decode_import = (census_context_decode_type) GetProcAddress(library, "census_context_decode");
312
+ census_trace_mask_import = (census_trace_mask_type) GetProcAddress(library, "census_trace_mask");
313
+ census_set_trace_mask_import = (census_set_trace_mask_type) GetProcAddress(library, "census_set_trace_mask");
314
+ census_start_rpc_op_timestamp_import = (census_start_rpc_op_timestamp_type) GetProcAddress(library, "census_start_rpc_op_timestamp");
315
+ census_start_client_rpc_op_import = (census_start_client_rpc_op_type) GetProcAddress(library, "census_start_client_rpc_op");
316
+ census_set_rpc_client_peer_import = (census_set_rpc_client_peer_type) GetProcAddress(library, "census_set_rpc_client_peer");
317
+ census_start_server_rpc_op_import = (census_start_server_rpc_op_type) GetProcAddress(library, "census_start_server_rpc_op");
318
+ census_start_op_import = (census_start_op_type) GetProcAddress(library, "census_start_op");
319
+ census_end_op_import = (census_end_op_type) GetProcAddress(library, "census_end_op");
320
+ census_trace_print_import = (census_trace_print_type) GetProcAddress(library, "census_trace_print");
321
+ census_trace_scan_start_import = (census_trace_scan_start_type) GetProcAddress(library, "census_trace_scan_start");
322
+ census_get_trace_record_import = (census_get_trace_record_type) GetProcAddress(library, "census_get_trace_record");
323
+ census_trace_scan_end_import = (census_trace_scan_end_type) GetProcAddress(library, "census_trace_scan_end");
324
+ census_record_values_import = (census_record_values_type) GetProcAddress(library, "census_record_values");
325
+ census_view_create_import = (census_view_create_type) GetProcAddress(library, "census_view_create");
326
+ census_view_delete_import = (census_view_delete_type) GetProcAddress(library, "census_view_delete");
327
+ census_view_metric_import = (census_view_metric_type) GetProcAddress(library, "census_view_metric");
328
+ census_view_naggregations_import = (census_view_naggregations_type) GetProcAddress(library, "census_view_naggregations");
329
+ census_view_tags_import = (census_view_tags_type) GetProcAddress(library, "census_view_tags");
330
+ census_view_aggregrations_import = (census_view_aggregrations_type) GetProcAddress(library, "census_view_aggregrations");
331
+ census_view_get_data_import = (census_view_get_data_type) GetProcAddress(library, "census_view_get_data");
332
+ census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset");
333
+ grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse");
334
+ grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name");
335
+ grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level");
336
+ grpc_compression_options_init_import = (grpc_compression_options_init_type) GetProcAddress(library, "grpc_compression_options_init");
337
+ grpc_compression_options_enable_algorithm_import = (grpc_compression_options_enable_algorithm_type) GetProcAddress(library, "grpc_compression_options_enable_algorithm");
338
+ grpc_compression_options_disable_algorithm_import = (grpc_compression_options_disable_algorithm_type) GetProcAddress(library, "grpc_compression_options_disable_algorithm");
339
+ grpc_compression_options_is_algorithm_enabled_import = (grpc_compression_options_is_algorithm_enabled_type) GetProcAddress(library, "grpc_compression_options_is_algorithm_enabled");
340
+ grpc_metadata_array_init_import = (grpc_metadata_array_init_type) GetProcAddress(library, "grpc_metadata_array_init");
341
+ grpc_metadata_array_destroy_import = (grpc_metadata_array_destroy_type) GetProcAddress(library, "grpc_metadata_array_destroy");
342
+ grpc_call_details_init_import = (grpc_call_details_init_type) GetProcAddress(library, "grpc_call_details_init");
343
+ grpc_call_details_destroy_import = (grpc_call_details_destroy_type) GetProcAddress(library, "grpc_call_details_destroy");
344
+ grpc_register_plugin_import = (grpc_register_plugin_type) GetProcAddress(library, "grpc_register_plugin");
345
+ grpc_init_import = (grpc_init_type) GetProcAddress(library, "grpc_init");
346
+ grpc_shutdown_import = (grpc_shutdown_type) GetProcAddress(library, "grpc_shutdown");
347
+ grpc_version_string_import = (grpc_version_string_type) GetProcAddress(library, "grpc_version_string");
348
+ grpc_completion_queue_create_import = (grpc_completion_queue_create_type) GetProcAddress(library, "grpc_completion_queue_create");
349
+ grpc_completion_queue_next_import = (grpc_completion_queue_next_type) GetProcAddress(library, "grpc_completion_queue_next");
350
+ grpc_completion_queue_pluck_import = (grpc_completion_queue_pluck_type) GetProcAddress(library, "grpc_completion_queue_pluck");
351
+ grpc_completion_queue_shutdown_import = (grpc_completion_queue_shutdown_type) GetProcAddress(library, "grpc_completion_queue_shutdown");
352
+ grpc_completion_queue_destroy_import = (grpc_completion_queue_destroy_type) GetProcAddress(library, "grpc_completion_queue_destroy");
353
+ grpc_alarm_create_import = (grpc_alarm_create_type) GetProcAddress(library, "grpc_alarm_create");
354
+ grpc_alarm_cancel_import = (grpc_alarm_cancel_type) GetProcAddress(library, "grpc_alarm_cancel");
355
+ grpc_alarm_destroy_import = (grpc_alarm_destroy_type) GetProcAddress(library, "grpc_alarm_destroy");
356
+ grpc_channel_check_connectivity_state_import = (grpc_channel_check_connectivity_state_type) GetProcAddress(library, "grpc_channel_check_connectivity_state");
357
+ grpc_channel_watch_connectivity_state_import = (grpc_channel_watch_connectivity_state_type) GetProcAddress(library, "grpc_channel_watch_connectivity_state");
358
+ grpc_channel_create_call_import = (grpc_channel_create_call_type) GetProcAddress(library, "grpc_channel_create_call");
359
+ grpc_channel_ping_import = (grpc_channel_ping_type) GetProcAddress(library, "grpc_channel_ping");
360
+ grpc_channel_register_call_import = (grpc_channel_register_call_type) GetProcAddress(library, "grpc_channel_register_call");
361
+ grpc_channel_create_registered_call_import = (grpc_channel_create_registered_call_type) GetProcAddress(library, "grpc_channel_create_registered_call");
362
+ grpc_call_start_batch_import = (grpc_call_start_batch_type) GetProcAddress(library, "grpc_call_start_batch");
363
+ grpc_call_get_peer_import = (grpc_call_get_peer_type) GetProcAddress(library, "grpc_call_get_peer");
364
+ grpc_census_call_set_context_import = (grpc_census_call_set_context_type) GetProcAddress(library, "grpc_census_call_set_context");
365
+ grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context");
366
+ grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target");
367
+ grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create");
368
+ grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create");
369
+ grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy");
370
+ grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel");
371
+ grpc_call_cancel_with_status_import = (grpc_call_cancel_with_status_type) GetProcAddress(library, "grpc_call_cancel_with_status");
372
+ grpc_call_destroy_import = (grpc_call_destroy_type) GetProcAddress(library, "grpc_call_destroy");
373
+ grpc_server_request_call_import = (grpc_server_request_call_type) GetProcAddress(library, "grpc_server_request_call");
374
+ grpc_server_register_method_import = (grpc_server_register_method_type) GetProcAddress(library, "grpc_server_register_method");
375
+ grpc_server_request_registered_call_import = (grpc_server_request_registered_call_type) GetProcAddress(library, "grpc_server_request_registered_call");
376
+ grpc_server_create_import = (grpc_server_create_type) GetProcAddress(library, "grpc_server_create");
377
+ grpc_server_register_completion_queue_import = (grpc_server_register_completion_queue_type) GetProcAddress(library, "grpc_server_register_completion_queue");
378
+ grpc_server_add_insecure_http2_port_import = (grpc_server_add_insecure_http2_port_type) GetProcAddress(library, "grpc_server_add_insecure_http2_port");
379
+ grpc_server_start_import = (grpc_server_start_type) GetProcAddress(library, "grpc_server_start");
380
+ grpc_server_shutdown_and_notify_import = (grpc_server_shutdown_and_notify_type) GetProcAddress(library, "grpc_server_shutdown_and_notify");
381
+ grpc_server_cancel_all_calls_import = (grpc_server_cancel_all_calls_type) GetProcAddress(library, "grpc_server_cancel_all_calls");
382
+ grpc_server_destroy_import = (grpc_server_destroy_type) GetProcAddress(library, "grpc_server_destroy");
383
+ grpc_tracer_set_enabled_import = (grpc_tracer_set_enabled_type) GetProcAddress(library, "grpc_tracer_set_enabled");
384
+ grpc_header_key_is_legal_import = (grpc_header_key_is_legal_type) GetProcAddress(library, "grpc_header_key_is_legal");
385
+ grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal");
386
+ grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header");
387
+ grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next");
388
+ grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator");
389
+ grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity");
390
+ grpc_auth_context_find_properties_by_name_import = (grpc_auth_context_find_properties_by_name_type) GetProcAddress(library, "grpc_auth_context_find_properties_by_name");
391
+ grpc_auth_context_peer_identity_property_name_import = (grpc_auth_context_peer_identity_property_name_type) GetProcAddress(library, "grpc_auth_context_peer_identity_property_name");
392
+ grpc_auth_context_peer_is_authenticated_import = (grpc_auth_context_peer_is_authenticated_type) GetProcAddress(library, "grpc_auth_context_peer_is_authenticated");
393
+ grpc_call_auth_context_import = (grpc_call_auth_context_type) GetProcAddress(library, "grpc_call_auth_context");
394
+ grpc_auth_context_release_import = (grpc_auth_context_release_type) GetProcAddress(library, "grpc_auth_context_release");
395
+ grpc_auth_context_add_property_import = (grpc_auth_context_add_property_type) GetProcAddress(library, "grpc_auth_context_add_property");
396
+ grpc_auth_context_add_cstring_property_import = (grpc_auth_context_add_cstring_property_type) GetProcAddress(library, "grpc_auth_context_add_cstring_property");
397
+ grpc_auth_context_set_peer_identity_property_name_import = (grpc_auth_context_set_peer_identity_property_name_type) GetProcAddress(library, "grpc_auth_context_set_peer_identity_property_name");
398
+ grpc_channel_credentials_release_import = (grpc_channel_credentials_release_type) GetProcAddress(library, "grpc_channel_credentials_release");
399
+ grpc_google_default_credentials_create_import = (grpc_google_default_credentials_create_type) GetProcAddress(library, "grpc_google_default_credentials_create");
400
+ grpc_ssl_credentials_create_import = (grpc_ssl_credentials_create_type) GetProcAddress(library, "grpc_ssl_credentials_create");
401
+ grpc_call_credentials_release_import = (grpc_call_credentials_release_type) GetProcAddress(library, "grpc_call_credentials_release");
402
+ grpc_composite_channel_credentials_create_import = (grpc_composite_channel_credentials_create_type) GetProcAddress(library, "grpc_composite_channel_credentials_create");
403
+ grpc_composite_call_credentials_create_import = (grpc_composite_call_credentials_create_type) GetProcAddress(library, "grpc_composite_call_credentials_create");
404
+ grpc_google_compute_engine_credentials_create_import = (grpc_google_compute_engine_credentials_create_type) GetProcAddress(library, "grpc_google_compute_engine_credentials_create");
405
+ grpc_max_auth_token_lifetime_import = (grpc_max_auth_token_lifetime_type) GetProcAddress(library, "grpc_max_auth_token_lifetime");
406
+ grpc_service_account_jwt_access_credentials_create_import = (grpc_service_account_jwt_access_credentials_create_type) GetProcAddress(library, "grpc_service_account_jwt_access_credentials_create");
407
+ grpc_google_refresh_token_credentials_create_import = (grpc_google_refresh_token_credentials_create_type) GetProcAddress(library, "grpc_google_refresh_token_credentials_create");
408
+ grpc_access_token_credentials_create_import = (grpc_access_token_credentials_create_type) GetProcAddress(library, "grpc_access_token_credentials_create");
409
+ grpc_google_iam_credentials_create_import = (grpc_google_iam_credentials_create_type) GetProcAddress(library, "grpc_google_iam_credentials_create");
410
+ grpc_metadata_credentials_create_from_plugin_import = (grpc_metadata_credentials_create_from_plugin_type) GetProcAddress(library, "grpc_metadata_credentials_create_from_plugin");
411
+ grpc_secure_channel_create_import = (grpc_secure_channel_create_type) GetProcAddress(library, "grpc_secure_channel_create");
412
+ grpc_server_credentials_release_import = (grpc_server_credentials_release_type) GetProcAddress(library, "grpc_server_credentials_release");
413
+ grpc_ssl_server_credentials_create_import = (grpc_ssl_server_credentials_create_type) GetProcAddress(library, "grpc_ssl_server_credentials_create");
414
+ grpc_server_add_secure_http2_port_import = (grpc_server_add_secure_http2_port_type) GetProcAddress(library, "grpc_server_add_secure_http2_port");
415
+ grpc_call_set_credentials_import = (grpc_call_set_credentials_type) GetProcAddress(library, "grpc_call_set_credentials");
416
+ grpc_server_credentials_set_auth_metadata_processor_import = (grpc_server_credentials_set_auth_metadata_processor_type) GetProcAddress(library, "grpc_server_credentials_set_auth_metadata_processor");
417
+ gpr_malloc_import = (gpr_malloc_type) GetProcAddress(library, "gpr_malloc");
418
+ gpr_free_import = (gpr_free_type) GetProcAddress(library, "gpr_free");
419
+ gpr_realloc_import = (gpr_realloc_type) GetProcAddress(library, "gpr_realloc");
420
+ gpr_malloc_aligned_import = (gpr_malloc_aligned_type) GetProcAddress(library, "gpr_malloc_aligned");
421
+ gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned");
422
+ gpr_set_allocation_functions_import = (gpr_set_allocation_functions_type) GetProcAddress(library, "gpr_set_allocation_functions");
423
+ gpr_get_allocation_functions_import = (gpr_get_allocation_functions_type) GetProcAddress(library, "gpr_get_allocation_functions");
424
+ grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create");
425
+ grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create");
426
+ grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy");
427
+ grpc_byte_buffer_length_import = (grpc_byte_buffer_length_type) GetProcAddress(library, "grpc_byte_buffer_length");
428
+ grpc_byte_buffer_destroy_import = (grpc_byte_buffer_destroy_type) GetProcAddress(library, "grpc_byte_buffer_destroy");
429
+ grpc_byte_buffer_reader_init_import = (grpc_byte_buffer_reader_init_type) GetProcAddress(library, "grpc_byte_buffer_reader_init");
430
+ grpc_byte_buffer_reader_destroy_import = (grpc_byte_buffer_reader_destroy_type) GetProcAddress(library, "grpc_byte_buffer_reader_destroy");
431
+ grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next");
432
+ grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall");
433
+ grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader");
434
+ gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log");
435
+ gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message");
436
+ gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function");
437
+ gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref");
438
+ gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref");
439
+ gpr_slice_new_import = (gpr_slice_new_type) GetProcAddress(library, "gpr_slice_new");
440
+ gpr_slice_new_with_len_import = (gpr_slice_new_with_len_type) GetProcAddress(library, "gpr_slice_new_with_len");
441
+ gpr_slice_malloc_import = (gpr_slice_malloc_type) GetProcAddress(library, "gpr_slice_malloc");
442
+ gpr_slice_from_copied_string_import = (gpr_slice_from_copied_string_type) GetProcAddress(library, "gpr_slice_from_copied_string");
443
+ gpr_slice_from_copied_buffer_import = (gpr_slice_from_copied_buffer_type) GetProcAddress(library, "gpr_slice_from_copied_buffer");
444
+ gpr_slice_from_static_string_import = (gpr_slice_from_static_string_type) GetProcAddress(library, "gpr_slice_from_static_string");
445
+ gpr_slice_sub_import = (gpr_slice_sub_type) GetProcAddress(library, "gpr_slice_sub");
446
+ gpr_slice_sub_no_ref_import = (gpr_slice_sub_no_ref_type) GetProcAddress(library, "gpr_slice_sub_no_ref");
447
+ gpr_slice_split_tail_import = (gpr_slice_split_tail_type) GetProcAddress(library, "gpr_slice_split_tail");
448
+ gpr_slice_split_head_import = (gpr_slice_split_head_type) GetProcAddress(library, "gpr_slice_split_head");
449
+ gpr_empty_slice_import = (gpr_empty_slice_type) GetProcAddress(library, "gpr_empty_slice");
450
+ gpr_slice_cmp_import = (gpr_slice_cmp_type) GetProcAddress(library, "gpr_slice_cmp");
451
+ gpr_slice_str_cmp_import = (gpr_slice_str_cmp_type) GetProcAddress(library, "gpr_slice_str_cmp");
452
+ gpr_slice_buffer_init_import = (gpr_slice_buffer_init_type) GetProcAddress(library, "gpr_slice_buffer_init");
453
+ gpr_slice_buffer_destroy_import = (gpr_slice_buffer_destroy_type) GetProcAddress(library, "gpr_slice_buffer_destroy");
454
+ gpr_slice_buffer_add_import = (gpr_slice_buffer_add_type) GetProcAddress(library, "gpr_slice_buffer_add");
455
+ gpr_slice_buffer_add_indexed_import = (gpr_slice_buffer_add_indexed_type) GetProcAddress(library, "gpr_slice_buffer_add_indexed");
456
+ gpr_slice_buffer_addn_import = (gpr_slice_buffer_addn_type) GetProcAddress(library, "gpr_slice_buffer_addn");
457
+ gpr_slice_buffer_tiny_add_import = (gpr_slice_buffer_tiny_add_type) GetProcAddress(library, "gpr_slice_buffer_tiny_add");
458
+ gpr_slice_buffer_pop_import = (gpr_slice_buffer_pop_type) GetProcAddress(library, "gpr_slice_buffer_pop");
459
+ gpr_slice_buffer_reset_and_unref_import = (gpr_slice_buffer_reset_and_unref_type) GetProcAddress(library, "gpr_slice_buffer_reset_and_unref");
460
+ gpr_slice_buffer_swap_import = (gpr_slice_buffer_swap_type) GetProcAddress(library, "gpr_slice_buffer_swap");
461
+ gpr_slice_buffer_move_into_import = (gpr_slice_buffer_move_into_type) GetProcAddress(library, "gpr_slice_buffer_move_into");
462
+ gpr_slice_buffer_trim_end_import = (gpr_slice_buffer_trim_end_type) GetProcAddress(library, "gpr_slice_buffer_trim_end");
463
+ gpr_slice_buffer_move_first_import = (gpr_slice_buffer_move_first_type) GetProcAddress(library, "gpr_slice_buffer_move_first");
464
+ gpr_slice_buffer_take_first_import = (gpr_slice_buffer_take_first_type) GetProcAddress(library, "gpr_slice_buffer_take_first");
465
+ gpr_mu_init_import = (gpr_mu_init_type) GetProcAddress(library, "gpr_mu_init");
466
+ gpr_mu_destroy_import = (gpr_mu_destroy_type) GetProcAddress(library, "gpr_mu_destroy");
467
+ gpr_mu_lock_import = (gpr_mu_lock_type) GetProcAddress(library, "gpr_mu_lock");
468
+ gpr_mu_unlock_import = (gpr_mu_unlock_type) GetProcAddress(library, "gpr_mu_unlock");
469
+ gpr_mu_trylock_import = (gpr_mu_trylock_type) GetProcAddress(library, "gpr_mu_trylock");
470
+ gpr_cv_init_import = (gpr_cv_init_type) GetProcAddress(library, "gpr_cv_init");
471
+ gpr_cv_destroy_import = (gpr_cv_destroy_type) GetProcAddress(library, "gpr_cv_destroy");
472
+ gpr_cv_wait_import = (gpr_cv_wait_type) GetProcAddress(library, "gpr_cv_wait");
473
+ gpr_cv_signal_import = (gpr_cv_signal_type) GetProcAddress(library, "gpr_cv_signal");
474
+ gpr_cv_broadcast_import = (gpr_cv_broadcast_type) GetProcAddress(library, "gpr_cv_broadcast");
475
+ gpr_once_init_import = (gpr_once_init_type) GetProcAddress(library, "gpr_once_init");
476
+ gpr_event_init_import = (gpr_event_init_type) GetProcAddress(library, "gpr_event_init");
477
+ gpr_event_set_import = (gpr_event_set_type) GetProcAddress(library, "gpr_event_set");
478
+ gpr_event_get_import = (gpr_event_get_type) GetProcAddress(library, "gpr_event_get");
479
+ gpr_event_wait_import = (gpr_event_wait_type) GetProcAddress(library, "gpr_event_wait");
480
+ gpr_ref_init_import = (gpr_ref_init_type) GetProcAddress(library, "gpr_ref_init");
481
+ gpr_ref_import = (gpr_ref_type) GetProcAddress(library, "gpr_ref");
482
+ gpr_refn_import = (gpr_refn_type) GetProcAddress(library, "gpr_refn");
483
+ gpr_unref_import = (gpr_unref_type) GetProcAddress(library, "gpr_unref");
484
+ gpr_stats_init_import = (gpr_stats_init_type) GetProcAddress(library, "gpr_stats_init");
485
+ gpr_stats_inc_import = (gpr_stats_inc_type) GetProcAddress(library, "gpr_stats_inc");
486
+ gpr_stats_read_import = (gpr_stats_read_type) GetProcAddress(library, "gpr_stats_read");
487
+ gpr_time_0_import = (gpr_time_0_type) GetProcAddress(library, "gpr_time_0");
488
+ gpr_inf_future_import = (gpr_inf_future_type) GetProcAddress(library, "gpr_inf_future");
489
+ gpr_inf_past_import = (gpr_inf_past_type) GetProcAddress(library, "gpr_inf_past");
490
+ gpr_time_init_import = (gpr_time_init_type) GetProcAddress(library, "gpr_time_init");
491
+ gpr_now_import = (gpr_now_type) GetProcAddress(library, "gpr_now");
492
+ gpr_convert_clock_type_import = (gpr_convert_clock_type_type) GetProcAddress(library, "gpr_convert_clock_type");
493
+ gpr_time_cmp_import = (gpr_time_cmp_type) GetProcAddress(library, "gpr_time_cmp");
494
+ gpr_time_max_import = (gpr_time_max_type) GetProcAddress(library, "gpr_time_max");
495
+ gpr_time_min_import = (gpr_time_min_type) GetProcAddress(library, "gpr_time_min");
496
+ gpr_time_add_import = (gpr_time_add_type) GetProcAddress(library, "gpr_time_add");
497
+ gpr_time_sub_import = (gpr_time_sub_type) GetProcAddress(library, "gpr_time_sub");
498
+ gpr_time_from_micros_import = (gpr_time_from_micros_type) GetProcAddress(library, "gpr_time_from_micros");
499
+ gpr_time_from_nanos_import = (gpr_time_from_nanos_type) GetProcAddress(library, "gpr_time_from_nanos");
500
+ gpr_time_from_millis_import = (gpr_time_from_millis_type) GetProcAddress(library, "gpr_time_from_millis");
501
+ gpr_time_from_seconds_import = (gpr_time_from_seconds_type) GetProcAddress(library, "gpr_time_from_seconds");
502
+ gpr_time_from_minutes_import = (gpr_time_from_minutes_type) GetProcAddress(library, "gpr_time_from_minutes");
503
+ gpr_time_from_hours_import = (gpr_time_from_hours_type) GetProcAddress(library, "gpr_time_from_hours");
504
+ gpr_time_to_millis_import = (gpr_time_to_millis_type) GetProcAddress(library, "gpr_time_to_millis");
505
+ gpr_time_similar_import = (gpr_time_similar_type) GetProcAddress(library, "gpr_time_similar");
506
+ gpr_sleep_until_import = (gpr_sleep_until_type) GetProcAddress(library, "gpr_sleep_until");
507
+ gpr_timespec_to_micros_import = (gpr_timespec_to_micros_type) GetProcAddress(library, "gpr_timespec_to_micros");
508
+ gpr_avl_create_import = (gpr_avl_create_type) GetProcAddress(library, "gpr_avl_create");
509
+ gpr_avl_ref_import = (gpr_avl_ref_type) GetProcAddress(library, "gpr_avl_ref");
510
+ gpr_avl_unref_import = (gpr_avl_unref_type) GetProcAddress(library, "gpr_avl_unref");
511
+ gpr_avl_add_import = (gpr_avl_add_type) GetProcAddress(library, "gpr_avl_add");
512
+ gpr_avl_remove_import = (gpr_avl_remove_type) GetProcAddress(library, "gpr_avl_remove");
513
+ gpr_avl_get_import = (gpr_avl_get_type) GetProcAddress(library, "gpr_avl_get");
514
+ gpr_cmdline_create_import = (gpr_cmdline_create_type) GetProcAddress(library, "gpr_cmdline_create");
515
+ gpr_cmdline_add_int_import = (gpr_cmdline_add_int_type) GetProcAddress(library, "gpr_cmdline_add_int");
516
+ gpr_cmdline_add_flag_import = (gpr_cmdline_add_flag_type) GetProcAddress(library, "gpr_cmdline_add_flag");
517
+ gpr_cmdline_add_string_import = (gpr_cmdline_add_string_type) GetProcAddress(library, "gpr_cmdline_add_string");
518
+ gpr_cmdline_on_extra_arg_import = (gpr_cmdline_on_extra_arg_type) GetProcAddress(library, "gpr_cmdline_on_extra_arg");
519
+ gpr_cmdline_set_survive_failure_import = (gpr_cmdline_set_survive_failure_type) GetProcAddress(library, "gpr_cmdline_set_survive_failure");
520
+ gpr_cmdline_parse_import = (gpr_cmdline_parse_type) GetProcAddress(library, "gpr_cmdline_parse");
521
+ gpr_cmdline_destroy_import = (gpr_cmdline_destroy_type) GetProcAddress(library, "gpr_cmdline_destroy");
522
+ gpr_cmdline_usage_string_import = (gpr_cmdline_usage_string_type) GetProcAddress(library, "gpr_cmdline_usage_string");
523
+ gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores");
524
+ gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu");
525
+ gpr_histogram_create_import = (gpr_histogram_create_type) GetProcAddress(library, "gpr_histogram_create");
526
+ gpr_histogram_destroy_import = (gpr_histogram_destroy_type) GetProcAddress(library, "gpr_histogram_destroy");
527
+ gpr_histogram_add_import = (gpr_histogram_add_type) GetProcAddress(library, "gpr_histogram_add");
528
+ gpr_histogram_merge_import = (gpr_histogram_merge_type) GetProcAddress(library, "gpr_histogram_merge");
529
+ gpr_histogram_percentile_import = (gpr_histogram_percentile_type) GetProcAddress(library, "gpr_histogram_percentile");
530
+ gpr_histogram_mean_import = (gpr_histogram_mean_type) GetProcAddress(library, "gpr_histogram_mean");
531
+ gpr_histogram_stddev_import = (gpr_histogram_stddev_type) GetProcAddress(library, "gpr_histogram_stddev");
532
+ gpr_histogram_variance_import = (gpr_histogram_variance_type) GetProcAddress(library, "gpr_histogram_variance");
533
+ gpr_histogram_maximum_import = (gpr_histogram_maximum_type) GetProcAddress(library, "gpr_histogram_maximum");
534
+ gpr_histogram_minimum_import = (gpr_histogram_minimum_type) GetProcAddress(library, "gpr_histogram_minimum");
535
+ gpr_histogram_count_import = (gpr_histogram_count_type) GetProcAddress(library, "gpr_histogram_count");
536
+ gpr_histogram_sum_import = (gpr_histogram_sum_type) GetProcAddress(library, "gpr_histogram_sum");
537
+ gpr_histogram_sum_of_squares_import = (gpr_histogram_sum_of_squares_type) GetProcAddress(library, "gpr_histogram_sum_of_squares");
538
+ gpr_histogram_get_contents_import = (gpr_histogram_get_contents_type) GetProcAddress(library, "gpr_histogram_get_contents");
539
+ gpr_histogram_merge_contents_import = (gpr_histogram_merge_contents_type) GetProcAddress(library, "gpr_histogram_merge_contents");
540
+ gpr_join_host_port_import = (gpr_join_host_port_type) GetProcAddress(library, "gpr_join_host_port");
541
+ gpr_split_host_port_import = (gpr_split_host_port_type) GetProcAddress(library, "gpr_split_host_port");
542
+ gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message");
543
+ gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup");
544
+ gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf");
545
+ gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension");
546
+ gpr_subprocess_create_import = (gpr_subprocess_create_type) GetProcAddress(library, "gpr_subprocess_create");
547
+ gpr_subprocess_destroy_import = (gpr_subprocess_destroy_type) GetProcAddress(library, "gpr_subprocess_destroy");
548
+ gpr_subprocess_join_import = (gpr_subprocess_join_type) GetProcAddress(library, "gpr_subprocess_join");
549
+ gpr_subprocess_interrupt_import = (gpr_subprocess_interrupt_type) GetProcAddress(library, "gpr_subprocess_interrupt");
550
+ gpr_thd_new_import = (gpr_thd_new_type) GetProcAddress(library, "gpr_thd_new");
551
+ gpr_thd_options_default_import = (gpr_thd_options_default_type) GetProcAddress(library, "gpr_thd_options_default");
552
+ gpr_thd_options_set_detached_import = (gpr_thd_options_set_detached_type) GetProcAddress(library, "gpr_thd_options_set_detached");
553
+ gpr_thd_options_set_joinable_import = (gpr_thd_options_set_joinable_type) GetProcAddress(library, "gpr_thd_options_set_joinable");
554
+ gpr_thd_options_is_detached_import = (gpr_thd_options_is_detached_type) GetProcAddress(library, "gpr_thd_options_is_detached");
555
+ gpr_thd_options_is_joinable_import = (gpr_thd_options_is_joinable_type) GetProcAddress(library, "gpr_thd_options_is_joinable");
556
+ gpr_thd_currentid_import = (gpr_thd_currentid_type) GetProcAddress(library, "gpr_thd_currentid");
557
+ gpr_thd_join_import = (gpr_thd_join_type) GetProcAddress(library, "gpr_thd_join");
558
+ }
559
+
560
+ #endif /* GPR_WIN32 */