haplocheirus-client 0.6.5
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/LICENSE +13 -0
- data/README.md +70 -0
- data/lib/haplocheirus.rb +40 -0
- data/lib/haplocheirus/client.rb +177 -0
- data/lib/haplocheirus/mock_service.rb +166 -0
- data/lib/haplocheirus/service.rb +24 -0
- data/lib/haplocheirus/thrift/timeline_store.rb +886 -0
- data/lib/haplocheirus/thrift/timeline_store_types.rb +107 -0
- data/lib/haplocheirus/version.rb +3 -0
- metadata +123 -0
@@ -0,0 +1,107 @@
|
|
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 Haplocheirus
|
9
|
+
module TimelineSegmentState
|
10
|
+
HIT = 0
|
11
|
+
MISS = 1
|
12
|
+
TIMEOUT = 2
|
13
|
+
VALUE_MAP = {0 => "HIT", 1 => "MISS", 2 => "TIMEOUT"}
|
14
|
+
VALID_VALUES = Set.new([HIT, MISS, TIMEOUT]).freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
class TimelineStoreException < ::Thrift::Exception
|
18
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
19
|
+
def initialize(message=nil)
|
20
|
+
super()
|
21
|
+
self.description = message
|
22
|
+
end
|
23
|
+
|
24
|
+
def message; description end
|
25
|
+
|
26
|
+
DESCRIPTION = 1
|
27
|
+
|
28
|
+
FIELDS = {
|
29
|
+
DESCRIPTION => {:type => ::Thrift::Types::STRING, :name => 'description'}
|
30
|
+
}
|
31
|
+
|
32
|
+
def struct_fields; FIELDS; end
|
33
|
+
|
34
|
+
def validate
|
35
|
+
end
|
36
|
+
|
37
|
+
::Thrift::Struct.generate_accessors self
|
38
|
+
end
|
39
|
+
|
40
|
+
class TimelineSegment
|
41
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
42
|
+
ENTRIES = 1
|
43
|
+
SIZE = 2
|
44
|
+
STATE = 3
|
45
|
+
|
46
|
+
FIELDS = {
|
47
|
+
ENTRIES => {:type => ::Thrift::Types::LIST, :name => 'entries', :element => {:type => ::Thrift::Types::STRING, :binary => true}},
|
48
|
+
SIZE => {:type => ::Thrift::Types::I32, :name => 'size'},
|
49
|
+
STATE => {:type => ::Thrift::Types::I32, :name => 'state', :default => 0, :optional => true, :enum_class => Haplocheirus::TimelineSegmentState}
|
50
|
+
}
|
51
|
+
|
52
|
+
def struct_fields; FIELDS; end
|
53
|
+
|
54
|
+
def validate
|
55
|
+
unless @state.nil? || Haplocheirus::TimelineSegmentState::VALID_VALUES.include?(@state)
|
56
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field state!')
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
::Thrift::Struct.generate_accessors self
|
61
|
+
end
|
62
|
+
|
63
|
+
class TimelineGet
|
64
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
65
|
+
TIMELINE_ID = 1
|
66
|
+
OFFSET = 2
|
67
|
+
LENGTH = 3
|
68
|
+
DEDUPE = 4
|
69
|
+
|
70
|
+
FIELDS = {
|
71
|
+
TIMELINE_ID => {:type => ::Thrift::Types::STRING, :name => 'timeline_id'},
|
72
|
+
OFFSET => {:type => ::Thrift::Types::I32, :name => 'offset'},
|
73
|
+
LENGTH => {:type => ::Thrift::Types::I32, :name => 'length'},
|
74
|
+
DEDUPE => {:type => ::Thrift::Types::BOOL, :name => 'dedupe', :default => false, :optional => true}
|
75
|
+
}
|
76
|
+
|
77
|
+
def struct_fields; FIELDS; end
|
78
|
+
|
79
|
+
def validate
|
80
|
+
end
|
81
|
+
|
82
|
+
::Thrift::Struct.generate_accessors self
|
83
|
+
end
|
84
|
+
|
85
|
+
class TimelineGetRange
|
86
|
+
include ::Thrift::Struct, ::Thrift::Struct_Union
|
87
|
+
TIMELINE_ID = 1
|
88
|
+
FROM_ID = 2
|
89
|
+
TO_ID = 3
|
90
|
+
DEDUPE = 4
|
91
|
+
|
92
|
+
FIELDS = {
|
93
|
+
TIMELINE_ID => {:type => ::Thrift::Types::STRING, :name => 'timeline_id'},
|
94
|
+
FROM_ID => {:type => ::Thrift::Types::I64, :name => 'from_id'},
|
95
|
+
TO_ID => {:type => ::Thrift::Types::I64, :name => 'to_id'},
|
96
|
+
DEDUPE => {:type => ::Thrift::Types::BOOL, :name => 'dedupe', :default => false, :optional => true}
|
97
|
+
}
|
98
|
+
|
99
|
+
def struct_fields; FIELDS; end
|
100
|
+
|
101
|
+
def validate
|
102
|
+
end
|
103
|
+
|
104
|
+
::Thrift::Struct.generate_accessors self
|
105
|
+
end
|
106
|
+
|
107
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: haplocheirus-client
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 13
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 6
|
9
|
+
- 5
|
10
|
+
version: 0.6.5
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Brandon Mitchell
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2012-11-26 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: thrift
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 63
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
- 8
|
32
|
+
- 0
|
33
|
+
version: 0.8.0
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: thrift_client
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - ~>
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 63
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 8
|
48
|
+
- 0
|
49
|
+
version: 0.8.0
|
50
|
+
type: :runtime
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
53
|
+
name: rspec
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
57
|
+
requirements:
|
58
|
+
- - ~>
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 27
|
61
|
+
segments:
|
62
|
+
- 2
|
63
|
+
- 5
|
64
|
+
- 0
|
65
|
+
version: 2.5.0
|
66
|
+
type: :development
|
67
|
+
version_requirements: *id003
|
68
|
+
description: A Ruby client library for the Haplocheirus store.
|
69
|
+
email:
|
70
|
+
- brandon@twitter.com
|
71
|
+
executables: []
|
72
|
+
|
73
|
+
extensions: []
|
74
|
+
|
75
|
+
extra_rdoc_files: []
|
76
|
+
|
77
|
+
files:
|
78
|
+
- lib/haplocheirus.rb
|
79
|
+
- lib/haplocheirus/client.rb
|
80
|
+
- lib/haplocheirus/mock_service.rb
|
81
|
+
- lib/haplocheirus/thrift/timeline_store.rb
|
82
|
+
- lib/haplocheirus/thrift/timeline_store_types.rb
|
83
|
+
- lib/haplocheirus/version.rb
|
84
|
+
- lib/haplocheirus/service.rb
|
85
|
+
- LICENSE
|
86
|
+
- README.md
|
87
|
+
homepage:
|
88
|
+
licenses: []
|
89
|
+
|
90
|
+
post_install_message:
|
91
|
+
rdoc_options: []
|
92
|
+
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ">="
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
hash: 3
|
101
|
+
segments:
|
102
|
+
- 0
|
103
|
+
version: "0"
|
104
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
hash: 17
|
110
|
+
segments:
|
111
|
+
- 1
|
112
|
+
- 3
|
113
|
+
- 5
|
114
|
+
version: 1.3.5
|
115
|
+
requirements: []
|
116
|
+
|
117
|
+
rubyforge_project:
|
118
|
+
rubygems_version: 1.8.24
|
119
|
+
signing_key:
|
120
|
+
specification_version: 3
|
121
|
+
summary: Haplocheirus Ruby client library
|
122
|
+
test_files: []
|
123
|
+
|