memory

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2025 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GC bool
}

func DefaultConfig

func DefaultConfig() *Config

type LinuxMemory

type LinuxMemory struct {
	*syscall.Sysinfo_t
}

func (*LinuxMemory) Available

func (m *LinuxMemory) Available() uint64

func (*LinuxMemory) Free

func (m *LinuxMemory) Free() uint64

func (*LinuxMemory) String

func (m *LinuxMemory) String() string

func (*LinuxMemory) Total

func (m *LinuxMemory) Total() uint64

func (*LinuxMemory) Used

func (m *LinuxMemory) Used() uint64

type Opt

type Opt func(*Config)

func WithGC

func WithGC() Opt

type Statable

type Statable interface {
	Free() uint64
	Total() uint64
	Used() uint64
	Available() uint64
	String() string
}

func Stat

func Stat(ctx context.Context, opts ...Opt) (Statable, error)

Stat gathers memory information from the host system and returns the information.

Jump to

Keyboard shortcuts

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