Class: Waterfall::Client::ClientWrapper
- Inherits:
-
Object
- Object
- Waterfall::Client::ClientWrapper
- Defined in:
- lib/waterfall/client.rb
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(options) ⇒ ClientWrapper
constructor
A new instance of ClientWrapper.
- #next_id ⇒ Object
Constructor Details
#initialize(options) ⇒ ClientWrapper
Returns a new instance of ClientWrapper.
24 25 26 27 28 29 |
# File 'lib/waterfall/client.rb', line 24 def initialize() @transport = ::Thrift::FramedTransport.new(::Thrift::Socket.new([:host], [:port])) protocol = ::Thrift::BinaryProtocol.new(@transport) @client = Thrift::WaterfallService::Client.new(protocol) @transport.open end |
Instance Method Details
#close ⇒ Object
35 36 37 |
# File 'lib/waterfall/client.rb', line 35 def close @transport.close end |
#next_id ⇒ Object
31 32 33 |
# File 'lib/waterfall/client.rb', line 31 def next_id @client.nextId end |