Expand description
CLIENT-role connection driver.
The CLIENT role is the engine’s view of an inbound connection from a client (RESP or memcache). 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 driver does not reach into the cluster layer or the entropy
reconciliation directly; both plug in through the Dispatcher
hook the proxy installs, keeping the driver decoupled from
routing and repair.
Structs§
- Client
Handler - Client-side request handler bundle.
Enums§
- Client
Loop Outcome - Outcome reported by
client_loopwhen it finishes.
Traits§
- Replica
Apply Sink - Sink that applies an inbound cross-node object-replica op to the local datastore.
Functions§
- client_
loop - Drive the client FSM until the peer closes or the dispatcher asks the driver to exit.
Type Aliases§
- BoxFuture
- Boxed future returned by
ReplicaApplySink::apply.