memory

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadSysMemory

func ReadSysMemory() (int64, int64)

return total available memory (kB)

Types

type MemoryMonitor added in v1.5.0

type MemoryMonitor interface {
	MemUsedPct() float64    // memory usage percentage
	SysMem() (int64, int64) // get the total amount of memory and remaining capacity (total, available (kB))
}

func GetMemMonitor added in v1.5.0

func GetMemMonitor() MemoryMonitor

get memory monitor singleton

Jump to

Keyboard shortcuts

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