cephfs

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 13, 2020 License: MIT Imports: 5 Imported by: 5

Documentation

Overview

Package cephfs contains a set of wrappers around Ceph's libcephfs API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CephFSError

type CephFSError int

func (CephFSError) Error

func (e CephFSError) Error() string

type MountInfo

type MountInfo struct {
	// contains filtered or unexported fields
}

MountInfo exports ceph's ceph_mount_info from libcephfs.cc

func CreateFromRados

func CreateFromRados(conn *rados.Conn) (*MountInfo, error)

CreateFromRados creates a mount handle using an existing rados cluster connection.

Implements:

int ceph_create_from_rados(struct ceph_mount_info **cmount, rados_t cluster);

func CreateMount

func CreateMount() (*MountInfo, error)

CreateMount creates a mount handle for interacting with Ceph.

func CreateMountWithId

func CreateMountWithId(id string) (*MountInfo, error)

CreateMountWithId creates a mount handle for interacting with Ceph. The caller can specify a unique id that will identify this client.

func (*MountInfo) ChangeDir

func (mount *MountInfo) ChangeDir(path string) error

ChangeDir changes the current working directory.

func (*MountInfo) Chmod

func (mount *MountInfo) Chmod(path string, mode uint32) error

Chmod changes the mode bits (permissions) of a file/directory.

func (*MountInfo) Chown

func (mount *MountInfo) Chown(path string, user uint32, group uint32) error

Chown changes the ownership of a file/directory.

func (*MountInfo) CurrentDir

func (mount *MountInfo) CurrentDir() string

CurrentDir gets the current working directory.

func (*MountInfo) IsMounted

func (mount *MountInfo) IsMounted() bool

IsMounted checks mount status.

func (*MountInfo) MakeDir

func (mount *MountInfo) MakeDir(path string, mode uint32) error

MakeDir creates a directory.

func (*MountInfo) MdsCommand

func (mount *MountInfo) MdsCommand(mdsSpec string, args [][]byte) ([]byte, string, error)

MdsCommand sends commands to the specified MDS.

func (*MountInfo) MdsCommandWithInputBuffer

func (mount *MountInfo) MdsCommandWithInputBuffer(mdsSpec string, args [][]byte, inputBuffer []byte) ([]byte, string, error)

MdsCommandWithInputBuffer sends commands to the specified MDS, with an input buffer.

func (*MountInfo) Mount

func (mount *MountInfo) Mount() error

Mount mounts the mount handle.

func (*MountInfo) ReadDefaultConfigFile

func (mount *MountInfo) ReadDefaultConfigFile() error

ReadDefaultConfigFile loads the ceph configuration from the specified config file.

func (*MountInfo) Release

func (mount *MountInfo) Release() error

Release destroys the mount handle.

func (*MountInfo) RemoveDir

func (mount *MountInfo) RemoveDir(path string) error

RemoveDir removes a directory.

func (*MountInfo) SyncFs

func (mount *MountInfo) SyncFs() error

SyncFs synchronizes all filesystem data to persistent media.

func (*MountInfo) Unmount

func (mount *MountInfo) Unmount() error

Unmount unmounts the mount handle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL