Skip to main content

Crate borg_web

Crate borg_web 

Source
Expand description

borg web [--port 7979] [--dir DIR]: a live page of the collective’s knowledge and usage statistics, on 127.0.0.1 only.

It reads the stores the way borg top does (files, no IPC with borg mesh serve), so local collectives show too. /api/events is a server-sent event stream: a 1 s watch on the store files tells the page which views changed, and the page refetches only those. Once a minute it publishes this node’s daily rollups (borg stats.rs) so the mesh can spread them.

The binary (main.rs) parses the command line and serves router; tests drive it in process.

Modules§

learning
/api/learning: whether learning works in this collective, week by week, from the logs Borg keeps anyway (no state of its own, so the history is there from the first view).

Structs§

App
Mind
One collective the page can show.

Constants§

USAGE

Functions§

minds
Every collective on this machine, and the one dir routes to (else the first).
publish
Publishes this node’s rollups and redacted outcomes of every collective once a minute (stats.rs rollup, outcome.rs publish).
router