close

suspend fun close(reason: CloseReason = CloseReason.Normal)

Local teardown: stops the consensus node's loops, then closes the underlying fabric. Idempotent — a second call is a no-op.

Order matters: the node is stopped before the fabric is torn so its loops do not observe a closed seam mid-shutdown. This is a hard local teardown, not a graceful cluster departure — to leave a cluster cleanly, hand off leadership (RaftNode.transferLeadership) and/or remove this peer from membership (RaftNode.changeMembership) first. For a voluntary voter departure use leave before calling close.