HACKING History LICENSE NEWS README TODO
MogileFS Admin Backend Client MogileFS NewFile NewFile::Writer ReadOnlyError

Methods

::add_command ::add_error ::add_idempotent_command ::new #clear_cache #do_request #error #make_request #parse_response #shutdown #socket

class MogileFS::Backend

This class communicates with the MogileFS trackers. You should not have to use this directly unless you are developing support for new commands or plugins for MogileFS

Attributes

lasterr [R]

The last error

lasterrstr [R]

The string attached to the last error

Public Class Methods

add_command (*names) source

Adds MogileFS commands names.

add_error (err_snake) source

this converts an error code from a mogilefsd tracker to an exception:

Examples of some exceptions that get created:

class AfterMismatchError < MogileFS::Error; end
class DomainNotFoundError < MogileFS::Error; end
class InvalidCharsError < MogileFS::Error; end
add_idempotent_command (*names) source

adds idempotent MogileFS commands names, these commands may be retried transparently on a different tracker if there is a network/server error.

new (args) source

Creates a new MogileFS::Backend.

:hosts is a required argument and must be an Array containing one or more 'hostname:port' pairs as Strings.

:timeout adjusts the request timeout before an error is returned.

Public Instance Methods

clear_cache (types = %w(all)) source

this command is special since the cache is per-tracker, so we connect to all backends and not just one

do_request (cmd, args, idempotent = false) source

Performs the cmd request with args.

error (err_snake) source

this converts an error code from a mogilefsd tracker to an exception Most of these exceptions should already be defined, but since the MogileFS server code is liable to change and we may not always be able to keep up with the changes

make_request (cmd, args) source

Makes a new request string for cmd and args.

parse_response (line, request = nil) source

Turns the line response from the server into a Hash of options, an error, or raises, as appropriate.

shutdown () source

Closes this backend's socket.

socket () source

Returns a socket connected to a MogileFS tracker.


Pages Classes Methods
mail archives: https://yhbt.net/mogilefs-client-public/
	http://ou63pmih66umazou.onion/mogilefs-client-public/ 
	nntp://news.public-inbox.org/inbox.comp.file-systems.mogilefs.ruby 
	nntp://ou63pmih66umazou.onion/inbox.comp.file-systems.mogilefs.ruby 
public: mogilefs-client-public@yhbt.net
source code: git clone https://yhbt.net/mogilefs-client.git
	torsocks git clone http://ou63pmih66umazou.onion/mogilefs-client.git