cmd

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2026 License: MIT Imports: 74 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

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

Functions

func Execute

func Execute()

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

func ExportState added in v0.1.4

func ExportState(outputPath string) error

ExportState exports current state to a JSON file

func GenerateManPages added in v0.6.0

func GenerateManPages(dir string) error

GenerateManPages writes Unix manual pages for the current command tree.

func GetVersionInfo added in v0.0.3

func GetVersionInfo() string

GetVersionInfo returns formatted version information

func ImportState added in v0.1.4

func ImportState(inputPath string) error

ImportState imports state from a JSON file

func ReconcileStateFromActualSnapshot added in v0.3.0

func ReconcileStateFromActualSnapshot(cfg *config.Config, envName string, actual *takodstate.ActualSnapshot, notes string) (*localstate.DeploymentState, error)

ReconcileStateFromActualSnapshot reconstructs local state from a replicated takod actual snapshot. This is useful on a fresh machine when deployment history was lost but mesh runtime snapshots are still available.

func SyncStateOnDeploy added in v0.1.4

func SyncStateOnDeploy(cfg *config.Config, envName string) error

SyncStateOnDeploy refreshes local deployment state from the remote mesh before deploy. When no remote deployment history exists, runtime recovery is used only for missing local state so an existing local cache is not overwritten by weaker inferred state.

func SyncStateOnDeployWithPool added in v0.3.0

func SyncStateOnDeployWithPool(pool *ssh.Pool, cfg *config.Config, envName string) error

Types

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 = engine.StatusService

Jump to

Keyboard shortcuts

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