Documentation ¶
Overview ¶
Copyright 2016 The Rook Authors. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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 ¶
var RbdErrorImageNotOpen = errors.New("RBD image not open")
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 ***************************