Skip to main content

Module catalog_client

Module catalog_client 

Source
Expand description

Live template/node catalog client for mecha10-api.

Fetches both catalogs over HTTP, with no compiled-in fallback:

  • GET {mecha10_api_base_url}/templates/catalog -> [{ name, description, nodes }, ...]
  • GET {mecha10_api_base_url}/nodes/catalog -> [{ name, recommended, targets }, ...]

targets is each node’s live targets.<dev|simulation|robot|remote> placement, sourced from mecha10-nodes’ own Cargo.toml [package.metadata.mecha10] targets = [...] and published to mecha10-api’s catalog on every mecha10-nodes CI push - the single source of truth this CLI reads directly instead of maintaining its own hand-written node id -> targets table.

Both are public, unauthenticated endpoints with no bundled/compiled-in fallback: a project with no network access to mecha10-api can’t resolve either catalog at all.

Structs§

NodeCatalogEntry
TemplateCatalogEntry

Functions§

fetch_node_catalog
Fetches the live catalog of bundled framework nodes. No caching: every call is a fresh HTTP round-trip.
fetch_template_catalog
Fetches the live catalog of robot project templates. No caching: every call is a fresh HTTP round-trip.
template_node_defaults
Computes which of available_ids should be pre-checked in mecha10 init’s node-selection step, based on the named template’s node list. Defaults to "rover" when template_id is omitted; falls back to [FALLBACK_BASIC_NODES] for an unrecognized template_id.