1 # -*- encoding: binary -*-
4 # MogileFS::Client is the MogileFS client base class. Concrete clients like
5 # MogileFS::MogileFS and MogileFS::Admin are implemented atop this one to do
10 # The backend connection for this client
15 attr_accessor :hosts if defined? $TESTING
19 # Creates a new Client. See MogileFS::Backend#initialize for how to specify
20 # hosts. If :readonly is set to true, the client will not modify anything
23 # MogileFS::Client.new :hosts => ['kaa:6001', 'ziz:6001'], :readonly => true
27 @readonly = args[:readonly] ? true : false
28 @timeout = args[:timeout]
29 @fail_timeout = args[:fail_timeout]
35 # Creates a new MogileFS::Backend.
38 @backend = MogileFS::Backend.new(:hosts => @hosts,
40 :fail_timeout => @fail_timeout)
44 # The last error reported by the backend.
51 # The last error message reported by the backend.
58 # Is this a read-only client?