Parent

Methods

Class/Module Index

MogstoredRack

Rack application for handling HTTP PUT/DELETE/MKCOL operations needed for a MogileFS storage server. GET and HEAD requests are handled by Rack::File and Rack::Head respectively.

Public Class Methods

new(root = "/var/mogdata", opts = {}) view method source

Basic usage in rackup config file (config.ru):

require "mogstored_rack"
run MogstoredRack.new(path = "/var/mogdata", options = {})

The options hash accepts several configuration options:

:open_flags => additional integer flags (IO::* constants)

You man specify IO::SYNC or IO::DIRECT here if your system supports it. default: 0 (IO::RDWR|IO::CREAT|IO::EXCL are always enforced)

:fsync => true or false

Runs fsync(2) on the file and parent directory after PUT default: false

:io_size => Integer

The I/O chunk size to use for writing PUT requests some systems may benefit from larger or smaller values default: 0x100000 (1 megabyte)

:put_perms => Integer (octal mask)

permissions for newly-created files via PUT default: (~File.umask & 0666)

:mkcol_perms => Integer (octal mask)

permissions for newly-created directories via MKCOL default: (~File.umask & 0777)

Originally generated with the Darkfish Rdoc Generator 2, modified by wrongdoc.