loadavg

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Supported = true
)

Variables

View Source
var (
	ErrUnsupported       = errors.New("loadavg: unsupported platform")
	ErrUnexpectedContent = errors.New("loadavg: unexpected content")
)

Functions

This section is empty.

Types

type GetParam

type GetParam uint8
const (
	Min1 GetParam = iota
	Min5
	Min15
)

type LoadAvg

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

func New

func New() *LoadAvg

func (*LoadAvg) Get

func (l *LoadAvg) Get(p GetParam) float64

func (*LoadAvg) Update

func (l *LoadAvg) Update() error

func (*LoadAvg) WaitBelow

func (l *LoadAvg) WaitBelow(ctx context.Context, want float64, interval time.Duration) error

Jump to

Keyboard shortcuts

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