Documentation
¶
Index ¶
- func GenerateDeterministicUUID(seed string) string
- func ParseFloat64(value string) float64
- func ParsePercentage(value string) float64
- func ParseRatio(value string) float64
- func ParseSize(value string) uint64
- func ParseString(value string) string
- func ParseUint64(value string) uint64
- type Client
- type Cmd
- type CmdError
- type Dataset
- func (d *Dataset) Clone(ctx context.Context, dest string, properties map[string]string) (*Dataset, error)
- func (d *Dataset) Destroy(ctx context.Context, recursive bool, deferDeletion bool) error
- func (d *Dataset) GetEncryptionProperties(ctx context.Context) (*EncryptionProperties, error)
- func (d *Dataset) GetProperty(ctx context.Context, name string) (ZFSProperty, error)
- func (d *Dataset) IsEncrypted() bool
- func (d *Dataset) LoadKey(ctx context.Context, recursive bool) error
- func (d *Dataset) LoadKeyWithPassphrase(ctx context.Context, passphrase string, recursive bool) error
- func (d *Dataset) Mount(ctx context.Context, overlay bool, options ...string) error
- func (d *Dataset) MountWithKey(ctx context.Context, overlay bool, options ...string) error
- func (d *Dataset) Rename(ctx context.Context, newName string, recursive bool) (*Dataset, error)
- func (d *Dataset) Rollback(ctx context.Context, destroyMoreRecent bool) error
- func (d *Dataset) SendIncremental(ctx context.Context, baseSnapshot string, out io.Writer) error
- func (d *Dataset) SendIncrementalWithIntermediates(ctx context.Context, baseSnapshot string, out io.Writer) error
- func (d *Dataset) SendSnapshot(ctx context.Context, out io.Writer) error
- func (d *Dataset) SendToDataset(ctx context.Context, dest string, force bool) (*Dataset, error)
- func (d *Dataset) SetProperties(ctx context.Context, kvPairs ...string) error
- func (d *Dataset) Snapshot(ctx context.Context, name string, recursive bool) (*Dataset, error)
- func (d *Dataset) Snapshots() ([]*Dataset, error)
- func (d *Dataset) UnloadKey(ctx context.Context, recursive bool) error
- func (d *Dataset) Unmount(ctx context.Context, force bool) error
- type DatasetList
- type DatasetType
- type EncryptionProperties
- type LocalRunner
- type Options
- type OutputVersion
- type Runner
- type ZDBPool
- type ZDBPoolChild
- type ZFSProperty
- type ZFSPropertySource
- type ZPool
- func (p *ZPool) AddSpare(ctx context.Context, device string, force bool) error
- func (p *ZPool) Datasets(ctx context.Context, t DatasetType) ([]*Dataset, error)
- func (p *ZPool) Destroy(ctx context.Context) error
- func (p *ZPool) Detach(ctx context.Context, device string) error
- func (p *ZPool) GetProperties(ctx context.Context) (map[string]ZFSProperty, error)
- func (p *ZPool) GetProperty(name string) (ZFSProperty, error)
- func (p *ZPool) MarshalJSON() ([]byte, error)
- func (p *ZPool) RemoveSpare(ctx context.Context, device string) error
- func (p *ZPool) ReplaceDevice(ctx context.Context, oldDevice, newDevice string, force bool) error
- func (p *ZPool) RequiredSpareSize(ctx context.Context) (uint64, error)
- func (p *ZPool) Scrub(ctx context.Context) error
- func (p *ZPool) SetProperty(ctx context.Context, property, value string) error
- func (p *ZPool) Status(ctx context.Context) (*ZPoolStatusPool, error)
- func (p *ZPool) UnmarshalJSON(data []byte) error
- func (z *ZPool) ZDB(ctx context.Context) (*ZDBPool, error)
- type ZPoolList
- type ZPoolState
- type ZPoolStatus
- type ZPoolStatusPool
- type ZPoolStatusScanStats
- type ZPoolStatusVDEV
- type ZPoolVDEV
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFloat64 ¶
func ParsePercentage ¶
func ParseRatio ¶
func ParseString ¶
func ParseUint64 ¶
Types ¶
type Dataset ¶
type Dataset struct {
Name string `json:"name"`
GUID string `json:"guid"`
Type DatasetType `json:"type"`
Pool string `json:"pool"`
CreateTXG string `json:"createtxg"`
Mountpoint string `json:"mountpoint"`
Used uint64 `json:"used"`
Available uint64 `json:"available"`
Referenced uint64 `json:"referenced"`
Compressratio float64 `json:"compressratio"`
Properties map[string]ZFSProperty `json:"properties"`
// contains filtered or unexported fields
}
func (*Dataset) GetEncryptionProperties ¶
func (d *Dataset) GetEncryptionProperties(ctx context.Context) (*EncryptionProperties, error)
func (*Dataset) GetProperty ¶
func (*Dataset) IsEncrypted ¶
func (*Dataset) LoadKeyWithPassphrase ¶
func (*Dataset) MountWithKey ¶
func (*Dataset) SendIncremental ¶
func (*Dataset) SendIncrementalWithIntermediates ¶
func (*Dataset) SendSnapshot ¶
func (*Dataset) SendToDataset ¶
func (*Dataset) SetProperties ¶
type DatasetList ¶
type DatasetList struct {
OutputVersion OutputVersion `json:"output_version"`
Datasets map[string]*Dataset `json:"datasets"`
}
type DatasetType ¶
type DatasetType string
const ( DatasetTypeAll DatasetType = "ALL" DatasetTypeFilesystem DatasetType = "FILESYSTEM" DatasetTypeVolume DatasetType = "VOLUME" DatasetTypeSnapshot DatasetType = "SNAPSHOT" )
type EncryptionProperties ¶
type LocalRunner ¶
type LocalRunner struct{}
type OutputVersion ¶
type ZDBPool ¶
type ZDBPool struct {
Name string `json:"name"`
GUID string `json:"guid"`
Version string `json:"version"`
Children []ZDBPoolChild `json:"children,omitempty"`
}
type ZDBPoolChild ¶
type ZDBPoolChild struct {
Type string `json:"type,omitempty"`
ID int `json:"id,omitempty"`
GUID uint64 `json:"guid,omitempty"`
Path string `json:"path,omitempty"`
WholeDisk int `json:"whole_disk,omitempty"`
MetaslabArray int `json:"metaslab_array,omitempty"`
MetaslabShift int `json:"metaslab_shift,omitempty"`
Ashift int `json:"ashift,omitempty"`
Asize uint64 `json:"asize,omitempty"`
IsLog int `json:"is_log,omitempty"`
CreateTXG uint64 `json:"create_txg,omitempty"`
Properties map[string]string `json:"properties,omitempty"`
Children []ZDBPoolChild `json:"children,omitempty"`
}
type ZFSProperty ¶
type ZFSProperty struct {
Value string `json:"value"`
Source ZFSPropertySource `json:"source"`
}
type ZFSPropertySource ¶
type ZPool ¶
type ZPool struct {
Name string `json:"name"`
Type string `json:"type"`
State ZPoolState `json:"state"`
PoolGUID string `json:"pool_guid"`
TXG string `json:"txg"`
SPAVersion string `json:"spa_version"`
ZPLVersion string `json:"zpl_version"`
Size uint64 `json:"size"`
Free uint64 `json:"free"`
Alloc uint64 `json:"allocated"`
Fragmentation float64 `json:"fragmentation"`
DedupRatio float64 `json:"dedup_ratio"`
Properties map[string]ZFSProperty `json:"properties"`
Vdevs map[string]*ZPoolVDEV `json:"-"`
Logs map[string]*ZPoolVDEV `json:"logs"`
L2Cache map[string]*ZPoolVDEV `json:"l2cache"`
Spares map[string]*ZPoolVDEV `json:"spares"`
Special map[string]*ZPoolVDEV `json:"special"`
Dedup map[string]*ZPoolVDEV `json:"dedup"`
// contains filtered or unexported fields
}
func (*ZPool) GetProperties ¶
func (*ZPool) GetProperty ¶
func (p *ZPool) GetProperty(name string) (ZFSProperty, error)
func (*ZPool) MarshalJSON ¶
func (*ZPool) ReplaceDevice ¶
func (*ZPool) RequiredSpareSize ¶
func (*ZPool) SetProperty ¶
func (*ZPool) UnmarshalJSON ¶
type ZPoolList ¶
type ZPoolList struct {
OutputVersion OutputVersion `json:"output_version"`
Pools map[string]*ZPool `json:"pools"`
}
type ZPoolState ¶
type ZPoolState string
const ( ZPoolStateOnline ZPoolState = "ONLINE" ZPoolStateDegraded ZPoolState = "DEGRADED" ZPoolStateFaulted ZPoolState = "FAULTED" ZPoolStateOffline ZPoolState = "OFFLINE" ZPoolStateRemoved ZPoolState = "REMOVED" ZPoolStateCorruptData ZPoolState = "CORRUPT_DATA" ZPoolStateUnknown ZPoolState = "UNKNOWN" )
type ZPoolStatus ¶
type ZPoolStatus struct {
OutputVersion OutputVersion `json:"output_version"`
Pools map[string]*ZPoolStatusPool `json:"pools"`
}
type ZPoolStatusPool ¶
type ZPoolStatusPool struct {
Name string `json:"name"`
State string `json:"state"`
PoolGUID string `json:"pool_guid"`
TXG string `json:"txg"`
SPAVersion string `json:"spa_version"`
ZPLVersion string `json:"zpl_version"`
Status string `json:"status"`
Action string `json:"action"`
ScanStats *ZPoolStatusScanStats `json:"scan_stats"`
Vdevs map[string]*ZPoolStatusVDEV `json:"vdevs"`
Logs map[string]*ZPoolStatusVDEV `json:"logs"`
Spares map[string]*ZPoolStatusVDEV `json:"spares"`
L2Cache map[string]*ZPoolStatusVDEV `json:"l2cache"`
Special map[string]*ZPoolStatusVDEV `json:"special"`
Dedup map[string]*ZPoolStatusVDEV `json:"dedup"`
}
type ZPoolStatusScanStats ¶
type ZPoolStatusScanStats struct {
Function string `json:"function"`
State string `json:"state"`
StartTime string `json:"start_time"`
EndTime string `json:"end_time"`
ToExamine string `json:"to_examine"`
Examined string `json:"examined"`
Skipped string `json:"skipped"`
Processed string `json:"processed"`
Errors string `json:"errors"`
BytesPerScan string `json:"bytes_per_scan"`
PassStart string `json:"pass_start"`
ScrubPause string `json:"scrub_pause"`
ScrubSpentPaused string `json:"scrub_spent_paused"`
IssuedBytesPerScan string `json:"issued_bytes_per_scan"`
Issued string `json:"issued"`
}
type ZPoolStatusVDEV ¶
type ZPoolStatusVDEV struct {
Name string `json:"name"`
VdevType string `json:"vdev_type"`
GUID string `json:"guid"`
Path string `json:"path"`
Class string `json:"class"`
State string `json:"state"`
AllocSpace string `json:"alloc_space"`
TotalSpace string `json:"total_space"`
DefSpace string `json:"def_space"`
RepDevSize string `json:"rep_dev_size"`
ReadErrors string `json:"read_errors"`
WriteErrors string `json:"write_errors"`
ChkErrors string `json:"checksum_errors"`
Vdevs map[string]*ZPoolStatusVDEV `json:"vdevs"`
}
type ZPoolVDEV ¶
type ZPoolVDEV struct {
Name string `json:"name"`
VdevType string `json:"vdev_type"`
GUID string `json:"guid"`
Path string `json:"path"`
PhysPath string `json:"phys_path"`
Class string `json:"class"`
State string `json:"state"`
Size uint64 `json:"size"`
Free uint64 `json:"free"`
Alloc uint64 `json:"allocated"`
Fragmentation float64 `json:"fragmentation"`
Properties map[string]ZFSProperty `json:"properties"`
Vdevs map[string]*ZPoolVDEV `json:"vdevs"`
}
Click to show internal directories.
Click to hide internal directories.