zipkin-query 0.0.1 → 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.
data/lib/zipkin-query.rb
CHANGED
|
@@ -15,8 +15,10 @@
|
|
|
15
15
|
gen_rb_path = File.expand_path(File.dirname(__FILE__) + "/../vendor/gen-rb")
|
|
16
16
|
$LOAD_PATH.unshift gen_rb_path
|
|
17
17
|
$LOAD_PATH.unshift "#{gen_rb_path}/zipkin-query"
|
|
18
|
+
$LOAD_PATH.unshift "#{gen_rb_path}/endpoint"
|
|
18
19
|
|
|
19
20
|
require "#{gen_rb_path}/zipkin-query"
|
|
21
|
+
require "#{gen_rb_path}/endpoint/endpoint_types"
|
|
20
22
|
|
|
21
23
|
module ZipkinQuery extend self
|
|
22
24
|
|
data/lib/zipkin-query/version.rb
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#
|
|
2
|
+
# Autogenerated by Thrift
|
|
3
|
+
#
|
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
5
|
+
#
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module Twitter
|
|
9
|
+
module Thrift
|
|
10
|
+
module Status
|
|
11
|
+
DEAD = 0
|
|
12
|
+
STARTING = 1
|
|
13
|
+
ALIVE = 2
|
|
14
|
+
STOPPING = 3
|
|
15
|
+
STOPPED = 4
|
|
16
|
+
WARNING = 5
|
|
17
|
+
VALUE_MAP = {0 => "DEAD", 1 => "STARTING", 2 => "ALIVE", 3 => "STOPPING", 4 => "STOPPED", 5 => "WARNING"}
|
|
18
|
+
VALID_VALUES = Set.new([DEAD, STARTING, ALIVE, STOPPING, STOPPED, WARNING]).freeze
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
class Endpoint
|
|
22
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
23
|
+
HOST = 1
|
|
24
|
+
PORT = 2
|
|
25
|
+
|
|
26
|
+
FIELDS = {
|
|
27
|
+
HOST => {:type => ::Thrift::Types::STRING, :name => 'host'},
|
|
28
|
+
PORT => {:type => ::Thrift::Types::I32, :name => 'port'}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
def struct_fields; FIELDS; end
|
|
32
|
+
|
|
33
|
+
def validate
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
::Thrift::Struct.generate_accessors self
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class ServiceInstance
|
|
40
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
|
41
|
+
SERVICEENDPOINT = 1
|
|
42
|
+
ADDITIONALENDPOINTS = 2
|
|
43
|
+
STATUS = 3
|
|
44
|
+
|
|
45
|
+
FIELDS = {
|
|
46
|
+
SERVICEENDPOINT => {:type => ::Thrift::Types::STRUCT, :name => 'serviceEndpoint', :class => Twitter::Thrift::Endpoint},
|
|
47
|
+
ADDITIONALENDPOINTS => {:type => ::Thrift::Types::MAP, :name => 'additionalEndpoints', :key => {:type => ::Thrift::Types::STRING}, :value => {:type => ::Thrift::Types::STRUCT, :class => Twitter::Thrift::Endpoint}},
|
|
48
|
+
STATUS => {:type => ::Thrift::Types::I32, :name => 'status', :enum_class => Twitter::Thrift::Status}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
def struct_fields; FIELDS; end
|
|
52
|
+
|
|
53
|
+
def validate
|
|
54
|
+
unless @status.nil? || Twitter::Thrift::Status::VALID_VALUES.include?(@status)
|
|
55
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field status!')
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
::Thrift::Struct.generate_accessors self
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
end
|
|
63
|
+
end
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zipkin-query
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 27
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 0
|
|
9
|
-
-
|
|
10
|
-
version: 0.0.
|
|
9
|
+
- 2
|
|
10
|
+
version: 0.0.2
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Franklin Hu
|
|
@@ -45,6 +45,8 @@ extra_rdoc_files: []
|
|
|
45
45
|
files:
|
|
46
46
|
- lib/zipkin-query/version.rb
|
|
47
47
|
- lib/zipkin-query.rb
|
|
48
|
+
- vendor/gen-rb/endpoint/endpoint_constants.rb
|
|
49
|
+
- vendor/gen-rb/endpoint/endpoint_types.rb
|
|
48
50
|
- vendor/gen-rb/zipkin-query/zipkin_core_constants.rb
|
|
49
51
|
- vendor/gen-rb/zipkin-query/zipkin_core_types.rb
|
|
50
52
|
- vendor/gen-rb/zipkin-query/zipkin_query.rb
|