Skip to main content

Module source

Module source 

Source
Expand description

Where the TUI’s answers come from.

Two transports, one return type: a parsed response envelope. A local source calls mira_core::query on a block directory with no server anywhere in the picture — which is the whole reason the CLI is worth having, because it means a detached PVC or a dead pod’s volume is still readable. A remote source POSTs the identical document to /api/v1/* on a running replica.

Both go through api.rs’s parsers and api.rs’s envelope, so the query grammar is not reimplemented here — a filter that works against a server works against a directory because it is the same code deciding what it means.

Responses are parsed with the KYAML loader, not a JSON parser. That is the KYAML-first principle paying for itself a second time: the API emits JSON, JSON is valid KYAML, and yaml-rust2 is already in the tree for the config file. There is no JSON parsing dependency in this binary and this does not add one.

Enums§

Source

Constants§

ALERTS
CONNECT_TIMEOUT 🔒
Long enough that a loaded node is not mistaken for an absent one, short enough that a wrong --addr is a message rather than a hang.
CORRELATE
ENTITIES
MAP
NAMES
QUERY
SERIES
STATS
The two read-only GETs. Both answer for the process, not for the blocks, which is why neither has a local arm: a directory has no uptime, no query counters and nobody evaluating rules against it.

Functions§

http 🔒
HTTP/1.1 POST, one connection per request.
local 🔒
parse_addr
Normalise what someone types after --addr into host:port.