Expand description
The one connection every client verb shares: CLI → coordinator.
astrs list / stop / logs -f / param … ─┐
▼
TcpStream ─► FramedDuplex ─► initiate(Hello{role=Cli, token})
│
ControlRequest ───────────────┤ "stream 0"
ControlReply ◄──────────────┤
Log / Data frames ◄───────────┘ pushed for a subscriptionBlueprint §16 in one place: the greeting carries Role::Cli and the
64-hex cluster token, and a coordinator that refuses either says why in a
typed astrs_wire::Refused the transport turns into an error this
module reports with the address that was dialled attached — “connection
refused” without an address is the least useful error a CLI can print.
§Why not astrs_transport::backend::connect
That entry point returns a astrs_transport::Connection — a route
multiplexer with per-route streams, credit and datagrams, built for the
daemon↔daemon data plane. A CLI has exactly one logical stream (§6.4’s
“stream 0”) and needs the raw request/reply frames on it, which is what
astrs_transport::FramedDuplex plus astrs_transport::initiate
give directly. Using the mux here would add a header to every frame the
coordinator’s CLI session does not speak.
Structs§
Enums§
- Dataflow
Ref - Resolves a user-typed dataflow reference — an id or a name.
Constants§
- HANDSHAKE_
TIMEOUT - How long the greeting has before a dial is called dead.
- REQUEST_
TIMEOUT - How long a single request waits for its reply before giving up.
Functions§
- default_
port - The coordinator port this machine defaults to (§24.2).
- endpoint
- Builds the endpoint a client verb should dial from its flags.
- new_
subscription_ id - Mints a subscription id no other client is likely to be using.
- reply_
name - The variant name of a reply, for
CliError::UnexpectedReply. - resolve_
addr - Resolves a
--coordinatorargument (or its absence) into an address. - resolve_
text - The resolution rules
resolve_addrdocuments, without the environment lookup — the part worth testing directly. - runtime
- Builds a current-thread tokio runtime for one client verb.