Skip to main content

Module app_update

Module app_update 

Source
Expand description

app.update-status: what srv knows about newer AgentMux releases (backend::update::check), for a window that opens after the last app:updatestatus event. Downloading the release it found (backend::update::download), restarting into it once agents are idle and stopping that wait (backend::update::restart) are the user’s clicks only: they come through the host (POST /api/v1/host/app_update), which agents, holding the instance auth key, can’t impersonate. app.upgrade-requests: agents’ requests waiting for the user (backend::upgrade_request); the user’s answer comes only through the host (POST /api/v1/host/upgrade_request), which agents can’t impersonate. And the agent’s side over HTTP: the App tool’s version (GET /api/v1/app/update-status) and upgrade (POST /api/v1/agent/self/upgrade).

Structs§

HostAppUpdateAction 🔒
The user’s click in the version panel, relayed by the host.
UpdateStatusQuery 🔒
Query of GET /api/v1/app/update-status.

Functions§

handle_host_app_update 🔒
POST /api/v1/host/app_update: Download, Upgrade & restart (or Restart now) and Cancel in the version panel, relayed by the CEF host with its own token. Answers the status after the action, as data.
handle_host_upgrade_request 🔒
POST /api/v1/host/upgrade_request: the user’s Upgrade now / Later on an agent’s upgrade request, relayed by the CEF host with its own token. The instance auth key, which every agent has, isn’t enough.
handle_request_upgrade 🔒
POST /api/v1/agent/self/upgrade: the App tool’s upgrade. Starts the upgrade when the user’s own turn asked for it (self_quit::gate_upgrade: as for QuitSelf, but not a Swarm broadcast), otherwise files a sensitive request: the super agent decides and the person can veto the countdown.
handle_update_status 🔒
GET /api/v1/app/update-status: the App tool’s version, which asks with check=1. A check that can’t reach GitHub answers what srv knew.
register