Skip to main content

Module install

Module install 

Source
Expand description

Install + local-plugin management.

install resolves a plugin against a crate::Client, downloads the artifact through a pluggable Downloader (so tests can inject bytes), verifies the SHA-256, and writes the result to crate::paths::plugin_install_dir. A copy of the manifest is stashed alongside (.manifest) so list/info/update can read metadata without re-hitting the registry.

Local enumeration helpers (list_installed, read_installed, remove) keep the file-layout knowledge in one place.

Structs§

HttpDownloader
HTTP downloader using ureq. The production downloader for CLI install and update commands.
InstalledRecord
The on-disk record for an installed plugin: the artifact path plus the cached manifest.
MemoryDownloader
In-memory downloader keyed by URL.
NoopDownloader
A stub downloader that surfaces a typed “not yet implemented” for any URL. Used by the CLI when no real transport is wired in yet.

Traits§

Downloader
Pluggable artifact transport, mirroring crate::client::Fetcher but for the binary blob referenced by a manifest’s [artifact] url.

Functions§

install
Install name at version (or latest when None).
install_manifest
Install a resolved manifest. Split out so update can reuse the path after re-resolving.
list_installed
Enumerate installed plugins by scanning the plugins directory for <name>-<version>.so files with a sibling .manifest.
read_installed
Read a previously installed plugin’s record from its artifact path.
remove
Remove a plugin by name. Removes every installed version whose name matches (there should only be one under the single-version-per-name model, but this is forgiving).