View Source NervesHubLink.UpdateManager (nerves_hub_link v2.3.0)

GenServer 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.

Returns the UUID of the currently downloading firmware, or nil.

Returns the current status of the update manager

Functions

Link to this function

add_fwup_public_key(manager \\ __MODULE__, pubkey)

View Source
@spec add_fwup_public_key(GenServer.server(), String.t()) :: :ok

Add a FWUP Public key

Link to this function

apply_update(manager \\ __MODULE__, update_info)

View Source
@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.

Link to this function

currently_downloading_uuid(manager \\ __MODULE__)

View Source
@spec currently_downloading_uuid(GenServer.server()) :: uuid :: String.t() | nil

Returns the UUID of the currently downloading firmware, or nil.

Link to this function

remove_fwup_public_key(manager \\ __MODULE__, pubkey)

View Source
@spec remove_fwup_public_key(GenServer.server(), String.t()) :: :ok

Remove a FWUP public key

Link to this function

status(manager \\ __MODULE__)

View Source

Returns the current status of the update manager