Class: Lord::Client

Inherits:
Object
  • Object
show all
Includes:
Thrift::Client
Defined in:
lib/burgundy-lord-thrift.rb

Instance Method Summary collapse

Instance Method Details

#pingObject



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(, options)
  send_query(, options)
  return recv_query()
end

#recv_pingObject



22
23
24
25
# File 'lib/burgundy-lord-thrift.rb', line 22

def recv_ping()
  result = receive_message(Ping_result)
  return
end

#recv_queryObject

Raises:

  • (::Thrift::ApplicationException)


36
37
38
39
40
# File 'lib/burgundy-lord-thrift.rb', line 36

def recv_query()
  result = receive_message(Query_result)
  return result.success unless result.success.nil?
  raise ::Thrift::ApplicationException.new(::Thrift::ApplicationException::MISSING_RESULT, 'query failed: unknown result')
end

#send_pingObject



18
19
20
# File 'lib/burgundy-lord-thrift.rb', line 18

def send_ping()
  send_message('ping', Ping_args)
end

#send_query(account_id, options) ⇒ Object



32
33
34
# File 'lib/burgundy-lord-thrift.rb', line 32

def send_query(, options)
  send_message('query', Query_args, :account_id => , :options => options)
end