Documentation ¶
Index ¶
- Constants
- func NewCRUDDriver() (storage.CRUDDriver, error)
- func NewMountDriver(mountpath string) (storage.MountDriver, error)
- func NewSnapshotDriver() (storage.SnapshotDriver, error)
- type Driver
- func (c *Driver) CopySnapshot(do storage.DriverOptions, snapName, newName string) error
- func (c *Driver) Create(do storage.DriverOptions) error
- func (c *Driver) CreateSnapshot(snapName string, do storage.DriverOptions) error
- func (c *Driver) Destroy(do storage.DriverOptions) error
- func (c *Driver) Exists(do storage.DriverOptions) (bool, error)
- func (c *Driver) Format(do storage.DriverOptions) error
- func (c *Driver) List(lo storage.ListOptions) ([]storage.Volume, error)
- func (c *Driver) ListSnapshots(do storage.DriverOptions) ([]string, error)
- func (c *Driver) Mount(do storage.DriverOptions) (*storage.Mount, error)
- func (c *Driver) MountPath(do storage.DriverOptions) (string, error)
- func (c *Driver) Mounted(timeout time.Duration) ([]*storage.Mount, error)
- func (c *Driver) Name() string
- func (c *Driver) RemoveSnapshot(snapName string, do storage.DriverOptions) error
- func (c *Driver) Unmount(do storage.DriverOptions) error
- func (c *Driver) Validate(do *storage.DriverOptions) error
Constants ¶
const (
// BackendName is string for ceph storage backend
BackendName = "ceph"
)
Variables ¶
This section is empty.
Functions ¶
func NewCRUDDriver ¶
func NewCRUDDriver() (storage.CRUDDriver, error)
NewCRUDDriver is a generator for Driver structs. It is used by the storage framework to yield new drivers on every creation.
func NewMountDriver ¶
func NewMountDriver(mountpath string) (storage.MountDriver, error)
NewMountDriver is a generator for Driver structs. It is used by the storage framework to yield new drivers on every creation.
func NewSnapshotDriver ¶
func NewSnapshotDriver() (storage.SnapshotDriver, error)
NewSnapshotDriver is a generator for Driver structs. It is used by the storage framework to yield new drivers on every creation.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver implements a ceph backed storage driver for volplugin.
-- Pool naming
All ceph operations require a pool name (specified as `pool`) for them to work. Therefore, if no pool is specified, the best error condition will be raised.
func (*Driver) CopySnapshot ¶
func (c *Driver) CopySnapshot(do storage.DriverOptions, snapName, newName string) error
CopySnapshot copies a snapshot into a new volume. Takes a DriverOptions, snap and volume name (string). Returns error on failure.
func (*Driver) CreateSnapshot ¶
func (c *Driver) CreateSnapshot(snapName string, do storage.DriverOptions) error
CreateSnapshot creates a named snapshot for the volume. Any error will be returned.
func (*Driver) Exists ¶
func (c *Driver) Exists(do storage.DriverOptions) (bool, error)
Exists returns true if the volume already exists.
func (*Driver) Format ¶
func (c *Driver) Format(do storage.DriverOptions) error
Format formats a created volume.
func (*Driver) ListSnapshots ¶
func (c *Driver) ListSnapshots(do storage.DriverOptions) ([]string, error)
ListSnapshots returns an array of snapshot names provided a maximum number of snapshots to be returned. Any error will be returned.
func (*Driver) Mount ¶
Mount a volume. Returns the rbd device and mounted filesystem path. If you pass in the params what filesystem to use as `filesystem`, it will prefer that to `ext4` which is the default.
func (*Driver) MountPath ¶
func (c *Driver) MountPath(do storage.DriverOptions) (string, error)
MountPath returns the path of a mount for a pool/volume.
func (*Driver) RemoveSnapshot ¶
func (c *Driver) RemoveSnapshot(snapName string, do storage.DriverOptions) error
RemoveSnapshot removes a named snapshot for the volume. Any error will be returned.