# `NervesHubLink.ArchiveManager`
[🔗](https://github.com/nerves-hub/nerves_hub_link/blob/v2.12.0/lib/nerves_hub_link/archive_manager.ex#L7)

GenServer for handling downloading archives from NervesHub

Your NervesHubLink client will tell the manager when to download
an archive and the Manager will tell your client when it's done
downloading so you can act on it.

You are expected to remove the file when you're done with it and track
that it has been applied to prevent downloading again.

# `status`

```elixir
@type status() :: :idle | :downloading | :done | :update_rescheduled
```

# `apply_archive`

```elixir
@spec apply_archive(GenServer.server(), NervesHubLink.Message.ArchiveInfo.t(), [
  binary()
]) :: status()
```

Must be called when an archive payload is dispatched from
NervesHub. the map must contain a `"url"` key.

# `currently_downloading_uuid`

```elixir
@spec currently_downloading_uuid(GenServer.server()) :: uuid :: String.t() | nil
```

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

# `status`

```elixir
@spec status(GenServer.server()) :: status()
```

Returns the current status of the archive manager

---

*Consult [api-reference.md](api-reference.md) for complete listing*
