utils

package
v0.0.0-...-b1147d4 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiskUsage

func DiskUsage() (total uint64, free uint64, used uint64, err error)

DiskUsage returns the total, free, and used disk space in bytes.

func GetConfig

func GetConfig() *client.Config

GetConfig returns the loaded configuration

func HumanReadableBytes

func HumanReadableBytes(bytes uint64) string

HumanReadableBytes converts bytes to a human-readable string.

func LoadConfig

func LoadConfig(filePath string) error

LoadConfig initializes the configuration

func MemoryUsage

func MemoryUsage() (total uint64, free uint64, used uint64)

MemoryUsage returns the total, free, and used memory in bytes.

func RAMUsage

func RAMUsage() (total uint64, free uint64, used uint64)

MemoryUsage returns the total, free, and used memory in bytes.

func Uptime

func Uptime() (uptime time.Duration, err error)

Uptime returns the duration for which the system has been up.

Types

This section is empty.

Jump to

Keyboard shortcuts

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