Documentation
¶
Overview ¶
Package heartbeat writes live phase execution progress to a status file on disk so long-running operations (such as Ansible modules) can be monitored externally in real-time.
Index ¶
Constants ¶
View Source
const EnvStatusFile = "CARGOSHIP_STATUS_FILE"
EnvStatusFile defines an optional environment variable specifying the path to write heartbeat status.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Status ¶
type Status struct {
Phase string `json:"phase"`
Index int `json:"index"`
Total int `json:"total"`
Status string `json:"status"` // "running", "completed", "failed"
Timestamp time.Time `json:"timestamp"`
Error string `json:"error,omitempty"`
}
Status holds the real-time progress of a phase run.
Click to show internal directories.
Click to hide internal directories.