Skip to main content

Module builder

Module builder 

Source
Expand description

NodeBuilder — the constructor for everything init_from_env does not cover (blueprint §9.1).

Three shapes of node reach a daemon, and the builder is the one path all three take:

ShapeHow it is built
SpawnedNodeBuilder::from_env reads ASTRS_NODE_CONFIG (§24.2)
DynamicNodeBuilder::node_id + dynamic(true), endpoints from the environment (§8.3)
OverriddenEither of the above, plus explicit daemon/auth/dataflow

§Defaults

Everything the builder does not set comes from §24.2: the Unix socket under $XDG_RUNTIME_DIR/astrs first, then TCP loopback on 7408; the 4 KiB zero-copy threshold; ASTRS_TYPE_CHECK=warn; and the orphan guard only when ASTRS_RUN_PARENT_PID names a supervisor.

Structs§

NodeBuilder
Builds a Node.

Constants§

DEFAULT_CONNECT_TIMEOUT
How long the dial and greeting are allowed to take.
ENV_AUTH_TOKEN
The environment variable carrying the cluster token in hex (§16).