Add upgrade locking mechanism to core ui serving module

This commit is contained in:
Daniel
2025-04-07 15:26:35 +02:00
parent b1bc5e2d0e
commit 438f43156f
7 changed files with 122 additions and 86 deletions

View File

@@ -438,6 +438,15 @@ func (i *Instance) BinaryUpdates() *updates.Updater {
return i.binaryUpdates
}
// GetBinaryUpdateFile returns the file path of a binary update file.
func (i *Instance) GetBinaryUpdateFile(name string) (path string, err error) {
file, err := i.binaryUpdates.GetFile(name)
if err != nil {
return "", err
}
return file.Path(), nil
}
// IntelUpdates returns the updates module.
func (i *Instance) IntelUpdates() *updates.Updater {
return i.intelUpdates