Documentation ¶
Index ¶
- Variables
- func Init(root string, _ []string) (volume.Driver, error)
- type BtrfsDFData
- type BtrfsDriver
- func (d *BtrfsDriver) Cleanup() error
- func (d *BtrfsDriver) Create(volumeName string) (volume.Volume, error)
- func (d *BtrfsDriver) DriverType() volume.DriverType
- func (d *BtrfsDriver) Exists(volumeName string) bool
- func (d *BtrfsDriver) Get(volumeName string) (volume.Volume, error)
- func (d *BtrfsDriver) GetTenant(volumeName string) (volume.Volume, error)
- func (d *BtrfsDriver) List() (result []string)
- func (d *BtrfsDriver) MetadataDir() string
- func (d *BtrfsDriver) Release(volumeName string) error
- func (d *BtrfsDriver) Remove(volumeName string) error
- func (d *BtrfsDriver) Resize(volumeName string, size uint64) error
- func (d *BtrfsDriver) Root() string
- func (d *BtrfsDriver) Status() (volume.Status, error)
- type BtrfsVolume
- func (v *BtrfsVolume) Driver() volume.Driver
- func (v *BtrfsVolume) Export(label, parent string, writer io.Writer, excludes []string) error
- func (v *BtrfsVolume) GetSnapshotWithTag(tagName string) (*volume.SnapshotInfo, error)
- func (v *BtrfsVolume) Import(label string, reader io.Reader) error
- func (v *BtrfsVolume) Name() string
- func (v *BtrfsVolume) Path() string
- func (v *BtrfsVolume) ReadMetadata(label, name string) (io.ReadCloser, error)
- func (v *BtrfsVolume) RemoveSnapshot(label string) error
- func (v *BtrfsVolume) Rollback(label string) error
- func (v *BtrfsVolume) Snapshot(label, message string, tags []string) error
- func (v *BtrfsVolume) SnapshotInfo(label string) (*volume.SnapshotInfo, error)
- func (v *BtrfsVolume) Snapshots() ([]string, error)
- func (v *BtrfsVolume) TagSnapshot(label string, tagName string) error
- func (v *BtrfsVolume) Tenant() string
- func (v *BtrfsVolume) UntagSnapshot(tagName string) (string, error)
- func (v *BtrfsVolume) WriteMetadata(label, name string) (io.WriteCloser, error)
Constants ¶
This section is empty.
Variables ¶
var ( ErrBtrfsInvalidFilesystem = errors.New("not a btrfs filesystem") ErrBtrfsInvalidDriver = errors.New("invalid driver") ErrBtrfsCreatingSubvolume = errors.New("could not create subvolume") ErrBtrfsInvalidLabel = errors.New("invalid label") ErrBtrfsListingSnapshots = errors.New("couldn't list snapshots") ErrBtrfsNotSupported = errors.New("operation not supported on btrfs driver") )
Functions ¶
Types ¶
type BtrfsDFData ¶
type BtrfsDriver ¶
BtrfsDriver is a driver for the btrfs volume
func (*BtrfsDriver) Cleanup ¶
func (d *BtrfsDriver) Cleanup() error
Cleanup implements volume.Driver.Cleanup
func (*BtrfsDriver) Create ¶
func (d *BtrfsDriver) Create(volumeName string) (volume.Volume, error)
Create implements volume.Driver.Create
func (*BtrfsDriver) DriverType ¶
func (d *BtrfsDriver) DriverType() volume.DriverType
DriverType implements volume.Driver.DriverType
func (*BtrfsDriver) Exists ¶
func (d *BtrfsDriver) Exists(volumeName string) bool
Exists implements volume.Driver.Exists
func (*BtrfsDriver) Get ¶
func (d *BtrfsDriver) Get(volumeName string) (volume.Volume, error)
Get implements volume.Driver.Get
func (*BtrfsDriver) GetTenant ¶
func (d *BtrfsDriver) GetTenant(volumeName string) (volume.Volume, error)
GetTenant implements volume.Driver.GetTenant
func (*BtrfsDriver) List ¶
func (d *BtrfsDriver) List() (result []string)
List implements volume.Driver.List
func (*BtrfsDriver) MetadataDir ¶
func (d *BtrfsDriver) MetadataDir() string
MetadataDir returns the path to a volume's metadata directory
func (*BtrfsDriver) Release ¶
func (d *BtrfsDriver) Release(volumeName string) error
Release implements volume.Driver.Release
func (*BtrfsDriver) Remove ¶
func (d *BtrfsDriver) Remove(volumeName string) error
Remove implements volume.Driver.Remove
type BtrfsVolume ¶
BtrfsVolume is a btrfs volume
func (*BtrfsVolume) Driver ¶
func (v *BtrfsVolume) Driver() volume.Driver
Driver implements volume.Volume.Driver
func (*BtrfsVolume) GetSnapshotWithTag ¶
func (v *BtrfsVolume) GetSnapshotWithTag(tagName string) (*volume.SnapshotInfo, error)
GetSnapshotWithTag implements volume.Volume.GetSnapshotWithTag
func (*BtrfsVolume) Import ¶
func (v *BtrfsVolume) Import(label string, reader io.Reader) error
Import implements volume.Volume.Import
func (*BtrfsVolume) ReadMetadata ¶
func (v *BtrfsVolume) ReadMetadata(label, name string) (io.ReadCloser, error)
ReadMetadata reads the metadata info from a snapshot
func (*BtrfsVolume) RemoveSnapshot ¶
func (v *BtrfsVolume) RemoveSnapshot(label string) error
RemoveSnapshot implements volume.Volume.RemoveSnapshot
func (*BtrfsVolume) Rollback ¶
func (v *BtrfsVolume) Rollback(label string) error
Rollback implements volume.Volume.Rollback
func (*BtrfsVolume) Snapshot ¶
func (v *BtrfsVolume) Snapshot(label, message string, tags []string) error
Snapshot implements volume.Volume.Snapshot
func (*BtrfsVolume) SnapshotInfo ¶
func (v *BtrfsVolume) SnapshotInfo(label string) (*volume.SnapshotInfo, error)
SnapshotInfo returns the meta info for a snapshot
func (*BtrfsVolume) Snapshots ¶
func (v *BtrfsVolume) Snapshots() ([]string, error)
Snapshots implements volume.Volume.Snapshots
func (*BtrfsVolume) TagSnapshot ¶
func (v *BtrfsVolume) TagSnapshot(label string, tagName string) error
TagSnapshot implements volume.Volume.TagSnapshot This is not implemented with btrfs
func (*BtrfsVolume) Tenant ¶
func (v *BtrfsVolume) Tenant() string
Tenant implements volume.Volume.Tenant
func (*BtrfsVolume) UntagSnapshot ¶
func (v *BtrfsVolume) UntagSnapshot(tagName string) (string, error)
UntagSnapshot implements volume.Volume.RemoveSnapshotTag This is not implemented with btrfs
func (*BtrfsVolume) WriteMetadata ¶
func (v *BtrfsVolume) WriteMetadata(label, name string) (io.WriteCloser, error)
WriteMetadata writes the metadata info for a snapshot by writing to the base volume.