upgrade

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: May 7, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZosRepo    = "tf-zos"
	ZosPackage = "zos.flist"
)

Variables

View Source
var (
	// ErrRestartNeeded is returned if upgraded requires a restart
	ErrRestartNeeded = fmt.Errorf("restart needed")
)

Functions

This section is empty.

Types

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

func (*Upgrader) Run

func (u *Upgrader) Run(ctx context.Context) error

Run starts the upgrader module and run the update according to the detected boot method

func (*Upgrader) Version

func (u *Upgrader) Version() semver.Version

type UpgraderOption

type UpgraderOption func(u *Upgrader) error

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

Jump to

Keyboard shortcuts

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