garru-ruby_scribe_client 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. data/CHANGELOG +3 -0
  2. data/LICENSE +0 -0
  3. data/Manifest +39 -0
  4. data/README +0 -0
  5. data/Rakefile +8 -0
  6. data/etc/scribe_cat.rb +23 -0
  7. data/lib/ruby_scribe_client/FacebookService.rb +685 -0
  8. data/lib/ruby_scribe_client/fb303_types.rb +16 -0
  9. data/lib/ruby_scribe_client/reflection_limited_types.rb +148 -0
  10. data/lib/ruby_scribe_client/scribe.rb +82 -0
  11. data/lib/ruby_scribe_client/scribe_types.rb +32 -0
  12. data/lib/ruby_scribe_client.rb +33 -0
  13. data/ruby_scribe_client.gemspec +31 -0
  14. data/vendor/thrift/client.rb +44 -0
  15. data/vendor/thrift/deprecation.rb +155 -0
  16. data/vendor/thrift/exceptions.rb +65 -0
  17. data/vendor/thrift/processor.rb +39 -0
  18. data/vendor/thrift/protocol/binaryprotocol.rb +213 -0
  19. data/vendor/thrift/protocol/binaryprotocolaccelerated.rb +19 -0
  20. data/vendor/thrift/protocol/tbinaryprotocol.rb +2 -0
  21. data/vendor/thrift/protocol/tprotocol.rb +2 -0
  22. data/vendor/thrift/protocol.rb +270 -0
  23. data/vendor/thrift/serializer.rb +27 -0
  24. data/vendor/thrift/server/httpserver.rb +44 -0
  25. data/vendor/thrift/server/nonblockingserver.rb +278 -0
  26. data/vendor/thrift/server/thttpserver.rb +2 -0
  27. data/vendor/thrift/server/tserver.rb +2 -0
  28. data/vendor/thrift/server.rb +135 -0
  29. data/vendor/thrift/struct.rb +272 -0
  30. data/vendor/thrift/thrift.rb +14 -0
  31. data/vendor/thrift/transport/httpclient.rb +29 -0
  32. data/vendor/thrift/transport/socket.rb +153 -0
  33. data/vendor/thrift/transport/thttpclient.rb +2 -0
  34. data/vendor/thrift/transport/tsocket.rb +2 -0
  35. data/vendor/thrift/transport/ttransport.rb +2 -0
  36. data/vendor/thrift/transport/unixsocket.rb +58 -0
  37. data/vendor/thrift/transport.rb +319 -0
  38. data/vendor/thrift/types.rb +83 -0
  39. data/vendor/thrift.rb +28 -0
  40. metadata +104 -0
