Skip to main content

Crate bee_tui

Crate bee_tui 

Source
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
alerts
Webhook health-gate alerts. When a gate transitions to Fail (or back to Pass after being broken), bee-tui POSTs a small JSON object to the operator-configured webhook URL. Slack and Discord-compatible — both accept the same {"text": "..."} shape on their incoming-webhook URLs.
api
Thin wrapper around bee::Client that binds it to a configured NodeConfig. The cockpit talks to Bee through one ApiClient per 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
config_doctor
:config-doctor — read the operator’s bee.yaml, walk a curated list of deprecation / recommendation rules, and produce a report.
durability
:durability-check <ref> — the operator-facing answer to the single most-feared question: “is my data still alive?”
economics_oracle
External cost-context oracles: xBZZ → USD price and Gnosis-chain basefee + tip. Both are read-only fetches off services Bee itself doesn’t expose. Live behind opt-in commands so a flaky external service can never block the cockpit.
errors
feed_probe
:feed-probe <owner> <topic> — single-shot lookup of the latest feed update for a (owner, topic) pair. The cockpit verb prints a one-line summary; --once feed-probe emits structured JSON for CI snapshot-checks of feed liveness.
feed_timeline
Feed history walker — the data model behind the S14 Feed Timeline screen and the :feed-timeline verb. Builds on v1.5’s crate::feed_probe: probe gives us the latest index, then the walker fetches each prior index’s SOC chunk in parallel (bounded concurrency) and surfaces a Vec<TimelineEntry>.
log_capture
In-memory ring buffer of HTTP-traffic log events, fed by a custom tracing-subscriber layer that filters to the bee::http target.
logging
manifest_walker
Async walker for Mantaray manifests.
metrics
Prometheus exposition-format renderer for the gauges bee-tui already computes. Pure: takes references to the live snapshots and produces the /metrics body as a String.
metrics_server
Tiny single-route HTTP/1.1 server for /metrics.
once
bee-tui --once <verb> [args…] — single-shot CI mode.
pprof_bundle
Async pprof + trace bundling for :diagnose --pprof[=N].
stamp_preview
Pure math + formatting for the four :*-preview command-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 via active.
tui
uploads
Directory walker for :upload-collection. Recursively reads a local directory and produces the Vec<CollectionEntry> that bee.file().upload_collection_entries(...) consumes.
utility_verbs
Pure-local utility verbs.
version_check
:check-version — long-running Bee operators silently drift behind upstream. This module hits GitHub’s releases/latest for ethersphere/bee and pairs the answer with the running Bee version (read from /health) so operators see “running 2.7.2 / latest 2.8.0 (released 2026-04-15)” at a glance.
watch
k9s-style watch / informer layer.

Macros§

trace_dbg
Similar to the std::dbg! macro, but generates tracing events rather than printing to stdout.