pub enum TransportResponse {
Heartbeat,
BatchEnd {
id: RequestId,
},
BatchEndDegraded {
id: RequestId,
},
ServerBusy {
id: RequestId,
},
Refused {
id: RequestId,
kind: RefusalKind,
reason: &'static str,
},
Challenge {
nonce: [u8; 32],
},
AuthFailed,
ServerReady,
}Expand description
Transport-level response frames that the server runtime encodes
directly, bypassing the application’s ResponseEncoder trait.
These are the pipeline-control and auth-handshake messages that every server sends regardless of the application it hosts.
Every frame that ends a request’s reply names the request: the batch
terminators, ServerBusy and Refused carry its RequestId.
Variants§
Heartbeat
Periodic keep-alive sent to idle connections.
BatchEnd
Marks the end of the response batch for request id, backed as
the ack policy in force requires.
BatchEndDegraded
Marks the end of the response batch for request id that only
the primary’s own disk backs, a weaker guarantee than the ack
policy in force. Sent by a primary halted for want of a replica
for a request it had sequenced before the halt (or a query that
may reflect such requests), once its own journal holds it. A
client that needs the policy’s guarantee treats the request as
unconfirmed and reconciles.
ServerBusy
Request id was shed at ingress: not applied, safe to resend.
The connection stays open.
Refused
The application’s decoder refused request id: not applied.
reason is the decoder’s text, for people; the encoder truncates
it to MAX_REFUSAL_REASON bytes on a character boundary.
Challenge
Auth handshake: server → client challenge carrying a 32-byte random nonce. Encoded with the node’s client protocol version in front of the nonce.
AuthFailed
Auth handshake: server → client rejection.
ServerReady
Auth handshake: server → client success.