View Source NervesHubLink.UpdateManager (nerves_hub_link v2.2.1)
GenServer responsible for brokering messages between:
- an external controlling process
- FWUP
- HTTP
Should be started in a supervision tree
Summary
Functions
Add a FWUP Public key
Must be called when an update payload is dispatched from
NervesHub. the map must contain a "firmware_url"
key.
Returns the UUID of the currently downloading firmware, or nil.
Remove a FWUP public key
Returns the current status of the update manager
Functions
@spec add_fwup_public_key(GenServer.server(), String.t()) :: :ok
Add a FWUP Public key
@spec apply_update(GenServer.server(), NervesHubLink.Message.UpdateInfo.t()) :: NervesHubLink.UpdateManager.State.status()
Must be called when an update payload is dispatched from
NervesHub. the map must contain a "firmware_url"
key.
@spec currently_downloading_uuid(GenServer.server()) :: uuid :: String.t() | nil
Returns the UUID of the currently downloading firmware, or nil.
@spec remove_fwup_public_key(GenServer.server(), String.t()) :: :ok
Remove a FWUP public key
@spec status(GenServer.server()) :: NervesHubLink.UpdateManager.State.status()
Returns the current status of the update manager