Expand description
CLIENT-role connection driver.
The CLIENT role is the engine’s view of an inbound connection from a Redis or memcache client. The driver:
- Reads bytes from the
crate::io::reactor::Transportinto the connection’s recv mbuf chain. - Drives the appropriate datastore parser
(
crate::proto::redis::redis_parse_reqorcrate::proto::memcache::memcache_parse_req) over the chain. - Hands every fully-parsed request to the configured
crate::net::Dispatcherand waits for a response on the per-connection mpsc channel. - Writes the response bytes back to the transport.
The driver runs a single tokio select! per iteration, draining
pending response bytes first so the loop’s read / write
arms never block on a saturated peer.
The Stage 9 implementation does not yet reach into the cluster
layer (Stage 10) or the entropy reconciliation (Stage 11);
those plug in through the Dispatcher hook the proxy
installs.
Structs§
- Client
Handler - Client-side request handler bundle.
Enums§
- Client
Loop Outcome - Outcome reported by
client_loopwhen it finishes.
Functions§
- client_
loop - Drive the client FSM until the peer closes or the dispatcher asks the driver to exit.