zfs

package
v0.2.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 27, 2020 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	Name    string           `json:"name"`
	Type    libzfs.VDevType  `json:"type"`
	State   libzfs.VDevState `json:"state"`
	Devices []Device         `json:",omitempty"`
}

type Zfs

type Zfs struct {
	Hostname string `json:"hostname"`

	DaemonMode bool `json:"daemon_mode"`

	State struct {
		File string `json:"file"`
		// contains filtered or unexported fields
	} `json:"state"`

	Pools []Zpool `json:"pools"`

	// Alert is a pluggable interface that
	// can accept different systems for notifying
	// users. See alert/alert.go
	Alert       alert.Alert `json:"-"`
	AlertConfig struct {
		NoAlert bool `json:"no_alert"`
	} `json:"alert_config"`

	// devices in this slice have had a sucessful alert triggered
	AlertState map[string]string `json:"alert_state"`

	Log logger.Logger `json:"-"`
}

Zfs type holds the global configuration for the zfs package

func (*Zfs) Init

func (z *Zfs) Init() error

Init initilizes the type

func (Zfs) ZFSMon

func (z Zfs) ZFSMon() error

ZFSMon builds an array of zpool objects and performs health checks on them

type Zpool

type Zpool struct {
	Name    string           `json:"name"`
	State   libzfs.VDevState `json:"state"`
	Devices []Device         `json:"devices"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL