Struct gfapi_sys::gluster::Gluster
[−]
[src]
pub struct Gluster { /* fields omitted */ }
Methods
impl Gluster[src]
pub 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
pub 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
pub 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
pub 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.
pub fn get_volume_id(&self) -> Result<Uuid, GlusterError>[src]
Fetch the volume uuid from the glusterd management server
pub 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>
pub 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>
pub fn close(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>
pub 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>
pub 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>
pub 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>
pub 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>
pub 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
pub 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>
pub 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>
pub 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>
pub 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>
pub fn truncate(&self, path: &Path, length: i64) -> Result<(), GlusterError>[src]
pub 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>
pub fn lsstat(&self, path: &Path) -> Result<stat, GlusterError>[src]
pub fn exists(&self, path: &Path) -> Result<bool, GlusterError>[src]
Tests for the existance of a file. Returns true/false respectively.
pub fn statvfs(&self, path: &Path) -> Result<statvfs, GlusterError>[src]
pub fn stat(&self, path: &Path) -> Result<stat, GlusterError>[src]
pub fn fstat(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<stat, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<stat, GlusterError>
pub fn fsync(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>
pub fn fdatasync(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>
pub fn access(&self, path: &Path, mode: i32) -> Result<(), GlusterError>[src]
pub fn symlink(
&self,
oldpath: &Path,
newpath: &Path
) -> Result<(), GlusterError>[src]
&self,
oldpath: &Path,
newpath: &Path
) -> Result<(), GlusterError>
pub fn readlink(&self, path: &Path, buf: &mut [u8]) -> Result<(), GlusterError>[src]
pub 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>
pub fn mkdir(&self, path: &Path, mode: mode_t) -> Result<(), GlusterError>[src]
pub fn unlink(&self, path: &Path) -> Result<(), GlusterError>[src]
pub fn rmdir(&self, path: &Path) -> Result<(), GlusterError>[src]
pub fn remove_dir_all(&self, path: &Path) -> Result<(), GlusterError>[src]
Removes a directory at this path, after removing all its contents. Use carefully!
pub fn rename(&self, oldpath: &Path, newpath: &Path) -> Result<(), GlusterError>[src]
pub fn link(&self, oldpath: &Path, newpath: &Path) -> Result<(), GlusterError>[src]
pub fn opendir(&self, path: &Path) -> Result<*mut Struct_glfs_fd, GlusterError>[src]
pub fn getxattr(&self, path: &Path, name: &str) -> Result<String, GlusterError>[src]
pub fn lgetxattr(&self, path: &Path, name: &str) -> Result<String, GlusterError>[src]
pub 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>
pub fn listxattr(&self, path: &Path) -> Result<String, GlusterError>[src]
pub fn llistxattr(&self, path: &Path) -> Result<String, GlusterError>[src]
pub fn flistxattr(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<String, GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<String, GlusterError>
pub 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>
pub 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>
pub 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>
pub fn removexattr(&self, path: &Path, name: &str) -> Result<(), GlusterError>[src]
pub fn lremovexattr(&self, path: &Path, name: &str) -> Result<(), GlusterError>[src]
pub 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>
pub 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>
pub 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>
pub 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>
pub fn getcwd(&self) -> Result<String, GlusterError>[src]
pub fn chdir(&self, path: &Path) -> Result<(), GlusterError>[src]
pub fn fchdir(
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>[src]
&self,
file_handle: *mut Struct_glfs_fd
) -> Result<(), GlusterError>
pub 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).
pub 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).
pub 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).
pub 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>
pub fn chmod(&self, path: &Path, mode: mode_t) -> Result<(), GlusterError>[src]
pub 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>
pub fn chown(&self, path: &Path, uid: u32, gid: u32) -> Result<(), GlusterError>[src]
pub fn lchown(
&self,
path: &Path,
uid: u32,
gid: u32
) -> Result<(), GlusterError>[src]
&self,
path: &Path,
uid: u32,
gid: u32
) -> Result<(), GlusterError>
pub 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>
pub 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>
Trait Implementations
impl Debug for Gluster[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result[src]
Formats the value using the given formatter. Read more