Add SkipUpdate() Updater method

Allow to skip the update step and reboot to ReachView
This commit is contained in:
2018-10-16 12:29:46 +02:00
parent 68e9ba80b3
commit ec2fd846cc
4 changed files with 61 additions and 21 deletions

View File

@ -5,6 +5,7 @@ import "context"
const (
eventUpdate = "update"
eventOPKGUpdateResult = "opkg update result"
eventSkipUpdate = "skip update"
)
// UpdateStatus embeds informations about update status
@ -26,3 +27,8 @@ func (c *Client) Update(ctx context.Context) (*UpdateStatus, error) {
)
return res, nil
}
// SkipUpdate asks the ReachRS module to skip the update
func (c *Client) SkipUpdate() error {
return c.Emit(eventSkipUpdate, nil)
}