Struct gfapi_sys::gluster::Gluster
[−]
[src]
pub struct Gluster { /* fields omitted */ }
Methods
impl Gluster[src]
fn connect(
volume_name: &str,
server: &str,
port: u16
) -> Result<Gluster, GlusterError>[src]
volume_name: &str,
server: &str,
port: u16
) -> Result<Gluster, GlusterError>
Connect to a Ceph cluster and return a connection handle glfs_t port is usually 24007 but may differ depending on how the service was configured
fn disconnect(self)[src]
Disconnect from a Gluster cluster and destroy the connection handle For clean up, this is only necessary after connect() has succeeded. Normally there is no need to call this function. When Rust cleans up the Gluster struct it will automatically call disconnect
fn set_logging(
&self,
logfile: &Path,
loglevel: GlusterLogLevel
) -> Result<(), GlusterError>[src]
&self,
logfile: &Path,
loglevel: GlusterLogLevel
) -> Result<(), GlusterError>
This function specifies logging parameters for the virtual mount. Sets the log file to write to
fn get_volfile(&self) -> Result<String, GlusterError>[src]
Get the volfile associated with the virtual mount Sometimes it's useful e.g. for scripts to see the volfile, so that they can parse it and find subvolumes to do things like split-brain resolution or custom layouts. Note that the volume must be started (not necessarily mounted) for this to work. Also this function isn't very useful at the moment. It needs to be parsed into a volume graph before it's really usable.
fn get_volume_id(&self) -> Result<Uuid, GlusterError>[src]
Fetch the volume uuid from the glusterd management server
fn open(
&self,
path: &Path,
flags: i32
) -> Result<*mut Struct_glfs_fd, GlusterError>[src]
&self,
path: &Path,
flags: i32
) -> Result<*mut Struct_glfs_fd, GlusterError>
fn create(
&self,
path: &Path,
flags: i32,
mode: mode_t
) -> Result<*mut Struct_glfs_fd, GlusterError>[src]
&self,
path: &Path,
flags: i32,
mode: mode_t
) -> Result<*mut Struct_glfs_fd, GlusterError>
fn close(&self, file_handle: *mut Struct_glfs_fd) -> Result<(), GlusterError>[src]
fn read(
&self,
file_handle: *mut Struct_glfs_fd,
fill_buffer: &mut Vec<u8>,
count: usize,
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
fill_buffer: &mut Vec<u8>,
count: usize,
flags: i32
) -> Result<isize, GlusterError>
fn write(
&self,
file_handle: *mut Struct_glfs_fd,
buffer: &[u8],
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
buffer: &[u8],
flags: i32
) -> Result<isize, GlusterError>
fn readv(
&self,
file_handle: *mut Struct_glfs_fd,
iov: &mut [&mut [u8]],
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
iov: &mut [&mut [u8]],
flags: i32
) -> Result<isize, GlusterError>
fn writev(
&self,
file_handle: *mut Struct_glfs_fd,
iov: &[&[u8]],
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
iov: &[&[u8]],
flags: i32
) -> Result<isize, GlusterError>
fn pread(
&self,
file_handle: *mut Struct_glfs_fd,
fill_buffer: &mut Vec<u8>,
count: usize,
offset: i64,
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
fill_buffer: &mut Vec<u8>,
count: usize,
offset: i64,
flags: i32
) -> Result<isize, GlusterError>
Read into fill_buffer at offset and return the number of bytes read
fn pwrite(
&self,
file_handle: *mut Struct_glfs_fd,
buffer: &[u8],
count: usize,
offset: i64,
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
buffer: &[u8],
count: usize,
offset: i64,
flags: i32
) -> Result<isize, GlusterError>
fn preadv(
&self,
file_handle: *mut Struct_glfs_fd,
iov: &mut [&mut [u8]],
offset: i64,
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
iov: &mut [&mut [u8]],
offset: i64,
flags: i32
) -> Result<isize, GlusterError>
fn pwritev(
&self,
file_handle: *mut Struct_glfs_fd,
iov: &[&[u8]],
offset: i64,
flags: i32
) -> Result<isize, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
iov: &[&[u8]],
offset: i64,
flags: i32
) -> Result<isize, GlusterError>
fn lseek(
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
whence: i32
) -> Result<i64, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
whence: i32
) -> Result<i64, GlusterError>
fn truncate(&self, path: &Path, length: i64) -> Result<(), GlusterError>[src]
fn ftruncate(
&self,
file_handle: *mut Struct_glfs_fd,
length: i64
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
length: i64
) -> Result<(), GlusterError>
fn lsstat(&self, path: &Path) -> Result<stat, GlusterError>[src]
fn exists(&self, path: &Path) -> Result<bool, GlusterError>[src]
Tests for the existance of a file. Returns true/false respectively.
fn statvfs(&self, path: &Path) -> Result<statvfs, GlusterError>[src]
fn stat(&self, path: &Path) -> Result<stat, GlusterError>[src]
fn fstat(&self, file_handle: *mut Struct_glfs_fd) -> Result<stat, GlusterError>[src]
fn fsync(&self, file_handle: *mut Struct_glfs_fd) -> Result<(), GlusterError>[src]
fn fdatasync(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>
fn access(&self, path: &Path, mode: i32) -> Result<(), GlusterError>[src]
fn symlink(&self, oldpath: &Path, newpath: &Path) -> Result<(), GlusterError>[src]
fn readlink(&self, path: &Path, buf: &mut [u8]) -> Result<(), GlusterError>[src]
fn mknod(
&self,
path: &Path,
mode: mode_t,
dev: dev_t
) -> Result<(), GlusterError>[src]
&self,
path: &Path,
mode: mode_t,
dev: dev_t
) -> Result<(), GlusterError>
fn mkdir(&self, path: &Path, mode: mode_t) -> Result<(), GlusterError>[src]
fn unlink(&self, path: &Path) -> Result<(), GlusterError>[src]
fn rmdir(&self, path: &Path) -> Result<(), GlusterError>[src]
fn remove_dir_all(&self, path: &Path) -> Result<(), GlusterError>[src]
Removes a directory at this path, after removing all its contents. Use carefully!
fn rename(&self, oldpath: &Path, newpath: &Path) -> Result<(), GlusterError>[src]
fn link(&self, oldpath: &Path, newpath: &Path) -> Result<(), GlusterError>[src]
fn opendir(&self, path: &Path) -> Result<*mut Struct_glfs_fd, GlusterError>[src]
fn getxattr(&self, path: &Path, name: &str) -> Result<String, GlusterError>[src]
fn lgetxattr(&self, path: &Path, name: &str) -> Result<String, GlusterError>[src]
fn fgetxattr(
&self,
file_handle: *mut Struct_glfs_fd,
name: &str
) -> Result<String, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
name: &str
) -> Result<String, GlusterError>
fn listxattr(&self, path: &Path) -> Result<String, GlusterError>[src]
fn llistxattr(&self, path: &Path) -> Result<String, GlusterError>[src]
fn flistxattr(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<String, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<String, GlusterError>
fn setxattr(
&self,
path: &Path,
name: &str,
value: &[u8],
flags: i32
) -> Result<(), GlusterError>[src]
&self,
path: &Path,
name: &str,
value: &[u8],
flags: i32
) -> Result<(), GlusterError>
fn lsetxattr(
&self,
name: &str,
value: &[u8],
path: &Path,
flags: i32
) -> Result<(), GlusterError>[src]
&self,
name: &str,
value: &[u8],
path: &Path,
flags: i32
) -> Result<(), GlusterError>
fn fsetxattr(
&self,
file_handle: *mut Struct_glfs_fd,
name: &str,
value: &[u8],
flags: i32
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
name: &str,
value: &[u8],
flags: i32
) -> Result<(), GlusterError>
fn removexattr(&self, path: &Path, name: &str) -> Result<(), GlusterError>[src]
fn lremovexattr(&self, path: &Path, name: &str) -> Result<(), GlusterError>[src]
fn fremovexattr(
&self,
file_handle: *mut Struct_glfs_fd,
name: &str
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
name: &str
) -> Result<(), GlusterError>
fn fallocate(
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
keep_size: i32,
len: usize
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
keep_size: i32,
len: usize
) -> Result<(), GlusterError>
fn discard(
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
len: usize
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
len: usize
) -> Result<(), GlusterError>
fn zerofill(
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
len: i64
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
offset: i64,
len: i64
) -> Result<(), GlusterError>
fn getcwd(&self) -> Result<String, GlusterError>[src]
fn chdir(&self, path: &Path) -> Result<(), GlusterError>[src]
fn fchdir(&self, file_handle: *mut Struct_glfs_fd) -> Result<(), GlusterError>[src]
fn utimens(
&self,
path: &Path,
times: &[timespec; 2]
) -> Result<(), GlusterError>[src]
&self,
path: &Path,
times: &[timespec; 2]
) -> Result<(), GlusterError>
times[0] specifies the new "last access time" (atime); times[1] specifies the new "last modification time" (mtime).
fn lutimens(
&self,
path: &Path,
times: &[timespec; 2]
) -> Result<(), GlusterError>[src]
&self,
path: &Path,
times: &[timespec; 2]
) -> Result<(), GlusterError>
times[0] specifies the new "last access time" (atime); times[1] specifies the new "last modification time" (mtime).
fn futimens(
&self,
file_handle: *mut Struct_glfs_fd,
times: &[timespec; 2]
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
times: &[timespec; 2]
) -> Result<(), GlusterError>
times[0] specifies the new "last access time" (atime); times[1] specifies the new "last modification time" (mtime).
fn posixlock(
&self,
file_handle: *mut Struct_glfs_fd,
command: PosixLockCmd,
flock: &mut flock
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
command: PosixLockCmd,
flock: &mut flock
) -> Result<(), GlusterError>
fn chmod(&self, path: &Path, mode: mode_t) -> Result<(), GlusterError>[src]
fn fchmod(
&self,
file_handle: *mut Struct_glfs_fd,
mode: mode_t
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
mode: mode_t
) -> Result<(), GlusterError>
fn chown(&self, path: &Path, uid: u32, gid: u32) -> Result<(), GlusterError>[src]
fn lchown(&self, path: &Path, uid: u32, gid: u32) -> Result<(), GlusterError>[src]
fn fchown(
&self,
file_handle: *mut Struct_glfs_fd,
uid: u32,
gid: u32
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd,
uid: u32,
gid: u32
) -> Result<(), GlusterError>
fn dup(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<*mut Struct_glfs_fd, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<*mut Struct_glfs_fd, GlusterError>