Skip to main content

Module steer

Module steer 

Source
Expand description

Steering over the mesh: which pause, resume and veto messages of another node count here (the hook side, the admissions file and delivery are borg steer.rs).

  • Authenticated by origin. A privileged message (borg msg.rs Kind::privileged) is a line of messages.jsonl like any other, and travels only under a signed origin of the key its node names (lines.rs travels). That origin is the sender’s node, verified; no second signature.
  • Admit (admit), when the mesh stores such a line from another node: in force here only under the role the held membership gives that node, admin or steer (borg steer.rs Role::of_member). Any other role, an unknown or a revoked key is refused (Refusal) and logged to <store>/messages/dropped.jsonl. The line stays in the log, as the union merge keeps it, but without an admission it is neither shown nor in force anywhere.
  • Own lines. This node’s lines are admitted by borg when sent (Role::Local: the engineer at this machine steers its own sessions, whatever its member role). A share: local collective never syncs, so only this machine’s key ever steers it.
  • Enforce (enforce), every round and after the membership changed: an admission whose node lost the right to steer goes, so its pause no longer holds here, and so does an expired one (borg steer.rs keep_bounded), so the file goes and the hook is back to one failed stat.
  • Veto: when a round admitted any, and at every enforce (a failed record, or one made while learning was off, is retried), borg veto.rs apply_messages records each veto for a session of this node once.

0.3.0 sent signed directives in its Live frame; they are ignored (sync.rs Live).

Structs§

Admitted
What a round admitted and refused.

Enums§

Refusal
Why another node’s privileged message does not count here.

Functions§

admit
Admits the privileged messages among got, lines new to this node me whose origin verified as their node, under m (module doc). Refused ones are logged. The caller records the vetoes among them (veto::apply_messages) once it holds no lock, as that reads the whole log and the outcomes.
check
The role a privileged message from node counts under in m.
enforce
Every round and after the membership changed: drops the admissions of nodes that may no longer steer under m (this node’s own, Role::Local, stay) and the expired ones at now, then retries the admitted vetoes not yet recorded. Returns how many admissions went.