Skip to main content

Module node

Module node 

Source
Expand description

astrs node add/remove/replace/connect/disconnect (blueprint §8, §17: dynamic topology) — closing the loop crate::command::stub used to leave as a scheduled-later verb.

  astrs node add <flow> node.yml       ─► AddNode{node, start}     ─► Ok
  astrs node remove <flow> <id>        ─► RemoveNode{node, grace}  ─► Ok
  astrs node replace <flow> <id> f.yml ─► ReplaceNode{node, drain} ─► Ok
  astrs node connect <flow> <id> <in> <src> ─► AddEdge{..}         ─► Ok
  astrs node disconnect <flow> <id> <in>    ─► RemoveEdge{..}      ─► Ok

add/replace read a single-node manifest fragment from disk (§8.3’s per-node schema, with no nodes: wrapper) and expand it client-side into an astrs_wire::NodeSpawnSpec via astrs_coordinator::expand_node_fragment — the coordinator itself never reads manifest text for a dynamic node (see astrs-coordinator’s handlers::topology module docs); this is the one piece of that expansion a caller has to do instead.

Every verb here is a thin, uniform shape: build the typed request, Client::request_ok it, print a one-line confirmation (or the --json equivalent). None of the five needs to inspect a reply beyond “did the coordinator accept it” — the interesting state (did the node actually come up, is the edge actually delivering) is what astrs status/astrs top/astrs topic echo are for.

Structs§

AddArgs
astrs node add arguments.
ConnectArgs
astrs node connect arguments.
DisconnectArgs
astrs node disconnect arguments.
RemoveArgs
astrs node remove arguments.
ReplaceArgs
astrs node replace arguments.

Functions§

add
Adds a node to a running dataflow.
connect
Adds — or, for an already-wired input, rewires — one input edge on a live node.
disconnect
Disconnects one input edge from a live node — the consumer is told astrs_wire::NodeEvent::InputClosed with astrs_wire::RouteCloseReason::Disconnected, not treated as a producer failure.
remove
Removes a node from a running dataflow.
replace
Replaces a live node with a new definition, keeping its existing edges (a fresh generation cuts over with a brief dual-run window; see astrs-daemon’s dataflow::topology module).