SeamRaftTransport

Adapts a kuilt-core Seam to the RaftTransport interface.

This is the standard bridge between the kuilt fabric layer and the Raft consensus layer. It maps PeerIdNodeId by their string values and forwards sends and receives through the underlying Seam.

Peer reachability. peers reflects Seam.peers — nodes connected on the fabric, not necessarily all configured voters. A voter absent from the Seam is simply unreachable at the transport layer; the Raft engine handles this as an ordinary network partition.

Incoming filtering. Swatches with a null sender (e.g. broadcast frames from the fabric layer itself) are silently dropped; only frames with a known sender are forwarded as RaftEnvelopes.

This class is the only place in kuilt-raft that names a kuilt-core fabric type — Seam, PeerId, and the errors they raise. All other Raft types are transport-agnostic; the handful of kuilt-core symbols they do reach for are utilities (runCatchingCancellable, checkNotUnderTestDispatcher) and PayloadTooLarge, which is the contract the fabric refuses by and so travels with the budget rather than with the transport.

Constructors

Link copied to clipboard
constructor(seam: Seam)

Properties

Link copied to clipboard
open override val incoming: Flow<RaftEnvelope>

Hot flow of inbound RaftEnvelopes from other cluster members.

Link copied to clipboard
open override val maxPayloadBytes: Int?

The seam's budget, republished unchanged (#2069).

Link copied to clipboard
open override val peers: StateFlow<Set<NodeId>>

The set of peers currently reachable via this transport.

Link copied to clipboard
open override val selfId: NodeId

This node's own stable identifier. Must match its entry in ClusterConfig.

Functions

Link copied to clipboard
open suspend override fun sendTo(peer: NodeId, message: ByteArray)

Sends message to peer.