scribe 0.1
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.tar.gz.sig +0 -0
- data/CHANGELOG +2 -0
- data/LICENSE +202 -0
- data/Manifest +17 -0
- data/README +56 -0
- data/Rakefile +39 -0
- data/conf/scribe.conf +39 -0
- data/lib/scribe.rb +19 -0
- data/lib/scribe/safe_client.rb +23 -0
- data/lib/scribe/scribe.rb +31 -0
- data/scribe.gemspec +39 -0
- data/test/scribe_test.rb +29 -0
- data/test/test_helper.rb +14 -0
- data/vendor/gen-rb/facebook_service.rb +688 -0
- data/vendor/gen-rb/fb303_constants.rb +8 -0
- data/vendor/gen-rb/fb303_types.rb +18 -0
- data/vendor/gen-rb/scribe.rb +82 -0
- data/vendor/gen-rb/scribe_constants.rb +8 -0
- data/vendor/gen-rb/scribe_types.rb +34 -0
- metadata +123 -0
- metadata.gz.sig +0 -0
@@ -0,0 +1,18 @@
|
|
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 Fb_status
|
9
|
+
DEAD = 0
|
10
|
+
STARTING = 1
|
11
|
+
ALIVE = 2
|
12
|
+
STOPPING = 3
|
13
|
+
STOPPED = 4
|
14
|
+
WARNING = 5
|
15
|
+
VALUE_MAP = {0 => "DEAD", 1 => "STARTING", 2 => "ALIVE", 3 => "STOPPING", 4 => "STOPPED", 5 => "WARNING"}
|
16
|
+
VALID_VALUES = Set.new([DEAD, STARTING, ALIVE, STOPPING, STOPPED, WARNING]).freeze
|
17
|
+
end
|
18
|
+
|
@@ -0,0 +1,82 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'thrift'
|
8
|
+
require 'facebook_service'
|
9
|
+
require 'scribe_types'
|
10
|
+
|
11
|
+
module Scribe
|
12
|
+
class Client < FacebookService::Client
|
13
|
+
include ::Thrift::Client
|
14
|
+
|
15
|
+
def Log(messages)
|
16
|
+
send_Log(messages)
|
17
|
+
return recv_Log()
|
18
|
+
end
|
19
|
+
|
20
|
+
def send_Log(messages)
|
21
|
+
send_message('Log', Log_args, :messages => messages)
|
22
|
+
end
|
23
|
+
|
24
|
+
def recv_Log()
|
25
|
+
result = receive_message(Log_result)
|
26
|
+
return result.success unless result.success.nil?
|
27
|
+
raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'Log failed: unknown result')
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
|
32
|
+
class Processor < FacebookService::Processor
|
33
|
+
include ::Thrift::Processor
|
34
|
+
|
35
|
+
def process_Log(seqid, iprot, oprot)
|
36
|
+
args = read_args(iprot, Log_args)
|
37
|
+
result = Log_result.new()
|
38
|
+
result.success = @handler.Log(args.messages)
|
39
|
+
write_result(result, oprot, 'Log', seqid)
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
43
|
+
|
44
|
+
# HELPER FUNCTIONS AND STRUCTURES
|
45
|
+
|
46
|
+
class Log_args
|
47
|
+
include ::Thrift::Struct
|
48
|
+
MESSAGES = 1
|
49
|
+
|
50
|
+
::Thrift::Struct.field_accessor self, :messages
|
51
|
+
FIELDS = {
|
52
|
+
MESSAGES => {:type => ::Thrift::Types::LIST, :name => 'messages', :element => {:type => ::Thrift::Types::STRUCT, :class => LogEntry}}
|
53
|
+
}
|
54
|
+
|
55
|
+
def struct_fields; FIELDS; end
|
56
|
+
|
57
|
+
def validate
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
class Log_result
|
63
|
+
include ::Thrift::Struct
|
64
|
+
SUCCESS = 0
|
65
|
+
|
66
|
+
::Thrift::Struct.field_accessor self, :success
|
67
|
+
FIELDS = {
|
68
|
+
SUCCESS => {:type => ::Thrift::Types::I32, :name => 'success', :enum_class => ResultCode}
|
69
|
+
}
|
70
|
+
|
71
|
+
def struct_fields; FIELDS; end
|
72
|
+
|
73
|
+
def validate
|
74
|
+
unless @success.nil? || ResultCode::VALID_VALUES.include?(@success)
|
75
|
+
raise ::Thrift::ProtocolException.new(::Thrift::ProtocolException::UNKNOWN, 'Invalid value of field success!')
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
end
|
80
|
+
|
81
|
+
end
|
82
|
+
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#
|
2
|
+
# Autogenerated by Thrift
|
3
|
+
#
|
4
|
+
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
5
|
+
#
|
6
|
+
|
7
|
+
require 'fb303_types'
|
8
|
+
|
9
|
+
|
10
|
+
module ResultCode
|
11
|
+
OK = 0
|
12
|
+
TRY_LATER = 1
|
13
|
+
VALUE_MAP = {0 => "OK", 1 => "TRY_LATER"}
|
14
|
+
VALID_VALUES = Set.new([OK, TRY_LATER]).freeze
|
15
|
+
end
|
16
|
+
|
17
|
+
class LogEntry
|
18
|
+
include ::Thrift::Struct
|
19
|
+
CATEGORY = 1
|
20
|
+
MESSAGE = 2
|
21
|
+
|
22
|
+
::Thrift::Struct.field_accessor self, :category, :message
|
23
|
+
FIELDS = {
|
24
|
+
CATEGORY => {:type => ::Thrift::Types::STRING, :name => 'category'},
|
25
|
+
MESSAGE => {:type => ::Thrift::Types::STRING, :name => 'message'}
|
26
|
+
}
|
27
|
+
|
28
|
+
def struct_fields; FIELDS; end
|
29
|
+
|
30
|
+
def validate
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: scribe
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: "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W7TaNEtZfSHoYeUSMYbpw1
|
26
|
+
XAwocIPuSRFDGM4B+hgQGVDx8PMGiJKom4qLXjO40UZsR7QyN/u869Vj45LURm6h
|
27
|
+
MBcPeqCASI+WNprj9+uZa2kmHiitrFqqfMBNlm5IFbn9XeYSta9AHVvs5QQqV2m5
|
28
|
+
hIPfLqCyxsn/YgOGvo6iwyQTWyTswamaAC3HRWZxIS1sfn/Ssqa7E7oQMkv5FAXr
|
29
|
+
x5rKePfXINf8XTJczkl9OBEYdE9aNdJsJpXD0asLgGVwBICS5Bjohp6mizJcDC1+
|
30
|
+
yZ0=
|
31
|
+
-----END CERTIFICATE-----
|
32
|
+
|
33
|
+
date: 2009-09-30 00:00:00 -07:00
|
34
|
+
default_executable:
|
35
|
+
dependencies:
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: thrift
|
38
|
+
type: :runtime
|
39
|
+
version_requirement:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
version:
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rake
|
48
|
+
type: :runtime
|
49
|
+
version_requirement:
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: "0"
|
55
|
+
version:
|
56
|
+
description: A Ruby client for the Scribe distributed log server.
|
57
|
+
email: ""
|
58
|
+
executables: []
|
59
|
+
|
60
|
+
extensions: []
|
61
|
+
|
62
|
+
extra_rdoc_files:
|
63
|
+
- CHANGELOG
|
64
|
+
- LICENSE
|
65
|
+
- README
|
66
|
+
- lib/scribe.rb
|
67
|
+
- lib/scribe/safe_client.rb
|
68
|
+
- lib/scribe/scribe.rb
|
69
|
+
files:
|
70
|
+
- CHANGELOG
|
71
|
+
- LICENSE
|
72
|
+
- Manifest
|
73
|
+
- README
|
74
|
+
- Rakefile
|
75
|
+
- conf/scribe.conf
|
76
|
+
- lib/scribe.rb
|
77
|
+
- lib/scribe/safe_client.rb
|
78
|
+
- lib/scribe/scribe.rb
|
79
|
+
- test/scribe_test.rb
|
80
|
+
- test/test_helper.rb
|
81
|
+
- vendor/gen-rb/facebook_service.rb
|
82
|
+
- vendor/gen-rb/fb303_constants.rb
|
83
|
+
- vendor/gen-rb/fb303_types.rb
|
84
|
+
- vendor/gen-rb/scribe.rb
|
85
|
+
- vendor/gen-rb/scribe_constants.rb
|
86
|
+
- vendor/gen-rb/scribe_types.rb
|
87
|
+
- scribe.gemspec
|
88
|
+
has_rdoc: true
|
89
|
+
homepage: http://blog.evanweaver.com/files/doc/fauna/scribe/
|
90
|
+
licenses: []
|
91
|
+
|
92
|
+
post_install_message:
|
93
|
+
rdoc_options:
|
94
|
+
- --line-numbers
|
95
|
+
- --inline-source
|
96
|
+
- --title
|
97
|
+
- Scribe
|
98
|
+
- --main
|
99
|
+
- README
|
100
|
+
require_paths:
|
101
|
+
- lib
|
102
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: "0"
|
107
|
+
version:
|
108
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
109
|
+
requirements:
|
110
|
+
- - ">="
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: "0.8"
|
113
|
+
version:
|
114
|
+
requirements: []
|
115
|
+
|
116
|
+
rubyforge_project: fauna
|
117
|
+
rubygems_version: 1.3.4
|
118
|
+
signing_key:
|
119
|
+
specification_version: 3
|
120
|
+
summary: A Ruby client for the Scribe distributed log server.
|
121
|
+
test_files:
|
122
|
+
- test/scribe_test.rb
|
123
|
+
- test/test_helper.rb
|
metadata.gz.sig
ADDED
Binary file
|