Documentation ¶
Index ¶
- Variables
- func GetCephdError(err int) error
- func New() *ceph
- func RadosVersion() (int, int, int)
- func Version() string
- type IOContext
- func (ioctx *IOContext) CreateImage(name string, size uint64, order int, args ...uint64) (image client.Image, err error)
- func (ioctx *IOContext) GetImage(name string) client.Image
- func (ioctx *IOContext) GetImageNames() (names []string, err error)
- func (ioctx *IOContext) Pointer() uintptr
- func (ioctx *IOContext) Read(oid string, data []byte, offset uint64) (int, error)
- func (ioctx *IOContext) Write(oid string, data []byte, offset uint64) error
- func (ioctx *IOContext) WriteFull(oid string, data []byte) error
- type Image
Constants ¶
This section is empty.
Variables ¶
View Source
var RbdErrorImageNotOpen = errors.New("RBD image not open")
View Source
var RbdErrorNotFound = errors.New("RBD image not found")
Functions ¶
func GetCephdError ¶
func RadosVersion ¶
Version returns the major, minor, and patch components of the version of the RADOS library linked against.
Types ¶
type IOContext ¶
type IOContext struct {
// contains filtered or unexported fields
}
IOContext represents a context for performing I/O within a pool.
func (*IOContext) CreateImage ¶
func (ioctx *IOContext) CreateImage(name string, size uint64, order int, args ...uint64) (image client.Image, err error)
int rbd_create(rados_ioctx_t io, const char *name, uint64_t size, int *order); int rbd_create2(rados_ioctx_t io, const char *name, uint64_t size,
uint64_t features, int *order);
int rbd_create3(rados_ioctx_t io, const char *name, uint64_t size,
uint64_t features, int *order, uint64_t stripe_unit, uint64_t stripe_count);
func (*IOContext) GetImageNames ¶
GetImageNames returns the list of current RBD images.
func (*IOContext) Read ¶
Read reads up to len(data) bytes from the object with key oid starting at byte offset offset. It returns the number of bytes read and an error, if any.
type Image ¶
type Image struct { io.Reader io.Writer io.Seeker io.ReaderAt io.WriterAt // contains filtered or unexported fields }
**************** librbd ***************************
Click to show internal directories.
Click to hide internal directories.