monitor

package
v0.0.0-...-7099f79 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartMonitor

func StartMonitor(ctx context.Context, containerName string, timeout int) (context.Context, error)

func WaitMonitorUntilProcessingFinished

func WaitMonitorUntilProcessingFinished(ctx context.Context) (context.Context, error)

Types

type Info

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

func (*Info) Add

func (s *Info) Add(val float64)

func (*Info) CalculateAvg

func (s *Info) CalculateAvg() float64

func (*Info) CalculateMax

func (s *Info) CalculateMax() float64

type Monitor

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

func (*Monitor) Done

func (m *Monitor) Done() <-chan int

func (*Monitor) Start

func (m *Monitor) Start(ctx context.Context, containerName string, timeout int) (context.Context, error)

type RecordsItem

type RecordsItem struct {
	Name    string    `json:"name"`
	Records []float64 `json:"records"`
	Unit    string    `json:"unit"`
}

type Statistic

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

func NewMonitorStatistic

func NewMonitorStatistic(name string) *Statistic

func (*Statistic) ClearStatistic

func (m *Statistic) ClearStatistic()

func (*Statistic) GetCPURawData

func (m *Statistic) GetCPURawData() []float64

func (*Statistic) MarshalRecordsJSON

func (m *Statistic) MarshalRecordsJSON() ([]byte, error)

func (*Statistic) MarshalStatisticJSON

func (m *Statistic) MarshalStatisticJSON() ([]byte, error)

func (*Statistic) UpdateStatistic

func (m *Statistic) UpdateStatistic(stat *v1.ContainerStats)

type StatisticItem

type StatisticItem struct {
	Name  string  `json:"name"`
	Value float64 `json:"value"`
	Unit  string  `json:"unit"`
}

Jump to

Keyboard shortcuts

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