Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrVolumeExist indicates that a volume already exists. ErrVolumeExist = errors.New("Volume already exists") )
Functions ¶
Types ¶
type CRUDDriver ¶
type CRUDDriver interface { NamedDriver ValidatingDriver // Create a volume. Create(DriverOptions) error // Format a volume. Format(DriverOptions) error // Destroy a volume. Destroy(DriverOptions) error // List Volumes. May be scoped by storage parameters or other data. List(ListOptions) ([]Volume, error) // Exists returns true if a volume exists. Otherwise, it returns false. Exists(DriverOptions) (bool, error) }
CRUDDriver performs CRUD operations.
type DriverOptions ¶
type DriverOptions struct { Source string Volume Volume FSOptions FSOptions Timeout time.Duration Options map[string]string }
DriverOptions are options frequently passed as the keystone for operations. See Driver for more information.
func (*DriverOptions) Validate ¶
func (do *DriverOptions) Validate() error
Validate validates driver options to ensure they are compatible with all storage drivers.
type ListOptions ¶
type ListOptions struct {
Params Params
}
ListOptions is a set of parameters used for the List operation of Driver.
type MountDriver ¶
type MountDriver interface { NamedDriver ValidatingDriver // Mount a Volume Mount(DriverOptions) (*Mount, error) // Unmount a volume Unmount(DriverOptions) error // Mounted shows any volumes that belong to volplugin on the host, in // their native representation. They yield a *Mount. Mounted(time.Duration) ([]*Mount, error) // MountPath describes the path at which the volume should be mounted. MountPath(DriverOptions) (string, error) }
MountDriver mounts volumes.
type NamedDriver ¶
type NamedDriver interface { // Name returns the string associated with the storage backed of the driver Name() string }
NamedDriver is a named driver and has a method called Name()
type SnapshotDriver ¶
type SnapshotDriver interface { NamedDriver ValidatingDriver // CreateSnapshot creates a named snapshot for the volume. Any error will be returned. CreateSnapshot(string, DriverOptions) error // RemoveSnapshot removes a named snapshot for the volume. Any error will be returned. RemoveSnapshot(string, DriverOptions) error // ListSnapshots returns an array of snapshot names provided a maximum number // of snapshots to be returned. Any error will be returned. ListSnapshots(DriverOptions) ([]string, error) // CopySnapshot copies a snapshot into a new volume. Takes a DriverOptions, // snap and volume name (string). Returns error on failure. CopySnapshot(DriverOptions, string, string) error }
SnapshotDriver manages snapshots.
type ValidatingDriver ¶
type ValidatingDriver interface {
Validate(*DriverOptions) error
}
ValidatingDriver implements Validate() against storage.DriverOptions.
Click to show internal directories.
Click to hide internal directories.