Documentation
¶
Index ¶
- Variables
- func CheckInfrastructureProvisioned(cfg *config.Config) error
- func Execute()
- func ExportState(outputPath string) error
- func GetInfrastructureOutputs(cfg *config.Config) (map[string]interface{}, error)
- func GetVersionInfo() string
- func ImportState(inputPath string) error
- func ReconcileStateFromRunning(client *ssh.Client, projectName, envName string) (*localstate.DeploymentState, error)
- func ResolveInfrastructureVariable(cfg *config.Config, varPath string) (string, error)
- func SyncStateOnDeploy(cfg *config.Config, client *ssh.Client, envName string) error
- type ContainerInfo
- type ContainerStats
- type DiskIOMetrics
- type DiskMetrics
- type LoadAvgMetrics
- type MemoryMetrics
- type MetricsData
- type NetworkMetrics
- type ServiceInfo
Constants ¶
This section is empty.
Variables ¶
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
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
ExportState exports current state to a JSON file
func GetInfrastructureOutputs ¶ added in v0.2.0
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
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
ResolveInfrastructureVariable resolves ${infrastructure.name.ip} variables
Types ¶
type ContainerInfo ¶
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 DiskMetrics ¶
type LoadAvgMetrics ¶
type MemoryMetrics ¶
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