Skip to main content

Module client_v2

Module client_v2 

Source
Expand description

v2 broker client (slice 4 of #488).

Counterpart of super::client. Single public entry point connect: dial the v2 broker pipe by program name, exchange a Hello / Negotiated, return a ClientSession handle.

The v2 broker fronts each program via the namespace defined by super::lifecycle::names_v2::v2_program_pipe. The Hello round-trip itself reuses v1’s framing (protocol::{read_frame, write_frame}) and message shapes (Hello, HelloReply) per #470’s coexistence table. Subsequent slices add post-Hello operations (streaming, HTTP endpoint discovery, etc.); this slice exposes only the handshake so downstream consumers (zccache et al.) can pin against a stable v2 client API while the broker side grows under them.

Structs§

ClientSession
A live session with the v2 broker.

Enums§

BrokerV2Error
Errors surfaced by connect.

Constants§

DEFAULT_HELLO_DEADLINE
Default deadline for the Hello round-trip in connect.

Functions§

connect
Dial the v2 broker for program and exchange Hello / Negotiated.
connect_with_deadline
Same as connect but with a caller-supplied deadline for the Hello round-trip. On deadline returns BrokerV2Error::Io(ErrorKind::TimedOut) and the helper thread continues to drain (there is no portable way to cancel a sync Stream::connect / framed read mid-call).