SuperCache.Cluster.Raft.System (SuperCache v1.7.0)

Copy Markdown View Source

Lifecycle facade for the RaftEx system used by SuperCache's :raft mode.

The system is started lazily by cluster bootstrap, after partitions and membership are available. Only one system is used for the whole node; each partition is a separate Raft cluster (server group) inside it.

Summary

Functions

Return whether the Raft system has been started.

Return the server id for a partition on this node.

Start the RaftEx system and create groups for locally owned partitions.

Stop all local groups and the RaftEx system.

Return the RaftEx system configuration for this node.

Return the RaftEx system name used by SuperCache.

Functions

running?()

@spec running?() :: boolean()

Return whether the Raft system has been started.

server_id(partition_idx)

@spec server_id(non_neg_integer()) :: {atom(), node()}

Return the server id for a partition on this node.

start!()

@spec start!() :: :ok

Start the RaftEx system and create groups for locally owned partitions.

stop()

@spec stop() :: :ok

Stop all local groups and the RaftEx system.

system_config()

@spec system_config() :: map()

Return the RaftEx system configuration for this node.

system_name()

@spec system_name() :: atom()

Return the RaftEx system name used by SuperCache.