Documentation
¶
Index ¶
Constants ¶
View Source
const ( TagFile = "/tmp/tag.info" // deprecated file used to detect boot method. we use this // as a fall back in case of an upgrade to a running machine OldZosFile = "/tmp/flist.name" )
View Source
const ( ZosRepo = "tf-zos" ZosPackage = "zos.flist" )
Variables ¶
View Source
var (
ErrNotBootstrapped = fmt.Errorf("node was not bootstrapped")
)
View Source
var ( // ErrRestartNeeded is returned if upgraded requires a restart ErrRestartNeeded = fmt.Errorf("restart needed") )
Functions ¶
This section is empty.
Types ¶
type Boot ¶
type Boot struct{}
Boot struct
func (Boot) DetectBootMethod ¶
func (b Boot) DetectBootMethod() BootMethod
DetectBootMethod tries to detect the boot method of the node
func (*Boot) RunMode ¶
func (b *Boot) RunMode() environment.RunMode
Name always return name of the boot flist. If name file does not exist, an empty string is returned
type BootMethod ¶
type BootMethod string
BootMethod defines the node boot method
const ( // BootMethodBootstrap booted with bootstrapping. // this means that all packages are installed from flist BootMethodBootstrap BootMethod = "bootstrap" // BootMethodOther booted with other methods // only happen during development (VM + overlay) BootMethodOther BootMethod = "other" )
func (BootMethod) IsBootstrapped ¶
func (b BootMethod) IsBootstrapped() bool
type ChainVersion ¶
type Upgrader ¶
type Upgrader struct {
// contains filtered or unexported fields
}
Upgrader is the component that is responsible to keep 0-OS up to date
func NewUpgrader ¶
func NewUpgrader(root string, opts ...UpgraderOption) (*Upgrader, error)
NewUpgrader creates a new upgrader instance
type UpgraderOption ¶
UpgraderOption interface
func NoZosUpgrade ¶
func NoZosUpgrade(o bool) UpgraderOption
NoZosUpgrade option, enable or disable the update of zos binaries. enabled by default
func Storage ¶
func Storage(url string) UpgraderOption
Storage option overrides the default hub storage url default value is hub.grid.tf
func ZbusClient ¶
func ZbusClient(cl zbus.Client) UpgraderOption
ZbusClient option, adds a zbus client to the upgrader
func Zinit ¶
func Zinit(socket string) UpgraderOption
Zinit option overrides the default zinit socket
Click to show internal directories.
Click to hide internal directories.