hardware

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrExtractPartitionInformation = errors.New("cannot extract partition information")
)

Functions

This section is empty.

Types

type Commander added in v0.2.0

type Commander interface {
	Run(cmd command.ExecCmd) (output string, err error)
}

type Hardware

type Hardware struct {
	// contains filtered or unexported fields
}

func New

func New(cmd Commander, dockerRootPath string) *Hardware

func (*Hardware) CPUPercentUsage

func (hw *Hardware) CPUPercentUsage() (usage int, err error)

func (*Hardware) GetPoolCapacity

func (hw *Hardware) GetPoolCapacity(ctx context.Context, poolName string) (capacity int, err error)

func (*Hardware) GetPoolErrors

func (hw *Hardware) GetPoolErrors(ctx context.Context, poolName string) (errors string, err error)

func (*Hardware) GetPoolHealth

func (hw *Hardware) GetPoolHealth(ctx context.Context, poolName string) (health string, err error)

func (*Hardware) GetPools

func (hw *Hardware) GetPools(ctx context.Context) (poolNames []string, err error)

func (*Hardware) IsZpoolInstalled

func (hw *Hardware) IsZpoolInstalled(ctx context.Context) bool

func (*Hardware) PartitionsUsage

func (hw *Hardware) PartitionsUsage(ctx context.Context) (
	partitionsUsage map[string]int, warnings []string, err error)

func (*Hardware) ProcessesCount

func (hw *Hardware) ProcessesCount() (processes int)

func (*Hardware) RAMPercentUsage

func (hw *Hardware) RAMPercentUsage() (usage int)

func (*Hardware) Uptime

func (hw *Hardware) Uptime() time.Duration

Jump to

Keyboard shortcuts

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