resource

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 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