Configuration defaults and validation for the opt-in :raft replication mode.
All settings are optional and live under config :super_cache, :raft:
config :super_cache, :raft,
data_dir: "/var/lib/my_app/super_cache_raft",
command_timeout_ms: 2_000,
wal_sync_method: :datasync,
wal_max_size_bytes: 256_000_000The default data_dir is a per-node directory in the system temp dir;
deployments that need durable Raft logs across restarts should set it
explicitly.
Summary
Functions
Return all Raft settings with application config overrides applied.
Return the default configuration keyword list.
Return a single Raft setting.
Forget the memoized default data directory (used by tests).
Validate the configured settings, raising ArgumentError on invalid values.
Functions
@spec all() :: keyword()
Return all Raft settings with application config overrides applied.
@spec defaults() :: keyword()
Return the default configuration keyword list.
Return a single Raft setting.
@spec reset() :: :ok
Forget the memoized default data directory (used by tests).
@spec validate!() :: :ok
Validate the configured settings, raising ArgumentError on invalid values.
Bootstrap calls this before starting any Raft group so a bad configuration fails on startup rather than on the first write.