Help us shape the future of Go! Take the 2026 Go Developer Survey

resource

package
v1.21.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IMonitor

type IMonitor interface {
	GetCPUUtilization() float64
	GetHeapUtilization() float64
}

type Monitor

type Monitor struct {
	services.Service
	// contains filtered or unexported fields
}

func NewMonitor

func NewMonitor(limits map[Type]float64, interval, cpuRateInterval time.Duration, registerer prometheus.Registerer) (*Monitor, error)

func (*Monitor) GetCPUUtilization

func (m *Monitor) GetCPUUtilization() float64

func (*Monitor) GetHeapUtilization

func (m *Monitor) GetHeapUtilization() float64

type Type

type Type string
const (
	CPU  Type = "cpu"
	Heap Type = "heap"
)

Jump to

Keyboard shortcuts

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