metrics

package
v0.2.5-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector interface {
	Watch(ctx context.Context, cid string) chan Metrics
	Stop() error
}

func GetCollector

func GetCollector(name string, handle interface{}) (Collector, error)

func NewDockerCollector

func NewDockerCollector(client docker.Client) Collector

type Metrics

type Metrics struct {
	NCpus        uint8
	CPUUtil      int
	NetTx        int64
	NetRx        int64
	MemLimit     int64
	MemPercent   int
	MemUsage     int64
	IOBytesRead  int64
	IOBytesWrite int64
	Pids         int
}

func NewMetrics

func NewMetrics() Metrics

type WidgetCol

type WidgetCol struct {
	Width  int
	Height int
	// contains filtered or unexported fields
}

func NewCPUCol

func NewCPUCol(metChan <-chan Metrics) *WidgetCol

func NewMEMCol

func NewMEMCol(metChan <-chan Metrics) *WidgetCol

func NewNameCol

func NewNameCol(name string) *WidgetCol

type WidgetRow

type WidgetRow struct {
	ui.Block
	Cols   []*WidgetCol
	X      int
	Y      int
	Width  int
	Height int
}

func NewWidgetRow

func NewWidgetRow(nRow int) *WidgetRow

func (*WidgetRow) Add

func (row *WidgetRow) Add(col *WidgetCol)

func (*WidgetRow) Draw

func (row *WidgetRow) Draw(buf *ui.Buffer)

Jump to

Keyboard shortcuts

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