Skip to main content

Crate astrs_record_node

Crate astrs_record_node 

Source
Expand description

The AstRS recorder node.

A normal graph node (also reachable through record: manifest sugar and astrs record start) that subscribes to the selected outputs and streams them into an .arec session through astrs-recording — HLC-ordered, zstd-framed and seekable (blueprint §14).

§Convention-agnostic by design

This binary is spawned two different ways, and each names this node’s own inputs differently:

  • record: manifest sugar lowers to inputs named _record_0, _record_1, … (astrs_manifest::Node::record_sugar_inputs).
  • astrs record start’s dynamic-node path names them in0, in1, … (the coordinator’s own synthesis).

record never looks at its own input names at all. For every Event::Input, Node::input_source answers “which producer port did this actually come from” — a property of the wiring, not of the message — and that answer is what becomes the entry’s node/output fields. The same binary therefore serves both spawn paths (and any future one) without caring which it was.

§Usage

astrs-record-node <output.arec> [--rotate-bytes N] [--rotate-seconds N]

The daemon supplies <output.arec> as this process’s first argument (see astrs-daemon’s command_for); --rotate-* are not set by either spawn path today, but are here for a caller (a future manifest field, direct invocation) that wants bounded file sizes.

Structs§

RecordArgs
astrs-record-node command-line arguments.

Enums§

RecordNodeError
Errors astrs-record-node can report.

Functions§

record
The recording loop itself, parameterized over an already-connected node — the seam astrs_node_api::testing::MockDaemon-driven tests use to exercise this without a real daemon or a real file-descriptor handshake.
run
Connects as an ordinary node (§9.1’s Node::init_from_env) and records every input until told to stop.