Documentation
¶
Overview ¶
Package upgrade provides the Arcane CLI command that upgrades a running Arcane container by recreating it with a newer image.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var UpgradeCmd = &cobra.Command{
Use: "upgrade",
Short: "Upgrade an Arcane container to the latest version",
Long: `Upgrade an Arcane container by pulling the latest image and recreating the container.
This command should be run from outside the container (e.g., from the host or another container).`,
Example: ` # Auto-detect and upgrade the Arcane container
arcane upgrade --auto
# Upgrade a specific container
arcane upgrade --container arcane
# Upgrade to a specific image tag
arcane upgrade --container arcane --image ghcr.io/getarcaneapp/arcane:v1.2.3`,
RunE: runUpgrade,
}
UpgradeCmd recreates a running Arcane container with a newer image while preserving its configuration.
Functions ¶
This section is empty.
Types ¶
type LogWriter ¶ added in v2.6.0
type LogWriter struct {
// contains filtered or unexported fields
}
LogWriter accumulates the upgrade log in memory and rewrites the whole file through atomic.WriteFile on every entry. The upgrade recreates the container it is reporting on, so a run can be cut short at any point -- rewriting atomically per entry means the file on disk is always a complete, untorn log up to the last entry emitted, with no partial line ever visible to whoever reads it afterwards.
func SetupMessageOnlyLogFile ¶ added in v2.6.0
func SetupMessageOnlyLogFile(dataDir string, filePrefix string, minLevel slog.Level) (*LogWriter, error)
SetupMessageOnlyLogFile writes normal slog output to stdout and message-only output to a timestamped file under dataDir. Every entry is persisted as it is logged, so the returned writer needs no closing -- it is returned so the caller can report where the log landed.