Struct ceph::ceph::Rados [−][src]
pub struct Rados { /* fields omitted */ }
Owns a rados handle
Methods
impl Rados
[src]
impl Rados
pub fn inner(&self) -> &rados_t
[src]
pub fn inner(&self) -> &rados_t
pub fn disconnect_from_ceph(&self)
[src]
pub fn disconnect_from_ceph(&self)
Disconnect from a Ceph cluster and destroy the connection handle rados_t For clean up, this is only necessary after connect_to_ceph() has succeeded.
pub fn config_set(&self, name: &str, value: &str) -> RadosResult<()>
[src]
pub fn config_set(&self, name: &str, value: &str) -> RadosResult<()>
Set the value of a configuration option
pub fn config_get(&self, name: &str) -> RadosResult<String>
[src]
pub fn config_get(&self, name: &str) -> RadosResult<String>
Get the value of a configuration option
pub fn get_rados_ioctx(&self, pool_name: &str) -> RadosResult<IoCtx>
[src]
pub fn get_rados_ioctx(&self, pool_name: &str) -> RadosResult<IoCtx>
Create an io context. The io context allows you to perform operations within a particular pool. For more details see rados_ioctx_t.
pub fn get_rados_ioctx2(&self, pool_id: i64) -> RadosResult<IoCtx>
[src]
pub fn get_rados_ioctx2(&self, pool_id: i64) -> RadosResult<IoCtx>
Create an io context. The io context allows you to perform operations within a particular pool. For more details see rados_ioctx_t.
impl Rados
[src]
impl Rados
pub fn rados_blacklist_client(
&self,
client: IpAddr,
expire_seconds: u32
) -> RadosResult<()>
[src]
pub fn rados_blacklist_client(
&self,
client: IpAddr,
expire_seconds: u32
) -> RadosResult<()>
pub fn rados_pools(&self) -> RadosResult<Vec<String>>
[src]
pub fn rados_pools(&self) -> RadosResult<Vec<String>>
Returns back a collection of Rados Pools
pool_buffer should be allocated with:
let capacity = 10; let pool_buffer: Vec<u8> = Vec::with_capacity(capacity);
buf_size should be the value used with_capacity
Returns Ok(Vec
pub fn rados_create_pool(&self, pool_name: &str) -> RadosResult<()>
[src]
pub fn rados_create_pool(&self, pool_name: &str) -> RadosResult<()>
Create a pool with default settings The default owner is the admin user (auid 0). The default crush rule is rule 0.
pub fn rados_delete_pool(&self, pool_name: &str) -> RadosResult<()>
[src]
pub fn rados_delete_pool(&self, pool_name: &str) -> RadosResult<()>
Delete a pool and all data inside it The pool is removed from the cluster immediately, but the actual data is deleted in the background.
pub fn rados_lookup_pool(&self, pool_name: &str) -> RadosResult<Option<i64>>
[src]
pub fn rados_lookup_pool(&self, pool_name: &str) -> RadosResult<Option<i64>>
Lookup a Ceph pool id. If the pool doesn't exist it will return Ok(None).
pub fn rados_reverse_lookup_pool(&self, pool_id: i64) -> RadosResult<String>
[src]
pub fn rados_reverse_lookup_pool(&self, pool_id: i64) -> RadosResult<String>
impl Rados
[src]
impl Rados
pub fn rados_stat_cluster(&self) -> RadosResult<Struct_rados_cluster_stat_t>
[src]
pub fn rados_stat_cluster(&self) -> RadosResult<Struct_rados_cluster_stat_t>
Read usage info about the cluster This tells you total space, space used, space available, and number of objects. These are not updated immediately when data is written, they are eventually consistent. Note: Ceph uses kibibytes: https://en.wikipedia.org/wiki/Kibibyte
pub fn rados_fsid(&self) -> RadosResult<Uuid>
[src]
pub fn rados_fsid(&self) -> RadosResult<Uuid>
pub fn ping_monitor(&self, mon_id: &str) -> RadosResult<String>
[src]
pub fn ping_monitor(&self, mon_id: &str) -> RadosResult<String>
Ping a monitor to assess liveness May be used as a simply way to assess liveness, or to obtain information about the monitor in a simple way even in the absence of quorum.
impl Rados
[src]
impl Rados
pub fn ceph_status(&self, keys: &[&str]) -> RadosResult<String>
[src]
pub fn ceph_status(&self, keys: &[&str]) -> RadosResult<String>
Only single String value
pub fn ceph_health_string(&self) -> RadosResult<String>
[src]
pub fn ceph_health_string(&self) -> RadosResult<String>
string with the health HEALTH_OK
or HEALTH_WARN
or HEALTH_ERR
which is also not efficient.
pub fn ceph_health(&self) -> CephHealth
[src]
pub fn ceph_health(&self) -> CephHealth
Returns an enum value of: CephHealth::Ok CephHealth::Warning CephHealth::Error
pub fn ceph_command(
&self,
name: &str,
value: &str,
cmd_type: CephCommandTypes,
keys: &[&str]
) -> RadosResult<JsonData>
[src]
pub fn ceph_command(
&self,
name: &str,
value: &str,
cmd_type: CephCommandTypes,
keys: &[&str]
) -> RadosResult<JsonData>
Higher level ceph_command
pub fn ceph_commands(&self, keys: Option<&[&str]>) -> RadosResult<JsonData>
[src]
pub fn ceph_commands(&self, keys: Option<&[&str]>) -> RadosResult<JsonData>
Returns the list of available commands
pub fn ceph_mon_command(
&self,
name: &str,
value: &str,
format: Option<&str>
) -> RadosResult<(Option<String>, Option<String>)>
[src]
pub fn ceph_mon_command(
&self,
name: &str,
value: &str,
format: Option<&str>
) -> RadosResult<(Option<String>, Option<String>)>
Mon command that does not pass in a data payload.
pub fn ceph_mon_command_without_data(&self, cmd: &Value) -> RadosResult<Vec<u8>>
[src]
pub fn ceph_mon_command_without_data(&self, cmd: &Value) -> RadosResult<Vec<u8>>
pub fn ceph_mon_command_with_data(
&self,
name: &str,
value: &str,
format: Option<&str>,
data: Vec<*mut c_char>
) -> RadosResult<(Option<String>, Option<String>)>
[src]
pub fn ceph_mon_command_with_data(
&self,
name: &str,
value: &str,
format: Option<&str>,
data: Vec<*mut c_char>
) -> RadosResult<(Option<String>, Option<String>)>
Mon command that does pass in a data payload. Most all of the commands pass through this function.
pub fn ceph_osd_command(
&self,
id: i32,
name: &str,
value: &str,
format: Option<&str>
) -> RadosResult<(Option<String>, Option<String>)>
[src]
pub fn ceph_osd_command(
&self,
id: i32,
name: &str,
value: &str,
format: Option<&str>
) -> RadosResult<(Option<String>, Option<String>)>
OSD command that does not pass in a data payload.
pub fn ceph_osd_command_with_data(
&self,
id: i32,
name: &str,
value: &str,
format: Option<&str>,
data: Vec<*mut c_char>
) -> RadosResult<(Option<String>, Option<String>)>
[src]
pub fn ceph_osd_command_with_data(
&self,
id: i32,
name: &str,
value: &str,
format: Option<&str>,
data: Vec<*mut c_char>
) -> RadosResult<(Option<String>, Option<String>)>
OSD command that does pass in a data payload.
pub fn ceph_pgs_command(
&self,
pg: &str,
name: &str,
value: &str,
format: Option<&str>
) -> RadosResult<(Option<String>, Option<String>)>
[src]
pub fn ceph_pgs_command(
&self,
pg: &str,
name: &str,
value: &str,
format: Option<&str>
) -> RadosResult<(Option<String>, Option<String>)>
PG command that does not pass in a data payload.
pub fn ceph_pgs_command_with_data(
&self,
pg: &str,
name: &str,
value: &str,
format: Option<&str>,
data: Vec<*mut c_char>
) -> RadosResult<(Option<String>, Option<String>)>
[src]
pub fn ceph_pgs_command_with_data(
&self,
pg: &str,
name: &str,
value: &str,
format: Option<&str>,
data: Vec<*mut c_char>
) -> RadosResult<(Option<String>, Option<String>)>
PG command that does pass in a data payload.