Skip to main content

Module source_handler

Module source_handler 

Source
Expand description

Source-side handler for incoming cross-cluster mirror connections.

When a mirror opens a QUIC connection to the source cluster it sends a [MirrorHello]. This module’s handle_mirror_connection function reads that hello, validates the cluster-id and protocol version, verifies the connecting peer has PeerRole::Observer (never Voter), and sends back a MirrorHelloAck.

On success the connection is handed off to the streaming layer (AppendEntries or snapshot chunks). On failure (mismatched cluster-id, bad protocol version, voter-class RPC attempt) the ack carries the appropriate error code and the connection is closed.

Structs§

HandshakeOutcome
Outcome of the source-side handshake.
SourceHandlerParams
Parameters the source passes to handle_mirror_connection.

Functions§

handle_mirror_connection
Accept and validate an incoming mirror [MirrorHello] on recv / send.