concord-ruby 0.3.1 → 0.3.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.
- checksums.yaml +4 -4
- data/lib/gen-rb/bolt_constants.rb +0 -2
- data/lib/gen-rb/bolt_types.rb +1 -79
- metadata +3 -4
- data/lib/gen-rb/bolt_trace_aggregator_service.rb +0 -268
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bf6577c8c3e69d0ba911946f45319b4371112f2
|
4
|
+
data.tar.gz: 8e3d0d856e220f21f401463956077e06d927dd6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa8e196139f80efd14c3d7122b1892d1bfd6c115cf8952228e62c5e85c422a9a815d8930d3ffb8135b3d27eabf2f79b7be8db27d906741934d7e065f738d5fdb
|
7
|
+
data.tar.gz: 8ee81f5bd0b924bc3c0dd27d6cc5f6572da6780e4850c60c68b85abfe5c6828761f3e5eae3b805d9510db59f7171be9ee7f7715797bf7895c556b067955922a4
|
data/lib/gen-rb/bolt_types.rb
CHANGED
@@ -45,15 +45,6 @@ module Concord
|
|
45
45
|
VALID_VALUES = Set.new([CLIENT_RECORD, FRAMEWORK_RECORD]).freeze
|
46
46
|
end
|
47
47
|
|
48
|
-
module AnnotationType
|
49
|
-
CLIENT_SEND = 0
|
50
|
-
CLIENT_RECV = 1
|
51
|
-
SERVER_SEND = 2
|
52
|
-
SERVER_RECV = 3
|
53
|
-
VALUE_MAP = {0 => "CLIENT_SEND", 1 => "CLIENT_RECV", 2 => "SERVER_SEND", 3 => "SERVER_RECV"}
|
54
|
-
VALID_VALUES = Set.new([CLIENT_SEND, CLIENT_RECV, SERVER_SEND, SERVER_RECV]).freeze
|
55
|
-
end
|
56
|
-
|
57
48
|
class BoltError < ::Thrift::Exception
|
58
49
|
include ::Thrift::Struct, ::Thrift::Struct_Union
|
59
50
|
REASON = 1
|
@@ -81,7 +72,7 @@ module Concord
|
|
81
72
|
|
82
73
|
FIELDS = {
|
83
74
|
IP => {:type => ::Thrift::Types::STRING, :name => 'ip'},
|
84
|
-
PORT => {:type => ::Thrift::Types::
|
75
|
+
PORT => {:type => ::Thrift::Types::I32, :name => 'port'}
|
85
76
|
}
|
86
77
|
|
87
78
|
def struct_fields; FIELDS; end
|
@@ -383,74 +374,5 @@ module Concord
|
|
383
374
|
::Thrift::Struct.generate_accessors self
|
384
375
|
end
|
385
376
|
|
386
|
-
class Annotation
|
387
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
388
|
-
TIMESTAMP = 1
|
389
|
-
TYPE = 2
|
390
|
-
KEY = 3
|
391
|
-
VALUE = 4
|
392
|
-
HOST = 5
|
393
|
-
|
394
|
-
FIELDS = {
|
395
|
-
TIMESTAMP => {:type => ::Thrift::Types::I64, :name => 'timestamp'},
|
396
|
-
TYPE => {:type => ::Thrift::Types::I32, :name => 'type', :enum_class => ::Concord::Thrift::AnnotationType},
|
397
|
-
KEY => {:type => ::Thrift::Types::STRING, :name => 'key'},
|
398
|
-
VALUE => {:type => ::Thrift::Types::STRING, :name => 'value', :binary => true},
|
399
|
-
HOST => {:type => ::Thrift::Types::STRUCT, :name => 'host', :class => ::Concord::Thrift::Endpoint}
|
400
|
-
}
|
401
|
-
|
402
|
-
def struct_fields; FIELDS; end
|
403
|
-
|
404
|
-
def validate
|
405
|
-
unless @type.nil? || ::Concord::Thrift::AnnotationType::VALID_VALUES.include?(@type)
|
406
|
-
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field type!')
|
407
|
-
end
|
408
|
-
end
|
409
|
-
|
410
|
-
::Thrift::Struct.generate_accessors self
|
411
|
-
end
|
412
|
-
|
413
|
-
class Span
|
414
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
415
|
-
TRACEID = 1
|
416
|
-
ID = 2
|
417
|
-
PARENTID = 3
|
418
|
-
NAME = 4
|
419
|
-
ANNOTATIONS = 5
|
420
|
-
|
421
|
-
FIELDS = {
|
422
|
-
TRACEID => {:type => ::Thrift::Types::I64, :name => 'traceId'},
|
423
|
-
ID => {:type => ::Thrift::Types::I64, :name => 'id'},
|
424
|
-
PARENTID => {:type => ::Thrift::Types::I64, :name => 'parentId'},
|
425
|
-
NAME => {:type => ::Thrift::Types::STRING, :name => 'name'},
|
426
|
-
ANNOTATIONS => {:type => ::Thrift::Types::LIST, :name => 'annotations', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Concord::Thrift::Annotation}}
|
427
|
-
}
|
428
|
-
|
429
|
-
def struct_fields; FIELDS; end
|
430
|
-
|
431
|
-
def validate
|
432
|
-
end
|
433
|
-
|
434
|
-
::Thrift::Struct.generate_accessors self
|
435
|
-
end
|
436
|
-
|
437
|
-
class Trace
|
438
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
439
|
-
ID = 1
|
440
|
-
SPANS = 2
|
441
|
-
|
442
|
-
FIELDS = {
|
443
|
-
ID => {:type => ::Thrift::Types::I64, :name => 'id'},
|
444
|
-
SPANS => {:type => ::Thrift::Types::LIST, :name => 'spans', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Concord::Thrift::Span}}
|
445
|
-
}
|
446
|
-
|
447
|
-
def struct_fields; FIELDS; end
|
448
|
-
|
449
|
-
def validate
|
450
|
-
end
|
451
|
-
|
452
|
-
::Thrift::Struct.generate_accessors self
|
453
|
-
end
|
454
|
-
|
455
377
|
end
|
456
378
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: concord-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cole Brown
|
@@ -47,14 +47,13 @@ extra_rdoc_files: []
|
|
47
47
|
files:
|
48
48
|
- lib/concord.rb
|
49
49
|
- lib/gen-rb/bolt_metrics_service.rb
|
50
|
+
- lib/gen-rb/computation_service.rb
|
51
|
+
- lib/gen-rb/bolt_types.rb
|
50
52
|
- lib/gen-rb/bolt_scheduler_service.rb
|
51
53
|
- lib/gen-rb/bolt_constants.rb
|
52
54
|
- lib/gen-rb/mutable_ephemeral_state_service.rb
|
53
|
-
- lib/gen-rb/bolt_trace_aggregator_service.rb
|
54
55
|
- lib/gen-rb/bolt_manager_service.rb
|
55
|
-
- lib/gen-rb/computation_service.rb
|
56
56
|
- lib/gen-rb/bolt_proxy_service.rb
|
57
|
-
- lib/gen-rb/bolt_types.rb
|
58
57
|
- lib/concord/utils.rb
|
59
58
|
homepage: https://github.com/concord/concord-ruby
|
60
59
|
licenses:
|
@@ -1,268 +0,0 @@
|
|
1
|
-
#
|
2
|
-
# Autogenerated by Thrift Compiler (0.9.2)
|
3
|
-
#
|
4
|
-
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
-
#
|
6
|
-
|
7
|
-
require 'thrift'
|
8
|
-
require 'bolt_types'
|
9
|
-
|
10
|
-
module Concord
|
11
|
-
module Thrift
|
12
|
-
module BoltTraceAggregatorService
|
13
|
-
class Client
|
14
|
-
include ::Thrift::Client
|
15
|
-
|
16
|
-
def submitSpans(span)
|
17
|
-
send_submitSpans(span)
|
18
|
-
recv_submitSpans()
|
19
|
-
end
|
20
|
-
|
21
|
-
def send_submitSpans(span)
|
22
|
-
send_message('submitSpans', SubmitSpans_args, :span => span)
|
23
|
-
end
|
24
|
-
|
25
|
-
def recv_submitSpans()
|
26
|
-
result = receive_message(SubmitSpans_result)
|
27
|
-
raise result.e unless result.e.nil?
|
28
|
-
return
|
29
|
-
end
|
30
|
-
|
31
|
-
def getTrace(traceId)
|
32
|
-
send_getTrace(traceId)
|
33
|
-
return recv_getTrace()
|
34
|
-
end
|
35
|
-
|
36
|
-
def send_getTrace(traceId)
|
37
|
-
send_message('getTrace', GetTrace_args, :traceId => traceId)
|
38
|
-
end
|
39
|
-
|
40
|
-
def recv_getTrace()
|
41
|
-
result = receive_message(GetTrace_result)
|
42
|
-
return result.success unless result.success.nil?
|
43
|
-
raise result.e unless result.e.nil?
|
44
|
-
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTrace failed: unknown result')
|
45
|
-
end
|
46
|
-
|
47
|
-
def getTraceIds(startId, limit)
|
48
|
-
send_getTraceIds(startId, limit)
|
49
|
-
return recv_getTraceIds()
|
50
|
-
end
|
51
|
-
|
52
|
-
def send_getTraceIds(startId, limit)
|
53
|
-
send_message('getTraceIds', GetTraceIds_args, :startId => startId, :limit => limit)
|
54
|
-
end
|
55
|
-
|
56
|
-
def recv_getTraceIds()
|
57
|
-
result = receive_message(GetTraceIds_result)
|
58
|
-
return result.success unless result.success.nil?
|
59
|
-
raise result.e unless result.e.nil?
|
60
|
-
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'getTraceIds failed: unknown result')
|
61
|
-
end
|
62
|
-
|
63
|
-
def consolidateTraceIds(traceIds)
|
64
|
-
send_consolidateTraceIds(traceIds)
|
65
|
-
recv_consolidateTraceIds()
|
66
|
-
end
|
67
|
-
|
68
|
-
def send_consolidateTraceIds(traceIds)
|
69
|
-
send_message('consolidateTraceIds', ConsolidateTraceIds_args, :traceIds => traceIds)
|
70
|
-
end
|
71
|
-
|
72
|
-
def recv_consolidateTraceIds()
|
73
|
-
result = receive_message(ConsolidateTraceIds_result)
|
74
|
-
raise result.e unless result.e.nil?
|
75
|
-
return
|
76
|
-
end
|
77
|
-
|
78
|
-
end
|
79
|
-
|
80
|
-
class Processor
|
81
|
-
include ::Thrift::Processor
|
82
|
-
|
83
|
-
def process_submitSpans(seqid, iprot, oprot)
|
84
|
-
args = read_args(iprot, SubmitSpans_args)
|
85
|
-
result = SubmitSpans_result.new()
|
86
|
-
begin
|
87
|
-
@handler.submitSpans(args.span)
|
88
|
-
rescue ::Concord::Thrift::BoltError => e
|
89
|
-
result.e = e
|
90
|
-
end
|
91
|
-
write_result(result, oprot, 'submitSpans', seqid)
|
92
|
-
end
|
93
|
-
|
94
|
-
def process_getTrace(seqid, iprot, oprot)
|
95
|
-
args = read_args(iprot, GetTrace_args)
|
96
|
-
result = GetTrace_result.new()
|
97
|
-
begin
|
98
|
-
result.success = @handler.getTrace(args.traceId)
|
99
|
-
rescue ::Concord::Thrift::BoltError => e
|
100
|
-
result.e = e
|
101
|
-
end
|
102
|
-
write_result(result, oprot, 'getTrace', seqid)
|
103
|
-
end
|
104
|
-
|
105
|
-
def process_getTraceIds(seqid, iprot, oprot)
|
106
|
-
args = read_args(iprot, GetTraceIds_args)
|
107
|
-
result = GetTraceIds_result.new()
|
108
|
-
begin
|
109
|
-
result.success = @handler.getTraceIds(args.startId, args.limit)
|
110
|
-
rescue ::Concord::Thrift::BoltError => e
|
111
|
-
result.e = e
|
112
|
-
end
|
113
|
-
write_result(result, oprot, 'getTraceIds', seqid)
|
114
|
-
end
|
115
|
-
|
116
|
-
def process_consolidateTraceIds(seqid, iprot, oprot)
|
117
|
-
args = read_args(iprot, ConsolidateTraceIds_args)
|
118
|
-
result = ConsolidateTraceIds_result.new()
|
119
|
-
begin
|
120
|
-
@handler.consolidateTraceIds(args.traceIds)
|
121
|
-
rescue ::Concord::Thrift::BoltError => e
|
122
|
-
result.e = e
|
123
|
-
end
|
124
|
-
write_result(result, oprot, 'consolidateTraceIds', seqid)
|
125
|
-
end
|
126
|
-
|
127
|
-
end
|
128
|
-
|
129
|
-
# HELPER FUNCTIONS AND STRUCTURES
|
130
|
-
|
131
|
-
class SubmitSpans_args
|
132
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
133
|
-
SPAN = 1
|
134
|
-
|
135
|
-
FIELDS = {
|
136
|
-
SPAN => {:type => ::Thrift::Types::LIST, :name => 'span', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Concord::Thrift::Span}}
|
137
|
-
}
|
138
|
-
|
139
|
-
def struct_fields; FIELDS; end
|
140
|
-
|
141
|
-
def validate
|
142
|
-
end
|
143
|
-
|
144
|
-
::Thrift::Struct.generate_accessors self
|
145
|
-
end
|
146
|
-
|
147
|
-
class SubmitSpans_result
|
148
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
149
|
-
E = 1
|
150
|
-
|
151
|
-
FIELDS = {
|
152
|
-
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
153
|
-
}
|
154
|
-
|
155
|
-
def struct_fields; FIELDS; end
|
156
|
-
|
157
|
-
def validate
|
158
|
-
end
|
159
|
-
|
160
|
-
::Thrift::Struct.generate_accessors self
|
161
|
-
end
|
162
|
-
|
163
|
-
class GetTrace_args
|
164
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
165
|
-
TRACEID = 1
|
166
|
-
|
167
|
-
FIELDS = {
|
168
|
-
TRACEID => {:type => ::Thrift::Types::I64, :name => 'traceId'}
|
169
|
-
}
|
170
|
-
|
171
|
-
def struct_fields; FIELDS; end
|
172
|
-
|
173
|
-
def validate
|
174
|
-
end
|
175
|
-
|
176
|
-
::Thrift::Struct.generate_accessors self
|
177
|
-
end
|
178
|
-
|
179
|
-
class GetTrace_result
|
180
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
181
|
-
SUCCESS = 0
|
182
|
-
E = 1
|
183
|
-
|
184
|
-
FIELDS = {
|
185
|
-
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::STRUCT, :class => ::Concord::Thrift::Span}},
|
186
|
-
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
187
|
-
}
|
188
|
-
|
189
|
-
def struct_fields; FIELDS; end
|
190
|
-
|
191
|
-
def validate
|
192
|
-
end
|
193
|
-
|
194
|
-
::Thrift::Struct.generate_accessors self
|
195
|
-
end
|
196
|
-
|
197
|
-
class GetTraceIds_args
|
198
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
199
|
-
STARTID = 1
|
200
|
-
LIMIT = 2
|
201
|
-
|
202
|
-
FIELDS = {
|
203
|
-
STARTID => {:type => ::Thrift::Types::I64, :name => 'startId', :default => 0},
|
204
|
-
LIMIT => {:type => ::Thrift::Types::I32, :name => 'limit', :default => 100}
|
205
|
-
}
|
206
|
-
|
207
|
-
def struct_fields; FIELDS; end
|
208
|
-
|
209
|
-
def validate
|
210
|
-
end
|
211
|
-
|
212
|
-
::Thrift::Struct.generate_accessors self
|
213
|
-
end
|
214
|
-
|
215
|
-
class GetTraceIds_result
|
216
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
217
|
-
SUCCESS = 0
|
218
|
-
E = 1
|
219
|
-
|
220
|
-
FIELDS = {
|
221
|
-
SUCCESS => {:type => ::Thrift::Types::LIST, :name => 'success', :element => {:type => ::Thrift::Types::I64}},
|
222
|
-
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
223
|
-
}
|
224
|
-
|
225
|
-
def struct_fields; FIELDS; end
|
226
|
-
|
227
|
-
def validate
|
228
|
-
end
|
229
|
-
|
230
|
-
::Thrift::Struct.generate_accessors self
|
231
|
-
end
|
232
|
-
|
233
|
-
class ConsolidateTraceIds_args
|
234
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
235
|
-
TRACEIDS = 1
|
236
|
-
|
237
|
-
FIELDS = {
|
238
|
-
TRACEIDS => {:type => ::Thrift::Types::LIST, :name => 'traceIds', :element => {:type => ::Thrift::Types::I64}}
|
239
|
-
}
|
240
|
-
|
241
|
-
def struct_fields; FIELDS; end
|
242
|
-
|
243
|
-
def validate
|
244
|
-
end
|
245
|
-
|
246
|
-
::Thrift::Struct.generate_accessors self
|
247
|
-
end
|
248
|
-
|
249
|
-
class ConsolidateTraceIds_result
|
250
|
-
include ::Thrift::Struct, ::Thrift::Struct_Union
|
251
|
-
E = 1
|
252
|
-
|
253
|
-
FIELDS = {
|
254
|
-
E => {:type => ::Thrift::Types::STRUCT, :name => 'e', :class => ::Concord::Thrift::BoltError}
|
255
|
-
}
|
256
|
-
|
257
|
-
def struct_fields; FIELDS; end
|
258
|
-
|
259
|
-
def validate
|
260
|
-
end
|
261
|
-
|
262
|
-
::Thrift::Struct.generate_accessors self
|
263
|
-
end
|
264
|
-
|
265
|
-
end
|
266
|
-
|
267
|
-
end
|
268
|
-
end
|