Documentation ¶
Index ¶
- func AvailableDatasetNames() ([]string, error)
- func NewZFSForFilePath(path string) (ZFS, Dataset, error)
- type Dataset
- func (self *Dataset) CloneSnapshot(snapName, fsName string, flags []string) error
- func (self *Dataset) CreateSnapshot(name string) (string, error)
- func (self *Dataset) DestroySnapshot(name string, flags []string) error
- func (self *Dataset) RenameSnapshot(oldName, newName string) error
- func (self *Dataset) RollbackSnapshot(name string, flags []string) error
- func (self *Dataset) ScanSnapshots() (Snapshots, error)
- type Datasets
- type ExecZFSError
- type ExecutableNotFound
- type Snapshot
- type Snapshots
- type SortByPathDesc
- type Stderr
- type Stdout
- type ZFS
- func (self *ZFS) Datasets() Datasets
- func (self *ZFS) FindDatasetByName(name string) (Dataset, error)
- func (self *ZFS) FindDatasetForPath(path string) (Dataset, error)
- func (self *ZFS) MountSnapshot(snap Snapshot) error
- func (self *ZFS) Name() string
- func (self *ZFS) RescanDatasets() error
- func (self *ZFS) ScanDatasets() (Datasets, error)
- type ZFSCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AvailableDatasetNames ¶
Types ¶
type Dataset ¶
type Dataset struct { Name string `json:"name"` Used uint64 `json:"used"` Avail uint64 `json:"avail"` Refer uint64 `json:"refer"` MountPoint fs.DirHandle `json:"mountPoint"` // contains filtered or unexported fields }
Dataset represents a zfs dataset (aka. zfs filesystem)
func (*Dataset) CloneSnapshot ¶
func (*Dataset) DestroySnapshot ¶
func (*Dataset) RenameSnapshot ¶
FIXME: check if the given name is a snapshot name
func (*Dataset) RollbackSnapshot ¶
func (*Dataset) ScanSnapshots ¶
ScanSnapshots returns a list of all snapshots for this dataset
type ExecZFSError ¶
type ExecZFSError struct {
// contains filtered or unexported fields
}
func (ExecZFSError) Error ¶
func (self ExecZFSError) Error() string
type ExecutableNotFound ¶
type ExecutableNotFound struct {
// contains filtered or unexported fields
}
func (ExecutableNotFound) Error ¶
func (self ExecutableNotFound) Error() string
type Snapshot ¶
type Snapshot struct { Name string `json:"name"` FullName string `json:"fullName"` Created time.Time `json:"created"` MountPoint fs.DirHandle `json:"mountPoint"` }
Snapshot - zfs snapshot
type Snapshots ¶
type Snapshots []Snapshot
Snapshots represents snapshots from a zfs dataset
type SortByPathDesc ¶
type SortByPathDesc Datasets
func (SortByPathDesc) Len ¶
func (s SortByPathDesc) Len() int
func (SortByPathDesc) Less ¶
func (s SortByPathDesc) Less(i, j int) bool
func (SortByPathDesc) Swap ¶
func (s SortByPathDesc) Swap(i, j int)
type ZFS ¶
type ZFS struct {
// contains filtered or unexported fields
}
ZFS represents a zfs filesystem
func (*ZFS) FindDatasetByName ¶
FindDatasetByName searches and returns the dataset with the given name
func (*ZFS) MountSnapshot ¶
func (*ZFS) RescanDatasets ¶
func (*ZFS) ScanDatasets ¶
Click to show internal directories.
Click to hide internal directories.