Documentation
¶
Index ¶
Constants ¶
const ( // UpdateStatusUpdatedNeedReboot is the status returned by updateengine on // dbus when a reboot is needed UpdateStatusUpdatedNeedReboot = "UPDATE_STATUS_UPDATED_NEED_REBOOT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a dbus client subscribed to updateengine status updates
func New ¶
New returns a Client connected to dbus over a private connection with a subscription to updateengine.
func (*Client) GetStatus ¶
GetStatus returns the current status of updateengine it returns an error if there is a problem getting the status from dbus
func (*Client) RebootNeededSignal ¶
RebootNeededSignal watches the updateengine status update subscription and passes the status on the rcvr channel whenever the status update is UpdateStatusUpdatedNeedReboot. The stop channel terminates the function. This function is intended to be called as a goroutine
type Status ¶
type Status struct {
LastCheckedTime int64
Progress float64
CurrentOperation string
NewVersion string
NewSize int64
}
Status is a struct containing the information passed by updateengine on every status update.