monitor

package
v0.0.0-...-1cc5353 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Metrics

type Metrics struct {
	CPUPercent    float64
	MemoryPercent float64
	MemoryUsedGB  float64
	MemoryTotalGB float64
	NumCPU        int
	Timestamp     time.Time
}

Metrics holds system resource information

type Monitor

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

Monitor handles system metrics collection

func NewMonitor

func NewMonitor(interval time.Duration) *Monitor

NewMonitor creates a new system monitor

func (*Monitor) Get

func (m *Monitor) Get() Metrics

Get returns the current metrics

func (*Monitor) Start

func (m *Monitor) Start()

Start begins collecting metrics at the configured interval

func (*Monitor) Stop

func (m *Monitor) Stop()

Stop halts metrics collection

Jump to

Keyboard shortcuts

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