Expand description
bee-tui — internal library exposing the modules the binary
composes. Living as both a [lib] and a [[bin]] lets integration
tests in tests/ exercise the cockpit’s components against
fixtures, without launching the full TUI loop.
Public exports are stable for tests only — there is no ABI
commitment for downstream library users. Use the bee-tui
command-line binary, not this lib.
Modules§
- action
- api
- Thin wrapper around
bee::Clientthat binds it to a configuredNodeConfig. The cockpit talks to Bee through oneApiClientper active profile. - app
- bee_log
- Parser for Bee’s logfmt-with-quoted-keys log format. Each Bee log line looks like:
- bee_
log_ tailer - Background task that follows the supervised Bee process’s log
file, parses each new line, and ships entries down an mpsc to
the cockpit’s
crate::components::log_pane::LogPane. - bee_
log_ writer - Size-bounded rotating writer for the supervised Bee process’s captured stdout + stderr.
- bee_
supervisor - Spawn + manage a child Bee node from inside bee-tui.
- cli
- components
- config
- errors
- log_
capture - In-memory ring buffer of HTTP-traffic log events, fed by a custom
tracing-subscriberlayer that filters to thebee::httptarget. - logging
- metrics
- Prometheus exposition-format renderer for the gauges bee-tui
already computes. Pure: takes references to the live snapshots
and produces the
/metricsbody as aString. - metrics_
server - Tiny single-route HTTP/1.1 server for
/metrics. - stamp_
preview - Pure math + formatting for the four
:*-previewcommand-bar verbs (:topup-preview,:dilute-preview,:extend-preview,:buy-preview). - state
- Persisted runtime state — the operator-tweaked, app-written
file that’s distinct from
config.toml(operator-edited, app-read-only). - theme
- Centralized colour palette. Set once at startup from
crate::config::UiConfig::theme; read by screens viaactive. - tui
- watch
- k9s-style watch / informer layer.
Macros§
- trace_
dbg - Similar to the
std::dbg!macro, but generatestracingevents rather than printing to stdout.