View Source NervesHubLink.HTTPFwupStream (nerves_hub_link v2.2.0)
Download and install a firmware update.
Summary
Functions
Returns a specification to start this module under a supervisor.
Download and install the firmware at the specified URL
Start the downloader process
Stop the downloader
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get(GenServer.server(), String.t()) :: :ok
Download and install the firmware at the specified URL
@spec start(pid()) :: GenServer.on_start()
@spec start_link(pid()) :: GenServer.on_start()
Start the downloader process
A callback process should be passed
Messages will be received in the shape:
{:fwup_message, message}- see the docs for Fwup for more info.{:http_error, {status_code, body}}{:http_error, :timeout}{:http_error, :too_many_redirects}
@spec stop(GenServer.server()) :: :ok
Stop the downloader