cmd

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: MIT Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// Version and BuildTime are set via ldflags during build
	Version   = "dev"
	BuildTime = "unknown"
)

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately.

Types

type ContainerInfo

type ContainerInfo struct {
	Name       string
	Status     string
	Uptime     string
	Port       string
	ReplicaNum int
}

type ContainerStats

type ContainerStats struct {
	Name       string
	CPUPercent string
	MemUsage   string
	MemPercent string
	NetIO      string
	BlockIO    string
	PIDs       string
}

ContainerStats represents resource usage for a single container

type DiskIOMetrics

type DiskIOMetrics struct {
	ReadMB       string `json:"read_mb"`
	WriteMB      string `json:"write_mb"`
	ReadSectors  int64  `json:"read_sectors"`
	WriteSectors int64  `json:"write_sectors"`
}

type DiskMetrics

type DiskMetrics struct {
	TotalMB     int    `json:"total_mb"`
	UsedMB      int    `json:"used_mb"`
	AvailableMB int    `json:"available_mb"`
	Percent     string `json:"percent"`
}

type LoadAvgMetrics

type LoadAvgMetrics struct {
	OneMin     string `json:"1min"`
	FiveMin    string `json:"5min"`
	FifteenMin string `json:"15min"`
}

type MemoryMetrics

type MemoryMetrics struct {
	TotalMB     int    `json:"total_mb"`
	UsedMB      int    `json:"used_mb"`
	AvailableMB int    `json:"available_mb"`
	Percent     string `json:"percent"`
	SwapTotalMB int    `json:"swap_total_mb"`
	SwapUsedMB  int    `json:"swap_used_mb"`
}

type MetricsData

type MetricsData struct {
	Timestamp     string         `json:"timestamp"`
	CPUPercent    string         `json:"cpu_percent"`
	Memory        MemoryMetrics  `json:"memory"`
	Disk          DiskMetrics    `json:"disk"`
	Network       NetworkMetrics `json:"network"`
	DiskIO        DiskIOMetrics  `json:"disk_io"`
	UptimeSeconds int            `json:"uptime_seconds"`
	LoadAverage   LoadAvgMetrics `json:"load_average"`
}

MetricsData represents the JSON structure returned by the monitoring agent

type NetworkMetrics

type NetworkMetrics struct {
	RxMB    string `json:"rx_mb"`
	TxMB    string `json:"tx_mb"`
	RxBytes int64  `json:"rx_bytes"`
	TxBytes int64  `json:"tx_bytes"`
}

type ServiceInfo

type ServiceInfo struct {
	Name     string
	Replicas int
	Desired  int
	Running  int
	Status   string
	Ports    string
	Internal bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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