NervesHubLink.UpdateManager (nerves_hub_link v2.9.0)
View SourceGenServer responsible for brokering messages between:
- an external controlling process
- FWUP
- HTTP
Should be started in a supervision tree
Summary
Functions
Must be called when an update payload is dispatched from
NervesHub. the map must contain a "firmware_url" key.
Change Updater used for the next firmware update.
Returns the UUID of the currently downloading firmware, or nil.
Returns the current status of the update manager
Types
Functions
@spec apply_update(GenServer.server(), NervesHubLink.Message.UpdateInfo.t(), [ String.t() ]) :: status()
Must be called when an update payload is dispatched from
NervesHub. the map must contain a "firmware_url" key.
@spec change_updater(GenServer.server(), NervesHubLink.UpdateManager.Updater.t()) :: :ok
Change Updater used for the next firmware update.
Updaters orchestrate firmware downloads and installation.
@spec currently_downloading_uuid(GenServer.server()) :: uuid :: String.t() | nil
Returns the UUID of the currently downloading firmware, or nil.
@spec status(GenServer.server()) :: status()
Returns the current status of the update manager