pub enum ManagerInput<'a> {
ClientDatagram {
src: SocketAddr,
payload: &'a [u8],
backends: &'a mut dyn BackendSource,
},
BackendDatagram {
flow: FlowId,
payload: &'a [u8],
},
Config(ConfigEvent),
}Expand description
Inputs the shell feeds into the manager. Borrows the recv buffer; the core
copies into an owned Vec<u8> only on admission.
Debug is hand-written rather than derived because
ManagerInput::ClientDatagram carries a &mut dyn BackendSource, which
has no Debug bound and should not gain one for a diagnostic. The mux’s
Position renders itself the same way and for the same reason: the handle
is elided, everything else is shown.
Variants§
ClientDatagram
A datagram from a client. Admitted into an existing/new flow or dropped.
Carries the backend view because this is the only input that selects: admission resolves a backend before the flow exists, so the view arrives with the datagram that needs it rather than on every entry point. Three of the four inputs cannot select, and a signature that demanded a backend set from all of them would say otherwise.
Fields
src: SocketAddrReal (pre-NAT) client source address.
backends: &'a mut dyn BackendSourceThe backend set to select from, for this admission only.
BackendDatagram
A datagram from a backend, tagged by the shell with the owning flow
(upstream_token -> FlowId). Drives the symmetric NAT return path.
Fields
Config(ConfigEvent)
A control-plane / health event (add/remove backend, LB algo, timeouts, per-cluster knobs, drain). Never allocates a flow.