system

package
v0.0.0-...-f1366d8 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	CPU() (float64, error)
	Memory() (float64, error)
	Disk() (float64, error)
	FactoryReset() error
}

Service interface for system resources

type System

type System struct{}

System implements a system service

func NewSystem

func NewSystem() *System

NewSystem creates a new system service

func (*System) CPU

func (sys *System) CPU() (float64, error)

CPU returns the current CPU usage

func (*System) Disk

func (sys *System) Disk() (float64, error)

Disk returns the current disk usage

func (*System) FactoryReset

func (sys *System) FactoryReset() error

FactoryReset triggers a factory reset of the device

func (*System) Memory

func (sys *System) Memory() (float64, error)

Memory returns the current memory usage

Jump to

Keyboard shortcuts

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