Skip to main content

Module topology

Module topology 

Source
Expand description

Topology mode (issues #71 / #72): build and run a faucet_core::Topology from a config’s pipeline.nodes / edges block.

When pipeline.nodes is non-empty the pipeline runs as an explicit node graph rather than a matrix. This module resolves each node’s connector templates, compiles its transforms, wires the edges, and drives the core topology executor — reusing crate::registry for connector construction and crate::state / crate::executor::build_dlq_config for the sink-side plumbing.

Structs§

NodeIdentity
Identity of one source/sink node, captured while the graph is built.
TopologyRunOptions
Per-run knobs for topology mode, mirroring the matrix path’s crate::executor::ExecuteOptions subset that applies to a node graph.

Functions§

build_topology
Build a faucet_core::Topology from the config’s pipeline.nodes / edges block, with default run options (no preview, process-start clock).
build_topology_meta
build_topology_with that also reports each source/sink node’s identity.
build_topology_with
Build a faucet_core::Topology, honouring the run options.
inert_blocks
Top-level blocks that topology mode parses but does not act on.
is_topology
Whether the config selects topology mode (a non-empty pipeline.nodes).
preview
Preview topology mode: build each source node and print the first limit records per source to stdout as JSON Lines.
preview_records
Collect a bounded preview of each source node’s records (source side only; downstream nodes are not run). Returns (node_id, records) per source node, in sorted node-id order.
preview_to_string
Preview topology sources into a JSON string (for the MCP preview tool).
reaching_sources
For each sink node, the source nodes that reach it, in deterministic order.
run_topology
Build and run the topology, returning a RunSummary shaped like a matrix run (one invocation per sink node, plus one per node failure under on_error: continue).
validate_topology_spec
Config-level graph validation: the checks that need only the nodes: / edges: spec, no connectors. Run as a fail-fast prelude to build_topology (so a wiring typo is reported before any client is constructed) and standalone by the template registry, which validates a config it must not build connectors for (#444).

Type Aliases§

NodeIdentities
Per-node identities, keyed by node id. Only source and sink nodes appear.