Class: Lord::Client
- Inherits:
-
Object
- Object
- Lord::Client
- Includes:
- Thrift::Client
- Defined in:
- lib/burgundy-lord-thrift.rb
Instance Method Summary collapse
- #ping ⇒ Object
- #query(account_id, options) ⇒ Object
- #recv_ping ⇒ Object
- #recv_query ⇒ Object
- #send_ping ⇒ Object
- #send_query(account_id, options) ⇒ Object
Instance Method Details
#ping ⇒ Object
13 14 15 16 |
# File 'lib/burgundy-lord-thrift.rb', line 13 def ping() send_ping() recv_ping() end |
#query(account_id, options) ⇒ Object
27 28 29 30 |
# File 'lib/burgundy-lord-thrift.rb', line 27 def query(account_id, ) send_query(account_id, ) return recv_query() end |
#recv_ping ⇒ Object
22 23 24 25 |
# File 'lib/burgundy-lord-thrift.rb', line 22 def recv_ping() result = (Ping_result) return end |
#recv_query ⇒ Object
36 37 38 39 40 |
# File 'lib/burgundy-lord-thrift.rb', line 36 def recv_query() result = (Query_result) return result.success unless result.success.nil? raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'query failed: unknown result') end |
#send_ping ⇒ Object
18 19 20 |
# File 'lib/burgundy-lord-thrift.rb', line 18 def send_ping() ('ping', Ping_args) end |
#send_query(account_id, options) ⇒ Object
32 33 34 |
# File 'lib/burgundy-lord-thrift.rb', line 32 def send_query(account_id, ) ('query', Query_args, :account_id => account_id, :options => ) end |