@@ -0,0 +1,685 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ module FacebookService
8
+ class Client
9
+ include ::Thrift::Client
10
+
11
+ def getName()
12
+ send_getName()
13
+ return recv_getName()
14
+ end
15
+
16
+ def send_getName()
17
+ send_message('getName', GetName_args)
18
+ end
19
+
20
+ def recv_getName()
21
+ result = receive_message(GetName_result)
22
+ return result.success unless result.success.nil?
23
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getName failed: unknown result')
24
+ end
25
+
26
+ def getVersion()
27
+ send_getVersion()
28
+ return recv_getVersion()
29
+ end
30
+
31
+ def send_getVersion()
32
+ send_message('getVersion', GetVersion_args)
33
+ end
34
+
35
+ def recv_getVersion()
36
+ result = receive_message(GetVersion_result)
37
+ return result.success unless result.success.nil?
38
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getVersion failed: unknown result')
39
+ end
40
+
41
+ def getStatus()
42
+ send_getStatus()
43
+ return recv_getStatus()
44
+ end
45
+
46
+ def send_getStatus()
47
+ send_message('getStatus', GetStatus_args)
48
+ end
49
+
50
+ def recv_getStatus()
51
+ result = receive_message(GetStatus_result)
52
+ return result.success unless result.success.nil?
53
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getStatus failed: unknown result')
54
+ end
55
+
56
+ def getStatusDetails()
57
+ send_getStatusDetails()
58
+ return recv_getStatusDetails()
59
+ end
60
+
61
+ def send_getStatusDetails()
62
+ send_message('getStatusDetails', GetStatusDetails_args)
63
+ end
64
+
65
+ def recv_getStatusDetails()
66
+ result = receive_message(GetStatusDetails_result)
67
+ return result.success unless result.success.nil?
68
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getStatusDetails failed: unknown result')
69
+ end
70
+
71
+ def getCounters()
72
+ send_getCounters()
73
+ return recv_getCounters()
74
+ end
75
+
76
+ def send_getCounters()
77
+ send_message('getCounters', GetCounters_args)
78
+ end
79
+
80
+ def recv_getCounters()
81
+ result = receive_message(GetCounters_result)
82
+ return result.success unless result.success.nil?
83
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getCounters failed: unknown result')
84
+ end
85
+
86
+ def getCounter(key)
87
+ send_getCounter(key)
88
+ return recv_getCounter()
89
+ end
90
+
91
+ def send_getCounter(key)
92
+ send_message('getCounter', GetCounter_args, :key => key)
93
+ end
94
+
95
+ def recv_getCounter()
96
+ result = receive_message(GetCounter_result)
97
+ return result.success unless result.success.nil?
98
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getCounter failed: unknown result')
99
+ end
100
+
101
+ def setOption(key, value)
102
+ send_setOption(key, value)
103
+ recv_setOption()
104
+ end
105
+
106
+ def send_setOption(key, value)
107
+ send_message('setOption', SetOption_args, :key => key, :value => value)
108
+ end
109
+
110
+ def recv_setOption()
111
+ result = receive_message(SetOption_result)
112
+ return
113
+ end
114
+
115
+ def getOption(key)
116
+ send_getOption(key)
117
+ return recv_getOption()
118
+ end
119
+
120
+ def send_getOption(key)
121
+ send_message('getOption', GetOption_args, :key => key)
122
+ end
123
+
124
+ def recv_getOption()
125
+ result = receive_message(GetOption_result)
126
+ return result.success unless result.success.nil?
127
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getOption failed: unknown result')
128
+ end
129
+
130
+ def getOptions()
131
+ send_getOptions()
132
+ return recv_getOptions()
133
+ end
134
+
135
+ def send_getOptions()
136
+ send_message('getOptions', GetOptions_args)
137
+ end
138
+
139
+ def recv_getOptions()
140
+ result = receive_message(GetOptions_result)
141
+ return result.success unless result.success.nil?
142
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getOptions failed: unknown result')
143
+ end
144
+
145
+ def getCpuProfile(profileDurationInSec)
146
+ send_getCpuProfile(profileDurationInSec)
147
+ return recv_getCpuProfile()
148
+ end
149
+
150
+ def send_getCpuProfile(profileDurationInSec)
151
+ send_message('getCpuProfile', GetCpuProfile_args, :profileDurationInSec => profileDurationInSec)
152
+ end
153
+
154
+ def recv_getCpuProfile()
155
+ result = receive_message(GetCpuProfile_result)
156
+ return result.success unless result.success.nil?
157
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'getCpuProfile failed: unknown result')
158
+ end
159
+
160
+ def aliveSince()
161
+ send_aliveSince()
162
+ return recv_aliveSince()
163
+ end
164
+
165
+ def send_aliveSince()
166
+ send_message('aliveSince', AliveSince_args)
167
+ end
168
+
169
+ def recv_aliveSince()
170
+ result = receive_message(AliveSince_result)
171
+ return result.success unless result.success.nil?
172
+ raise Thrift::ApplicationException.new(Thrift::ApplicationException::MISSING_RESULT, 'aliveSince failed: unknown result')
173
+ end
174
+
175
+ def reinitialize()
176
+ send_reinitialize()
177
+ end
178
+
179
+ def send_reinitialize()
180
+ send_message('reinitialize', Reinitialize_args)
181
+ end
182
+ def shutdown()
183
+ send_shutdown()
184
+ end
185
+
186
+ def send_shutdown()
187
+ send_message('shutdown', Shutdown_args)
188
+ end
189
+ end
190
+
191
+ class Processor
192
+ include ::Thrift::Processor
193
+
194
+ def process_getName(seqid, iprot, oprot)
195
+ args = read_args(iprot, GetName_args)
196
+ result = GetName_result.new()
197
+ result.success = @handler.getName()
198
+ write_result(result, oprot, 'getName', seqid)
199
+ end
200
+
201
+ def process_getVersion(seqid, iprot, oprot)
202
+ args = read_args(iprot, GetVersion_args)
203
+ result = GetVersion_result.new()
204
+ result.success = @handler.getVersion()
205
+ write_result(result, oprot, 'getVersion', seqid)
206
+ end
207
+
208
+ def process_getStatus(seqid, iprot, oprot)
209
+ args = read_args(iprot, GetStatus_args)
210
+ result = GetStatus_result.new()
211
+ result.success = @handler.getStatus()
212
+ write_result(result, oprot, 'getStatus', seqid)
213
+ end
214
+
215
+ def process_getStatusDetails(seqid, iprot, oprot)
216
+ args = read_args(iprot, GetStatusDetails_args)
217
+ result = GetStatusDetails_result.new()
218
+ result.success = @handler.getStatusDetails()
219
+ write_result(result, oprot, 'getStatusDetails', seqid)
220
+ end
221
+
222
+ def process_getCounters(seqid, iprot, oprot)
223
+ args = read_args(iprot, GetCounters_args)
224
+ result = GetCounters_result.new()
225
+ result.success = @handler.getCounters()
226
+ write_result(result, oprot, 'getCounters', seqid)
227
+ end
228
+
229
+ def process_getCounter(seqid, iprot, oprot)
230
+ args = read_args(iprot, GetCounter_args)
231
+ result = GetCounter_result.new()
232
+ result.success = @handler.getCounter(args.key)
233
+ write_result(result, oprot, 'getCounter', seqid)
234
+ end
235
+
236
+ def process_setOption(seqid, iprot, oprot)
237
+ args = read_args(iprot, SetOption_args)
238
+ result = SetOption_result.new()
239
+ @handler.setOption(args.key, args.value)
240
+ write_result(result, oprot, 'setOption', seqid)
241
+ end
242
+
243
+ def process_getOption(seqid, iprot, oprot)
244
+ args = read_args(iprot, GetOption_args)
245
+ result = GetOption_result.new()
246
+ result.success = @handler.getOption(args.key)
247
+ write_result(result, oprot, 'getOption', seqid)
248
+ end
249
+
250
+ def process_getOptions(seqid, iprot, oprot)
251
+ args = read_args(iprot, GetOptions_args)
252
+ result = GetOptions_result.new()
253
+ result.success = @handler.getOptions()
254
+ write_result(result, oprot, 'getOptions', seqid)
255
+ end
256
+
257
+ def process_getCpuProfile(seqid, iprot, oprot)
258
+ args = read_args(iprot, GetCpuProfile_args)
259
+ result = GetCpuProfile_result.new()
260
+ result.success = @handler.getCpuProfile(args.profileDurationInSec)
261
+ write_result(result, oprot, 'getCpuProfile', seqid)
262
+ end
263
+
264
+ def process_aliveSince(seqid, iprot, oprot)
265
+ args = read_args(iprot, AliveSince_args)
266
+ result = AliveSince_result.new()
267
+ result.success = @handler.aliveSince()
268
+ write_result(result, oprot, 'aliveSince', seqid)
269
+ end
270
+
271
+ def process_reinitialize(seqid, iprot, oprot)
272
+ args = read_args(iprot, Reinitialize_args)
273
+ @handler.reinitialize()
274
+ return
275
+ end
276
+
277
+ def process_shutdown(seqid, iprot, oprot)
278
+ args = read_args(iprot, Shutdown_args)
279
+ @handler.shutdown()
280
+ return
281
+ end
282
+
283
+ end
284
+
285
+ # HELPER FUNCTIONS AND STRUCTURES
286
+
287
+ class GetName_args
288
+ include ::Thrift::Struct
289
+
290
+ FIELDS = {
291
+
292
+ }
293
+
294
+ def struct_fields; FIELDS; end
295
+
296
+ def validate
297
+ end
298
+
299
+ end
300
+
301
+ class GetName_result
302
+ include ::Thrift::Struct
303
+ SUCCESS = 0
304
+
305
+ Thrift::Struct.field_accessor self, :success
306
+ FIELDS = {
307
+ SUCCESS => {:type => Thrift::Types::STRING, :name => 'success'}
308
+ }
309
+
310
+ def struct_fields; FIELDS; end
311
+
312
+ def validate
313
+ end
314
+
315
+ end
316
+
317
+ class GetVersion_args
318
+ include ::Thrift::Struct
319
+
320
+ FIELDS = {
321
+
322
+ }
323
+
324
+ def struct_fields; FIELDS; end
325
+
326
+ def validate
327
+ end
328
+
329
+ end
330
+
331
+ class GetVersion_result
332
+ include ::Thrift::Struct
333
+ SUCCESS = 0
334
+
335
+ Thrift::Struct.field_accessor self, :success
336
+ FIELDS = {
337
+ SUCCESS => {:type => Thrift::Types::STRING, :name => 'success'}
338
+ }
339
+
340
+ def struct_fields; FIELDS; end
341
+
342
+ def validate
343
+ end
344
+
345
+ end
346
+
347
+ class GetStatus_args
348
+ include ::Thrift::Struct
349
+
350
+ FIELDS = {
351
+
352
+ }
353
+
354
+ def struct_fields; FIELDS; end
355
+
356
+ def validate
357
+ end
358
+
359
+ end
360
+
361
+ class GetStatus_result
362
+ include ::Thrift::Struct
363
+ SUCCESS = 0
364
+
365
+ Thrift::Struct.field_accessor self, :success
366
+ FIELDS = {
367
+ SUCCESS => {:type => Thrift::Types::I32, :name => 'success'}
368
+ }
369
+
370
+ def struct_fields; FIELDS; end
371
+
372
+ def validate
373
+ unless @success.nil? || fb_status::VALID_VALUES.include?(@success)
374
+ raise Thrift::ProtocolException.new(Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
375
+ end
376
+ end
377
+
378
+ end
379
+
380
+ class GetStatusDetails_args
381
+ include ::Thrift::Struct
382
+
383
+ FIELDS = {
384
+
385
+ }
386
+
387
+ def struct_fields; FIELDS; end
388
+
389
+ def validate
390
+ end
391
+
392
+ end
393
+
394
+ class GetStatusDetails_result
395
+ include ::Thrift::Struct
396
+ SUCCESS = 0
397
+
398
+ Thrift::Struct.field_accessor self, :success
399
+ FIELDS = {
400
+ SUCCESS => {:type => Thrift::Types::STRING, :name => 'success'}
401
+ }
402
+
403
+ def struct_fields; FIELDS; end
404
+
405
+ def validate
406
+ end
407
+
408
+ end
409
+
410
+ class GetCounters_args
411
+ include ::Thrift::Struct
412
+
413
+ FIELDS = {
414
+
415
+ }
416
+
417
+ def struct_fields; FIELDS; end
418
+
419
+ def validate
420
+ end
421
+
422
+ end
423
+
424
+ class GetCounters_result
425
+ include ::Thrift::Struct
426
+ SUCCESS = 0
427
+
428
+ Thrift::Struct.field_accessor self, :success
429
+ FIELDS = {
430
+ SUCCESS => {:type => Thrift::Types::MAP, :name => 'success', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::I64}}
431
+ }
432
+
433
+ def struct_fields; FIELDS; end
434
+
435
+ def validate
436
+ end
437
+
438
+ end
439
+
440
+ class GetCounter_args
441
+ include ::Thrift::Struct
442
+ KEY = 1
443
+
444
+ Thrift::Struct.field_accessor self, :key
445
+ FIELDS = {
446
+ KEY => {:type => Thrift::Types::STRING, :name => 'key'}
447
+ }
448
+
449
+ def struct_fields; FIELDS; end
450
+
451
+ def validate
452
+ end
453
+
454
+ end
455
+
456
+ class GetCounter_result
457
+ include ::Thrift::Struct
458
+ SUCCESS = 0
459
+
460
+ Thrift::Struct.field_accessor self, :success
461
+ FIELDS = {
462
+ SUCCESS => {:type => Thrift::Types::I64, :name => 'success'}
463
+ }
464
+
465
+ def struct_fields; FIELDS; end
466
+
467
+ def validate
468
+ end
469
+
470
+ end
471
+
472
+ class SetOption_args
473
+ include ::Thrift::Struct
474
+ KEY = 1
475
+ VALUE = 2
476
+
477
+ Thrift::Struct.field_accessor self, :key, :value
478
+ FIELDS = {
479
+ KEY => {:type => Thrift::Types::STRING, :name => 'key'},
480
+ VALUE => {:type => Thrift::Types::STRING, :name => 'value'}
481
+ }
482
+
483
+ def struct_fields; FIELDS; end
484
+
485
+ def validate
486
+ end
487
+
488
+ end
489
+
490
+ class SetOption_result
491
+ include ::Thrift::Struct
492
+
493
+ FIELDS = {
494
+
495
+ }
496
+
497
+ def struct_fields; FIELDS; end
498
+
499
+ def validate
500
+ end
501
+
502
+ end
503
+
504
+ class GetOption_args
505
+ include ::Thrift::Struct
506
+ KEY = 1
507
+
508
+ Thrift::Struct.field_accessor self, :key
509
+ FIELDS = {
510
+ KEY => {:type => Thrift::Types::STRING, :name => 'key'}
511
+ }
512
+
513
+ def struct_fields; FIELDS; end
514
+
515
+ def validate
516
+ end
517
+
518
+ end
519
+
520
+ class GetOption_result
521
+ include ::Thrift::Struct
522
+ SUCCESS = 0
523
+
524
+ Thrift::Struct.field_accessor self, :success
525
+ FIELDS = {
526
+ SUCCESS => {:type => Thrift::Types::STRING, :name => 'success'}
527
+ }
528
+
529
+ def struct_fields; FIELDS; end
530
+
531
+ def validate
532
+ end
533
+
534
+ end
535
+
536
+ class GetOptions_args
537
+ include ::Thrift::Struct
538
+
539
+ FIELDS = {
540
+
541
+ }
542
+
543
+ def struct_fields; FIELDS; end
544
+
545
+ def validate
546
+ end
547
+
548
+ end
549
+
550
+ class GetOptions_result
551
+ include ::Thrift::Struct
552
+ SUCCESS = 0
553
+
554
+ Thrift::Struct.field_accessor self, :success
555
+ FIELDS = {
556
+ SUCCESS => {:type => Thrift::Types::MAP, :name => 'success', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::STRING}}
557
+ }
558
+
559
+ def struct_fields; FIELDS; end
560
+
561
+ def validate
562
+ end
563
+
564
+ end
565
+
566
+ class GetCpuProfile_args
567
+ include ::Thrift::Struct
568
+ PROFILEDURATIONINSEC = 1
569
+
570
+ Thrift::Struct.field_accessor self, :profileDurationInSec
571
+ FIELDS = {
572
+ PROFILEDURATIONINSEC => {:type => Thrift::Types::I32, :name => 'profileDurationInSec'}
573
+ }
574
+
575
+ def struct_fields; FIELDS; end
576
+
577
+ def validate
578
+ end
579
+
580
+ end
581
+
582
+ class GetCpuProfile_result
583
+ include ::Thrift::Struct
584
+ SUCCESS = 0
585
+
586
+ Thrift::Struct.field_accessor self, :success
587
+ FIELDS = {
588
+ SUCCESS => {:type => Thrift::Types::STRING, :name => 'success'}
589
+ }
590
+
591
+ def struct_fields; FIELDS; end
592
+
593
+ def validate
594
+ end
595
+
596
+ end
597
+
598
+ class AliveSince_args
599
+ include ::Thrift::Struct
600
+
601
+ FIELDS = {
602
+
603
+ }
604
+
605
+ def struct_fields; FIELDS; end
606
+
607
+ def validate
608
+ end
609
+
610
+ end
611
+
612
+ class AliveSince_result
613
+ include ::Thrift::Struct
614
+ SUCCESS = 0
615
+
616
+ Thrift::Struct.field_accessor self, :success
617
+ FIELDS = {
618
+ SUCCESS => {:type => Thrift::Types::I64, :name => 'success'}
619
+ }
620
+
621
+ def struct_fields; FIELDS; end
622
+
623
+ def validate
624
+ end
625
+
626
+ end
627
+
628
+ class Reinitialize_args
629
+ include ::Thrift::Struct
630
+
631
+ FIELDS = {
632
+
633
+ }
634
+
635
+ def struct_fields; FIELDS; end
636
+
637
+ def validate
638
+ end
639
+
640
+ end
641
+
642
+ class Reinitialize_result
643
+ include ::Thrift::Struct
644
+
645
+ FIELDS = {
646
+
647
+ }
648
+
649
+ def struct_fields; FIELDS; end
650
+
651
+ def validate
652
+ end
653
+
654
+ end
655
+
656
+ class Shutdown_args
657
+ include ::Thrift::Struct
658
+
659
+ FIELDS = {
660
+
661
+ }
662
+
663
+ def struct_fields; FIELDS; end
664
+
665
+ def validate
666
+ end
667
+
668
+ end
669
+
670
+ class Shutdown_result
671
+ include ::Thrift::Struct
672
+
673
+ FIELDS = {
674
+
675
+ }
676
+
677
+ def struct_fields; FIELDS; end
678
+
679
+ def validate
680
+ end
681
+
682
+ end
683
+
684
+ end
685
+
@@ -0,0 +1,16 @@
1
+ #
2
+ # Autogenerated by Thrift
3
+ #
4
+ # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
+ #
6
+
7
+ module Fb_status
8
+ DEAD = 0
9
+ STARTING = 1
10
+ ALIVE = 2
11
+ STOPPING = 3
12
+ STOPPED = 4
13
+ WARNING = 5
14
+ VALID_VALUES = Set.new([DEAD, STARTING, ALIVE, STOPPING, STOPPED, WARNING]).freeze
15
+ end
16
+