overlaymodule

package
v0.0.0-...-63ad18f Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(componentType string, versionFile, updateDir string,
	storage updatehandler.ModuleStorage, rebooter Rebooter,
	checker UpdateChecker,
) (module updatehandler.UpdateModule, err error)

New creates module instance.

Types

type OverlayModule

type OverlayModule struct {
	// contains filtered or unexported fields
}

OverlayModule overlay module.

func (*OverlayModule) Apply

func (module *OverlayModule) Apply() (rebootRequired bool, err error)

Apply applies current update.

func (*OverlayModule) Close

func (module *OverlayModule) Close() (err error)

Close closes module.

func (*OverlayModule) GetID

func (module *OverlayModule) GetID() (id string)

GetID returns module ID.

func (*OverlayModule) GetType

func (module *OverlayModule) GetType() string

GetType returns component type.

func (*OverlayModule) GetVersion

func (module *OverlayModule) GetVersion() (version string, err error)

GetVersion returns version.

func (*OverlayModule) Init

func (module *OverlayModule) Init() (err error)

Init initializes module.

func (*OverlayModule) Prepare

func (module *OverlayModule) Prepare(imagePath string, version string, annotations json.RawMessage) (err error)

Prepare prepares module update.

func (*OverlayModule) Reboot

func (module *OverlayModule) Reboot() (err error)

Reboot performs module reboot.

func (*OverlayModule) Revert

func (module *OverlayModule) Revert() (rebootRequired bool, err error)

Revert reverts current update.

func (*OverlayModule) Update

func (module *OverlayModule) Update() (rebootRequired bool, err error)

Update performs module update.

type Rebooter

type Rebooter interface {
	Reboot() (err error)
}

Rebooter performs module reboot.

type UpdateChecker

type UpdateChecker interface {
	Check() (err error)
}

UpdateChecker handler for checking update.

Jump to

Keyboard shortcuts

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