mogilefs-client 2.2.0
[ruby-mogilefs-client.git] / lib / mogilefs.rb
blob02075bb8681a0fe5de81759180f2e42010725ab6
1 # -*- encoding: binary -*-
2 ##
3 # MogileFS is a Ruby client for Danga Interactive's open source distributed
4 # filesystem.
6 # To read more about Danga's MogileFS: http://danga.com/mogilefs/
8 module MogileFS
10   VERSION = '2.2.0'
12   ##
13   # Raised when a socket remains unreadable for too long.
15   class Error < StandardError; end
16   class UnreadableSocketError < Error; end
17   class SizeMismatchError < Error; end
18   class ChecksumMismatchError < RuntimeError; end
19   class ReadOnlyError < Error
20     def message; 'readonly mogilefs'; end
21   end
22   class EmptyPathError < Error
23     def message; 'Empty path for mogile upload'; end
24   end
26   class UnsupportedPathError < Error; end
27   class RequestTruncatedError < Error; end
28   class InvalidResponseError < Error; end
29   class UnreachableBackendError < Error
30     def message; "couldn't connect to mogilefsd backend"; end
31   end
33 end
35 require 'mogilefs/backend'
36 require 'mogilefs/httpfile'
37 require 'mogilefs/client'
38 require 'mogilefs/bigfile'
39 require 'mogilefs/mogilefs'
40 require 'mogilefs/admin'