Alex Bowley
and 1 contributors

NAME

Ceph::Rados::IO - Perl wrapper to librados IO context.

METHODS

list()

Wraps rados_objects_list_open(). Returns a list context for the pool, as a Ceph::Rados::List object.

write(oid, source)

Wraps rados_write(). Write data from the source, to a ceph object with the supplied ID. Source can either be a perl scalar, or a handle to read data from. Returns 1 on success. Croaks on failure.

write_data(oid, data)

write_handle(oid, handle)

As write_data(), but explicitly declaring the source type.

append(oid, data)

Wraps rados_append(). Appends data to the ceph object with the supplied ID. Data must be a perl scalar, not a handle. Returns 1 on success. Croaks on failure.

stat(oid)

Wraps rados_stat(). Returns a 2-element list of (filesize, mtime) for the ceph object with the supplied ID.

read(oid, len=filesize, offset=0)

Wraps rados_read(). Read data from the ceph object with the supplied ID, and return the data read. Croaks on failure.

read_handle(oid, handle)

As read(), but writes the data directly to the supplied handle instead of returning it.

remove(oid)

Wraps rados_remove(). Deletes the ceph object with the supplied ID. Returns 1 on success. Croaks on failure.