Documentation ¶
Index ¶
- func New(componentType string, versionFile, updateDir string, ...) (module updatehandler.UpdateModule, err error)
- type OverlayModule
- func (module *OverlayModule) Apply() (rebootRequired bool, err error)
- func (module *OverlayModule) Close() (err error)
- func (module *OverlayModule) GetID() (id string)
- func (module *OverlayModule) GetType() string
- func (module *OverlayModule) GetVersion() (version string, err error)
- func (module *OverlayModule) Init() (err error)
- func (module *OverlayModule) Prepare(imagePath string, version string, annotations json.RawMessage) (err error)
- func (module *OverlayModule) Reboot() (err error)
- func (module *OverlayModule) Revert() (rebootRequired bool, err error)
- func (module *OverlayModule) Update() (rebootRequired bool, err error)
- type Rebooter
- type UpdateChecker
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) 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 UpdateChecker ¶
type UpdateChecker interface {
Check() (err error)
}
UpdateChecker handler for checking update.
Click to show internal directories.
Click to hide internal directories.