bunny 0.2.0 → 0.3.0

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.
@@ -1,61 +0,0 @@
1
- module Transport
2
-
3
- class Frame #:nodoc: all
4
- def initialize payload = nil, channel = 0
5
- @channel, @payload = channel, payload
6
- end
7
- attr_accessor :channel, :payload
8
-
9
- def id
10
- self.class::ID
11
- end
12
-
13
- def to_binary
14
- buf = Buffer.new
15
- buf.write :octet, id
16
- buf.write :short, channel
17
- buf.write :longstr, payload
18
- buf.write :octet, FOOTER
19
- buf.rewind
20
- buf
21
- end
22
-
23
- def to_s
24
- to_binary.to_s
25
- end
26
-
27
- def == frame
28
- [ :id, :channel, :payload ].inject(true) do |eql, field|
29
- eql and __send__(field) == frame.__send__(field)
30
- end
31
- end
32
-
33
- class Method
34
- def initialize payload = nil, channel = 0
35
- super
36
- unless @payload.is_a? Protocol::Class::Method or @payload.nil?
37
- @payload = Protocol.parse(@payload)
38
- end
39
- end
40
- end
41
-
42
- class Header
43
- def initialize payload = nil, channel = 0
44
- super
45
- unless @payload.is_a? Protocol::Header or @payload.nil?
46
- @payload = Protocol::Header.new(@payload)
47
- end
48
- end
49
- end
50
-
51
- class Body; end
52
-
53
- def self.parse buf
54
- buf = Transport::Buffer.new(buf) unless buf.is_a? Transport::Buffer
55
- buf.extract do
56
- id, channel, payload, footer = buf.read(:octet, :short, :longstr, :octet)
57
- Transport::Frame.types[id].new(payload, channel) if footer == Transport::Frame::FOOTER
58
- end
59
- end
60
- end
61
- end
@@ -1,156 +0,0 @@
1
- module Protocol
2
- #:stopdoc:
3
- class Class::Method
4
- def initialize *args
5
- opts = args.pop if args.last.is_a? Hash
6
- opts ||= {}
7
-
8
- @debug = 1 # XXX hack, p(obj) == '' if no instance vars are set
9
-
10
- if args.size == 1 and args.first.is_a? Transport::Buffer
11
- buf = args.shift
12
- else
13
- buf = nil
14
- end
15
-
16
- self.class.arguments.each do |type, name|
17
- val = buf ? buf.read(type) :
18
- args.shift || opts[name] || opts[name.to_s]
19
- instance_variable_set("@#{name}", val)
20
- end
21
- end
22
-
23
- def arguments
24
- self.class.arguments.inject({}) do |hash, (type, name)|
25
- hash.update name => instance_variable_get("@#{name}")
26
- end
27
- end
28
-
29
- def to_binary
30
- buf = Transport::Buffer.new
31
- buf.write :short, self.class.parent.id
32
- buf.write :short, self.class.id
33
-
34
- bits = []
35
-
36
- self.class.arguments.each do |type, name|
37
- val = instance_variable_get("@#{name}")
38
- if type == :bit
39
- bits << (val || false)
40
- else
41
- unless bits.empty?
42
- buf.write :bit, bits
43
- bits = []
44
- end
45
- buf.write type, val
46
- end
47
- end
48
-
49
- buf.write :bit, bits unless bits.empty?
50
- buf.rewind
51
-
52
- buf
53
- end
54
-
55
- def to_s
56
- to_binary.to_s
57
- end
58
-
59
- def to_frame channel = 0
60
- Transport::Frame::Method.new(self, channel)
61
- end
62
- end
63
-
64
- #:startdoc:
65
- #
66
- # Contains a properties hash that holds some potentially interesting
67
- # information.
68
- # * :delivery_mode
69
- # 1 equals transient.
70
- # 2 equals persistent. Unconsumed persistent messages will survive
71
- # a server restart when they are stored in a durable queue.
72
- # * :redelivered
73
- # True or False
74
- # * :routing_key
75
- # The routing string used for matching this message to this queue.
76
- # * :priority
77
- # An integer in the range of 0 to 9 inclusive.
78
- # * :content_type
79
- # Always "application/octet-stream" (byte stream)
80
- # * :exchange
81
- # The source exchange which published this message.
82
- # * :message_count
83
- # The number of unconsumed messages contained in the queue.
84
- # * :delivery_tag
85
- # A monotonically increasing integer. This number should not be trusted
86
- # as a sequence number. There is no guarantee it won't get reset.
87
- class Header
88
- def initialize *args
89
- opts = args.pop if args.last.is_a? Hash
90
- opts ||= {}
91
-
92
- first = args.shift
93
-
94
- if first.is_a? ::Class and first.ancestors.include? Protocol::Class
95
- @klass = first
96
- @size = args.shift || 0
97
- @weight = args.shift || 0
98
- @properties = opts
99
-
100
- elsif first.is_a? Transport::Buffer or first.is_a? String
101
- buf = first
102
- buf = Transport::Buffer.new(buf) unless buf.is_a? Transport::Buffer
103
-
104
- @klass = Protocol.classes[buf.read(:short)]
105
- @weight = buf.read(:short)
106
- @size = buf.read(:longlong)
107
-
108
- props = buf.read(:properties, *klass.properties.map{|type,_| type })
109
- @properties = Hash[*klass.properties.map{|_,name| name }.zip(props).reject{|k,v| v.nil? }.flatten]
110
-
111
- else
112
- raise ArgumentError, 'Invalid argument'
113
- end
114
-
115
- end
116
- attr_accessor :klass, :size, :weight, :properties
117
-
118
- def to_binary
119
- buf = Transport::Buffer.new
120
- buf.write :short, klass.id
121
- buf.write :short, weight # XXX rabbitmq only supports weight == 0
122
- buf.write :longlong, size
123
- buf.write :properties, (klass.properties.map do |type, name|
124
- [ type, properties[name] || properties[name.to_s] ]
125
- end)
126
- buf.rewind
127
- buf
128
- end
129
-
130
- def to_s
131
- to_binary.to_s
132
- end
133
-
134
- def to_frame channel = 0
135
- Transport::Frame::Header.new(self, channel)
136
- end
137
-
138
- def == header
139
- [ :klass, :size, :weight, :properties ].inject(true) do |eql, field|
140
- eql and __send__(field) == header.__send__(field)
141
- end
142
- end
143
-
144
- def method_missing meth, *args, &blk
145
- @properties.has_key?(meth) || @klass.properties.find{|_,name| name == meth } ? @properties[meth] :
146
- super
147
- end
148
- end
149
-
150
- def self.parse buf
151
- buf = Transport::Buffer.new(buf) unless buf.is_a? Transport::Buffer
152
- class_id, method_id = buf.read(:short, :short)
153
- classes[class_id].methods[method_id].new(buf)
154
- end
155
- #:stopdoc:
156
- end
@@ -1,830 +0,0 @@
1
-
2
- #:stopdoc:
3
- # this file was autogenerated on Fri May 01 00:29:03 +0100 2009
4
- # using amqp-0.8.json (mtime: Thu Apr 30 22:19:16 +0100 2009)
5
- #
6
- # DO NOT EDIT! (edit protocol/codegen.rb instead, and run `rake codegen`)
7
-
8
- module Transport
9
- class Frame
10
- def self.types
11
- @types ||= {}
12
- end
13
-
14
- def self.Frame id
15
- (@_base_frames ||= {})[id] ||= Class.new(Frame) do
16
- class_eval %[
17
- def self.inherited klass
18
- klass.const_set(:ID, #{id})
19
- Frame.types[#{id}] = klass
20
- end
21
- ]
22
- end
23
- end
24
-
25
- class Method < Frame( 1 ); end
26
- class Header < Frame( 2 ); end
27
- class Body < Frame( 3 ); end
28
- class OobMethod < Frame( 4 ); end
29
- class OobHeader < Frame( 5 ); end
30
- class OobBody < Frame( 6 ); end
31
- class Trace < Frame( 7 ); end
32
- class Heartbeat < Frame( 8 ); end
33
-
34
- FOOTER = 206
35
- end
36
- end
37
-
38
- module Protocol
39
- HEADER = "AMQP".freeze
40
- VERSION_MAJOR = 8
41
- VERSION_MINOR = 0
42
- PORT = 5672
43
-
44
- RESPONSES = {
45
- 200 => :REPLY_SUCCESS,
46
- 310 => :NOT_DELIVERED,
47
- 311 => :CONTENT_TOO_LARGE,
48
- 312 => :NO_ROUTE,
49
- 313 => :NO_CONSUMERS,
50
- 403 => :ACCESS_REFUSED,
51
- 404 => :NOT_FOUND,
52
- 405 => :RESOURCE_LOCKED,
53
- 406 => :PRECONDITION_FAILED,
54
- 320 => :CONNECTION_FORCED,
55
- 402 => :INVALID_PATH,
56
- }
57
-
58
- FIELDS = [
59
- :bit,
60
- :long,
61
- :longlong,
62
- :longstr,
63
- :octet,
64
- :short,
65
- :shortstr,
66
- :table,
67
- :timestamp,
68
- ]
69
-
70
- class Class
71
- class << self
72
- FIELDS.each do |f|
73
- class_eval %[
74
- def #{f} name
75
- properties << [ :#{f}, name ] unless properties.include?([:#{f}, name])
76
- attr_accessor name
77
- end
78
- ]
79
- end
80
-
81
- def properties() @properties ||= [] end
82
-
83
- def id() self::ID end
84
- def name() self::NAME end
85
- end
86
-
87
- class Method
88
- class << self
89
- FIELDS.each do |f|
90
- class_eval %[
91
- def #{f} name
92
- arguments << [ :#{f}, name ] unless arguments.include?([:#{f}, name])
93
- attr_accessor name
94
- end
95
- ]
96
- end
97
-
98
- def arguments() @arguments ||= [] end
99
-
100
- def parent() Protocol.const_get(self.to_s[/Protocol::(.+?)::/,1]) end
101
- def id() self::ID end
102
- def name() self::NAME end
103
- end
104
-
105
- def == b
106
- self.class.arguments.inject(true) do |eql, (type, name)|
107
- eql and __send__("#{name}") == b.__send__("#{name}")
108
- end
109
- end
110
- end
111
-
112
- def self.methods() @methods ||= {} end
113
-
114
- def self.Method(id, name)
115
- @_base_methods ||= {}
116
- @_base_methods[id] ||= ::Class.new(Method) do
117
- class_eval %[
118
- def self.inherited klass
119
- klass.const_set(:ID, #{id})
120
- klass.const_set(:NAME, :#{name.to_s})
121
- klass.parent.methods[#{id}] = klass
122
- klass.parent.methods[klass::NAME] = klass
123
- end
124
- ]
125
- end
126
- end
127
- end
128
-
129
- def self.classes() @classes ||= {} end
130
-
131
- def self.Class(id, name)
132
- @_base_classes ||= {}
133
- @_base_classes[id] ||= ::Class.new(Class) do
134
- class_eval %[
135
- def self.inherited klass
136
- klass.const_set(:ID, #{id})
137
- klass.const_set(:NAME, :#{name.to_s})
138
- Protocol.classes[#{id}] = klass
139
- Protocol.classes[klass::NAME] = klass
140
- end
141
- ]
142
- end
143
- end
144
- end
145
-
146
- module Protocol
147
- class Connection < Class( 10, :connection ); end
148
- class Channel < Class( 20, :channel ); end
149
- class Access < Class( 30, :access ); end
150
- class Exchange < Class( 40, :exchange ); end
151
- class Queue < Class( 50, :queue ); end
152
- class Basic < Class( 60, :basic ); end
153
- class File < Class( 70, :file ); end
154
- class Stream < Class( 80, :stream ); end
155
- class Tx < Class( 90, :tx ); end
156
- class Dtx < Class( 100, :dtx ); end
157
- class Tunnel < Class( 110, :tunnel ); end
158
- class Test < Class( 120, :test ); end
159
-
160
- class Connection
161
-
162
- class Start < Method( 10, :start ); end
163
- class StartOk < Method( 11, :start_ok ); end
164
- class Secure < Method( 20, :secure ); end
165
- class SecureOk < Method( 21, :secure_ok ); end
166
- class Tune < Method( 30, :tune ); end
167
- class TuneOk < Method( 31, :tune_ok ); end
168
- class Open < Method( 40, :open ); end
169
- class OpenOk < Method( 41, :open_ok ); end
170
- class Redirect < Method( 50, :redirect ); end
171
- class Close < Method( 60, :close ); end
172
- class CloseOk < Method( 61, :close_ok ); end
173
-
174
- class Start
175
- octet :version_major
176
- octet :version_minor
177
- table :server_properties
178
- longstr :mechanisms
179
- longstr :locales
180
- end
181
-
182
- class StartOk
183
- table :client_properties
184
- shortstr :mechanism
185
- longstr :response
186
- shortstr :locale
187
- end
188
-
189
- class Secure
190
- longstr :challenge
191
- end
192
-
193
- class SecureOk
194
- longstr :response
195
- end
196
-
197
- class Tune
198
- short :channel_max
199
- long :frame_max
200
- short :heartbeat
201
- end
202
-
203
- class TuneOk
204
- short :channel_max
205
- long :frame_max
206
- short :heartbeat
207
- end
208
-
209
- class Open
210
- shortstr :virtual_host
211
- shortstr :capabilities
212
- bit :insist
213
- end
214
-
215
- class OpenOk
216
- shortstr :known_hosts
217
- end
218
-
219
- class Redirect
220
- shortstr :host
221
- shortstr :known_hosts
222
- end
223
-
224
- class Close
225
- short :reply_code
226
- shortstr :reply_text
227
- short :class_id
228
- short :method_id
229
- end
230
-
231
- class CloseOk
232
- end
233
-
234
- end
235
-
236
- class Channel
237
-
238
- class Open < Method( 10, :open ); end
239
- class OpenOk < Method( 11, :open_ok ); end
240
- class Flow < Method( 20, :flow ); end
241
- class FlowOk < Method( 21, :flow_ok ); end
242
- class Alert < Method( 30, :alert ); end
243
- class Close < Method( 40, :close ); end
244
- class CloseOk < Method( 41, :close_ok ); end
245
-
246
- class Open
247
- shortstr :out_of_band
248
- end
249
-
250
- class OpenOk
251
- end
252
-
253
- class Flow
254
- bit :active
255
- end
256
-
257
- class FlowOk
258
- bit :active
259
- end
260
-
261
- class Alert
262
- short :reply_code
263
- shortstr :reply_text
264
- table :details
265
- end
266
-
267
- class Close
268
- short :reply_code
269
- shortstr :reply_text
270
- short :class_id
271
- short :method_id
272
- end
273
-
274
- class CloseOk
275
- end
276
-
277
- end
278
-
279
- class Access
280
-
281
- class Request < Method( 10, :request ); end
282
- class RequestOk < Method( 11, :request_ok ); end
283
-
284
- class Request
285
- shortstr :realm
286
- bit :exclusive
287
- bit :passive
288
- bit :active
289
- bit :write
290
- bit :read
291
- end
292
-
293
- class RequestOk
294
- short :ticket
295
- end
296
-
297
- end
298
-
299
- class Exchange
300
-
301
- class Declare < Method( 10, :declare ); end
302
- class DeclareOk < Method( 11, :declare_ok ); end
303
- class Delete < Method( 20, :delete ); end
304
- class DeleteOk < Method( 21, :delete_ok ); end
305
-
306
- class Declare
307
- short :ticket
308
- shortstr :exchange
309
- shortstr :type
310
- bit :passive
311
- bit :durable
312
- bit :auto_delete
313
- bit :internal
314
- bit :nowait
315
- table :arguments
316
- end
317
-
318
- class DeclareOk
319
- end
320
-
321
- class Delete
322
- short :ticket
323
- shortstr :exchange
324
- bit :if_unused
325
- bit :nowait
326
- end
327
-
328
- class DeleteOk
329
- end
330
-
331
- end
332
-
333
- class Queue
334
-
335
- class Declare < Method( 10, :declare ); end
336
- class DeclareOk < Method( 11, :declare_ok ); end
337
- class Bind < Method( 20, :bind ); end
338
- class BindOk < Method( 21, :bind_ok ); end
339
- class Purge < Method( 30, :purge ); end
340
- class PurgeOk < Method( 31, :purge_ok ); end
341
- class Delete < Method( 40, :delete ); end
342
- class DeleteOk < Method( 41, :delete_ok ); end
343
- class Unbind < Method( 50, :unbind ); end
344
- class UnbindOk < Method( 51, :unbind_ok ); end
345
-
346
- class Declare
347
- short :ticket
348
- shortstr :queue
349
- bit :passive
350
- bit :durable
351
- bit :exclusive
352
- bit :auto_delete
353
- bit :nowait
354
- table :arguments
355
- end
356
-
357
- class DeclareOk
358
- shortstr :queue
359
- long :message_count
360
- long :consumer_count
361
- end
362
-
363
- class Bind
364
- short :ticket
365
- shortstr :queue
366
- shortstr :exchange
367
- shortstr :routing_key
368
- bit :nowait
369
- table :arguments
370
- end
371
-
372
- class BindOk
373
- end
374
-
375
- class Purge
376
- short :ticket
377
- shortstr :queue
378
- bit :nowait
379
- end
380
-
381
- class PurgeOk
382
- long :message_count
383
- end
384
-
385
- class Delete
386
- short :ticket
387
- shortstr :queue
388
- bit :if_unused
389
- bit :if_empty
390
- bit :nowait
391
- end
392
-
393
- class DeleteOk
394
- long :message_count
395
- end
396
-
397
- class Unbind
398
- short :ticket
399
- shortstr :queue
400
- shortstr :exchange
401
- shortstr :routing_key
402
- table :arguments
403
- end
404
-
405
- class UnbindOk
406
- end
407
-
408
- end
409
-
410
- class Basic
411
- shortstr :content_type
412
- shortstr :content_encoding
413
- table :headers
414
- octet :delivery_mode
415
- octet :priority
416
- shortstr :correlation_id
417
- shortstr :reply_to
418
- shortstr :expiration
419
- shortstr :message_id
420
- timestamp :timestamp
421
- shortstr :type
422
- shortstr :user_id
423
- shortstr :app_id
424
- shortstr :cluster_id
425
-
426
- class Qos < Method( 10, :qos ); end
427
- class QosOk < Method( 11, :qos_ok ); end
428
- class Consume < Method( 20, :consume ); end
429
- class ConsumeOk < Method( 21, :consume_ok ); end
430
- class Cancel < Method( 30, :cancel ); end
431
- class CancelOk < Method( 31, :cancel_ok ); end
432
- class Publish < Method( 40, :publish ); end
433
- class Return < Method( 50, :return ); end
434
- class Deliver < Method( 60, :deliver ); end
435
- class Get < Method( 70, :get ); end
436
- class GetOk < Method( 71, :get_ok ); end
437
- class GetEmpty < Method( 72, :get_empty ); end
438
- class Ack < Method( 80, :ack ); end
439
- class Reject < Method( 90, :reject ); end
440
- class Recover < Method( 100, :recover ); end
441
-
442
- class Qos
443
- long :prefetch_size
444
- short :prefetch_count
445
- bit :global
446
- end
447
-
448
- class QosOk
449
- end
450
-
451
- class Consume
452
- short :ticket
453
- shortstr :queue
454
- shortstr :consumer_tag
455
- bit :no_local
456
- bit :no_ack
457
- bit :exclusive
458
- bit :nowait
459
- end
460
-
461
- class ConsumeOk
462
- shortstr :consumer_tag
463
- end
464
-
465
- class Cancel
466
- shortstr :consumer_tag
467
- bit :nowait
468
- end
469
-
470
- class CancelOk
471
- shortstr :consumer_tag
472
- end
473
-
474
- class Publish
475
- short :ticket
476
- shortstr :exchange
477
- shortstr :routing_key
478
- bit :mandatory
479
- bit :immediate
480
- end
481
-
482
- class Return
483
- short :reply_code
484
- shortstr :reply_text
485
- shortstr :exchange
486
- shortstr :routing_key
487
- end
488
-
489
- class Deliver
490
- shortstr :consumer_tag
491
- longlong :delivery_tag
492
- bit :redelivered
493
- shortstr :exchange
494
- shortstr :routing_key
495
- end
496
-
497
- class Get
498
- short :ticket
499
- shortstr :queue
500
- bit :no_ack
501
- end
502
-
503
- class GetOk
504
- longlong :delivery_tag
505
- bit :redelivered
506
- shortstr :exchange
507
- shortstr :routing_key
508
- long :message_count
509
- end
510
-
511
- class GetEmpty
512
- shortstr :cluster_id
513
- end
514
-
515
- class Ack
516
- longlong :delivery_tag
517
- bit :multiple
518
- end
519
-
520
- class Reject
521
- longlong :delivery_tag
522
- bit :requeue
523
- end
524
-
525
- class Recover
526
- bit :requeue
527
- end
528
-
529
- end
530
-
531
- class File
532
- shortstr :content_type
533
- shortstr :content_encoding
534
- table :headers
535
- octet :priority
536
- shortstr :reply_to
537
- shortstr :message_id
538
- shortstr :filename
539
- timestamp :timestamp
540
- shortstr :cluster_id
541
-
542
- class Qos < Method( 10, :qos ); end
543
- class QosOk < Method( 11, :qos_ok ); end
544
- class Consume < Method( 20, :consume ); end
545
- class ConsumeOk < Method( 21, :consume_ok ); end
546
- class Cancel < Method( 30, :cancel ); end
547
- class CancelOk < Method( 31, :cancel_ok ); end
548
- class Open < Method( 40, :open ); end
549
- class OpenOk < Method( 41, :open_ok ); end
550
- class Stage < Method( 50, :stage ); end
551
- class Publish < Method( 60, :publish ); end
552
- class Return < Method( 70, :return ); end
553
- class Deliver < Method( 80, :deliver ); end
554
- class Ack < Method( 90, :ack ); end
555
- class Reject < Method( 100, :reject ); end
556
-
557
- class Qos
558
- long :prefetch_size
559
- short :prefetch_count
560
- bit :global
561
- end
562
-
563
- class QosOk
564
- end
565
-
566
- class Consume
567
- short :ticket
568
- shortstr :queue
569
- shortstr :consumer_tag
570
- bit :no_local
571
- bit :no_ack
572
- bit :exclusive
573
- bit :nowait
574
- end
575
-
576
- class ConsumeOk
577
- shortstr :consumer_tag
578
- end
579
-
580
- class Cancel
581
- shortstr :consumer_tag
582
- bit :nowait
583
- end
584
-
585
- class CancelOk
586
- shortstr :consumer_tag
587
- end
588
-
589
- class Open
590
- shortstr :identifier
591
- longlong :content_size
592
- end
593
-
594
- class OpenOk
595
- longlong :staged_size
596
- end
597
-
598
- class Stage
599
- end
600
-
601
- class Publish
602
- short :ticket
603
- shortstr :exchange
604
- shortstr :routing_key
605
- bit :mandatory
606
- bit :immediate
607
- shortstr :identifier
608
- end
609
-
610
- class Return
611
- short :reply_code
612
- shortstr :reply_text
613
- shortstr :exchange
614
- shortstr :routing_key
615
- end
616
-
617
- class Deliver
618
- shortstr :consumer_tag
619
- longlong :delivery_tag
620
- bit :redelivered
621
- shortstr :exchange
622
- shortstr :routing_key
623
- shortstr :identifier
624
- end
625
-
626
- class Ack
627
- longlong :delivery_tag
628
- bit :multiple
629
- end
630
-
631
- class Reject
632
- longlong :delivery_tag
633
- bit :requeue
634
- end
635
-
636
- end
637
-
638
- class Stream
639
- shortstr :content_type
640
- shortstr :content_encoding
641
- table :headers
642
- octet :priority
643
- timestamp :timestamp
644
-
645
- class Qos < Method( 10, :qos ); end
646
- class QosOk < Method( 11, :qos_ok ); end
647
- class Consume < Method( 20, :consume ); end
648
- class ConsumeOk < Method( 21, :consume_ok ); end
649
- class Cancel < Method( 30, :cancel ); end
650
- class CancelOk < Method( 31, :cancel_ok ); end
651
- class Publish < Method( 40, :publish ); end
652
- class Return < Method( 50, :return ); end
653
- class Deliver < Method( 60, :deliver ); end
654
-
655
- class Qos
656
- long :prefetch_size
657
- short :prefetch_count
658
- long :consume_rate
659
- bit :global
660
- end
661
-
662
- class QosOk
663
- end
664
-
665
- class Consume
666
- short :ticket
667
- shortstr :queue
668
- shortstr :consumer_tag
669
- bit :no_local
670
- bit :exclusive
671
- bit :nowait
672
- end
673
-
674
- class ConsumeOk
675
- shortstr :consumer_tag
676
- end
677
-
678
- class Cancel
679
- shortstr :consumer_tag
680
- bit :nowait
681
- end
682
-
683
- class CancelOk
684
- shortstr :consumer_tag
685
- end
686
-
687
- class Publish
688
- short :ticket
689
- shortstr :exchange
690
- shortstr :routing_key
691
- bit :mandatory
692
- bit :immediate
693
- end
694
-
695
- class Return
696
- short :reply_code
697
- shortstr :reply_text
698
- shortstr :exchange
699
- shortstr :routing_key
700
- end
701
-
702
- class Deliver
703
- shortstr :consumer_tag
704
- longlong :delivery_tag
705
- shortstr :exchange
706
- shortstr :queue
707
- end
708
-
709
- end
710
-
711
- class Tx
712
-
713
- class Select < Method( 10, :select ); end
714
- class SelectOk < Method( 11, :select_ok ); end
715
- class Commit < Method( 20, :commit ); end
716
- class CommitOk < Method( 21, :commit_ok ); end
717
- class Rollback < Method( 30, :rollback ); end
718
- class RollbackOk < Method( 31, :rollback_ok ); end
719
-
720
- class Select
721
- end
722
-
723
- class SelectOk
724
- end
725
-
726
- class Commit
727
- end
728
-
729
- class CommitOk
730
- end
731
-
732
- class Rollback
733
- end
734
-
735
- class RollbackOk
736
- end
737
-
738
- end
739
-
740
- class Dtx
741
-
742
- class Select < Method( 10, :select ); end
743
- class SelectOk < Method( 11, :select_ok ); end
744
- class Start < Method( 20, :start ); end
745
- class StartOk < Method( 21, :start_ok ); end
746
-
747
- class Select
748
- end
749
-
750
- class SelectOk
751
- end
752
-
753
- class Start
754
- shortstr :dtx_identifier
755
- end
756
-
757
- class StartOk
758
- end
759
-
760
- end
761
-
762
- class Tunnel
763
- table :headers
764
- shortstr :proxy_name
765
- shortstr :data_name
766
- octet :durable
767
- octet :broadcast
768
-
769
- class Request < Method( 10, :request ); end
770
-
771
- class Request
772
- table :meta_data
773
- end
774
-
775
- end
776
-
777
- class Test
778
-
779
- class Integer < Method( 10, :integer ); end
780
- class IntegerOk < Method( 11, :integer_ok ); end
781
- class String < Method( 20, :string ); end
782
- class StringOk < Method( 21, :string_ok ); end
783
- class Table < Method( 30, :table ); end
784
- class TableOk < Method( 31, :table_ok ); end
785
- class Content < Method( 40, :content ); end
786
- class ContentOk < Method( 41, :content_ok ); end
787
-
788
- class Integer
789
- octet :integer_1
790
- short :integer_2
791
- long :integer_3
792
- longlong :integer_4
793
- octet :operation
794
- end
795
-
796
- class IntegerOk
797
- longlong :result
798
- end
799
-
800
- class String
801
- shortstr :string_1
802
- longstr :string_2
803
- octet :operation
804
- end
805
-
806
- class StringOk
807
- longstr :result
808
- end
809
-
810
- class Table
811
- table :table
812
- octet :integer_op
813
- octet :string_op
814
- end
815
-
816
- class TableOk
817
- longlong :integer_result
818
- longstr :string_result
819
- end
820
-
821
- class Content
822
- end
823
-
824
- class ContentOk
825
- long :content_checksum
826
- end
827
-
828
- end
829
-
830
- end