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.
/api/update is borg itself: this borg’s version, the last release check (borg update.rs), and the
members by version with what an older protocol misses (borg protocol.rs). The page shows a banner
from it when a newer release exists or a member’s protocol differs from this node’s.
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§
Constants§
Functions§
- minds
- Every collective on this machine, and the one
dirroutes to (else the first). - publish
- Publishes this node’s rollups and redacted outcomes of every collective once a minute (stats.rs
rollup, outcome.rspublish). - router
- update_
view - What
/api/updateserves for the collectivenameathome: this borg (borg, its mesh protocolprotocol), the last release check (latest,checked_ms,error; all null before the first) and whether its release is newer (update, false whilecheckis off:BORG_UPDATE_CHECK=off), then the members this node knows of. Each member has itskey, itsengineerwhen known andname(the engineer, else its short key),borg(null: older than 0.7, it sent none), theprotocolits last session agreed on,syncs(false: nothing syncs with it, it speaks a protocol this node does not) andnote: what it misses on an older protocol (protocol.rsNOTES), or why nothing syncs; null on this node’s footing. Withoutmesh/there are no members.