Package-level declarations

Types

Link copied to clipboard

A Raft learner-client that proposes commands through the cluster leader and exposes the committed log stream for state-machine application.

Link copied to clipboard
data class ClusterEndpoints(val endpoints: List<Tag>, val selector: EndpointSelector = RoundRobinEndpointSelector(startIndex = 0))

Configuration for a ClusterClient's endpoint rotation on transport tear.

Link copied to clipboard
class ManagedRaftTransport(scope: CoroutineScope, val selfId: NodeId) : RaftTransport

A RaftTransport whose backing Seam can be replaced on transport tear without recreating the us.tractat.kuilt.raft.RaftNode.

Link copied to clipboard
class VoterMesh

An M-voter Raft mesh — a complete-graph (K_M) cluster of voter RaftNodes.

Functions

Link copied to clipboard
fun CoroutineScope.clusterClient(loom: Loom, clusterEndpoints: ClusterEndpoints, clientNodeId: NodeId, clusterConfig: ClusterConfig, raftConfig: RaftConfig, identity: ClientIdentity = ClientIdentity.Auto, clock: () -> Instant): ClusterClient

Constructs a ClusterClient connected to the relay-room cluster.

Link copied to clipboard

Constructs a ClusterClient wrapping raftNode directly.

Link copied to clipboard
fun voterMeshFromNodes(voterNodes: Map<NodeId, RaftNode>, scope: CoroutineScope): VoterMesh

Construct a VoterMesh from pre-built voter nodes.