upd

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const DaemonTypeUpd boot.DaemonType = "upd"

Variables

View Source
var (
	DefaultUpgradeOutputPath = filepath.Join(os.TempDir(), "upgrade.out")
)
View Source
var (
	ErrAlreadyUpgrading = errors.New("already upgrading")
)

Functions

func New

func New() boot.Daemon

Types

type Cfg

type Cfg struct {
	UpgradeCmd        []string `env:"UPGRADE_CMD"         long:"upgrade-cmd"         yaml:"upgradeCmd"        description:"exec cmd after download completed"`
	UpgradeOutputPath string   `env:"UPGRADE_OUTPUT_PATH" long:"upgrade-output-path" yaml:"upgradeOutputPath" description:"upgrade cmd output path"`
}

func NewCfg

func NewCfg() *Cfg

type Upd

type Upd interface {
	boot.Daemon
	Upgrade(vi *VerInfo) error
}

type VerInfo

type VerInfo struct {
	Ver               string              `json:"ver"               yaml:"ver"             validate:"required"`
	StoreCfg          *pipeline.ReaderCfg `json:"storeCfg"          yaml:"storeCfg"        validate:"required"`
	DownloadDstPath   string              `json:"downloadDstPath"   yaml:"downloadDstPath" validate:"required"`
	UpgradeCmd        []string            `json:"upgradeCmd"        yaml:"upgradeCmd"`
	UpgradeOutputPath string              `json:"upgradeOutputPath" yaml:"upgradeOutputPath"`
}

Jump to

Keyboard shortcuts

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