Improve status module

This commit is contained in:
Daniel
2019-01-29 16:20:06 +01:00
parent e8b5cedc9d
commit 321f3feec5
13 changed files with 342 additions and 107 deletions

18
status/updates.go Normal file
View File

@@ -0,0 +1,18 @@
package status
// Update status options
const (
UpdateStatusCurrentStable = "stable"
UpdateStatusCurrentBeta = "beta"
UpdateStatusAvailable = "available" // restart or reboot required
UpdateStatusFailed = "failed" // check logs
)
// SetUpdateStatus updates the system status with a new update status.
func SetUpdateStatus(newStatus string) {
status.Lock()
status.UpdateStatus = newStatus
status.Unlock()
go status.Save()
}