Class: Flock::Service

Inherits:
ThriftClient
  • Object
show all
Defined in:
lib/flock/service.rb

Constant Summary collapse

DEFAULTS =
{ :transport_wrapper => Thrift::BufferedTransport }

Instance Method Summary collapse

Constructor Details

#initialize(servers = nil, options = {}) ⇒ Service

Returns a new instance of Service.



5
6
7
8
9
10
11
12
13
14
# File 'lib/flock/service.rb', line 5

def initialize(servers = nil, options = {})
  if servers.nil? or servers.empty?
    STDERR.puts "No servers specified, using 127.0.0.1:7915"
    servers = ['127.0.0.1:7915']
  else
    servers = Array(servers)
  end

  super(Edges::FlockDB::Client, servers, DEFAULTS.merge(options))
end