Skip to main content

Module monitor

Module monitor 

Source
Expand description

astrs list, astrs logs [-f] and the dataflow half of astrs status (blueprint §17’s Monitoring row).

  astrs list          ─► List{all}            ─► DataflowList  ─► table
  astrs status <ref>  ─► Info{include_nodes}  ─► DataflowList  ─► table
                         Check{dataflow}      ─► DataflowResult (terminal)
  astrs logs <ref>    ─► Logs{query}          ─► Logs{records}  ─► lines
  astrs logs -f       ─► LogSubscribe         ─► Log frames ────► lines
                         TopicUnsubscribe     ◄── Ctrl-C

§Read verbs, deliberately

Blueprint §16 splits the coordinator API into read verbs (list, logs, topic) and mutating ones (start, stop, param set). Everything in this module is on the read side, so none of it requires a token: a development coordinator started without one is still inspectable, which is exactly the setup a first-time user has. A coordinator that does demand a token refuses the greeting, and that refusal is reported with the address that was dialled.

§logs and logs -f are two different requests

astrs_wire::ControlRequest::Logs takes a required astrs_wire::DataflowId and answers with a bounded batch; astrs_wire::ControlRequest::LogSubscribe takes an optional one and pushes frames until the subscription ends. So astrs logs -f with no dataflow named follows the whole cluster, while astrs logs with none resolves the single dataflow that exists and refuses to guess between two — see crate::command::client::Client::sole_dataflow.

Structs§

DataflowStatusArgs
astrs status <dataflow>’s arguments.
DataflowStatusReport
What astrs status <dataflow> found.
ListArgs
astrs list’s arguments.
ListReport
What astrs list found.
LogsArgs
astrs logs’s arguments.
LogsReport
What one astrs logs did.

Functions§

dataflow_status
Describes one dataflow: its row, its nodes, and its verdict if it has one.
list
Lists the cluster’s dataflows.
logs
Dumps, or follows, a dataflow’s logs.