cmd

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 45 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 CheckInfrastructureProvisioned added in v0.2.0

func CheckInfrastructureProvisioned(cfg *config.Config) error

CheckInfrastructureProvisioned checks if infrastructure is provisioned Used by other commands that depend on infrastructure

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 GetInfrastructureOutputs added in v0.2.0

func GetInfrastructureOutputs(cfg *config.Config) (map[string]interface{}, error)

GetInfrastructureOutputs retrieves provisioned infrastructure outputs

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 ReconcileStateFromRunning added in v0.1.4

func ReconcileStateFromRunning(client *ssh.Client, projectName, envName string) (*localstate.DeploymentState, error)

ReconcileStateFromRunning reconstructs state from running Docker services This is useful when state is completely lost but services are still running

func ResolveInfrastructureVariable added in v0.2.0

func ResolveInfrastructureVariable(cfg *config.Config, varPath string) (string, error)

ResolveInfrastructureVariable resolves ${infrastructure.name.ip} variables

func SyncStateOnDeploy added in v0.1.4

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

SyncStateOnDeploy attempts to sync state when local state is missing This is called automatically during deploy when .tako doesn't exist

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