21 lines
493 B
Go
21 lines
493 B
Go
package backendupdate
|
|
|
|
import "yms-daemon/internal/transaction"
|
|
|
|
// Progress is one live update event sent to the local CLI. It is observational
|
|
// only: delivery failure must not change the persisted update transaction.
|
|
type Progress struct {
|
|
TransactionID string
|
|
State transaction.State
|
|
Message string
|
|
}
|
|
|
|
type ProgressReporter func(Progress)
|
|
|
|
func operationLabel(inputType string) string {
|
|
if inputType == inputTypeCurrentRelease {
|
|
return "restart"
|
|
}
|
|
return "update"
|
|
}
|